From b3a69cb6e34d3647b6dfa4baa449a711999a6a0e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Sat, 23 Sep 2017 13:13:41 +0800 Subject: [PATCH] StatusIcon.vala --- StatusIcon.vala | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/StatusIcon.vala b/StatusIcon.vala index 2446dd21..d88ce961 100644 --- a/StatusIcon.vala +++ b/StatusIcon.vala @@ -288,10 +288,7 @@ public class StatusIconA : StatusIcon { } } - statusicon.set_tooltip_text("Gitlive"); - - - GitMonitor.gitmonitor.start(); + }); } @@ -316,23 +313,27 @@ public class StatusIconA : StatusIcon { statusicon.set_tooltip_text("pull: " + repo.name); var str = ""; repo.pull_async((out result) { - total--; - str += str.length > 0 ? "\n" : ""; - str += res; - if (total < 1) { - + total--;` + if (!Regex.match_simple ("Already up-to-date", str) ) { + + + str += str.length > 0 ? "\n" : ""; + str += "Updated: " +repo.name + "\n" + res +"\n"; + } + if (total < 1) { + var notification = new Notify.Notification( + "Updated " + repo.name, + str, + "dialog-information" + ); + statusicon.set_tooltip_text("Gitlive"); + + + GitMonitor.gitmonitor.start(); } }); // do not care if it's already in sycn.. - if (Regex.match_simple ("Already up-to-date", str) ) { - continue; - } - var notification = new Notify.Notification( - "Updated " + repo.name, - str, - "dialog-information" - - ); + notification.set_timeout(20); notification.show(); -- 2.39.2