]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/menu.cpp
For consistency with other ports, send TEXT event after SELECTED event
[wxWidgets.git] / src / gtk / menu.cpp
index 4b1f261f3c2ccbb6a8b6c2f45b8f6e0406c9e609..1be1da30efb82cf76ad24e48dc7ba809fdd98efa 100644 (file)
@@ -7,11 +7,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "menu.h"
-    #pragma implementation "menuitem.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -563,20 +558,20 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
 
     wxMenu* menu = node->GetData();
 
-    wxString str( wxReplaceUnderscore( label ) );
+    const wxString str( wxReplaceUnderscore( label ) );
 
     menu->SetTitle( str );
 
     if (menu->m_owner)
     {
-        GtkLabel *label = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
+        GtkLabel *glabel = GTK_LABEL( GTK_BIN(menu->m_owner)->child );
 
         /* set new text */
-        gtk_label_set( label, wxGTK_CONV( str ) );
+        gtk_label_set( glabel, wxGTK_CONV( str ) );
 
         /* reparse key accel */
-        (void)gtk_label_parse_uline (GTK_LABEL(label), wxGTK_CONV( str ) );
-        gtk_accel_label_refetch( GTK_ACCEL_LABEL(label) );
+        (void)gtk_label_parse_uline (GTK_LABEL(glabel), wxGTK_CONV( str ) );
+        gtk_accel_label_refetch( GTK_ACCEL_LABEL(glabel) );
     }
 
 }