[epiphany] ephy-application: set G_APPLICATION_NON_UNIQUE inside the object



commit c652dbec96495d77fb85860ce1a01008b48c56a1
Author: Xan Lopez <xlopez igalia com>
Date:   Wed Jun 29 00:39:55 2011 +0200

    ephy-application: set G_APPLICATION_NON_UNIQUE inside the object
    
    Based on the private-instance paramater.

 src/ephy-application.c |    7 ++++++-
 src/ephy-main.c        |    8 --------
 2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/ephy-application.c b/src/ephy-application.c
index c6c3a54..a3235f8 100644
--- a/src/ephy-application.c
+++ b/src/ephy-application.c
@@ -402,9 +402,14 @@ ephy_application_finalize (GObject *object)
 EphyApplication *
 ephy_application_new (gboolean private_instance)
 {
+  GApplicationFlags flags = G_APPLICATION_FLAGS_NONE;
+
+  if (private_instance)
+    flags |= G_APPLICATION_NON_UNIQUE;
+
   return g_object_new (EPHY_TYPE_APPLICATION,
                        "application-id", "org.gnome.Epiphany",
-                       "flags", G_APPLICATION_FLAGS_NONE,
+                       "flags", flags,
                        "private-instance", private_instance,
                        NULL);
 }
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 2194e28..3233894 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -421,14 +421,6 @@ main (int argc,
   _ephy_shell_create_instance (application);
   g_object_unref (application);
 
-  if (private_instance) {
-    GApplicationFlags flags;
-
-    flags = g_application_get_flags (G_APPLICATION (application));
-    flags |= G_APPLICATION_NON_UNIQUE;
-
-    g_application_set_flags (G_APPLICATION (application), flags);
-  }
   startup_flags = get_startup_flags ();
   ctx = ephy_application_startup_context_new (startup_flags,
                                               bookmarks_file,



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