Don't emit 'open-file' event for files passed in command line.

Fixes #16.
This commit is contained in:
Cheng Zhao 2013-05-31 10:17:40 +08:00
parent bb69d99423
commit e8715f4c14

View file

@ -23,6 +23,11 @@ void AtomBrowserMainParts::PreMainMessageLoopStart() {
auto mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:base::mac::FrameworkBundle()];
[mainNib instantiateWithOwner:application topLevelObjects:nil];
[mainNib release];
// Prevent Cocoa from turning command-line arguments into
// |-application:openFiles:|, since we already handle them directly.
[[NSUserDefaults standardUserDefaults]
setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
}
void AtomBrowserMainParts::PostDestroyThreads() {