"$ xns" : "Gtk",
"* pack" : "add",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "bool hexpand" : true,
"bool homogeneous" : false,
"items" : [
{
"xtype" : "HeaderBar"
},
{
- "$ homogeneous" : true,
"$ xns" : "Gtk",
"* pack" : "pack_start,false,false,4",
+ "bool hexpand" : true,
"id" : "grid",
"int margin_left" : 4,
"int margin_right" : 4,
"$ xns" : "Gtk",
"* init" : "this.el.add_attribute(_this.ftdbcellrenderer.el , \"markup\", 1 );",
"* pack" : "attach,1,0,1,1",
+ "bool hexpand" : true,
"id" : "filetype",
"items" : [
{
"(bool is_bjs) {",
"",
"",
- "\tif (_this.project.xtype != \"Roo\") {",
- "\t \tis_bjs = false;",
- " \t}",
+ "\t ",
+ "\t_this.grid.showAllRows();",
"",
- "\tfor (var i = 2; i < 9;i++) {",
- "\t\tvar el = _this.grid.el.get_child_at(0,i);",
- "\t\t",
- "\t\tvar showhide= is_bjs;",
- "\t\tif (i> 7) {",
- "\t\t\tshowhide = !showhide;",
- "\t\t}",
- "\t\t",
- "\t\tif (showhide) {",
- "\t\t el.show();",
- "\t\t} else {",
- "\t\t\tel.hide();",
- "\t\t}",
- "\t\t el = _this.grid.el.get_child_at(1,i);",
- "\t\tif (showhide) {",
- "\t\t el.show();",
- "\t\t} else {",
- "\t\t\tel.hide();",
- "\t\t} ",
- " }",
+ "\tswitch(_this.project.xtype) {",
+ "\t\tcase \"Roo\":",
+ "\t\t\t",
+ "\t\t\t_this.grid.hideRow(7);",
+ "\t\t\t_this.grid.hideRow(8);\t\t\t",
+ "\t\t\t// hide: vala: module",
+ "\t\t\t// row 7",
+ "\t\t\t// row 8 (directory)",
+ "\t\t\t",
+ "\t\t\tbreak;",
+ "\t\tdefault: // vala..",
+ "\t\t\t_this.grid.hideRow(2);",
+ "\t\t\t_this.grid.hideRow(3);\t",
+ "\t\t\t_this.grid.hideRow(4);",
+ "\t\t\t_this.grid.hideRow(5);\t",
+ "\t\t\t_this.grid.hideRow(6);\t",
+ "\t\t // hide 2,3,4,5,6,",
+ "\t\t if (_this.file.name.length > 0) {",
+ "\t\t \t_this.grid.hideRow(8); // directory - cant change it here..",
+ "\t \t}",
+ "\t\t ",
+ "\t\t\tbreak;",
+ "\t}",
+ " ",
" // load up the directories",
" //??? why can we not create bjs files in other directories??",
"\t//if (!is_bjs && _this.file.path.length < 1) {",
"$ visible" : true,
"$ xns" : "Gtk",
"* pack" : "attach,1,1,1,1",
+ "bool hexpand" : true,
"id" : "name",
"xtype" : "Entry"
},
"$ visible" : true,
"$ xns" : "Gtk",
"* pack" : "attach,1,2,1,1",
+ "bool hexpand" : true,
"id" : "title",
"xtype" : "Entry"
},
"$ visible" : true,
"$ xns" : "Gtk",
"* pack" : "attach,1,3,1,1",
+ "bool hexpand" : true,
"id" : "region",
"xtype" : "Entry"
},
"$ visible" : true,
"$ xns" : "Gtk",
"* pack" : "attach,0,7,1,1",
- "label" : "Module to build (Vala only)",
+ "label" : "Module to build",
"x_options" : 4,
"xalign" : 0.90000000000000002,
"xtype" : "Label"
"$ xns" : "Gtk",
"* pack" : "attach,1,9,1,1",
"bool editable" : false,
+ "bool hexpand" : true,
"id" : "path",
"int colspan" : 1,
"xtype" : "Entry"
"n_columns" : 2,
"n_rows" : 8,
"uint row_spacing" : 2,
- "xtype" : "Grid"
+ "xtype" : "Grid",
+ "| void hideRow" : [
+ "(int row) ",
+ "{",
+ "\tvar el = _this.grid.el.get_child_at(0,row);",
+ "",
+ "\tel.hide();",
+ "\tel = _this.grid.el.get_child_at(1,row);",
+ "\tel.hide();",
+ "",
+ "}"
+ ],
+ "| void showAllRows" : [
+ "() {",
+ "\tfor (var i = 2; i < 10;i++) {",
+ "\t\tvar el = _this.grid.el.get_child_at(0,i);",
+ "\t\tel.show();",
+ "\t\tel = _this.grid.el.get_child_at(1,i);",
+ "\t\tel.show();",
+ " }",
+ "}"
+ ]
},
{
"$ xns" : "Gtk",
{
"$ xns" : "Gtk",
"* pack" : "add",
+ "bool always_show_image" : true,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "set_image",
+ "utf8 icon_name" : "window-close",
+ "xtype" : "Image"
+ }
+ ],
"listeners" : {
"clicked" : [
"() => { ",
{
"$ xns" : "Gtk",
"* pack" : "add",
+ "bool always_show_image" : true,
+ "bool has_default" : true,
"id" : "save_btn",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "set_image",
+ "utf8 icon_name" : "document-save",
+ "xtype" : "Image"
+ }
+ ],
"listeners" : {
"clicked" : [
"( ) => { ",
"",
" int w,h;",
" this.mainwindow.el.get_size(out w, out h);",
- " this.el.set_size_request( 550, h);",
+ " this.el.set_size_request( 550, 100); // should expand height, but give a min width.",
"",
" ",
" ",
int w,h;
this.mainwindow.el.get_size(out w, out h);
- this.el.set_size_request( 550, h);
+ this.el.set_size_request( 550, 100); // should expand height, but give a min width.
// set gobject values
this.el.homogeneous = false;
+ this.el.hexpand = true;
var child_0 = new Xcls_HeaderBar3( _this );
child_0.ref();
this.el.pack_start ( child_0.el , false,true,0 );
// set gobject values
this.el.margin_right = 4;
this.el.margin_left = 4;
+ this.el.hexpand = true;
this.el.row_spacing = 2;
var child_0 = new Xcls_filetypelbl( _this );
child_0.ref();
}
// user defined functions
+ public void showAllRows () {
+ for (var i = 2; i < 10;i++) {
+ var el = _this.grid.el.get_child_at(0,i);
+ el.show();
+ el = _this.grid.el.get_child_at(1,i);
+ el.show();
+ }
+ }
+ public void hideRow (int row)
+ {
+ var el = _this.grid.el.get_child_at(0,row);
+
+ el.hide();
+ el = _this.grid.el.get_child_at(1,row);
+ el.hide();
+
+ }
}
public class Xcls_filetypelbl : Object
{
// my vars (dec)
// set gobject values
+ this.el.hexpand = true;
var child_0 = new Xcls_ftdbcellrenderer( _this );
child_0.ref();
this.el.pack_start ( child_0.el , true );
public void showhide (bool is_bjs) {
- if (_this.project.xtype != "Roo") {
- is_bjs = false;
- }
+
+ _this.grid.showAllRows();
- for (var i = 2; i < 9;i++) {
- var el = _this.grid.el.get_child_at(0,i);
-
- var showhide= is_bjs;
- if (i> 7) {
- showhide = !showhide;
- }
-
- if (showhide) {
- el.show();
- } else {
- el.hide();
- }
- el = _this.grid.el.get_child_at(1,i);
- if (showhide) {
- el.show();
- } else {
- el.hide();
- }
- }
+ switch(_this.project.xtype) {
+ case "Roo":
+
+ _this.grid.hideRow(7);
+ _this.grid.hideRow(8);
+ // hide: vala: module
+ // row 7
+ // row 8 (directory)
+
+ break;
+ default: // vala..
+ _this.grid.hideRow(2);
+ _this.grid.hideRow(3);
+ _this.grid.hideRow(4);
+ _this.grid.hideRow(5);
+ _this.grid.hideRow(6);
+ // hide 2,3,4,5,6,
+ if (_this.file.name.length > 0) {
+ _this.grid.hideRow(8); // directory - cant change it here..
+ }
+
+ break;
+ }
+
// load up the directories
//??? why can we not create bjs files in other directories??
//if (!is_bjs && _this.file.path.length < 1) {
// my vars (dec)
// set gobject values
+ this.el.hexpand = true;
this.el.visible = true;
}
// my vars (dec)
// set gobject values
+ this.el.hexpand = true;
this.el.visible = true;
}
// my vars (dec)
// set gobject values
+ this.el.hexpand = true;
this.el.visible = true;
}
public Xcls_Label21(Xcls_PopoverFileDetails _owner )
{
_this = _owner;
- this.el = new Gtk.Label( "Module to build (Vala only)" );
+ this.el = new Gtk.Label( "Module to build" );
// my vars (dec)
// set gobject values
this.el.editable = false;
+ this.el.hexpand = true;
this.el.visible = true;
}
// my vars (dec)
// set gobject values
+ this.el.always_show_image = true;
this.el.label = "Cancel";
+ var child_0 = new Xcls_Image33( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( () => {
// user defined functions
}
+ public class Xcls_Image33 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image33(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "window-close";
+ }
+
+ // user defined functions
+ }
+
public class Xcls_save_btn : Object
{
// my vars (dec)
// set gobject values
+ this.el.has_default = true;
+ this.el.always_show_image = true;
this.el.label = "Save";
+ var child_0 = new Xcls_Image35( _this );
+ child_0.ref();
+ this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
// user defined functions
}
+ public class Xcls_Image35 : Object
+ {
+ public Gtk.Image el;
+ private Xcls_PopoverFileDetails _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Image35(Xcls_PopoverFileDetails _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Image();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "document-save";
+ }
+
+ // user defined functions
+ }
+