[gnome-books] selections: Remove the "inconsistent" state when not needed



commit 3507a07bf58850f57fd9cb7b5373ce5d3f5c9e1c
Author: IBBoard <dev ibboard co uk>
Date:   Wed Mar 13 20:36:56 2019 +0000

    selections: Remove the "inconsistent" state when not needed
    
    Remove the "inconsistent" state when the user toggles a collection.
    
    According to the docs for GtkToggleButton:
    
    "Normally you would turn off the inconsistent state again if the
    user toggles the toggle button. This has to be done manually,
    gtk_toggle_button_set_inconsistent() only affects visual appearance,
    it doesn’t affect the semantics of the button."
    
    Closes: #3

 src/selections.js | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/selections.js b/src/selections.js
index bb75c2a3..396d5c6b 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -347,6 +347,7 @@ const CollectionRow = new Lang.Class({
             function(checkButton) {
                 let collId = this.collection.id;
                 let state = checkButton.get_active();
+                checkButton.set_inconsistent(false);
 
                 let job = new SetCollectionForSelectionJob(collId, state);
                 job.run();


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