From cc5fe8d45996dc10ba32867205265f26c794eaa7 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 3 Feb 2011 10:20:01 +0000 Subject: [PATCH] fixes #10978 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/menu_osx.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 ; -- 2.50.0