diff --git a/SparkleShare/Linux/SparkleEventLog.cs b/SparkleShare/Linux/SparkleEventLog.cs index 2eb722c7..30a0d390 100755 --- a/SparkleShare/Linux/SparkleEventLog.cs +++ b/SparkleShare/Linux/SparkleEventLog.cs @@ -263,12 +263,6 @@ namespace SparkleShare { public void UpdateContent (string html) { Thread thread = new Thread (() => { - if (html == null) - html = Controller.HTML; - - if (html == null) - return; - string pixmaps_path = IO.Path.Combine (SparkleUI.AssetsPath, "pixmaps"); string icons_path = new string [] {SparkleUI.AssetsPath, "icons", "hicolor", "12x12", "status"}.Combine (); diff --git a/SparkleShare/Mac/SparkleEventLog.cs b/SparkleShare/Mac/SparkleEventLog.cs index a1cd3d5b..62bb6395 100755 --- a/SparkleShare/Mac/SparkleEventLog.cs +++ b/SparkleShare/Mac/SparkleEventLog.cs @@ -372,9 +372,6 @@ namespace SparkleShare { new ThreadStart (delegate { using (var a = new NSAutoreleasePool ()) { - if (html == null) - html = Controller.HTML; - string pixmaps_path = "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps"); html = html.Replace ("", "Lucida Grande"); diff --git a/SparkleShare/SparkleEventLogController.cs b/SparkleShare/SparkleEventLogController.cs index 611cd84b..afb3a588 100755 --- a/SparkleShare/SparkleEventLogController.cs +++ b/SparkleShare/SparkleEventLogController.cs @@ -80,7 +80,9 @@ namespace SparkleShare { if (watch.ElapsedMilliseconds < delay) Thread.Sleep (delay - (int) watch.ElapsedMilliseconds); - UpdateContentEvent (html); + if (!string.IsNullOrEmpty (html)) + UpdateContentEvent (html); + UpdateSizeInfoEvent (Size, HistorySize); }).Start (); @@ -171,8 +173,11 @@ namespace SparkleShare { UpdateChooserEvent (Folders); UpdateChooserEnablementEvent (true); - UpdateContentEvent (html); - UpdateSizeInfoEvent (Size, HistorySize); + + if (!string.IsNullOrEmpty (html)) + UpdateContentEvent (html); + + UpdateSizeInfoEvent (Size, HistorySize); }).Start (); } @@ -200,7 +205,9 @@ namespace SparkleShare { if (watch.ElapsedMilliseconds < delay) Thread.Sleep (delay - (int) watch.ElapsedMilliseconds); - UpdateContentEvent (html); + if (!string.IsNullOrEmpty (html)) + UpdateContentEvent (html); + UpdateSizeInfoEvent (Size, HistorySize); }; @@ -285,7 +292,8 @@ namespace SparkleShare { if (watch.ElapsedMilliseconds < delay) Thread.Sleep (delay - (int) watch.ElapsedMilliseconds); - UpdateContentEvent (html); + if (!string.IsNullOrEmpty (html)) + UpdateContentEvent (html); }).Start (); diff --git a/SparkleShare/Windows/SparkleEventLog.cs b/SparkleShare/Windows/SparkleEventLog.cs index 81991df6..c77bc074 100644 --- a/SparkleShare/Windows/SparkleEventLog.cs +++ b/SparkleShare/Windows/SparkleEventLog.cs @@ -273,10 +273,7 @@ namespace SparkleShare { public void UpdateContent (string html) { - Thread thread = new Thread (new ThreadStart (delegate { - if (html == null) - html = Controller.HTML; - + new Thread (() => { string pixmaps_path = Path.Combine ( SparkleLib.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps"); @@ -310,8 +307,8 @@ namespace SparkleShare { Dispatcher.BeginInvoke ((Action) delegate { this.spinner.Stop (); - this.web_browser.ObjectForScripting = new SparkleScriptingObject (); - this.web_browser.NavigateToString (html); + this.web_browser.ObjectForScripting = new SparkleScriptingObject (); + this.web_browser.NavigateToString (html); if (!this.canvas.Children.Contains (this.web_browser)) { this.canvas.Children.Add (this.web_browser); @@ -319,9 +316,8 @@ namespace SparkleShare { Canvas.SetTop (this.web_browser, 36); } }); - })); - thread.Start (); + }).Start (); }