setup: reorder some Add button logic

This commit is contained in:
Hylke Bons 2012-04-11 23:09:12 +02:00
parent 7a6d80b9dc
commit 12fde5007b

View file

@ -331,20 +331,21 @@ namespace SparkleShare {
public void AddPageCompleted (string address, string remote_path)
{
SyncingFolder = Path.GetFileNameWithoutExtension (remote_path);
if (ChangePageEvent != null)
ChangePageEvent (PageType.Syncing, null);
address = address.Trim ();
remote_path = remote_path.Trim ();
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
if (SelectedPlugin.PathUsesLowerCase)
remote_path = remote_path.ToLower ();
SyncingFolder = Path.GetFileNameWithoutExtension (remote_path);
PreviousAddress = address;
PreviousPath = remote_path;
if (ChangePageEvent != null)
ChangePageEvent (PageType.Syncing, null);
Program.Controller.FolderFetched += AddPageFetchedDelegate;
Program.Controller.FolderFetchError += AddPageFetchErrorDelegate;
Program.Controller.FolderFetching += SyncingPageFetchingDelegate;