[dconf-editor] Fix Apply button sensitivity.



commit bb441426dc5299bb5d3c9623bc625d39564d4f78
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Jan 31 23:59:09 2018 +0100

    Fix Apply button sensitivity.

 editor/modifications-revealer.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/editor/modifications-revealer.vala b/editor/modifications-revealer.vala
index aa8b2b8..870b0a4 100644
--- a/editor/modifications-revealer.vala
+++ b/editor/modifications-revealer.vala
@@ -250,13 +250,22 @@ class ModificationsRevealer : Revealer
         if (modifications_handler.mode == ModificationsMode.TEMPORARY)
         {
             if (total_changes_count == 0)
+            {
+                apply_button.sensitive = false;
                 label.set_text (_("The value is invalid."));
+            }
             else if (total_changes_count != 1)
                 assert_not_reached ();
             else if (modifications_handler.behaviour == Behaviour.ALWAYS_CONFIRM_EXPLICIT)
+            {
+                apply_button.sensitive = true;
                 label.set_text (_("The change will be dismissed if you quit this view without applying."));
+            }
             else if (modifications_handler.behaviour == Behaviour.ALWAYS_CONFIRM_IMPLICIT || 
modifications_handler.behaviour == Behaviour.SAFE)
+            {
+                apply_button.sensitive = true;
                 label.set_text (_("The change will be applied on such request or if you quit this view."));
+            }
             else
                 assert_not_reached ();
             set_reveal_child (true);


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