banshee r3841 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3841 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio
- Date: Tue, 29 Apr 2008 00:33:04 +0100 (BST)
Author: gburt
Date: Mon Apr 28 23:33:04 2008
New Revision: 3841
URL: http://svn.gnome.org/viewvc/banshee?rev=3841&view=rev
Log:
2008-04-28 Gabriel Burt <gabriel burt gmail com>
* src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs: Add
RemoveActionGroup convenience override.
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs:
* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs: Make
sure to dispose actions when the extension is disposed, fixing crasher
when you tried to disable/reenable the extension.
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/InterfaceActionService.cs
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs
trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.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 Mon Apr 28 23:33:04 2008
@@ -110,6 +110,11 @@
}
}
}
+
+ public void RemoveActionGroup (ActionGroup group)
+ {
+ RemoveActionGroup (group.Name);
+ }
public ActionGroup FindActionGroup (string actionGroupId)
{
Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmActions.cs Mon Apr 28 23:33:04 2008
@@ -56,7 +56,6 @@
private InterfaceActionService action_service;
private uint actions_id;
- private ActionGroup actions;
public LastfmActions (LastfmSource lastfm) : base ("Lastfm")
{
@@ -205,10 +204,8 @@
public override void Dispose ()
{
- if (actions != null) {
- action_service.UIManager.RemoveUi (actions_id);
- actions = null;
- }
+ action_service.UIManager.RemoveUi (actions_id);
+ action_service.RemoveActionGroup (this);
base.Dispose ();
}
Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/LastfmSource.cs Mon Apr 28 23:33:04 2008
@@ -116,10 +116,11 @@
public void Dispose ()
{
Connection.StateChanged -= HandleConnectionStateChanged;
- //ClearChildSources ();
+ actions.Dispose ();
+ ClearChildSources ();
}
- /*public override void ClearChildSources ()
+ public override void ClearChildSources ()
{
lock (Children) {
foreach (StationSource child in Children) {
@@ -130,7 +131,7 @@
}
base.ClearChildSources ();
- }*/
+ }
/*public override void AddChildSource (ChildSource source)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]