DependTree/Window.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 2 Dec 2010 11:23:13 +0000 (19:23 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 2 Dec 2010 11:23:13 +0000 (19:23 +0800)
DependTree/Window.js

index 835771d..e40ba15 100644 (file)
@@ -107,7 +107,7 @@ Window=new XObject({
                                                              
                                                             var old = this.list.getValue(path, 1);
                                                            // print(JSON.stringify(old));
-                                                            this.list.setValue(path, 1, !old)
+                                                            this.list.setValue(path, 1, old ? false : true)
                                                             
                                                             
                                                             
@@ -140,6 +140,33 @@ Window=new XObject({
                                                     xtype: Gtk.CellRendererText
                                                 }
                                             ]
+                                        },
+                                        {
+                                            xtype: Gtk.TreeViewColumn,
+                                            title : "Active",
+                                            pack : false,
+                                            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
+                                                }
+                                            ]
                                         }
                                     ]
                                 }
@@ -163,6 +190,33 @@ Window=new XObject({
                                                     xtype: Gtk.CellRendererText
                                                 }
                                             ]
+                                        },
+                                        {
+                                            xtype: Gtk.TreeViewColumn,
+                                            title : "Active",
+                                            pack : false,
+                                            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
+                                                }
+                                            ]
                                         }
                                     ]
                                 }