[dconf-editor] Call get_min() and get_max() with key.type_string.



commit 86595c8a97e69dd0c35d66778e5160e49e7ccf67
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Oct 2 00:50:20 2015 +0200

    Call get_min() and get_max() with key.type_string.

 editor/dconf-view.vala |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index 3ac484f..2b3c0cd 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -94,9 +94,8 @@ private abstract class KeyEditorDialog : Dialog
         }
         else
         {
-            string variant_type = key.type_string;
-            min = Key.get_min (variant_type).print (false);
-            max = Key.get_max (variant_type).print (false);
+            min = Key.get_min (key.type_string).print (false);
+            max = Key.get_max (key.type_string).print (false);
         }
     }
 }
@@ -121,7 +120,7 @@ private class KeyEditorNoSchema : KeyEditorDialog       // TODO add type informa
     protected override void response_apply_cb ()
     {
         Variant variant = ((KeyEditorChild) custom_value_grid.get_child_at (0, 0)).get_variant ();
-        if (key.is_default || key.value != variant)
+        if (key.value != variant)
             key.value = variant;
     }
 }
@@ -300,8 +299,8 @@ private class KeyEditorChildNumber : Grid, KeyEditorChild
         }
         else
         {
-            min = get_variant_as_double (Key.get_min (key.value.get_type_string ()));
-            max = get_variant_as_double (Key.get_max (key.value.get_type_string ()));
+            min = get_variant_as_double (Key.get_min (key.type_string));
+            max = get_variant_as_double (Key.get_max (key.type_string));
         }
 
         if (key.type_string == "d")


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