X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitMonitorQueue.vala;h=00ab4655f9249e7530f0a98aa071a5eaf3b23313;hp=1af6eca8fcb9e94d313d8b6a85ebf2bcce1316ea;hb=9e641e366549656621a3e4fc4950b62c4b395650;hpb=687788b547e87d4c8f915e175d8896ae7ffdbd47 diff --git a/GitMonitorQueue.vala b/GitMonitorQueue.vala index 1af6eca8..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]; @@ -45,10 +45,9 @@ public class GitMonitorQueue : MonitorNamePathDir { // trigger the suggestion to start a new branch - NewBranch.show(this.repo); - } + public bool shouldIgnore() { @@ -101,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;