diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index fd714ec7..80916f48 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -805,10 +805,10 @@ namespace SparkleLib { string unsynced_file_path = SparkleHelpers.CombineMore (LocalPath , ".git", "has_unsynced_changes"); - if (File.Exists (unsynced_file_path)) - File.Delete (unsynced_file_path); +// if (File.Exists (unsynced_file_path)) + // File.Delete (unsynced_file_path); TODO: restore - _HasUnsyncedChanges = false; +// _HasUnsyncedChanges = false;TODO if (PushingFinished != null) PushingFinished (this, args); diff --git a/SparkleShare/SparkleLog.cs b/SparkleShare/SparkleLog.cs index c005dcf9..ca40b71a 100644 --- a/SparkleShare/SparkleLog.cs +++ b/SparkleShare/SparkleLog.cs @@ -239,7 +239,7 @@ namespace SparkleShare { string title = _("This folder has unsynced changes"); string text = _("We will sync these once connected again"); - SparkleInfobar infobar = new SparkleInfobar ("dialog-warning", title, text); + SparkleInfobar infobar = new SparkleInfobar ("dialog-error", title, text); layout_vertical.PackStart (infobar, false, false, 0); diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs index 37cd8921..8cc2621a 100644 --- a/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/SparkleStatusIcon.cs @@ -268,7 +268,7 @@ namespace SparkleShare { }; if (repo.HasUnsyncedChanges) - folder_action.IconName = "dialog-warning"; + folder_action.IconName = "dialog-error"; folder_action.Activated += OpenLogDelegate (repo.LocalPath); @@ -364,38 +364,22 @@ namespace SparkleShare { } - public void ShowState () - { - - ShowState (false); - - } - - // Shows the state and keeps the number of syncing repositories in mind - public void ShowState (bool error) + public void ShowState () { UpdateFolderSize (); - if (error) { + foreach (SparkleRepo repo in SparkleUI.Repositories) - SetErrorState (); + if (repo.IsSyncing || repo.IsBuffering) { + + SetSyncingState (); + break; } else { - foreach (SparkleRepo repo in SparkleUI.Repositories) - - if (repo.IsSyncing || repo.IsBuffering) { - - SetSyncingState (); - break; - - } else { - - SetIdleState (); - - } + SetIdleState (); } @@ -412,13 +396,31 @@ namespace SparkleShare { Animation.Stop (); - // The first frame is the idle icon - Application.Invoke (delegate { SetPixbuf (AnimationFrames [0]); }); + int unsynced_repo_count = 0; + foreach (SparkleRepo repo in SparkleUI.Repositories) { + if (repo.HasUnsyncedChanges) + unsynced_repo_count++; + } - if (SparkleUI.Repositories.Count > 0) - StateText = _("Up to date") + " (" + FormatFileSize (FolderSize) + ")"; - else - StateText += _("Welcome to SparkleShare!"); + if (unsynced_repo_count > 0) { + + Application.Invoke (delegate { SetPixbuf (SparkleUIHelpers.GetIcon ("sparkleshare-syncing-error", 24)); }); + + if (unsynced_repo_count == 1) + StateText = _("One of your folders failed to sync"); + else + StateText = _("Some folders failed to sync"); + + } else { + + Application.Invoke (delegate { SetPixbuf (AnimationFrames [0]); }); + + if (SparkleUI.Repositories.Count > 0) + StateText = _("Up to date") + " (" + FormatFileSize (FolderSize) + ")"; + else + StateText = _("Welcome to SparkleShare!"); + + } } @@ -433,17 +435,6 @@ namespace SparkleShare { } - // Changes the state to indicate there was an error syncing - public void SetErrorState () - { - - Animation.Stop (); - Application.Invoke (delegate { Pixbuf = SparkleUIHelpers.GetIcon ("sparkleshare-syncing-error", 24); }); - StateText = _("Failed to sync changes"); - - } - - // Updates the icon used for the statusicon private void SetPixbuf (Gdk.Pixbuf pixbuf) { diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 39b16878..25f1ebf0 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -362,15 +362,6 @@ namespace SparkleShare { } - // Updates the statusicon to the error state - private void UpdateStatusIconToError (object o, EventArgs args) - { - - StatusIcon.ShowState (true); - - } - - // Adds a repository to the list of repositories and // updates the statusicon menu private void AddRepository (string folder_path) @@ -416,7 +407,7 @@ namespace SparkleShare { }; repo.PushingFailed += delegate { // TODO: use UpdateStatusIcon and check for HasUnsyncedChanges in SparkleStatusIcon - Application.Invoke (UpdateStatusIconToError); + Application.Invoke (UpdateStatusIcon); }; repo.ConflictDetected += delegate { diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 0b9edd10..fd621831 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -29,8 +29,8 @@ app_theme_icons = \ status,document-edited-16.png \ status,document-moved-16.png \ status,document-removed-16.png \ - status,dialog-warning-16.png \ - status,dialog-warning-24.png + status,dialog-error-16.png \ + status,dialog-error-24.png install_icon_exec = $(top_srcdir)/build/icon-theme-installer \ -t "$(theme)" \ diff --git a/data/icons/dialog-error-16.png b/data/icons/dialog-error-16.png new file mode 100644 index 00000000..0b0d8bee Binary files /dev/null and b/data/icons/dialog-error-16.png differ diff --git a/data/icons/dialog-error-24.png b/data/icons/dialog-error-24.png new file mode 100644 index 00000000..9821d780 Binary files /dev/null and b/data/icons/dialog-error-24.png differ diff --git a/data/icons/dialog-warning-16.png b/data/icons/dialog-warning-16.png deleted file mode 100644 index 219432c4..00000000 Binary files a/data/icons/dialog-warning-16.png and /dev/null differ diff --git a/data/icons/dialog-warning-24.png b/data/icons/dialog-warning-24.png deleted file mode 100644 index 05149670..00000000 Binary files a/data/icons/dialog-warning-24.png and /dev/null differ diff --git a/data/icons/dialog-warning.png b/data/icons/dialog-warning.png deleted file mode 100644 index 93050550..00000000 Binary files a/data/icons/dialog-warning.png and /dev/null differ diff --git a/data/icons/sparkleshare-syncing-error-24.png b/data/icons/sparkleshare-syncing-error-24.png index 2f854e6c..f3064980 100644 Binary files a/data/icons/sparkleshare-syncing-error-24.png and b/data/icons/sparkleshare-syncing-error-24.png differ diff --git a/data/sparkleshare-gnome.svg b/data/sparkleshare-gnome.svg index 5a29bc71..820af8c3 100644 --- a/data/sparkleshare-gnome.svg +++ b/data/sparkleshare-gnome.svg @@ -31,8 +31,8 @@ height="300px" id="base" inkscape:current-layer="layer18" - inkscape:cx="370.11804" - inkscape:cy="155.47084" + inkscape:cx="452.99246" + inkscape:cy="152.00765" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:pageopacity="0.0" @@ -42,9 +42,9 @@ inkscape:snap-nodes="false" inkscape:window-height="805" inkscape:window-width="1332" - inkscape:window-x="0" - inkscape:window-y="31" - inkscape:zoom="5.6568542" + inkscape:window-x="412" + inkscape:window-y="0" + inkscape:zoom="1" objecttolerance="10000" pagecolor="#ffffff" showgrid="false" @@ -2117,6 +2117,325 @@ y1="196.31589" x2="1540.5205" y2="204" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2960,139 +3279,72 @@ style="display:inline;enable-background:new" /> - + style="display:inline;enable-background:new" + id="g3460"> + style="fill:none;stroke:#c56b0c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" /> - - - - - - - - - + style="fill:none;stroke:#fde8d0;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" /> + d="m 244,51 a 5,5 0 1 1 -10,0 5,5 0 1 1 10,0 z" /> + d="m 244,51 a 5,5 0 1 1 -10,0 5,5 0 1 1 10,0 z" /> + d="m 244,51 a 5,5 0 1 1 -10,0 5,5 0 1 1 10,0 z" /> + d="m 244,51 a 5,5 0 1 1 -10,0 5,5 0 1 1 10,0 z" /> + + + + + + + +