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");
AppPaintable = true;
string image_path = System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath,
"pixmaps", "about.png"});
string image_path = new string [] {SparkleUI.AssetsPath,
"pixmaps", "about.png"}.Combine ();
Realize ();
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 ("<!-- $small-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $no-buddy-icon-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "32x32", "status", "avatar-default.png"}));
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "32x32", "status", "avatar-default.png"}.Combine ());
html = html.Replace ("<!-- $document-added-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-added.png"}));
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-added.png"}.Combine ());
html = html.Replace ("<!-- $document-edited-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-edited.png"}));
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-edited.png"}.Combine ());
html = html.Replace ("<!-- $document-deleted-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-deleted.png"}));
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-deleted.png"}.Combine ());
html = html.Replace ("<!-- $document-moved-background-image -->", "file://" +
System.IO.Path.Combine (new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-moved.png"}));
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-moved.png"}.Combine ());
Application.Invoke (delegate {
this.spinner.Stop ();

View file

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

View file

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