[banshee] [Podcasting] Add 'Podcast Properties' to episode menu



commit 9b74557e5bebd8427ffed9fea8fd05590bcf76d8
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Dec 14 13:06:11 2010 -0600

    [Podcasting] Add 'Podcast Properties' to episode menu

 .../Resources/core-ui-actions-layout.xml           |    1 +
 .../Banshee.Podcasting.Gui/PodcastActions.cs       |   19 ++++++++++++++++++-
 .../Resources/ActiveSourceUI.xml                   |    3 +++
 3 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml b/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml
index 8c60550..547fe75 100644
--- a/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml
+++ b/src/Core/Banshee.ThickClient/Resources/core-ui-actions-layout.xml
@@ -183,6 +183,7 @@
       <menuitem name="SearchForSameAlbum" action="SearchForSameAlbumAction"/>
     </menu>
     <separator/>
+    <placeholder name="AboveTrackProperties"/>
     <menuitem name="TrackProperties" action="TrackPropertiesAction"/>
     <menuitem name="TrackEditor" action="TrackEditorAction"/>
   </popup>
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
index 1b24771..3489eb1 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
@@ -119,6 +119,11 @@ namespace Banshee.Podcasting.Gui
                      OnPodcastProperties
                 ),
                 new ActionEntry (
+                    "EpisodePodcastProperties", null,
+                     Catalog.GetString ("Podcast Properties"), null, String.Empty,
+                     OnEpisodePodcastProperties
+                ),
+                new ActionEntry (
                     "PodcastItemMarkNewAction", null,
                      Catalog.GetString ("Mark as New"),
                      null, String.Empty,
@@ -250,7 +255,8 @@ namespace Banshee.Podcasting.Gui
             if (IsPodcastSource) {
                 int count = ActiveDbSource.TrackModel.Selection.Count;
 
-                //bool has_single_podcast = podcast_source.PodcastTrackModel.SelectionPodcastCount == 1;
+                bool has_single_podcast = podcast_source.PodcastTrackModel.SelectionPodcastCount == 1;
+                UpdateAction ("EpisodePodcastProperties", true, has_single_podcast);
 
                 UpdateAction ("PodcastItemLinkAction", true, count == 1);
 
@@ -513,6 +519,17 @@ namespace Banshee.Podcasting.Gui
             }
         }
 
+        private void OnEpisodePodcastProperties (object sender, EventArgs e)
+        {
+            foreach (PodcastTrackInfo pi in PodcastTrackInfo.From (GetSelectedItems ())) {
+                var feed = pi.Feed;
+                if (feed != null) {
+                    new PodcastFeedPropertiesDialog (podcast_source, feed).Run ();
+                }
+                break;
+            }
+        }
+
         private void OnPodcastItemProperties (object sender, EventArgs e)
         {
                 /*ReadOnlyCollection<PodcastItem> items = itemModel.CopySelectedItems ();
diff --git a/src/Extensions/Banshee.Podcasting/Resources/ActiveSourceUI.xml b/src/Extensions/Banshee.Podcasting/Resources/ActiveSourceUI.xml
index 33a47ea..1c8c547 100644
--- a/src/Extensions/Banshee.Podcasting/Resources/ActiveSourceUI.xml
+++ b/src/Extensions/Banshee.Podcasting/Resources/ActiveSourceUI.xml
@@ -50,5 +50,8 @@
         <!--
         <menuitem name="PodcastItemCancel" action="PodcastItemCancelAction" />-->
     </placeholder>
+    <placeholder name="AboveTrackProperties">
+        <menuitem action="EpisodePodcastProperties"/>
+    </placeholder>
   </popup>
 </ui>



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