never allow html to be null. fixes #933
This commit is contained in:
parent
7e1cb40038
commit
94143df2e6
|
@ -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 ();
|
||||
|
|
|
@ -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 ("<!-- $body-font-family -->", "Lucida Grande");
|
||||
|
|
|
@ -80,7 +80,9 @@ namespace SparkleShare {
|
|||
if (watch.ElapsedMilliseconds < delay)
|
||||
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||
|
||||
if (!string.IsNullOrEmpty (html))
|
||||
UpdateContentEvent (html);
|
||||
|
||||
UpdateSizeInfoEvent (Size, HistorySize);
|
||||
|
||||
}).Start ();
|
||||
|
@ -171,7 +173,10 @@ namespace SparkleShare {
|
|||
|
||||
UpdateChooserEvent (Folders);
|
||||
UpdateChooserEnablementEvent (true);
|
||||
|
||||
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);
|
||||
|
||||
if (!string.IsNullOrEmpty (html))
|
||||
UpdateContentEvent (html);
|
||||
|
||||
UpdateSizeInfoEvent (Size, HistorySize);
|
||||
};
|
||||
|
||||
|
@ -285,6 +292,7 @@ namespace SparkleShare {
|
|||
if (watch.ElapsedMilliseconds < delay)
|
||||
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||
|
||||
if (!string.IsNullOrEmpty (html))
|
||||
UpdateContentEvent (html);
|
||||
|
||||
}).Start ();
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
@ -319,9 +316,8 @@ namespace SparkleShare {
|
|||
Canvas.SetTop (this.web_browser, 36);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
thread.Start ();
|
||||
}).Start ();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue