sync
[gitlive] / GitMonitorQueue.vala
index 561aa66..00ab465 100644 (file)
@@ -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<GitMonitorQueue> add_files, string add)
+               public static int indexOfAdd( Gee.ArrayList<GitMonitorQueue> 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<GitMonitorQueue> messages, string message)  {
-                       for(var i =0; i < messages.length; i++) {
-                               if (messages.index(i).message == message) {
+               public static  int indexOfMessage(Gee.ArrayList<GitMonitorQueue> 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<GitMonitorQueue> messages ) {
+               public static string messageToString(Gee.ArrayList<GitMonitorQueue> 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<GitMonitorQueue> list) {
+               public static string queueArrayToString(Gee.ArrayList<GitMonitorQueue> 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<GitMonitorQueue> 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<GitMonitorQueue> 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;