Added the Services menu to the OS X application menu.

This commit is contained in:
Pietro Gagliardi 2015-05-02 11:11:13 -04:00
parent a0b29d599e
commit c89b473c76
1 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,7 @@ enum {
NSMenu *appMenu;
NSMenuItem *item;
NSString *title;
NSMenu *servicesMenu;
appName = [[NSProcessInfo processInfo] processName];
appMenuItem = [[NSMenuItem alloc] initWithTitle:appName action:NULL keyEquivalent:@""];
@ -126,7 +127,10 @@ enum {
// next is Services
item = [[NSMenuItem alloc] initWithTitle:@"Services" action:NULL keyEquivalent:@""];
// TODO build this part
servicesMenu = [[NSMenu alloc] initWithTitle:@"Services"];
[item setSubmenu:servicesMenu];
[NSApp setServicesMenu:servicesMenu];
[appMenu addItem:item];
[appMenu addItem:[NSMenuItem separatorItem]];