From 82312a4e49a67b33e8f66810d48a2f37e155ae5c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 8 Aug 2010 22:22:39 +0100 Subject: [PATCH] [intro] Use new mechanism of updating the repo list --- SparkleShare/SparkleIntro.cs | 12 +++++------- SparkleShare/SparkleUI.cs | 6 ++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index 9f04b2aa..bdbbac02 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -402,8 +402,11 @@ namespace SparkleShare { if (i > 1) target_folder_name += " (" + i + ")"; - Directory.Move (tmp_folder, - SparkleHelpers.CombineMore (SparklePaths.SparklePath, target_folder_name)); + string target_folder_path; + target_folder_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath, + target_folder_name); + + Directory.Move (tmp_folder, target_folder_path); } catch (Exception e) { @@ -577,12 +580,7 @@ namespace SparkleShare { Button finish_button = new Button (_("Finish")); finish_button.Clicked += delegate (object o, EventArgs args) { - - if(SparkleShare.SparkleUI != null) - SparkleShare.SparkleUI.UpdateRepositories (); - Destroy (); - }; controls.Add (finish_button); diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 59a22df7..5595d341 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -78,14 +78,12 @@ namespace SparkleShare { watcher.Deleted += delegate (object o, FileSystemEventArgs args) { RemoveRepository (args.FullPath); - Application.Invoke (delegate { NotificationIcon.CreateMenu (); }); }; watcher.Created += delegate (object o, FileSystemEventArgs args) { AddRepository (args.FullPath); - Application.Invoke (delegate { NotificationIcon.CreateMenu (); }); }; @@ -360,6 +358,8 @@ namespace SparkleShare { Repositories.Add (repo); + Application.Invoke (delegate { NotificationIcon.CreateMenu (); }); + } @@ -379,6 +379,8 @@ namespace SparkleShare { } + Application.Invoke (delegate { NotificationIcon.CreateMenu (); }); + } // Updates the list of repositories with all the