X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=blobdiff_plain;f=DependTree%2FWindow.js;h=5d82e2a2d848388c9b339424c0c88a3538835b3f;hp=e6f2d1256d806c9bbadd9186db4a6b60df5b2429;hb=810364366db78503cd49e02a69cc701e33ff6460;hpb=a33c2f259d02e5174c600665013992b64a0e91f4 diff --git a/DependTree/Window.js b/DependTree/Window.js index e6f2d1256..5d82e2a2d 100644 --- a/DependTree/Window.js +++ b/DependTree/Window.js @@ -22,17 +22,17 @@ Window=new XObject({ var ls = this.get('method-list-store'); this.data.allmethods.forEach(function(v) { - ls.append( [ v ]); + ls.append( [ v , false, true ]); }); var ls = this.get('children-list-store'); this.data.allchildren.forEach(function(v) { - ls.append( [ v ]); + ls.append( [ v , false, true ]); }); var ls = this.get('class-list-store'); var i =0; for (var c in this.data.methods) { i++; - ls.append( [ c , true , i > 10 ? true : false]); + ls.append( [ c , true , true]); }; @@ -67,6 +67,23 @@ Window=new XObject({ items : [ { xtype: Gtk.TreeView, + listeners : { + cursor_changed : function (self) { + if (!this.selection) { + this.selection = this.el.get_selection(); + } + + var iter = new Gtk.TreeIter(); + this.selection.get_selected(this.model.el, iter); + + var tp = this.model.el.get_path(iter).to_string(); + print(tp); + // + var cls = this.model.getValue(tp, 0); + print(cls); + + } + }, items : [ { xtype: Gtk.TreeModelFilter, @@ -77,6 +94,7 @@ Window=new XObject({ this.el = new Gtk.TreeModelFilter.c_new(this.items[0].el, null); this.el.set_visible_column(2); XObject.prototype.init.call(this); + this.parent.model = this; }, items : [ @@ -167,14 +185,13 @@ Window=new XObject({ this.el.set_column_types ( 6, [ GObject.TYPE_STRING, GObject.TYPE_BOOLEAN, - GObject.TYPE_STRING, + GObject.TYPE_BOOLEAN, GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING ] ); - }, - pack : false + } } ] }, @@ -225,21 +242,36 @@ Window=new XObject({ xtype: Gtk.TreeView, items : [ { - xtype: Gtk.ListStore, - id : "children-list-store", - init : function() - { - XObject.prototype.init.call(this); - this.el.set_column_types ( 6, [ - GObject.TYPE_STRING, - GObject.TYPE_BOOLEAN, - GObject.TYPE_STRING, - GObject.TYPE_STRING, - GObject.TYPE_STRING, - GObject.TYPE_STRING - ] ); - - } + xtype: Gtk.TreeModelFilter, + init : function() { + 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); + this.el.set_visible_column(2); + XObject.prototype.init.call(this); + + }, + items : [ + { + xtype: Gtk.ListStore, + id : "children-list-store", + pack : false, + init : function() + { + XObject.prototype.init.call(this); + this.el.set_column_types ( 6, [ + GObject.TYPE_STRING, + GObject.TYPE_BOOLEAN, + GObject.TYPE_BOOLEAN, + GObject.TYPE_STRING, + GObject.TYPE_STRING, + GObject.TYPE_STRING + ] ); + + } + } + ] }, { xtype: Gtk.TreeViewColumn,