From 5224d1abc531e62abcee55ea6adcc01eb8604163 Mon Sep 17 00:00:00 2001 From: Alex Hudson Date: Mon, 2 Aug 2010 17:05:22 +0100 Subject: [PATCH] Fix racey startup when we're showing the Intro window --- SparkleShare/SparkleIntro.cs | 5 +++-- SparkleShare/SparkleShare.cs | 2 +- SparkleShare/SparkleUI.cs | 10 ++++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index 2d9b31aa..58b2a28b 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -555,9 +555,10 @@ namespace SparkleShare { Button finish_button = new Button (_("Finish")); finish_button.Clicked += delegate (object o, EventArgs args) { + if(SparkleShare.SparkleUI != null) + SparkleShare.SparkleUI.UpdateRepositories (); - SparkleShare.SparkleUI.UpdateRepositories (); -// Destroy (); + Destroy (); }; diff --git a/SparkleShare/SparkleShare.cs b/SparkleShare/SparkleShare.cs index adbb9381..79c181fa 100644 --- a/SparkleShare/SparkleShare.cs +++ b/SparkleShare/SparkleShare.cs @@ -73,7 +73,7 @@ namespace SparkleShare { } SparkleUI = new SparkleUI (HideUI); - + SparkleUI.Run(); } // Prints the help output diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 0f41cc22..d5fb083e 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -81,13 +81,15 @@ namespace SparkleShare { SparkleIntro intro = new SparkleIntro (); intro.ShowAll (); - } else { - - NotificationIcon = new SparkleStatusIcon (); - } + NotificationIcon = new SparkleStatusIcon (); + } + } + + public void Run() + { // The main loop Gtk.Application.Run ();