diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-06-29 06:39:55 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-06-29 20:53:01 +0800 |
commit | c652dbec96495d77fb85860ce1a01008b48c56a1 (patch) | |
tree | a98726e92c3c579d3bbec6b793af19114b9d17f8 | |
parent | 841b59d9a2af4492c8c51a040ea164e46c5093b9 (diff) | |
download | gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar.gz gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar.bz2 gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar.lz gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar.xz gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.tar.zst gsoc2013-epiphany-c652dbec96495d77fb85860ce1a01008b48c56a1.zip |
ephy-application: set G_APPLICATION_NON_UNIQUE inside the object
Based on the private-instance paramater.
-rw-r--r-- | src/ephy-application.c | 7 | ||||
-rw-r--r-- | 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 c6c3a544a..a3235f8a6 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 2194e2869..323389467 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, |