StatusIcon.vala
[gitlive] / StatusIcon.vala
index d88ce96..feace50 100644 (file)
@@ -247,13 +247,14 @@ public class StatusIconA : StatusIcon {
                 this.accel_group = null;
                 
                 this.activate.connect( () => {
+                    
+                    this.pullAll();
+                    /*
                     GitMonitor.gitmonitor.stop();
                     var tr = GitRepo.list();
                     
                     
                     
-                    
-                    
                     for (var i= 0; i< tr.length;i++) {
                         statusicon.set_from_stock( 
                                i%2 == 0 ?  Gtk.Stock.FULLSCREEN : Gtk.Stock.LEAVE_FULLSCREEN );
@@ -288,6 +289,7 @@ public class StatusIconA : StatusIcon {
                         }        
 
                     } 
+                    */
                            
                            
                 });
@@ -296,7 +298,8 @@ public class StatusIconA : StatusIcon {
             {
                        var tr = GitRepo.list();
                 
-                
+                GitMonitor.gitmonitor.stop();
+                    
                 
                 var total = tr.length;
                 
@@ -312,9 +315,10 @@ public class StatusIconA : StatusIcon {
                     //try {
                         statusicon.set_tooltip_text("pull: " + repo.name);
                         var str = "";
-                        repo.pull_async((out result) {
-                               total--;`
-                               if (!Regex.match_simple ("Already up-to-date", str) ) {
+                        repo.pull_async((res) => {
+                        
+                               total--;
+                               if (!Regex.match_simple ("Already up-to-date", res) ) {
                                         
                                
                                                str += str.length > 0 ? "\n" : "";
@@ -322,11 +326,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 +341,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 +351,7 @@ public class StatusIconA : StatusIcon {
                    // }        
 
                 } 
-                statusicon.set_tooltip_text("Gitlive");
+