diff --git a/SparkleLib/SparkleHelpers.cs b/SparkleLib/SparkleHelpers.cs index b9fb68d1..b7b575bc 100755 --- a/SparkleLib/SparkleHelpers.cs +++ b/SparkleLib/SparkleHelpers.cs @@ -35,12 +35,8 @@ namespace SparkleLib { if (SparkleConfig.DebugMode) Console.WriteLine (line); - lock (debug_lock) { - File.AppendAllText ( - SparkleConfig.DefaultConfig.LogFilePath, - line + Environment.NewLine - ); - } + lock (debug_lock) + File.AppendAllText (SparkleConfig.DefaultConfig.LogFilePath, line + Environment.NewLine); } @@ -60,18 +56,19 @@ namespace SparkleLib { // Recursively sets access rights of a folder to 'Normal' public static void ClearAttributes (string path) { - if (Directory.Exists (path)) { - string [] folders = Directory .GetDirectories (path); + if (!Directory.Exists (path)) + return; - foreach (string folder in folders) - ClearAttributes (folder); + string [] folders = Directory.GetDirectories (path); - string [] files = Directory .GetFiles(path); + foreach (string folder in folders) + ClearAttributes (folder); - foreach (string file in files) - if (!IsSymlink (file)) - File.SetAttributes (file, FileAttributes.Normal); - } + string [] files = Directory.GetFiles(path); + + foreach (string file in files) + if (!IsSymlink (file)) + File.SetAttributes (file, FileAttributes.Normal); } @@ -93,11 +90,9 @@ namespace SparkleLib { public static bool IsWindows { get { - PlatformID platform = Environment.OSVersion.Platform; - - return (platform == PlatformID.Win32NT || - platform == PlatformID.Win32S || - platform == PlatformID.Win32Windows); + return (Environment.OSVersion.Platform == PlatformID.Win32NT || + Environment.OSVersion.Platform == PlatformID.Win32S || + Environment.OSVersion.Platform == PlatformID.Win32Windows); } } diff --git a/SparkleShare/Linux/SparkleAbout.cs b/SparkleShare/Linux/SparkleAbout.cs index c6c1168d..485cb8f4 100755 --- a/SparkleShare/Linux/SparkleAbout.cs +++ b/SparkleShare/Linux/SparkleAbout.cs @@ -43,7 +43,6 @@ namespace SparkleShare { args.RetVal = true; }; - DefaultSize = new Gdk.Size (600, 260); Resizable = false; BorderWidth = 0; @@ -52,8 +51,7 @@ namespace SparkleShare { Title = _("About SparkleShare"); AppPaintable = true; - string image_path = new string [] {SparkleUI.AssetsPath, - "pixmaps", "about.png"}.Combine (); + string image_path = new string [] { SparkleUI.AssetsPath, "pixmaps", "about.png" }.Combine (); Realize (); Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path); @@ -62,7 +60,6 @@ namespace SparkleShare { GdkWindow.SetBackPixmap (map, false); CreateAbout (); - Controller.HideWindowEvent += delegate { Application.Invoke (delegate { @@ -80,7 +77,7 @@ namespace SparkleShare { Controller.NewVersionEvent += delegate (string new_version) { Application.Invoke (delegate { this.updates.Markup = String.Format ("{0}", - String.Format ("A newer version ({0}) is available!", new_version)); + string.Format ("A newer version ({0}) is available!", new_version)); this.updates.ShowAll (); }); @@ -109,17 +106,14 @@ namespace SparkleShare { private void CreateAbout () { Label version = new Label () { - Markup = "" + - "version " + Controller.RunningVersion + - "", + Markup = string.Format ("version {0}", + Controller.RunningVersion), Xalign = 0, Xpad = 300 }; this.updates = new Label () { - Markup = "" + - "Checking for updates..." + - "", + Markup = "Checking for updates...", Xalign = 0, Xpad = 300 }; diff --git a/SparkleShare/SparkleStatusIconController.cs b/SparkleShare/SparkleStatusIconController.cs index c54d44a7..8f58ef35 100755 --- a/SparkleShare/SparkleStatusIconController.cs +++ b/SparkleShare/SparkleStatusIconController.cs @@ -252,7 +252,7 @@ namespace SparkleShare { this.animation_frame_number = 0; this.animation = new Timer () { - Interval = 40 + Interval = 100 }; this.animation.Elapsed += delegate {