banshee r4478 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4478 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Collection.Database
- Date: Sat, 6 Sep 2008 23:01:39 +0000 (UTC)
Author: gburt
Date: Sat Sep 6 23:01:39 2008
New Revision: 4478
URL: http://svn.gnome.org/viewvc/banshee?rev=4478&view=rev
Log:
2008-09-05 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs:
Fix from Bertrand Lorentz (also applied to new FirstIndexOf method by me)
fixing race condition that caused the Next button to not work half the
time when you had a filter active (BGO #544415).
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs Sat Sep 6 23:01:39 2008
@@ -311,12 +311,16 @@
public override int IndexOf (TrackInfo track)
{
- return (int) cache.IndexOf (track as DatabaseTrackInfo);
+ lock (this) {
+ return (int) cache.IndexOf (track as DatabaseTrackInfo);
+ }
}
public int IndexOfFirst (TrackInfo track)
{
- return IndexOf (cache.GetSingle ("AND MetadataHash = ? ORDER BY OrderID", track.MetadataHash));
+ lock (this) {
+ return IndexOf (cache.GetSingle ("AND MetadataHash = ? ORDER BY OrderID", track.MetadataHash));
+ }
}
private DateTime random_began_at = DateTime.MinValue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]