X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52af3158e974b042008474268570f3bdb7ce95ee..f1fc7bab85864e99f4e7de4994e947ab0ab5a83a:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 28436b7484..7fbcb2cfb5 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -148,14 +148,14 @@ static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event) extern "C" { -static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu ) +static void gtk_menu_open_callback( GtkWidget *WXUNUSED(widget), wxMenu *menu ) { wxMenuEvent event(wxEVT_MENU_OPEN, -1, menu); DoCommonMenuCallbackCode(menu, event); } -static void gtk_menu_close_callback( GtkWidget *widget, wxMenuBar *menubar ) +static void gtk_menu_close_callback( GtkWidget *WXUNUSED(widget), wxMenuBar *menubar ) { if ( !menubar->GetMenuCount() ) { @@ -794,7 +794,10 @@ wxString wxMenuItemBase::GetLabelText(const wxString& text) wxString wxMenuItem::GetItemLabel() const { - return wxConvertFromGTKToWXLabel(m_text); + wxString label = wxConvertFromGTKToWXLabel(m_text); + if (!m_hotKey.IsEmpty()) + label = label + wxT("\t") + m_hotKey; + return label; } void wxMenuItem::SetItemLabel( const wxString& string ) @@ -1027,7 +1030,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos) } else if (mitem->GetBitmap().Ok()) { - text = mitem->GetItemLabel(); + text = mitem->wxMenuItemBase::GetItemLabel(); const wxBitmap *bitmap = &mitem->GetBitmap(); // TODO @@ -1040,7 +1043,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos) else // a normal item { // text has "_" instead of "&" after mitem->SetItemLabel() so don't use it - text = mitem->GetItemLabel() ; + text = mitem->wxMenuItemBase::GetItemLabel() ; switch ( mitem->GetKind() ) {