banshee r3925 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3925 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database src/Core/Banshee.ThickClient/Banshee.Collection.Gui
- Date: Sat, 17 May 2008 22:00:20 +0000 (UTC)
Author: abock
Date: Sat May 17 22:00:20 2008
New Revision: 3925
URL: http://svn.gnome.org/viewvc/banshee?rev=3925&view=rev
Log:
2008-05-17 Aaron Bockover <abock gnome org>
* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs:
Bind to a private rating field and call Save in the property setter
* src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs:
Add the rating column with the new hot rating cell
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackInfo.cs Sat May 17 22:00:20 2008
@@ -359,10 +359,16 @@
set { base.Comment = value; }
}
- [DatabaseColumn]
+ [DatabaseColumn ("Rating")]
+ private int rating;
public override int Rating {
- get { return base.Rating; }
- set { base.Rating = value; }
+ get { return rating; }
+ set {
+ if (rating != value) {
+ rating = value;
+ Save (true, BansheeQuery.RatingField);
+ }
+ }
}
[DatabaseColumn]
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/DefaultColumnController.cs Sat May 17 22:00:20 2008
@@ -65,6 +65,7 @@
TitleColumn,
ArtistColumn,
AlbumColumn,
+ RatingColumn,
DurationColumn,
GenreColumn,
YearColumn,
@@ -152,7 +153,11 @@
get { return disc_column; }
}
- //new SortableColumn ("Rating", new RatingColumnCell (null, true), 0.15, "Rating"),
+ private SortableColumn rating_column = new SortableColumn (Catalog.GetString ("Rating"),
+ new ColumnCellRating ("Rating", true), 0.15, "Rating", false);
+ public SortableColumn RatingColumn {
+ get { return rating_column; }
+ }
private SortableColumn last_played_column = new SortableColumn (Catalog.GetString ("Last Played"),
new ColumnCellDateTime ("LastPlayed", true), 0.15, "LastPlayedStamp", false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]