aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-05-09 00:20:25 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-05-10 21:45:53 +0800
commit81f64a90c243f460624ab1ddb2fb7954ac755d94 (patch)
treed6550da5c0341c10092d2961edbbee68bdf00ba2 /src/empathy-call-window.c
parent0cd0f8435131a23d216ee6f0f1ea866803ba625e (diff)
downloadgsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar.gz
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar.bz2
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar.lz
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar.xz
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.tar.zst
gsoc2013-empathy-81f64a90c243f460624ab1ddb2fb7954ac755d94.zip
Don't try to start change the camera when there is no input
Fixes bug #618167
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 153da4689..1f23be3b9 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -775,8 +775,10 @@ display_video_preview (EmpathyCallWindow *self,
DEBUG ("Show self avatar");
if (priv->video_preview != NULL)
- gtk_widget_hide (priv->video_preview);
- play_camera (self, FALSE);
+ {
+ gtk_widget_hide (priv->video_preview);
+ play_camera (self, FALSE);
+ }
gtk_widget_show (priv->self_user_avatar_widget);
}
}
@@ -907,6 +909,13 @@ enable_camera (EmpathyCallWindow *self)
if (priv->camera_state == CAMERA_STATE_ON)
return;
+ if (priv->video_input == NULL)
+ {
+ DEBUG ("Can't enable camera, no input");
+ return;
+ }
+
+
DEBUG ("Enable camera");
empathy_call_window_set_send_video (self, TRUE);
@@ -2356,6 +2365,8 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self)
EmpathyCallWindowPriv *priv = GET_PRIV (self);
GstElement *preview;
+ disable_camera (self);
+
DEBUG ("remove video input");
preview = empathy_video_widget_get_element (
EMPATHY_VIDEO_WIDGET (priv->video_preview));
@@ -2374,11 +2385,8 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self)
gtk_widget_destroy (priv->video_preview);
priv->video_preview = NULL;
- gtk_toggle_tool_button_set_active (
- GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on), FALSE);
gtk_widget_set_sensitive (priv->tool_button_camera_on, FALSE);
-
- gtk_widget_show (priv->self_user_avatar_widget);
+ gtk_widget_set_sensitive (priv->tool_button_camera_preview, FALSE);
}
static void