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 this.default_packages_tree_store.el.clear();\n this.default_directory_tree_store.el.clear(); \n\n this.default_directory_tree_store.load(); \n \n if (this.project.compilegroups.has_key(\"default\")) {\n var def = this.project.compilegroups.get(\"default\");\n this.compile_flags.el.text = def.compile_flags;\n this.default_packages_tree_store.load(def.packages);\n\n } else {\n this.default_packages_tree_store.load(new Gee.ArrayList<string>());\n \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" : "(Gee.ArrayList<string> items) {\n \n\n\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 \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,
140 "xtype" : "TreeView",
141 "string id" : "default_directory_tree",
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), // 0 key type\n typeof(string) // ??\n ",
154 "utf8 title" : "name",
155 "* init" : " this.el.add_attribute(_this.directory_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.directory_render.el , \"text\", 1 );\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 _this.project.compilegroups.get(\"_default_\").sources.add(chooser.get_uri ());\n _this.default_directory_tree_store.load();\n}"
181 "xtype" : "MenuItem",
183 "utf8 label" : "Add Directory"
192 "gint position" : 300,
194 "* pack" : "append_page,_this.label_targets.el",
198 "* init" : "{ \nthis.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n\n}\n",
199 "xtype" : "ScrolledWindow",
204 "id" : "targets_tree",
205 "xtype" : "TreeView",
209 "* pack" : "set_model",
210 "xtype" : "ListStore",
212 "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
216 "utf8 title" : "name",
217 "* init" : " this.el.add_attribute(_this.targets_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.targets_render.el , \"text\", 1 );\n ",
218 "* pack" : "append_column",
219 "xtype" : "TreeViewColumn",
220 "gboolean resizable" : true,
224 "id" : "targets_render",
225 "xtype" : "CellRendererText",
226 "* pack" : "pack_start,false",
238 "string id" : "set_vbox",
239 "gboolean homogeneous" : false,
244 "* pack" : "pack_start,false,false,0",
246 "utf8 label" : "target filename"
250 "* pack" : "pack_start,false,false,0",
251 "string id" : "build_pack_target",
256 "* pack" : "pack_start,false,false,0",
258 "utf8 label" : "compile flags"
262 "* pack" : "pack_start,false,false,0",
263 "string id" : "build_compile_flags",
268 "* pack" : "pack_start,false,false,0",
270 "utf8 label" : "Files to compile"
273 "* pack" : "pack_start,true,true,0",
274 "xtype" : "ScrolledWindow",
278 "xtype" : "TreeView",
279 "string id" : "files_tree",
283 "* pack" : "set_model",
284 "xtype" : "ListStore",
286 "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
290 "utf8 title" : "name",
291 "* init" : " this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.files_render.el , \"text\", 1 );\n ",
292 "* pack" : "append_column",
293 "xtype" : "TreeViewColumn",
294 "gboolean resizable" : true,
298 "id" : "files_render",
299 "* pack" : "pack_start,false",
300 "xtype" : "CellRendererText",