cheese r542 - in trunk: . src



Author: dgsiegel
Date: Sun Mar  2 00:01:59 2008
New Revision: 542
URL: http://svn.gnome.org/viewvc/cheese?rev=542&view=rev

Log:
menu entries for take a photo and recording never switched, fixes bug #516745


Modified:
   trunk/ChangeLog
   trunk/src/cheese-window.c

Modified: trunk/src/cheese-window.c
==============================================================================
--- trunk/src/cheese-window.c	(original)
+++ trunk/src/cheese-window.c	Sun Mar  2 00:01:59 2008
@@ -659,6 +659,14 @@
     gtk_notebook_set_current_page (GTK_NOTEBOOK(cheese_window->notebook), 0);
     gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_effects), _("_Effects"));
     gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
+    if (cheese_window->webcam_mode == WEBCAM_MODE_PHOTO)
+    {
+      gtk_action_group_set_sensitive (cheese_window->actions_photo, TRUE);
+    }
+    else
+    {
+      gtk_action_group_set_sensitive (cheese_window->actions_video, TRUE);
+    }
     cheese_webcam_set_effect (cheese_window->webcam, 
                               cheese_effect_chooser_get_selection (CHEESE_EFFECT_CHOOSER (cheese_window->effect_chooser)));
     g_object_set (cheese_window->gconf,
@@ -671,6 +679,8 @@
     gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook), 1);
     gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_effects), _("_Back"));
     gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture), FALSE);
+    gtk_action_group_set_sensitive (cheese_window->actions_photo, FALSE);
+    gtk_action_group_set_sensitive (cheese_window->actions_video, FALSE);
   }
 }
 
@@ -742,6 +752,8 @@
     g_free (str);
     gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
     gtk_action_activate (video);
+    gtk_action_group_set_sensitive (cheese_window->actions_photo, FALSE);
+    gtk_action_group_set_sensitive (cheese_window->actions_video, TRUE);
   }
   else
   {
@@ -752,6 +764,8 @@
     g_free (str);
     gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
     gtk_action_activate (photo);
+    gtk_action_group_set_sensitive (cheese_window->actions_photo, TRUE);
+    gtk_action_group_set_sensitive (cheese_window->actions_video, FALSE);
   }
   g_list_free (actions);
   g_list_free (tmp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]