src/Builder4/ValaProjectSettings.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 27 Apr 2015 09:15:06 +0000 (17:15 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 27 Apr 2015 09:15:06 +0000 (17:15 +0800)
src/Builder4/ValaProjectSettings.vala

src/Builder4/ValaProjectSettings.bjs
src/Builder4/ValaProjectSettings.vala

index 97c7d1f..8510749 100644 (file)
                "items" : [
                 {
                  "listeners" : {
-                  "toggled" : "(  path_string) =>  { \n\n\n\n    var m = _this.files_tree_store.el;\n   Gtk.TreeIter iter;\n   Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n   m.get_iter (out iter, path);\n   GLib.Value val;\n   m.get_value(iter, 3, out val);\n   m.set_value(iter, 3,  ((bool) val) ? false :true); \n   \n   // type.\n   GLib.Value ftval;  \n   m.get_value(iter, 2, out ftval);\n   var ftype = (string)ftval;   \n   \n   // full name...  \n   GLib.Value fval;     \n   m.get_value(iter, 0, out fval);\n   var fn = (string)fval;\n    \n    \n    var cg =   _this.set_vbox.cgroup;\n    // what's the sleected target?\n    // update the list..\n    // if ftype is a dir == then toggle all the bellow.\n    \n    if (ftype == \"dir\") {\n        _this.files_tree_store.updateDir(fval,  ((bool) val) ? false :true);\n    }\n    \n    // if ftype is a file .. see if all the files in that directory are check and check the dir.\n\n     \n    if ((bool)val) {\n        // renive\n        cg.sources.remove(fn);\n    } else {\n        cg.sources.add(fn);\n    }\n    \n}"
+                  "toggled" : "(  path_string) =>  { \n\n\n\n    var m = _this.files_tree_store.el;\n   Gtk.TreeIter iter;\n   Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n   m.get_iter (out iter, path);\n   GLib.Value val;\n   m.get_value(iter, 3, out val);\n   m.set_value(iter, 3,  ((bool) val) ? false :true); \n   \n   // type.\n   GLib.Value ftval;  \n   m.get_value(iter, 2, out ftval);\n   var ftype = (string)ftval;   \n   \n   // full name...  \n   GLib.Value fval;     \n   m.get_value(iter, 0, out fval);\n   var fn = (string)fval;\n    \n    \n    var cg =   _this.set_vbox.cgroup;\n    // what's the sleected target?\n    // update the list..\n    // if ftype is a dir == then toggle all the bellow.\n    \n    if (ftype == \"dir\") {\n        _this.files_tree_store.updateDir(fn,  ((bool) val) ? false :true);\n    }\n    \n    // if ftype is a file .. see if all the files in that directory are check and check the dir.\n\n     \n    if ((bool)val) {\n        // renive\n        cg.sources.remove(fn);\n    } else {\n        cg.sources.add(fn);\n    }\n    \n}"
                  },
                  "id" : "files_render_use",
                  "xtype" : "CellRendererToggle",
index 82fc446..e9b5609 100644 (file)
@@ -1771,7 +1771,7 @@ public class ValaProjectSettings : Object
                 // if ftype is a dir == then toggle all the bellow.
                 
                 if (ftype == "dir") {
-                    _this.files_tree_store.updateDir(fval,  ((bool) val) ? false :true);
+                    _this.files_tree_store.updateDir(fn,  ((bool) val) ? false :true);
                 }
                 
                 // if ftype is a file .. see if all the files in that directory are check and check the dir.