X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d17d68f470c31f7c145b095eb1a3e0c2f581f30..e29b83a455bead3dae44300f631d07aa9635d3e9:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 147c0d5a1c..4696faeb11 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -15,6 +15,7 @@ #include "wx/menu.h" #include "wx/log.h" #include "wx/intl.h" +#include "wx/app.h" #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -154,6 +155,32 @@ bool wxMenuBar::Enabled( int id ) const return FALSE; } +wxString wxMenuBar::GetLabel( int id ) const +{ + wxMenuItem* item = FindMenuItemById( id ); + if (item) return item->GetText(); + return ""; +} + +void wxMenuBar::SetLabel( int id, const wxString &label ) +{ + wxMenuItem* item = FindMenuItemById( id ); + if (item) return item->SetText( label ); +} + +void wxMenuBar::EnableTop( int WXUNUSED(pos), bool WXUNUSED(flag) ) +{ +} + +wxString wxMenuBar::GetLabelTop( int WXUNUSED(pos) ) const +{ + return "menu"; +} + +void wxMenuBar::SetLabelTop( int WXUNUSED(pos), const wxString& WXUNUSED(label) ) +{ +} + //----------------------------------------------------------------------------- // "activate" //----------------------------------------------------------------------------- @@ -180,7 +207,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) else { /* the user pressed on the menu item -> report */ - item->m_isChecked; /* make consistent again */ + item->m_isChecked = item->IsChecked(); /* make consistent again */ } }