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,8 +2293,13 @@ enum wxStandardID
|
||||
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
|
||||
wxID_OSX_HIDEOTHERS,
|
||||
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,
|
||||
|
||||
#endif
|
||||
|
||||
/* IDs used by generic file dialog (13 consecutive starting from this value) */
|
||||
wxID_FILEDLGG = 5900,
|
||||
|
||||
|
@@ -194,6 +194,10 @@ public :
|
||||
{
|
||||
[NSApp setMainMenu:m_osxMenu];
|
||||
[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) )
|
||||
|
@@ -615,6 +615,9 @@ static wxMenu *CreateAppleMenu()
|
||||
appleMenu->AppendSeparator();
|
||||
}
|
||||
|
||||
appleMenu->Append(wxID_OSX_SERVICES, _("Services"), new wxMenu());
|
||||
appleMenu->AppendSeparator();
|
||||
|
||||
// standard menu items, handled in wxMenu::HandleCommandProcess(), see above:
|
||||
wxString hideLabel;
|
||||
hideLabel = wxString::Format(_("Hide %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application"));
|
||||
|
Reference in New Issue
Block a user