X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f66f6a5b3583b02c34854556eb83e3a808524ce..cdbd62d6ff290fd58acd1bc5574dfc79db3a6f70:/src/gtk/menu.cpp diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 4cf5d7f04e..f5194b89f0 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -317,11 +317,10 @@ void wxMenuBar::GtkAppend(wxMenu* menu, const wxString& title, int pos) else #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 /!wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 { - const wxString str(wxConvertMnemonicsToGTK(title)); - // This doesn't have much effect right now. - menu->SetTitle( str ); + menu->SetTitle( title ); + const wxString str(wxConvertMnemonicsToGTK(title)); // The "m_owner" is the "menu item" menu->m_owner = gtk_menu_item_new_with_mnemonic( wxGTK_CONV( str ) ); @@ -504,10 +503,9 @@ void wxMenuBar::SetMenuLabel( size_t pos, const wxString& label ) wxMenu* menu = node->GetData(); - const wxString str(wxConvertMnemonicsToGTK(label)); - - menu->SetTitle( str ); + menu->SetTitle( label ); + const wxString str(wxConvertMnemonicsToGTK(label)); if (menu->m_owner) gtk_label_set_text_with_mnemonic(GTK_LABEL(gtk_bin_get_child(GTK_BIN(menu->m_owner))), wxGTK_CONV(str)); } @@ -843,6 +841,11 @@ wxString wxMenu::GetTitle() const return wxConvertMnemonicsFromGTK(wxMenuBase::GetTitle()); } +void wxMenu::SetTitle(const wxString& title) +{ + wxMenuBase::SetTitle(wxConvertMnemonicsToGTK(title)); +} + void wxMenu::GtkAppend(wxMenuItem* mitem, int pos) { GtkWidget *menuItem;