[banshee] [Last.fm] Show the "Account Settings" button if session key is missing
- From: Bertrand Lorentz <blorentz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Last.fm] Show the "Account Settings" button if session key is missing
- Date: Sat, 14 Nov 2009 16:00:16 +0000 (UTC)
commit bebd866a68d2b34bb1a4a6533df17fa1b8b5b374
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sat Nov 14 16:26:28 2009 +0100
[Last.fm] Show the "Account Settings" button if session key is missing
This fixes part of BGO#601308.
.../Banshee.Lastfm.Radio/LastfmSource.cs | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
index 445073a..8572b44 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
@@ -258,11 +258,15 @@ namespace Banshee.Lastfm.Radio
internal static void SetStatus (SourceMessage status_message, LastfmSource lastfm, bool error, ConnectionState state)
{
status_message.FreezeNotify ();
- if (error && (state == ConnectionState.NoAccount || state == ConnectionState.InvalidAccount)) {
- status_message.AddAction (new MessageAction (Catalog.GetString ("Account Settings"),
- delegate { lastfm.Actions.ShowLoginDialog (); }));
- status_message.AddAction (new MessageAction (Catalog.GetString ("Join Last.fm"),
- delegate { lastfm.Account.SignUp (); }));
+ if (error) {
+ if (state == ConnectionState.NoAccount || state == ConnectionState.InvalidAccount || state == ConnectionState.NotAuthorized) {
+ status_message.AddAction (new MessageAction (Catalog.GetString ("Account Settings"),
+ delegate { lastfm.Actions.ShowLoginDialog (); }));
+ }
+ if (state == ConnectionState.NoAccount || state == ConnectionState.InvalidAccount) {
+ status_message.AddAction (new MessageAction (Catalog.GetString ("Join Last.fm"),
+ delegate { lastfm.Account.SignUp (); }));
+ }
}
status_message.ThawNotify ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]