});
var ls = this.get('class-list-store');
for (var c in this.data.methods) {
- ls.append( [ c ]);
+ ls.append( [ c , true ]);
};
},
items : [
{
- xtype: Gtk.HBox,
+ xtype: Gtk.VBox,
items : [
{
- xtype: Gtk.ScrolledWindow,
+ xtype: Gtk.HBox,
+ pack : "pack_start,false,false",
items : [
{
- xtype: Gtk.TreeView,
+ xtype: Gtk.Button,
+ label : "Reset"
+ }
+ ]
+ },
+ {
+ xtype: Gtk.HBox,
+ items : [
+ {
+ xtype: Gtk.ScrolledWindow,
items : [
{
- xtype: Gtk.ListStore,
- id : "class-list-store"
- },
- {
- xtype: Gtk.TreeViewColumn,
- title : "Class",
+ xtype: Gtk.TreeView,
items : [
{
- xtype: Gtk.CellRendererText
+ xtype: Gtk.ListStore,
+ id : "class-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
+ ] );
+
+ },
+ pack : false
+ },
+ {
+ xtype: Gtk.TreeViewColumn,
+ title : "Class",
+ expand : true,
+ items : [
+ {
+ xtype: Gtk.CellRendererText
+ }
+ ]
+ },
+ {
+ xtype: Gtk.TreeViewColumn,
+ title : "Active",
+ items : [
+ {
+ xtype: Gtk.CellRendererToggle,
+ listeners : {
+ toggled : function (self, path) {
+ print("TOGGLE");
+ // this.list
+
+
+
+ var old = this.list.getValue(path, 1);
+ // print(JSON.stringify(old));
+ this.list.setValue(path, 1, old ? false : true)
+
+
+
+
+ }
+ },
+ activatable : true
+ }
+ ]
}
]
}
]
- }
- ]
- },
- {
- xtype: Gtk.ScrolledWindow,
- items : [
+ },
{
- xtype: Gtk.TreeView,
+ xtype: Gtk.ScrolledWindow,
items : [
{
- xtype: Gtk.ListStore,
- id : "child-list-store"
- },
- {
- xtype: Gtk.TreeViewColumn,
- title : "Child Classes",
+ xtype: Gtk.TreeView,
items : [
{
- xtype: Gtk.CellRendererText
+ xtype: Gtk.ListStore,
+ id : "method-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.TreeViewColumn,
+ title : "Methods",
+ expand : true,
+ items : [
+ {
+ xtype: Gtk.CellRendererText
+ }
+ ]
+ },
+ {
+ xtype: Gtk.TreeViewColumn,
+ title : "Active",
+ items : [
+ {
+ xtype: Gtk.CellRendererToggle,
+ listeners : {
+ toggled : function (self, path) {
+ print("TOGGLE");
+ // this.list
+
+
+
+ var old = this.list.getValue(path, 1);
+ // print(JSON.stringify(old));
+ this.list.setValue(path, 1, old ? false : true)
+
+
+
+
+ }
+ },
+ activatable : true
+ }
+ ]
}
]
}
]
- }
- ]
- },
- {
- xtype: Gtk.ScrolledWindow,
- items : [
+ },
{
- xtype: Gtk.TreeView,
+ xtype: Gtk.ScrolledWindow,
items : [
{
- xtype: Gtk.ListStore,
- id : "method-list-store"
- },
- {
- xtype: Gtk.TreeViewColumn,
- title : "Methods",
+ xtype: Gtk.TreeView,
items : [
{
- xtype: Gtk.CellRendererText
+ 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.TreeViewColumn,
+ title : "Child classes",
+ expand : true,
+ items : [
+ {
+ xtype: Gtk.CellRendererText
+ }
+ ]
+ },
+ {
+ xtype: Gtk.TreeViewColumn,
+ title : "Active",
+ items : [
+ {
+ xtype: Gtk.CellRendererToggle,
+ listeners : {
+ toggled : function (self, path) {
+ print("TOGGLE");
+ // this.list
+
+
+
+ var old = this.list.getValue(path, 1);
+ // print(JSON.stringify(old));
+ this.list.setValue(path, 1, old ? false : true)
+
+
+
+
+ }
+ },
+ activatable : true
+ }
+ ]
}
]
}