projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1e92d5
)
XObjectBase/GtkListStore.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 2 Dec 2010 11:01:37 +0000
(19:01 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 2 Dec 2010 11:01:37 +0000
(19:01 +0800)
XObjectBase/GtkListStore.js
patch
|
blob
|
history
diff --git
a/XObjectBase/GtkListStore.js
b/XObjectBase/GtkListStore.js
index
4d53b40
..
81e3de4
100644
(file)
--- a/
XObjectBase/GtkListStore.js
+++ b/
XObjectBase/GtkListStore.js
@@
-43,16
+43,25
@@
GtkListStore = XObject.define(
getValue : function ( path, col)
{
// not very type safe...
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();
var iter = new Gtk.TreeIter();
- this.el.get_iter (iter, path) ;
+ this.el.get_iter (iter,
t
path) ;
var gval = new GObject.Value('');
this.el.get_value( iter, col, gval)
return gval.value;
},
setValue : function ( path, col, val)
{
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();
var iter = new Gtk.TreeIter();
- this.el.get_iter (iter, path) ;
+ this.el.get_iter (iter,
t
path) ;
this.el.set_value(iter,i,values[i]);
}
this.el.set_value(iter,i,values[i]);
}