X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitMonitorQueue.vala;h=00ab4655f9249e7530f0a98aa071a5eaf3b23313;hp=561aa669d7e513b67adae3b2248a25b346f3367c;hb=9e641e366549656621a3e4fc4950b62c4b395650;hpb=6ba3985908498235b2ef11df2681d4072293da64 diff --git a/GitMonitorQueue.vala b/GitMonitorQueue.vala index 561aa669..00ab4655 100644 --- a/GitMonitorQueue.vala +++ b/GitMonitorQueue.vala @@ -28,7 +28,7 @@ public class GitMonitorQueue : MonitorNamePathDir { this.vname = ""; return; } - + this.gitpath = GitMonitor.gitlive + "/" + vpath_ar[0]; @@ -44,9 +44,7 @@ public class GitMonitorQueue : MonitorNamePathDir { this.repo = GitRepo.get(this.gitpath); // trigger the suggestion to start a new branch - if (!this.shouldIgnore() && !this.repo.currentBranch.name.has_prefix("wip_")) { - NewBranch.singleton().show(this.repo); - } + } @@ -102,50 +100,50 @@ public class GitMonitorQueue : MonitorNamePathDir { /** -- statics --*/ - public static int indexOfAdd( Array add_files, string add) + public static int indexOfAdd( Gee.ArrayList add_files, string add) { - for(var i =0; i < add_files.length; i++) { - if (add_files.index(i).vname == add) { + for(var i =0; i < add_files.size; i++) { + if (add_files.get(i).vname == add) { return i; } } return -1; } - public static int indexOfMessage(Array messages, string message) { - for(var i =0; i < messages.length; i++) { - if (messages.index(i).message == message) { + public static int indexOfMessage(Gee.ArrayList messages, string message) { + for(var i =0; i < messages.size; i++) { + if (messages.get(i).message == message) { return i; } } return -1; } - public static string messageToString(Array messages ) { + public static string messageToString(Gee.ArrayList messages ) { string[] ret = {}; - for(var i =0; i < messages.length; i++) { - ret+= messages.index(i).message; + for(var i =0; i < messages.size; i++) { + ret+= messages.get(i).message; } return string.joinv("\n",ret); } - public static string queueArrayToString(Array list) { + public static string queueArrayToString(Gee.ArrayList list) { var ret = ""; - for(var i =0; i < list.length; i++) { + for(var i =0; i < list.size; i++) { - ret += (ret.length > 0 ? ", " : "") + list.index(i).vname; + ret += (ret.length > 0 ? ", " : "") + list.get(i).vname; } return ret; } - public static bool queueHas(Array list , GitMonitorQueue cmd_s, string action) { - for(var i =0; i < list.length; i++) { - var test = list.index(i); - if (list.index(i).gitpath != cmd_s.gitpath) { + public static bool queueHas(Gee.ArrayList list , GitMonitorQueue cmd_s, string action) { + for(var i =0; i < list.size; i++) { + var test = list.get(i); + if (list.get(i).gitpath != cmd_s.gitpath) { continue; } - if (list.index(i).vname != cmd_s.vname) { + if (list.get(i).vname != cmd_s.vname) { continue; } - if (list.index(i).action != action) { + if (list.get(i).action != action) { continue; } return true;