From dfa4ab467558cf67dcf0e6ce7eec0065ee88e2e6 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 13 May 2011 01:01:49 +0100 Subject: [PATCH] mac controller: fix coding style and whitespace --- SparkleShare/Mac/SparkleMacController.cs | 53 +++++------------------- 1 file changed, 10 insertions(+), 43 deletions(-) diff --git a/SparkleShare/Mac/SparkleMacController.cs b/SparkleShare/Mac/SparkleMacController.cs index d08692a6..f22010ef 100644 --- a/SparkleShare/Mac/SparkleMacController.cs +++ b/SparkleShare/Mac/SparkleMacController.cs @@ -15,13 +15,14 @@ // along with this program. If not, see . +using System; +using System.Diagnostics; +using System.IO; + using MonoMac.Foundation; using MonoMac.AppKit; using MonoMac.ObjCRuntime; using SparkleLib; -using System; -using System.Diagnostics; -using System.IO; namespace SparkleShare { @@ -29,19 +30,13 @@ namespace SparkleShare { public override void EnableSystemAutostart () { - // N/A - } - - // Installs a launcher so the user can launch SparkleShare - // from the Internet category if needed + public override void InstallLauncher () { - // N/A - } @@ -49,102 +44,74 @@ namespace SparkleShare { // list of bookmarked places public override void AddToBookmarks () { - // TODO - } // Creates the SparkleShare folder in the user's home folder public override bool CreateSparkleShareFolder () { - if (!Directory.Exists (SparklePaths.SparklePath)) { - - Directory.CreateDirectory (SparklePaths.SparklePath); - + Directory.CreateDirectory (SparklePaths.SparklePath); return true; - } else { - return false; - } - } // Opens the SparkleShare folder or an (optional) subfolder public override void OpenSparkleShareFolder (string subfolder) { - string folder = Path.Combine (SparklePaths.SparklePath, subfolder); folder.Replace (" ", "\\ "); // Escape space-characters NSWorkspace.SharedWorkspace.OpenFile (folder); - } public override string EventLogHTML { - get { - string resource_path = NSBundle.MainBundle.ResourcePath; - - string html_path = Path.Combine (resource_path, "HTML", "event-log.html"); + string html_path = Path.Combine (resource_path, "HTML", "event-log.html"); StreamReader reader = new StreamReader (html_path); string html = reader.ReadToEnd (); reader.Close (); return html; - } - } public override string DayEntryHTML { - get { - string resource_path = NSBundle.MainBundle.ResourcePath; - - string html_path = Path.Combine (resource_path, "HTML", "day-entry.html"); + string html_path = Path.Combine (resource_path, "HTML", "day-entry.html"); StreamReader reader = new StreamReader (html_path); string html = reader.ReadToEnd (); reader.Close (); return html; - } - } public override string EventEntryHTML { - get { - string resource_path = NSBundle.MainBundle.ResourcePath; - - string html_path = Path.Combine (resource_path, "HTML", "event-entry.html"); + string html_path = Path.Combine (resource_path, "HTML", "event-entry.html"); StreamReader reader = new StreamReader (html_path); string html = reader.ReadToEnd (); reader.Close (); return html; - } - } - } - -} \ No newline at end of file +}