[shotwell] Use change_state instead of set_state



commit aef3f23f92c4df33f932ee5d1af3a4e9a33d266d
Author: Jens Georg <mail jensge org>
Date:   Wed Nov 16 21:52:57 2016 +0100

    Use change_state instead of set_state
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/library/LibraryWindow.vala |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala
index 7ba1dba..ca10321 100644
--- a/src/library/LibraryWindow.vala
+++ b/src/library/LibraryWindow.vala
@@ -325,11 +325,10 @@ public class LibraryWindow : AppWindow {
             return;
 
         // always show the searchbar when items are filtered
-        var action = this.lookup_action ("CommonDisplaySearchbar") as
-            GLib.SimpleAction;
+        var action = this.lookup_action ("CommonDisplaySearchbar");
 
         if (action != null)
-            action.set_state (true);
+            action.change_state (true);
     }
 
     // show_all() may make visible certain items we wish to keep programmatically hidden
@@ -607,9 +606,8 @@ public class LibraryWindow : AppWindow {
     }
     
     private void on_find() {
-        var action = this.lookup_action ("CommonDisplaySearchbar") as
-            GLib.SimpleAction;
-        action.set_state (true);
+        var action = this.lookup_action ("CommonDisplaySearchbar");
+        action.change_state (true);
 
         // give it focus (which should move cursor to the text entry control)
         search_toolbar.take_focus();
@@ -744,9 +742,8 @@ public class LibraryWindow : AppWindow {
     }
 
     private void sync_extended_properties(bool show) {
-        var action = this.lookup_action ("CommonDisplayExtendedProperties")
-            as GLib.SimpleAction;
-        action.set_state (show);
+        var action = this.lookup_action ("CommonDisplayExtendedProperties");
+        action.change_state (show);
 
         // sync the setting so it will persist
         Config.Facade.get_instance().set_display_extended_properties(show);


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