MergeBranch.bjs
[gitlive] / RooProject.vala
index 448bd9a..23fcbfa 100644 (file)
@@ -1,8 +1,22 @@
+/**
+This a mostly a static class that manages an array of it'self...
 
+*/
 
 static RooProject  _RooProject;
 public class RooProject  : Object 
 {
+       
+       public string  id; // not really important that they are numbers..
+       public string code;
+       public string name;
+       public string type;
+
+       
+       // --- static from here on....
+       
+       
+       
        static Gee.ArrayList<RooProject> _projects;
        static int loadcount = 0;
        const string roourl = "https://roojs.com/admin.php/Roo";  
@@ -19,11 +33,6 @@ public class RooProject  : Object
         return _RooProject;
     }
        
-       public string  id; // not really important that they are numbers..
-       public string code;
-       public string name;
-       public string type;
-
        
        public static Gee.ArrayList<RooProject> projects()
        {
@@ -35,17 +44,12 @@ public class RooProject  : Object
        
        public static  RooProject? getProjectByRepo(GitRepo repo)
        {
-               RooProject.singleton();
+               RooProject.singleton(); // init...
                
                // fixme -- needs to get from rep list..
-               var rt = RooTicket.singleton();         
-               if (rt.repos.size < 1) {
-                       rt.loadRepos();
-               }
-                
-               
                var pid = "";
-               foreach(var roo_repo in rt.repos) {
+               foreach(var roo_repo in RooRepo.repos()) {
                        if (roo_repo.shortname == repo.name) {
                                pid = roo_repo.project_id;
                                break;