[empathy/gnome-3-6] camera-menu: Show the menu only if there is more than one camera
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-6] camera-menu: Show the menu only if there is more than one camera
- Date: Fri, 9 Nov 2012 11:01:30 +0000 (UTC)
commit 4b23c92bc0f7f30e5dc1f4b34ea1eeb759953f63
Author: Debarshi Ray <debarshir src gnome org>
Date: Thu Nov 8 23:28:48 2012 +0100
camera-menu: Show the menu only if there is more than one camera
Fixes: https://bugzilla.gnome.org/687449
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 a0e0ca6..5f1bd07 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]