mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Don't emit 'open-file' event for files passed in command line.
Fixes #16.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user