[gxml] GomEnum ported to use nick name



commit c8cda65cb9deb5acca694e34a9e90dcb3ff9b47e
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Jan 26 10:46:11 2017 -0600

    GomEnum ported to use nick name

 gxml/GomProperty.vala          |    3 +--
 test/GomSerializationTest.vala |    8 ++------
 2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gxml/GomProperty.vala b/gxml/GomProperty.vala
index d90de67..0c347d0 100644
--- a/gxml/GomProperty.vala
+++ b/gxml/GomProperty.vala
@@ -399,8 +399,7 @@ public class GXml.GomEnum : GomBaseProperty {
   /**
    * Convenient method to initialize internal enum type.
    */
-  public void initialize_enum (string attribute_name, GLib.Type enum_type) {
-    initialize (attribute_name);
+  public void initialize_enum (GLib.Type enum_type) {
     _enum_type = enum_type;
   }
   /**
diff --git a/test/GomSerializationTest.vala b/test/GomSerializationTest.vala
index 2c104a9..1b3c2ba 100644
--- a/test/GomSerializationTest.vala
+++ b/test/GomSerializationTest.vala
@@ -311,15 +311,11 @@ class GomSerializationTest : GXmlTest  {
       DC
     }
     public class On : GomBoolean {}
-    public class Torque : GomDouble {
-      construct {
-        try { initialize ("Torque"); } catch { assert_not_reached (); }
-      }
-    }
+    public class Torque : GomDouble {}
     public class Speed : GomFloat {}
     public class TensionType : GomEnum {
       construct {
-        try { initialize_enum ("TensionType", typeof (TensionTypeEnum)); }
+        try { initialize_enum (typeof (TensionTypeEnum)); }
         catch { assert_not_reached (); }
       }
     }


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