banshee r3083 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Sources src/Core/Nereid/Nereid



Author: abock
Date: Tue Jan 29 05:01:00 2008
New Revision: 3083
URL: http://svn.gnome.org/viewvc/banshee?rev=3083&view=rev

Log:
2008-01-28  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.Services/Banshee.Sources/Source.cs: Make the status
    text much less intrusive with less specificity (display only a single
    time scale); do not display any status if there are no tracks

    * src/Core/Nereid/Nereid/PlayerInterface.cs: Add some padding to the
    bottom of the status bar; change the text color of the status bar to
    a nice foreground/background blend to make it less intrusive



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs
   trunk/banshee/src/Core/Nereid/Nereid/PlayerInterface.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	Tue Jan 29 05:01:00 2008
@@ -298,25 +298,30 @@
             StringBuilder builder = new StringBuilder ();
 
             int count = FilteredCount;
-            builder.AppendFormat (Catalog.GetPluralString ("{0} Item", "{0} Items", count), count);
+            
+            if (count == 0) {
+                return String.Empty;
+            }
+            
+            builder.AppendFormat (Catalog.GetPluralString ("{0} song", "{0} songs", count), count);
             
             if (this is IDurationAggregator) {
                 builder.Append (", ");
 
                 TimeSpan span = (this as IDurationAggregator).FilteredDuration; 
                 if (span.Days > 0) {
-                    builder.AppendFormat (Catalog.GetPluralString ("{0} day", "{0} days", span.Days), span.Days);
-                    builder.Append (", ");
-                }
-                
-                if (span.Hours > 0) {
-                    builder.AppendFormat (Catalog.GetPluralString ("{0} hour", "{0} hours", span.Hours), span.Hours);
-                    builder.Append (", ");
+                    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.AppendFormat (Catalog.GetPluralString ("{0} minute", "{0} minutes", span.Minutes), span.Minutes);
-                builder.Append (", ");
-                builder.AppendFormat (Catalog.GetPluralString ("{0} second", "{0} seconds", span.Seconds), span.Seconds);
             }
 
             if (this is IFileSizeAggregator) {

Modified: trunk/banshee/src/Core/Nereid/Nereid/PlayerInterface.cs
==============================================================================
--- trunk/banshee/src/Core/Nereid/Nereid/PlayerInterface.cs	(original)
+++ trunk/banshee/src/Core/Nereid/Nereid/PlayerInterface.cs	Tue Jan 29 05:01:00 2008
@@ -199,13 +199,17 @@
             footer_box.Spacing = 2;
 
             status_label = new Label ();
+            status_label.ModifyFg (StateType.Normal, Hyena.Gui.GtkUtilities.ColorBlend (
+                status_label.Style.Foreground (StateType.Normal), status_label.Style.Background (StateType.Normal)));
+            
             //footer_box.PackStart (shuffle_toggle_button, false, false, 0);
             //footer_box.PackStart (repeat_toggle_button, false, false, 0);
             footer_box.PackStart (status_label, true, true, 0);
             //footer_box.PackStart (song_properties_button, false, false, 0);
 
             Alignment align = new Alignment (0.5f, 0.5f, 1.0f, 1.0f);
-            align.TopPadding = 5;
+            align.TopPadding = 6;
+            align.BottomPadding = 5;
             align.Add (footer_box);
             align.ShowAll ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]