X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fd7b18a6199f64b5a58e7af50e2870e97430790..0e0d3ae110601e631aa4b153a06c5544aa63057d:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 49f2b2d20f..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) { @@ -820,7 +828,7 @@ wxString wxMenuBarBase::GetHelpString(int id) const return item->GetHelp(); } -void wxMenuBarBase::UpdateMenus( void ) +void wxMenuBarBase::UpdateMenus() { wxEvtHandler* source; wxMenu* menu;