From 044388d13fb138fb202f1dd9afab511efd68ad5f Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 4 Oct 2013 02:38:00 -0700 Subject: [PATCH] Expose the Apple menu so it can be setup manually. --- include/wx/osx/menu.h | 2 ++ src/osx/menu_osx.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/wx/osx/menu.h b/include/wx/osx/menu.h index 3ef7699599..a751241cec 100644 --- a/include/wx/osx/menu.h +++ b/include/wx/osx/menu.h @@ -156,6 +156,8 @@ public: static WXHMENU MacGetWindowMenuHMenu() { return s_macWindowMenuHandle ; } + + wxMenu* GetAppleMenu() { return m_appleMenu; } protected: // common part of all ctors void Init(); diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index 2bf5cede9e..8cd6da4b55 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -622,6 +622,7 @@ void wxMenuBar::Init() m_appleMenu = new wxMenu(); m_appleMenu->SetAllowRearrange(false); +#if 0 // Create standard items unless the application explicitly disabled this by // setting the corresponding ids to wxID_NONE: although this is not // recommended, sometimes these items really don't make sense. @@ -657,6 +658,7 @@ void wxMenuBar::Init() quitLabel = wxString::Format(_("Quit %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application")); m_appleMenu->Append( wxApp::s_macExitMenuItemId, quitLabel + "\tCtrl+Q" ); #endif // !wxOSX_USE_CARBON +#endif m_rootMenu->AppendSubMenu(m_appleMenu, "\x14") ; } @@ -715,6 +717,7 @@ void wxMenuBar::MacInstallMenuBar() m_rootMenu->GetPeer()->MakeRoot(); +#if 0 // hide items in the apple menu that don't exist in the wx menubar wxMenuItem* appleItem = NULL; @@ -741,6 +744,7 @@ void wxMenuBar::MacInstallMenuBar() else appleItem->SetItemLabel(wxItem->GetItemLabel()); } +#endif #if 0 -- 2.45.2