diff --git a/SparkleShare/Mac/SparkleController.cs b/SparkleShare/Mac/SparkleController.cs index 3b4f0e4b..78f24a15 100755 --- a/SparkleShare/Mac/SparkleController.cs +++ b/SparkleShare/Mac/SparkleController.cs @@ -161,13 +161,13 @@ namespace SparkleShare { get { string resource_path = NSBundle.MainBundle.ResourcePath; string html_path = Path.Combine (resource_path, "HTML", "event-log.html"); - - StreamReader reader = new StreamReader (html_path); - string html = reader.ReadToEnd (); - reader.Close (); + string html = File.ReadAllText (html_path); - html = html.Replace ("", "file://" + - Path.Combine (NSBundle.MainBundle.ResourcePath, "HTML", "jquery.js")); + string jquery_file_path = Path.Combine (NSBundle.MainBundle.ResourcePath, + "HTML", "jquery.js"); + + string jquery = File.ReadAllText (jquery_file_path); + html = html.Replace ("", jquery); return html; } diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 647e6bec..e4736425 100755 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -175,13 +175,16 @@ namespace SparkleShare { public override string EventLogHTML { get { - string path = new string [] {Defines.PREFIX, - "share", "sparkleshare", "html", "event-log.html"}.Combine (); + string html_path = new string [] {Defines.PREFIX, "share", + "sparkleshare", "html", "event-log.html"}.Combine (); - string html = String.Join (Environment.NewLine, File.ReadAllLines (path)); + string html = File.ReadAllText (html_path); - html = html.Replace ("", "file://" + - new string [] {Defines.PREFIX, "share", "sparkleshare", "html", "jquery.js"}.Combine ()); + string jquery_file_path = new string [] {Defines.PREFIX, "share", + "sparkleshare", "html", "jquery.js"}.Combine () + + string jquery = File.ReadAllText (jquery_file_path); + html = html.Replace ("", jquery); return html; } diff --git a/data/html/event-log.html b/data/html/event-log.html index 92db77da..bb1bc03d 100755 --- a/data/html/event-log.html +++ b/data/html/event-log.html @@ -2,7 +2,10 @@ SparkleShare Event Log - + +