[dconf-editor] Correct support of unusual integer values.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Correct support of unusual integer values.
- Date: Fri, 20 May 2016 03:57:48 +0000 (UTC)
commit adff8481be2fd171a23b6c72f6e10ef07118ffe9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri May 20 05:57:38 2016 +0200
Correct support of unusual integer values.
editor/dconf-view.vala | 12 +++---------
editor/dconf-window.vala | 4 +---
2 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index ae0544e..9a38ad2 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -323,8 +323,6 @@ private class KeyEditorChildNumber : SpinButton, KeyEditorChild // TODO chec
case "q": min = (double) uint16.MIN; max = (double) uint16.MAX; break;
case "i": min = (double) int32.MIN; max = (double) int32.MAX; break;
case "u": min = (double) uint32.MIN; max = (double) uint32.MAX; break;
- case "x": min = (double) int64.MIN; max = (double) int64.MAX; break;
- case "t": min = (double) uint64.MIN; max = (double) uint64.MAX; break;
case "d": min = (double) double.MIN; max = (double) double.MAX; break;
case "h": min = (double) int32.MIN; max = (double) int32.MAX; break;
default: assert_not_reached ();
@@ -340,8 +338,6 @@ private class KeyEditorChildNumber : SpinButton, KeyEditorChild // TODO chec
case Variant.Class.UINT16: return (double) variant.get_uint16 ();
case Variant.Class.INT32: return (double) variant.get_int32 ();
case Variant.Class.UINT32: return (double) variant.get_uint32 ();
- case Variant.Class.INT64: return (double) variant.get_int64 ();
- case Variant.Class.UINT64: return (double) variant.get_uint64 ();
case Variant.Class.DOUBLE: return variant.get_double ();
case Variant.Class.HANDLE: return (double) variant.get_handle ();
default: assert_not_reached ();
@@ -355,12 +351,10 @@ private class KeyEditorChildNumber : SpinButton, KeyEditorChild // TODO chec
case "y": return new Variant.byte ((uchar) this.get_value ()); // TODO uchar or uint8?
case "n": return new Variant.int16 ((int16) this.get_value ());
case "q": return new Variant.uint16 ((uint16) this.get_value ());
- case "i": return new Variant.int32 ((int) this.get_value ());
- case "u": return new Variant.uint32 ((int) this.get_value ());
- case "x": return new Variant.int64 ((int) this.get_value ());
- case "t": return new Variant.uint64 ((int) this.get_value ());
+ case "i": return new Variant.int32 ((int32) this.get_value ());
+ case "u": return new Variant.uint32 ((uint32) this.get_value ());
case "d": return new Variant.double (this.get_value ());
- case "h": return new Variant.handle ((int) this.get_value ());
+ case "h": return new Variant.handle ((int32) this.get_value ());
default: assert_not_reached ();
}
}
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index d6ccdbf..993a70c 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -345,10 +345,8 @@ class DConfWindow : ApplicationWindow
case "q":
case "i":
case "u":
- case "x":
- case "t":
case "d":
- case "h":
+ case "h": // TODO "x" and "t" are not working in spinbuttons (double-based)
KeyEditorChildNumber key_editor_child = new KeyEditorChildNumber (key);
key_editor_child.child_activated.connect (() => { dialog.response (ResponseType.APPLY); });
return (Widget) key_editor_child;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]