]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/menu.cpp
another fix for HP-UX 11.11 vsscanf, should have been in r51260
[wxWidgets.git] / src / gtk1 / menu.cpp
index 5e3f79fba58f4086a7ea4fd859a439f180d7ea53..62906a470948f9f76fb09baf0657f46655b6a5d2 100644 (file)
@@ -143,19 +143,19 @@ static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
 
     wxWindow *win = menu->GetInvokingWindow();
     if (win)
-        win->GetEventHandler()->ProcessEvent( event );
+        win->HandleWindowEvent( 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() )
     {
@@ -632,7 +632,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
             commandEvent.SetInt(item->IsChecked());
         commandEvent.SetEventObject(menu);
 
-        frame->GetEventHandler()->ProcessEvent(commandEvent);
+        frame->HandleWindowEvent(commandEvent);
     }
     else
     {
@@ -666,7 +666,7 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
         return;
 
     wxWindow *win = menu->GetInvokingWindow();
-    if (win) win->GetEventHandler()->ProcessEvent( event );
+    if (win) win->HandleWindowEvent( event );
 }
 }
 
@@ -695,7 +695,7 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
 
     wxWindow *win = menu->GetInvokingWindow();
     if (win)
-        win->GetEventHandler()->ProcessEvent( event );
+        win->HandleWindowEvent( event );
 }
 }
 
@@ -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->wxMenuItembase::GetItemLabel();
+        text = mitem->wxMenuItemBase::GetItemLabel();
         const wxBitmap *bitmap = &mitem->GetBitmap();
 
         // TODO