Add app.dock.setMenu API
This commit is contained in:
parent
ba4f502b1e
commit
0e94977d42
8 changed files with 52 additions and 13 deletions
|
@ -10,6 +10,16 @@
|
|||
|
||||
@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)applicationWillFinishLaunching:(NSNotification*)notify {
|
||||
atom::Browser::Get()->WillFinishLaunching();
|
||||
}
|
||||
|
@ -18,6 +28,10 @@
|
|||
atom::Browser::Get()->DidFinishLaunching();
|
||||
}
|
||||
|
||||
- (NSMenu*)applicationDockMenu:(NSApplication*)sender {
|
||||
return [menu_controller_ menu];
|
||||
}
|
||||
|
||||
- (BOOL)application:(NSApplication*)sender
|
||||
openFile:(NSString*)filename {
|
||||
std::string filename_str(base::SysNSStringToUTF8(filename));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue