mac controller: fix coding style and whitespace

This commit is contained in:
Hylke Bons 2011-05-13 01:01:49 +01:00
parent de5f86b3a4
commit dfa4ab4675

View file

@ -15,13 +15,14 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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;
}
}
}
}
}