Revert "File.js"
[app.Builder.js] / XObjectBase / GtkClutterActor.js
index 1252b81..3698558 100644 (file)
@@ -10,7 +10,7 @@ GtkClutter = imports.gi.GtkClutter;
 // we should really add a hock to destroy it..
 
 
-GtkCellRenderText = XObject.define(
+GtkClutterActor = XObject.define(
     function(cfg) {
         XObject.call(this, cfg);
         if (!this.items.length) {
@@ -22,45 +22,40 @@ GtkCellRenderText = XObject.define(
     }, 
     XObject,
     {
-        pack : 'pack_start'
-    }
-}; 
-
-GtkClutterActor = {
     
-    pack : function(parent, item)
-    {
+        pack : function(parent, item)
+        {
+            
+            if (XObject.type(parent.xtype) == 'GtkClutterWindow') {
+                var st = parent.el.get_stage();
+                st.add_actor(this.el);
+                return;
+            }
+            XObject.fatal("do not know how to pack actor into " +  XObject.type(parent.xtype));
+            
+        },
         
-        if (XObject.type(parent.xtype) == 'GtkClutterWindow') {
-            var st = parent.el.get_stage();
-            st.add_actor(this.el);
-            return;
-        }
-        XObject.fatal("do not know how to pack actor into " +  XObject.type(parent.xtype));
+       
         
-    },
-    
-   
-    
-    init : function() {
-        print ("Actor init");
-        if (!this.items.length) {
-            print ("Actor does not have any children");
-            return;
+        init : function() {
+            print ("Actor init");
+            if (!this.items.length) {
+                print ("Actor does not have any children");
+                return;
+            }
+            var child = this.items[0];
+            child.init();
+            child.pack = false;
+            child.parent = this;
+            //var contents = new Gtk.Button({ label: 'test' }); 
+            
+           // print(JSON.stringify(this.items));
+            child.el.show();
+            
+            this.el = new GtkClutter.Actor.with_contents (  child.el) ;
+            
+            XObject.prototype.init.call(this);
+            this.el.show_all();
         }
-        var child = this.items[0];
-        child.init();
-        child.pack = false;
-        child.parent = this;
-        //var contents = new Gtk.Button({ label: 'test' }); 
-        
-       // print(JSON.stringify(this.items));
-        child.el.show();
-        
-        this.el = new GtkClutter.Actor.with_contents (  child.el) ;
-        
-        XObject.prototype.init.call(this);
-        this.el.show_all();
     }
-
-}; 
\ No newline at end of file
+); 
\ No newline at end of file