X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/147e8ebc058cf2986d977388fa3861d8b3ceca93..5c87527c5a81eda63e7ccbda2f226ca02716e7da:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index e97a419bd6..37c0c127f1 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -58,7 +58,8 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu, wxItemKind kind, wxMenu *subMenu) { - wxASSERT_MSG( parentMenu != NULL, wxT("menuitem should have a menu") ); + // notice that parentMenu can be NULL: the item can be attached to the menu + // later with SetMenu() m_parentMenu = parentMenu; m_subMenu = subMenu; @@ -125,6 +126,13 @@ void wxMenuItemBase::SetHelp(const wxString& str) } } +#ifndef __WXPM__ +wxString wxMenuItemBase::GetLabelText(const wxString& text) +{ + return wxStripMenuCodes(text); +} +#endif + #if WXWIN_COMPATIBILITY_2_8 wxString wxMenuItemBase::GetLabelFromText(const wxString& text) { @@ -152,8 +160,6 @@ void wxMenuBase::Init(long style) wxMenuBase::~wxMenuBase() { WX_CLEAR_LIST(wxMenuItemList, m_items); - - // Actually, in GTK, the submenus have to get deleted first. } // ---------------------------------------------------------------------------- @@ -465,7 +471,7 @@ bool wxMenuBase::SendEvent(int id, int checked) wxWindow *win = menu->GetInvokingWindow(); if ( win ) { - processed = win->GetEventHandler()->SafelyProcessEvent(event); + processed = win->HandleWindowEvent(event); break; } @@ -822,7 +828,7 @@ wxString wxMenuBarBase::GetHelpString(int id) const return item->GetHelp(); } -void wxMenuBarBase::UpdateMenus( void ) +void wxMenuBarBase::UpdateMenus() { wxEvtHandler* source; wxMenu* menu;