[dconf-editor] Fix casting uint DConfKey to GSettingsKey
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Fix casting uint DConfKey to GSettingsKey
- Date: Mon, 27 Nov 2017 10:06:53 +0000 (UTC)
commit 783332525ed808336cc7155fb329d1dec35e88d0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Nov 27 11:05:43 2017 +0100
Fix casting uint DConfKey to GSettingsKey
Same as previous patch, but for uint types. The problems were
introduced in commit 11d90c988d97dc913e7f770fc05a18c6e5812d86.
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 abec372..1616bc6 100644
--- a/editor/registry-info.vala
+++ b/editor/registry-info.vala
@@ -237,14 +237,13 @@ class RegistryInfo : Grid
case "q":
case "u":
// TODO "t" 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_uint64 (range.get_child_value (0)) == Key.get_variant_as_uint64
(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_uint64 (range.get_child_value (0)) == Key.get_variant_as_uint64
(range.get_child_value (1)))
+ return (KeyEditorChild) new KeyEditorChildSingle (key.value, key.value.print
(false));
+ }
+ return (KeyEditorChild) new KeyEditorChildNumberInt (key);
case "d":
return (KeyEditorChild) new KeyEditorChildNumberDouble (key.value);
case "mb":
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]