[empathy/gnome-2-30] use tp_g_signal_connect_object to connect the "closed" signal on the notification



commit 42c9f89cdb5f456873c200403de8f5f53002f10a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Jun 16 16:51:52 2010 +0200

    use tp_g_signal_connect_object to connect the "closed" signal on the notification
    
    This fix a crash if the chat window is destroyed while the notification is
    still displayed (#621789).

 src/empathy-chat-window.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 519a3fc..3129623 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1233,8 +1233,8 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
 		priv->notification = notify_notification_new (header, escaped, NULL, NULL);
 		notify_notification_set_timeout (priv->notification, NOTIFY_EXPIRES_DEFAULT);
 
-		g_signal_connect (priv->notification, "closed",
-				  G_CALLBACK (chat_window_notification_closed_cb), window);
+		empathy_signal_connect_weak (priv->notification, "closed",
+				  G_CALLBACK (chat_window_notification_closed_cb), G_OBJECT (window));
 	}
 
 	pixbuf = empathy_notify_manager_get_pixbuf_for_notification (priv->notify_mgr,



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