aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-25 21:45:45 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-28 00:33:45 +0800
commit68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f (patch)
tree173f517c2e2c91b092789ae8eb71c9f2bbd61caa /src/empathy-call-window.c
parent9e048d003178ce72ca6599cb8d847dd64427a2da (diff)
downloadgsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar.gz
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar.bz2
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar.lz
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar.xz
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.tar.zst
gsoc2013-empathy-68cdcde0b0a029379d3a0b9e0e62bfda7e0bcf7f.zip
Disable video preview when there is no call
This is a workaround until bug 602937 is fixed.
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 8d2e79a2b..bc42f3323 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -130,6 +130,7 @@ struct _EmpathyCallWindowPriv
GtkAction *redial;
GtkAction *menu_fullscreen;
GtkAction *action_camera;
+ GtkAction *action_camera_preview;
GtkWidget *tool_button_camera_off;
GtkWidget *tool_button_camera_preview;
GtkWidget *tool_button_camera_on;
@@ -944,6 +945,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
"camera_preview", &priv->tool_button_camera_preview,
"camera_on", &priv->tool_button_camera_on,
"action_camera_off", &priv->action_camera,
+ "action_camera_preview", &priv->action_camera_preview,
NULL);
g_free (filename);
@@ -1543,6 +1545,13 @@ empathy_call_window_disconnected (EmpathyCallWindow *self)
gtk_toggle_tool_button_set_active (
GTK_TOGGLE_TOOL_BUTTON (priv->mic_button), TRUE);
+ /* FIXME: This is to workaround the fact that the pipeline has been
+ * destroyed and so we can't display preview until a new call (and so a
+ * new pipeline) is created. We should fix this properly by refactoring
+ * the code managing the pipeline. This is bug #602937 */
+ gtk_widget_set_sensitive (priv->tool_button_camera_preview, FALSE);
+ gtk_action_set_sensitive (priv->action_camera_preview, FALSE);
+
gtk_progress_bar_set_fraction (
GTK_PROGRESS_BAR (priv->volume_progress_bar), 0);
@@ -1915,6 +1924,11 @@ empathy_call_window_connected (gpointer user_data)
gtk_widget_set_sensitive (priv->mic_button, TRUE);
+ /* FIXME: this should won't be needed once bug #602937 is fixed
+ * (see empathy_call_window_disconnected for details) */
+ gtk_widget_set_sensitive (priv->tool_button_camera_preview, TRUE);
+ gtk_action_set_sensitive (priv->action_camera_preview, TRUE);
+
empathy_call_window_update_avatars_visibility (call, self);
g_object_unref (call);