eventlog: fix some window flashes and controller logic
This commit is contained in:
parent
ab344dc92c
commit
505c2c18f1
|
@ -66,7 +66,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
// A short delay is less annoying than
|
// A short delay is less annoying than
|
||||||
// a flashing window
|
// a flashing window
|
||||||
int delay = 500;
|
int delay = 1000;
|
||||||
|
|
||||||
if (watch.ElapsedMilliseconds < delay)
|
if (watch.ElapsedMilliseconds < delay)
|
||||||
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||||
|
@ -145,16 +145,28 @@ namespace SparkleShare {
|
||||||
public SparkleEventLogController ()
|
public SparkleEventLogController ()
|
||||||
{
|
{
|
||||||
Program.Controller.ShowEventLogWindowEvent += delegate {
|
Program.Controller.ShowEventLogWindowEvent += delegate {
|
||||||
if (!WindowIsOpen)
|
if (!WindowIsOpen) {
|
||||||
ContentLoadingEvent ();
|
ContentLoadingEvent ();
|
||||||
|
|
||||||
if (this.selected_folder == null) {
|
if (this.selected_folder == null) {
|
||||||
new Thread (() => {
|
new Thread (() => {
|
||||||
|
Stopwatch watch = new Stopwatch ();
|
||||||
|
|
||||||
|
watch.Start ();
|
||||||
|
string html = HTML;
|
||||||
|
watch.Stop ();
|
||||||
|
|
||||||
|
int delay = 1000;
|
||||||
|
|
||||||
|
if (watch.ElapsedMilliseconds < delay)
|
||||||
|
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
|
||||||
|
|
||||||
UpdateChooserEvent (Folders);
|
UpdateChooserEvent (Folders);
|
||||||
UpdateContentEvent (HTML);
|
UpdateContentEvent (html);
|
||||||
|
|
||||||
}).Start ();
|
}).Start ();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WindowIsOpen = true;
|
WindowIsOpen = true;
|
||||||
ShowWindowEvent ();
|
ShowWindowEvent ();
|
||||||
|
|
Loading…
Reference in a new issue