[empathy] destroy the video_output widget when the call is disconnected
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] destroy the video_output widget when the call is disconnected
- Date: Thu, 1 Apr 2010 08:16:06 +0000 (UTC)
commit e274163d0c1adafbf989096a3637d57867e19e23
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Dec 2 16:58:30 2009 +0000
destroy the video_output widget when the call is disconnected
There is no point to destroy it when redialing to recreate it immediately
after.
src/empathy-call-window.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 95ac164..4a63017 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -116,6 +116,8 @@ struct _EmpathyCallWindowPriv
GtkUIManager *ui_manager;
GtkWidget *errors_vbox;
+ /* widget displays the video received from the remote user. This widget is
+ * alive only during call. */
GtkWidget *video_output;
GtkWidget *video_preview;
GtkWidget *remote_user_avatar_widget;
@@ -596,6 +598,7 @@ initialize_output_elements (GstBus *bus, EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
+ g_assert (priv->video_output == NULL);
priv->video_output = empathy_video_widget_new (bus);
gtk_box_pack_start (GTK_BOX (priv->remote_user_output_hbox),
@@ -1571,7 +1574,10 @@ empathy_call_window_disconnected (EmpathyCallWindow *self)
gtk_progress_bar_set_fraction (
GTK_PROGRESS_BAR (priv->volume_progress_bar), 0);
- gtk_widget_hide (priv->video_output);
+ /* destroy the video output; it will be recreated when we'll redial */
+ gtk_widget_destroy (priv->video_output);
+ priv->video_output = NULL;
+
gtk_widget_show (priv->remote_user_avatar_widget);
priv->sending_video = FALSE;
@@ -2696,8 +2702,6 @@ empathy_call_window_restart_call (EmpathyCallWindow *window)
{
EmpathyCallWindowPriv *priv = GET_PRIV (window);
- gtk_widget_destroy (priv->video_output);
-
create_pipeline (window);
g_signal_connect (G_OBJECT (priv->audio_input_adj), "value-changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]