aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-19 20:01:59 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-19 20:52:59 +0800
commit376c8299f4c69345fd783b20a8f2f4d8827551bb (patch)
tree5ae891f3079501545c85da72887480d111d08ef8
parent09b8172fb599c1a5dd1971eb4501304915034112 (diff)
downloadgsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar.gz
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar.bz2
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar.lz
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar.xz
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.tar.zst
gsoc2013-empathy-376c8299f4c69345fd783b20a8f2f4d8827551bb.zip
CameraMenu: don't change the device if it's the current one
https://bugzilla.gnome.org/show_bug.cgi?id=656885
-rw-r--r--src/empathy-camera-menu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/empathy-camera-menu.c b/src/empathy-camera-menu.c
index a57253872..cee11d759 100644
--- a/src/empathy-camera-menu.c
+++ b/src/empathy-camera-menu.c
@@ -132,6 +132,7 @@ empathy_camera_menu_activate_cb (GtkAction *action,
{
EmpathyGstVideoSrc *video;
const gchar *device;
+ gchar *current_device;
if (self->priv->in_update)
return;
@@ -139,10 +140,18 @@ empathy_camera_menu_activate_cb (GtkAction *action,
video = empathy_call_window_get_video_src (self->priv->window);
device = gtk_action_get_name (action);
+ current_device = empathy_video_src_dup_device (video);
+
+ /* Don't change the device if it's the currently used one */
+ if (!tp_strdiff (device, current_device))
+ goto out;
empathy_call_window_play_camera (self->priv->window, FALSE);
empathy_video_src_change_device (video, device);
empathy_call_window_play_camera (self->priv->window, TRUE);
+
+ out:
+ g_free (current_device);
}
static void