StatusIcon.vala
[gitlive] / StatusIcon.vala
index d88ce96..c8fc007 100644 (file)
@@ -296,7 +296,8 @@ public class StatusIconA : StatusIcon {
             {
                        var tr = GitRepo.list();
                 
-                
+                GitMonitor.gitmonitor.stop();
+                    
                 
                 var total = tr.length;
                 
@@ -312,9 +313,10 @@ public class StatusIconA : StatusIcon {
                     //try {
                         statusicon.set_tooltip_text("pull: " + repo.name);
                         var str = "";
-                        repo.pull_async((out result) {
+                        repo.pull_async((string res) => {
+                        
                                total--;`
-                               if (!Regex.match_simple ("Already up-to-date", str) ) {
+                               if (!Regex.match_simple ("Already up-to-date", res) ) {
                                         
                                
                                                str += str.length > 0 ? "\n" : "";
@@ -322,11 +324,13 @@ public class StatusIconA : StatusIcon {
                                        }
                                        if (total < 1) {
                                        var notification = new Notify.Notification( 
-                                            "Updated " + repo.name,
+                                            "Pull completed ",
                                             str,
-                                              "dialog-information"
+                                            "dialog-information"
                                        );
-                               statusicon.set_tooltip_text("Gitlive");
+                                       notification.set_timeout(20);
+                                       notification.show();
+                                       statusicon.set_tooltip_text("Gitlive");
                              
                             
                                                GitMonitor.gitmonitor.start();
@@ -335,8 +339,7 @@ public class StatusIconA : StatusIcon {
                                 // do not care if it's already in sycn..
                         
                     
-                        notification.set_timeout(20);
-                        notification.show();
+                       
                                  
                     //} catch(Error e) {
                    //     print("notification or push errror- probably to many in queue..");
@@ -346,7 +349,7 @@ public class StatusIconA : StatusIcon {
                    // }        
 
                 } 
-                statusicon.set_tooltip_text("Gitlive");
+