src/Builder4/PopoverProperty.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 29 May 2015 09:36:38 +0000 (17:36 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 29 May 2015 09:36:38 +0000 (17:36 +0800)
src/Builder4/PopoverProperty.vala

src/Builder4/PopoverProperty.bjs
src/Builder4/PopoverProperty.vala

index 691f65a..c43474e 100644 (file)
           }
          ]
         },
-        {
-         "id" : "name",
-         "$ visible" : true,
-         "xtype" : "Entry",
-         "* pack" : "attach_defaults,1,2,0,1",
-         "$ xns" : "Gtk"
-        },
         {
          "label" : "Title",
          "$ visible" : true,
          "xtype" : "Entry",
          "* pack" : "attach_defaults,1,2,2,3",
          "$ xns" : "Gtk"
-        },
-        {
-         "id" : "build_module",
-         "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
-         "* pack" : "attach_defaults,1,2,6,7",
-         "xtype" : "ComboBox",
-         "$ xns" : "Gtk",
-         "items" : [
-          {
-           "id" : "dbcellrenderer",
-           "xtype" : "CellRendererText",
-           "* pack" : "pack_start,true",
-           "$ xns" : "Gtk"
-          },
-          {
-           "id" : "dbmodel",
-           "xtype" : "ListStore",
-           "* pack" : "set_model",
-           "$ columns" : "typeof(string),typeof(string)",
-           "n_columns" : 2,
-           "$ xns" : "Gtk",
-           "| 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"
-          }
-         ]
         }
        ]
       },
index fc37e3b..b4eddb8 100644 (file)
@@ -15,12 +15,8 @@ public class Xcls_PopoverProperty : Object
     public Xcls_build_module build_module;
     public Xcls_dbcellrenderer dbcellrenderer;
     public Xcls_dbmodel dbmodel;
-    public Xcls_name name;
     public Xcls_title title;
     public Xcls_parent parent;
-    public Xcls_build_module build_module;
-    public Xcls_dbcellrenderer dbcellrenderer;
-    public Xcls_dbmodel dbmodel;
     public Xcls_save_btn save_btn;
 
         // my vars (def)
@@ -170,7 +166,7 @@ public class Xcls_PopoverProperty : Object
             var child_1 = new Xcls_Table4( _this );
             child_1.ref();
             this.el.pack_start (  child_1.el , false,false,4 );
-            var child_2 = new Xcls_HButtonBox17( _this );
+            var child_2 = new Xcls_HButtonBox13( _this );
             child_2.ref();
             this.el.pack_end (  child_2.el , false,true,0 );
         }
@@ -226,24 +222,18 @@ public class Xcls_PopoverProperty : Object
             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_name( _this );
+            var child_2 = new Xcls_Label9( _this );
             child_2.ref();
-            this.el.attach_defaults (  child_2.el , 1,2,0,1 );
-            var child_3 = new Xcls_Label10( _this );
+            this.el.attach_defaults (  child_2.el , 0,1,1,2 );
+            var child_3 = new Xcls_title( _this );
             child_3.ref();
-            this.el.attach_defaults (  child_3.el , 0,1,1,2 );
-            var child_4 = new Xcls_title( _this );
+            this.el.attach_defaults (  child_3.el , 1,2,1,2 );
+            var child_4 = new Xcls_Label11( _this );
             child_4.ref();
-            this.el.attach_defaults (  child_4.el , 1,2,1,2 );
-            var child_5 = new Xcls_Label12( _this );
+            this.el.attach_defaults (  child_4.el , 0,1,2,3 );
+            var child_5 = new Xcls_parent( _this );
             child_5.ref();
-            this.el.attach_defaults (  child_5.el , 0,1,2,3 );
-            var child_6 = new Xcls_parent( _this );
-            child_6.ref();
-            this.el.attach_defaults (  child_6.el , 1,2,2,3 );
-            var child_7 = new Xcls_build_module( _this );
-            child_7.ref();
-            this.el.attach_defaults (  child_7.el , 1,2,6,7 );
+            this.el.attach_defaults (  child_5.el , 1,2,2,3 );
         }
 
         // user defined functions
@@ -385,31 +375,7 @@ public class Xcls_PopoverProperty : Object
     }
 
 
-    public class Xcls_name : Object
-    {
-        public Gtk.Entry el;
-        private Xcls_PopoverProperty  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_name(Xcls_PopoverProperty _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_Label10 : Object
+    public class Xcls_Label9 : Object
     {
         public Gtk.Label el;
         private Xcls_PopoverProperty  _this;
@@ -418,7 +384,7 @@ public class Xcls_PopoverProperty : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Label10(Xcls_PopoverProperty _owner )
+        public Xcls_Label9(Xcls_PopoverProperty _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "Title" );
@@ -458,7 +424,7 @@ public class Xcls_PopoverProperty : Object
         // user defined functions
     }
 
-    public class Xcls_Label12 : Object
+    public class Xcls_Label11 : Object
     {
         public Gtk.Label el;
         private Xcls_PopoverProperty  _this;
@@ -467,7 +433,7 @@ public class Xcls_PopoverProperty : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Label12(Xcls_PopoverProperty _owner )
+        public Xcls_Label11(Xcls_PopoverProperty _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "Name" );
@@ -508,121 +474,8 @@ public class Xcls_PopoverProperty : Object
         // user defined functions
     }
 
-    public class Xcls_build_module : Object
-    {
-        public Gtk.ComboBox el;
-        private Xcls_PopoverProperty  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_build_module(Xcls_PopoverProperty _owner )
-        {
-            _this = _owner;
-            _this.build_module = this;
-            this.el = new Gtk.ComboBox();
-
-            // my vars (dec)
-
-            // set gobject values
-            var child_0 = new Xcls_dbcellrenderer( _this );
-            child_0.ref();
-            this.el.pack_start (  child_0.el , true );
-            var child_1 = new Xcls_dbmodel( _this );
-            child_1.ref();
-            this.el.set_model (  child_1.el  );
-
-            // init method
-
-            this.el.add_attribute(_this.dbcellrenderer.el , "markup", 1 );
-        }
-
-        // user defined functions
-    }
-    public class Xcls_dbcellrenderer : Object
-    {
-        public Gtk.CellRendererText el;
-        private Xcls_PopoverProperty  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_dbcellrenderer(Xcls_PopoverProperty _owner )
-        {
-            _this = _owner;
-            _this.dbcellrenderer = this;
-            this.el = new Gtk.CellRendererText();
-
-            // my vars (dec)
-
-            // set gobject values
-        }
-
-        // user defined functions
-    }
-
-    public class Xcls_dbmodel : Object
-    {
-        public Gtk.ListStore el;
-        private Xcls_PopoverProperty  _this;
-
-
-            // my vars (def)
-
-        // ctor
-        public Xcls_dbmodel(Xcls_PopoverProperty _owner )
-        {
-            _this = _owner;
-            _this.dbmodel = this;
-            this.el = new Gtk.ListStore( 2, typeof(string),typeof(string) );
-
-            // my vars (dec)
-
-            // set gobject values
-        }
-
-        // user defined functions
-        public void loadData (Gee.ArrayList<string> data, 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, "aaa  - Just add Element - aaa");
-        
-            el.append(out iter);
-        
-            
-            el.set_value(iter, 0, "");
-            el.set_value(iter, 1, "-- select a module --");
-            _this.build_module.el.set_active_iter(iter);
-            
-            for (var i = 0; i < data.size;i++) {
-            
-        
-                el.append(out iter);
-                
-                el.set_value(iter, 0, data.get(i));
-                el.set_value(iter, 1, data.get(i));
-                
-                if (data.get(i) == cur) {
-                    _this.build_module.el.set_active_iter(iter);
-                }
-                
-            }
-             this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          
-                                             
-        }
-    }
-
-
 
-    public class Xcls_HButtonBox17 : Object
+    public class Xcls_HButtonBox13 : Object
     {
         public Gtk.HButtonBox el;
         private Xcls_PopoverProperty  _this;
@@ -631,7 +484,7 @@ public class Xcls_PopoverProperty : Object
             // my vars (def)
 
         // ctor
-        public Xcls_HButtonBox17(Xcls_PopoverProperty _owner )
+        public Xcls_HButtonBox13(Xcls_PopoverProperty _owner )
         {
             _this = _owner;
             this.el = new Gtk.HButtonBox();
@@ -642,7 +495,7 @@ public class Xcls_PopoverProperty : Object
             this.el.margin_right = 4;
             this.el.margin_left = 4;
             this.el.margin_bottom = 4;
-            var child_0 = new Xcls_Button18( _this );
+            var child_0 = new Xcls_Button14( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
             var child_1 = new Xcls_save_btn( _this );
@@ -652,7 +505,7 @@ public class Xcls_PopoverProperty : Object
 
         // user defined functions
     }
-    public class Xcls_Button18 : Object
+    public class Xcls_Button14 : Object
     {
         public Gtk.Button el;
         private Xcls_PopoverProperty  _this;
@@ -661,7 +514,7 @@ public class Xcls_PopoverProperty : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Button18(Xcls_PopoverProperty _owner )
+        public Xcls_Button14(Xcls_PopoverProperty _owner )
         {
             _this = _owner;
             this.el = new Gtk.Button();