projects
/
gitlive
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MergeBranch.bjs
[gitlive]
/
RooRepo.vala
diff --git
a/RooRepo.vala
b/RooRepo.vala
index
d7bf4f4
..
eb47406
100644
(file)
--- a/
RooRepo.vala
+++ b/
RooRepo.vala
@@
-5,25
+5,29
@@
static RooRepo _RooRepo ;
public class RooRepo : Object
{
public class RooRepo : Object
{
- const string roourl = "https://roojs.com/admin.php/Roo";
-
+
public string id; // not really important that they are numbers..
public string project_id;
public string description;
public string shortname;
public string id; // not really important that they are numbers..
public string project_id;
public string description;
public string shortname;
+ // -- static below...
+ const string roourl = "https://roojs.com/admin.php/Roo";
+ static Gee.ArrayList<RooRepo> _repos; // only available for singletonn.
+ static int loadcount = 0;
+
static RooRepo init()
{
if (_RooRepo == null) {
_RooRepo = new RooRepo();
static RooRepo init()
{
if (_RooRepo == null) {
_RooRepo = new RooRepo();
+ RooRepo.loadcount = 0;
RooRepo.load();
}
return _RooRepo;
}
RooRepo.load();
}
return _RooRepo;
}
- static Gee.ArrayList<RooRepo> _repos; // only available for singletonn.
- static int loadcount = 0;
+
public static Gee.ArrayList<RooRepo> repos() {
RooRepo.init();
return RooRepo._repos;
public static Gee.ArrayList<RooRepo> repos() {
RooRepo.init();
return RooRepo._repos;
@@
-40,6
+44,16
@@
public class RooRepo : Object
GLib.debug("ADD project %s : %s : %s", add.id, add.shortname, add.project_id);
return add;
}
GLib.debug("ADD project %s : %s : %s", add.id, add.shortname, add.project_id);
return add;
}
+
+ public static void reload() /// has to be called on singleton..
+ {
+ RooRepo.loadcount = 0;
+ RooRepo.init();
+ if (RooRepo.loadcount == 0 ) {
+ RooRepo.load();
+ }
+ }
+
static void load() // only called from above
{
static void load() // only called from above
{