src/Project/Project.vala
[app.Builder.js] / src / Project / Project.vala
index 421a278..b3b6780 100644 (file)
@@ -42,7 +42,7 @@ namespace Project {
                public  string xtype;
                
                public Json.Object json_project_data;
-               
+               public Palete.RooDatabase roo_database;
                 
                bool is_scanned; 
           
@@ -60,7 +60,8 @@ namespace Project {
                        if (path.length > 0) {
                                this.paths.set(path, "dir");
                        }
-                       
+                       // dummy roo database...
+                       this.roo_database = new Palete.RooDatabase.from_cfg ("", "", "", "");
                    
                    
                }
@@ -151,7 +152,7 @@ namespace Project {
 
                        
                        var proj = factory(xtype, fpath);
-                       
+
                        proj.json_project_data  = obj; // store the original object...
                        
                        proj.fn =  Path.get_basename(jsonfile).split(".")[0];
@@ -177,6 +178,10 @@ namespace Project {
                                proj.paths.set(key, "dir");
                        });
                        projects.set(proj.id,proj);
+                       
+                       this.roo_database = Palete.RooDatabase.from_project(this);
+                       
+                       
                }
                
                
@@ -519,6 +524,19 @@ namespace Project {
                    }
                    
                }
+               // wrapper around the javascript data...
+               public string get_string_member(string key) {
+                       
+                       if (!this.json_project_data.has_member(key)) {
+                               return "";
+                       }
+                       var  ret = this.json_project_data.get_string_member(key);
+                       if (ret == null) {
+                               return "";
+                       }
+                       return ret;
+                       
+               }
                  
        }
 }