banshee r3618 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Sources src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3618 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Sources src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio
- Date: Mon, 31 Mar 2008 19:02:56 +0100 (BST)
Author: gburt
Date: Mon Mar 31 19:02:56 2008
New Revision: 3618
URL: http://svn.gnome.org/viewvc/banshee?rev=3618&view=rev
Log:
2008-03-31 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.Services/Banshee.Sources/Source.cs: When one of our
SourceMessages is updated, notify the message bar. Fixes bug where the
message bar didn't update with new icon/text etc.
* src/Core/Banshee.Services/Banshee.Sources/SourceMessage.cs: Get rid of
unnecessary Interlocked calls.
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs: Add
check for whether personal station is for this user, and if so, don't load
for non-subscribers.
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs: Don't
set the personal station type as subscriber-only - this was my
misunderstanding; non-subscribers can have personal stations for any user
but themselves.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/Source.cs
trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/SourceMessage.cs
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.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 Mon Mar 31 19:02:56 2008
@@ -213,6 +213,7 @@
{
lock (this) {
messages.Insert (0, message);
+ message.Updated += HandleMessageUpdated;
}
OnMessageNotify ();
@@ -224,6 +225,7 @@
lock (this) {
if (messages.Count > 0) {
SourceMessage message = messages[0];
+ message.Updated -= HandleMessageUpdated;
messages.RemoveAt (0);
return message;
}
@@ -291,6 +293,11 @@
}
}
}
+
+ private void HandleMessageUpdated (object o, EventArgs args)
+ {
+ OnMessageNotify ();
+ }
protected virtual void OnMessageNotify ()
{
Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/SourceMessage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/SourceMessage.cs (original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Sources/SourceMessage.cs Mon Mar 31 19:02:56 2008
@@ -85,7 +85,7 @@
public void FreezeNotify ()
{
lock (this) {
- System.Threading.Interlocked.Increment (ref freeze_count);
+ freeze_count++;
}
}
@@ -93,7 +93,7 @@
{
lock (this) {
if (freeze_count > 0) {
- System.Threading.Interlocked.Decrement (ref freeze_count);
+ freeze_count--;
}
if (freeze_count == 0 && updated_when_frozen) {
Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs Mon Mar 31 19:02:56 2008
@@ -233,9 +233,11 @@
ClearChildSources ();
sorting = true;
foreach (StationSource child in StationSource.LoadAll (this, Account.UserName)) {
- if (!child.Type.SubscribersOnly || Connection.Subscriber) {
+ if (Connection.Subscriber ||
+ (!child.Type.SubscribersOnly &&
+ !(child.Type == StationType.Personal && child.Arg != null && child.Arg.Trim().ToLower() == last_username.Trim().ToLower())))
+ {
AddChildSource (child);
- //SourceManager.AddSource (child);
}
}
sorting = false;
Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationType.cs Mon Mar 31 19:02:56 2008
@@ -93,7 +93,7 @@
Catalog.GetString ("For User:"),
"user/{0}/personal",
"personal",
- true
+ false
);
public static StationType Loved = new StationType (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]