[gedit/wip/3.14-osx: 10/34] [osx] Prevent Cocoa command line argument parsing for files
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/3.14-osx: 10/34] [osx] Prevent Cocoa command line argument parsing for files
- Date: Sat, 23 Aug 2014 11:55:22 +0000 (UTC)
commit b8cc77c847ca6403d68605bb4065344c005d01a0
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sun Mar 23 13:27:01 2014 +0100
[osx] Prevent Cocoa command line argument parsing for files
gedit/gedit-app-osx.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app-osx.c b/gedit/gedit-app-osx.c
index 5076b72..b00fd5b 100644
--- a/gedit/gedit-app-osx.c
+++ b/gedit/gedit-app-osx.c
@@ -418,6 +418,13 @@ gedit_app_osx_init (GeditAppOSX *app)
{
GtkOSXApplication *osxapp;
+ /* This is required so that Cocoa is not going to parse the
+ command line arguments by itself and generate OpenFile events.
+ We already parse the command line ourselves, so this is needed
+ to prevent opening files twice, etc. */
+ [[NSUserDefaults standardUserDefaults] setObject:@"NO"
+ forKey:@"NSTreatUnknownArgumentsAsOpen"];
+
/* This is a singleton */
osxapp = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]