]> git.saurik.com Git - wxWidgets.git/commitdiff
Add accelerator back to label in GetItemLabel
authorJulian Smart <julian@anthemion.co.uk>
Mon, 13 Aug 2007 14:43:39 +0000 (14:43 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 13 Aug 2007 14:43:39 +0000 (14:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/menu.cpp
src/gtk1/menu.cpp

index 9c8df7c0785a1fda3aa72fd1a84b66659483e97c..002d5f5668b3f7ba091c7bff6135cae4da6347d9 100644 (file)
@@ -796,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 )
index 5e3f79fba58f4086a7ea4fd859a439f180d7ea53..cfd9427eb359a31a4818d66f210cccfdbd5cd8b7 100644 (file)
@@ -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 )