banshee r3821 - in trunk/banshee: .	src/Core/Banshee.ThickClient/Banshee.Gui
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3821 - in trunk/banshee: .	src/Core/Banshee.ThickClient/Banshee.Gui
- Date: Thu, 24 Apr 2008 20:49:29 +0100 (BST)
Author: gburt
Date: Thu Apr 24 19:49:29 2008
New Revision: 3821
URL: http://svn.gnome.org/viewvc/banshee?rev=3821&view=rev
Log:
2008-04-24  Gabriel Burt  <gabriel burt gmail com>
	* src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs: Fix bug
	with seek and jump-to-playing not being sensitive when they should be.
	Fixes BGO #528198.
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs	Thu Apr 24 19:49:29 2008
@@ -134,30 +134,31 @@
                 default:
                     break;
             }
+
+            TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack; 
+            if (track != null) {
+                this["SeekToAction"].Sensitive = !track.IsLive;
+                this["RestartSongAction"].Sensitive = !track.IsLive;
+                this["RestartSongAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
+                    ? Catalog.GetString ("_Restart Song")
+                    : Catalog.GetString ("_Restart Video");
+
+                this["JumpToPlayingTrackAction"].Sensitive = true;
+                this["JumpToPlayingTrackAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
+                    ? Catalog.GetString ("_Jump to Playing Song")
+                    : Catalog.GetString ("_Jump to Playing Video");
+            } else {
+                this["JumpToPlayingTrackAction"].Sensitive = false;
+                this["RestartSongAction"].Sensitive = false;
+                this["SeekToAction"].Sensitive = false;
+            }
         }
             
         private void OnPlayerEngineEventChanged (object o, PlayerEngineEventArgs args)
         {
             switch (args.Event) {
-                case PlayerEngineEvent.StartOfStream:
-                    TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack; 
-                    this["SeekToAction"].Sensitive = !track.IsLive;
-                    this["RestartSongAction"].Sensitive = !track.IsLive;
-                    this["RestartSongAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
-                        ? Catalog.GetString ("_Restart Song")
-                        : Catalog.GetString ("_Restart Video");
-
-                    this["JumpToPlayingTrackAction"].Sensitive = true;
-                    this["JumpToPlayingTrackAction"].Label = (track.MediaAttributes & TrackMediaAttributes.VideoStream) == 0
-                        ? Catalog.GetString ("_Jump to Playing Song")
-                        : Catalog.GetString ("_Jump to Playing Video");
-                    break;
-
                 case PlayerEngineEvent.Error:
                 case PlayerEngineEvent.EndOfStream:
-                    this["JumpToPlayingTrackAction"].Sensitive = false;
-                    this["RestartSongAction"].Sensitive = false;
-                    this["SeekToAction"].Sensitive = false;
 
                     ToggleAction stop_action = (ToggleAction) this["StopWhenFinishedAction"];
                     // Kinda lame, but we don't want to actually reset StopWhenFinished inside the controller
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]