From a3086b1cb486653391d90e34539fe9277b4d2d08 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Thu, 8 Sep 2011 15:17:24 +0100 Subject: CallWindow: unconditionally connect to notify::call-channel Since we can get a new call channel if we e.g. hangup and then call again. https://bugzilla.gnome.org/show_bug.cgi?id=655356 --- src/empathy-call-window.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/empathy-call-window.c') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index ad3653b6d..ca1741d22 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -3468,19 +3468,20 @@ empathy_call_window_connect_handler (EmpathyCallWindow *self) g_signal_connect (priv->handler, "sink-pad-removed", G_CALLBACK (empathy_call_window_sink_removed_cb), self); + /* We connect to ::call-channel unconditionally since we'll + * get new channels if we hangup and redial or if we reuse the + * call window. */ + g_signal_connect (priv->handler, "notify::call-channel", + G_CALLBACK (call_handler_notify_call_cb), window); + g_object_get (priv->handler, "call-channel", &call, NULL); if (call != NULL) { + /* We won't get notify::call-channel for this channel, so + * directly call the callback. */ call_handler_notify_call_cb (priv->handler, NULL, self); g_object_unref (call); } - else - { - /* call-channel doesn't exist yet, we'll connect signals once it has been - * set */ - g_signal_connect (priv->handler, "notify::call-channel", - G_CALLBACK (call_handler_notify_call_cb), self); - } } static void -- cgit v1.2.3