[empathy] CallWindow: use tp_g_signal_connect_object



commit f2f49d58f04cd06ac73015ca763aa1b17c74b89a
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Thu Jul 28 10:17:10 2011 +0100

    CallWindow: use tp_g_signal_connect_object
    
    So the signals are disconnected when the window is destroyed.

 src/empathy-call-window.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 3bd6d74..1c2f699 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1291,13 +1291,12 @@ empathy_call_window_setup_avatars (EmpathyCallWindow *self,
 {
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
 
-  g_signal_connect (priv->contact, "notify::name",
-      G_CALLBACK (contact_name_changed_cb), self);
-  g_signal_connect (priv->contact, "notify::avatar",
-    G_CALLBACK (contact_avatar_changed_cb), self);
-  /* FIXME: There's no EmpathyContact::presence yet */
-  g_signal_connect (priv->contact, "notify::presence",
-      G_CALLBACK (contact_presence_changed_cb), self);
+  tp_g_signal_connect_object (priv->contact, "notify::name",
+      G_CALLBACK (contact_name_changed_cb), self, 0);
+  tp_g_signal_connect_object (priv->contact, "notify::avatar",
+    G_CALLBACK (contact_avatar_changed_cb), self, 0);
+  tp_g_signal_connect_object (priv->contact, "notify::presence",
+      G_CALLBACK (contact_presence_changed_cb), self, 0);
 
   set_window_title (self);
   set_remote_user_name (self, priv->contact);



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