X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d355d3fe69153840d740469eddacc3336da2b5ae..44a6c8e61808e6197bc78e2344c2e93853943350:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 6b44b2f271..46a12dee68 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -122,19 +122,31 @@ wxMenuItem* wxMenuBar::FindMenuItemById( int id ) const return result; } -bool wxMenuBar::IsChecked( int id ) const +void wxMenuBar::Check( int id, bool check ) +{ + wxMenuItem* item = FindMenuItemById( id ); + if (item) item->Check(check); +}; + +bool wxMenuBar::Checked( int id ) const { wxMenuItem* item = FindMenuItemById( id ); if (item) return item->IsChecked(); return FALSE; -} +}; -bool wxMenuBar::IsEnabled( int id ) const +void wxMenuBar::Enable( int id, bool enable ) +{ + wxMenuItem* item = FindMenuItemById( id ); + if (item) item->Enable(enable); +}; + +bool wxMenuBar::Enabled( int id ) const { wxMenuItem* item = FindMenuItemById( id ); if (item) return item->IsEnabled(); return FALSE; -} +}; //----------------------------------------------------------------------------- // wxMenu @@ -154,7 +166,7 @@ void gtk_menu_clicked_callback( GtkWidget *widget, gpointer data ) event.SetEventObject( menu ); event.SetInt(id ); wxWindow *win = menu->GetInvokingWindow(); - if (win) win->ProcessEvent( event ); + if (win) win->GetEventHandler()->ProcessEvent( event ); }; IMPLEMENT_DYNAMIC_CLASS(wxMenuItem,wxObject)