From: Alan Knowles Date: Thu, 2 Dec 2010 11:01:37 +0000 (+0800) Subject: XObjectBase/GtkListStore.js X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=6e96301cd5fe160ed765f0bf9b716184a024a4c1 XObjectBase/GtkListStore.js --- diff --git a/XObjectBase/GtkListStore.js b/XObjectBase/GtkListStore.js index 4d53b401b..81e3de4ab 100644 --- a/XObjectBase/GtkListStore.js +++ b/XObjectBase/GtkListStore.js @@ -43,16 +43,25 @@ GtkListStore = XObject.define( getValue : function ( path, col) { // not very type safe... + var tpath = path; + if (typeof(path) == 'string' ) { + tpath = new Gtk.TreePath.c_new(string); + } + var iter = new Gtk.TreeIter(); - this.el.get_iter (iter, path) ; + this.el.get_iter (iter, tpath) ; var gval = new GObject.Value(''); this.el.get_value( iter, col, gval) return gval.value; }, setValue : function ( path, col, val) { + var tpath = path; + if (typeof(path) == 'string' ) { + tpath = new Gtk.TreePath.c_new(string); + } var iter = new Gtk.TreeIter(); - this.el.get_iter (iter, path) ; + this.el.get_iter (iter, tpath) ; this.el.set_value(iter,i,values[i]); }