"# Project.Gtk project" : "null",
"# Xcls_MainWindow window" : "null",
"| void show" : "(Project.Gtk project) {\n \n \n print(\"ValaProjectSettings show\\n\");\n \n this.project= project;\n\n this.compile_flags.el.text = _this.project.compilegroups.get(\"_default_\").compile_flags;\n \n this.default_directory_tree_store.load(); \n this.default_packages_tree_store.load(); \n this.targets_tree_store.load();\n this.files_tree_store.load();\n\n}\n",
+ "bool hexpand" : true,
"xtype" : "Box",
"string id" : "ValaProjectSettings",
"| void save" : "() {\n this.project.writeConfig();\n}",
},
{
"* pack" : "pack_start,true,true,0",
- "xtype" : "Box",
+ "xtype" : "Paned",
"$ xns" : "Gtk",
+ "int position" : 300,
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"items" : [
{
+ "bool hexpand" : true,
"* pack" : "add",
"xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
]
},
{
- "* pack" : "add",
+ "bool hexpand" : true,
+ "* pack" : "add2",
"xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
"items" : [
{
"listeners" : {
"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.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());\n _this.targets_tree_menu.el.show_all();\n _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}",
- "cursor_changed" : " ( ) => {\n\n if (this.cursor != \"\") {\n // save the values..\n }\n \n // load the new values.\n \n\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!this.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n // should disable the right hand side..\n _this.set_vbox.el.hide();\n return;\n }\n _this.set_vbox.el.show();\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 this.cursor = fn;\n var cg = _this.project.compilegroups.get(fn);\n \n _this.build_pack_target.el.set_text(cg.target_bin);\n _this.build_compile_flags.el.set_text(cg.compile_flags);\n _this.set_vbox.cgroup = cg;\n _this.files_tree_store.update();\n \n // load the srouces\n \n\n }"
+ "cursor_changed" : " ( ) => {\n\n if (this.cursor != \"\") {\n // save the values..\n }\n \n // load the new values.\n \n\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!this.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n // should disable the right hand side..\n _this.set_vbox.el.hide();\n return;\n }\n _this.set_vbox.el.show();\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 this.cursor = fn;\n var cg = _this.project.compilegroups.get(fn);\n \n _this.build_pack_target.el.set_text(cg.target_bin);\n _this.build_compile_flags.el.set_text(cg.compile_flags);\n\t\t_this.build_execute_args.el.set_text(cg.execute_args);\n \n _this.set_vbox.cgroup = cg;\n _this.files_tree_store.update();\n \n // load the srouces\n \n\n }"
},
"id" : "targets_tree",
"# string cursor" : "",
"xtype" : "Entry",
"$ xns" : "Gtk"
},
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "test argments - when run after a build"
+ },
+ {
+ "listeners" : {
+ "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).execute_args = this.el.text;\n}"
+ },
+ "id" : "build_execute_args",
+ "string placeholder_text" : "eg. -f somefile -g ",
+ "xtype" : "Entry",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk"
+ },
{
"xtype" : "Label",
"* pack" : "pack_start,false,false,0",
"xtype" : "ListStore",
"| void updateDir" : "(string dname, bool bval) {\n \n Gtk.TreeIter citer;\n\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, bval ); // checked \n \n \n \n if (!bval) {\n // renive\n if (cg.sources.contains(fn)) {\n cg.sources.remove(fn);\n }\n } else {\n if (!cg.sources.contains(fn)) {\n cg.sources.add(fn);\n }\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 \n var files = _this.project.files(items.get(i));\n if (files.size < 1) {\n continue;\n }\n \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 \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 ",
+ "| 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 \n var files = _this.project.filesForCompile(items.get(i), false);\n if (files.size < 1) {\n continue;\n }\n \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 \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 ",
"$ xns" : "Gtk",
"| void update" : "() {\n\n\n Gtk.TreeIter citer;\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 var active = false;\n if (_this.set_vbox.cgroup.sources.contains(fn)) {\n active = true;\n }\n \n this.el.set_value(citer, 3, active ); // checked \n }\n\n\n}\n"