X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b919f007af55c6bcba975ead6177c80a317e1a4a..de804346e42798efd23cbd17fb6b7ac9ae37d2b1:/src/gtk/menu.cpp

diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp
index 094b02165a..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()
@@ -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)