diff --git a/include/wx/defs.h b/include/wx/defs.h index 0d03f0a313..a15f7cc576 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -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, diff --git a/src/osx/cocoa/menu.mm b/src/osx/cocoa/menu.mm index 9733bc56cd..65d1572599 100644 --- a/src/osx/cocoa/menu.mm +++ b/src/osx/cocoa/menu.mm @@ -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) ) diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index 20af4b3e1e..97685d31ef 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -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"));