projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
279f308
)
StatusIcon.vala
author
Alan Knowles
<alan@roojs.com>
Wed, 1 Aug 2018 09:19:05 +0000
(17:19 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 1 Aug 2018 09:19:05 +0000
(17:19 +0800)
StatusIcon.vala
patch
|
blob
|
history
diff --git
a/StatusIcon.vala
b/StatusIcon.vala
index
e45c18b
..
74ef174
100644
(file)
--- a/
StatusIcon.vala
+++ b/
StatusIcon.vala
@@
-302,6
+302,7
@@
public class StatusIconA : StatusIcon {
this.total = tr.length;
this.total = tr.length;
+ this.has_error = 0;
for (var i= 0; i< tr.length;i++) {
statusicon.set_from_stock(
for (var i= 0; i< tr.length;i++) {
statusicon.set_from_stock(
@@
-312,7
+313,7
@@
public class StatusIconA : StatusIcon {
//this.ref();
statusicon.set_tooltip_text("pull: " + repo.name);
//this.ref();
statusicon.set_tooltip_text("pull: " + repo.name);
-
+
repo.pull_async(this.pullAllCallback);
// do not care if it's already in sycn..
repo.pull_async(this.pullAllCallback);
// do not care if it's already in sycn..
@@
-325,11
+326,17
@@
public class StatusIconA : StatusIcon {
}
uint total = 0;
}
uint total = 0;
-
+ unit has_error = 0;
- void pullAllCallback(GitRepo repo, string res)
+ void pullAllCallback(GitRepo repo,
int err,
string res)
{
this.total--;
{
this.total--;
+
+ if (err > 0) {
+
+
+ }
+
if (!Regex.match_simple ("Already up-to-date", res) ) {
var notification = new Notify.Notification(
"Pull completed ",
if (!Regex.match_simple ("Already up-to-date", res) ) {
var notification = new Notify.Notification(
"Pull completed ",
@@
-345,8
+352,7
@@
public class StatusIconA : StatusIcon {
if (this.total < 1) {
statusicon.set_tooltip_text("Gitlive");
if (this.total < 1) {
statusicon.set_tooltip_text("Gitlive");
-
-
+
GitMonitor.gitmonitor.start();
//this.unref();
//repo.unref();
GitMonitor.gitmonitor.start();
//this.unref();
//repo.unref();