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

View file

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