aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@src.gnome.org>2012-11-09 06:28:48 +0800
committerDebarshi Ray <debarshir@gnome.org>2012-11-09 19:00:12 +0800
commitfdb8845d0b1bb476cc82bc1efc2214015e3a3730 (patch)
tree7e494af7998a81d4299360285bcc44554ed6faac /src
parent34b5179278427a9654d1743d91091a5a2d6400aa (diff)
downloadgsoc2013-empathy-fdb8845d0b1bb476cc82bc1efc2214015e3a3730.tar.gz
gsoc2013-empathy-fdb8845d0b1bb476cc82bc1efc2214015e3a3730.tar.zst
gsoc2013-empathy-fdb8845d0b1bb476cc82bc1efc2214015e3a3730.zip
camera-menu: Show the menu only if there is more than one camera
Fixes: https://bugzilla.gnome.org/687449
Diffstat (limited to 'src')
-rw-r--r--src/empathy-camera-menu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/empathy-camera-menu.c b/src/empathy-camera-menu.c
index a0e0ca6fa..5f1bd07ba 100644
--- a/src/empathy-camera-menu.c
+++ b/src/empathy-camera-menu.c
@@ -157,12 +157,20 @@ static void
empathy_camera_menu_update (EmpathyCameraMenu *self)
{
GList *l;
+ GtkAction *menu;
GtkUIManager *ui_manager;
EmpathyGstVideoSrc *video;
+ gboolean show_menu;
gchar *current_camera = NULL;
+ guint n_cameras;
ui_manager = empathy_call_window_get_ui_manager (self->priv->window);
+ menu = gtk_ui_manager_get_action (ui_manager, "/menubar1/edit/menucamera");
+ n_cameras = g_queue_get_length (self->priv->cameras);
+ show_menu = (n_cameras > 1);
+ gtk_action_set_visible (menu, show_menu);
+
video = empathy_call_window_get_video_src (self->priv->window);
if (video != NULL)
current_camera = empathy_video_src_dup_device (video);