[repo] set syncing state before firing event, [statusicon] update state after populating list and change some strings

This commit is contained in:
Hylke Bons 2010-09-11 10:52:10 +01:00
parent c57430ed5c
commit d4735cb749
4 changed files with 17 additions and 10 deletions

View file

@ -378,6 +378,8 @@ namespace SparkleLib {
args = new SparkleEventArgs ("FetchingFinished");
IsSyncing = false;
if (FetchingFinished != null)
FetchingFinished (this, args);
@ -387,8 +389,6 @@ namespace SparkleLib {
CurrentHash = GetCurrentHash ();
IsSyncing = false;
};
}
@ -766,7 +766,7 @@ namespace SparkleLib {
unix_timestamp = -3600 * int.Parse (timezone.Substring (1, 2));
process.StartInfo.FileName = "git";
process.StartInfo.Arguments = "log --format=\"%at\t%an\t%ae\t%H\t%ad\" -" + count;
process.StartInfo.Arguments = "log --format=\"%at\t%an\t%ae\t%H\" -" + count;
process.Start ();
process.WaitForExit ();
@ -784,10 +784,9 @@ namespace SparkleLib {
string [] parts = Regex.Split (line, "\t");
int local_timestamp = unix_timestamp + int.Parse (parts [0]);
string user_name = parts [1];
string user_email = parts [2];
string hash = parts [3];
string user_name = parts [1];
string user_email = parts [2];
string hash = parts [3];
DateTime date_time = SparkleHelpers.UnixTimestampToDateTime (local_timestamp);

View file

@ -383,10 +383,12 @@ namespace SparkleShare {
hbox.PackStart (vbox, true, true, 0);
hbox.PackStart (new Label (""), false, false, 12);
layout_vertical.PackStart (hbox, true, true, 24);
layout_vertical.PackStart (hbox, true, true, 18);
}
layout_vertical.PackStart (new Label (""), true, true, 3);
}
ScrolledWindow = new ScrolledWindow ();

View file

@ -274,7 +274,7 @@ namespace SparkleShare {
} else {
MenuItem no_folders_item = new MenuItem (_("No Shared Folders Yet")) {
MenuItem no_folders_item = new MenuItem (_("No Remote Folders Yet")) {
Sensitive = false
};
@ -404,7 +404,11 @@ namespace SparkleShare {
// The first frame is the idle icon
Application.Invoke (delegate { SetPixbuf (AnimationFrames [0]); });
StateText = _("Up to date") + " (" + FormatFileSize (FolderSize) + ")";
if (SparkleUI.Repositories.Count > 0)
StateText = _("Up to date") + " (" + FormatFileSize (FolderSize) + ")";
else
StateText += _("Welcome to SparkleShare!");
}

View file

@ -457,6 +457,8 @@ namespace SparkleShare {
foreach (string folder_path in Directory.GetDirectories (SparklePaths.SparklePath))
AddRepository (folder_path);
StatusIcon.ShowState ();
}