Fix build with mono < 2.8 (use Path.Combine (string []))
This commit is contained in:
parent
3212f6c2b1
commit
3752ff9e04
|
@ -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);
|
||||
|
|
|
@ -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 += "<dd class='document edited'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
|
||||
|
@ -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 += "<dd class='document added'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
|
||||
|
@ -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 += "<dd class='document deleted'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
|
||||
|
@ -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 += "<dd class='document moved'><a href='" + absolute_file_path + "'>" + file_path + "</a><br/>";
|
||||
|
@ -895,8 +902,8 @@ namespace SparkleShare {
|
|||
List<string> old_avatars = new List<string> ();
|
||||
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);
|
||||
|
|
|
@ -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 (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 ("<!-- $document-added-background-image -->", "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 ("<!-- $document-edited-background-image -->", "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 ("<!-- $document-deleted-background-image -->", "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 ("<!-- $document-moved-background-image -->", "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 ();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue