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;
20 list : false, // list goes here,
21 pack : function(parent, item) {
24 parent.el.append_column(this.el);
30 parent.items.forEach(function(e){
31 if ([ 'Gtk.ListStore', 'Gtk.TreeStore', 'GtkTreeModelFilter' ].indexOf( XObject.type(e.xtype) ) > -1 ) {
40 if (e.col_id == _t.col_id) {
45 if (XObject.type(e.xtype) == 'GtkTreeViewColumn') {
51 if (this.items.length) {
52 print("child : " + XObject.type(this.items[0].xtype));
53 this.items[0].list = this.list;
54 switch (XObject.type(this.items[0].xtype)) {
55 case "GtkCellRendererText":
56 this.el.add_attribute(this.items[0].el , 'markup', col );
58 case "GtkCellRendererToggle":
59 print("toggle col : " + col);
60 this.el. (this.items[0].el , 'active', col ); // boolean???
73 GtkTreeViewColumn.ids = 0;