banshee r3493 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Sources
- From: ahixon svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3493 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Sources
- Date: Thu, 20 Mar 2008 21:26:06 +0000 (GMT)
Author: ahixon
Date: Thu Mar 20 21:26:06 2008
New Revision: 3493
URL: http://svn.gnome.org/viewvc/banshee?rev=3493&view=rev
Log:
2008-03-20 Alexander Hixon <hixon alexander mediati org>
* src/Core/Banshee.Services/Banshee.Sources/Source.cs: Revert change from
previous revision.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs Thu Mar 20 21:26:06 2008
@@ -430,28 +430,22 @@
builder.AppendFormat (Catalog.GetPluralString ("{0} item", "{0} items", count), count);
if (this is IDurationAggregator) {
- TimeSpan span = (this as IDurationAggregator).Duration;
-
+ builder.Append (", ");
+
+ TimeSpan span = (this as IDurationAggregator).Duration;
if (span.Days > 0) {
- builder.Append (", ");
- builder.AppendFormat (Catalog.GetPluralString ("{0} day", "{0} days",
- (int) span.Days), span.Days);
- }
-
- if (span.Hours > 0) {
- builder.Append (", ");
- builder.AppendFormat (Catalog.GetPluralString ("{0} hour", "{0} hours",
- (int) span.Hours), span.Hours);
+ double days = span.Days + (span.Hours / 24.0);
+ builder.AppendFormat (Catalog.GetPluralString ("{0} day", "{0:0.0} days",
+ (int)Math.Ceiling (days)), days);
+ } else if (span.Hours > 0) {
+ double hours = span.Hours + (span.Minutes / 60.0);
+ builder.AppendFormat (Catalog.GetPluralString ("{0} hour", "{0:0.0} hours",
+ (int)Math.Ceiling (hours)), hours);
+ } else {
+ double minutes = span.Minutes + (span.Seconds / 60.0);
+ builder.AppendFormat (Catalog.GetPluralString ("{0} minute", "{0:0.0} minutes",
+ (int)Math.Ceiling (minutes)), minutes);
}
-
- builder.Append (", ");
-
- builder.AppendFormat (Catalog.GetPluralString ("{0} minute", "{0} minutes",
- (int) span.Minutes), span.Minutes);
-
- builder.Append (", ");
- builder.AppendFormat (Catalog.GetPluralString ("{0} second", "{0} seconds",
- (int) span.Seconds), span.Seconds);
}
if (this is IFileSizeAggregator) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]