update UI when a repo folder is deleted (still commented out)
This commit is contained in:
parent
3efb0301f6
commit
b6430856c8
|
@ -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");
|
||||
|
|
|
@ -146,12 +146,14 @@ 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
|
||||
|
|
Loading…
Reference in a new issue