aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Tellier <jonathan.tellier@gmail.com>2009-06-13 02:27:12 +0800
committerjtellier <jonathan.tellier@collabora.co.uk>2009-06-13 02:27:12 +0800
commite5989d0face9edde213e0530ba6c886d61a1276f (patch)
treef2c52520c60d651e4f6ff5cb4d9801ce86036679
parent1a2da857a423d46a4496064078c92fd3214ebf3e (diff)
downloadgsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar.gz
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar.bz2
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar.lz
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar.xz
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.tar.zst
gsoc2013-empathy-e5989d0face9edde213e0530ba6c886d61a1276f.zip
The video preview is no longer hidden when we get connected to a audio
only call.
-rw-r--r--src/empathy-call-window.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 749f9eb6a..9946dd320 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -614,13 +614,16 @@ empathy_call_window_setup_video_preview (EmpathyCallWindow *window)
GstElement *preview;
GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (priv->pipeline));
- /* Since the video preview and the video tee are initialized and freed at
- the same time, if one is initialized, then the other one should be too. */
- g_assert ((priv->video_preview != NULL && priv->video_tee != NULL)
- || (priv->video_preview == NULL && priv->video_tee == NULL));
-
if (priv->video_preview != NULL)
- return;
+ {
+ /* Since the video preview and the video tee are initialized and freed
+ at the same time, if one is initialized, then the other one should
+ be too. */
+ g_assert (priv->video_tee != NULL);
+ return;
+ }
+
+ g_assert (priv->video_tee == NULL);
priv->video_tee = gst_element_factory_make ("tee", NULL);
gst_object_ref (priv->video_tee);
@@ -909,19 +912,6 @@ empathy_call_window_setup_video_preview_visibility (EmpathyCallWindow *self,
EmpathyCallWindowPriv *priv = GET_PRIV (self);
gboolean initial_video = empathy_call_handler_has_initial_video (priv->handler);
- if (initial_video)
- {
- empathy_call_window_setup_video_preview (self);
- gtk_widget_hide (priv->self_user_avatar_widget);
-
- if (priv->video_preview != NULL)
- gtk_widget_show (priv->video_preview);
- }
- else
- {
- gtk_widget_show (priv->self_user_avatar_widget);
- }
-
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
initial_video);
}
@@ -1327,7 +1317,8 @@ empathy_call_window_connected (gpointer user_data)
priv->sending_video = empathy_tp_call_is_sending_video (call);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
- priv->sending_video);
+ priv->sending_video
+ || gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (priv->show_preview)));
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->send_video),
priv->sending_video && priv->video_input != NULL);
gtk_toggle_tool_button_set_active (
@@ -1904,6 +1895,9 @@ empathy_call_window_restart_call (EmpathyCallWindow *window)
gtk_widget_show_all (priv->content_hbox);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
+ gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (priv->show_preview)));
+
empathy_call_window_status_message (window, CONNECTING_STATUS_TEXT);
priv->call_started = TRUE;
empathy_call_handler_start_call (priv->handler);