[gnome-documents/gnome-3-16] application: Simplify the night-mode state changes



commit a35779bfdd9d94a9d9af626f369c31a53bb39d47
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Apr 10 18:55:13 2015 +0200

    application: Simplify the night-mode state changes
    
    The action's state will be set when the setting has been changed. Doing
    it in only one place (ie. after the setting has been updated)
    simplifies other handlers for the action.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747132

 src/application.js |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index e38444f..9919177 100644
--- a/src/application.js
+++ b/src/application.js
@@ -236,7 +236,6 @@ const Application = new Lang.Class({
 
     _onActionNightMode: function(action) {
         let state = action.get_state();
-        action.change_state(GLib.Variant.new('b', !state.get_boolean()));
         settings.set_value('night-mode', GLib.Variant.new('b', !state.get_boolean()));
     },
 


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