port more debuginfo to new debug method

This commit is contained in:
Hylke Bons 2010-06-04 22:01:17 +02:00
parent 85ca04bd9a
commit 88ada517e4
3 changed files with 17 additions and 11 deletions

View file

@ -140,7 +140,8 @@ namespace SparkleShare {
Process.StartInfo.RedirectStandardOutput = true;
Process.StartInfo.UseShellExecute = false;
Console.WriteLine ("[Git][" + RepoName + "] Cloning repository...");
SparkleHelpers.DebugInfo ("Config",
"[" + RepoName + "] Cloning repository...");
// Clone into the system's temporary folder
Process.StartInfo.FileName = "git";
@ -198,7 +199,8 @@ namespace SparkleShare {
// folder to the SparkleShare folder
Directory.Move (OldPath, NewPath);
Console.WriteLine ("[Git][" + RepoName + "] Repository cloned");
SparkleHelpers.DebugInfo ("Git",
"[" + RepoName + "] Repository cloned");
// Show a confirmation notification
SparkleBubble FinishedBubble =

View file

@ -35,7 +35,8 @@ namespace SparkleShare {
if (!Directory.Exists (AvatarPath)) {
Directory.CreateDirectory (AvatarPath);
Console.WriteLine ("[Config] Created '" + AvatarPath + "'");
SparkleHelpers.DebugInfo ("Config",
"Created '" + AvatarPath + "'");
}
string AvatarFilePath = AvatarPath + Email;
@ -109,8 +110,8 @@ namespace SparkleShare {
if (ShowDebugInfo) {
DateTime DateTime = new DateTime ();
string TimeStamp = DateTime.Now.ToString ("HH:mm:ss");
Console.WriteLine ("[" + TimeStamp + "]" +
"[" + Type + "]" + Message);
Console.WriteLine ("[" + TimeStamp + "] " +
"[" + Type + "] " + Message);
}
}

View file

@ -40,7 +40,8 @@ namespace SparkleShare {
if (!Directory.Exists (SparklePath)) {
Directory.CreateDirectory (SparklePath);
Console.WriteLine ("[Config] Created '" + SparklePath + "'");
SparkleHelpers.DebugInfo ("Config",
"Created '" + SparklePath + "'");
// Add a special icon to the SparkleShare folder
switch (SparklePlatform.Name) {
@ -98,7 +99,6 @@ namespace SparkleShare {
Process.StartInfo.FileName = "gvfs-set-attribute";
Process.StartInfo.Arguments =
Folder + " metadata::emblems [synced]";
// Console.WriteLine (Process.StartInfo.FileName + " " + Process.StartInfo.Arguments);
Process.Start ();
break;
}
@ -148,8 +148,9 @@ namespace SparkleShare {
Watcher.EnableRaisingEvents = true;
Watcher.Created += delegate (object o, FileSystemEventArgs args) {
WatcherChangeTypes wct = args.ChangeType;
Console.WriteLine ("[Event][SparkleShare] " + wct.ToString () +
" '" + args.Name + "'");
SparkleHelpers.DebugInfo ("Event",
wct.ToString () +
" '" + args.Name + "'");
SparkleDialog SparkleDialog = new SparkleDialog ();
SparkleDialog.ShowAll ();
};
@ -162,11 +163,13 @@ namespace SparkleShare {
if (!Directory.Exists (ConfigPath)) {
Directory.CreateDirectory (ConfigPath);
Console.WriteLine ("[Config] Created '" + ConfigPath + "'");
SparkleHelpers.DebugInfo ("Config",
"Created '" + ConfigPath + "'");
// Create a place to store the avatars
Directory.CreateDirectory (AvatarPath);
Console.WriteLine ("[Config] Created '" + AvatarPath + "avatars'");
SparkleHelpers.DebugInfo ("Config",
"Created '" + AvatarPath + "'");
}