[banshee] [ServiceManager] Disable addins when they fail to load



commit 1a613d93f9181eb943581b2efa9c943a8f47075a
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Aug 24 12:59:12 2010 -0500

    [ServiceManager] Disable addins when they fail to load

 .../Banshee.ServiceStack/ServiceManager.cs         |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
index ed16579..9e05bb8 100644
--- a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
+++ b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
@@ -75,6 +75,13 @@ namespace Banshee.ServiceStack
                 ? new ConsoleProgressStatus (true)
                 : null;
 
+            AddinManager.AddinLoadError += (o, a) => {
+                try {
+                    AddinManager.Registry.DisableAddin (a.AddinId);
+                } catch {}
+                Log.Exception (a.Message, a.Exception);
+            };
+
             if (ApplicationContext.Debugging) {
                 AddinManager.Registry.Rebuild (monitor);
             } else {



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