banshee r4471 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui



Author: btaylor
Date: Fri Sep  5 01:58:26 2008
New Revision: 4471
URL: http://svn.gnome.org/viewvc/banshee?rev=4471&view=rev

Log:
2008-09-04  Brad Taylor  <brad getcoded net>

	* src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs:
	Fix the build under Mono 1.2.6.  For some reason, it doesn't like the
	anonymous delegate that was here.



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs	Fri Sep  5 01:58:26 2008
@@ -166,33 +166,38 @@
         
         private void OnActiveSourceChanged (SourceEventArgs args)
         {
-            Banshee.Base.ThreadAssist.ProxyToMain (delegate {
-                if (active_source_uiid > 0) {
-                    ui_manager.RemoveUi (active_source_uiid);
-                    active_source_uiid = 0;
-                }
-                    
-                if (active_source_actions != null) {
-                    RemoveActionGroup (active_source_actions.Name);
-                    active_source_actions = null;
-                }
+            // FIXME: Can't use an anonymous delegate here because of compiler
+            // bug in Mono 1.2.6
+            Banshee.Base.ThreadAssist.ProxyToMain (OnActiveSourceChangedGui);
+        }
+
+        private void OnActiveSourceChangedGui ()
+        {
+            if (active_source_uiid > 0) {
+                ui_manager.RemoveUi (active_source_uiid);
+                active_source_uiid = 0;
+            }
                 
-                Source active_source = ServiceManager.SourceManager.ActiveSource;
-                if (active_source == null) {
-                    return;
-                }
+            if (active_source_actions != null) {
+                RemoveActionGroup (active_source_actions.Name);
+                active_source_actions = null;
+            }
+            
+            Source active_source = ServiceManager.SourceManager.ActiveSource;
+            if (active_source == null) {
+                return;
+            }
+            
+            active_source_actions = active_source.Properties.Get<BansheeActionGroup> ("ActiveSourceActions");
+            if (active_source_actions != null) {
+                AddActionGroup (active_source_actions);
+            }
                 
-                active_source_actions = active_source.Properties.Get<BansheeActionGroup> ("ActiveSourceActions");
-                if (active_source_actions != null) {
-                    AddActionGroup (active_source_actions);
-                }
-                    
-                Assembly assembly = 
-                    active_source.Properties.Get<Assembly> ("ActiveSourceUIResource.Assembly") ??
-                    Assembly.GetAssembly (active_source.GetType ());
-    
-                active_source_uiid = AddUiFromFile (active_source.Properties.Get<string> ("ActiveSourceUIResource"), assembly);
-            });
+            Assembly assembly = 
+                active_source.Properties.Get<Assembly> ("ActiveSourceUIResource.Assembly") ??
+                Assembly.GetAssembly (active_source.GetType ());
+
+            active_source_uiid = AddUiFromFile (active_source.Properties.Get<string> ("ActiveSourceUIResource"), assembly);
         }
 
         public uint AddUiFromFileInCurrentAssembly (string ui_file)



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