diff --git a/SparkleShare/SparkleAbout.cs b/SparkleShare/SparkleAbout.cs index 44aa982b..af76eb08 100644 --- a/SparkleShare/SparkleAbout.cs +++ b/SparkleShare/SparkleAbout.cs @@ -53,8 +53,8 @@ namespace SparkleShare { Title = _("About SparkleShare"); AppPaintable = true; - string image_path = System.IO.Path.Combine (SparkleUI.AssetsPath, - "pixmaps", "about.png"); + string image_path = System.IO.Path.Combine (new string {SparkleUI.AssetsPath, + "pixmaps", "about.png"}); Realize (); Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path); diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 7d565122..30ed8503 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -246,7 +246,7 @@ namespace SparkleShare { if (name == null) return GetLog (); - string path = Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, name); + string path = Path.Combine (new string [] {SparkleConfig.DefaultConfig.FoldersPath, name}); int log_size = 50; foreach (SparkleRepoBase repo in Repositories) { @@ -351,7 +351,8 @@ namespace SparkleShare { if (change_set.Edited.Count > 0) { foreach (string file_path in change_set.Edited) { string absolute_file_path = Path.Combine ( - SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder, file_path); + new string [] {SparkleConfig.DefaultConfig.FoldersPath, + change_set.Folder, file_path}); if (File.Exists (absolute_file_path)) event_entry += "
" + file_path + "
"; @@ -363,7 +364,8 @@ namespace SparkleShare { if (change_set.Added.Count > 0) { foreach (string file_path in change_set.Added) { string absolute_file_path = Path.Combine ( - SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder, file_path); + new string [] {SparkleConfig.DefaultConfig.FoldersPath, + change_set.Folder, file_path}); if (File.Exists (absolute_file_path)) event_entry += "
" + file_path + "
"; @@ -375,7 +377,8 @@ namespace SparkleShare { if (change_set.Deleted.Count > 0) { foreach (string file_path in change_set.Deleted) { string absolute_file_path = Path.Combine ( - SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder, file_path); + new string [] {SparkleConfig.DefaultConfig.FoldersPath, + change_set.Folder, file_path}); if (File.Exists (absolute_file_path)) event_entry += "
" + file_path + "
"; @@ -388,10 +391,14 @@ namespace SparkleShare { int i = 0; foreach (string file_path in change_set.MovedFrom) { string to_file_path = change_set.MovedTo [i]; + string absolute_file_path = Path.Combine ( - SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder, file_path); + new string [] {SparkleConfig.DefaultConfig.FoldersPath, + change_set.Folder, file_path}); + string absolute_to_file_path = Path.Combine ( - SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder, file_path); + new string [] {SparkleConfig.DefaultConfig.FoldersPath, + change_set.Folder, file_path}); if (File.Exists (absolute_file_path)) event_entry += "
" + file_path + "
"; @@ -895,8 +902,8 @@ namespace SparkleShare { List old_avatars = new List (); bool avatar_fetched = false; string avatar_path = Path.Combine ( - Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath), "icons", - size + "x" + size, "status"); + new string [] {Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath), "icons", + size + "x" + size, "status"}); if (!Directory.Exists (avatar_path)) { Directory.CreateDirectory (avatar_path); diff --git a/SparkleShare/SparkleEventLog.cs b/SparkleShare/SparkleEventLog.cs index 219aa236..beaab312 100644 --- a/SparkleShare/SparkleEventLog.cs +++ b/SparkleShare/SparkleEventLog.cs @@ -214,20 +214,20 @@ namespace SparkleShare { html = html.Replace ("", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive))); html = html.Replace ("", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive))); html = html.Replace ("", "file://" + - System.IO.Path.Combine (SparkleUI.AssetsPath, "icons", - "hicolor", "32x32", "status", "avatar-default.png")); + System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", + "hicolor", "32x32", "status", "avatar-default.png"})); html = html.Replace ("", "file://" + - System.IO.Path.Combine (SparkleUI.AssetsPath, "icons", - "hicolor", "12x12", "status", "document-added.png")); + System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", + "hicolor", "12x12", "status", "document-added.png"})); html = html.Replace ("", "file://" + - System.IO.Path.Combine (SparkleUI.AssetsPath, "icons", - "hicolor", "12x12", "status", "document-edited.png")); + System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", + "hicolor", "12x12", "status", "document-edited.png"})); html = html.Replace ("", "file://" + - System.IO.Path.Combine (SparkleUI.AssetsPath, "icons", - "hicolor", "12x12", "status", "document-deleted.png")); + System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", + "hicolor", "12x12", "status", "document-deleted.png"})); html = html.Replace ("", "file://" + - System.IO.Path.Combine (SparkleUI.AssetsPath, "icons", - "hicolor", "12x12", "status", "document-moved.png")); + System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", + "hicolor", "12x12", "status", "document-moved.png"})); Application.Invoke (delegate { this.spinner.Stop (); diff --git a/SparkleShare/SparkleLinController.cs b/SparkleShare/SparkleLinController.cs index 4422fcc3..ffdbe58f 100644 --- a/SparkleShare/SparkleLinController.cs +++ b/SparkleShare/SparkleLinController.cs @@ -73,10 +73,11 @@ namespace SparkleShare { // from the Internet category if needed public override void InstallLauncher () { - string apps_path = Path.Combine (SparkleConfig.DefaultConfig.HomePath, - ".local", "share", "applications"); + string apps_path = Path.Combine ( + new string [] {SparkleConfig.DefaultConfig.HomePath, + ".local", "share", "applications"}); - string desktopfile_path = SparkleHelpers.CombineMore (apps_path, "sparkleshare.desktop"); + string desktopfile_path = Path.Combine (apps_path, "sparkleshare.desktop"); if (!File.Exists (desktopfile_path)) { if (!Directory.Exists (apps_path)) @@ -135,8 +136,9 @@ namespace SparkleShare { Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath); SparkleHelpers.DebugInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'"); - string gvfs_command_path = Path.Combine (Path.VolumeSeparatorChar.ToString (), - "usr", "bin", "gvfs-set-attribute"); + string gvfs_command_path = Path.Combine ( + new string [] {Path.VolumeSeparatorChar.ToString (), + "usr", "bin", "gvfs-set-attribute"}); // Add a special icon to the SparkleShare folder if (File.Exists (gvfs_command_path)) { @@ -166,8 +168,8 @@ namespace SparkleShare { public override string EventLogHTML { get { - string path = Path.Combine (Defines.PREFIX, - "share", "sparkleshare", "html", "event-log.html"); + string path = Path.Combine (new string [] {Defines.PREFIX, + "share", "sparkleshare", "html", "event-log.html"}); string html = String.Join (Environment.NewLine, File.ReadAllLines (path)); @@ -181,8 +183,8 @@ namespace SparkleShare { public override string DayEntryHTML { get { - string path = Path.Combine (Defines.PREFIX, - "share", "sparkleshare", "html", "day-entry.html"); + string path = Path.Combine (new string [] {Defines.PREFIX, + "share", "sparkleshare", "html", "day-entry.html"}); return String.Join (Environment.NewLine, File.ReadAllLines (path)); } @@ -191,8 +193,8 @@ namespace SparkleShare { public override string EventEntryHTML { get { - string path = Path.Combine (Defines.PREFIX, - "share", "sparkleshare", "html", "event-entry.html"); + string path = Path.Combine (new string [] {Defines.PREFIX, + "share", "sparkleshare", "html", "event-entry.html"}); return String.Join (Environment.NewLine, File.ReadAllLines (path)); } diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 8f4d9717..48012464 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -37,7 +37,8 @@ namespace SparkleShare { public static SparkleBubbles Bubbles; public static SparkleSetup Setup; public static SparkleAbout About; - public static string AssetsPath = Path.Combine (Defines.PREFIX, "share", "sparkleshare"); + public static string AssetsPath = Path.Combine ( + new string [] {Defines.PREFIX, "share", "sparkleshare"}); // Short alias for the translations