diff --git a/SparkleShare/Mac/SparkleSetup.cs b/SparkleShare/Mac/SparkleSetup.cs index 1782539f..db3122b2 100755 --- a/SparkleShare/Mac/SparkleSetup.cs +++ b/SparkleShare/Mac/SparkleSetup.cs @@ -87,8 +87,8 @@ namespace SparkleShare { case PageType.Setup: { Header = "Welcome to SparkleShare!"; - Description = "Before we get started, what's your name and email? " + - "Don't worry, this information will only visible to your team members."; + Description = "Before we get started, what's your name and email?\n" + + "Don't worry, this information will only visible to any team members."; FullNameLabel = new NSTextField () { diff --git a/SparkleShare/Mac/SparkleSetupWindow.cs b/SparkleShare/Mac/SparkleSetupWindow.cs index f76d0931..07b35f7e 100755 --- a/SparkleShare/Mac/SparkleSetupWindow.cs +++ b/SparkleShare/Mac/SparkleSetupWindow.cs @@ -78,7 +78,8 @@ namespace SparkleShare { BackgroundColor = NSColor.WindowBackground, Bordered = false, Editable = false, - Font = SparkleUI.Font + Font = NSFontManager.SharedFontManager.FontWithFamily + ("Lucida Grande", NSFontTraitMask.Condensed, 0, 11) }; if (Program.UI != null) @@ -108,17 +109,20 @@ namespace SparkleShare { ContentView.AddSubview (SideSplashView); int i = 1; + int x = 0; if (Buttons.Count > 0) { DefaultButtonCell = Buttons [0].Cell; foreach (NSButton button in Buttons) { button.BezelStyle = NSBezelStyle.Rounded; - button.Frame = new RectangleF (Frame.Width - 15 - (105 * i), 12, 105, 32); + button.Frame = new RectangleF (Frame.Width - 15 - x - (105 * i), 12, 105, 32); // Make the button a bit wider if the text is // likely to be longer - if (button.Title.Contains (" ")) + if (button.Title.Contains (" ")) { button.Frame = new RectangleF (Frame.Width - 30 - (105 * i), 12, 120, 32); + x += 15; + } button.Font = SparkleUI.Font; ContentView.AddSubview (button); diff --git a/SparkleShare/Program.cs b/SparkleShare/Program.cs index 92568169..0a2558fe 100644 --- a/SparkleShare/Program.cs +++ b/SparkleShare/Program.cs @@ -33,15 +33,18 @@ namespace SparkleShare { // Short alias for the translations public static string _ (string s) - { - #if __MonoCS__ + { + #if __MonoCS__ return Catalog.GetString (s); - #else + #else return Strings.T (s); - #endif + #endif } - + + #if !__MonoCS__ + [STAThread] + #endif public static void Main (string [] args) { // Parse the command line options @@ -73,6 +76,12 @@ namespace SparkleShare { UI = new SparkleUI (); UI.Run (); } + + #if !__MonoCS__ + // Suppress assertion messages in debug mode + GC.Collect (GC.MaxGeneration, GCCollectionMode.Forced); + GC.WaitForPendingFinalizers (); + #endif } @@ -101,7 +110,6 @@ namespace SparkleShare { } - // Prints the version information public static void PrintVersion () { Console.WriteLine (_("SparkleShare " + Defines.VERSION)); diff --git a/SparkleShare/Windows/Program.cs b/SparkleShare/Windows/Program.cs deleted file mode 100644 index f24b288d..00000000 --- a/SparkleShare/Windows/Program.cs +++ /dev/null @@ -1,119 +0,0 @@ -// SparkleShare, a collaboration and sharing tool. -// Copyright (C) 2010 Hylke Bons -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - - -using System; - -#if __MonoCS__ -using Mono.Unix; -#endif -using SparkleLib; - -namespace SparkleShare { - - // This is SparkleShare! - public class Program { - - public static SparkleController Controller; - public static SparkleUI UI; - - - // Short alias for the translations - public static string _ (string s) - { - #if __MonoCS__ - return Catalog.GetString (s); - #else - return Strings.T (s); - #endif - } - - - #if !__MonoCS__ - [STAThread] - #endif - public static void Main (string [] args) - { - // Parse the command line options - bool show_help = false; - OptionSet option_set = new OptionSet () { - { "v|version", _("Print version information"), v => { PrintVersion (); } }, - { "h|help", _("Show this help text"), v => show_help = v != null } - }; - - try { - option_set.Parse (args); - - } catch (OptionException e) { - Console.Write ("SparkleShare: "); - Console.WriteLine (e.Message); - Console.WriteLine ("Try `sparkleshare --help' for more information."); - } - - if (show_help) - ShowHelp (option_set); - - - // Initialize the controller this way so that - // there aren't any exceptions in the OS specific UI's - Controller = new SparkleController (); - Controller.Initialize (); - - if (Controller != null) { - UI = new SparkleUI (); - UI.Run (); - } - - #if !__MonoCS__ - // Suppress assertion messages in debug mode - GC.Collect (GC.MaxGeneration, GCCollectionMode.Forced); - GC.WaitForPendingFinalizers (); - #endif - } - - - // Prints the help output - public static void ShowHelp (OptionSet option_set) - { - Console.WriteLine (" "); - Console.WriteLine (_("SparkleShare, a collaboration and sharing tool.")); - Console.WriteLine (_("Copyright (C) 2010 Hylke Bons")); - Console.WriteLine (" "); - Console.WriteLine (_("This program comes with ABSOLUTELY NO WARRANTY.")); - Console.WriteLine (" "); - Console.WriteLine (_("This is free software, and you are welcome to redistribute it ")); - Console.WriteLine (_("under certain conditions. Please read the GNU GPLv3 for details.")); - Console.WriteLine (" "); - Console.WriteLine (_("SparkleShare is a collaboration and sharing tool that is ")); - Console.WriteLine (_("designed to keep things simple and to stay out of your way.")); - Console.WriteLine (" "); - Console.WriteLine (_("Usage: sparkleshare [start|stop|restart|version] [OPTION]...")); - Console.WriteLine (_("Sync SparkleShare folder with remote repositories.")); - Console.WriteLine (" "); - Console.WriteLine (_("Arguments:")); - - option_set.WriteOptionDescriptions (Console.Out); - Environment.Exit (0); - } - - - public static void PrintVersion () - { - Console.WriteLine (_("SparkleShare " + Defines.VERSION)); - Environment.Exit (0); - } - } -} diff --git a/SparkleShare/Windows/SparkleAbout.cs b/SparkleShare/Windows/SparkleAbout.cs index d20df3ec..3390a0b0 100644 --- a/SparkleShare/Windows/SparkleAbout.cs +++ b/SparkleShare/Windows/SparkleAbout.cs @@ -108,7 +108,7 @@ namespace SparkleShare { this.updates = new Label () { Content = "Checking for updates...", FontSize = 11, - Foreground = new SolidColorBrush (Color.FromRgb (45, 62, 81)) + Foreground = new SolidColorBrush (Color.FromRgb (45, 62, 81)) // TODO: color looks off }; TextBlock credits = new TextBlock () { diff --git a/SparkleShare/Windows/SparkleShare.csproj b/SparkleShare/Windows/SparkleShare.csproj index 0dd30953..f0962bbd 100644 --- a/SparkleShare/Windows/SparkleShare.csproj +++ b/SparkleShare/Windows/SparkleShare.csproj @@ -123,7 +123,6 @@ - @@ -135,6 +134,9 @@ SparkleEventLogController.cs + + Program.cs + diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index fd9c6809..aed047f1 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -18,8 +18,8 @@ - - + + @@ -62,7 +62,7 @@ - +