banshee r4650 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4650 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor
- Date: Fri, 3 Oct 2008 18:18:50 +0000 (UTC)
Author: gburt
Date: Fri Oct 3 18:18:50 2008
New Revision: 4650
URL: http://svn.gnome.org/viewvc/banshee?rev=4650&view=rev
Log:
2008-10-03 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs:
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs:
Use ValueAsInt instead of casting Value.
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs:
* src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SpinButtonEntry.cs:
Instead of listening for the Changed event on SpinButtons, listen for the
ValueChanged. Fixes issue with not saving any spin-entry values unless
you clicked the up/down arrows (BGO #552698).
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SpinButtonEntry.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/BasicTrackDetailsPage.cs Fri Oct 3 18:18:50 2008
@@ -150,7 +150,7 @@
Catalog.GetString ("Set all years to this value"),
delegate { return Catalog.GetString ("Year:"); },
delegate (EditorTrackInfo track, Widget widget) { ((SpinButtonEntry)widget).Value = track.Year; },
- delegate (EditorTrackInfo track, Widget widget) { track.Year = (int)((SpinButtonEntry)widget).Value; },
+ delegate (EditorTrackInfo track, Widget widget) { track.Year = ((SpinButtonEntry)widget).ValueAsInt; },
FieldOptions.Shrink
);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/ExtraTrackDetailsPage.cs Fri Oct 3 18:18:50 2008
@@ -80,7 +80,7 @@
Catalog.GetString ("Set all beats per minute to this value"),
delegate { return Catalog.GetString ("Beats Per Minute:"); },
delegate (EditorTrackInfo track, Widget widget) { ((SpinButtonEntry)widget).Value = track.Bpm; },
- delegate (EditorTrackInfo track, Widget widget) { track.Bpm = (int)((SpinButtonEntry)widget).Value; },
+ delegate (EditorTrackInfo track, Widget widget) { track.Bpm = ((SpinButtonEntry)widget).ValueAsInt; },
FieldOptions.Shrink | FieldOptions.NoSync
);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/RangeEntry.cs Fri Oct 3 18:18:50 2008
@@ -55,8 +55,8 @@
from_entry.WidthChars = 2;
to_entry.WidthChars = 2;
- from_entry.Changed += OnChanged;
- to_entry.Changed += OnChanged;
+ from_entry.ValueChanged += OnChanged;
+ to_entry.ValueChanged += OnChanged;
}
private void OnChanged (object o, EventArgs args)
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SpinButtonEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SpinButtonEntry.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/SpinButtonEntry.cs Fri Oct 3 18:18:50 2008
@@ -33,6 +33,11 @@
{
public class SpinButtonEntry : SpinButton, IEditorField
{
+ public new event EventHandler Changed {
+ add { ValueChanged += value; }
+ remove { ValueChanged -= value; }
+ }
+
public SpinButtonEntry (double min, double max, double step) : base (min, max, step)
{
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]