XObject.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 09:08:29 +0000 (17:08 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 09:08:29 +0000 (17:08 +0800)
XObject.js

index 8be2323..df81941 100644 (file)
@@ -196,6 +196,9 @@ XObject.prototype = {
             if (i == 'buttons') { // problem with Gtk.MessageDialog..
                 continue;
             }
+            if (i[0] == '.') { // parent? - 
+                continue;
+            }
             this.el[i] = this.config[i];
         }
         
@@ -217,13 +220,10 @@ XObject.prototype = {
         // delete this.listeners ?
         // do again so child props work!
         for (var i in this.config) {
-            if (i == 'type') { // problem with Gtk.Window... - not decided on a better way to handle this.
+            if (i[0] != '.') { // problem with Gtk.Window... - not decided on a better way to handle this.
                 continue;
             }
-            if (i == 'buttons') { // problem with Gtk.MessageDialog..
-                continue;
-            }
-            this.el[i] = this.config[i];
+            this.parent.el.child_set_property(this.el, i.substring(1), this.config[i]);
         }
         // do we need to call 'init here?'
     },