Put Services submenu into the Apple menu on OS X.
Native applications have a Services submenu in the apple menu. wx applications didn't until now. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2293,7 +2293,12 @@ enum wxStandardID
|
|||||||
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
|
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
|
||||||
wxID_OSX_HIDEOTHERS,
|
wxID_OSX_HIDEOTHERS,
|
||||||
wxID_OSX_SHOWALL,
|
wxID_OSX_SHOWALL,
|
||||||
|
#if wxABI_VERSION >= 30001
|
||||||
|
wxID_OSX_SERVICES,
|
||||||
|
wxID_OSX_MENU_LAST = wxID_OSX_SERVICES,
|
||||||
|
#else
|
||||||
wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL,
|
wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL,
|
||||||
|
#endif
|
||||||
|
|
||||||
/* IDs used by generic file dialog (13 consecutive starting from this value) */
|
/* IDs used by generic file dialog (13 consecutive starting from this value) */
|
||||||
wxID_FILEDLGG = 5900,
|
wxID_FILEDLGG = 5900,
|
||||||
|
@@ -194,6 +194,10 @@ public :
|
|||||||
{
|
{
|
||||||
[NSApp setMainMenu:m_osxMenu];
|
[NSApp setMainMenu:m_osxMenu];
|
||||||
[NSApp setAppleMenu:[[m_osxMenu itemAtIndex:0] submenu]];
|
[NSApp setAppleMenu:[[m_osxMenu itemAtIndex:0] submenu]];
|
||||||
|
|
||||||
|
wxMenuItem *services = GetWXPeer()->FindItem(wxID_OSX_SERVICES);
|
||||||
|
if ( services )
|
||||||
|
[NSApp setServicesMenu:services->GetSubMenu()->GetHMenu()];
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Enable( bool WXUNUSED(enable) )
|
virtual void Enable( bool WXUNUSED(enable) )
|
||||||
|
@@ -615,6 +615,9 @@ static wxMenu *CreateAppleMenu()
|
|||||||
appleMenu->AppendSeparator();
|
appleMenu->AppendSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appleMenu->Append(wxID_OSX_SERVICES, _("Services"), new wxMenu());
|
||||||
|
appleMenu->AppendSeparator();
|
||||||
|
|
||||||
// standard menu items, handled in wxMenu::HandleCommandProcess(), see above:
|
// standard menu items, handled in wxMenu::HandleCommandProcess(), see above:
|
||||||
wxString hideLabel;
|
wxString hideLabel;
|
||||||
hideLabel = wxString::Format(_("Hide %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application"));
|
hideLabel = wxString::Format(_("Hide %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application"));
|
||||||
|
Reference in New Issue
Block a user