X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=RooProject.vala;h=23fcbfa2f479577f535df297ca61eff75f31013a;hb=54127f163aeb7bbd316788ec9a03b29b3661aae2;hp=7c009ed4a897af1234474c7c777edfedcab21e1b;hpb=fc6b8b6f16d93470f034ccf0b3b66a917dc1bab5;p=gitlive diff --git a/RooProject.vala b/RooProject.vala index 7c009ed4..23fcbfa2 100644 --- a/RooProject.vala +++ b/RooProject.vala @@ -6,6 +6,17 @@ 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 _projects; static int loadcount = 0; const string roourl = "https://roojs.com/admin.php/Roo"; @@ -22,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 projects() { @@ -38,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;