Fix compile by using the string.Combine extension method where needed

This commit is contained in:
l3iggs 2011-08-19 22:30:40 +02:00 committed by Hylke Bons
parent e0d900c8fe
commit 3fdc9c1328
4 changed files with 25 additions and 25 deletions

View file

@ -53,8 +53,8 @@ namespace SparkleShare {
Title = _("About SparkleShare"); Title = _("About SparkleShare");
AppPaintable = true; AppPaintable = true;
string image_path = System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, string image_path = new string [] {SparkleUI.AssetsPath,
"pixmaps", "about.png"}); "pixmaps", "about.png"}.Combine ();
Realize (); Realize ();
Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path); Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path);

View file

@ -214,20 +214,20 @@ namespace SparkleShare {
html = html.Replace ("<!-- $secondary-font-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive))); html = html.Replace ("<!-- $secondary-font-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $small-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive))); html = html.Replace ("<!-- $small-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $no-buddy-icon-background-image -->", "file://" + html = html.Replace ("<!-- $no-buddy-icon-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "32x32", "status", "avatar-default.png"})); "hicolor", "32x32", "status", "avatar-default.png"}.Combine ());
html = html.Replace ("<!-- $document-added-background-image -->", "file://" + html = html.Replace ("<!-- $document-added-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-added.png"})); "hicolor", "12x12", "status", "document-added.png"}.Combine ());
html = html.Replace ("<!-- $document-edited-background-image -->", "file://" + html = html.Replace ("<!-- $document-edited-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-edited.png"})); "hicolor", "12x12", "status", "document-edited.png"}.Combine ());
html = html.Replace ("<!-- $document-deleted-background-image -->", "file://" + html = html.Replace ("<!-- $document-deleted-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-deleted.png"})); "hicolor", "12x12", "status", "document-deleted.png"}.Combine ());
html = html.Replace ("<!-- $document-moved-background-image -->", "file://" + html = html.Replace ("<!-- $document-moved-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons", new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-moved.png"})); "hicolor", "12x12", "status", "document-moved.png"}.Combine ());
Application.Invoke (delegate { Application.Invoke (delegate {
this.spinner.Stop (); this.spinner.Stop ();

View file

@ -73,9 +73,9 @@ namespace SparkleShare {
// from the Internet category if needed // from the Internet category if needed
public override void InstallLauncher () public override void InstallLauncher ()
{ {
string apps_path = Path.Combine ( string apps_path =
new string [] {SparkleConfig.DefaultConfig.HomePath, new string [] {SparkleConfig.DefaultConfig.HomePath,
".local", "share", "applications"}); ".local", "share", "applications"}.Combine ();
string desktopfile_path = Path.Combine (apps_path, "sparkleshare.desktop"); string desktopfile_path = Path.Combine (apps_path, "sparkleshare.desktop");
@ -136,9 +136,9 @@ namespace SparkleShare {
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath); Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
SparkleHelpers.DebugInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'"); SparkleHelpers.DebugInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
string gvfs_command_path = Path.Combine ( string gvfs_command_path =
new string [] {Path.VolumeSeparatorChar.ToString (), new string [] {Path.VolumeSeparatorChar.ToString (),
"usr", "bin", "gvfs-set-attribute"}); "usr", "bin", "gvfs-set-attribute"}.Combine ();
// Add a special icon to the SparkleShare folder // Add a special icon to the SparkleShare folder
if (File.Exists (gvfs_command_path)) { if (File.Exists (gvfs_command_path)) {
@ -168,13 +168,13 @@ namespace SparkleShare {
public override string EventLogHTML { public override string EventLogHTML {
get { get {
string path = Path.Combine (new string [] {Defines.PREFIX, string path = new string [] {Defines.PREFIX,
"share", "sparkleshare", "html", "event-log.html"}); "share", "sparkleshare", "html", "event-log.html"}.Combine ();
string html = String.Join (Environment.NewLine, File.ReadAllLines (path)); string html = String.Join (Environment.NewLine, File.ReadAllLines (path));
html = html.Replace ("<!-- $jquery-url -->", "file://" + html = html.Replace ("<!-- $jquery-url -->", "file://" +
Path.Combine (Defines.PREFIX, "share", "sparkleshare", "html", "jquery.js")); new string [] {Defines.PREFIX, "share", "sparkleshare", "html", "jquery.js"}.Combine ());
return html; return html;
} }
@ -183,8 +183,8 @@ namespace SparkleShare {
public override string DayEntryHTML { public override string DayEntryHTML {
get { get {
string path = Path.Combine (new string [] {Defines.PREFIX, string path = new string [] {Defines.PREFIX,
"share", "sparkleshare", "html", "day-entry.html"}); "share", "sparkleshare", "html", "day-entry.html"}.Combine ();
return String.Join (Environment.NewLine, File.ReadAllLines (path)); return String.Join (Environment.NewLine, File.ReadAllLines (path));
} }
@ -193,8 +193,8 @@ namespace SparkleShare {
public override string EventEntryHTML { public override string EventEntryHTML {
get { get {
string path = Path.Combine (new string [] {Defines.PREFIX, string path = new string [] {Defines.PREFIX,
"share", "sparkleshare", "html", "event-entry.html"}); "share", "sparkleshare", "html", "event-entry.html"}.Combine ();
return String.Join (Environment.NewLine, File.ReadAllLines (path)); return String.Join (Environment.NewLine, File.ReadAllLines (path));
} }

View file

@ -37,8 +37,8 @@ namespace SparkleShare {
public static SparkleBubbles Bubbles; public static SparkleBubbles Bubbles;
public static SparkleSetup Setup; public static SparkleSetup Setup;
public static SparkleAbout About; public static SparkleAbout About;
public static string AssetsPath = Path.Combine ( public static string AssetsPath =
new string [] {Defines.PREFIX, "share", "sparkleshare"}); new string [] {Defines.PREFIX, "share", "sparkleshare"}.Combine ();
// Short alias for the translations // Short alias for the translations