From: Alan Knowles Date: Tue, 30 Oct 2018 08:49:24 +0000 (+0800) Subject: NewBranch.bjs X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=4ac37244f863f00936265bc9a4f18d0ccb10b1fd NewBranch.bjs NewBranch.vala --- diff --git a/NewBranch.bjs b/NewBranch.bjs index 46b90799..0b504bca 100644 --- a/NewBranch.bjs +++ b/NewBranch.bjs @@ -38,22 +38,6 @@ "n_rows" : 3, "$ homogeneous" : true, "items" : [ - { - "label" : "Component Name", - "xalign" : 0.90000000000000002, - "* pack" : "attach_defaults,0,1,0,1", - "xtype" : "Label", - "$ justify" : "Gtk.Justification.RIGHT", - "x_options" : 4, - "$ xns" : "Gtk" - }, - { - "id" : "name", - "$ visible" : true, - "xtype" : "Entry", - "* pack" : "attach_defaults,1,2,0,1", - "$ xns" : "Gtk" - }, { "label" : "Module to build (Vala only)", "$ visible" : true, @@ -87,6 +71,22 @@ "| void loadData" : " (Gee.ArrayList data, string cur) {\n this.el.clear(); \n Gtk.TreeIter iter;\n var el = this.el;\n \n /// el.append(out iter);\n \n \n // el.set_value(iter, 0, \"\");\n // el.set_value(iter, 1, \"aaa - Just add Element - aaa\");\n\n el.append(out iter);\n\n \n el.set_value(iter, 0, \"\");\n el.set_value(iter, 1, \"-- select a module --\");\n _this.build_module.el.set_active_iter(iter);\n \n for (var i = 0; i < data.size;i++) {\n \n\n el.append(out iter);\n \n el.set_value(iter, 0, data.get(i));\n el.set_value(iter, 1, data.get(i));\n \n if (data.get(i) == cur) {\n _this.build_module.el.set_active_iter(iter);\n }\n \n }\n this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING); \n \n}\n" } ] + }, + { + "label" : "Component Name", + "xalign" : 0.90000000000000002, + "* pack" : "attach_defaults,0,1,0,1", + "xtype" : "Label", + "$ justify" : "Gtk.Justification.RIGHT", + "x_options" : 4, + "$ xns" : "Gtk" + }, + { + "id" : "name", + "$ visible" : true, + "xtype" : "Entry", + "* pack" : "attach_defaults,1,2,0,1", + "$ xns" : "Gtk" } ] } diff --git a/NewBranch.vala b/NewBranch.vala index e687160d..0e6c84e3 100644 --- a/NewBranch.vala +++ b/NewBranch.vala @@ -12,10 +12,10 @@ public class Xcls_DialogNewComponent : Object } return _DialogNewComponent; } - public Xcls_name name; public Xcls_build_module build_module; public Xcls_dbcellrenderer dbcellrenderer; public Xcls_dbmodel dbmodel; + public Xcls_name name; // my vars (def) public signal void success (Project.Project pr, JsRender.JsRender file); @@ -139,16 +139,16 @@ public class Xcls_DialogNewComponent : Object // set gobject values var child_0 = new Xcls_Label4( _this ); child_0.ref(); - this.el.attach_defaults ( child_0.el , 0,1,0,1 ); - var child_1 = new Xcls_name( _this ); + this.el.attach_defaults ( child_0.el , 0,1,1,2 ); + var child_1 = new Xcls_build_module( _this ); child_1.ref(); - this.el.attach_defaults ( child_1.el , 1,2,0,1 ); - var child_2 = new Xcls_Label6( _this ); + this.el.attach_defaults ( child_1.el , 1,2,1,2 ); + var child_2 = new Xcls_Label8( _this ); child_2.ref(); - this.el.attach_defaults ( child_2.el , 0,1,1,2 ); - var child_3 = new Xcls_build_module( _this ); + this.el.attach_defaults ( child_2.el , 0,1,0,1 ); + var child_3 = new Xcls_name( _this ); child_3.ref(); - this.el.attach_defaults ( child_3.el , 1,2,1,2 ); + this.el.attach_defaults ( child_3.el , 1,2,0,1 ); } // user defined functions @@ -163,54 +163,6 @@ public class Xcls_DialogNewComponent : Object // ctor public Xcls_Label4(Xcls_DialogNewComponent _owner ) - { - _this = _owner; - this.el = new Gtk.Label( "Component Name" ); - - // my vars (dec) - - // set gobject values - this.el.justify = Gtk.Justification.RIGHT; - this.el.xalign = 0.900000f; - } - - // user defined functions - } - - public class Xcls_name : Object - { - public Gtk.Entry el; - private Xcls_DialogNewComponent _this; - - - // my vars (def) - - // ctor - public Xcls_name(Xcls_DialogNewComponent _owner ) - { - _this = _owner; - _this.name = this; - this.el = new Gtk.Entry(); - - // my vars (dec) - - // set gobject values - this.el.visible = true; - } - - // user defined functions - } - - public class Xcls_Label6 : Object - { - public Gtk.Label el; - private Xcls_DialogNewComponent _this; - - - // my vars (def) - - // ctor - public Xcls_Label6(Xcls_DialogNewComponent _owner ) { _this = _owner; this.el = new Gtk.Label( "Module to build (Vala only)" ); @@ -339,6 +291,54 @@ public class Xcls_DialogNewComponent : Object } + public class Xcls_Label8 : Object + { + public Gtk.Label el; + private Xcls_DialogNewComponent _this; + + + // my vars (def) + + // ctor + public Xcls_Label8(Xcls_DialogNewComponent _owner ) + { + _this = _owner; + this.el = new Gtk.Label( "Component Name" ); + + // my vars (dec) + + // set gobject values + this.el.justify = Gtk.Justification.RIGHT; + this.el.xalign = 0.900000f; + } + + // user defined functions + } + + public class Xcls_name : Object + { + public Gtk.Entry el; + private Xcls_DialogNewComponent _this; + + + // my vars (def) + + // ctor + public Xcls_name(Xcls_DialogNewComponent _owner ) + { + _this = _owner; + _this.name = this; + this.el = new Gtk.Entry(); + + // my vars (dec) + + // set gobject values + this.el.visible = true; + } + + // user defined functions + } + public class Xcls_Button10 : Object