2 "name" : "ValaProjectSettings",
5 "path" : "/home/alan/gitlive/app.Builder.js/Builder4/ValaProjectSettings.bjs",
10 "# Project.Gtk project" : "null",
11 "# Xcls_MainWindow window" : "null",
12 "| void show" : "(Project.Gtk project) {\n \n \n print(\"ValaProjectSettings show\\n\");\n \n this.project= project;\n\n this.compile_flags.el.text = \"\";\n \n this.default_directory_tree_store.load(); \n this.default_packages_tree_store.load(); \n \n\n\n}\n",
14 "string id" : "ValaProjectSettings",
18 "* pack" : "pack_start,true,true,0",
23 "id" : "label_global",
27 "utf8 label" : "Global"
30 "id" : "label_targets",
34 "utf8 label" : "Targets"
38 "* pack" : "append_page,_this.label_global.el",
39 "gboolean homogeneous" : false,
44 "* pack" : "pack_start,false,false,0",
46 "utf8 label" : "compile flags"
49 "id" : "compile_flags",
51 "* pack" : "pack_start,false,false,0",
56 "* pack" : "pack_start,false,false,0",
58 "utf8 label" : "packages"
61 "* pack" : "pack_start,true,true,0",
62 "xtype" : "ScrolledWindow",
66 "gboolean headers_visible" : false,
69 "string id" : "default_packages_tree",
73 "id" : "default_packages_tree_store",
74 "* pack" : "set_model",
75 "xtype" : "ListStore",
77 "| void load" : "() {\n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.packages;\n \n this.el.clear();\n var pal = (Palete.Gtk) Palete.factory(\"Gtk\");\n var pkgs = pal.packages();\n print(\"ValaProjectSettings:packages load %d\\n\", pkgs.size);\n\n Gtk.TreeIter citer;\n\n for(var i =0 ; i < pkgs.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, pkgs.get(i) ); // title \n this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
78 "$ columns" : " typeof(string), // 0 key type\n typeof(bool)",
82 "utf8 title" : "name",
83 "* init" : " \n this.el.add_attribute(_this.packages_render.el , \"text\", 0 );\n ",
84 "* pack" : "append_column",
85 "xtype" : "TreeViewColumn",
86 "gboolean resizable" : true,
87 "gboolean expand" : true,
91 "id" : "packages_render",
92 "* pack" : "pack_start,false",
93 "xtype" : "CellRendererText",
100 "* init" : "{\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n }",
101 "* pack" : "append_column",
102 "xtype" : "TreeViewColumn",
103 "gboolean resizable" : false,
105 "gint fixed_width" : 50,
109 "toggled" : "( path_string) => { \n var m = _this.default_packages_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, 1, out val);\n m.set_value(iter, 1, ((bool) val) ? false :true); \n GLib.Value fval; \n m.get_value(iter, 0, out fval);\n var fn = (string)fval;\n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.packages;\n if ((bool)val) {\n // renive\n items.remove(\n \n}"
111 "id" : "packages_render_use",
112 "* pack" : "pack_start,false",
113 "xtype" : "CellRendererToggle",
115 "gboolean activatable" : true
125 "* pack" : "pack_start,false,false,0",
127 "utf8 label" : "Available Directories"
130 "* pack" : "pack_start,true,true,0",
131 "xtype" : "ScrolledWindow",
136 "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());\n _this.default_directory_menu.el.show_all();\n _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}"
138 "gboolean headers_visible" : false,
139 "id" : "default_directory_tree",
141 "xtype" : "TreeView",
145 "id" : "default_directory_tree_store",
146 "* pack" : "set_model",
147 "xtype" : "ListStore",
149 "| 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 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, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
150 "$ columns" : " typeof(string)\n ",
154 "utf8 title" : "name",
155 "* init" : "\n this.el.add_attribute(_this.directory_render.el , \"text\", 0 );\n ",
156 "* pack" : "append_column",
157 "xtype" : "TreeViewColumn",
158 "gboolean resizable" : true,
162 "id" : "directory_render",
163 "* pack" : "pack_start,false",
164 "xtype" : "CellRendererText",
172 "id" : "default_directory_menu",
178 "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
181 "xtype" : "MenuItem",
183 "utf8 label" : "Add Directory"
187 "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.OPEN ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
190 "xtype" : "MenuItem",
192 "utf8 label" : "Add File"
196 "xtype" : "SeparatorMenuItem",
201 "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n print(\"remove: %s\\n\", fn);\n if (!_this.project.compilegroups.get(\"_default_\").sources.remove(fn)) {\n print(\"remove failed\");\n }\n _this.default_directory_tree_store.load();\n}"
204 "xtype" : "MenuItem",
206 "utf8 label" : "Remove File/Directory"
215 "gint position" : 300,
217 "* pack" : "append_page,_this.label_targets.el",
221 "* init" : "{ \nthis.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n\n}\n",
222 "xtype" : "ScrolledWindow",
227 "id" : "targets_tree",
228 "xtype" : "TreeView",
232 "* pack" : "set_model",
233 "xtype" : "ListStore",
235 "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
239 "utf8 title" : "name",
240 "* init" : " this.el.add_attribute(_this.targets_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.targets_render.el , \"text\", 1 );\n ",
241 "* pack" : "append_column",
242 "xtype" : "TreeViewColumn",
243 "gboolean resizable" : true,
247 "id" : "targets_render",
248 "xtype" : "CellRendererText",
249 "* pack" : "pack_start,false",
261 "string id" : "set_vbox",
262 "gboolean homogeneous" : false,
267 "* pack" : "pack_start,false,false,0",
269 "utf8 label" : "target filename"
273 "* pack" : "pack_start,false,false,0",
274 "string id" : "build_pack_target",
279 "* pack" : "pack_start,false,false,0",
281 "utf8 label" : "compile flags"
285 "* pack" : "pack_start,false,false,0",
286 "string id" : "build_compile_flags",
291 "* pack" : "pack_start,false,false,0",
293 "utf8 label" : "Files to compile"
296 "* pack" : "pack_start,true,true,0",
297 "xtype" : "ScrolledWindow",
301 "xtype" : "TreeView",
302 "string id" : "files_tree",
306 "* pack" : "set_model",
307 "xtype" : "ListStore",
309 "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
313 "utf8 title" : "name",
314 "* init" : " this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.files_render.el , \"text\", 1 );\n ",
315 "* pack" : "append_column",
316 "xtype" : "TreeViewColumn",
317 "gboolean resizable" : true,
321 "id" : "files_render",
322 "* pack" : "pack_start,false",
323 "xtype" : "CellRendererText",