mac: Pass useDefaultAccelerator to getAcceleratorForCommandId

This commit is contained in:
Cheng Zhao 2016-07-02 11:47:40 +09:00 committed by Kevin Sawicki
parent 77cdc2c4a7
commit 6381f44f26
17 changed files with 102 additions and 76 deletions

View file

@ -12,14 +12,9 @@
@implementation AtomApplicationDelegate
- (id)init {
self = [super init];
menu_controller_.reset([[AtomMenuController alloc] init]);
return self;
}
- (void)setApplicationDockMenu:(ui::MenuModel*)model {
[menu_controller_ populateWithModel:model];
- (void)setApplicationDockMenu:(atom::AtomMenuModel*)model {
menu_controller_.reset([[AtomMenuController alloc] initWithModel:model
useDefaultAccelerator:NO]);
}
- (void)applicationWillFinishLaunching:(NSNotification*)notify {
@ -34,7 +29,10 @@
}
- (NSMenu*)applicationDockMenu:(NSApplication*)sender {
return [menu_controller_ menu];
if (menu_controller_)
return [menu_controller_ menu];
else
return nil;
}
- (BOOL)application:(NSApplication*)sender