]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-idle.c
Merge branch 'sasl'
[empathy.git] / libempathy / empathy-idle.c
index 3ee3f39a37bd3f32b8ed14ca0c0cd183695fd789..12686daa4e449472395bb4f8cee6fb611d3ac43e 100644 (file)
@@ -503,9 +503,9 @@ account_manager_ready_cb (GObject *source_object,
 
        accounts = tp_account_manager_get_valid_accounts (priv->manager);
        for (l = accounts; l != NULL; l = l->next) {
-               empathy_signal_connect_weak (l->data, "status-changed",
+               tp_g_signal_connect_object (l->data, "status-changed",
                                             G_CALLBACK (account_status_changed_cb),
-                                            G_OBJECT (idle));
+                                            idle, 0);
        }
        g_list_free (accounts);
 
@@ -518,6 +518,7 @@ empathy_idle_init (EmpathyIdle *idle)
 {
        EmpathyIdlePriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (idle,
                EMPATHY_TYPE_IDLE, EmpathyIdlePriv);
+       TpDBusDaemon *dbus;
 
        idle->priv = priv;
        priv->is_idle = FALSE;
@@ -531,7 +532,10 @@ empathy_idle_init (EmpathyIdle *idle)
                "most-available-presence-changed",
                G_CALLBACK (idle_presence_changed_cb), idle);
 
-       priv->gs_proxy = dbus_g_proxy_new_for_name (tp_get_bus (),
+       dbus = tp_dbus_daemon_dup (NULL);
+
+       priv->gs_proxy = dbus_g_proxy_new_for_name (
+                                                   tp_proxy_get_dbus_connection (dbus),
                                                    "org.gnome.SessionManager",
                                                    "/org/gnome/SessionManager/Presence",
                                                    "org.gnome.SessionManager.Presence");
@@ -545,6 +549,8 @@ empathy_idle_init (EmpathyIdle *idle)
                DEBUG ("Failed to get gs proxy");
        }
 
+       g_object_unref (dbus);
+
        priv->connectivity = empathy_connectivity_dup_singleton ();
        priv->state_change_signal_id = g_signal_connect (priv->connectivity,
            "state-change", G_CALLBACK (idle_state_change_cb), idle);