mac: Enable setting "Services" menu.
Regarding https://github.com/atom/atom/issues/3204.
This commit is contained in:
parent
ca881c5aaf
commit
f604525b98
2 changed files with 10 additions and 0 deletions
|
@ -34,6 +34,13 @@ app.on('ready', function() {
|
|||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Services',
|
||||
submenu: []
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Hide Atom Shell',
|
||||
accelerator: 'Command+H',
|
||||
|
|
|
@ -159,6 +159,9 @@ int EventFlagsFromNSEvent(NSEvent* event) {
|
|||
[NSApp setWindowsMenu:submenu];
|
||||
else if ([[item title] isEqualToString:@"Help"])
|
||||
[NSApp setHelpMenu:submenu];
|
||||
if ([[item title] isEqualToString:@"Services"] &&
|
||||
[submenu numberOfItems] == 0)
|
||||
[NSApp setServicesMenu:submenu];
|
||||
} else {
|
||||
// The MenuModel works on indexes so we can't just set the command id as the
|
||||
// tag like we do in other menus. Also set the represented object to be
|
||||
|
|
Loading…
Reference in a new issue