linux: fix build

This commit is contained in:
Hylke Bons 2012-06-19 15:59:54 +01:00
parent 5f937ca063
commit e72b3828d1
2 changed files with 5 additions and 39 deletions

View file

@ -5,7 +5,6 @@ SOURCES = \
Defines.cs \
SparkleAnnouncement.cs \
SparkleBackend.cs \
SparkleWrappers.cs \
SparkleConfig.cs \
SparkleExceptions.cs \
SparkleExtensions.cs \
@ -16,7 +15,8 @@ SOURCES = \
SparkleListenerTcp.cs \
SparkleRepoBase.cs \
SparkleUser.cs \
SparkleWatcher.cs
SparkleWatcher.cs \
SparkleWrappers.cs
install-data-hook:

View file

@ -37,53 +37,19 @@ namespace SparkleLib {
public string Revision;
public DateTime Timestamp;
public DateTime FirstTimestamp;
public bool IsMagical = false;
public Uri RemoteUrl;
public List<SparkleChange> Changes = new List<SparkleChange> ();
public string RelativeTimestamp {
get {
TimeSpan time_span = DateTime.Now - Timestamp;
if (time_span <= TimeSpan.FromSeconds (60))
return "just now";
if (time_span <= TimeSpan.FromMinutes (60))
return time_span.Minutes > 1
? time_span.Minutes + " minutes ago"
: "a minute ago";
if (time_span <= TimeSpan.FromHours (24))
return time_span.Hours > 1
? time_span.Hours + " hours ago"
: "an hour ago";
if (time_span <= TimeSpan.FromDays (30))
return time_span.Days > 1
? time_span.Days + " days ago"
: "a day ago";
if (time_span <= TimeSpan.FromDays (365))
return time_span.Days > 30
? (time_span.Days / 30) + " months ago"
: "a month ago";
return time_span.Days > 365
? (time_span.Days / 365) + " years ago"
: "a year ago";
}
}
}
public class SparkleChange {
public SparkleChangeType Type;
public DateTime Timestamp;
public string Path;
public string MovedPath;
public DateTime Timestamp;
public string MovedToPath;
}