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



Author: blorentz
Date: Wed Mar  4 18:56:45 2009
New Revision: 5096
URL: http://svn.gnome.org/viewvc/banshee?rev=5096&view=rev

Log:
2009-03-04  Bertrand Lorentz  <bertrand lorentz gmail com>

	* src/Core/Banshee.ThickClient/Banshee.Gui/PlaybackActions.cs: Patch
	from Alexander Kojevnikov that makes the Previous button go to the
	previous track only if position is less than 4 seconds, otherwise it
	restarts the current song (BGO #539085).



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	Wed Mar  4 18:56:45 2009
@@ -215,7 +215,12 @@
         
         private void OnPreviousAction (object o, EventArgs args)
         {
-            ServiceManager.PlaybackController.Previous ();
+            const int delay = 4000; // ms
+            if (ServiceManager.PlayerEngine.Position < delay) {
+                ServiceManager.PlaybackController.Previous ();
+            } else {
+                OnRestartSongAction (o, args);
+            }
         }
 
         private void OnSeekToAction (object o, EventArgs args)



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