diff --git a/SparkleShare/SparkleRepo.cs b/SparkleShare/SparkleRepo.cs
index 81f843b8..12454028 100644
--- a/SparkleShare/SparkleRepo.cs
+++ b/SparkleShare/SparkleRepo.cs
@@ -193,6 +193,7 @@ namespace SparkleShare {
// Push again in case of a conflict
Push ();
}
+// SparkleUI.NotificationIcon.SetIdleState ();
}
// Commits the made changes
diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs
index e8de185c..1b08ebb8 100644
--- a/SparkleShare/SparkleStatusIcon.cs
+++ b/SparkleShare/SparkleStatusIcon.cs
@@ -18,13 +18,16 @@ using Gtk;
using Mono.Unix;
using SparkleShare;
using System;
-using System.IO;
using System.Diagnostics;
+using System.IO;
+using System.Timers;
namespace SparkleShare {
public class SparkleStatusIcon : StatusIcon {
+ private Timer Timer;
+
// Short alias for the translations
public static string _ (string s) {
return Catalog.GetString (s);
@@ -39,6 +42,8 @@ namespace SparkleShare {
public SparkleStatusIcon () : base () {
+ Timer = new Timer ();
+
Activate += delegate {
Menu Menu = new Menu();
@@ -135,11 +140,46 @@ namespace SparkleShare {
}
public void SetIdleState () {
- IconName = "folder-sparkleshare";
+ Timer.Stop ();
+ Pixbuf = SparkleHelpers.GetIcon ("folder-sparkleshare", 24);
}
public void SetSyncingState () {
-// IconName = "folder-syncing";
+
+ // TODO: Animate statusicon when syncing
+/* int CycleDuration = 250;
+ int CurrentStep = 0;
+ int Size = 24;
+
+ Gdk.Pixbuf SpinnerGallery = SparkleHelpers.GetIcon ("process-syncing-sparkleshare",
+ Size);
+
+ int FramesInWidth = SpinnerGallery.Width / Size;
+ int FramesInHeight = SpinnerGallery.Height / Size;
+ int NumSteps = FramesInWidth * FramesInHeight;
+ Gdk.Pixbuf [] Images = new Gdk.Pixbuf [NumSteps - 1];
+
+ int i = 0;
+ for (int y = 0; y < FramesInHeight; y++) {
+ for (int x = 0; x < FramesInWidth; x++) {
+ if (!(y == 0 && x == 0)) {
+ Images [i] = new Gdk.Pixbuf (SpinnerGallery,
+ x * Size, y * Size, Size, Size);
+ i++;
+ }
+ }
+ }
+
+ Timer.Interval = CycleDuration / NumSteps;
+ Timer.Elapsed += delegate {
+ if (CurrentStep < NumSteps)
+ CurrentStep++;
+ else
+ CurrentStep = 0;
+ Pixbuf = Images [CurrentStep];
+ };
+ Timer.Start ();
+*/
}
public void SetErrorState () {
diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs
index c8cfb93c..b69a4cdd 100644
--- a/SparkleShare/SparkleUI.cs
+++ b/SparkleShare/SparkleUI.cs
@@ -72,6 +72,11 @@ namespace SparkleShare {
}
+ if (!HideUI) {
+ // Create the status icon
+ NotificationIcon = new SparkleStatusIcon ();
+ }
+
// Get all the repos in ~/SparkleShare
SparkleRepo [] TmpRepos =
new SparkleRepo [Directory.GetDirectories (SparklePath).Length];
@@ -106,9 +111,6 @@ namespace SparkleShare {
// Don't create the window and status
// icon when --disable-gui was given
if (!HideUI) {
-
- // Create the status icon
- NotificationIcon = new SparkleStatusIcon ();
// Show a notification if there are no folders yet
if (SparkleShare.Repositories.Length == 0) {
diff --git a/data/icons/hicolor/24x24/animations/process-syncing-sparkleshare.png b/data/icons/hicolor/24x24/animations/process-syncing-sparkleshare.png
new file mode 100644
index 00000000..c1be7188
Binary files /dev/null and b/data/icons/hicolor/24x24/animations/process-syncing-sparkleshare.png differ
diff --git a/data/sparkleshare.svg b/data/sparkleshare.svg
index d931ac05..0c96f1db 100644
--- a/data/sparkleshare.svg
+++ b/data/sparkleshare.svg
@@ -30,24 +30,24 @@
guidetolerance="10000"
height="300px"
id="base"
- inkscape:current-layer="layer17"
- inkscape:cx="411.06137"
- inkscape:cy="146.08141"
+ inkscape:current-layer="layer18"
+ inkscape:cx="393.78336"
+ inkscape:cy="80.998061"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:showpageshadow="false"
- inkscape:snap-bbox="false"
+ inkscape:snap-bbox="true"
inkscape:snap-nodes="false"
inkscape:window-height="805"
inkscape:window-width="1332"
inkscape:window-x="0"
inkscape:window-y="27"
- inkscape:zoom="1"
+ inkscape:zoom="11.313708"
objecttolerance="10000"
pagecolor="#ffffff"
- showgrid="false"
+ showgrid="true"
stroke="#ef2929"
width="400px"
showguides="false"
@@ -181,6 +181,13 @@
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+