]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/menu.cpp
Applied #15375 to stop event-sending in generic wxSpinCtrl ctor (eco)
[wxWidgets.git] / src / gtk1 / menu.cpp
index c0e9ffe315c9d94032a77d97455d099bd83637cd..16e1d9d203fe29b96f0ad546dc1f0a6f62191cab 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk1/menu.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -25,6 +24,7 @@
 #endif // wxUSE_ACCEL
 
 #include "wx/gtk1/private.h"
+#include "wx/gtk1/private/mnemonics.h"
 
 #include <gdk/gdkkeysyms.h>
 
@@ -174,8 +174,6 @@ static void gtk_menu_close_callback( GtkWidget *WXUNUSED(widget), wxMenuBar *men
 // wxMenuBar
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
-
 void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long style)
 {
     // the parent window is known after wxFrame::SetMenu()
@@ -615,7 +613,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
         // If it is attached then let the frame send the event.
         // Don't call frame->ProcessCommand(id) because it toggles
         // checkable items and we've already done that above.
-        wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
+        wxCommandEvent commandEvent(wxEVT_MENU, id);
         commandEvent.SetEventObject(frame);
         if (item->IsCheckable())
             commandEvent.SetInt(item->IsChecked());
@@ -692,8 +690,6 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
 // wxMenuItem
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
-
 wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu,
                                 int id,
                                 const wxString& name,
@@ -917,8 +913,6 @@ bool wxMenuItem::IsChecked() const
 // wxMenu
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler)
-
 void wxMenu::Init()
 {
     m_accel = gtk_accel_group_new();
@@ -981,7 +975,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
         // TODO
         menuItem = gtk_menu_item_new();
     }
-    else if (mitem->GetBitmap().Ok())
+    else if (mitem->GetBitmap().IsOk())
     {
         text = mitem->wxMenuItemBase::GetItemLabel();
         const wxBitmap *bitmap = &mitem->GetBitmap();