diff --git a/SparkleLib/SparkleLogger.cs b/SparkleLib/SparkleLogger.cs index 4676d8fe..6e3bff18 100755 --- a/SparkleLib/SparkleLogger.cs +++ b/SparkleLib/SparkleLogger.cs @@ -63,9 +63,9 @@ namespace SparkleLib { "Remove any sensitive information like file names, IP addresses, domain names, etc. if needed." + n + n + "------" + n + n + "SparkleShare version: " + SparkleLib.SparkleBackend.Version + n + - "Operating system: " + SparkleLib.SparkleBackend.Platform + " " + Environment.OSVersion + n; + "Operating system: " + SparkleLib.SparkleBackend.Platform + " " + Environment.OSVersion + n; - crash_report += n + e.Message + n + e.StackTrace + n; + crash_report += e.GetType () + ": " + e.Message + n + e.StackTrace + n; if (e.InnerException != null) crash_report += n + e.InnerException.Message + n + e.InnerException.StackTrace + n; diff --git a/SparkleShare/Mac/SparkleEventLog.cs b/SparkleShare/Mac/SparkleEventLog.cs index 62bb6395..7c2cde07 100755 --- a/SparkleShare/Mac/SparkleEventLog.cs +++ b/SparkleShare/Mac/SparkleEventLog.cs @@ -368,62 +368,59 @@ namespace SparkleShare { public void UpdateContent (string html) { - Thread thread = new Thread ( - new ThreadStart (delegate { - using (var a = new NSAutoreleasePool ()) - { - string pixmaps_path = "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps"); - - html = html.Replace ("", "Lucida Grande"); - html = html.Replace ("", "13.6px"); - html = html.Replace ("", "13.4px"); - html = html.Replace ("", "#bbb"); - html = html.Replace ("", "#ddd"); - html = html.Replace ("", "10px"); - html = html.Replace ("", "#f5f5f5"); - html = html.Replace ("", "#0085cf"); - html = html.Replace ("", "#009ff8"); - - html = html.Replace ("", pixmaps_path); - - html = html.Replace ("", - pixmaps_path + "/document-added-12.png"); - - html = html.Replace ("", - pixmaps_path + "/document-deleted-12.png"); - - html = html.Replace ("", - pixmaps_path + "/document-edited-12.png"); + new Thread (() => { + using (var a = new NSAutoreleasePool ()) + { + string pixmaps_path = "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps"); + + html = html.Replace ("", "Lucida Grande"); + html = html.Replace ("", "13.6px"); + html = html.Replace ("", "13.4px"); + html = html.Replace ("", "#bbb"); + html = html.Replace ("", "#ddd"); + html = html.Replace ("", "10px"); + html = html.Replace ("", "#f5f5f5"); + html = html.Replace ("", "#0085cf"); + html = html.Replace ("", "#009ff8"); + + html = html.Replace ("", pixmaps_path); + + html = html.Replace ("", + pixmaps_path + "/document-added-12.png"); + + html = html.Replace ("", + pixmaps_path + "/document-deleted-12.png"); + + html = html.Replace ("", + pixmaps_path + "/document-edited-12.png"); - html = html.Replace ("", - pixmaps_path + "/document-moved-12.png"); - - InvokeOnMainThread (delegate { - this.web_view = new WebView (new RectangleF (0, 0, 481, 579), "", "") { - Frame = new RectangleF (new PointF (0, 0), - new SizeF (ContentView.Frame.Width, ContentView.Frame.Height - 39)) + html = html.Replace ("", + pixmaps_path + "/document-moved-12.png"); + + InvokeOnMainThread (delegate { + this.web_view = new WebView (new RectangleF (0, 0, 481, 579), "", "") { + Frame = new RectangleF (new PointF (0, 0), + new SizeF (ContentView.Frame.Width, ContentView.Frame.Height - 39)) + }; + + this.web_view.MainFrame.LoadHtmlString (html, new NSUrl ("")); + + this.web_view.PolicyDelegate = new SparkleWebPolicyDelegate (); + ContentView.AddSubview (this.web_view); + + (this.web_view.PolicyDelegate as SparkleWebPolicyDelegate).LinkClicked += + delegate (string href) { + if (href.StartsWith ("file:///")) + href = href.Substring (7); + + Controller.LinkClicked (href); }; - this.web_view.MainFrame.LoadHtmlString (html, new NSUrl ("")); - - this.web_view.PolicyDelegate = new SparkleWebPolicyDelegate (); - ContentView.AddSubview (this.web_view); - - (this.web_view.PolicyDelegate as SparkleWebPolicyDelegate).LinkClicked += - delegate (string href) { - if (href.StartsWith ("file:///")) - href = href.Substring (7); - - Controller.LinkClicked (href); - }; - - this.progress_indicator.Hidden = true; - }); - } + this.progress_indicator.Hidden = true; + }); } - )); - thread.Start (); + }).Start (); }