Work around unwanted MacOpenFiles() calls in wxOSX applications
Don't try to open any command line arguments as files by using the workaround from Colin Barrett (see https://bugzilla.mozilla.org/show_bug.cgi?id=366009).
This commit is contained in:
committed by
Vadim Zeitlin
parent
7f10d1fa8a
commit
534899baa2
@@ -128,6 +128,7 @@ wxOSX:
|
||||
- Implement wxDataViewChoiceByIndexRenderer (wanup).
|
||||
- Fix unnecessary indentation in list-like wxDataViewCtrl (Andreas Falkenhahn).
|
||||
- Recognize macOS 10.12 Sierra in wxGetOsDescription() (Tobias Taschner).
|
||||
- Don't try to open command line arguments as files (Jeff Hostetler).
|
||||
|
||||
Unix:
|
||||
|
||||
|
@@ -421,6 +421,11 @@ bool wxApp::DoInitGui()
|
||||
}
|
||||
gNSLayoutManager = [[NSLayoutManager alloc] init];
|
||||
|
||||
// This call makes it so that appplication:openFile: doesn't get bogus calls
|
||||
// from Cocoa doing its own parsing of the argument string. And yes, we need
|
||||
// to use a string with a boolean value in it. That's just how it works.
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user