banshee r4964 - in trunk/banshee: . src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui



Author: gburt
Date: Mon Jan 26 03:53:38 2009
New Revision: 4964
URL: http://svn.gnome.org/viewvc/banshee?rev=4964&view=rev

Log:
2009-01-25  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs:
	Make unsubscribe, download episodes, and refresh options work even if
	multiple podcasts (feeds) selected

Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs

Modified: trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs	Mon Jan 26 03:53:38 2009
@@ -63,7 +63,7 @@
             AddImportant (
                 new ActionEntry (
                     "PodcastUpdateAllAction", Stock.Refresh,
-                     Catalog.GetString ("Update Podcasts"), null,//"<control><shift>U",
+                     Catalog.GetString ("Check for New Episodes"), null,//"<control><shift>U",
                      Catalog.GetString ("Refresh All Podcasts"), 
                      OnPodcastUpdateAll
                 ),
@@ -87,7 +87,6 @@
                 ),
                 new ActionEntry (
                     "PodcastUpdateFeedAction", Stock.Refresh,
-                     /* Translators: this is a verb used as a button name, not a noun*/
                      Catalog.GetString ("Check for New Episodes"),
                      null, String.Empty, 
                      OnPodcastUpdate
@@ -251,9 +250,15 @@
                 bool all_selected = ActiveFeedModel.Selection.AllSelected;
 
                 UpdateActions (true, has_single_selection && !all_selected,
-                    "PodcastDeleteAction", "PodcastUpdateFeedAction", "PodcastHomepageAction",
+                    "PodcastHomepageAction",
                     "PodcastPropertiesAction"
                 );
+
+                UpdateActions (true, ActiveFeedModel.Selection.Count > 0 && !all_selected,
+                    "PodcastDeleteAction",
+                    "PodcastUpdateFeedAction",
+                    "PodcastDownloadAllAction"
+                );
             }
         }
         
@@ -436,21 +441,23 @@
         
         private void OnPodcastDelete (object sender, EventArgs e)
         {
-            Feed feed = ActiveFeedModel.FocusedItem;
-            if (feed != null) {
-                feed.Delete (true);
+            foreach (Feed feed in ActiveFeedModel.SelectedItems) {
+                if (feed != null) {
+                    feed.Delete (true);
+                }
             }
         }
         
         private void OnPodcastDownloadAllEpisodes (object sender, EventArgs e)
         {
-            Feed feed = ActiveFeedModel.FocusedItem;
-            if (feed != null) {
-                foreach (FeedItem item in feed.Items) {
-                    item.Enclosure.AsyncDownload ();
+            foreach (Feed feed in ActiveFeedModel.SelectedItems) {
+                if (feed != null) {
+                    foreach (FeedItem item in feed.Items) {
+                        item.Enclosure.AsyncDownload ();
+                    }
                 }
             }
-        }   
+        }
 
         private void OnPodcastItemDeleteFile (object sender, EventArgs e)
         {



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