diff --git a/SparkleShare/SparkleRepo.cs b/SparkleShare/SparkleRepo.cs index 97427157..c119233f 100644 --- a/SparkleShare/SparkleRepo.cs +++ b/SparkleShare/SparkleRepo.cs @@ -15,6 +15,7 @@ // along with this program. If not, see . using Gtk; +using SparkleShare; using System; using System.Diagnostics; using System.IO; @@ -207,10 +208,12 @@ namespace SparkleShare { public void Fetch () { // TODO: change status icon to sync FetchTimer.Stop (); + SparkleUI.NotificationIcon.SetSyncingState (); Console.WriteLine ("[Git][" + Name + "] Fetching changes..."); Process.StartInfo.Arguments = "fetch"; Process.Start(); Process.WaitForExit (); + SparkleUI.NotificationIcon.SetIdleState (); Merge (); FetchTimer.Start (); } diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index af3a98b7..d67a0b66 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -27,7 +27,7 @@ namespace SparkleShare { public SparkleRepo [] Repositories; public SparkleWindow SparkleWindow; - public SparkleStatusIcon SparkleStatusIcon; + public static SparkleStatusIcon NotificationIcon; public SparkleUI (bool HideUI) { @@ -108,8 +108,8 @@ namespace SparkleShare { SparkleWindow.DeleteEvent += CloseSparkleWindow; // Create the status icon - SparkleStatusIcon = new SparkleStatusIcon (); - SparkleStatusIcon.Activate += delegate { + NotificationIcon = new SparkleStatusIcon (); + NotificationIcon.Activate += delegate { SparkleWindow.ToggleVisibility (); };