XObjectBase/GtkTreeModelFilter.js
[app.Builder.js] / XObjectBase / GtkTreeModelFilter.js
index 0d7f801..4484a6f 100644 (file)
@@ -22,7 +22,7 @@ GtkTreeModelFilter = XObject.define(
         init : function() 
         {
             // 
-            //this.items[0].pack = false;
+            this.items[0].pack = false;
             this.items[0].init();
             this.list = this.items[0];
             this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null);
@@ -32,14 +32,33 @@ GtkTreeModelFilter = XObject.define(
         append : function( values ) {
             this.list.append(values);
         },
-        getValue  : function ( path, col)
+          getValue  : function ( path, col)
         {
-            return this.list.getValue(path, col);
+            // not very type safe...
+            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) ;
+             
+            var gval = new GObject.Value(  [this.el.get_column_type(col), null ]);
+            this.list.el.get_value( iter, col, gval);
+            print("GET VALUE RETURNED: " + gval.value);
+            return gval.value;
         },
         setValue  : function ( path, col, val)
         {
-            this.list.setValue(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.list.el.set_value(iter,col,val);
         }