[banshee] [Last.fm] Remove all references to the old config dialog



commit 1057c81bb29295b00689da8867d4a8f4a6a04cca
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat Nov 14 16:50:47 2009 +0100

    [Last.fm] Remove all references to the old config dialog
    
    This completes the move to the main Preferences dialog. The old
    configuration dialog is left as-is in Lastfm.Gui, but is not used
    anymore.

 .../AudioscrobblerService.cs                       |   18 +-----------------
 .../Banshee.Lastfm.Radio/LastfmActions.cs          |   16 +++++++---------
 .../Banshee.Lastfm.Radio/LastfmSource.cs           |    3 +--
 .../Resources/AudioscrobblerMenu.xml               |    2 --
 4 files changed, 9 insertions(+), 30 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
index 88e1535..44ceed0 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Audioscrobbler/AudioscrobblerService.cs
@@ -40,7 +40,6 @@ using Mono.Unix;
 using Hyena;
 
 using Lastfm;
-using Lastfm.Gui;
 
 using Banshee.MediaEngine;
 using Banshee.Base;
@@ -127,11 +126,7 @@ namespace Banshee.Lastfm.Audioscrobbler
 
                 new ActionEntry ("AudioscrobblerVisitAction", null,
                     Catalog.GetString ("Visit _User Profile Page"), null,
-                    Catalog.GetString ("Visit Your Last.fm Profile Page"), OnVisitOwnProfile),
-
-                new ActionEntry ("AudioscrobblerConfigureAction", Stock.Properties,
-                    Catalog.GetString ("_Configure..."), null,
-                    Catalog.GetString ("Configure the Last.fm Extension"), OnConfigurePlugin)
+                    Catalog.GetString ("Visit Your Last.fm Profile Page"), OnVisitOwnProfile)
             });
 
             actions.Add (new ToggleActionEntry [] {
@@ -281,17 +276,6 @@ namespace Banshee.Lastfm.Audioscrobbler
             }
         }
 
-        private void OnConfigurePlugin (object o, EventArgs args)
-        {
-            AccountLoginDialog dialog = new AccountLoginDialog (account, true);
-            dialog.SaveOnEdit = true;
-            if (account.UserName == null) {
-                dialog.AddSignUpButton ();
-            }
-            dialog.Run ();
-            dialog.Destroy ();
-        }
-
         private void OnVisitOwnProfile (object o, EventArgs args)
         {
             account.VisitUserProfile (account.UserName);
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs
index cc24a8f..b3eae79 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs
@@ -200,9 +200,7 @@ namespace Banshee.Lastfm.Radio
         private void OnSourceProperties (object o, EventArgs args)
         {
             Source source = Actions.SourceActions.ActionSource;
-            if (source is LastfmSource) {
-                ShowLoginDialog ();
-            } else if (source is StationSource) {
+            if (source is StationSource) {
                 StationEditor editor = new StationEditor (lastfm, source as StationSource);
                 editor.RunDialog ();
             }
@@ -368,13 +366,13 @@ namespace Banshee.Lastfm.Radio
 
         public void ShowLoginDialog ()
         {
-            AccountLoginDialog dialog = new AccountLoginDialog (lastfm.Account, true);
-            dialog.SaveOnEdit = false;
-            if (lastfm.Account.UserName == null) {
-                dialog.AddSignUpButton ();
+            try {
+                Banshee.Preferences.Gui.PreferenceDialog dialog = new Banshee.Preferences.Gui.PreferenceDialog ();
+                dialog.ShowSourcePageId (lastfm.PreferencesPageId);
+                dialog.Run ();
+                dialog.Destroy ();
+            } catch (ApplicationException) {
             }
-            dialog.Run ();
-            dialog.Destroy ();
         }
 
         private void OnPlayerEvent (PlayerEventArgs args)
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
index 8572b44..4d8e038 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
@@ -102,7 +102,6 @@ namespace Banshee.Lastfm.Radio
             Properties.Set<bool> ("ActiveSourceUIResourcePropagate", true);
             Properties.SetString ("GtkActionPath", "/LastfmSourcePopup");
             Properties.SetString ("Icon.Name", "lastfm-audioscrobbler");
-            Properties.SetString ("SourcePropertiesActionLabel", Catalog.GetString ("Edit Last.fm Settings"));
             Properties.SetString ("SortChildrenActionLabel", Catalog.GetString ("Sort Stations by"));
             Properties.Set<LastfmColumnController> ("TrackView.ColumnController", new LastfmColumnController ());
 
@@ -210,7 +209,7 @@ namespace Banshee.Lastfm.Radio
         }
 
         public override bool HasProperties {
-            get { return true; }
+            get { return false; }
         }
 
         private void HandleConnectionStateChanged (object sender, ConnectionStateChangedArgs args)
diff --git a/src/Extensions/Banshee.Lastfm/Resources/AudioscrobblerMenu.xml b/src/Extensions/Banshee.Lastfm/Resources/AudioscrobblerMenu.xml
index b861ca7..bde075c 100644
--- a/src/Extensions/Banshee.Lastfm/Resources/AudioscrobblerMenu.xml
+++ b/src/Extensions/Banshee.Lastfm/Resources/AudioscrobblerMenu.xml
@@ -4,8 +4,6 @@
             <menu name="Audioscrobbler" action="AudioscrobblerAction">
                     <menuitem name="AudioscrobblerEnable" action="AudioscrobblerEnableAction" />
                     <menuitem name="AudioscrobblerVisit" action="AudioscrobblerVisitAction" />
-                    <separator />
-                    <menuitem name="AudioscrobblerConfigure" action="AudioscrobblerConfigureAction" />
             </menu>
         </menu>
     </menubar>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]