diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 280f5cbd..e22b7bd5 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -29,6 +29,7 @@ namespace SparkleShare { public List Repositories; public string FolderSize; + public bool FirstRun; public event OnQuitWhileSyncingEventHandler OnQuitWhileSyncing; @@ -120,11 +121,11 @@ namespace SparkleShare { // Show the introduction screen if SparkleShare isn't configured if (!File.Exists (global_config_file_path)) { - if (OnFirstRun != null) - OnFirstRun (); + FirstRun = true; } else { + FirstRun = false; AddKey (); } @@ -136,8 +137,8 @@ namespace SparkleShare { thread.Start (); } - - + + // Creates a folder in the user's home folder to store configuration private void CreateConfigurationFolders () { @@ -720,12 +721,13 @@ namespace SparkleShare { }; - fetcher.Clone (); + fetcher.Start (); } - // Quits the program + // Checks whether there are any folders syncing and + // quits if safe public void TryQuit () { @@ -747,6 +749,7 @@ namespace SparkleShare { } + // Quits the program public void Quit () { diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index e6ffe75f..52f908f5 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -53,14 +53,13 @@ namespace SparkleShare { // Keep track of which event logs are open SparkleUI.OpenLogs = new List (); - SparkleShare.Controller.OnFirstRun += delegate { - Application.Invoke (delegate { + if (SparkleShare.Controller.FirstRun) { SparkleIntro intro = new SparkleIntro (); intro.ShowAll (); + intro.Present (); - }); - }; + } SparkleShare.Controller.OnQuitWhileSyncing += delegate { // TODO: Pop up a warning when quitting whilst syncing