X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d62a8b4251a2ca0d3057cef3c082d45e4e71bdd..5dd26b083956439f0147c134e9365c222fba3726:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 20fce15bf0..daff7c92be 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -78,6 +78,8 @@ wxMenuBar::wxMenuBar( long style ) } PostCreation(); + + ApplyWidgetStyle(); } wxMenuBar::wxMenuBar() @@ -108,6 +110,8 @@ wxMenuBar::wxMenuBar() m_widget = GTK_WIDGET(m_menubar); PostCreation(); + + ApplyWidgetStyle(); } wxMenuBar::~wxMenuBar() @@ -480,7 +484,7 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label ) static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) { if (g_isIdle) wxapp_install_idle_handler(); - + int id = menu->FindMenuIdByMenuItem(widget); /* should find it for normal (not popup) menu */ @@ -621,11 +625,12 @@ wxMenuItem::~wxMenuItem() } // return the menu item text without any menu accels -wxString wxMenuItem::GetLabel() const +/* static */ +wxString wxMenuItemBase::GetLabelFromText(const wxString& text) { wxString label; #if (GTK_MINOR_VERSION > 0) - for ( const wxChar *pc = m_text.c_str(); *pc; pc++ ) + for ( const wxChar *pc = text.c_str(); *pc; pc++ ) { if ( *pc == wxT('_') ) { @@ -636,7 +641,7 @@ wxString wxMenuItem::GetLabel() const label += *pc; } #else // GTK+ 1.0 - label = m_text; + label = text; #endif // GTK+ 1.2/1.0 return label; @@ -951,9 +956,9 @@ bool wxMenu::DoInsert(size_t pos, wxMenuItem *item) #else // GTK < 1.2 // this should be easy to do... wxFAIL_MSG( wxT("not implemented") ); -#endif // GTK 1.2/1.0 return FALSE; +#endif // GTK 1.2/1.0 } wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)