From 73c84eaac24bcd49cad21360b8ccc192ed6007f5 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 6 Oct 2013 23:22:51 +0100 Subject: [PATCH] linux setup: Show download speed when adding projects --- SparkleShare/Linux/SparkleSetup.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Linux/SparkleSetup.cs b/SparkleShare/Linux/SparkleSetup.cs index 11a20f88..8f7f7524 100755 --- a/SparkleShare/Linux/SparkleSetup.cs +++ b/SparkleShare/Linux/SparkleSetup.cs @@ -359,10 +359,17 @@ namespace SparkleShare { Button cancel_button = new Button () { Label = "Cancel" }; Button finish_button = new Button ("Finish") { Sensitive = false }; + Label progress_label = new Label ("Preparing to fetch files…") { + Justify = Justification.Right, + Xalign = 1 + }; + Controller.UpdateProgressBarEvent += delegate (double percentage, string speed) { - // TODO: Add label to show download speed - Application.Invoke (delegate { progress_bar.Fraction = percentage / 100; }); + Application.Invoke (delegate { + progress_bar.Fraction = percentage / 100; + progress_label.Text = speed; + }); }; cancel_button.Clicked += delegate { Controller.SyncingCancelled (); }; @@ -370,6 +377,7 @@ namespace SparkleShare { VBox bar_wrapper = new VBox (false, 0); bar_wrapper.PackStart (progress_bar, false, false, 21); + bar_wrapper.PackStart (progress_label, false, true, 0); Add (bar_wrapper); AddButton (cancel_button);