[repo] set syncing state before firing event, [statusicon] update state after populating list and change some strings
This commit is contained in:
parent
c57430ed5c
commit
d4735cb749
|
@ -378,6 +378,8 @@ namespace SparkleLib {
|
||||||
|
|
||||||
args = new SparkleEventArgs ("FetchingFinished");
|
args = new SparkleEventArgs ("FetchingFinished");
|
||||||
|
|
||||||
|
IsSyncing = false;
|
||||||
|
|
||||||
if (FetchingFinished != null)
|
if (FetchingFinished != null)
|
||||||
FetchingFinished (this, args);
|
FetchingFinished (this, args);
|
||||||
|
|
||||||
|
@ -387,8 +389,6 @@ namespace SparkleLib {
|
||||||
|
|
||||||
CurrentHash = GetCurrentHash ();
|
CurrentHash = GetCurrentHash ();
|
||||||
|
|
||||||
IsSyncing = false;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -766,7 +766,7 @@ namespace SparkleLib {
|
||||||
unix_timestamp = -3600 * int.Parse (timezone.Substring (1, 2));
|
unix_timestamp = -3600 * int.Parse (timezone.Substring (1, 2));
|
||||||
|
|
||||||
process.StartInfo.FileName = "git";
|
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.Start ();
|
||||||
process.WaitForExit ();
|
process.WaitForExit ();
|
||||||
|
@ -784,10 +784,9 @@ namespace SparkleLib {
|
||||||
string [] parts = Regex.Split (line, "\t");
|
string [] parts = Regex.Split (line, "\t");
|
||||||
|
|
||||||
int local_timestamp = unix_timestamp + int.Parse (parts [0]);
|
int local_timestamp = unix_timestamp + int.Parse (parts [0]);
|
||||||
|
string user_name = parts [1];
|
||||||
string user_name = parts [1];
|
string user_email = parts [2];
|
||||||
string user_email = parts [2];
|
string hash = parts [3];
|
||||||
string hash = parts [3];
|
|
||||||
|
|
||||||
DateTime date_time = SparkleHelpers.UnixTimestampToDateTime (local_timestamp);
|
DateTime date_time = SparkleHelpers.UnixTimestampToDateTime (local_timestamp);
|
||||||
|
|
||||||
|
|
|
@ -383,10 +383,12 @@ namespace SparkleShare {
|
||||||
hbox.PackStart (vbox, true, true, 0);
|
hbox.PackStart (vbox, true, true, 0);
|
||||||
hbox.PackStart (new Label (""), false, false, 12);
|
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 ();
|
ScrolledWindow = new ScrolledWindow ();
|
||||||
|
|
|
@ -274,7 +274,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
MenuItem no_folders_item = new MenuItem (_("No Shared Folders Yet")) {
|
MenuItem no_folders_item = new MenuItem (_("No Remote Folders Yet")) {
|
||||||
Sensitive = false
|
Sensitive = false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -404,7 +404,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
// The first frame is the idle icon
|
// The first frame is the idle icon
|
||||||
Application.Invoke (delegate { SetPixbuf (AnimationFrames [0]); });
|
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!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -457,6 +457,8 @@ namespace SparkleShare {
|
||||||
foreach (string folder_path in Directory.GetDirectories (SparklePaths.SparklePath))
|
foreach (string folder_path in Directory.GetDirectories (SparklePaths.SparklePath))
|
||||||
AddRepository (folder_path);
|
AddRepository (folder_path);
|
||||||
|
|
||||||
|
StatusIcon.ShowState ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue