banshee r4003 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying src/Libraries/Hyena.Gui/Hyena.Query.Gui
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r4003 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying src/Libraries/Hyena.Gui/Hyena.Query.Gui
- Date: Wed, 28 May 2008 17:34:58 +0000 (UTC)
Author: gburt
Date: Wed May 28 17:34:58 2008
New Revision: 4003
URL: http://svn.gnome.org/viewvc/banshee?rev=4003&view=rev
Log:
2008-05-28 Gabriel Burt <gabriel burt gmail com>
* src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenControls.cs:
* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedSeekSlider.cs:
Add method to disconnect the seek slider so it's not still listening for
player engine events and trying to update itself after it's been
destroyed. Fixes BGO #535213.
* src/Libraries/Hyena.Gui/Hyena.Query.Gui/QueryTermBox.cs: Be more
defensive to avoid ArrayIndexOutOfBounds. Fixes BGO #535269;
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedSeekSlider.cs
trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenControls.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Query.Gui/QueryTermBox.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedSeekSlider.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedSeekSlider.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ConnectedSeekSlider.cs Wed May 28 17:34:58 2008
@@ -67,6 +67,14 @@
seek_slider.SeekRequested += OnSeekRequested;
}
+ public void Disconnect ()
+ {
+ ServiceManager.PlayerEngine.DisconnectEvent (OnPlayerEvent);
+ ServiceManager.PlayerEngine.TrackIntercept -= OnTrackIntercept;
+ seek_slider.SeekRequested -= OnSeekRequested;
+ base.Dispose ();
+ }
+
public StreamPositionLabel StreamPositionLabel {
get { return stream_position_label; }
}
Modified: trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenControls.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenControls.cs (original)
+++ trunk/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenControls.cs Wed May 28 17:34:58 2008
@@ -39,6 +39,7 @@
{
private InterfaceActionService action_service;
private ConnectedVolumeButton volume_button;
+ private ConnectedSeekSlider slider;
public FullscreenControls (Window toplevel, InterfaceActionService actionService) : base (toplevel, 1)
{
@@ -57,7 +58,7 @@
box.PackStart (action_service.PlaybackActions["PlayPauseAction"].CreateToolItem (), false, false, 0);
box.PackStart (new NextButton (action_service), false, false, 0);
box.PackStart (new RepeatActionButton (true), false, false, 0);
- box.PackStart (new ConnectedSeekSlider (SeekSliderLayout.Horizontal), true, true, 0);
+ box.PackStart (slider = new ConnectedSeekSlider (SeekSliderLayout.Horizontal), true, true, 0);
box.PackStart (volume_button, false, false, 0);
Button exit = new Button (Stock.LeaveFullscreen);
@@ -68,6 +69,12 @@
Add (box);
box.ShowAll ();
}
+
+ public override void Destroy ()
+ {
+ slider.Disconnect ();
+ base.Destroy ();
+ }
public bool Active {
get { return volume_button.Active || IsActive; }
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Query.Gui/QueryTermBox.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Query.Gui/QueryTermBox.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Query.Gui/QueryTermBox.cs Wed May 28 17:34:58 2008
@@ -140,6 +140,9 @@
private void HandleFieldChanged (object o, EventArgs args)
{
+ if (field_chooser.Active < 0 || field_chooser.Active >= sorted_fields.Length)
+ return;
+
QueryField field = sorted_fields [field_chooser.Active];
// Leave everything as is unless the new field is a different type
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]