eog r4490 - in trunk: . src



Author: csaavedra
Date: Fri Mar 21 14:38:29 2008
New Revision: 4490
URL: http://svn.gnome.org/viewvc/eog?rev=4490&view=rev

Log:
2008-03-21  Claudio Saavedra  <csaavedra gnome org>

	* src/main.c: (main): Add a --new-instance command line parameter.
	Fixes bug #523173.



Modified:
   trunk/ChangeLog
   trunk/src/main.c

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Fri Mar 21 14:38:29 2008
@@ -57,6 +57,9 @@
 static gboolean fullscreen = FALSE;
 static gboolean slide_show = FALSE;
 static gboolean disable_collection = FALSE;
+#if HAVE_DBUS
+static gboolean wait = FALSE;
+#endif
 static gchar **startup_files = NULL;
 
 static const GOptionEntry goption_options[] =
@@ -64,6 +67,9 @@
 	{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &fullscreen, N_("Open in fullscreen mode"), NULL  },
 	{ "disable-image-collection", 'c', 0, G_OPTION_ARG_NONE, &disable_collection, N_("Disable image collection"), NULL  },
 	{ "slide-show", 's', 0, G_OPTION_ARG_NONE, &slide_show, N_("Open in slide show mode"), NULL  },
+#if HAVE_DBUS
+	{ "new-instance", 'n', 0, G_OPTION_ARG_NONE, &wait, N_("Start a new instance instead of reusing an already started one"), NULL },
+#endif
 	{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &startup_files, NULL, N_("[FILE...]") },
 	{ NULL }
 };
@@ -190,7 +196,7 @@
 	set_startup_flags ();
 	
 #ifdef HAVE_DBUS
-	if (!eog_application_register_service (EOG_APP)) {
+	if (!wait && !eog_application_register_service (EOG_APP)) {
 		if (load_files_remote ()) {
 			g_object_unref (program);
 			return 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]