enable notifications by default

This commit is contained in:
Hylke Bons 2010-05-20 23:16:26 +01:00
parent 712a0ad4f7
commit 211abf8f15
2 changed files with 15 additions and 7 deletions

View file

@ -124,11 +124,13 @@ namespace SparkleShare {
Process.StartInfo.WorkingDirectory = Process.StartInfo.WorkingDirectory =
SparklePaths.SparkleTmpPath; SparklePaths.SparkleTmpPath;
Process.StartInfo.Arguments = Process.StartInfo.Arguments = "clone ";
"clone " + SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName) Process.StartInfo.Arguments +=
.Substring (2); SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName).Substring (2);
Process.Start (); Process.Start ();
// Move the folder to the SparkleShare folder when done cloning
Process.Exited += delegate { Process.Exited += delegate {
Directory.Move ( Directory.Move (
SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath,
@ -137,10 +139,6 @@ namespace SparkleShare {
RepoName) RepoName)
); );
// Enable notifications by default
File.Create (
SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath,
"sparkleshare.notify"));
Destroy (); Destroy ();
}; };

View file

@ -138,6 +138,7 @@ namespace SparkleShare {
// Create place to store configuration user's home folder // Create place to store configuration user's home folder
string ConfigPath = SparklePaths.SparkleConfigPath; string ConfigPath = SparklePaths.SparkleConfigPath;
string AvatarPath = SparklePaths.SparkleAvatarPath; string AvatarPath = SparklePaths.SparkleAvatarPath;
if (!Directory.Exists (ConfigPath)) { if (!Directory.Exists (ConfigPath)) {
Directory.CreateDirectory (ConfigPath); Directory.CreateDirectory (ConfigPath);
@ -149,6 +150,15 @@ namespace SparkleShare {
} }
string NotifySettingFile =
SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath,
"sparkleshare.notify");
// Enable notifications by default
if (!File.Exists (NotifySettingFile))
File.Create (NotifySettingFile);
} }
} }