Builder4/ValaProjectSettings.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 19 Nov 2014 11:27:34 +0000 (19:27 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 19 Nov 2014 11:27:34 +0000 (19:27 +0800)
Builder4/ValaProjectSettings.vala

Builder4/ValaProjectSettings.bjs
Builder4/ValaProjectSettings.vala

index f62fd59..c897969 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",
-                                                            "xtype" : "CellRendererToggle",
                                                             "* pack" : "pack_start,false",
+                                                            "xtype" : "CellRendererToggle",
                                                             "$ 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" : [
                                                 {
                                                     "* pack" : "add",
                                                     "xtype" : "MenuItem",
                                                     "$ xns" : "Gtk",
-                                                    "utf8 label" : "Remove File/Directory"
+                                                    "utf8 label" : "Remove Target"
                                                 }
                                             ]
                                         },
                                         {
                                             "id" : "targets_tree",
-                                            "xtype" : "TreeView",
                                             "* pack" : "add",
+                                            "xtype" : "TreeView",
                                             "$ xns" : "Gtk",
                                             "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 \n    Gtk.TreeIter citer;\n    cg.foreach((key,val) => {\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     ",
                                                     "items" : [
                                                         {
                                                             "id" : "targets_render",
-                                                            "* pack" : "pack_start,false",
                                                             "xtype" : "CellRendererText",
+                                                            "* pack" : "pack_start,false",
                                                             "$ xns" : "Gtk"
                                                         }
                                                     ]
                                                             "items" : [
                                                                 {
                                                                     "id" : "files_render",
-                                                                    "xtype" : "CellRendererText",
                                                                     "* pack" : "pack_start,false",
+                                                                    "xtype" : "CellRendererText",
                                                                     "$ xns" : "Gtk"
                                                                 }
                                                             ]
index 9d05d8d..de464c5 100644 (file)
@@ -1028,7 +1028,7 @@ public class ValaProjectSettings : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.label = "Remove File/Directory";
+            this.el.label = "Remove Target";
 
             // listeners 
             this.el.activate.connect( ()  => {