X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84c5131950767b011faa9cbab9ef389923d17597..1722a3f626f7b29b42a22fc6329ce12fb5e8ed90:/src/gtk/menu.cpp?ds=sidebyside diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 82b03573ef..002d5f5668 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -747,10 +747,6 @@ wxMenuItem::~wxMenuItem() // return the menu item text without any menu accels /* static */ -// TODO: this is now wrong, because it will be used by public APIs -// to convert from label-with-wxWidgets-hotkeys to plain text, -// and this function converts from GTK+ hotkeys to plain text. - wxString wxMenuItemBase::GetLabelText(const wxString& text) { // The argument to this function will now always be in wxWidgets standard label @@ -800,7 +796,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& str )