X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68bc148cac0232c0f0aed3ab2f27dfe074869e45..84e455807ee62925c98e18d2848954125b128018:/src/common/menucmn.cpp?ds=sidebyside diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index fa0bfec3d7..49f2b2d20f 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -67,7 +67,7 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu, m_id = id; m_kind = kind; if (m_id == wxID_ANY) - m_id = wxNewId(); + m_id = wxWindow::NewControlId(); if (m_id == wxID_SEPARATOR) m_kind = wxITEM_SEPARATOR; @@ -152,8 +152,6 @@ void wxMenuBase::Init(long style) wxMenuBase::~wxMenuBase() { WX_CLEAR_LIST(wxMenuItemList, m_items); - - // Actually, in GTK, the submenus have to get deleted first. } // ---------------------------------------------------------------------------- @@ -452,7 +450,7 @@ bool wxMenuBase::SendEvent(int id, int checked) { wxEvtHandler *handler = GetEventHandler(); if ( handler ) - processed = handler->ProcessEvent(event); + processed = handler->SafelyProcessEvent(event); } // Try the window the menu was popped up from (and up through the @@ -465,7 +463,7 @@ bool wxMenuBase::SendEvent(int id, int checked) wxWindow *win = menu->GetInvokingWindow(); if ( win ) { - processed = win->GetEventHandler()->ProcessEvent(event); + processed = win->HandleWindowEvent(event); break; } @@ -848,9 +846,8 @@ void wxMenuBarBase::SetLabelTop(size_t pos, const wxString& label) wxString wxMenuBarBase::GetLabelTop(size_t pos) const { - return GetMenuLabel(pos); + return GetMenuLabelText(pos); } #endif - #endif // wxUSE_MENUS