From: Stefan Csomor Date: Thu, 3 Feb 2011 10:20:01 +0000 (+0000) Subject: fixes #10978 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cc5fe8d45996dc10ba32867205265f26c794eaa7?hp=f67a33e3adc84e606ed251256102fc125c6a138a fixes #10978 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index a6d6f2c56b..dcdb935fbd 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -595,7 +595,23 @@ void wxMenuBar::MacInstallMenuBar() return ; m_rootMenu->GetPeer()->MakeRoot(); + + // hide items in the apple menu that don't exist in the wx menubar + + int id = 0; + wxMenuItem* appleItem = NULL; + id = wxApp::s_macAboutMenuItemId; + appleItem = m_appleMenu->FindItem(id); + if ( appleItem != NULL ) + appleItem->GetPeer()->Hide(FindItem(id) == NULL ); + + id = wxApp::s_macPreferencesMenuItemId; + appleItem = m_appleMenu->FindItem(id); + if ( appleItem != NULL ) + appleItem->GetPeer()->Hide(FindItem(id) == NULL ); + + #if 0 MenuBarHandle menubar = NULL ;