[banshee] BasicTrackDetailsPage: Blank year spin button when 0 (bgo#623974)



commit 893d65ad1e250523d351418eadc8600cc977a6b8
Author: Samuel Gyger <samuel gyger at>
Date:   Tue Aug 28 12:09:27 2012 +0200

    BasicTrackDetailsPage: Blank year spin button when 0 (bgo#623974)
    
    Text in SpinButton of YearField is omitted when the value is 0.
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 .../BasicTrackDetailsPage.cs                       |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
index 913d8ed..720a7fb 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
@@ -184,6 +184,14 @@ namespace Banshee.Gui.TrackEditor
             };
             SpinButtonEntry year_entry = new SpinButtonEntry (0, 3000, 1);
             year_entry.Numeric = true;
+            year_entry.Output += delegate (object o, OutputArgs args) {
+                if (0 == year_entry.ValueAsInt) {
+                    year_entry.Text = "";
+                } else {
+                    year_entry.Text = year_entry.Value.ToString ();
+                }
+                args.RetVal = 1;
+            };
             AddField (right, year_label, year_entry,
                 Catalog.GetString ("Set all years to this value"),
                 delegate { return Catalog.GetString ("_Year:"); },



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