[dconf-editor] Fix casting int DConfKey to GSettingsKey



commit 3ec970014b8f8b7deb9426178f2c6fbc5f40d2f6
Author: Davi da Silva Böger <dsboger gmail com>
Date:   Sun Nov 26 23:04:28 2017 -0200

    Fix casting int DConfKey to GSettingsKey

 editor/registry-info.vala |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/editor/registry-info.vala b/editor/registry-info.vala
index da36c1a..abec372 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -226,14 +226,13 @@ class RegistryInfo : Grid
             case "i":
             case "h":
             // TODO "x" is not working in spinbuttons (double-based)
-                Variant range = ((GSettingsKey) key).range_content;
-                if (has_schema
-                    && (((GSettingsKey) key).range_type == "range")
-                    && (Key.get_variant_as_int64 (range.get_child_value (0)) == Key.get_variant_as_int64 
(range.get_child_value (1)))
-                   )
-                    return (KeyEditorChild) new KeyEditorChildSingle (key.value, key.value.print (false));
-                else
-                    return (KeyEditorChild) new KeyEditorChildNumberInt (key);
+                if (has_schema && (((GSettingsKey) key).range_type == "range"))
+                {
+                    Variant range = ((GSettingsKey) key).range_content;
+                    if (Key.get_variant_as_int64 (range.get_child_value (0)) == Key.get_variant_as_int64 
(range.get_child_value (1)))
+                        return (KeyEditorChild) new KeyEditorChildSingle (key.value, key.value.print 
(false));
+                }
+                return (KeyEditorChild) new KeyEditorChildNumberInt (key);
             case "y":
             case "q":
             case "u":


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