NewBranch.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:49:24 +0000 (16:49 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 30 Oct 2018 08:49:24 +0000 (16:49 +0800)
NewBranch.vala

NewBranch.bjs
NewBranch.vala

index 46b9079..0b504bc 100644 (file)
        "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,
            "| void loadData" : "  (Gee.ArrayList<string> 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"
         }
        ]
       }
index e687160..0e6c84e 100644 (file)
@@ -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