From 27ecab75538a47ed89b78b4c212d870a9be60bac Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 7 Feb 2013 10:54:24 +0100 Subject: [PATCH] gdbusobjectmanagerclient: always connect to proxy's 'g-signal' If we don't connect to the control proxy's 'g-signal' signal, we won't have 'object-added' or 'object-removed' signals. So, connect to the 'g-signal' not only when there already is a name-owner, but always. https://bugzilla.gnome.org/show_bug.cgi?id=693285 --- gio/gdbusobjectmanagerclient.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c index b77558b70..5a6028171 100644 --- a/gio/gdbusobjectmanagerclient.c +++ b/gio/gdbusobjectmanagerclient.c @@ -1352,6 +1352,11 @@ initable_init (GInitable *initable, G_CALLBACK (on_notify_g_name_owner), manager); + g_signal_connect (manager->priv->control_proxy, + "g-signal", + G_CALLBACK (on_control_proxy_g_signal), + manager); + manager->priv->name_owner = g_dbus_proxy_get_name_owner (manager->priv->control_proxy); if (manager->priv->name_owner == NULL && manager->priv->name != NULL) { @@ -1362,10 +1367,6 @@ initable_init (GInitable *initable, else { /* yay, we can get the objects */ - g_signal_connect (manager->priv->control_proxy, - "g-signal", - G_CALLBACK (on_control_proxy_g_signal), - manager); subscribe_signals (manager, manager->priv->name_owner); value = g_dbus_proxy_call_sync (manager->priv->control_proxy,