"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"int spacing" : 0,
+ "items" : [
+ {
+ "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "string label" : "Label",
+ "xtype" : "Button"
+ }
+ ],
+ "xtype" : "ButtonBox"
+ }
+ ],
"xtype" : "Box"
}
],
// my vars (dec)
// set gobject values
+ var child_0 = new Xcls_ButtonBox6( _this );
+ child_0.ref();
+ this.el.add( child_0.el );
}
// user defined functions
}
+ public class Xcls_ButtonBox6 : Object
+ {
+ public Gtk.ButtonBox el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ButtonBox6(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ButtonBox( Gtk.Orientation.HORIZONTAL );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Button7( _this );
+ child_0.ref();
+ this.el.add( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button7 : Object
+ {
+ public Gtk.Button el;
+ private GladeView _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button7(GladeView _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Label";
+ }
+
+ // user defined functions
+ }
+
+
}
{
"$ pack" : "add",
"$ xns" : "Gtk",
+ "* pack" : "add",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"bool homogeneous" : false,
"items" : [
},
{
"$ xns" : "Gtk",
- "* pack" : "pack_end,false,true,0",
+ "* pack" : "add",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"int margin_bottom" : 4,
"int margin_left" : 4,
"int margin_right" : 4,
+ "int margin_top" : 4,
"items" : [
{
"$ xns" : "Gtk",
"xtype" : "Button"
}
],
- "xtype" : "HButtonBox"
+ "xtype" : "ButtonBox"
}
],
"xtype" : "Box"
" ",
" }",
"} "
+ ],
+ "hide" : [
+ "( ) => {",
+ "",
+ " if (!this.done) {",
+ " _this.el.show();",
+ " ",
+ " }",
+ "}",
+ ""
]
},
"uint border_width" : 0,
"xtype" : "Popover",
- "| void updateFileFromEntry" : [
- "() {",
- "",
- " _this.file.title = _this.title.el.get_text();",
- " _this.file.region = _this.region.el.get_text(); ",
- " _this.file.parent = _this.parent.el.get_text(); ",
- " _this.file.permname = _this.permname.el.get_text(); ",
- " _this.file.modOrder = _this.modOrder.el.get_text();",
- " ",
- " if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {",
- " _this.file.renameTo(_this.name.el.get_text());",
- " }",
- " // store the module...",
- " _this.file.build_module = \"\"; ",
- " Gtk.TreeIter iter; ",
- " if (_this.build_module.el.get_active_iter (out iter)) {",
- " Value vfname;",
- " this.dbmodel.el.get_value (iter, 0, out vfname);",
- " if (((string)vfname).length > 0) {",
- " _this.file.build_module = (string)vfname;",
- " }",
- " ",
- " }",
- " ",
- " ",
- "",
- " ",
- "} "
- ],
"| void show" : [
"(JsRender.JsRender c, Gtk.Widget btn) ",
"{",
" ",
" ",
"}"
+ ],
+ "| void updateFileFromEntry" : [
+ "() {",
+ "",
+ " _this.file.title = _this.title.el.get_text();",
+ " _this.file.region = _this.region.el.get_text(); ",
+ " _this.file.parent = _this.parent.el.get_text(); ",
+ " _this.file.permname = _this.permname.el.get_text(); ",
+ " _this.file.modOrder = _this.modOrder.el.get_text();",
+ " ",
+ " if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {",
+ " _this.file.renameTo(_this.name.el.get_text());",
+ " }",
+ " // store the module...",
+ " _this.file.build_module = \"\"; ",
+ " Gtk.TreeIter iter; ",
+ " if (_this.build_module.el.get_active_iter (out iter)) {",
+ " Value vfname;",
+ " this.dbmodel.el.get_value (iter, 0, out vfname);",
+ " if (((string)vfname).length > 0) {",
+ " _this.file.build_module = (string)vfname;",
+ " }",
+ " ",
+ " }",
+ " ",
+ " ",
+ "",
+ " ",
+ "} "
]
}
],
// my vars (def)
public signal void success (Project.Project pr, JsRender.JsRender file);
- public bool done;
- public Project.Project project;
public JsRender.JsRender file;
+ public Project.Project project;
public Xcls_MainWindow mainwindow;
+ public bool done;
// ctor
public Xcls_PopoverFileDetails()
this.el = new Gtk.Popover( null );
// my vars (dec)
- this.done = false;
this.file = null;
this.mainwindow = null;
+ this.done = false;
// set gobject values
this.el.border_width = 0;
}
});
+ this.el.hide.connect( ( ) => {
+
+ if (!this.done) {
+ _this.el.show();
+
+ }
+ });
}
// user defined functions
- public void updateFileFromEntry () {
-
- _this.file.title = _this.title.el.get_text();
- _this.file.region = _this.region.el.get_text();
- _this.file.parent = _this.parent.el.get_text();
- _this.file.permname = _this.permname.el.get_text();
- _this.file.modOrder = _this.modOrder.el.get_text();
-
- if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {
- _this.file.renameTo(_this.name.el.get_text());
- }
- // store the module...
- _this.file.build_module = "";
- Gtk.TreeIter iter;
- if (_this.build_module.el.get_active_iter (out iter)) {
- Value vfname;
- this.dbmodel.el.get_value (iter, 0, out vfname);
- if (((string)vfname).length > 0) {
- _this.file.build_module = (string)vfname;
- }
-
- }
-
-
-
-
- }
public void show (JsRender.JsRender c, Gtk.Widget btn)
{
this.project = c.project;
//this.success = c.success;
+ }
+ public void updateFileFromEntry () {
+
+ _this.file.title = _this.title.el.get_text();
+ _this.file.region = _this.region.el.get_text();
+ _this.file.parent = _this.parent.el.get_text();
+ _this.file.permname = _this.permname.el.get_text();
+ _this.file.modOrder = _this.modOrder.el.get_text();
+
+ if (_this.file.name.length > 0 && _this.file.name != _this.name.el.get_text()) {
+ _this.file.renameTo(_this.name.el.get_text());
+ }
+ // store the module...
+ _this.file.build_module = "";
+ Gtk.TreeIter iter;
+ if (_this.build_module.el.get_active_iter (out iter)) {
+ Value vfname;
+ this.dbmodel.el.get_value (iter, 0, out vfname);
+ if (((string)vfname).length > 0) {
+ _this.file.build_module = (string)vfname;
+ }
+
+ }
+
+
+
+
}
public class Xcls_Box2 : Object
{
var child_1 = new Xcls_grid( _this );
child_1.ref();
this.el.pack_start ( child_1.el , false,false,4 );
- var child_2 = new Xcls_HButtonBox29( _this );
+ var child_2 = new Xcls_ButtonBox29( _this );
child_2.ref();
- this.el.pack_end ( child_2.el , false,true,0 );
+ this.el.add ( child_2.el );
}
// user defined functions
- public class Xcls_HButtonBox29 : Object
+ public class Xcls_ButtonBox29 : Object
{
- public Gtk.HButtonBox el;
+ public Gtk.ButtonBox el;
private Xcls_PopoverFileDetails _this;
// my vars (def)
// ctor
- public Xcls_HButtonBox29(Xcls_PopoverFileDetails _owner )
+ public Xcls_ButtonBox29(Xcls_PopoverFileDetails _owner )
{
_this = _owner;
- this.el = new Gtk.HButtonBox();
+ this.el = new Gtk.ButtonBox( Gtk.Orientation.HORIZONTAL );
// my vars (dec)
this.el.margin_right = 4;
this.el.margin_left = 4;
this.el.margin_bottom = 4;
+ this.el.margin_top = 4;
var child_0 = new Xcls_Button30( _this );
child_0.ref();
this.el.add ( child_0.el );
{
- "name" : "RooProjectSettings",
- "parent" : "",
- "title" : "",
- "path" : "/home/alan/gitlive/roobuilder/src/Builder4/RooProjectSettings.bjs",
- "permname" : "",
- "modOrder" : "",
"build_module" : "builder",
"items" : [
{
+ "$ xns" : "Gtk",
"@ void buttonPressed" : "(string btn)",
- "id" : "RooProjectSettings",
- "| void show" : " (Gtk.Widget btn, Project.Project project) {\n _this.project = project;\n _this.path.el.label = project.firstPath();\n // get the active project.\n var lm = Gtk.SourceLanguageManager.get_default();\n \n ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(\n lm.get_language(\"html\")\n );\n \n //print (project.fn);\n //project.runhtml = project.runhtml || '';\n _this.view.el.get_buffer().set_text(project.runhtml);\n \n \n \n _this.rootURL.el.set_text( _this.project.rootURL );\n \n _this.html_gen_model.loadData(_this.project.html_gen);\n\n _this.base_template_model.loadData();\n \n var js = _this.project;\n _this.database_DBTYPE.el.set_text( js.get_string_member(\"DBTYPE\") );\n _this.database_DBNAME.el.set_text( js.get_string_member(\"DBNAME\") );\n _this.database_DBUSERNAME.el.set_text( js.get_string_member(\"DBUSERNAME\") );\n _this.database_DBPASSWORD.el.set_text( js.get_string_member(\"DBPASSWORD\") );\n \n \t//console.log('show all');\n\tthis.el.set_modal(true);\n\tthis.el.set_relative_to(btn);\n\n\tthis.el.set_position(Gtk.PositionType.RIGHT);\n\n\t// window + header?\n\t print(\"SHOWALL - POPIP\\n\");\n\tthis.el.show_all();\n\tthis.el.set_size_request(800,500);\n\tthis.view.el.grab_focus();\n\t\n \n //this.el.show_all();\n}\n",
- "xtype" : "Popover",
"Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
- "| void save" : "() {\n var buf = _this.view.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n\t_this.project.runhtml = buf.get_text(s,e,true);\n \n _this.project.rootURL = _this.rootURL.el.get_text();\n \n \n Gtk.TreeIter iter;\n Value html_gen_val;\n _this.html_gen.el.get_active_iter(out iter);\n _this.html_gen_model.el.get_value (iter, 0, out html_gen_val);\n \n _this.project.html_gen = (string)html_gen_val;\n \n // set by event changed...\n //_this.project.base_template = _this.base_template.el.get_text(); \n \n var js = _this.project.json_project_data;\n js.set_string_member(\"DBTYPE\", _this.database_DBTYPE.el.get_text());\n js.set_string_member(\"DBNAME\", _this.database_DBNAME.el.get_text());\n js.set_string_member(\"DBUSERNAME\", _this.database_DBUSERNAME.el.get_text());\n js.set_string_member(\"DBPASSWORD\", _this.database_DBPASSWORD.el.get_text());\n// _this.project.set_string_member(\"DBHOST\", _this.DBTYPE.el.get_text()); \n \n // need to re-init the database \n \n _this.project.initRooDatabase();\n \n \n}",
- "$ xns" : "Gtk",
"Project.Project project" : "",
+ "bool done" : false,
"bool modal" : true,
- "uint border_width" : 0,
+ "id" : "RooProjectSettings",
"items" : [
{
- "xtype" : "Box",
- "* pack" : "add",
+ "$ homogeneous" : false,
"$ xns" : "Gtk",
+ "* pack" : "add",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"border_width" : 5,
- "$ homogeneous" : false,
"items" : [
{
- "* pack" : "pack_start,true,true,0",
- "xtype" : "Notebook",
"$ xns" : "Gtk",
+ "* pack" : "pack_start,true,true,0",
"items" : [
{
- "id" : "label_global",
- "xtype" : "Label",
- "* pack" : false,
"$ xns" : "Gtk",
- "utf8 label" : "Global"
+ "* pack" : false,
+ "id" : "label_global",
+ "utf8 label" : "Global",
+ "xtype" : "Label"
},
{
- "id" : "label_database",
- "* pack" : false,
- "xtype" : "Label",
"$ xns" : "Gtk",
- "utf8 label" : "Database"
+ "* pack" : false,
+ "id" : "label_database",
+ "utf8 label" : "Database",
+ "xtype" : "Label"
},
{
- "* pack" : "append_page,_this.label_global.el",
- "xtype" : "Box",
- "gboolean homogeneous" : false,
"$ xns" : "Gtk",
+ "* pack" : "append_page,_this.label_global.el",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "gboolean homogeneous" : false,
"items" : [
{
- "id" : "grid",
- "int margin_right" : 4,
- "* pack" : "pack_start,false,false,4",
- "xtype" : "Grid",
- "uint row_spacing" : 2,
- "n_columns" : 2,
- "$ xns" : "Gtk",
- "n_rows" : 7,
"$ homogeneous" : true,
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,4",
+ "id" : "grid",
"int margin_left" : 4,
+ "int margin_right" : 4,
"items" : [
{
- "label" : "Filename",
- "xalign" : 0,
+ "$ xns" : "Gtk",
"* pack" : "attach,0,0,1,1",
- "xtype" : "Label",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "label" : "Filename",
+ "xalign" : 0,
+ "xtype" : "Label"
},
{
- "label" : "filename",
- "id" : "path",
- "xalign" : 0,
+ "$ xns" : "Gtk",
"* pack" : "attach,1,0,1,1",
- "xtype" : "Label",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "id" : "path",
+ "label" : "filename",
+ "xalign" : 0,
+ "xtype" : "Label"
},
{
- "label" : "HTML template file",
+ "$ xns" : "Gtk",
"* pack" : "attach,0,1,1,1",
- "xtype" : "Label",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "label" : "HTML template file",
+ "xtype" : "Label"
},
{
- "listeners" : {
- "changed" : "() => {\n\tGtk.TreeIter iter;\n \n\t// this get's called when we are filling in the data... ???\n\tif (this.loading) {\n\t\treturn;\n\t}\n\t\n \n\tif (this.el.get_active_iter(out iter)) {\n\t\tValue vfname;\n\t\t_this.base_template_model.el.get_value (iter, 0, out vfname);\n\t\t_this.project.base_template = ((string)vfname) ;\n\t\t\n\t\t print(\"\\nSET base template to %s\\n\", _this.project.base_template );\n\t\t// is_bjs = ((string)vfname) == \"bjs\";\n\t}\n \n \n // directory is only available for non-bjs \n \n\n\n}\n"
- },
- "id" : "base_template",
- "bool loading" : false,
+ "$ xns" : "Gtk",
"* init" : "this.el.add_attribute(_this.base_template_cellrenderer.el , \"markup\", 0 );",
"* pack" : "attach,1,1,1,1",
- "xtype" : "ComboBox",
- "$ xns" : "Gtk",
+ "bool loading" : false,
+ "id" : "base_template",
"items" : [
{
- "id" : "base_template_cellrenderer",
- "xtype" : "CellRendererText",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,true",
- "$ xns" : "Gtk"
+ "id" : "base_template_cellrenderer",
+ "xtype" : "CellRendererText"
},
{
- "id" : "base_template_model",
- "xtype" : "ListStore",
- "* pack" : "set_model",
"$ columns" : "typeof(string)",
- "n_columns" : 1,
"$ xns" : "Gtk",
- "| void loadData" : " () {\n\t_this.base_template.loading = true;\n \n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n el.append(out iter);\n el.set_value(iter, 0, \"roo.builder.html\");\n _this.base_template.el.set_active_iter(iter);\n\tif (_this.project.base_template == \"roo.builder.html\") {\n\t _this.base_template.el.set_active_iter(iter);\n }\n\n el.append(out iter);\n el.set_value(iter, 0, \"bootstrap.builder.html\");\n \n\tprint(\"\\ncur template = %s\\n\", _this.project.base_template);\n \n if (_this.project.base_template == \"bootstrap.builder.html\") {\n\t _this.base_template.el.set_active_iter(iter);\n }\n\t el.append(out iter);\n el.set_value(iter, 0, \"bootstrap4.builder.html\");\n if (_this.project.base_template == \"bootstrap4.builder.html\") {\n\t _this.base_template.el.set_active_iter(iter);\n }\n \n\n\tel.append(out iter);\n el.set_value(iter, 0, \"mailer.builder.html\");\n\n\tif (_this.project.base_template == \"mailer.builder.html\") {\n\t _this.base_template.el.set_active_iter(iter);\n }\n\t_this.base_template.loading = false;\n \n}\n"
+ "* pack" : "set_model",
+ "id" : "base_template_model",
+ "n_columns" : 1,
+ "xtype" : "ListStore",
+ "| void loadData" : [
+ " () {",
+ "\t_this.base_template.loading = true;",
+ " ",
+ " this.el.clear(); ",
+ " Gtk.TreeIter iter;",
+ " var el = this.el;",
+ " ",
+ " /// el.append(out iter);",
+ " ",
+ " ",
+ " el.append(out iter);",
+ " el.set_value(iter, 0, \"roo.builder.html\");",
+ " _this.base_template.el.set_active_iter(iter);",
+ "\tif (_this.project.base_template == \"roo.builder.html\") {",
+ "\t _this.base_template.el.set_active_iter(iter);",
+ " }",
+ "",
+ " el.append(out iter);",
+ " el.set_value(iter, 0, \"bootstrap.builder.html\");",
+ " ",
+ "\tprint(\"\\ncur template = %s\\n\", _this.project.base_template);",
+ " ",
+ " if (_this.project.base_template == \"bootstrap.builder.html\") {",
+ "\t _this.base_template.el.set_active_iter(iter);",
+ " }",
+ "\t el.append(out iter);",
+ " el.set_value(iter, 0, \"bootstrap4.builder.html\");",
+ " if (_this.project.base_template == \"bootstrap4.builder.html\") {",
+ "\t _this.base_template.el.set_active_iter(iter);",
+ " }",
+ " ",
+ "",
+ "\tel.append(out iter);",
+ " el.set_value(iter, 0, \"mailer.builder.html\");",
+ "",
+ "\tif (_this.project.base_template == \"mailer.builder.html\") {",
+ "\t _this.base_template.el.set_active_iter(iter);",
+ " }",
+ "\t_this.base_template.loading = false;",
+ " ",
+ "}",
+ ""
+ ]
}
- ]
+ ],
+ "listeners" : {
+ "changed" : [
+ "() => {",
+ "\tGtk.TreeIter iter;",
+ " ",
+ "\t// this get's called when we are filling in the data... ???",
+ "\tif (this.loading) {",
+ "\t\treturn;",
+ "\t}",
+ "\t",
+ " ",
+ "\tif (this.el.get_active_iter(out iter)) {",
+ "\t\tValue vfname;",
+ "\t\t_this.base_template_model.el.get_value (iter, 0, out vfname);",
+ "\t\t_this.project.base_template = ((string)vfname) ;",
+ "\t\t",
+ "\t\t print(\"\\nSET base template to %s\\n\", _this.project.base_template );",
+ "\t\t// is_bjs = ((string)vfname) == \"bjs\";",
+ "\t}",
+ " ",
+ " ",
+ " // directory is only available for non-bjs ",
+ " ",
+ "",
+ "",
+ "}",
+ ""
+ ]
+ },
+ "xtype" : "ComboBox"
},
{
- "label" : "root URL",
+ "$ xns" : "Gtk",
"* pack" : "attach,0,2,1,1",
- "xtype" : "Label",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "label" : "root URL",
+ "xtype" : "Label"
},
{
- "id" : "rootURL",
+ "$ xns" : "Gtk",
"* pack" : "attach,1,2,1,1",
- "xtype" : "Entry",
- "$ xns" : "Gtk"
+ "id" : "rootURL",
+ "xtype" : "Entry"
},
{
- "label" : "Generate HTML in",
- "xtype" : "Label",
+ "$ xns" : "Gtk",
"* pack" : "attach,0,3,1,1",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "label" : "Generate HTML in",
+ "xtype" : "Label"
},
{
- "id" : "html_gen",
+ "$ xns" : "Gtk",
"* init" : "this.el.add_attribute(_this.html_gen_cellrenderer.el , \"markup\", 1 );",
"* pack" : "attach,1,3,1,1",
- "xtype" : "ComboBox",
- "$ xns" : "Gtk",
+ "id" : "html_gen",
"items" : [
{
- "id" : "html_gen_cellrenderer",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,true",
- "xtype" : "CellRendererText",
- "$ xns" : "Gtk"
+ "id" : "html_gen_cellrenderer",
+ "xtype" : "CellRendererText"
},
{
- "id" : "html_gen_model",
- "* pack" : "set_model",
- "xtype" : "ListStore",
"$ columns" : "typeof(string),typeof(string)",
- "n_columns" : 2,
"$ xns" : "Gtk",
- "| void loadData" : " (string cur) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n \n el.append(out iter);\n\n \n el.set_value(iter, 0, \"\");\n el.set_value(iter, 1, \"Do not Generate\");\n _this.html_gen.el.set_active_iter(iter);\n\n el.append(out iter);\n \n el.set_value(iter, 0, \"bjs\");\n el.set_value(iter, 1, \"same directory as BJS file\");\n\tif (cur == \"bjs\") {\n\t _this.html_gen.el.set_active_iter(iter);\n }\n\n\n\n el.append(out iter);\n \n el.set_value(iter, 0, \"templates\");\n el.set_value(iter, 1, \"in templates subdirectory\");\n\n\tif (cur == \"template\") {\n\t _this.html_gen.el.set_active_iter(iter);\n }\n\n \n}\n"
+ "* pack" : "set_model",
+ "id" : "html_gen_model",
+ "n_columns" : 2,
+ "xtype" : "ListStore",
+ "| void loadData" : [
+ " (string cur) {",
+ " this.el.clear(); ",
+ " Gtk.TreeIter iter;",
+ " var el = this.el;",
+ " ",
+ " ",
+ " el.append(out iter);",
+ "",
+ " ",
+ " el.set_value(iter, 0, \"\");",
+ " el.set_value(iter, 1, \"Do not Generate\");",
+ " _this.html_gen.el.set_active_iter(iter);",
+ "",
+ " el.append(out iter);",
+ " ",
+ " el.set_value(iter, 0, \"bjs\");",
+ " el.set_value(iter, 1, \"same directory as BJS file\");",
+ "\tif (cur == \"bjs\") {",
+ "\t _this.html_gen.el.set_active_iter(iter);",
+ " }",
+ "",
+ "",
+ "",
+ " el.append(out iter);",
+ " ",
+ " el.set_value(iter, 0, \"templates\");",
+ " el.set_value(iter, 1, \"in templates subdirectory\");",
+ "",
+ "\tif (cur == \"template\") {",
+ "\t _this.html_gen.el.set_active_iter(iter);",
+ " }",
+ "",
+ " ",
+ "}",
+ ""
+ ]
}
- ]
+ ],
+ "xtype" : "ComboBox"
}
- ]
+ ],
+ "n_columns" : 2,
+ "n_rows" : 7,
+ "uint row_spacing" : 2,
+ "xtype" : "Grid"
},
{
- "label" : "HTML To insert at end of <HEAD>",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
+ "label" : "HTML To insert at end of <HEAD>",
+ "xtype" : "Label"
},
{
- "* pack" : "pack_start,true,true,0",
- "xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
+ "* pack" : "pack_start,true,true,0",
"items" : [
{
+ "$ xns" : "Gtk",
+ "* init" : [
+ " ",
+ " var description = Pango.FontDescription.from_string(\"monospace\");",
+ " description.set_size(9000);",
+ " this.el.override_font(description);"
+ ],
+ "* pack" : "add",
+ "id" : "view",
"listeners" : {
- "key_release_event" : " ( event) =>{\n if (event.keyval != 115) {\n return false;\n \n }\n if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {\n return false;\n }\n var buf = this.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n _this.project.runhtml = buf.get_text(s,e,true);\n \n \n _this.buttonPressed(\"save\");\n \n return false;\n \n}"
+ "key_release_event" : [
+ " ( event) =>{",
+ " if (event.keyval != 115) {",
+ " return false;",
+ " ",
+ " }",
+ " if ( (event.state & Gdk.ModifierType.CONTROL_MASK ) < 1 ) {",
+ " return false;",
+ " }",
+ " var buf = this.el.get_buffer();",
+ " Gtk.TextIter s;",
+ " Gtk.TextIter e;",
+ " buf.get_start_iter(out s);",
+ " buf.get_end_iter(out e);",
+ " _this.project.runhtml = buf.get_text(s,e,true);",
+ " ",
+ " ",
+ " _this.buttonPressed(\"save\");",
+ " ",
+ " return false;",
+ " ",
+ "}"
+ ]
},
- "id" : "view",
- "* init" : " \n var description = Pango.FontDescription.from_string(\"monospace\");\n description.set_size(9000);\n this.el.override_font(description);",
- "xtype" : "View",
- "* pack" : "add",
- "$ xns" : "GtkSource"
+ "xtype" : "SourceView"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
}
- ]
+ ],
+ "xtype" : "Box"
},
{
- "* pack" : "append_page,_this.label_database.el",
- "xtype" : "Box",
- "gboolean homogeneous" : false,
"$ xns" : "Gtk",
+ "* pack" : "append_page,_this.label_database.el",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "gboolean homogeneous" : false,
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
"label" : "Type (eg. MySQL or PostgreSQL)",
"xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "database_DBTYPE",
"listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ "key_press_event" : [
+ "(ev) => {",
+ "",
+ " if (ev.keyval == Gdk.Key.Tab) {",
+ " _this.database_DBNAME.el.grab_focus();",
+ " return true;",
+ " }",
+ "",
+ "",
+ " return false;",
+ "}",
+ ""
+ ]
},
- "id" : "database_DBTYPE",
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Entry",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
"label" : "Name",
"xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "database_DBNAME",
"listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBUSERNAME.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ "key_press_event" : [
+ "(ev) => {",
+ "",
+ " if (ev.keyval == Gdk.Key.Tab) {",
+ " _this.database_DBUSERNAME.el.grab_focus();",
+ " return true;",
+ " }",
+ "",
+ "",
+ " return false;",
+ "}",
+ ""
+ ]
},
- "id" : "database_DBNAME",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
"label" : "Username",
"xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "database_DBUSERNAME",
"listeners" : {
- "key_press_event" : "(ev) => {\n\n if (ev.keyval == Gdk.Key.Tab) {\n _this.database_DBPASSWORD.el.grab_focus();\n return true;\n }\n\n\n return false;\n}\n"
+ "key_press_event" : [
+ "(ev) => {",
+ "",
+ " if (ev.keyval == Gdk.Key.Tab) {",
+ " _this.database_DBPASSWORD.el.grab_focus();",
+ " return true;",
+ " }",
+ "",
+ "",
+ " return false;",
+ "}",
+ ""
+ ]
},
- "id" : "database_DBUSERNAME",
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Entry",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
"label" : "Password",
"xalign" : 0,
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
- "$ xns" : "Gtk"
+ "xtype" : "Label"
},
{
- "id" : "database_DBPASSWORD",
- "xtype" : "Entry",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
+ "id" : "database_DBPASSWORD",
+ "xtype" : "Entry"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
"listeners" : {
- "clicked" : "() => {\n\n\n _this.database_ERROR.el.label = \"\";\n Gda.Connection cnc;\n try {\n // assumes localhost...\n cnc = Gda.Connection.open_from_string (\n\t\t\t_this.database_DBTYPE.el.get_text(),\n\t\t\t\"DB_NAME=\" + _this.database_DBNAME.el.get_text(), \n\t\t\t\"USERNAME=\" + _this.database_DBUSERNAME.el.get_text() + \n\t\t\t\";PASSWORD=\" + _this.database_DBPASSWORD.el.get_text(),\n\t\t\tGda.ConnectionOptions.NONE\n\t\t);\n //} catch (Gda.ConnectionError ce) { \n // _this.database_ERROR.el.label = ce.message; \n } catch(Gda.ConnectionError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n } catch(Gda.ConfigError ue) {\n _this.database_ERROR.el.label = ue.message;\n return;\n }\n _this.database_ERROR.el.label = \"Connection Succeeded\";\n cnc.close();\n}"
+ "clicked" : [
+ "() => {",
+ "",
+ "",
+ " _this.database_ERROR.el.label = \"\";",
+ " Gda.Connection cnc;",
+ " try {",
+ " // assumes localhost...",
+ " cnc = Gda.Connection.open_from_string (",
+ "\t\t\t_this.database_DBTYPE.el.get_text(),",
+ "\t\t\t\"DB_NAME=\" + _this.database_DBNAME.el.get_text(), ",
+ "\t\t\t\"USERNAME=\" + _this.database_DBUSERNAME.el.get_text() + ",
+ "\t\t\t\";PASSWORD=\" + _this.database_DBPASSWORD.el.get_text(),",
+ "\t\t\tGda.ConnectionOptions.NONE",
+ "\t\t);",
+ " //} catch (Gda.ConnectionError ce) { ",
+ " // _this.database_ERROR.el.label = ce.message; ",
+ " } catch(Gda.ConnectionError ue) {",
+ " _this.database_ERROR.el.label = ue.message;",
+ " return;",
+ " } catch(Gda.ConfigError ue) {",
+ " _this.database_ERROR.el.label = ue.message;",
+ " return;",
+ " }",
+ " _this.database_ERROR.el.label = \"Connection Succeeded\";",
+ " cnc.close();",
+ "}"
+ ]
},
- "* pack" : "pack_start,false,false,0",
- "xtype" : "Button",
- "$ xns" : "Gtk",
- "utf8 label" : "Check Connection"
+ "utf8 label" : "Check Connection",
+ "xtype" : "Button"
},
{
- "label" : " ",
- "id" : "database_ERROR",
- "xalign" : 0,
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false,false,0",
- "xtype" : "Label",
"gint margin" : 3,
- "$ xns" : "Gtk"
+ "id" : "database_ERROR",
+ "label" : " ",
+ "xalign" : 0,
+ "xtype" : "Label"
}
- ]
+ ],
+ "xtype" : "Box"
}
- ]
+ ],
+ "xtype" : "Notebook"
},
{
- "* pack" : "pack_end,false,false,0",
- "xtype" : "Box",
- "gboolean expand" : false,
+ "$ Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"$ xns" : "Gtk",
- "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
- "$ homogeneous" : true,
- "gboolean vexpand" : false,
+ "int margin_bottom" : 4,
+ "int margin_end" : 4,
+ "int margin_start" : 4,
+ "int margin_top" : 4,
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "button_press_event" : "() => {\n _this.save();\n \n _this.buttonPressed(\"apply\");\n return false;\n}"
+ "clicked" : [
+ "() => { ",
+ "",
+ " _this.done = true;",
+ " _this.el.hide(); ",
+ "}"
+ ]
},
- "label" : "Apply",
- "* pack" : "add",
- "xtype" : "Button",
- "$ xns" : "Gtk"
+ "string label" : "Cancel",
+ "xtype" : "Button"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "button_press_event" : "() => {\n _this.save();\n \n _this.buttonPressed(\"save\");\n return false;\n}"
+ "clicked" : [
+ "( ) => { ",
+ "",
+ " _this.buttonPressed(\"apply\");",
+ " ",
+ " ",
+ "}"
+ ]
},
- "label" : "Save",
+ "string label" : "Apply / Keep editing",
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Gtk",
"* pack" : "add",
- "xtype" : "Button",
- "$ xns" : "Gtk"
+ "listeners" : {
+ "clicked" : [
+ "( ) => { ",
+ "",
+ " ",
+ " _this.buttonPressed(\"save\");",
+ " ",
+ "\t// what about .js ?",
+ " _this.done = true;",
+ "\t_this.el.hide();",
+ "",
+ "// hopefull this will work with bjs files..",
+ "\t",
+ " ",
+ " ",
+ "}"
+ ]
+ },
+ "string label" : "Save",
+ "xtype" : "Button"
}
- ]
+ ],
+ "xtype" : "ButtonBox"
}
- ]
+ ],
+ "xtype" : "Box"
}
+ ],
+ "uint border_width" : 0,
+ "xtype" : "Popover",
+ "| void save" : [
+ "() {",
+ " var buf = _this.view.el.get_buffer();",
+ " Gtk.TextIter s;",
+ " Gtk.TextIter e;",
+ " buf.get_start_iter(out s);",
+ " buf.get_end_iter(out e);",
+ "\t_this.project.runhtml = buf.get_text(s,e,true);",
+ " ",
+ " _this.project.rootURL = _this.rootURL.el.get_text();",
+ " ",
+ " ",
+ " Gtk.TreeIter iter;",
+ " Value html_gen_val;",
+ " _this.html_gen.el.get_active_iter(out iter);",
+ " _this.html_gen_model.el.get_value (iter, 0, out html_gen_val);",
+ " ",
+ " _this.project.html_gen = (string)html_gen_val;",
+ " ",
+ " // set by event changed...",
+ " //_this.project.base_template = _this.base_template.el.get_text(); ",
+ " ",
+ " var js = _this.project.json_project_data;",
+ " js.set_string_member(\"DBTYPE\", _this.database_DBTYPE.el.get_text());",
+ " js.set_string_member(\"DBNAME\", _this.database_DBNAME.el.get_text());",
+ " js.set_string_member(\"DBUSERNAME\", _this.database_DBUSERNAME.el.get_text());",
+ " js.set_string_member(\"DBPASSWORD\", _this.database_DBPASSWORD.el.get_text());",
+ "// _this.project.set_string_member(\"DBHOST\", _this.DBTYPE.el.get_text()); ",
+ " ",
+ " // need to re-init the database ",
+ " ",
+ " _this.project.initRooDatabase();",
+ " ",
+ " ",
+ "}"
+ ],
+ "| void show" : [
+ " (Gtk.Widget btn, Project.Project project) {",
+ " _this.done = false;",
+ " ",
+ " _this.project = project;",
+ " _this.path.el.label = project.firstPath();",
+ " // get the active project.",
+ " var lm = Gtk.SourceLanguageManager.get_default();",
+ " ",
+ " ((Gtk.SourceBuffer)(_this.view.el.get_buffer())) .set_language(",
+ " lm.get_language(\"html\")",
+ " );",
+ " ",
+ " //print (project.fn);",
+ " //project.runhtml = project.runhtml || '';",
+ " _this.view.el.get_buffer().set_text(project.runhtml);",
+ " ",
+ " ",
+ " ",
+ " _this.rootURL.el.set_text( _this.project.rootURL );",
+ " ",
+ " _this.html_gen_model.loadData(_this.project.html_gen);",
+ "",
+ " _this.base_template_model.loadData();",
+ " ",
+ " var js = _this.project;",
+ " _this.database_DBTYPE.el.set_text( js.get_string_member(\"DBTYPE\") );",
+ " _this.database_DBNAME.el.set_text( js.get_string_member(\"DBNAME\") );",
+ " _this.database_DBUSERNAME.el.set_text( js.get_string_member(\"DBUSERNAME\") );",
+ " _this.database_DBPASSWORD.el.set_text( js.get_string_member(\"DBPASSWORD\") );",
+ " ",
+ " \t//console.log('show all');",
+ "\tthis.el.set_modal(true);",
+ "\tthis.el.set_relative_to(btn);",
+ "",
+ "\tthis.el.set_position(Gtk.PositionType.RIGHT);",
+ "",
+ "\t// window + header?",
+ "\t print(\"SHOWALL - POPIP\\n\");",
+ "\tthis.el.show_all();",
+ "\tthis.el.set_size_request(800,600);",
+ "\tthis.view.el.grab_focus();",
+ "\t",
+ " ",
+ " //this.el.show_all();",
+ "}",
+ ""
]
}
- ]
+ ],
+ "modOrder" : "",
+ "name" : "RooProjectSettings",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/RooProjectSettings.bjs",
+ "permname" : "",
+ "title" : ""
}
\ No newline at end of file
// my vars (def)
public signal void buttonPressed (string btn);
public Project.Project project;
+ public bool done;
// ctor
public Xcls_RooProjectSettings()
this.el = new Gtk.Popover( null );
// my vars (dec)
+ this.done = false;
// set gobject values
this.el.border_width = 0;
// user defined functions
public void show (Gtk.Widget btn, Project.Project project) {
+ _this.done = false;
+
_this.project = project;
_this.path.el.label = project.firstPath();
// get the active project.
// window + header?
print("SHOWALL - POPIP\n");
this.el.show_all();
- this.el.set_size_request(800,500);
+ this.el.set_size_request(800,600);
this.view.el.grab_focus();
var child_0 = new Xcls_Notebook3( _this );
child_0.ref();
this.el.pack_start ( child_0.el , true,true,0 );
- var child_1 = new Xcls_Box34( _this );
+ var child_1 = new Xcls_ButtonBox34( _this );
child_1.ref();
- this.el.pack_end ( child_1.el , false,false,0 );
+ this.el.add( child_1.el );
}
// user defined functions
{
_this = _owner;
_this.base_template_model = this;
- this.el = new Gtk.ListStore( 1, typeof(string) );
+ this.el = new Gtk.ListStore.newv( { typeof(string) } );
// my vars (dec)
{
_this = _owner;
_this.html_gen_model = this;
- this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
+ this.el = new Gtk.ListStore.newv( { typeof(string),typeof(string) } );
// my vars (dec)
// my vars (dec)
+ // set gobject values
+
// init method
var description = Pango.FontDescription.from_string("monospace");
- public class Xcls_Box34 : Object
+ public class Xcls_ButtonBox34 : Object
{
- public Gtk.Box el;
+ public Gtk.ButtonBox el;
private Xcls_RooProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Box34(Xcls_RooProjectSettings _owner )
+ public Xcls_ButtonBox34(Xcls_RooProjectSettings _owner )
{
_this = _owner;
- this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+ this.el = new Gtk.ButtonBox( Gtk.Orientation.HORIZONTAL );
// my vars (dec)
// set gobject values
- this.el.homogeneous = true;
- this.el.expand = false;
- this.el.vexpand = false;
+ this.el.margin_end = 4;
+ this.el.margin_start = 4;
+ this.el.margin_bottom = 4;
+ this.el.margin_top = 4;
var child_0 = new Xcls_Button35( _this );
child_0.ref();
this.el.add ( child_0.el );
var child_1 = new Xcls_Button36( _this );
child_1.ref();
this.el.add ( child_1.el );
+ var child_2 = new Xcls_Button37( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
}
// user defined functions
// my vars (dec)
// set gobject values
- this.el.label = "Apply";
+ this.el.label = "Cancel";
//listeners
- this.el.button_press_event.connect( () => {
- _this.save();
-
- _this.buttonPressed("apply");
- return false;
+ this.el.clicked.connect( () => {
+
+ _this.done = true;
+ _this.el.hide();
});
}
// my vars (dec)
+ // set gobject values
+ this.el.label = "Apply / Keep editing";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ _this.buttonPressed("apply");
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Button37 : Object
+ {
+ public Gtk.Button el;
+ private Xcls_RooProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button37(Xcls_RooProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
// set gobject values
this.el.label = "Save";
//listeners
- this.el.button_press_event.connect( () => {
- _this.save();
-
- _this.buttonPressed("save");
- return false;
+ this.el.clicked.connect( ( ) => {
+
+
+ _this.buttonPressed("save");
+
+ // what about .js ?
+ _this.done = true;
+ _this.el.hide();
+
+ // hopefull this will work with bjs files..
+
+
+
});
}
{
- "name" : "ValaProjectSettingsPopover",
- "parent" : "",
- "title" : "",
- "path" : "/home/alan/gitlive/roobuilder/src/Builder4/ValaProjectSettingsPopover.bjs",
- "permname" : "",
- "modOrder" : "",
"build_module" : "builder",
"items" : [
{
- "listeners" : {
- "hide" : "() => {\n\t_this.project.writeConfig();\n\n}"
- },
- "id" : "ValaProjectSettingsPopover",
- "Xcls_MainWindow window" : "null",
- "| void show" : "(Gtk.Widget btn, Project.Gtk project) {\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\tthis.el.set_modal(true);\n\tthis.el.set_relative_to(btn);\n\n\tthis.el.set_position(Gtk.PositionType.RIGHT);\n\n\t// window + header?\n\t// print(\"SHOWALL - POPIP\\n\");\n\tthis.el.set_size_request(800,500);\n\tthis.el.show_all();\n\t//this.view.el.grab_focus();\n\n}\n",
- "Project.Gtk project" : "null",
- "xtype" : "Popover",
- "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
- "| void save" : "() {\n this.project.writeConfig(); \n}",
"$ xns" : "Gtk",
+ "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
+ "Project.Gtk project" : "null",
+ "Xcls_MainWindow window" : "null",
+ "bool done" : false,
"bool modal" : true,
- "uint border_width" : 0,
"items" : [
{
- "bool hexpand" : true,
- "* pack" : "add",
- "xtype" : "Box",
"$ xns" : "Gtk",
+ "* pack" : "add",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "bool hexpand" : true,
+ "bool vexpand" : true,
"items" : [
{
- "* pack" : "pack_start,true,true,0",
- "xtype" : "Notebook",
"$ xns" : "Gtk",
+ "* pack" : "add",
+ "string title" : "Change Vala Project Compile settings",
+ "xtype" : "HeaderBar"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,true,true,0",
"items" : [
{
- "id" : "label_global",
- "xtype" : "Label",
- "* pack" : false,
"$ xns" : "Gtk",
- "utf8 label" : "Global"
+ "* pack" : false,
+ "id" : "label_global",
+ "utf8 label" : "Global",
+ "xtype" : "Label"
},
{
- "id" : "label_targets",
- "* pack" : false,
- "xtype" : "Label",
"$ xns" : "Gtk",
- "utf8 label" : "Targets"
+ "* pack" : false,
+ "id" : "label_targets",
+ "utf8 label" : "Targets",
+ "xtype" : "Label"
},
{
- "xtype" : "Box",
- "* pack" : "append_page,_this.label_global.el",
- "gboolean homogeneous" : false,
"$ xns" : "Gtk",
+ "* pack" : "append_page,_this.label_global.el",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "gboolean homogeneous" : false,
"items" : [
{
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
"$ xns" : "Gtk",
- "utf8 label" : "compile flags"
+ "* pack" : "pack_start,false,false,0",
+ "utf8 label" : "compile flags",
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "compile_flags",
"listeners" : {
- "changed" : "() => {\n \n _this.project.compilegroups.get(\"_default_\").compile_flags = this.el.text;\n _this.project.writeConfig();\n// _this.project.save();\n\n}"
+ "changed" : [
+ "() => {",
+ " ",
+ " _this.project.compilegroups.get(\"_default_\").compile_flags = this.el.text;",
+ " _this.project.writeConfig();",
+ "// _this.project.save();",
+ "",
+ "}"
+ ]
},
- "id" : "compile_flags",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk",
- "utf8 placeholder_text" : "eg. -g --valasrc $BASEDIR "
+ "utf8 placeholder_text" : "eg. -g --valasrc $BASEDIR ",
+ "xtype" : "Entry"
},
{
- "* pack" : "pack_start,true,true,0",
- "xtype" : "Paned",
"$ xns" : "Gtk",
- "int position" : 300,
+ "* pack" : "pack_start,true,true,0",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "int position" : 300,
"items" : [
{
- "bool hexpand" : true,
- "xtype" : "ScrolledWindow",
- "* pack" : "add",
"$ xns" : "Gtk",
+ "* pack" : "add",
+ "bool hexpand" : true,
"items" : [
{
- "gboolean headers_visible" : true,
- "* pack" : "add",
- "xtype" : "TreeView",
- "string id" : "default_packages_tree",
"$ xns" : "Gtk",
+ "* pack" : "add",
+ "gboolean headers_visible" : true,
"items" : [
{
- "id" : "default_packages_tree_store",
+ "$ columns" : [
+ " typeof(string), // 0 key type",
+ " typeof(bool)"
+ ],
+ "$ n_columns" : 2,
+ "$ xns" : "Gtk",
"* pack" : "set_model",
+ "id" : "default_packages_tree_store",
"xtype" : "ListStore",
- "$ n_columns" : 2,
- "| 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) _this.project.palete;\n var pkgs = pal.packages(_this.project);\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",
- "$ columns" : " typeof(string), // 0 key type\n typeof(bool)",
- "$ xns" : "Gtk"
+ "| void load" : [
+ "() {",
+ " ",
+ " var def = _this.project.compilegroups.get(\"_default_\");",
+ " var items = def.packages;",
+ " ",
+ " this.el.clear();",
+ " var pal = (Palete.Gtk) _this.project.palete;",
+ " var pkgs = pal.packages(_this.project);",
+ " print(\"ValaProjectSettings:packages load %d\\n\", pkgs.size);",
+ "",
+ " Gtk.TreeIter citer;",
+ "",
+ " for(var i =0 ; i < pkgs.size; i++) {",
+ " this.el.append(out citer); ",
+ " ",
+ " this.el.set_value(citer, 0, pkgs.get(i) ); // title ",
+ " this.el.set_value(citer, 1, items.contains(pkgs.get(i)) );",
+ " }",
+ " this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
+ " ",
+ "}",
+ ""
+ ]
},
{
- "utf8 title" : "package name",
- "* init" : " \n this.el.add_attribute(_this.packages_render.el , \"text\", 0 );\n ",
+ "$ xns" : "Gtk",
+ "* init" : [
+ " ",
+ " this.el.add_attribute(_this.packages_render.el , \"text\", 0 );",
+ " "
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
- "gboolean resizable" : true,
"gboolean expand" : true,
- "$ xns" : "Gtk",
+ "gboolean resizable" : true,
"items" : [
{
- "id" : "packages_render",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false",
- "xtype" : "CellRendererText",
- "$ xns" : "Gtk"
+ "id" : "packages_render",
+ "xtype" : "CellRendererText"
}
- ]
+ ],
+ "utf8 title" : "package name",
+ "xtype" : "TreeViewColumn"
},
{
- "utf8 title" : "use",
- "* init" : "{\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n }",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );",
+ " }"
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"gboolean resizable" : false,
- "$ xns" : "Gtk",
"gint fixed_width" : 50,
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false",
+ "gboolean activatable" : true,
+ "id" : "packages_render_use",
"listeners" : {
- "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(fn);\n } else {\n items.add(fn);\n }\n \n}"
+ "toggled" : [
+ "( path_string) => { ",
+ " var m = _this.default_packages_tree_store.el;",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);",
+ " m.get_iter (out iter, path);",
+ " GLib.Value val;",
+ " m.get_value(iter, 1, out val);",
+ " m.set_value(iter, 1, ((bool) val) ? false :true); ",
+ " GLib.Value fval; ",
+ " m.get_value(iter, 0, out fval);",
+ " var fn = (string)fval;",
+ " ",
+ " var def = _this.project.compilegroups.get(\"_default_\");",
+ " var items = def.packages;",
+ " if ((bool)val) {",
+ " // renive",
+ " items.remove(fn);",
+ " } else {",
+ " items.add(fn);",
+ " }",
+ " ",
+ "}"
+ ]
},
- "id" : "packages_render_use",
- "xtype" : "CellRendererToggle",
- "* pack" : "pack_start,false",
- "$ xns" : "Gtk",
- "gboolean activatable" : true
+ "xtype" : "CellRendererToggle"
}
- ]
+ ],
+ "utf8 title" : "use",
+ "xtype" : "TreeViewColumn"
}
- ]
+ ],
+ "string id" : "default_packages_tree",
+ "xtype" : "TreeView"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
},
{
- "bool hexpand" : true,
- "xtype" : "ScrolledWindow",
- "* pack" : "add2",
"$ xns" : "Gtk",
+ "* pack" : "add2",
+ "bool hexpand" : true,
"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.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}"
- },
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"gboolean headers_visible" : true,
"id" : "default_directory_tree",
- "* pack" : "add",
- "xtype" : "TreeView",
- "$ xns" : "Gtk",
"items" : [
{
- "id" : "default_directory_tree_store",
+ "$ columns" : [
+ " typeof(string)",
+ " "
+ ],
+ "$ n_columns" : 1,
+ "$ xns" : "Gtk",
"* pack" : "set_model",
+ "id" : "default_directory_tree_store",
"xtype" : "ListStore",
- "$ n_columns" : 1,
- "| 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",
- "$ columns" : " typeof(string)\n ",
- "$ xns" : "Gtk"
+ "| void load" : [
+ "() {",
+ " ",
+ " this.el.clear();",
+ " ",
+ " ",
+ " var def = _this.project.compilegroups.get(\"_default_\");",
+ " var items = def.sources;",
+ " ",
+ " ",
+ " Gtk.TreeIter citer;",
+ "",
+ " for(var i =0 ; i < items.size; i++) {",
+ " this.el.append(out citer); ",
+ " ",
+ " this.el.set_value(citer, 0, items.get(i) ); // title ",
+ " //this.el.set_value(citer, 1, items.get(i) );",
+ " }",
+ " this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
+ " ",
+ "}",
+ ""
+ ]
},
{
- "utf8 title" : "Available Directories (right click to add)",
- "* init" : "\n this.el.add_attribute(_this.directory_render.el , \"text\", 0 );\n ",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "",
+ " this.el.add_attribute(_this.directory_render.el , \"text\", 0 );",
+ " "
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"gboolean resizable" : true,
- "$ xns" : "Gtk",
"items" : [
{
- "id" : "directory_render",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false",
- "xtype" : "CellRendererText",
- "$ xns" : "Gtk"
+ "id" : "directory_render",
+ "xtype" : "CellRendererText"
}
- ]
+ ],
+ "utf8 title" : "Available Directories (right click to add)",
+ "xtype" : "TreeViewColumn"
}
- ]
+ ],
+ "listeners" : {
+ "button_press_event" : [
+ " ( ev) => {",
+ " //console.log(\"button press?\");",
+ " ",
+ " ",
+ " if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {",
+ " //print(\"click\" + ev.type);",
+ " return false;",
+ " }",
+ " //Gtk.TreePath res;",
+ " //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {",
+ " // return true;",
+ " //}",
+ " ",
+ " // this.el.get_selection().select_path(res);",
+ " ",
+ " //if (!this.get('/LeftTreeMenu').el) { ",
+ " // this.get('/LeftTreeMenu').init(); ",
+ " // }",
+ " ",
+ " _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());",
+ " _this.default_directory_menu.el.show_all();",
+ " _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);",
+ " // print(\"click:\" + res.path.to_string());",
+ " return true;",
+ "}"
+ ]
+ },
+ "xtype" : "TreeView"
},
{
- "id" : "default_directory_menu",
- "xtype" : "Menu",
"$ xns" : "Gtk",
+ "id" : "default_directory_menu",
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "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}"
+ "activate" : [
+ "() => {",
+ " ",
+ " var chooser = new Gtk.FileChooserDialog (",
+ "\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,",
+ "\t\"_Cancel\",",
+ "\tGtk.ResponseType.CANCEL,",
+ "\t\"_Add\",",
+ "\tGtk.ResponseType.ACCEPT);",
+ " if (chooser.run () != Gtk.ResponseType.ACCEPT) {",
+ " chooser.close ();",
+ " return;",
+ " }",
+ " chooser.close ();",
+ " // add the directory..",
+ " var fn = _this.project.relPath(chooser.get_filename());",
+ " _this.project.compilegroups.get(\"_default_\").sources.add(fn);",
+ " _this.default_directory_tree_store.load();",
+ "}"
+ ]
},
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Add Directory"
+ "utf8 label" : "Add Directory",
+ "xtype" : "MenuItem"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "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}"
+ "activate" : [
+ "() => {",
+ " ",
+ " var chooser = new Gtk.FileChooserDialog (",
+ "\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.OPEN ,",
+ "\t\"_Cancel\",",
+ "\tGtk.ResponseType.CANCEL,",
+ "\t\"_Add\",",
+ "\tGtk.ResponseType.ACCEPT);",
+ " if (chooser.run () != Gtk.ResponseType.ACCEPT) {",
+ " chooser.close ();",
+ " return;",
+ " }",
+ " chooser.close ();",
+ " // add the directory..",
+ " var fn = _this.project.relPath(chooser.get_filename());",
+ " _this.project.compilegroups.get(\"_default_\").sources.add(fn);",
+ " _this.default_directory_tree_store.load();",
+ "}"
+ ]
},
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Add File"
+ "utf8 label" : "Add File",
+ "xtype" : "MenuItem"
},
{
+ "$ xns" : "Gtk",
"* pack" : "add",
- "xtype" : "SeparatorMenuItem",
- "$ xns" : "Gtk"
+ "xtype" : "SeparatorMenuItem"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "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}"
+ "activate" : [
+ "() => {",
+ " ",
+ " //",
+ " Gtk.TreeModel mod;",
+ " Gtk.TreeIter iter;",
+ " if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {",
+ " print(\"nothing selected\\n\");",
+ " return;",
+ " }",
+ "",
+ " ",
+ " // add the directory..",
+ " ",
+ " ",
+ " GLib.Value val;",
+ " mod.get_value(iter,0, out val);",
+ " var fn = (string) val;",
+ " ",
+ " print(\"remove: %s\\n\", fn);",
+ " if (!_this.project.compilegroups.get(\"_default_\").sources.remove(fn)) {",
+ " print(\"remove failed\");",
+ " }",
+ " _this.default_directory_tree_store.load();",
+ "}"
+ ]
},
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Remove File/Directory"
+ "utf8 label" : "Remove File/Directory",
+ "xtype" : "MenuItem"
}
- ]
+ ],
+ "xtype" : "Menu"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
}
- ]
+ ],
+ "xtype" : "Paned"
}
- ]
+ ],
+ "xtype" : "Box"
},
{
- "gint position" : 300,
- "xtype" : "Paned",
- "* pack" : "append_page,_this.label_targets.el",
"$ xns" : "Gtk",
+ "* pack" : "append_page,_this.label_targets.el",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "gint position" : 300,
"items" : [
{
- "* init" : "{ \nthis.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n\n}\n",
- "xtype" : "ScrolledWindow",
- "* pack" : "add1",
"$ xns" : "Gtk",
+ "* init" : [
+ "{ ",
+ "this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
+ "",
+ "}",
+ ""
+ ],
+ "* pack" : "add1",
"items" : [
{
- "id" : "targets_tree_menu",
- "* pack" : "add",
- "xtype" : "Menu",
"$ xns" : "Gtk",
+ "* pack" : "add",
+ "id" : "targets_tree_menu",
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "activate" : "() => {\n \n if (_this.project.compilegroups.has_key(\"NEW GROUP\")) {\n return;\n }\n \n // add the directory..\n \n _this.project.compilegroups.set(\"NEW GROUP\", new Project.GtkValaSettings(\"NEW GROUP\"));\n _this.targets_tree_store.load();\n}"
+ "activate" : [
+ "() => {",
+ " ",
+ " if (_this.project.compilegroups.has_key(\"NEW GROUP\")) {",
+ " return;",
+ " }",
+ " ",
+ " // add the directory..",
+ " ",
+ " _this.project.compilegroups.set(\"NEW GROUP\", new Project.GtkValaSettings(\"NEW GROUP\"));",
+ " _this.targets_tree_store.load();",
+ "}"
+ ]
},
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Add Compile Target"
+ "utf8 label" : "Add Compile Target",
+ "xtype" : "MenuItem"
},
{
+ "$ xns" : "Gtk",
"* pack" : "add",
- "xtype" : "SeparatorMenuItem",
- "$ xns" : "Gtk"
+ "xtype" : "SeparatorMenuItem"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "add",
"listeners" : {
- "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.targets_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.unset(fn)) {\n print(\"remove failed\");\n }\n _this.targets_tree_store.load();\n}"
+ "activate" : [
+ "() => {",
+ " ",
+ " //",
+ " Gtk.TreeModel mod;",
+ " Gtk.TreeIter iter;",
+ " if (!_this.targets_tree.el.get_selection().get_selected(out mod, out iter)) {",
+ " print(\"nothing selected\\n\");",
+ " return;",
+ " }",
+ "",
+ " ",
+ " // add the directory..",
+ " ",
+ " ",
+ " GLib.Value val;",
+ " mod.get_value(iter,0, out val);",
+ " var fn = (string) val;",
+ " ",
+ " print(\"remove: %s\\n\", fn);",
+ " if (!_this.project.compilegroups.unset(fn)) {",
+ " print(\"remove failed\");",
+ " }",
+ " _this.targets_tree_store.load();",
+ "}"
+ ]
},
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Remove Target"
+ "utf8 label" : "Remove Target",
+ "xtype" : "MenuItem"
}
- ]
+ ],
+ "xtype" : "Menu"
},
{
- "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\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" : "",
- "* pack" : "add",
- "xtype" : "TreeView",
"$ xns" : "Gtk",
+ "* pack" : "add",
+ "id" : "targets_tree",
"items" : [
{
+ "$ columns" : [
+ " typeof(string), // 0 key type",
+ " typeof(string) // ??",
+ " "
+ ],
+ "$ n_columns" : 2,
+ "$ xns" : "Gtk",
+ "* pack" : "set_model",
"id" : "targets_tree_store",
"xtype" : "ListStore",
- "* pack" : "set_model",
- "$ n_columns" : 2,
- "| void load" : "() {\n \n this.el.clear();\n \n \n var cg = _this.project.compilegroups;\n \n _this.targets_tree.cursor = \"\";\n Gtk.TreeIter citer;\n var iter = cg.map_iterator();\n while(iter.next()) {\n var key = iter.get_key();\n if (key == \"_default_\") {\n continue;\n }\n \n this.el.append(out citer); \n \n this.el.set_value(citer, 0, key ); // title \n //this.el.set_value(citer, 1, items.get(i) );\n };\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n _this.set_vbox.el.hide();\n}\n",
- "$ columns" : " typeof(string), // 0 key type\n typeof(string) // ??\n ",
- "$ xns" : "Gtk"
+ "| void load" : [
+ "() {",
+ " ",
+ " this.el.clear();",
+ " ",
+ " ",
+ " var cg = _this.project.compilegroups;",
+ " ",
+ " _this.targets_tree.cursor = \"\";",
+ " Gtk.TreeIter citer;",
+ " var iter = cg.map_iterator();",
+ " while(iter.next()) {",
+ " var key = iter.get_key();",
+ " if (key == \"_default_\") {",
+ " continue;",
+ " }",
+ " ",
+ " this.el.append(out citer); ",
+ " ",
+ " this.el.set_value(citer, 0, key ); // title ",
+ " //this.el.set_value(citer, 1, items.get(i) );",
+ " };",
+ " this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
+ " _this.set_vbox.el.hide();",
+ "}",
+ ""
+ ]
},
{
- "utf8 title" : "name",
- "* init" : " {\n this.el.add_attribute(_this.targets_render.el , \"text\", 0 );\n }",
+ "$ xns" : "Gtk",
+ "* init" : [
+ " {",
+ " this.el.add_attribute(_this.targets_render.el , \"text\", 0 );",
+ " }"
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"gboolean resizable" : true,
- "$ xns" : "Gtk",
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false",
+ "gboolean editable" : true,
+ "id" : "targets_render",
"listeners" : {
- "edited" : " (path, newtext) => {\n \n Gtk.TreeIter iter;\n _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n GLib.Value gval;\n _this.targets_tree_store.el.get_value(iter,0, out gval);\n var oldval = (string)gval;\n if (oldval == newtext) {\n return;\n }\n var cg = _this.project.compilegroups.get(oldval);\n cg.name = newtext;\n _this.project.compilegroups.unset(oldval);\n _this.project.compilegroups.set(newtext, cg);\n _this.targets_tree_store.load();\n }"
+ "edited" : [
+ " (path, newtext) => {",
+ " ",
+ " Gtk.TreeIter iter;",
+ " _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));",
+ " GLib.Value gval;",
+ " _this.targets_tree_store.el.get_value(iter,0, out gval);",
+ " var oldval = (string)gval;",
+ " if (oldval == newtext) {",
+ " return;",
+ " }",
+ " var cg = _this.project.compilegroups.get(oldval);",
+ " cg.name = newtext;",
+ " _this.project.compilegroups.unset(oldval);",
+ " _this.project.compilegroups.set(newtext, cg);",
+ " _this.targets_tree_store.load();",
+ " }"
+ ]
},
- "id" : "targets_render",
- "xtype" : "CellRendererText",
- "* pack" : "pack_start,false",
- "$ xns" : "Gtk",
- "gboolean editable" : true
+ "xtype" : "CellRendererText"
}
- ]
+ ],
+ "utf8 title" : "name",
+ "xtype" : "TreeViewColumn"
}
- ]
+ ],
+ "listeners" : {
+ "button_press_event" : [
+ " ( ev) => {",
+ " //console.log(\"button press?\");",
+ " ",
+ " ",
+ " if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {",
+ " //print(\"click\" + ev.type);",
+ " return false;",
+ " }",
+ " //Gtk.TreePath res;",
+ " //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {",
+ " // return true;",
+ " //}",
+ " ",
+ " // this.el.get_selection().select_path(res);",
+ " ",
+ " //if (!this.get('/LeftTreeMenu').el) { ",
+ " // this.get('/LeftTreeMenu').init(); ",
+ " // }",
+ " ",
+ " _this.targets_tree_menu.el.set_screen(Gdk.Screen.get_default());",
+ " _this.targets_tree_menu.el.show_all();",
+ " _this.targets_tree_menu.el.popup(null, null, null, 3, ev.time);",
+ " // print(\"click:\" + res.path.to_string());",
+ " return true;",
+ "}"
+ ],
+ "cursor_changed" : [
+ " ( ) => {",
+ "",
+ " if (this.cursor != \"\") {",
+ " // save the values..",
+ " }",
+ " ",
+ " // load the new values.",
+ " ",
+ "",
+ " Gtk.TreeModel mod;",
+ " Gtk.TreeIter iter;",
+ " if (!this.el.get_selection().get_selected(out mod, out iter)) {",
+ " print(\"nothing selected\\n\");",
+ " // should disable the right hand side..",
+ " _this.set_vbox.el.hide();",
+ " return;",
+ " }",
+ " _this.set_vbox.el.show();",
+ " ",
+ " // add the directory..",
+ " ",
+ " ",
+ " GLib.Value val;",
+ " mod.get_value(iter,0, out val);",
+ " var fn = (string) val;",
+ " ",
+ " this.cursor = fn;",
+ " var cg = _this.project.compilegroups.get(fn);",
+ " ",
+ " _this.build_pack_target.el.set_text(cg.target_bin);",
+ " _this.build_compile_flags.el.set_text(cg.compile_flags);",
+ "\t\t_this.build_execute_args.el.set_text(cg.execute_args);",
+ " ",
+ " _this.set_vbox.cgroup = cg;",
+ " _this.files_tree_store.update();",
+ " ",
+ " // load the srouces",
+ "",
+ "",
+ " }"
+ ]
+ },
+ "xtype" : "TreeView"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
},
{
- "id" : "set_vbox",
- "xtype" : "Box",
- "* pack" : "add2",
- "gboolean homogeneous" : false,
- "$ xns" : "Gtk",
"# Project.GtkValaSettings cgroup" : "null",
+ "$ xns" : "Gtk",
+ "* pack" : "add2",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "gboolean homogeneous" : false,
+ "id" : "set_vbox",
"items" : [
{
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
"$ xns" : "Gtk",
- "utf8 label" : "target filename"
+ "* pack" : "pack_start,false,false,0",
+ "utf8 label" : "target filename",
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "build_pack_target",
"listeners" : {
- "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;\n}"
+ "changed" : [
+ "() => {",
+ " if (_this.targets_tree.cursor.length < 1) {",
+ " return;",
+ " }",
+ " _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;",
+ "}"
+ ]
},
- "id" : "build_pack_target",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
"$ xns" : "Gtk",
- "utf8 label" : "compile flags"
+ "* pack" : "pack_start,false,false,0",
+ "utf8 label" : "compile flags",
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "build_compile_flags",
"listeners" : {
- "changed" : "() => {\n if (_this.targets_tree.cursor.length < 1) {\n return;\n }\n _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;\n}"
+ "changed" : [
+ "() => {",
+ " if (_this.targets_tree.cursor.length < 1) {",
+ " return;",
+ " }",
+ " _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;",
+ "}"
+ ]
},
- "id" : "build_compile_flags",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
"$ xns" : "Gtk",
- "utf8 label" : "test argments - when run after a build"
+ "* pack" : "pack_start,false,false,0",
+ "utf8 label" : "test argments - when run after a build",
+ "xtype" : "Label"
},
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false,false,0",
+ "id" : "build_execute_args",
"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}"
+ "changed" : [
+ "() => {",
+ " if (_this.targets_tree.cursor.length < 1) {",
+ " return;",
+ " }",
+ " _this.project.compilegroups.get(_this.targets_tree.cursor).execute_args = this.el.text;",
+ "}"
+ ]
},
- "id" : "build_execute_args",
"string placeholder_text" : "eg. -f somefile -g ",
- "xtype" : "Entry",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk"
+ "xtype" : "Entry"
},
{
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
"$ xns" : "Gtk",
- "utf8 label" : "Files to compile"
+ "* pack" : "pack_start,false,false,0",
+ "utf8 label" : "Files to compile",
+ "xtype" : "Label"
},
{
- "* pack" : "pack_start,true,true,0",
- "xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
+ "* pack" : "pack_start,true,true,0",
"items" : [
{
- "xtype" : "TreeView",
- "* pack" : "add",
- "string id" : "files_tree",
"$ xns" : "Gtk",
+ "* pack" : "add",
"items" : [
{
- "id" : "files_tree_store",
- "xtype" : "ListStore",
- "* pack" : "set_model",
- "| 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",
+ "$ columns" : [
+ " typeof(string), // 0 file name",
+ " typeof(string), // 0 basename",
+ " typeof(string), // type (dir orfile)",
+ " typeof(bool) // is checked.",
+ " "
+ ],
"$ 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.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 if (_this.set_vbox.cgroup == null) {\n\t\t_this.set_vbox.el.set_sensitive(false);\n \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 _this.set_vbox.el.set_sensitive(true);\n}\n"
+ "* pack" : "set_model",
+ "id" : "files_tree_store",
+ "xtype" : "ListStore",
+ "| void load" : [
+ "() {",
+ " ",
+ " this.el.clear();",
+ " ",
+ " ",
+ " var def = _this.project.compilegroups.get(\"_default_\");",
+ " var items = def.sources;",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " Gtk.TreeIter citer;",
+ "",
+ " for(var i =0 ; i < items.size; i++) {",
+ " ",
+ " var files = _this.project.filesForCompile(items.get(i), false);",
+ " if (files.size < 1) {",
+ " continue;",
+ " }",
+ " ",
+ " this.el.append(out citer); ",
+ " ",
+ " this.el.set_value(citer, 0, items.get(i) ); // title ",
+ " this.el.set_value(citer, 1, \"<span foreground=\\\"green\\\" font_weight=\\\"bold\\\">\" + ",
+ " GLib.Markup.escape_text(items.get(i)) + \"</span>\"",
+ " ); // title ",
+ " print(\"ADD item %s\", items.get(i));",
+ " this.el.set_value(citer, 2, \"dir\"); // type ",
+ " this.el.set_value(citer, 3, false ); // checked ",
+ "",
+ " ",
+ " ",
+ " for(var j =0 ; j < files.size; j++) {",
+ " this.el.append(out citer); ",
+ " print(\"ADD item %s\", files.get(j));",
+ " this.el.set_value(citer, 0, files.get(j) ); // title ",
+ " this.el.set_value(citer, 1, GLib.Markup.escape_text( Path.get_basename (files.get(j))) ); // title ",
+ " this.el.set_value(citer, 2, \"file\"); // type ",
+ " this.el.set_value(citer, 3, false ); // checked ",
+ "",
+ " }",
+ " ",
+ " ",
+ " //this.el.set_value(citer, 1, items.get(i) );",
+ " }",
+ " this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);",
+ " if (_this.set_vbox.cgroup == null) {",
+ "\t\t_this.set_vbox.el.set_sensitive(false);",
+ " ",
+ " }",
+ "}",
+ " "
+ ],
+ "| void update" : [
+ "() {",
+ "",
+ "",
+ " Gtk.TreeIter citer;",
+ "",
+ " for(var i =0 ; i < this.el.iter_n_children(null); i++) {",
+ " this.el.iter_nth_child(out citer,null,i);",
+ "",
+ " GLib.Value val;",
+ " this.el.get_value(citer,0, out val);",
+ " var fn = (string) val;",
+ " ",
+ " var active = false;",
+ " if (_this.set_vbox.cgroup.sources.contains(fn)) {",
+ " active = true;",
+ " }",
+ " ",
+ " this.el.set_value(citer, 3, active ); // checked ",
+ " }",
+ "",
+ " _this.set_vbox.el.set_sensitive(true);",
+ "}",
+ ""
+ ],
+ "| void updateDir" : [
+ "(string dname, bool bval) {",
+ " ",
+ " Gtk.TreeIter citer;",
+ "",
+ " 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);",
+ "",
+ " GLib.Value val;",
+ " this.el.get_value(citer,0, out val);",
+ " var fn = (string) val;",
+ " ",
+ " if ( Path.get_dirname (fn) == dname) {",
+ " ",
+ " this.el.set_value(citer, 3, bval ); // checked ",
+ " ",
+ " ",
+ " ",
+ " if (!bval) {",
+ " // renive",
+ " if (cg.sources.contains(fn)) {",
+ " cg.sources.remove(fn);",
+ " }",
+ " } else {",
+ " if (!cg.sources.contains(fn)) {",
+ " cg.sources.add(fn);",
+ " }",
+ " }",
+ " ",
+ " ",
+ " }",
+ " }",
+ "",
+ "}",
+ ""
+ ]
},
{
- "utf8 title" : "name",
- "* init" : "\n this.el.add_attribute(_this.files_render.el , \"markup\", 1 ); // basnemae\n \n/* this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n*/",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "",
+ " this.el.add_attribute(_this.files_render.el , \"markup\", 1 ); // basnemae",
+ " ",
+ "/* this.el.add_attribute(_this.files_render.el , \"markup\", 2 );",
+ "*/"
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"gboolean resizable" : true,
- "$ xns" : "Gtk",
"items" : [
{
- "id" : "files_render",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,false",
- "xtype" : "CellRendererText",
- "$ xns" : "Gtk"
+ "id" : "files_render",
+ "xtype" : "CellRendererText"
}
- ]
+ ],
+ "utf8 title" : "name",
+ "xtype" : "TreeViewColumn"
},
{
- "utf8 title" : "use",
- "* init" : "{\n this.el.add_attribute(_this.files_render_use.el , \"active\", 3 );\n }",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.add_attribute(_this.files_render_use.el , \"active\", 3 );",
+ " }"
+ ],
"* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"gboolean resizable" : false,
- "$ xns" : "Gtk",
"gint fixed_width" : 50,
"items" : [
{
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,false",
+ "gboolean activatable" : true,
+ "id" : "files_render_use",
"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(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}"
+ "toggled" : [
+ "( path_string) => { ",
+ "",
+ "",
+ "",
+ " var m = _this.files_tree_store.el;",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);",
+ " m.get_iter (out iter, path);",
+ " GLib.Value val;",
+ " m.get_value(iter, 3, out val);",
+ " m.set_value(iter, 3, ((bool) val) ? false :true); ",
+ " ",
+ " // type.",
+ " GLib.Value ftval; ",
+ " m.get_value(iter, 2, out ftval);",
+ " var ftype = (string)ftval; ",
+ " ",
+ " // full name... ",
+ " GLib.Value fval; ",
+ " m.get_value(iter, 0, out fval);",
+ " var fn = (string)fval;",
+ " ",
+ " ",
+ " var cg = _this.set_vbox.cgroup;",
+ " // what's the sleected target?",
+ " // update the list..",
+ " // if ftype is a dir == then toggle all the bellow.",
+ " ",
+ " if (ftype == \"dir\") {",
+ " _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.",
+ "",
+ " ",
+ " if ((bool)val) {",
+ " // renive",
+ " cg.sources.remove(fn);",
+ " } else {",
+ " cg.sources.add(fn);",
+ " }",
+ " ",
+ "}"
+ ]
},
- "id" : "files_render_use",
- "xtype" : "CellRendererToggle",
- "* pack" : "pack_start,false",
- "$ xns" : "Gtk",
- "gboolean activatable" : true
+ "xtype" : "CellRendererToggle"
}
- ]
+ ],
+ "utf8 title" : "use",
+ "xtype" : "TreeViewColumn"
}
- ]
+ ],
+ "string id" : "files_tree",
+ "xtype" : "TreeView"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
}
- ]
+ ],
+ "xtype" : "Box"
}
- ]
+ ],
+ "xtype" : "Paned"
}
- ]
+ ],
+ "xtype" : "Notebook"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "int margin_bottom" : 4,
+ "int margin_left" : 4,
+ "int margin_right" : 4,
+ "int margin_top" : 4,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "listeners" : {
+ "clicked" : [
+ "() => { ",
+ "",
+ " _this.done = true;",
+ " _this.el.hide(); ",
+ "}"
+ ]
+ },
+ "string label" : "Cancel",
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "id" : "save_btn",
+ "listeners" : {
+ "clicked" : [
+ "( ) => { ",
+ "",
+ " ",
+ "_this.project.writeConfig(); ",
+ " ",
+ "\t// what about .js ?",
+ " _this.done = true;",
+ "\t_this.el.hide();",
+ "",
+ "// hopefull this will work with bjs files..",
+ "\t",
+ " ",
+ " ",
+ "}"
+ ]
+ },
+ "string label" : "Save",
+ "xtype" : "Button"
+ }
+ ],
+ "xtype" : "HButtonBox"
}
- ]
+ ],
+ "xtype" : "Box"
}
+ ],
+ "listeners" : {
+ "closed" : [
+ "( ) => {",
+ " if (!this.done) {",
+ " _this.el.show_all();",
+ " ",
+ " }",
+ "",
+ "}",
+ ""
+ ],
+ "hide" : [
+ "() => {",
+ "\t if (!this.done) {",
+ " _this.el.show();",
+ " ",
+ " }",
+ "}"
+ ]
+ },
+ "uint border_width" : 0,
+ "xtype" : "Popover",
+ "| void save" : [
+ "() {",
+ " this.project.writeConfig(); ",
+ "}"
+ ],
+ "| void show" : [
+ "(Gtk.Widget btn, Project.Gtk project) {",
+ " ",
+ " //print(\"ValaProjectSettings show\\n\");",
+ " ",
+ " this.project= project;",
+ "",
+ " this.compile_flags.el.text = _this.project.compilegroups.get(\"_default_\").compile_flags;",
+ " ",
+ " this.default_directory_tree_store.load(); ",
+ " this.default_packages_tree_store.load(); ",
+ " this.targets_tree_store.load();",
+ " this.files_tree_store.load();",
+ "",
+ "",
+ "\tthis.el.set_modal(true);",
+ "\tthis.el.set_relative_to(btn);",
+ "",
+ "\tthis.el.set_position(Gtk.PositionType.RIGHT);",
+ "",
+ "\t// window + header?",
+ "\t// print(\"SHOWALL - POPIP\\n\");",
+ "\tthis.el.set_size_request(800,500);",
+ "\tthis.el.show_all();",
+ "\t//this.view.el.grab_focus();",
+ "",
+ "}",
+ ""
]
}
- ]
+ ],
+ "modOrder" : "",
+ "name" : "ValaProjectSettingsPopover",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/ValaProjectSettingsPopover.bjs",
+ "permname" : "",
+ "title" : ""
}
\ No newline at end of file
-static Xcls_ValaProjectSettingsPopover _ValaProjectSettingsPopover;
+static ValaProjectSettingsPopover _ValaProjectSettingsPopover;
-public class Xcls_ValaProjectSettingsPopover : Object
+public class ValaProjectSettingsPopover : Object
{
public Gtk.Popover el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
- public static Xcls_ValaProjectSettingsPopover singleton()
+ public static ValaProjectSettingsPopover singleton()
{
if (_ValaProjectSettingsPopover == null) {
- _ValaProjectSettingsPopover= new Xcls_ValaProjectSettingsPopover();
+ _ValaProjectSettingsPopover= new ValaProjectSettingsPopover();
}
return _ValaProjectSettingsPopover;
}
public Xcls_label_global label_global;
public Xcls_label_targets label_targets;
public Xcls_compile_flags compile_flags;
+ public Xcls_default_packages_tree default_packages_tree;
public Xcls_default_packages_tree_store default_packages_tree_store;
public Xcls_packages_render packages_render;
public Xcls_packages_render_use packages_render_use;
public Xcls_build_pack_target build_pack_target;
public Xcls_build_compile_flags build_compile_flags;
public Xcls_build_execute_args build_execute_args;
+ public Xcls_files_tree files_tree;
public Xcls_files_tree_store files_tree_store;
public Xcls_files_render files_render;
public Xcls_files_render_use files_render_use;
+ public Xcls_save_btn save_btn;
// my vars (def)
public Xcls_MainWindow window;
public Project.Gtk project;
+ public bool done;
// ctor
- public Xcls_ValaProjectSettingsPopover()
+ public ValaProjectSettingsPopover()
{
_this = this;
this.el = new Gtk.Popover( null );
// my vars (dec)
this.window = null;
this.project = null;
+ this.done = false;
// set gobject values
this.el.border_width = 0;
this.el.add ( child_0.el );
//listeners
- this.el.hide.connect( () => {
- _this.project.writeConfig();
+ this.el.closed.connect( ( ) => {
+ if (!this.done) {
+ _this.el.show_all();
+
+ }
});
+ this.el.hide.connect( () => {
+ if (!this.done) {
+ _this.el.show();
+
+ }
+ });
}
// user defined functions
public class Xcls_Box2 : Object
{
public Gtk.Box el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Box2(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Box2(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
// set gobject values
this.el.hexpand = true;
- var child_0 = new Xcls_Notebook3( _this );
+ this.el.vexpand = true;
+ var child_0 = new Xcls_HeaderBar3( _this );
child_0.ref();
- this.el.pack_start ( child_0.el , true,true,0 );
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_Notebook4( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , true,true,0 );
+ var child_2 = new Xcls_HButtonBox53( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
}
// user defined functions
}
- public class Xcls_Notebook3 : Object
+ public class Xcls_HeaderBar3 : Object
+ {
+ public Gtk.HeaderBar el;
+ private ValaProjectSettingsPopover _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_HeaderBar3(ValaProjectSettingsPopover _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.HeaderBar();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Change Vala Project Compile settings";
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_Notebook4 : Object
{
public Gtk.Notebook el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Notebook3(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Notebook4(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Notebook();
child_0.ref();
var child_1 = new Xcls_label_targets( _this );
child_1.ref();
- var child_2 = new Xcls_Box6( _this );
+ var child_2 = new Xcls_Box7( _this );
child_2.ref();
this.el.append_page ( child_2.el , _this.label_global.el );
- var child_3 = new Xcls_Paned27( _this );
+ var child_3 = new Xcls_Paned28( _this );
child_3.ref();
this.el.append_page ( child_3.el , _this.label_targets.el );
}
public class Xcls_label_global : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_label_global(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_label_global(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.label_global = this;
public class Xcls_label_targets : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_label_targets(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_label_targets(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.label_targets = this;
// user defined functions
}
- public class Xcls_Box6 : Object
+ public class Xcls_Box7 : Object
{
public Gtk.Box el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Box6(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Box7(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
// set gobject values
this.el.homogeneous = false;
- var child_0 = new Xcls_Label7( _this );
+ var child_0 = new Xcls_Label8( _this );
child_0.ref();
this.el.pack_start ( child_0.el , false,false,0 );
var child_1 = new Xcls_compile_flags( _this );
child_1.ref();
this.el.pack_start ( child_1.el , false,false,0 );
- var child_2 = new Xcls_Paned9( _this );
+ var child_2 = new Xcls_Paned10( _this );
child_2.ref();
this.el.pack_start ( child_2.el , true,true,0 );
}
// user defined functions
}
- public class Xcls_Label7 : Object
+ public class Xcls_Label8 : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Label7(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Label8(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Label( "compile flags" );
public class Xcls_compile_flags : Object
{
public Gtk.Entry el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_compile_flags(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_compile_flags(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.compile_flags = this;
// user defined functions
}
- public class Xcls_Paned9 : Object
+ public class Xcls_Paned10 : Object
{
public Gtk.Paned el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Paned9(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Paned10(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
// set gobject values
this.el.position = 300;
- var child_0 = new Xcls_ScrolledWindow10( _this );
+ var child_0 = new Xcls_ScrolledWindow11( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_ScrolledWindow17( _this );
+ var child_1 = new Xcls_ScrolledWindow18( _this );
child_1.ref();
this.el.add2 ( child_1.el );
}
// user defined functions
}
- public class Xcls_ScrolledWindow10 : Object
+ public class Xcls_ScrolledWindow11 : Object
{
public Gtk.ScrolledWindow el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow10(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_ScrolledWindow11(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
public class Xcls_default_packages_tree : Object
{
public Gtk.TreeView el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_default_packages_tree(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_default_packages_tree(ValaProjectSettingsPopover _owner )
{
_this = _owner;
+ _this.default_packages_tree = this;
this.el = new Gtk.TreeView();
// my vars (dec)
var child_0 = new Xcls_default_packages_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn13( _this );
+ var child_1 = new Xcls_TreeViewColumn14( _this );
child_1.ref();
this.el.append_column ( child_1.el );
- var child_2 = new Xcls_TreeViewColumn15( _this );
+ var child_2 = new Xcls_TreeViewColumn16( _this );
child_2.ref();
this.el.append_column ( child_2.el );
}
public class Xcls_default_packages_tree_store : Object
{
public Gtk.ListStore el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_default_packages_tree_store(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_default_packages_tree_store(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.default_packages_tree_store = this;
- this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
- typeof(bool) );
+ this.el = new Gtk.ListStore.newv( { typeof(string), // 0 key type
+ typeof(bool) } );
// my vars (dec)
}
}
- public class Xcls_TreeViewColumn13 : Object
+ public class Xcls_TreeViewColumn14 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn13(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn14(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_packages_render : Object
{
public Gtk.CellRendererText el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_packages_render(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_packages_render(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.packages_render = this;
}
- public class Xcls_TreeViewColumn15 : Object
+ public class Xcls_TreeViewColumn16 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn15(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn16(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_packages_render_use : Object
{
public Gtk.CellRendererToggle el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_packages_render_use(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_packages_render_use(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.packages_render_use = this;
- public class Xcls_ScrolledWindow17 : Object
+ public class Xcls_ScrolledWindow18 : Object
{
public Gtk.ScrolledWindow el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow17(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_ScrolledWindow18(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
this.el.add ( child_0.el );
var child_1 = new Xcls_default_directory_menu( _this );
child_1.ref();
+ this.el.add( child_1.el );
}
// user defined functions
public class Xcls_default_directory_tree : Object
{
public Gtk.TreeView el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_default_directory_tree(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_default_directory_tree(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.default_directory_tree = this;
var child_0 = new Xcls_default_directory_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn20( _this );
+ var child_1 = new Xcls_TreeViewColumn21( _this );
child_1.ref();
this.el.append_column ( child_1.el );
public class Xcls_default_directory_tree_store : Object
{
public Gtk.ListStore el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_default_directory_tree_store(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_default_directory_tree_store(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.default_directory_tree_store = this;
- this.el = new Gtk.ListStore( 1, typeof(string)
- );
+ this.el = new Gtk.ListStore.newv( { typeof(string)
+ } );
// my vars (dec)
}
}
- public class Xcls_TreeViewColumn20 : Object
+ public class Xcls_TreeViewColumn21 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn20(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn21(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_directory_render : Object
{
public Gtk.CellRendererText el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_directory_render(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_directory_render(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.directory_render = this;
public class Xcls_default_directory_menu : Object
{
public Gtk.Menu el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_default_directory_menu(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_default_directory_menu(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.default_directory_menu = this;
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_MenuItem23( _this );
+ var child_0 = new Xcls_MenuItem24( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_MenuItem24( _this );
+ var child_1 = new Xcls_MenuItem25( _this );
child_1.ref();
this.el.add ( child_1.el );
- var child_2 = new Xcls_SeparatorMenuItem25( _this );
+ var child_2 = new Xcls_SeparatorMenuItem26( _this );
child_2.ref();
this.el.add ( child_2.el );
- var child_3 = new Xcls_MenuItem26( _this );
+ var child_3 = new Xcls_MenuItem27( _this );
child_3.ref();
this.el.add ( child_3.el );
}
// user defined functions
}
- public class Xcls_MenuItem23 : Object
+ public class Xcls_MenuItem24 : Object
{
public Gtk.MenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_MenuItem23(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_MenuItem24(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
- public class Xcls_MenuItem24 : Object
+ public class Xcls_MenuItem25 : Object
{
public Gtk.MenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_MenuItem24(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_MenuItem25(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
- public class Xcls_SeparatorMenuItem25 : Object
+ public class Xcls_SeparatorMenuItem26 : Object
{
public Gtk.SeparatorMenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_SeparatorMenuItem25(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_SeparatorMenuItem26(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.SeparatorMenuItem();
// user defined functions
}
- public class Xcls_MenuItem26 : Object
+ public class Xcls_MenuItem27 : Object
{
public Gtk.MenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_MenuItem26(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_MenuItem27(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
- public class Xcls_Paned27 : Object
+ public class Xcls_Paned28 : Object
{
public Gtk.Paned el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Paned27(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Paned28(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Paned( Gtk.Orientation.HORIZONTAL );
// set gobject values
this.el.position = 300;
- var child_0 = new Xcls_ScrolledWindow28( _this );
+ var child_0 = new Xcls_ScrolledWindow29( _this );
child_0.ref();
this.el.add1 ( child_0.el );
var child_1 = new Xcls_set_vbox( _this );
// user defined functions
}
- public class Xcls_ScrolledWindow28 : Object
+ public class Xcls_ScrolledWindow29 : Object
{
public Gtk.ScrolledWindow el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow28(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_ScrolledWindow29(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
public class Xcls_targets_tree_menu : Object
{
public Gtk.Menu el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_targets_tree_menu(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_targets_tree_menu(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.targets_tree_menu = this;
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_MenuItem30( _this );
+ var child_0 = new Xcls_MenuItem31( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_SeparatorMenuItem31( _this );
+ var child_1 = new Xcls_SeparatorMenuItem32( _this );
child_1.ref();
this.el.add ( child_1.el );
- var child_2 = new Xcls_MenuItem32( _this );
+ var child_2 = new Xcls_MenuItem33( _this );
child_2.ref();
this.el.add ( child_2.el );
}
// user defined functions
}
- public class Xcls_MenuItem30 : Object
+ public class Xcls_MenuItem31 : Object
{
public Gtk.MenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_MenuItem30(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_MenuItem31(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
- public class Xcls_SeparatorMenuItem31 : Object
+ public class Xcls_SeparatorMenuItem32 : Object
{
public Gtk.SeparatorMenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_SeparatorMenuItem31(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_SeparatorMenuItem32(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.SeparatorMenuItem();
// user defined functions
}
- public class Xcls_MenuItem32 : Object
+ public class Xcls_MenuItem33 : Object
{
public Gtk.MenuItem el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_MenuItem32(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_MenuItem33(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
public class Xcls_targets_tree : Object
{
public Gtk.TreeView el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
public string cursor;
// ctor
- public Xcls_targets_tree(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_targets_tree(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.targets_tree = this;
var child_0 = new Xcls_targets_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn35( _this );
+ var child_1 = new Xcls_TreeViewColumn36( _this );
child_1.ref();
this.el.append_column ( child_1.el );
public class Xcls_targets_tree_store : Object
{
public Gtk.ListStore el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_targets_tree_store(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_targets_tree_store(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.targets_tree_store = this;
- this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
+ this.el = new Gtk.ListStore.newv( { typeof(string), // 0 key type
typeof(string) // ??
- );
+ } );
// my vars (dec)
}
}
- public class Xcls_TreeViewColumn35 : Object
+ public class Xcls_TreeViewColumn36 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn35(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn36(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_targets_render : Object
{
public Gtk.CellRendererText el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_targets_render(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_targets_render(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.targets_render = this;
public class Xcls_set_vbox : Object
{
public Gtk.Box el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
public Project.GtkValaSettings cgroup;
// ctor
- public Xcls_set_vbox(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_set_vbox(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.set_vbox = this;
// set gobject values
this.el.homogeneous = false;
- var child_0 = new Xcls_Label38( _this );
+ var child_0 = new Xcls_Label39( _this );
child_0.ref();
this.el.pack_start ( child_0.el , false,false,0 );
var child_1 = new Xcls_build_pack_target( _this );
child_1.ref();
this.el.pack_start ( child_1.el , false,false,0 );
- var child_2 = new Xcls_Label40( _this );
+ var child_2 = new Xcls_Label41( _this );
child_2.ref();
this.el.pack_start ( child_2.el , false,false,0 );
var child_3 = new Xcls_build_compile_flags( _this );
child_3.ref();
this.el.pack_start ( child_3.el , false,false,0 );
- var child_4 = new Xcls_Label42( _this );
+ var child_4 = new Xcls_Label43( _this );
child_4.ref();
this.el.pack_start ( child_4.el , false,false,0 );
var child_5 = new Xcls_build_execute_args( _this );
child_5.ref();
this.el.pack_start ( child_5.el , false,false,0 );
- var child_6 = new Xcls_Label44( _this );
+ var child_6 = new Xcls_Label45( _this );
child_6.ref();
this.el.pack_start ( child_6.el , false,false,0 );
- var child_7 = new Xcls_ScrolledWindow45( _this );
+ var child_7 = new Xcls_ScrolledWindow46( _this );
child_7.ref();
this.el.pack_start ( child_7.el , true,true,0 );
}
// user defined functions
}
- public class Xcls_Label38 : Object
+ public class Xcls_Label39 : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Label38(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Label39(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Label( "target filename" );
public class Xcls_build_pack_target : Object
{
public Gtk.Entry el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_build_pack_target(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_build_pack_target(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.build_pack_target = this;
// user defined functions
}
- public class Xcls_Label40 : Object
+ public class Xcls_Label41 : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Label40(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Label41(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Label( "compile flags" );
public class Xcls_build_compile_flags : Object
{
public Gtk.Entry el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_build_compile_flags(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_build_compile_flags(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.build_compile_flags = this;
// user defined functions
}
- public class Xcls_Label42 : Object
+ public class Xcls_Label43 : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Label42(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Label43(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Label( "test argments - when run after a build" );
public class Xcls_build_execute_args : Object
{
public Gtk.Entry el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_build_execute_args(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_build_execute_args(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.build_execute_args = this;
// user defined functions
}
- public class Xcls_Label44 : Object
+ public class Xcls_Label45 : Object
{
public Gtk.Label el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_Label44(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_Label45(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.Label( "Files to compile" );
// user defined functions
}
- public class Xcls_ScrolledWindow45 : Object
+ public class Xcls_ScrolledWindow46 : Object
{
public Gtk.ScrolledWindow el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow45(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_ScrolledWindow46(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
public class Xcls_files_tree : Object
{
public Gtk.TreeView el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_files_tree(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_files_tree(ValaProjectSettingsPopover _owner )
{
_this = _owner;
+ _this.files_tree = this;
this.el = new Gtk.TreeView();
// my vars (dec)
var child_0 = new Xcls_files_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn48( _this );
+ var child_1 = new Xcls_TreeViewColumn49( _this );
child_1.ref();
this.el.append_column ( child_1.el );
- var child_2 = new Xcls_TreeViewColumn50( _this );
+ var child_2 = new Xcls_TreeViewColumn51( _this );
child_2.ref();
this.el.append_column ( child_2.el );
}
public class Xcls_files_tree_store : Object
{
public Gtk.ListStore el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_files_tree_store(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_files_tree_store(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.files_tree_store = this;
- this.el = new Gtk.ListStore( 4, typeof(string), // 0 file name
+ this.el = new Gtk.ListStore.newv( { typeof(string), // 0 file name
typeof(string), // 0 basename
typeof(string), // type (dir orfile)
typeof(bool) // is checked.
- );
+ } );
// my vars (dec)
}
// user defined functions
+ public void update () {
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < this.el.iter_n_children(null); i++) {
+ this.el.iter_nth_child(out citer,null,i);
+
+ GLib.Value val;
+ this.el.get_value(citer,0, out val);
+ var fn = (string) val;
+
+ var active = false;
+ if (_this.set_vbox.cgroup.sources.contains(fn)) {
+ active = true;
+ }
+
+ this.el.set_value(citer, 3, active ); // checked
+ }
+
+ _this.set_vbox.el.set_sensitive(true);
+ }
public void updateDir (string dname, bool bval) {
Gtk.TreeIter citer;
}
}
- public void update () {
-
-
- Gtk.TreeIter citer;
-
- for(var i =0 ; i < this.el.iter_n_children(null); i++) {
- this.el.iter_nth_child(out citer,null,i);
-
- GLib.Value val;
- this.el.get_value(citer,0, out val);
- var fn = (string) val;
-
- var active = false;
- if (_this.set_vbox.cgroup.sources.contains(fn)) {
- active = true;
- }
-
- this.el.set_value(citer, 3, active ); // checked
- }
-
- _this.set_vbox.el.set_sensitive(true);
- }
}
- public class Xcls_TreeViewColumn48 : Object
+ public class Xcls_TreeViewColumn49 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn48(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn49(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_files_render : Object
{
public Gtk.CellRendererText el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_files_render(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_files_render(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.files_render = this;
}
- public class Xcls_TreeViewColumn50 : Object
+ public class Xcls_TreeViewColumn51 : Object
{
public Gtk.TreeViewColumn el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn50(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_TreeViewColumn51(ValaProjectSettingsPopover _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
public class Xcls_files_render_use : Object
{
public Gtk.CellRendererToggle el;
- private Xcls_ValaProjectSettingsPopover _this;
+ private ValaProjectSettingsPopover _this;
// my vars (def)
// ctor
- public Xcls_files_render_use(Xcls_ValaProjectSettingsPopover _owner )
+ public Xcls_files_render_use(ValaProjectSettingsPopover _owner )
{
_this = _owner;
_this.files_render_use = this;
+ public class Xcls_HButtonBox53 : Object
+ {
+ public Gtk.HButtonBox el;
+ private ValaProjectSettingsPopover _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_HButtonBox53(ValaProjectSettingsPopover _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.HButtonBox();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.margin_right = 4;
+ this.el.margin_left = 4;
+ this.el.margin_bottom = 4;
+ this.el.margin_top = 4;
+ var child_0 = new Xcls_Button54( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_save_btn( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Button54 : Object
+ {
+ public Gtk.Button el;
+ private ValaProjectSettingsPopover _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button54(ValaProjectSettingsPopover _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Cancel";
+
+ //listeners
+ this.el.clicked.connect( () => {
+
+ _this.done = true;
+ _this.el.hide();
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_save_btn : Object
+ {
+ public Gtk.Button el;
+ private ValaProjectSettingsPopover _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_save_btn(ValaProjectSettingsPopover _owner )
+ {
+ _this = _owner;
+ _this.save_btn = this;
+ this.el = new Gtk.Button();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Save";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+
+ _this.project.writeConfig();
+
+ // what about .js ?
+ _this.done = true;
+ _this.el.hide();
+
+ // hopefull this will work with bjs files..
+
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
}
public Xcls_PopoverAddProp add_props;
public Xcls_LeftProps left_props;
public Xcls_RooProjectSettings roo_projectsettings_pop;
- public Xcls_ValaProjectSettingsPopover vala_projectsettings_pop;
+ public ValaProjectSettingsPopover vala_projectsettings_pop;
public Xcls_PopoverAddObject rightpalete;
//public Xcls_PopoverEditor code_editor_popover;
public Editor code_editor_tab;
this.roo_projectsettings_pop =new Xcls_RooProjectSettings();
this.roo_projectsettings_pop.ref(); /// really?
- this.vala_projectsettings_pop =new Xcls_ValaProjectSettingsPopover();
+ this.vala_projectsettings_pop =new ValaProjectSettingsPopover();
this.vala_projectsettings_pop.ref();
this.vala_projectsettings_pop.window = this.win;
string inpad;
string pad;
string ipad;
- string cls;
+ string cls; // node fqn()
string xcls;
string ret;
*
*
*/
-
+
void addMyVars()
{
GLib.debug("callinged addMhyVars");
var ncls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
if (ncls != null && ncls.nodetype == "Struct") {
// we can use regular setters to apply the values.
- this.addLine(this.ipad + "this.el = " + this.cls + "();");
+ this.addLine(this.ipad + "this.el = " + this.node.fqn() + "();");
return;
var ctor = ".new";
var args_str = "";
switch(this.node.fqn()) {
+
+ case "Gtk.ComboBox":
+ var is_entry = this.node.has("has_entry") && this.node.get_prop("has_entry").val.down() == "true";
+ if (!is_entry) {
+ break; // regular ctor.
+ }
+ this.ignoreWrapped("has_entry");
+ ctor = ".with_entry";
+ break;
+
+
case "Gtk.ListStore":
case "Gtk.TreeStore":
this.ignoreWrapped("n_columns");
}
- this.addLine(this.ipad + "this.el = new " + this.cls + ".newv( " + args_str + " );");
+ this.addLine(this.ipad + "this.el = new " + this.node.fqn() + ".newv( " + args_str + " );");
return;
break;
}
this.node.setLine(this.cur_line, "p", "* xtype");
- this.addLine(this.ipad + "this.el = new " + cls + "( "+ string.joinv(", ",args) + " );") ;
+ this.addLine(this.ipad + "this.el = new " + this.node.fqn() + "( "+ string.joinv(", ",args) + " );") ;
return;
}
- this.addLine(this.ipad + "this.el = new " + this.cls + "(" + args_str + ");");
+ // default ctor with no params..
+ if (default_ctor != null && ctor != ".new" ) {
+ this.node.setLine(this.cur_line, "p", "* xtype");
+
+ this.addLine(this.ipad + "this.el = new " + this.node.fqn() + ctor + "( );") ;
+ return;
+ }
+
+
+ this.addLine(this.ipad + "this.el = new " + this.node.fqn() + "(" + args_str + ");");
void packChild(Node child, int i, int cols, int colpos, string propname= "")
{
+
+ GLib.debug("packChild %s=>%s", this.node.fqn(), child.fqn());
// forcing no packing? - true or false? -should we just accept false?
if (child.has("* pack") && child.get("* pack").down() == "false") {
return; // force no packing
return;
}
switch (this.node.fqn()) {
+
+
+
case "Gtk.Fixed":
case "Gtk.Layout":
var x = child.has("x") ? child.get_prop("x").val : "0";
- signature on insert
- show source interface / help
-
-
-
-
+
*/
this.add_special_children("Gtk.Dialog","Gtk.Button", "buttons[]");
//this.add_special_children("Gtk.Dialog","Gtk.Button", "response_id");
this.add_special_children("Gtk.RadioButton","Gtk.Button", "_group_name"); // fake property
-
+
+ this.add_special_children("Gtk.ButtonBox","Gtk.Button", "");
+
this.init_node_defaults();
this.init_child_defaults();
"Gtk.Socket",
"Gtk.ToolItemGroup",
- "Gtk.ButtonBox",
+ //"Gtk.ButtonBox", << why ?
"Gtk.CellView",
"Gtk.EventBox",
"Gtk.FlowBoxChild",
return null;
}
var gir = Gir.factory(this.project,es[0]);
-
+ if (gir == null) {
+ return null;
+ }
return gir.classes.get(es[1]);
}