linux: fix build
This commit is contained in:
parent
975ae072de
commit
4e0ee26e35
|
@ -5,7 +5,6 @@ SOURCES = \
|
||||||
Defines.cs \
|
Defines.cs \
|
||||||
SparkleAnnouncement.cs \
|
SparkleAnnouncement.cs \
|
||||||
SparkleBackend.cs \
|
SparkleBackend.cs \
|
||||||
SparkleWrappers.cs \
|
|
||||||
SparkleConfig.cs \
|
SparkleConfig.cs \
|
||||||
SparkleExceptions.cs \
|
SparkleExceptions.cs \
|
||||||
SparkleExtensions.cs \
|
SparkleExtensions.cs \
|
||||||
|
@ -16,7 +15,8 @@ SOURCES = \
|
||||||
SparkleListenerTcp.cs \
|
SparkleListenerTcp.cs \
|
||||||
SparkleRepoBase.cs \
|
SparkleRepoBase.cs \
|
||||||
SparkleUser.cs \
|
SparkleUser.cs \
|
||||||
SparkleWatcher.cs
|
SparkleWatcher.cs \
|
||||||
|
SparkleWrappers.cs
|
||||||
|
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
|
|
|
@ -37,53 +37,19 @@ namespace SparkleLib {
|
||||||
public string Revision;
|
public string Revision;
|
||||||
public DateTime Timestamp;
|
public DateTime Timestamp;
|
||||||
public DateTime FirstTimestamp;
|
public DateTime FirstTimestamp;
|
||||||
public bool IsMagical = false;
|
|
||||||
public Uri RemoteUrl;
|
public Uri RemoteUrl;
|
||||||
|
|
||||||
public List<SparkleChange> Changes = new List<SparkleChange> ();
|
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 class SparkleChange {
|
||||||
|
|
||||||
public SparkleChangeType Type;
|
public SparkleChangeType Type;
|
||||||
|
public DateTime Timestamp;
|
||||||
|
|
||||||
public string Path;
|
public string Path;
|
||||||
public string MovedPath;
|
public string MovedToPath;
|
||||||
public DateTime Timestamp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue