Attribute changed old-javascript
[app.Builder.js] / old-javascript / XObjectBase / GtkTreeStore.js
diff --git a/old-javascript/XObjectBase/GtkTreeStore.js b/old-javascript/XObjectBase/GtkTreeStore.js
new file mode 100644 (file)
index 0000000..0543462
--- /dev/null
@@ -0,0 +1,42 @@
+
+//<Script type="Text/javascript">
+
+XObject = imports.XObject.XObject
+GObject = imports.gi.GObject;
+GtkTreeStore = XObject.define(
+    function(cfg) {
+        this.columns = cfg.columns = cfg.columns || false;
+        delete cfg.columns;
+        XObject.call(this, cfg);
+       
+       
+    }, 
+    XObject,
+    {
+        pack : 'set_model',
+        init : function() 
+        {
+            XObject.prototype.init.call(this);
+            
+            if (!this.columns) { 
+                
+                this.el.set_column_types ( 6, [
+                    GObject.TYPE_STRING, 
+                    GObject.TYPE_STRING, 
+                    GObject.TYPE_STRING, 
+                    GObject.TYPE_STRING, 
+                    GObject.TYPE_STRING, 
+                    GObject.TYPE_STRING 
+                ] );
+            } else {
+                 this.el.set_column_types ( this.columns.length, this.columns);
+                  
+                
+            }
+            
+            
+        }
+    }
+);