[dconf-editor] Fix non-editable handle-type keys.



commit a870d5a89ba698472b38ab42654ff5d039118984
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Jan 2 17:00:44 2019 +0100

    Fix non-editable handle-type keys.

 editor/registry-info.vala  | 2 +-
 editor/setting-object.vala | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
index 265a02e..8ca08de 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -311,7 +311,7 @@ private class RegistryInfo : Grid, BrowsableView
             case "q":   // uint16
             case "y":   // uint8
             case "h":   // handle type
-                if (minimum_is_maximum)
+                if (minimum_is_maximum && type_code != "h")
                     key_editor_child = (KeyEditorChild) new KeyEditorChildSingle (initial_value, 
initial_value.print (false));
                 else
                 {
diff --git a/editor/setting-object.vala b/editor/setting-object.vala
index c2d7bc0..c35366d 100644
--- a/editor/setting-object.vala
+++ b/editor/setting-object.vala
@@ -271,7 +271,8 @@ private class DConfKey : Key
         if (all_properties_queried || PropertyQuery.TYPE_CODE       in query)
             variantdict.insert_value (PropertyQuery.TYPE_CODE,                  new Variant.string 
(dkey.type_string));
 
-        if (show_min_and_max (dkey.type_string) && (all_properties_queried || PropertyQuery.MINIMUM in query 
|| PropertyQuery.MAXIMUM in query))
+        if (show_min_and_max (dkey.type_string)
+         && (all_properties_queried || PropertyQuery.MINIMUM in query || PropertyQuery.MAXIMUM in query))
         {
             string min, max;
             get_min_and_max_string (out min, out max, dkey.type_string);


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