From f9844520f2613ab7c5d886119a9a9b6f9d0d5121 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Thu, 2 Mar 2006 21:55:22 +0000 Subject: Don't try to connect to the session bus when we're starting a private 2006-03-02 Christian Persch * src/ephy-dbus.c: (_ephy_dbus_startup): Don't try to connect to the session bus when we're starting a private instance. --- ChangeLog | 7 +++++++ src/ephy-dbus.c | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index f59045853..5d5e766b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-02 Christian Persch + + * src/ephy-dbus.c: (_ephy_dbus_startup): + + Don't try to connect to the session bus when we're + starting a private instance. + 2006-03-02 Peter Harvey * src/ephy-window.c diff --git a/src/ephy-dbus.c b/src/ephy-dbus.c index cbbddd1dd..7ab1e81d4 100644 --- a/src/ephy-dbus.c +++ b/src/ephy-dbus.c @@ -57,7 +57,7 @@ struct _EphyDbusPrivate guint session_reconnect_timeout_id; guint system_reconnect_timeout_id; guint is_session_service_owner : 1; - guint claim_name : 1; + guint register_name : 1; }; enum @@ -256,7 +256,7 @@ ephy_dbus_connect_to_session_bus (EphyDbus *ephy_dbus, (dbus_g_connection_get_connection (priv->session_bus), session_filter_func, ephy_dbus, NULL); - if (priv->claim_name == FALSE) return TRUE; + if (priv->register_name == FALSE) return TRUE; dbus_g_object_type_install_info (EPHY_TYPE_DBUS, &dbus_glib_ephy_activation_object_info); @@ -398,7 +398,7 @@ ephy_dbus_set_property (GObject *object, switch (prop_id) { case PROP_CLAIM_NAME: - priv->claim_name = g_value_get_boolean (value); + priv->register_name = g_value_get_boolean (value); break; } } @@ -439,9 +439,9 @@ ephy_dbus_class_init (EphyDbusClass *klass) g_object_class_install_property (object_class, PROP_CLAIM_NAME, - g_param_spec_boolean ("claim-name", - "claim-name", - "claim-name", + g_param_spec_boolean ("register-name", + "register-name", + "register-name", TRUE, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); @@ -541,7 +541,7 @@ ephy_dbus_get_proxy (EphyDbus *dbus, /* private API */ gboolean -_ephy_dbus_startup (gboolean claim_name, +_ephy_dbus_startup (gboolean connect_and_register_name, GError **error) { g_assert (ephy_dbus_instance == NULL); @@ -549,9 +549,11 @@ _ephy_dbus_startup (gboolean claim_name, ephy_dbus_error_quark = g_quark_from_static_string ("ephy-dbus-error"); ephy_dbus_instance = g_object_new (EPHY_TYPE_DBUS, - "claim-name", claim_name, + "register-name", connect_and_register_name, NULL); + if (!connect_and_register_name) return TRUE; + /* We only connect to the session bus on startup*/ return ephy_dbus_connect_to_session_bus (ephy_dbus_instance, error); } -- cgit v1.2.3