[banshee: 8/27] [lastfm] Fix actions for LastfmStreaming



commit 942765e956d6f134e6099e19471f911e84ac8160
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Jan 24 14:33:12 2010 +0100

    [lastfm] Fix actions for LastfmStreaming

 .../Banshee.Lastfm/Resources/GlobalUI.xml          |    4 +++
 .../LastfmStreamingService.cs                      |    6 +++++
 .../Banshee.LastfmStreaming/Resources/GlobalUI.xml |   22 +++++++++++++------
 3 files changed, 25 insertions(+), 7 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Resources/GlobalUI.xml b/src/Extensions/Banshee.Lastfm/Resources/GlobalUI.xml
index 08220ba..31ef3ae 100644
--- a/src/Extensions/Banshee.Lastfm/Resources/GlobalUI.xml
+++ b/src/Extensions/Banshee.Lastfm/Resources/GlobalUI.xml
@@ -1,5 +1,6 @@
 <ui>
     <popup name="LastfmSourcePopup" action="LastfmSourcePopupAction">
+        <placeholder name="LastfmAddPlaceholder" />
         <menuitem name="Connect" action="LastfmConnectAction" />
         <menu name='SortChildren' action='SortChildrenAction' />
         <separator />
@@ -10,6 +11,7 @@
         <menuitem name="LastfmArtistVisitLastfm" action="LastfmArtistVisitLastfmAction" />
         <menuitem name="LastfmArtistVisitWikipedia" action="LastfmArtistVisitWikipediaAction" />
         <!--<menuitem name="LastfmArtistVisitAmazon" action="LastfmArtistVisitAmazonAction" />-->
+        <placeholder name="LastfmArtistPlayPlaceholder" />
         <menuitem name="LastfmArtistRecommend" action="LastfmArtistRecommendAction" />
     </popup>
 
@@ -17,6 +19,7 @@
         <menuitem name="LastfmAlbumVisitLastfm" action="LastfmAlbumVisitLastfmAction" />
         <menuitem name="LastfmArtistVisitWikipedia" action="LastfmArtistVisitWikipediaAction" />
         <!--<menuitem name="LastfmAlbumVisitAmazon" action="LastfmAlbumVisitAmazonAction" />-->
+        <placeholder name="LastfmAlbumPlayPlaceholder" />
         <menuitem name="LastfmAlbumRecommend" action="LastfmAlbumRecommendAction" />
     </popup>
 
@@ -25,6 +28,7 @@
         <menuitem name="LastfmArtistViewVideos" action="LastfmArtistViewVideosAction" />
         <menuitem name="LastfmArtistVisitWikipedia" action="LastfmArtistVisitWikipediaAction" />
         <!--<menuitem name="LastfmAlbumVisitAmazon" action="LastfmAlbumVisitAmazonAction" />-->
+        <placeholder name="LastfmTrackPlayPlaceholder" />
         <!--<menuitem name="LastfmTrackRecommend" action="LastfmTrackRecommendAction" />-->
     </popup>
 </ui>
diff --git a/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming.Radio/LastfmStreamingService.cs b/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming.Radio/LastfmStreamingService.cs
index 45c2cfd..73f09aa 100644
--- a/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming.Radio/LastfmStreamingService.cs
+++ b/src/Extensions/Banshee.LastfmStreaming/Banshee.LastfmStreaming.Radio/LastfmStreamingService.cs
@@ -15,6 +15,7 @@ namespace Banshee.LastfmStreaming.Radio
     public class LastfmStreamingService : IExtensionService, IDisposable
     {
         private LastfmSource lastfm_source = null;
+        private LastfmStreamingActions actions;
 
         public LastfmStreamingService ()
         {
@@ -64,12 +65,17 @@ namespace Banshee.LastfmStreaming.Radio
             lastfm_source.Properties.Set<System.Reflection.Assembly> ("ActiveSourceUIResource.Assembly", typeof(StationSource).Assembly);
             lastfm_source.Properties.SetString ("SortChildrenActionLabel", Catalog.GetString ("Sort Stations by"));
 
+            actions = new LastfmStreamingActions (lastfm_source);
+            
             return true;
         }
 
         public void Dispose ()
         {
             ServiceManager.Get<DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
+            actions.Dispose ();
+
+            actions = null;
         }
 
         private void OnCommandLineArgument (string uri, object value, bool isFile)
diff --git a/src/Extensions/Banshee.LastfmStreaming/Resources/GlobalUI.xml b/src/Extensions/Banshee.LastfmStreaming/Resources/GlobalUI.xml
index 1deaa8a..5503c7b 100644
--- a/src/Extensions/Banshee.LastfmStreaming/Resources/GlobalUI.xml
+++ b/src/Extensions/Banshee.LastfmStreaming/Resources/GlobalUI.xml
@@ -1,6 +1,8 @@
 <ui>
     <popup name="LastfmSourcePopup" action="LastfmSourcePopupAction">
-        <menuitem name="LastfmAdd" action="LastfmAddAction" />
+        <placeholder name="LastfmAddPlaceholder">
+            <menuitem name="LastfmAdd" action="LastfmAddAction" />
+        </placeholder>
     </popup>
 
     <popup name="LastfmStationSourcePopup" action="LastfmStationSourcePopupAction">
@@ -27,17 +29,23 @@
     </toolbar>
 
     <popup name="LastfmArtistPopup" action="LastfmArtistPopup">
-        <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
-        <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        <placeholder name="LastfmArtistPlayPlaceholder">
+            <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
+            <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        </placeholder>
     </popup>
 
     <popup name="LastfmAlbumPopup" action="LastfmAlbumPopup">
-        <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
-        <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        <placeholder name="LastfmAlbumPlayPlaceholder">
+            <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
+            <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        </placeholder>
     </popup>
 
     <popup name="LastfmTrackPopup" action="LastfmTrackPopup">
-        <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
-        <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        <placeholder name="LastfmTrackPlayPlaceholder">
+            <menuitem name="LastfmArtistPlayFanRadio" action="LastfmArtistPlayFanRadioAction" />
+            <menuitem name="LastfmArtistPlaySimilarRadio" action="LastfmArtistPlaySimilarRadioAction" />
+        </placeholder>
     </popup>
 </ui>



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