projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d672931
)
StatusIcon.vala
author
Alan Knowles
<alan@roojs.com>
Mon, 14 Aug 2017 02:54:54 +0000
(10:54 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 14 Aug 2017 02:54:54 +0000
(10:54 +0800)
StatusIcon.vala
patch
|
blob
|
history
diff --git
a/StatusIcon.vala
b/StatusIcon.vala
index
8554b46
..
e728ff4
100644
(file)
--- a/
StatusIcon.vala
+++ b/
StatusIcon.vala
@@
-105,13
+105,29
@@
public class StatusIconA : StatusIcon {
void resume()
{
this.set_from_stock( Gtk.Stock.MEDIA_PLAY );
void resume()
{
this.set_from_stock( Gtk.Stock.MEDIA_PLAY );
+ this.error_animate= false;
}
void refreshing()
{
this.set_from_stock( Gtk.Stock.REFRESH );
}
}
void refreshing()
{
this.set_from_stock( Gtk.Stock.REFRESH );
}
-
+ void pauseError()
+ {
+ this.error_animate = true;
+ var flag = true;
+ Timeout.add_full(Priority.LOW, 500, () => {
+
+ if (!this.error_animate) {
+ return false;
+ }
+ this.set_from_stock( flag == true ? Gtk.Stock.MEDIA_RECORD
+ : Gtk.Stock.MEDIA_PAUSE);
+ flag = !flag;
+ return true;
+ });
+
+ }
class MenuA : Gtk.Menu
{
class MenuA : Gtk.Menu
{
@@
-207,7
+223,8
@@
public class StatusIconA : StatusIcon {
GitMonitor.gitmonitor.stop();
var tr = GitRepo.list();
for (var i= 0; i< tr.length;i++) {
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 );
+ statusicon.set_from_stock(
+ i%2 == 0 ? Gtk.Stock.FULLSCREEN : Gtk.Stock.LEAVE_FULLSCREEN );
var repo = tr.index(i);
//if (!repo.autocommit()) {
var repo = tr.index(i);
//if (!repo.autocommit()) {