[gxml] Ported SerializableBool to not require property's name
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Ported SerializableBool to not require property's name
- Date: Thu, 22 Oct 2015 00:43:42 +0000 (UTC)
commit 82664e15fc4ada3d35476aecb62ddaf2fae1a503
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Oct 21 18:58:01 2015 -0500
Ported SerializableBool to not require property's name
gxml/SerializableBool.vala | 1 -
test/SerializablePropertyBoolTest.vala | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gxml/SerializableBool.vala b/gxml/SerializableBool.vala
index 364cbc5..9458376 100644
--- a/gxml/SerializableBool.vala
+++ b/gxml/SerializableBool.vala
@@ -29,7 +29,6 @@ public class GXml.SerializableBool : SerializableObjectModel, SerializableProper
{
private string _val = null;
private string _name = null;
- public SerializableBool (string name) { _name = name; }
public bool get_value () { return bool.parse (_val); }
public void set_value (bool val) { _val = val.to_string (); }
public string get_serializable_property_value () { return _val; }
diff --git a/test/SerializablePropertyBoolTest.vala b/test/SerializablePropertyBoolTest.vala
index c1ae5ee..6c6bc37 100644
--- a/test/SerializablePropertyBoolTest.vala
+++ b/test/SerializablePropertyBoolTest.vala
@@ -27,7 +27,7 @@ using GXml;
class SerializablePropertyBoolTest : GXmlTest {
public class BoolNode : SerializableObjectModel
{
- public SerializableBool boolean { get; set; default = new SerializableBool ("boolean"); }
+ public SerializableBool boolean { get; set; }
public int integer { get; set; default = 0; }
public string name { get; set; }
public override string node_name () { return "BooleanNode"; }
@@ -68,6 +68,7 @@ class SerializablePropertyBoolTest : GXmlTest {
var i = element.get_attribute_node ("integer");
assert (i.value == "0");
// Change values
+ bn.boolean = new SerializableBool ();
// set to TRUE
bn.boolean.set_value (true);
var doc2 = new xDocument ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]