[empathy: 7/8] The video preview is no longer hidden when we get connected to a audio
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 7/8] The video preview is no longer hidden when we get connected to a audio
- Date: Mon, 15 Jun 2009 05:48:22 -0400 (EDT)
commit e5989d0face9edde213e0530ba6c886d61a1276f
Author: Jonathan Tellier <jonathan tellier gmail com>
Date: Fri Jun 12 14:27:12 2009 -0400
The video preview is no longer hidden when we get connected to a audio
only call.
src/empathy-call-window.c | 34 ++++++++++++++--------------------
1 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 749f9eb..9946dd3 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]