From a3fbb6f47ef335a608509e58283cfe229573f6a6 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 17 May 2012 23:32:00 +0100 Subject: [PATCH] linux setup: add history checkbox to add dialog --- SparkleShare/Linux/SparkleSetup.cs | 16 ++++++++-------- SparkleShare/Linux/SparkleSetupWindow.cs | 8 ++++---- SparkleShare/SparkleSetupController.cs | 5 +++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/SparkleShare/Linux/SparkleSetup.cs b/SparkleShare/Linux/SparkleSetup.cs index 550a6095..7dcd84a4 100755 --- a/SparkleShare/Linux/SparkleSetup.cs +++ b/SparkleShare/Linux/SparkleSetup.cs @@ -403,9 +403,9 @@ namespace SparkleShare { case PageType.Syncing: { Header = String.Format (_("Adding project ‘{0}’…"), Controller.SyncingFolder); - Description = Description = _("This may either take a short or a long time depending on the project's size."); + Description = _("This may either take a short or a long time depending on the project's size."); - this.progress_bar.Fraction = Controller.ProgressBarPercentage; + this.progress_bar.Fraction = Controller.ProgressBarPercentage / 100; Button finish_button = new Button () { Sensitive = false, @@ -432,7 +432,7 @@ namespace SparkleShare { if (this.progress_bar.Parent != null) (this.progress_bar.Parent as Container).Remove (this.progress_bar); - VBox bar_wrapper = new VBox (false , 0); + VBox bar_wrapper = new VBox (false, 0); bar_wrapper.PackStart (this.progress_bar, false, false, 0); Add (bar_wrapper); @@ -441,13 +441,13 @@ namespace SparkleShare { } case PageType.Error: { - - Header = _("Something went wrong") + "…"; + + Header = _("Something went wrong") + "…"; VBox points = new VBox (false, 0); - Image list_point_one = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)) { }; - Image list_point_two = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)) { }; - Image list_point_three = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)) { }; + Image list_point_one = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)); + Image list_point_two = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)); + Image list_point_three = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)); Label label_one = new Label () { Text = "Is the host online?", diff --git a/SparkleShare/Linux/SparkleSetupWindow.cs b/SparkleShare/Linux/SparkleSetupWindow.cs index 8de414f5..b43b7e90 100755 --- a/SparkleShare/Linux/SparkleSetupWindow.cs +++ b/SparkleShare/Linux/SparkleSetupWindow.cs @@ -126,10 +126,7 @@ namespace SparkleShare { public void AddOption (Widget widget) - { - if (OptionArea.Children.Length > 0) - OptionArea.Remove (OptionArea.Children [0]); - + { OptionArea.Add (widget); ShowAll (); } @@ -168,6 +165,9 @@ namespace SparkleShare { Header = ""; Description = ""; + if (OptionArea.Children.Length > 0) + OptionArea.Remove (OptionArea.Children [0]); + if (Wrapper.Children.Length > 0) Wrapper.Remove (Wrapper.Children [0]); diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 01cc5fa7..450791bd 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -242,8 +242,9 @@ namespace SparkleShare { full_name = full_name.Trim (); email = email.Trim (); - bool fields_valid = full_name != null && full_name.Trim().Length > 0 && - IsValidEmail (email); + bool fields_valid = (full_name != null && + full_name.Trim ().Length > 0 && + IsValidEmail (email)); if (UpdateSetupContinueButtonEvent != null) UpdateSetupContinueButtonEvent (fields_valid);