2 //<Script type="Text/javascript">
4 XObject = imports.XObject.XObject
6 GObject = imports.gi.GObject;
8 // tree view column.. should really have a better way to determin stuff..
10 GtkTreeViewColumn = XObject.define(
12 XObject.call(this, cfg);
13 // this is an example...
14 GtkTreeViewColumn.ids++;
15 this.col_id = GtkTreeViewColumn.ids;
19 pack : function(parent, item) {
20 parent.el.append_column(this.el);
26 parent.items.forEach(function(e){
30 if (e.col_id == _t.col_id) {
35 if (XObject.type(e.xtype) == 'GtkTreeViewColumn') {
41 if (this.items.length) {
42 print("child : " + XObject.type(this.items[0].xtype));
43 switch (XObject.type(this.items[0].xtype)) {
44 case "GtkCellRendererText":
45 this.el.add_attribute(this.items[0].el , 'markup', col );
47 case "GtkCellRendererToggle":
48 print("toggle col : " + col);
49 this.el.add_attribute(this.items[0].el , 'active', col ); // boolean???