diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 450791bd..7b9cb216 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -79,6 +79,7 @@ namespace SparkleShare { public readonly List Plugins = new List (); public SparklePlugin SelectedPlugin; + public bool WindowIsOpen { get; private set; } public SparkleInvite PendingInvite { get; private set; } public int TutorialPageNumber { get; private set; } public string PreviousUrl { get; private set; } @@ -184,6 +185,8 @@ namespace SparkleShare { } if (PendingInvite != null) { + WindowIsOpen = true; + if (ShowWindowEvent != null) ShowWindowEvent (); @@ -202,10 +205,21 @@ namespace SparkleShare { } if (page_type == PageType.Add) { - if (!Program.Controller.FirstRun && TutorialPageNumber == 0) { + if (WindowIsOpen) { + if (this.current_page == PageType.Error) { + if (ChangePageEvent != null) + ChangePageEvent (page_type, null); + } + + if (ShowWindowEvent != null) + ShowWindowEvent (); + + } else if (!Program.Controller.FirstRun && TutorialPageNumber == 0) { if (ChangePageEvent != null) ChangePageEvent (page_type, null); - + + WindowIsOpen = true; + if (ShowWindowEvent != null) ShowWindowEvent (); } @@ -213,6 +227,8 @@ namespace SparkleShare { return; } + WindowIsOpen = true; + if (ChangePageEvent != null) ChangePageEvent (page_type, null); @@ -232,6 +248,8 @@ namespace SparkleShare { this.fetch_prior_history = false; + WindowIsOpen = false; + if (HideWindowEvent != null) HideWindowEvent (); }