X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96a3acb72cb045e6327e1d8a30b3462a500b5ae4..cc4d5638c66a409e421420ed7110917755a66788:/src/gtk1/menu.cpp diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index c0e9ffe315..16e1d9d203 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -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 @@ -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();