update UI when a repo folder is deleted (still commented out)

This commit is contained in:
Hylke Bons 2010-06-12 15:37:03 +01:00
parent b92f304f4c
commit 232d5c0bb1
2 changed files with 19 additions and 5 deletions

View file

@ -21,8 +21,10 @@ using System.IO;
namespace SparkleShare {
public static class SparklePaths {
private static UnixUserInfo UnixUserInfo =
new UnixUserInfo (UnixEnvironment.UserName);
public static string HomePath = UnixUserInfo.HomeDirectory;
public static string SparklePath = Path.Combine (HomePath ,"SparkleShare");

View file

@ -145,13 +145,15 @@ namespace SparkleShare {
}
}
// TODO: When a repo folder is deleted, don't sync and update the UI
// TODO: This crashes
/*
// Watch the SparkleShare folder and pop up the
// Add dialog when a new folder is created
// TODO: This crashes
/* FileSystemWatcher Watcher = new FileSystemWatcher (SparklePaths.SparklePath);
FileSystemWatcher Watcher = new FileSystemWatcher (SparklePaths.SparklePath);
Watcher.IncludeSubdirectories = false;
Watcher.EnableRaisingEvents = true;
Watcher.Created += delegate (object o, FileSystemEventArgs args) {
@ -162,6 +164,16 @@ namespace SparkleShare {
SparkleDialog SparkleDialog = new SparkleDialog ();
SparkleDialog.ShowAll ();
};
// When a repo folder is deleted, don't sync and update the UI
Watcher.Deleted += delegate (object o, FileSystemEventArgs args) {
WatcherChangeTypes wct = args.ChangeType;
SparkleHelpers.DebugInfo ("Event",
wct.ToString () +
" '" + args.Name + "'");
SparkleUI SparkleUI = new SparkleUI ();
SparkleUI.ShowAll ();
};
*/
// Create place to store configuration user's home folder