ubuntu statusicon: force update of the icon when animating

This commit is contained in:
Hylke Bons 2012-06-25 23:25:43 +01:00
parent 4c9a4180f2
commit 3ce450ec8f

View file

@ -58,7 +58,7 @@ namespace SparkleShare {
this.indicator = new ApplicationIndicator ("sparkleshare", this.indicator = new ApplicationIndicator ("sparkleshare",
"process-syncing-i", Category.ApplicationStatus); "process-syncing-i", Category.ApplicationStatus);
this.indicator.Status = Status.Attention; this.indicator.Status = Status.Active;
#else #else
this.status_icon = new StatusIcon (); this.status_icon = new StatusIcon ();
this.status_icon.Pixbuf = this.animation_frames [0]; this.status_icon.Pixbuf = this.animation_frames [0];
@ -79,6 +79,10 @@ namespace SparkleShare {
icon_name += "i"; icon_name += "i";
this.indicator.IconName = icon_name; this.indicator.IconName = icon_name;
// Force update of the icon
this.indicator.Status = Status.Attention;
this.indicator.Status = Status.Active;
#else #else
this.status_icon.Pixbuf = this.animation_frames [icon_frame]; this.status_icon.Pixbuf = this.animation_frames [icon_frame];
#endif #endif
@ -86,6 +90,10 @@ namespace SparkleShare {
} else { } else {
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
this.indicator.IconName = "process-syncing-error"; this.indicator.IconName = "process-syncing-error";
// Force update of the icon
this.indicator.Status = Status.Attention;
this.indicator.Status = Status.Active;
#else #else
this.status_icon.Pixbuf = SparkleUIHelpers.GetIcon ("process-syncing-error", 24); this.status_icon.Pixbuf = SparkleUIHelpers.GetIcon ("process-syncing-error", 24);
#endif #endif