[cheese] Disable effects and mode actions while shooting



commit 0b07047af57927c5954bb8199bcaeddb2926e1e3
Author: David King <amigadave amigadave com>
Date:   Mon Jun 24 20:35:50 2013 +0100

    Disable effects and mode actions while shooting

 src/cheese-window.vala |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index e8994e9..cae0848 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -451,8 +451,10 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
      */
     private void enable_mode_change ()
     {
-        // FIXME: Set the mode action to be sensitive
-        // FIXME: Set the effects action to be sensitive.
+        var mode = this.application.lookup_action ("mode") as SimpleAction;
+        mode.set_enabled (true);
+        var effects = this.application.lookup_action ("effects") as SimpleAction;
+        effects.set_enabled (true);
     }
 
     /**
@@ -460,8 +462,10 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
      */
     private void disable_mode_change ()
     {
-        // FIXME: Set the mode action to be sensitive
-        // FIXME: Set the effects action to be insensitive.
+        var mode = this.application.lookup_action ("mode") as SimpleAction;
+        mode.set_enabled (false);
+        var effects = this.application.lookup_action ("effects") as SimpleAction;
+        effects.set_enabled (false);
     }
 
   /**


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