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

Builder4/ValaProjectSettings.bjs
Builder4/ValaProjectSettings.vala

index 9bf29e4..a1077fd 100644 (file)
                                                     "* pack" : "set_model",
                                                     "xtype" : "ListStore",
                                                     "$ n_columns" : 2,
-                                                    "| void load" : "() {\n\n}\n",
+                                                    "| 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     ",
                                                     "$ xns" : "Gtk"
                                                 },
index fcb66d5..087f67c 100644 (file)
@@ -965,7 +965,26 @@ public class ValaProjectSettings : Object
 
         // user defined functions 
         public void load () {
-        
+         
+          this.el.clear();
+          
+            
+             var cg = _this.project.compilegroups;
+             
+         
+            Gtk.TreeIter citer;
+            cg.foreach((key,val) => {
+                if (key == "_default_") {
+                    continue;
+                }
+            
+                 this.el.append(out citer);   
+                 
+                this.el.set_value(citer, 0,   key ); // title 
+                //this.el.set_value(citer, 1,   items.get(i) );
+            })
+            this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+            
         }
     }
     public class Xcls_TreeViewColumn31 : Object