sync
authorAlan Knowles <alan@roojs.com>
Mon, 1 Dec 2014 02:56:56 +0000 (10:56 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 1 Dec 2014 02:56:56 +0000 (10:56 +0800)
Builder4/ValaProjectSettings.bjs
Builder4/ValaProjectSettings.vala

index 0f23d22..918088f 100644 (file)
                     "items" : [
                         {
                             "id" : "label_global",
-                            "* pack" : false,
                             "xtype" : "Label",
+                            "* pack" : false,
                             "$ xns" : "Gtk",
                             "utf8 label" : "Global"
                         },
                         {
                             "id" : "label_targets",
-                            "xtype" : "Label",
                             "* pack" : false,
+                            "xtype" : "Label",
                             "$ xns" : "Gtk",
                             "utf8 label" : "Targets"
                         },
@@ -47,8 +47,8 @@
                                 },
                                 {
                                     "id" : "compile_flags",
-                                    "* pack" : "pack_start,false,false,0",
                                     "xtype" : "Entry",
+                                    "* pack" : "pack_start,false,false,0",
                                     "$ xns" : "Gtk"
                                 },
                                 {
                                     "items" : [
                                         {
                                             "gboolean headers_visible" : false,
-                                            "xtype" : "TreeView",
                                             "* pack" : "add",
+                                            "xtype" : "TreeView",
                                             "string id" : "default_packages_tree",
                                             "$ xns" : "Gtk",
                                             "items" : [
                                                 {
                                                     "id" : "default_packages_tree_store",
-                                                    "xtype" : "ListStore",
                                                     "* pack" : "set_model",
+                                                    "xtype" : "ListStore",
                                                     "$ n_columns" : 2,
                                                     "| void load" : "() {\n \n    var def = _this.project.compilegroups.get(\"_default_\");\n     var items  = def.packages;\n    \n    this.el.clear();\n    var pal = (Palete.Gtk) Palete.factory(\"Gtk\");\n    var pkgs = pal.packages();\n    print(\"ValaProjectSettings:packages load %d\\n\", pkgs.size);\n\n    Gtk.TreeIter citer;\n\n    for(var i =0 ; i < pkgs.size; i++) {\n         this.el.append(out citer);   \n         \n        this.el.set_value(citer, 0,   pkgs.get(i) ); // title \n        this.el.set_value(citer, 1,   items.contains(pkgs.get(i)) );\n    }\n    this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n    \n}\n",
                                                     "$ columns" : "    typeof(string),  // 0 key type\n      typeof(bool)",
@@ -89,8 +89,8 @@
                                                     "items" : [
                                                         {
                                                             "id" : "packages_render",
-                                                            "xtype" : "CellRendererText",
                                                             "* pack" : "pack_start,false",
+                                                            "xtype" : "CellRendererText",
                                                             "$ xns" : "Gtk"
                                                         }
                                                     ]
                                                                 "toggled" : "(  path_string) =>  { \n    var m = _this.default_packages_tree_store.el;\n   Gtk.TreeIter iter;\n   Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n   m.get_iter (out iter, path);\n   GLib.Value val;\n   m.get_value(iter, 1, out val);\n   m.set_value(iter, 1,  ((bool) val) ? false :true); \n     GLib.Value fval;  \n   m.get_value(iter, 0, out fval);\n   var fn = (string)fval;\n    \n    var def = _this.project.compilegroups.get(\"_default_\");\n    var items  = def.packages;\n    if ((bool)val) {\n        // renive\n        items.remove(fn);\n    } else {\n        items.add(fn);\n    }\n    \n}"
                                                             },
                                                             "id" : "packages_render_use",
-                                                            "* pack" : "pack_start,false",
                                                             "xtype" : "CellRendererToggle",
+                                                            "* pack" : "pack_start,false",
                                                             "$ xns" : "Gtk",
                                                             "gboolean activatable" : true
                                                         }
                                             "items" : [
                                                 {
                                                     "id" : "default_directory_tree_store",
-                                                    "xtype" : "ListStore",
                                                     "* pack" : "set_model",
+                                                    "xtype" : "ListStore",
                                                     "$ n_columns" : 1,
                                                     "| void load" : "() {\n \n  this.el.clear();\n  \n    \n     var def = _this.project.compilegroups.get(\"_default_\");\n     var items  = def.sources;\n     \n \n    Gtk.TreeIter citer;\n\n    for(var i =0 ; i < items.size; i++) {\n         this.el.append(out citer);   \n         \n        this.el.set_value(citer, 0,   items.get(i) ); // title \n        //this.el.set_value(citer, 1,   items.get(i) );\n    }\n    this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n    \n}\n",
                                                     "$ columns" : "    typeof(string)\n     ",
                                                     "items" : [
                                                         {
                                                             "id" : "directory_render",
-                                                            "xtype" : "CellRendererText",
                                                             "* pack" : "pack_start,false",
+                                                            "xtype" : "CellRendererText",
                                                             "$ xns" : "Gtk"
                                                         }
                                                     ]
                         },
                         {
                             "gint position" : 300,
-                            "* pack" : "append_page,_this.label_targets.el",
                             "xtype" : "HPaned",
+                            "* pack" : "append_page,_this.label_targets.el",
                             "$ xns" : "Gtk",
                             "items" : [
                                 {
                                     "* init" : "{  \nthis.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n\n}\n",
-                                    "* pack" : "add1",
                                     "xtype" : "ScrolledWindow",
+                                    "* pack" : "add1",
                                     "$ xns" : "Gtk",
                                     "items" : [
                                         {
                                             "id" : "targets_tree_menu",
-                                            "xtype" : "Menu",
                                             "* pack" : "add",
+                                            "xtype" : "Menu",
                                             "$ xns" : "Gtk",
                                             "items" : [
                                                 {
                                             "items" : [
                                                 {
                                                     "id" : "targets_tree_store",
-                                                    "* pack" : "set_model",
                                                     "xtype" : "ListStore",
+                                                    "* pack" : "set_model",
                                                     "$ n_columns" : 2,
                                                     "| void load" : "() {\n \n  this.el.clear();\n  \n    \n     var cg = _this.project.compilegroups;\n     \n   _this.targets_tree.cursor = \"\";\n    Gtk.TreeIter citer;\n    var iter = cg.map_iterator();\n   while(iter.next()) {\n        var key = iter.get_key();\n        if (key == \"_default_\") {\n            continue;\n        }\n    \n         this.el.append(out citer);   \n         \n        this.el.set_value(citer, 0,   key ); // title \n        //this.el.set_value(citer, 1,   items.get(i) );\n    };\n    this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n    \n}\n",
                                                     "$ columns" : "    typeof(string),  // 0 key type\n     typeof(string) // ??\n     ",
                                                                 "edited" : "  (path, newtext) => {\n     \n     Gtk.TreeIter  iter;\n        _this.targets_tree_store.el.get_iter(out iter, new Gtk.TreePath.from_string(path));\n       GLib.Value gval;\n        _this.targets_tree_store.el.get_value(iter,0, out gval);\n        var oldval = (string)gval;\n       if (oldval == newtext) {\n          return;\n        }\n         var cg = _this.project.compilegroups.get(oldval);\n        cg.name = newtext;\n        _this.project.compilegroups.unset(oldval);\n        _this.project.compilegroups.set(newtext, cg);\n    _this.targets_tree_store.load();\n  }"
                                                             },
                                                             "id" : "targets_render",
-                                                            "* pack" : "pack_start,false",
                                                             "xtype" : "CellRendererText",
-                                                            "$ xns" : "Gtk",
-                                                            "gboolean editable" : true
-                                                        }
-                                                    ]
-                                                },
-                                                {
-                                                    "utf8 title" : "use",
-                                                    "* init" : "{\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n }",
-                                                    "* pack" : "append_column",
-                                                    "xtype" : "TreeViewColumn",
-                                                    "gboolean resizable" : false,
-                                                    "$ xns" : "Gtk",
-                                                    "gint fixed_width" : 50,
-                                                    "items" : [
-                                                        {
-                                                            "listeners" : {
-                                                                "toggled" : "(  path_string) =>  { \n    var m = _this.default_packages_tree_store.el;\n   Gtk.TreeIter iter;\n   Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n   m.get_iter (out iter, path);\n   GLib.Value val;\n   m.get_value(iter, 1, out val);\n   m.set_value(iter, 1,  ((bool) val) ? false :true); \n     GLib.Value fval;  \n   m.get_value(iter, 0, out fval);\n   var fn = (string)fval;\n    \n    var def = _this.project.compilegroups.get(\"_default_\");\n    var items  = def.packages;\n    if ((bool)val) {\n        // renive\n        items.remove(fn);\n    } else {\n        items.add(fn);\n    }\n    \n}"
-                                                            },
-                                                            "id" : "targets_render_use",
-                                                            "xtype" : "CellRendererToggle",
                                                             "* pack" : "pack_start,false",
                                                             "$ xns" : "Gtk",
-                                                            "gboolean activatable" : true
+                                                            "gboolean editable" : true
                                                         }
                                                     ]
                                                 }
                                                 "changed" : "()  => {\n        if (_this.targets_tree.cursor.length < 1) {\n        return;\n    }\n    _this.project.compilegroups.get(_this.targets_tree.cursor).target_bin = this.el.text;\n}"
                                             },
                                             "id" : "build_pack_target",
-                                            "* pack" : "pack_start,false,false,0",
                                             "xtype" : "Entry",
+                                            "* pack" : "pack_start,false,false,0",
                                             "$ xns" : "Gtk"
                                         },
                                         {
                                                 "changed" : "() => {\n    if (_this.targets_tree.cursor.length < 1) {\n        return;\n    }\n    _this.project.compilegroups.get(_this.targets_tree.cursor).compile_flags = this.el.text;\n}"
                                             },
                                             "id" : "build_compile_flags",
-                                            "* pack" : "pack_start,false,false,0",
                                             "xtype" : "Entry",
+                                            "* pack" : "pack_start,false,false,0",
                                             "$ xns" : "Gtk"
                                         },
                                         {
                                                     "items" : [
                                                         {
                                                             "id" : "files_tree_store",
-                                                            "* pack" : "set_model",
                                                             "xtype" : "ListStore",
+                                                            "* pack" : "set_model",
                                                             "$ n_columns" : 2,
                                                             "| void load" : "() {\n \n  this.el.clear();\n  \n    \n     var def = _this.project.compilegroups.get(\"_default_\");\n     var items  = def.sources;\n     \n \n    Gtk.TreeIter citer;\n\n    for(var i =0 ; i < items.size; i++) {\n         this.el.append(out citer);   \n         \n        this.el.set_value(citer, 0,   items.get(i) ); // title \n        this.el.set_value(citer, 1,   \"dir\"); // type         \n        this.el.set_value(citer, 2,   false ); // checked \n        /*\n        var files = def.files(items.get(i));\n        \n         for(var j =0 ; j < files.size; j++) {\n            this.el.append(out citer);   \n         \n            this.el.set_value(citer, 0,   files.get(j) ); // title \n            this.el.set_value(citer, 1,   \"file\"); // type         \n            this.el.set_value(citer, 2,   false ); // checked \n\n        }\n        */\n        \n        //this.el.set_value(citer, 1,   items.get(i) );\n    }\n    this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n    \n}\n ",
                                                             "$ columns" : "    typeof(string),  // 0 file name\n     typeof(string), // type (dir orfile)\n     typeof(bool)  // is checked.\n     ",
                                                         },
                                                         {
                                                             "utf8 title" : "name",
-                                                            "* init" : " this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n this.el.add_attribute(_this.files_render.el , \"text\", 1 );\n  ",
+                                                            "* init" : "/* this.el.add_attribute(_this.files_render.el , \"markup\", 2 );\n// this.el.add_attribute(_this.files_render.el , \"text\", 1 ); */\n \n",
                                                             "* pack" : "append_column",
                                                             "xtype" : "TreeViewColumn",
                                                             "gboolean resizable" : true,
                                                             "items" : [
                                                                 {
                                                                     "id" : "files_render",
-                                                                    "xtype" : "CellRendererText",
                                                                     "* pack" : "pack_start,false",
+                                                                    "xtype" : "CellRendererText",
                                                                     "$ xns" : "Gtk"
                                                                 }
                                                             ]
                                                         },
                                                         {
                                                             "utf8 title" : "use",
-                                                            "* init" : "{\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n }",
+                                                            "* init" : "/*\n\n this.el.add_attribute(_this.packages_render_use.el , \"active\", 1 );\n \n */\n ",
                                                             "* pack" : "append_column",
                                                             "xtype" : "TreeViewColumn",
                                                             "gboolean resizable" : false,
                                                                         "toggled" : "(  path_string) =>  { \n    var m = _this.default_packages_tree_store.el;\n   Gtk.TreeIter iter;\n   Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);\n   m.get_iter (out iter, path);\n   GLib.Value val;\n   m.get_value(iter, 1, out val);\n   m.set_value(iter, 1,  ((bool) val) ? false :true); \n     GLib.Value fval;  \n   m.get_value(iter, 0, out fval);\n   var fn = (string)fval;\n    \n    var def = _this.project.compilegroups.get(\"_default_\");\n    var items  = def.packages;\n    if ((bool)val) {\n        // renive\n        items.remove(fn);\n    } else {\n        items.add(fn);\n    }\n    \n}"
                                                                     },
                                                                     "id" : "files_render_use",
-                                                                    "* pack" : "pack_start,false",
                                                                     "xtype" : "CellRendererToggle",
+                                                                    "* pack" : "pack_start,false",
                                                                     "$ xns" : "Gtk",
                                                                     "gboolean activatable" : true
                                                                 }
index 7c33d1e..79cc26e 100644 (file)
@@ -26,7 +26,6 @@ public class ValaProjectSettings : Object
     public Xcls_targets_tree targets_tree;
     public Xcls_targets_tree_store targets_tree_store;
     public Xcls_targets_render targets_render;
-    public Xcls_targets_render_use targets_render_use;
     public Xcls_build_pack_target build_pack_target;
     public Xcls_build_compile_flags build_compile_flags;
     public Xcls_files_tree_store files_tree_store;
@@ -1082,9 +1081,6 @@ public class ValaProjectSettings : Object
             var child_1 = new Xcls_TreeViewColumn35( _this );
             child_1.ref();
             this.el.append_column (  child_1.el  );
-            var child_2 = new Xcls_TreeViewColumn37( _this );
-            child_2.ref();
-            this.el.append_column (  child_2.el  );
 
             // listeners 
             this.el.button_press_event.connect( ( ev) => {
@@ -1268,85 +1264,6 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
     }
-    public class Xcls_TreeViewColumn37 : Object 
-    {
-        public Gtk.TreeViewColumn el;
-        private ValaProjectSettings  _this;
-
-
-            // my vars (def)
-
-        // ctor 
-        public Xcls_TreeViewColumn37(ValaProjectSettings _owner )
-        {
-            _this = _owner;
-            this.el = new Gtk.TreeViewColumn();
-
-            // my vars (dec)
-
-            // set gobject values
-            this.el.title = "use";
-            this.el.resizable = false;
-            this.el.fixed_width = 50;
-            var child_0 = new Xcls_targets_render_use( _this );
-            child_0.ref();
-            this.el.pack_start (  child_0.el , false );
-
-            // init method 
-
-            {
-             this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
-             }        }
-
-        // user defined functions 
-    }
-    public class Xcls_targets_render_use : Object 
-    {
-        public Gtk.CellRendererToggle el;
-        private ValaProjectSettings  _this;
-
-
-            // my vars (def)
-
-        // ctor 
-        public Xcls_targets_render_use(ValaProjectSettings _owner )
-        {
-            _this = _owner;
-            _this.targets_render_use = this;
-            this.el = new Gtk.CellRendererToggle();
-
-            // my vars (dec)
-
-            // set gobject values
-            this.el.activatable = true;
-
-            // listeners 
-            this.el.toggled.connect( (  path_string) =>  { 
-                var m = _this.default_packages_tree_store.el;
-               Gtk.TreeIter iter;
-               Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
-               m.get_iter (out iter, path);
-               GLib.Value val;
-               m.get_value(iter, 1, out val);
-               m.set_value(iter, 1,  ((bool) val) ? false :true); 
-                 GLib.Value fval;  
-               m.get_value(iter, 0, out fval);
-               var fn = (string)fval;
-                
-                var def = _this.project.compilegroups.get("_default_");
-                var items  = def.packages;
-                if ((bool)val) {
-                    // renive
-                    items.remove(fn);
-                } else {
-                    items.add(fn);
-                }
-                
-            });
-        }
-
-        // user defined functions 
-    }
     public class Xcls_set_vbox : Object 
     {
         public Gtk.VBox el;
@@ -1364,29 +1281,29 @@ public class ValaProjectSettings : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_Label40( _this );
+            var child_0 = new Xcls_Label38( _this );
             child_0.ref();
             this.el.pack_start (  child_0.el , false,false,0 );
             var child_1 = new Xcls_build_pack_target( _this );
             child_1.ref();
             this.el.pack_start (  child_1.el , false,false,0 );
-            var child_2 = new Xcls_Label42( _this );
+            var child_2 = new Xcls_Label40( _this );
             child_2.ref();
             this.el.pack_start (  child_2.el , false,false,0 );
             var child_3 = new Xcls_build_compile_flags( _this );
             child_3.ref();
             this.el.pack_start (  child_3.el , false,false,0 );
-            var child_4 = new Xcls_Label44( _this );
+            var child_4 = new Xcls_Label42( _this );
             child_4.ref();
             this.el.pack_start (  child_4.el , false,false,0 );
-            var child_5 = new Xcls_ScrolledWindow45( _this );
+            var child_5 = new Xcls_ScrolledWindow43( _this );
             child_5.ref();
             this.el.pack_start (  child_5.el , true,true,0 );
         }
 
         // user defined functions 
     }
-    public class Xcls_Label40 : Object 
+    public class Xcls_Label38 : Object 
     {
         public Gtk.Label el;
         private ValaProjectSettings  _this;
@@ -1395,7 +1312,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Label40(ValaProjectSettings _owner )
+        public Xcls_Label38(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "target filename" );
@@ -1437,7 +1354,7 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
     }
-    public class Xcls_Label42 : Object 
+    public class Xcls_Label40 : Object 
     {
         public Gtk.Label el;
         private ValaProjectSettings  _this;
@@ -1446,7 +1363,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Label42(ValaProjectSettings _owner )
+        public Xcls_Label40(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "compile flags" );
@@ -1488,7 +1405,7 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
     }
-    public class Xcls_Label44 : Object 
+    public class Xcls_Label42 : Object 
     {
         public Gtk.Label el;
         private ValaProjectSettings  _this;
@@ -1497,7 +1414,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_Label44(ValaProjectSettings _owner )
+        public Xcls_Label42(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.Label( "Files to compile" );
@@ -1509,7 +1426,7 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
     }
-    public class Xcls_ScrolledWindow45 : Object 
+    public class Xcls_ScrolledWindow43 : Object 
     {
         public Gtk.ScrolledWindow el;
         private ValaProjectSettings  _this;
@@ -1518,7 +1435,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_ScrolledWindow45(ValaProjectSettings _owner )
+        public Xcls_ScrolledWindow43(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.ScrolledWindow( null, null );
@@ -1552,10 +1469,10 @@ public class ValaProjectSettings : Object
             var child_0 = new Xcls_files_tree_store( _this );
             child_0.ref();
             this.el.set_model (  child_0.el  );
-            var child_1 = new Xcls_TreeViewColumn48( _this );
+            var child_1 = new Xcls_TreeViewColumn46( _this );
             child_1.ref();
             this.el.append_column (  child_1.el  );
-            var child_2 = new Xcls_TreeViewColumn50( _this );
+            var child_2 = new Xcls_TreeViewColumn48( _this );
             child_2.ref();
             this.el.append_column (  child_2.el  );
         }
@@ -1622,7 +1539,7 @@ public class ValaProjectSettings : Object
             
         }
     }
-    public class Xcls_TreeViewColumn48 : Object 
+    public class Xcls_TreeViewColumn46 : Object 
     {
         public Gtk.TreeViewColumn el;
         private ValaProjectSettings  _this;
@@ -1631,7 +1548,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
+        public Xcls_TreeViewColumn46(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.TreeViewColumn();
@@ -1647,8 +1564,8 @@ public class ValaProjectSettings : Object
 
             // init method 
 
-            this.el.add_attribute(_this.files_render.el , "markup", 2 );
-             this.el.add_attribute(_this.files_render.el , "text", 1 );        }
+            /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
+            // this.el.add_attribute(_this.files_render.el , "text", 1 ); */        }
 
         // user defined functions 
     }
@@ -1674,7 +1591,7 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
     }
-    public class Xcls_TreeViewColumn50 : Object 
+    public class Xcls_TreeViewColumn48 : Object 
     {
         public Gtk.TreeViewColumn el;
         private ValaProjectSettings  _this;
@@ -1683,7 +1600,7 @@ public class ValaProjectSettings : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_TreeViewColumn50(ValaProjectSettings _owner )
+        public Xcls_TreeViewColumn48(ValaProjectSettings _owner )
         {
             _this = _owner;
             this.el = new Gtk.TreeViewColumn();
@@ -1700,9 +1617,11 @@ public class ValaProjectSettings : Object
 
             // init method 
 
-            {
+            /*
+            
              this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
-             }        }
+             
+             */        }
 
         // user defined functions 
     }