diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-31 21:07:45 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-01 16:15:40 +0800 |
commit | cd6761777585a8defa934562abd4a35bc7e816e9 (patch) | |
tree | 3d98ac31ee1be12cee5cf4f2f9687df81026b738 /src | |
parent | c34f2be5d70d9a45b953b4f9b0f09b9b1ee4a231 (diff) | |
download | gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar.gz gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar.bz2 gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar.lz gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar.xz gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.tar.zst gsoc2013-empathy-cd6761777585a8defa934562abd4a35bc7e816e9.zip |
don't recreate a video preview or update the window if we're about to destroy it
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-call-window.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 6a5038d24..60210cae4 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -1603,7 +1603,8 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self) } static gboolean -empathy_call_window_disconnected (EmpathyCallWindow *self) +empathy_call_window_disconnected (EmpathyCallWindow *self, + gboolean restart) { gboolean could_disconnect = FALSE; EmpathyCallWindowPriv *priv = GET_PRIV (self); @@ -1629,6 +1630,11 @@ empathy_call_window_disconnected (EmpathyCallWindow *self) g_mutex_unlock (priv->lock); + if (!restart) + /* We are about to destroy the window, no need to update it or create + * a video preview */ + return TRUE; + empathy_call_window_status_message (self, _("Disconnected")); gtk_action_set_sensitive (priv->redial, TRUE); @@ -1683,7 +1689,8 @@ empathy_call_window_channel_closed_cb (EmpathyCallHandler *handler, EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data); EmpathyCallWindowPriv *priv = GET_PRIV (self); - if (empathy_call_window_disconnected (self) && priv->call_state == REDIALING) + if (empathy_call_window_disconnected (self, TRUE) && + priv->call_state == REDIALING) empathy_call_window_restart_call (self); } @@ -2438,7 +2445,7 @@ empathy_call_window_bus_message (GstBus *bus, GstMessage *message, } else { - empathy_call_window_disconnected (self); + empathy_call_window_disconnected (self, TRUE); } g_error_free (error); g_free (debug); @@ -2772,7 +2779,7 @@ empathy_call_window_hangup_cb (gpointer object, empathy_call_handler_stop_call (priv->handler); - if (empathy_call_window_disconnected (window)) + if (empathy_call_window_disconnected (window, FALSE)) gtk_widget_destroy (GTK_WIDGET (window)); } |