[empathy] empathy-idle: stop using tp_dbus_daemon_dup



commit 9d03a4333a55b07e137f3be5460e7550ec8bedb5
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Apr 1 13:48:02 2010 +0200

    empathy-idle: stop using tp_dbus_daemon_dup
    
    It has been deprecated.

 libempathy/empathy-idle.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index 3ee3f39..b672e1a 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -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);



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