[intro] Use new mechanism of updating the repo list

This commit is contained in:
Hylke Bons 2010-08-08 22:22:39 +01:00
parent 15005144a5
commit 82312a4e49
2 changed files with 9 additions and 9 deletions

View file

@ -402,8 +402,11 @@ namespace SparkleShare {
if (i > 1) if (i > 1)
target_folder_name += " (" + i + ")"; target_folder_name += " (" + i + ")";
Directory.Move (tmp_folder, string target_folder_path;
SparkleHelpers.CombineMore (SparklePaths.SparklePath, target_folder_name)); target_folder_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
target_folder_name);
Directory.Move (tmp_folder, target_folder_path);
} catch (Exception e) { } catch (Exception e) {
@ -577,12 +580,7 @@ namespace SparkleShare {
Button finish_button = new Button (_("Finish")); Button finish_button = new Button (_("Finish"));
finish_button.Clicked += delegate (object o, EventArgs args) { finish_button.Clicked += delegate (object o, EventArgs args) {
if(SparkleShare.SparkleUI != null)
SparkleShare.SparkleUI.UpdateRepositories ();
Destroy (); Destroy ();
}; };
controls.Add (finish_button); controls.Add (finish_button);

View file

@ -78,14 +78,12 @@ namespace SparkleShare {
watcher.Deleted += delegate (object o, FileSystemEventArgs args) { watcher.Deleted += delegate (object o, FileSystemEventArgs args) {
RemoveRepository (args.FullPath); RemoveRepository (args.FullPath);
Application.Invoke (delegate { NotificationIcon.CreateMenu (); });
}; };
watcher.Created += delegate (object o, FileSystemEventArgs args) { watcher.Created += delegate (object o, FileSystemEventArgs args) {
AddRepository (args.FullPath); AddRepository (args.FullPath);
Application.Invoke (delegate { NotificationIcon.CreateMenu (); });
}; };
@ -360,6 +358,8 @@ namespace SparkleShare {
Repositories.Add (repo); 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 // Updates the list of repositories with all the