"id" : "files_tree_store",
"* pack" : "set_model",
"xtype" : "ListStore",
- "| void updateDir" : "(string dname, bool val) {\n\n for(var i =0 ; i < this.el.iter_n_children(null); i++) {\n this.el.iter_nth_child(out citer,null,i);\n\n GLib.Value val;\n this.el.get_value(citer,0, out val);\n var fn = (string) val;\n \n if ( Path.get_dirname (fn) == dname) {\n \n this.el.set_value(citer, 3, val ); // checked \n }\n }\n\n}\n",
+ "| void updateDir" : "(string dname, bool val) {\n var cg = _this.set_vbox.cgroup;\n for(var i =0 ; i < this.el.iter_n_children(null); i++) {\n this.el.iter_nth_child(out citer,null,i);\n\n GLib.Value val;\n this.el.get_value(citer,0, out val);\n var fn = (string) val;\n \n if ( Path.get_dirname (fn) == dname) {\n \n this.el.set_value(citer, 3, val ); // checked \n \n \n \n if ((bool)val) {\n // renive\n cg.sources.remove(fn);\n } else {\n cg.sources.add(fn);\n }\n \n \n }\n }\n\n}\n",
"$ n_columns" : 4,
"| void load" : "() {\n \n this.el.clear();\n \n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n \n \n \n Gtk.TreeIter citer;\n\n for(var i =0 ; i < items.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, items.get(i) ); // title \n this.el.set_value(citer, 1, \"<span foreground=\\\"green\\\" font_weight=\\\"bold\\\">\" + \n GLib.Markup.escape_text(items.get(i)) + \"</span>\"\n ); // title \n print(\"ADD item %s\", items.get(i));\n this.el.set_value(citer, 2, \"dir\"); // type \n this.el.set_value(citer, 3, false ); // checked \n\n var files = _this.project.files(items.get(i));\n \n for(var j =0 ; j < files.size; j++) {\n this.el.append(out citer); \n print(\"ADD item %s\", files.get(j));\n this.el.set_value(citer, 0, files.get(j) ); // title \n this.el.set_value(citer, 1, GLib.Markup.escape_text( Path.get_basename (files.get(j))) ); // title \n this.el.set_value(citer, 2, \"file\"); // type \n this.el.set_value(citer, 3, false ); // checked \n\n }\n \n \n //this.el.set_value(citer, 1, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n ",
"$ columns" : " typeof(string), // 0 file name\n typeof(string), // 0 basename\n typeof(string), // type (dir orfile)\n typeof(bool) // is checked.\n ",
// user defined functions
public void updateDir (string dname, bool val) {
-
+ var cg = _this.set_vbox.cgroup;
for(var i =0 ; i < this.el.iter_n_children(null); i++) {
this.el.iter_nth_child(out citer,null,i);
if ( Path.get_dirname (fn) == dname) {
this.el.set_value(citer, 3, val ); // checked
+
+
+
+ if ((bool)val) {
+ // renive
+ cg.sources.remove(fn);
+ } else {
+ cg.sources.add(fn);
+ }
+
+
}
}