diff --git a/SparkleLib/Makefile.am b/SparkleLib/Makefile.am index e9cb987c..1a6d1b8b 100755 --- a/SparkleLib/Makefile.am +++ b/SparkleLib/Makefile.am @@ -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: diff --git a/SparkleLib/SparkleWrappers.cs b/SparkleLib/SparkleWrappers.cs index 835c57a7..82cf0262 100644 --- a/SparkleLib/SparkleWrappers.cs +++ b/SparkleLib/SparkleWrappers.cs @@ -37,53 +37,19 @@ namespace SparkleLib { public string Revision; public DateTime Timestamp; public DateTime FirstTimestamp; - public bool IsMagical = false; public Uri RemoteUrl; public List Changes = new List (); - - - 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; }