From 7dcfa332b5ea68e8be9113dc76c8215f3e9fa8f8 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 5 Oct 2011 01:21:39 +0200 Subject: [PATCH] setup: select On My Own Server plugin by default --- SparkleShare/SparkleSetup.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SparkleShare/SparkleSetup.cs b/SparkleShare/SparkleSetup.cs index ea1daf7f..069dbdef 100755 --- a/SparkleShare/SparkleSetup.cs +++ b/SparkleShare/SparkleSetup.cs @@ -166,16 +166,19 @@ namespace SparkleShare { PathEntry = new SparkleEntry (); AddressEntry = new SparkleEntry (); + Controller.SelectListPluginEvent += delegate (int index) { + Application.Invoke (delegate { + TreeSelection selection = tree.Selection; + TreePath path = new TreePath (index.ToString ()); + selection.SelectPath (path); + }); + }; + // Select the first plugin by default TreeSelection default_selection = tree.Selection; TreePath default_path = new TreePath ("0"); default_selection.SelectPath (default_path); - - Controller.SelectListPluginEvent += delegate (int index) { - TreeSelection selection = tree.Selection; - TreePath path = new TreePath (index.ToString ()); - selection.SelectPath (path); - }; + Controller.SelectedPluginChanged (0); Controller.ChangeAddressFieldEvent += delegate (string text, string example_text, FieldState state) {