diff options
author | Debarshi Ray <debarshir@src.gnome.org> | 2012-11-09 06:28:48 +0800 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2012-11-09 19:01:11 +0800 |
commit | 4b23c92bc0f7f30e5dc1f4b34ea1eeb759953f63 (patch) | |
tree | ac0f3d4f5bc3a2169b2d0047072cfca56888a919 /src | |
parent | 118515887ac5f1017cddd1ce41cf2c964b3665f0 (diff) | |
download | gsoc2013-empathy-4b23c92bc0f7f30e5dc1f4b34ea1eeb759953f63.tar.gz gsoc2013-empathy-4b23c92bc0f7f30e5dc1f4b34ea1eeb759953f63.tar.zst gsoc2013-empathy-4b23c92bc0f7f30e5dc1f4b34ea1eeb759953f63.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.c | 8 |
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); |