From: Alan Knowles Date: Wed, 1 Dec 2010 23:53:09 +0000 (+0800) Subject: XObjectBase/GtkTreeStore.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=3b8751b394be3af9203eb293d205b74d1abd5c32 XObjectBase/GtkTreeStore.js --- diff --git a/XObjectBase/GtkTreeStore.js b/XObjectBase/GtkTreeStore.js index d022b5ed9..f4f972551 100644 --- a/XObjectBase/GtkTreeStore.js +++ b/XObjectBase/GtkTreeStore.js @@ -3,18 +3,40 @@ XObject = imports.XObject.XObject +GObject = imports.gi.GObject; //GtkClutter.Embed.. // children are not added at init / but at show stage.. // listener is added on show.. // we should really add a hock to destroy it.. -GtkTreeStore = XObject.define( +GtkListStore = XObject.define( function(cfg) { XObject.call(this, cfg); - + // this is an example... + }, XObject, { - pack : 'set_model' + pack : false, + init : function() + { + // this is done before pack? + this.el = new Gtk.TreeViewColumn(); + this.parent.el.append_column(this.el); + + XObject.prototype.init.call(this); + this.el.add_attribute(this.items[0].el , 'markup', 4 ); + + + XObject.prototype.init.call(this); + this.el.set_column_types ( 6, [ + GObject.TYPE_STRING, + GObject.TYPE_STRING, + GObject.TYPE_STRING, + GObject.TYPE_STRING, + GObject.TYPE_STRING, + GObject.TYPE_STRING + ] ); + + } } - );