[seed] since GParamSpec is not exposed, we can not call param_spec_* methods any more, so Gtype object cont



commit 1dae3adaa27f1cbef976ace0584c71217e594c7a
Author: Alan Knowles <alan akbkhome com>
Date:   Fri Aug 12 13:58:56 2011 +0800

    since GParamSpec is not exposed, we can not call param_spec_* methods any more, so Gtype object contruction has to be done via properties in the ctor.

 tests/javascript/gtypes/Makefile.am                |    1 -
 .../javascript/gtypes/gtype-property-construct.js  |   22 +++++++-------
 tests/javascript/gtypes/gtype-property.js          |   30 --------------------
 3 files changed, 11 insertions(+), 42 deletions(-)
---
diff --git a/tests/javascript/gtypes/Makefile.am b/tests/javascript/gtypes/Makefile.am
index f7d9edf..2e8f4c9 100644
--- a/tests/javascript/gtypes/Makefile.am
+++ b/tests/javascript/gtypes/Makefile.am
@@ -15,7 +15,6 @@ EXTRA_DIST = \
 
 TESTS = \
 	gtype-class-init-exception.js \
-	gtype-property.js \
 	gtype-typerror.js \
 	gtype.js \
 	gtype-gtype.js \
diff --git a/tests/javascript/gtypes/gtype-property-construct.js b/tests/javascript/gtypes/gtype-property-construct.js
index daa828b..f5460f0 100755
--- a/tests/javascript/gtypes/gtype-property-construct.js
+++ b/tests/javascript/gtypes/gtype-property-construct.js
@@ -8,17 +8,17 @@ Gtk.init(Seed.argv)
 HelloWindow = new GType({
     parent: Gtk.Window.type,
     name: "HelloWindow",
-    class_init: function(klass, prototype)
-    {
-        klass.c_install_property(GObject.param_spec_boolean(
-                                 "test",
-                                 "test property",
-                                 "A test property!",
-                                 false,
-                                 GObject.ParamFlags.CONSTRUCT | 
-                                     GObject.ParamFlags.READABLE | 
-                                     GObject.ParamFlags.WRITABLE))
-    },
+    properties: [
+        {
+            name: "test",
+            type: GObject.TYPE_BOOLEAN,
+            nick: "test property",
+            blurb: "A test property!",
+            default_value: false,
+            flags: (GObject.ParamFlags.CONSTRUCT | GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE)
+        }
+    ],
+   
     init: function()
     {
         testsuite.assert(this.test == true)



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