aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-03-22 21:18:37 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-03-23 23:12:06 +0800
commita108a3deab6cf83a39b8f859b25ea7ea86ad90c7 (patch)
treeecc56f1cca49be078e4f85f8d1eafcf8b8863e45
parent078609cfc4e6edf27f2bdbd3b27fb9557a9f2a90 (diff)
downloadgsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar.gz
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar.bz2
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar.lz
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar.xz
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.tar.zst
gsoc2013-empathy-a108a3deab6cf83a39b8f859b25ea7ea86ad90c7.zip
Follow the sending state of the channel to determine whether we should send video
-rw-r--r--src/empathy-call-window.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index e5008f126..22db18704 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2335,12 +2335,6 @@ empathy_call_window_state_changed_cb (EmpathyCallHandler *handler,
if (priv->video_input == NULL)
empathy_call_window_set_send_video (self, CAMERA_STATE_OFF);
- priv->sending_video = can_send_video &&
- empathy_call_handler_has_initial_video (priv->handler);
-
- gtk_toggle_tool_button_set_active (
- GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on),
- priv->sending_video && priv->video_input != NULL);
gtk_widget_set_sensitive (priv->tool_button_camera_on, can_send_video);
gtk_action_set_sensitive (priv->action_camera_on, can_send_video);
@@ -2553,6 +2547,9 @@ static void
start_call (EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
+ TpyCallChannel *call;
+
+ g_object_get (priv->handler, "call-channel", &call, NULL);
priv->call_started = TRUE;
empathy_call_handler_start_call (priv->handler,
@@ -2560,10 +2557,19 @@ start_call (EmpathyCallWindow *self)
if (empathy_call_handler_has_initial_video (priv->handler))
{
- /* Enable 'send video' buttons and display the preview */
- gtk_toggle_tool_button_set_active (
+ TpySendingState s = tpy_call_channel_get_video_state (call);
+
+ if (s == TPY_SENDING_STATE_PENDING_SEND ||
+ s == TPY_SENDING_STATE_SENDING)
+ /* Enable 'send video' buttons and display the preview */
+ gtk_toggle_tool_button_set_active (
GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on), TRUE);
+ else
+ gtk_toggle_tool_button_set_active (
+ GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_off), TRUE);
}
+
+ g_object_unref (call);
}
static gboolean