X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/524c47aa3adf2af11a3069fd5da035a604f08f66..1dc39a1fb565cbdc90f8537599551a3556efce8a:/src/osx/menuitem_osx.cpp diff --git a/src/osx/menuitem_osx.cpp b/src/osx/menuitem_osx.cpp index a680ad71fc..657e3d2447 100644 --- a/src/osx/menuitem_osx.cpp +++ b/src/osx/menuitem_osx.cpp @@ -11,6 +11,8 @@ #include "wx/wxprec.h" +#if wxUSE_MENUS + #include "wx/menuitem.h" #include "wx/stockitem.h" @@ -55,7 +57,8 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, } wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ; - m_peer = wxMenuItemImpl::Create( this, pParentMenu, id, text, entry, strHelp, kind, pSubMenu ); + // use accessors for ID and Kind because they might have been changed in the base constructor + m_peer = wxMenuItemImpl::Create( this, pParentMenu, GetId(), text, entry, strHelp, GetKind(), pSubMenu ); delete entry; } @@ -120,7 +123,7 @@ void wxMenuItem::Check(bool bDoCheck) const wxMenuItemList& items = m_parentMenu->GetMenuItems(); int pos = items.IndexOf(this); wxCHECK_RET( pos != wxNOT_FOUND, - _T("menuitem not found in the menu items list?") ); + wxT("menuitem not found in the menu items list?") ); // get the radio group range int start, end; @@ -250,3 +253,5 @@ wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu, { return new wxMenuItem(parentMenu, id, name, help, kind, subMenu); } + +#endif