[banshee] [CoverArt] Remove entries from Tools menu



commit 9dcfcfe67322820495e19b0b8ab46e4ce649e25c
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Sep 2 17:21:29 2010 -0500

    [CoverArt] Remove entries from Tools menu
    
    They are really pretty useless; cover art fetching is automatic.

 .../Banshee.CoverArt/Banshee.CoverArt.csproj       |    3 -
 .../Banshee.CoverArt/CoverArtService.cs            |   49 ++------------------
 src/Extensions/Banshee.CoverArt/Makefile.am        |    4 +-
 .../Banshee.CoverArt/Resources/CoverArtMenu.xml    |    9 ----
 4 files changed, 5 insertions(+), 60 deletions(-)
---
diff --git a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt.csproj b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt.csproj
index e4c9f14..ea76575 100644
--- a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt.csproj
+++ b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt.csproj
@@ -83,9 +83,6 @@
     <EmbeddedResource Include="Banshee.CoverArt.addin.xml">
       <LogicalName>Banshee.CoverArt.addin.xml</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="Resources\CoverArtMenu.xml">
-      <LogicalName>CoverArtMenu.xml</LogicalName>
-    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Banshee.CoverArt\CoverArtJob.cs" />
diff --git a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtService.cs b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtService.cs
index 6597a9d..d36986b 100644
--- a/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtService.cs
+++ b/src/Extensions/Banshee.CoverArt/Banshee.CoverArt/CoverArtService.cs
@@ -50,10 +50,7 @@ namespace Banshee.CoverArt
 {
     public class CoverArtService : IExtensionService
     {
-        private InterfaceActionService action_service;
-        private ActionGroup actions;
         private bool disposed;
-        private uint ui_manager_id;
 
         private CoverArtJob job;
 
@@ -72,8 +69,6 @@ namespace Banshee.CoverArt
                     )");
             }
 
-            action_service = ServiceManager.Get<InterfaceActionService> ();
-
             if (!ServiceStartup ()) {
                 ServiceManager.SourceManager.SourceAdded += OnSourceAdded;
             }
@@ -88,7 +83,7 @@ namespace Banshee.CoverArt
 
         private bool ServiceStartup ()
         {
-            if (action_service == null || ServiceManager.SourceManager.MusicLibrary == null) {
+            if (ServiceManager.SourceManager.MusicLibrary == null) {
                 return false;
             }
 
@@ -99,23 +94,6 @@ namespace Banshee.CoverArt
 
         private void Initialize ()
         {
-            ThreadAssist.AssertInMainThread ();
-            actions = new ActionGroup ("CoverArt");
-
-            ActionEntry[] action_list = new ActionEntry [] {
-                new ActionEntry ("CoverArtAction", null,
-                    Catalog.GetString ("_Cover Art"), null,
-                    Catalog.GetString ("Manage cover art"), null),
-				new ActionEntry ("FetchCoverArtAction", null,
-                    Catalog.GetString ("_Download Cover Art"), null,
-                    Catalog.GetString ("Download cover art for all tracks"), OnFetchCoverArt)
-            };
-
-            actions.Add (action_list);
-
-            action_service.UIManager.InsertActionGroup (actions, 0);
-            ui_manager_id = action_service.UIManager.AddUiFromResource ("CoverArtMenu.xml");
-
             ServiceManager.SourceManager.MusicLibrary.TracksAdded += OnTracksAdded;
             ServiceManager.SourceManager.MusicLibrary.TracksChanged += OnTracksChanged;
         }
@@ -126,24 +104,10 @@ namespace Banshee.CoverArt
                 return;
             }
 
-            ThreadAssist.ProxyToMain (delegate {
-                Gtk.Action fetch_action = action_service.GlobalActions["FetchCoverArtAction"];
-                if (fetch_action != null) {
-                    action_service.GlobalActions.Remove (fetch_action);
-                }
-
-                action_service.RemoveActionGroup ("CoverArt");
-                action_service.UIManager.RemoveUi (ui_manager_id);
-
-                actions.Dispose ();
-                actions = null;
-                action_service = null;
-
-                ServiceManager.SourceManager.MusicLibrary.TracksAdded -= OnTracksAdded;
-                ServiceManager.SourceManager.MusicLibrary.TracksChanged -= OnTracksChanged;
+            ServiceManager.SourceManager.MusicLibrary.TracksAdded -= OnTracksAdded;
+            ServiceManager.SourceManager.MusicLibrary.TracksChanged -= OnTracksChanged;
 
-                disposed = true;
-            });
+            disposed = true;
         }
 
         public void FetchCoverArt ()
@@ -183,11 +147,6 @@ namespace Banshee.CoverArt
             }
         }
 
-        private void OnFetchCoverArt (object o, EventArgs args)
-        {
-            FetchCoverArt (true);
-        }
-
         private void OnTracksAdded (Source sender, TrackEventArgs args)
         {
             FetchCoverArt ();
diff --git a/src/Extensions/Banshee.CoverArt/Makefile.am b/src/Extensions/Banshee.CoverArt/Makefile.am
index 091c9ee..bb7e54a 100644
--- a/src/Extensions/Banshee.CoverArt/Makefile.am
+++ b/src/Extensions/Banshee.CoverArt/Makefile.am
@@ -7,8 +7,6 @@ SOURCES =  \
 	Banshee.CoverArt/CoverArtJob.cs \
 	Banshee.CoverArt/CoverArtService.cs
 
-RESOURCES =  \
-	Banshee.CoverArt.addin.xml \
-	Resources/CoverArtMenu.xml
+RESOURCES = Banshee.CoverArt.addin.xml
 
 include $(top_srcdir)/build/build.mk



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