src/Builder4/DialogTemplateSelect.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 20 Apr 2015 09:44:47 +0000 (17:44 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 20 Apr 2015 09:44:47 +0000 (17:44 +0800)
src/Builder4/DialogTemplateSelect.vala

src/Builder4/DialogTemplateSelect.bjs
src/Builder4/DialogTemplateSelect.vala

index 859ade8..7662f8f 100644 (file)
            "| void loadData" : "  (GLib.List<string> data) {\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    for (var i = 0; i < data.length();i++) {\n    \n\n        el.append(out iter);\n        var str = data.nth_data(i);\n        var fn = Path.get_basename (str);\n        fn.replace(\".json\", \"\");\n        \n        el.set_value(iter, 0, str);\n        el.set_value(iter, 1, fn);\n        \n    }\n    this.el.set_sort_column_id(1, Gtk.SortType.ASCENDING);          \n                                     \n}\n"
           }
          ]
-        },
+        }
+       ]
+      },
+      {
+       "* pack" : "pack_start,false,false,0",
+       "xtype" : "HBox",
+       "$ xns" : "Gtk",
+       "items" : [
         {
          "label" : "Select Database Table : ",
-         "* pack" : "pack_start,false,false",
          "xtype" : "Label",
+         "* pack" : "pack_start,false,false",
          "$ xns" : "Gtk"
         },
         {
          "$ xns" : "Gtk",
          "items" : [
           {
-           "id" : "cellrenderer",
-           "* pack" : "pack_start,true",
+           "id" : "dbcellrenderer",
            "xtype" : "CellRendererText",
+           "* pack" : "pack_start,true",
            "$ xns" : "Gtk"
           },
           {
-           "id" : "model",
-           "xtype" : "ListStore",
+           "id" : "dbmodel",
            "* pack" : "set_model",
+           "xtype" : "ListStore",
            "$ columns" : "typeof(string),typeof(string)",
            "n_columns" : 2,
            "$ xns" : "Gtk",
index ea150ba..da0137a 100644 (file)
@@ -16,8 +16,8 @@ public class DialogTemplateSelect : Object
     public Xcls_cellrenderer cellrenderer;
     public Xcls_model model;
     public Xcls_dbcombo dbcombo;
-    public Xcls_cellrenderer cellrenderer;
-    public Xcls_model model;
+    public Xcls_dbcellrenderer dbcellrenderer;
+    public Xcls_dbmodel dbmodel;
 
         // my vars (def)
 
@@ -37,13 +37,13 @@ public class DialogTemplateSelect : Object
         var child_0 = new Xcls_VBox2( _this );
         child_0.ref();
         this.el.get_content_area().add (  child_0.el  );
-        var child_1 = new Xcls_Button12( _this );
+        var child_1 = new Xcls_Button13( _this );
         child_1.ref();
         this.el.add_action_widget (  child_1.el , 0 );
-        var child_2 = new Xcls_Button13( _this );
+        var child_2 = new Xcls_Button14( _this );
         child_2.ref();
         this.el.add_action_widget (  child_2.el , 1 );
-        var child_3 = new Xcls_Button14( _this );
+        var child_3 = new Xcls_Button15( _this );
         child_3.ref();
         this.el.add_action_widget (  child_3.el , 2 );
 
@@ -110,6 +110,9 @@ public class DialogTemplateSelect : Object
             var child_0 = new Xcls_HBox3( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , false,false,0 );
+            var child_1 = new Xcls_HBox8( _this );
+            child_1.ref();
+            this.el.pack_start (  child_1.el , false,false,0 );
         }
 
         // user defined functions 
@@ -137,12 +140,6 @@ public class DialogTemplateSelect : Object
             var child_1 = new Xcls_combo( _this );
             child_1.ref();
             this.el.add (  child_1.el  );
-            var child_2 = new Xcls_Label8( _this );
-            child_2.ref();
-            this.el.pack_start (  child_2.el , false,false );
-            var child_3 = new Xcls_dbcombo( _this );
-            child_3.ref();
-            this.el.add (  child_3.el  );
         }
 
         // user defined functions 
@@ -270,7 +267,34 @@ public class DialogTemplateSelect : Object
                                              
         }
     }
-    public class Xcls_Label8 : Object 
+    public class Xcls_HBox8 : Object 
+    {
+        public Gtk.HBox el;
+        private DialogTemplateSelect  _this;
+
+
+            // my vars (def)
+
+        // ctor 
+        public Xcls_HBox8(DialogTemplateSelect _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.HBox( true, 0 );
+
+            // my vars (dec)
+
+            // set gobject values
+            var child_0 = new Xcls_Label9( _this );
+            child_0.ref();
+            this.el.pack_start (  child_0.el , false,false );
+            var child_1 = new Xcls_dbcombo( _this );
+            child_1.ref();
+            this.el.add (  child_1.el  );
+        }
+
+        // user defined functions 
+    }
+    public class Xcls_Label9 : Object 
     {
         public Gtk.Label el;
         private DialogTemplateSelect  _this;
@@ -279,7 +303,7 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Label8(DialogTemplateSelect _owner )
+        public Xcls_Label9(DialogTemplateSelect _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "Select Database Table : " );
@@ -309,10 +333,10 @@ public class DialogTemplateSelect : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_cellrenderer( _this );
+            var child_0 = new Xcls_dbcellrenderer( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , true );
-            var child_1 = new Xcls_model( _this );
+            var child_1 = new Xcls_dbmodel( _this );
             child_1.ref();
             this.el.set_model (  child_1.el  );
 
@@ -323,7 +347,7 @@ public class DialogTemplateSelect : Object
 
         // user defined functions 
     }
-    public class Xcls_cellrenderer : Object 
+    public class Xcls_dbcellrenderer : Object 
     {
         public Gtk.CellRendererText el;
         private DialogTemplateSelect  _this;
@@ -332,10 +356,10 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_cellrenderer(DialogTemplateSelect _owner )
+        public Xcls_dbcellrenderer(DialogTemplateSelect _owner )
         {
             _this = _owner;
-            _this.cellrenderer = this;
+            _this.dbcellrenderer = this;
             this.el = new Gtk.CellRendererText();
 
             // my vars (dec)
@@ -345,7 +369,7 @@ public class DialogTemplateSelect : Object
 
         // user defined functions 
     }
-    public class Xcls_model : Object 
+    public class Xcls_dbmodel : Object 
     {
         public Gtk.ListStore el;
         private DialogTemplateSelect  _this;
@@ -354,10 +378,10 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_model(DialogTemplateSelect _owner )
+        public Xcls_dbmodel(DialogTemplateSelect _owner )
         {
             _this = _owner;
-            _this.model = this;
+            _this.dbmodel = this;
             this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
 
             // my vars (dec)
@@ -393,7 +417,7 @@ public class DialogTemplateSelect : Object
                                              
         }
     }
-    public class Xcls_Button12 : Object 
+    public class Xcls_Button13 : Object 
     {
         public Gtk.Button el;
         private DialogTemplateSelect  _this;
@@ -402,7 +426,7 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Button12(DialogTemplateSelect _owner )
+        public Xcls_Button13(DialogTemplateSelect _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();
@@ -415,7 +439,7 @@ public class DialogTemplateSelect : Object
 
         // user defined functions 
     }
-    public class Xcls_Button13 : Object 
+    public class Xcls_Button14 : Object 
     {
         public Gtk.Button el;
         private DialogTemplateSelect  _this;
@@ -424,7 +448,7 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Button13(DialogTemplateSelect _owner )
+        public Xcls_Button14(DialogTemplateSelect _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();
@@ -437,7 +461,7 @@ public class DialogTemplateSelect : Object
 
         // user defined functions 
     }
-    public class Xcls_Button14 : Object 
+    public class Xcls_Button15 : Object 
     {
         public Gtk.Button el;
         private DialogTemplateSelect  _this;
@@ -446,7 +470,7 @@ public class DialogTemplateSelect : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Button14(DialogTemplateSelect _owner )
+        public Xcls_Button15(DialogTemplateSelect _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();