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:
78ebc1a
)
XObjectBase/GtkTreeModelFilter.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 2 Dec 2010 11:36:26 +0000
(19:36 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 2 Dec 2010 11:36:26 +0000
(19:36 +0800)
XObjectBase/GtkTreeModelFilter.js
patch
|
blob
|
history
diff --git
a/XObjectBase/GtkTreeModelFilter.js
b/XObjectBase/GtkTreeModelFilter.js
index
f8b0905
..
1d481f7
100644
(file)
--- a/
XObjectBase/GtkTreeModelFilter.js
+++ b/
XObjectBase/GtkTreeModelFilter.js
@@
-29,37
+29,17
@@
GtkTreeModelFilter = XObject.define(
},
append : function( values ) {
},
append : function( values ) {
- var iter = new Gtk.TreeIter();
- this.el.append(iter);
- for (var i = 0; i < values.length; i++) {
- this.el.set_value(iter,i,values[i]);
- }
+ this.list.append(values);
},
getValue : function ( path, col)
{
},
getValue : function ( path, col)
{
- // not very type safe...
- var tpath = path;
- if (typeof(path) == 'string' ) {
- tpath = new Gtk.TreePath.from_string(path);
- }
+ return this.list.getValue(path, col);
- var iter = new Gtk.TreeIter();
- this.el.get_iter (iter, tpath) ;
- var gval = new GObject.Value( [this.el.get_column_type(col), null ]);
- this.el.get_value( iter, col, gval);
- print("GET VALUE RETURNED: " + gval.value);
- return gval.value;
},
setValue : function ( path, col, val)
{
},
setValue : function ( path, col, val)
{
- var tpath = path;
- if (typeof(path) == 'string' ) {
- tpath = new Gtk.TreePath.from_string(path);
- }
- var iter = new Gtk.TreeIter();
- this.el.get_iter (iter, tpath) ;
- this.el.set_value(iter,col,val);
+ this.list.setValue(path,col,val);
}
}