gimp r26118 - in trunk: app po



Author: neo
Date: Fri Jul 11 09:16:23 2008
New Revision: 26118
URL: http://svn.gnome.org/viewvc/gimp?rev=26118&view=rev

Log:
moved some common code back to main.c


Modified:
   trunk/app/main.c
   trunk/app/unique.c
   trunk/app/unique.h
   trunk/po/POTFILES.in

Modified: trunk/app/main.c
==============================================================================
--- trunk/app/main.c	(original)
+++ trunk/app/main.c	Fri Jul 11 09:16:23 2008
@@ -41,6 +41,10 @@
 #include <io.h> /* get_osfhandle */
 #endif
 
+#ifndef GIMP_CONSOLE_COMPILATION
+#include <gdk/gdk.h>
+#endif
+
 #include "libgimpbase/gimpbase.h"
 
 #include "core/core-types.h"
@@ -370,11 +374,18 @@
   if (no_interface)
     new_instance = TRUE;
 
-  if (! new_instance)
+#ifndef GIMP_CONSOLE_COMPILATION
+  if (! new_instance && gimp_unique_open (filenames, as_new))
     {
-      if (gimp_unique_open (filenames, as_new, be_verbose))
-        return EXIT_SUCCESS;
+      if (be_verbose)
+	g_print ("%s\n",
+		 _("Another GIMP instance is already running."));
+
+      gdk_notify_startup_complete ();
+
+      return EXIT_SUCCESS;
     }
+#endif
 
   abort_message = sanity_check ();
   if (abort_message)

Modified: trunk/app/unique.c
==============================================================================
--- trunk/app/unique.c	(original)
+++ trunk/app/unique.c	Fri Jul 11 09:16:23 2008
@@ -28,40 +28,31 @@
 #include <windows.h>
 #endif
 
-#ifndef GIMP_CONSOLE_COMPILATION
-#include <gdk/gdk.h>
-#endif
-
 #include "core/core-types.h"
 
 #include "file/file-utils.h"
 
 #include "unique.h"
 
-#include "gimp-intl.h"
-
 
 #if HAVE_DBUS_GLIB
 static gboolean  gimp_unique_dbus_open  (const gchar **filenames,
-					 gboolean      as_new,
-					 gboolean      be_verbose);
+					 gboolean      as_new);
 #endif
 
 #ifdef G_OS_WIN32
 static gboolean  gimp_unique_win32_open (const gchar **filenames,
-					 gboolean      as_new,
-					 gboolean      be_verbose);
+					 gboolean      as_new);
 #endif
 
 gboolean
 gimp_unique_open (const gchar **filenames,
-		  gboolean      as_new,
-		  gboolean      be_verbose)
+		  gboolean      as_new)
 {
 #ifdef G_OS_WIN32
-  return gimp_unique_win32_open (filenames, as_new, be_verbose);
+  return gimp_unique_win32_open (filenames, as_new);
 #elif HAVE_DBUS_GLIB
-  return gimp_unique_dbus_open (filenames, as_new, be_verbose);
+  return gimp_unique_dbus_open (filenames, as_new);
 #else
   return FALSE;
 #endif
@@ -72,8 +63,7 @@
 
 static gboolean
 gimp_unique_dbus_open (const gchar **filenames,
-		       gboolean      as_new,
-		       gboolean      be_verbose)
+		       gboolean      as_new)
 {
 #ifndef GIMP_CONSOLE_COMPILATION
 
@@ -160,12 +150,6 @@
 
       if (success)
         {
-          if (be_verbose)
-            g_print ("%s\n",
-                     _("Another GIMP instance is already running."));
-
-          gdk_notify_startup_complete ();
-
           return TRUE;
         }
       else if (! (error->domain == DBUS_GERROR &&
@@ -188,8 +172,7 @@
 
 static gboolean
 gimp_unique_win32_open (const gchar **filenames,
-			gboolean      as_new,
-			gboolean      be_verbose)
+			gboolean      as_new)
 {
 #ifndef GIMP_CONSOLE_COMPILATION
 

Modified: trunk/app/unique.h
==============================================================================
--- trunk/app/unique.h	(original)
+++ trunk/app/unique.h	Fri Jul 11 09:16:23 2008
@@ -21,8 +21,7 @@
 
 
 gboolean gimp_unique_open (const gchar **filenames,
-			   gboolean      as_new,
-			   gboolean      be_verbose);
+			   gboolean      as_new);
 
 
 #endif /* __UNIQUE_H__ */

Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in	(original)
+++ trunk/po/POTFILES.in	Fri Jul 11 09:16:23 2008
@@ -8,7 +8,6 @@
 app/batch.c
 app/main.c
 app/sanity.c
-app/unique.c
 app/version.c
 
 app/actions/actions.c



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