From 3db91fa9d9d93a1e802117ce582691410094dc6a Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 15 Jul 2010 20:39:12 +0100 Subject: [PATCH] Improve startup screen --- NotifySharp/NotifySharp.csproj | 42 ++++++++++++++- SparkleShare.sln | 11 ++-- SparkleShare/SparkleIntro.cs | 87 ++++++++++++++++++++++++++++++-- SparkleShare/SparkleShare.csproj | 4 +- SparkleShare/SparkleSpinner.cs | 16 +++--- 5 files changed, 142 insertions(+), 18 deletions(-) diff --git a/NotifySharp/NotifySharp.csproj b/NotifySharp/NotifySharp.csproj index 6053fdf9..4562b26f 100644 --- a/NotifySharp/NotifySharp.csproj +++ b/NotifySharp/NotifySharp.csproj @@ -1 +1,41 @@ - Debug AnyCPU 8.0.50727 2.0 {005CCA8E-DFBF-464A-B6DA-452C62D4589C} Library notifysharp notify-sharp true full false bin\Debug DEBUG prompt 4 none false bin\Release prompt 4 \ No newline at end of file + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {005CCA8E-DFBF-464A-B6DA-452C62D4589C} + Library + notifysharp + notify-sharp + + + true + full + false + bin\Debug + DEBUG + prompt + 4 + + + none + false + bin\Release + prompt + 4 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SparkleShare.sln b/SparkleShare.sln index e1d2563c..df6e25f5 100644 --- a/SparkleShare.sln +++ b/SparkleShare.sln @@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare", "SparkleShar EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifySharp", "NotifySharp\NotifySharp.csproj", "{005CCA8E-DFBF-464A-B6DA-452C62D4589C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSSH", "SharpSSH\SharpSSH.csproj", "{BB50B7E2-4622-4D8B-B7FF-5E5D8F02D91F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,10 +21,13 @@ Global {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU + {BB50B7E2-4622-4D8B-B7FF-5E5D8F02D91F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB50B7E2-4622-4D8B-B7FF-5E5D8F02D91F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB50B7E2-4622-4D8B-B7FF-5E5D8F02D91F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB50B7E2-4622-4D8B-B7FF-5E5D8F02D91F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - name = SparkleShare - version = 0.1 StartupItem = SparkleShare\SparkleShare.csproj + name = SparkleShare EndGlobalSection -EndGlobal +EndGlobal diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index 853dd808..005e25a3 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -39,7 +39,7 @@ namespace SparkleShare { { BorderWidth = 0; - SetSizeRequest (600, 400); + SetSizeRequest (640, 400); Resizable = false; IconName = "folder-sparkleshare"; @@ -55,13 +55,14 @@ namespace SparkleShare { VBox layout_vertical = new VBox (false, 0); - Label introduction = new Label ("Welcome to SparkleShare!"); + Label introduction = new Label ("Welcome to SparkleShare!"); introduction.UseMarkup = true; introduction.Xalign = 0; - Label information = new Label ("Before we can create a SparkleShare folder on this \n" + + Label information = new Label ("Before we can create a SparkleShare folder on this " + "computer, we need a few bits of information from you."); information.Xalign = 0; + information.Wrap = true; Entry name_entry = new Entry (""); @@ -113,7 +114,21 @@ namespace SparkleShare { HButtonBox controls = new HButtonBox (); controls.Layout = ButtonBoxStyle.End; - Button done_button = new Button ("Next"); + + Button done_button = new Button (_("Next")); + + done_button.Clicked += delegate (object o, EventArgs args) { + done_button.Remove (done_button.Child); + HBox hbox = new HBox (); + hbox.Add (new SparkleSpinner ()); + hbox.Add (new Label ("Configuring…")); + done_button.Add (hbox); + done_button.Sensitive = false; + table.Sensitive = false; + done_button.ShowAll (); + ShowStepTwo (); + }; + controls.Add (done_button); layout_vertical.PackStart (introduction, false, false, 0); @@ -131,6 +146,70 @@ namespace SparkleShare { ShowAll (); } + + + public void ShowStepTwo () + { + + Remove (Child); + + HBox layout_horizontal = new HBox (false, 6); + + Image side_splash = new Image ("/home/hbons/github/SparkleShare/data/side-splash.png"); + + layout_horizontal.PackStart (side_splash, false, false, 0); + + VBox wrapper = new VBox (false, 0); + + VBox layout_vertical = new VBox (false, 0); + layout_vertical.BorderWidth = 30; + + Label introduction; + introduction = new Label ("SparkleShare ready to go!"); + + introduction.UseMarkup = true; + introduction.Xalign = 0; + + Label information; + information = new Label ("You can now start accepting invitations from others. " + + "Just click on invitations you get by email and " + + "we'll take care of the rest."); + + information.UseMarkup = true; + information.Wrap = true; + information.Xalign = 0; + + HBox link_wrapper = new HBox (false, 0); + LinkButton link = new LinkButton ("http://www.sparkleshare.org/", + _("Learn how to host your own SparkleSpace")); + + link_wrapper.PackStart (link, false, false, 0); + + layout_vertical.PackStart (introduction, false, false, 0); + layout_vertical.PackStart (information, false, false, 21); + layout_vertical.PackStart (link_wrapper, false, false, 0); + + HButtonBox controls = new HButtonBox (); + controls.Layout = ButtonBoxStyle.End; + controls.BorderWidth = 12; + + Button finish_button = new Button (_("Finish")); + + finish_button.Clicked += delegate (object o, EventArgs args) { + Destroy (); + }; + + controls.Add (finish_button); + + wrapper.PackStart (layout_vertical, true, true, 0); + wrapper.PackStart (controls, false, false, 0); + + layout_horizontal.Add (wrapper); + + Add (layout_horizontal); + ShowAll (); + + } } diff --git a/SparkleShare/SparkleShare.csproj b/SparkleShare/SparkleShare.csproj index 923cd71a..f42c092b 100644 --- a/SparkleShare/SparkleShare.csproj +++ b/SparkleShare/SparkleShare.csproj @@ -48,9 +48,9 @@ - + {005CCA8E-DFBF-464A-B6DA-452C62D4589C} - notify-sharp + NotifySharp diff --git a/SparkleShare/SparkleSpinner.cs b/SparkleShare/SparkleSpinner.cs index eb423366..e18d7e5d 100644 --- a/SparkleShare/SparkleSpinner.cs +++ b/SparkleShare/SparkleSpinner.cs @@ -37,20 +37,20 @@ namespace SparkleShare { CycleDuration = 750; CurrentStep = 0; - Size = 24; + Size = 16; - Gdk.Pixbuf SpinnerGallery = SparkleHelpers.GetIcon ("process-working", Size); + Gdk.Pixbuf spinner_gallery = SparkleHelpers.GetIcon ("process-working", Size); - int FramesInWidth = SpinnerGallery.Width / Size; - int FramesInHeight = SpinnerGallery.Height / Size; - NumSteps = FramesInWidth * FramesInHeight; + int frames_in_width = spinner_gallery.Width / Size; + int frames_in_height = spinner_gallery.Height / Size; + NumSteps = frames_in_width * frames_in_height; Images = new Gdk.Pixbuf [NumSteps - 1]; int i = 0; - for (int y = 0; y < FramesInHeight; y++) { - for (int x = 0; x < FramesInWidth; x++) { + for (int y = 0; y < frames_in_height; y++) { + for (int x = 0; x < frames_in_width; x++) { if (!(y == 0 && x == 0)) { - Images [i] = new Gdk.Pixbuf (SpinnerGallery, x * Size, y * Size, Size, Size); + Images [i] = new Gdk.Pixbuf (spinner_gallery, x * Size, y * Size, Size, Size); i++; } }