[gxml] GomObject: Fixed set_attribute return value



commit 4dd45602c91f12d4fa8eb93d7e32c45c66dd64d4
Author: Daniel Espinosa <esodan gmail com>
Date:   Fri Nov 4 14:20:27 2016 -0600

    GomObject: Fixed set_attribute return value

 gxml/GomObject.vala |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gxml/GomObject.vala b/gxml/GomObject.vala
index 3889212..05d83e8 100644
--- a/gxml/GomObject.vala
+++ b/gxml/GomObject.vala
@@ -122,7 +122,7 @@ public interface GXml.GomObject : GLib.Object,
         } catch {
           GLib.warning (_("Enumeration is out of range"));
         }
-        return "";
+        return null;
       }
     }
     return null;
@@ -152,22 +152,27 @@ public interface GXml.GomObject : GLib.Object,
       if (prop.value_type.is_a (typeof (string))) {
         v.set_string (val);
         set_property (prop.name, v);
+        return true;
       }
       if (prop.value_type.is_a (typeof (int))) {
         v.set_string (val);
         set_property (prop.name, v);
+        return true;
       }
       if (prop.value_type.is_a (typeof (uint))) {
         v.set_string (val);
         set_property (prop.name, v);
+        return true;
       }
       if (prop.value_type.is_a (typeof (double))) {
         v.set_string (val);
         set_property (prop.name, v);
+        return true;
       }
       if (prop.value_type.is_a (typeof (bool))) {
         v.set_string (val);
         set_property (prop.name, v);
+        return true;
       }
       if (prop.value_type.is_a (Type.ENUM)) {
         try {
@@ -175,7 +180,9 @@ public interface GXml.GomObject : GLib.Object,
           v.set_enum (n);
         } catch {
           GLib.warning (_("Enumeration can't be parsed from string"));
+          return false;
         }
+        return true;
       }
     }
     return false;


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