[banshee/gapless-ng: 5/836] Add userRequested boolean parameter to IBasicPlaybackController.Next, and update all implementors



commit f4bba46ee3bb52c88b882d397443da6c06b0c05d
Author: Christopher James Halse Rogers <raof ubuntu com>
Date:   Fri Jul 17 13:36:49 2009 +1000

    Add userRequested boolean parameter to IBasicPlaybackController.Next, and update all implementors

 .../IBasicPlaybackController.cs                    |    2 +-
 .../PlaybackControllerService.cs                   |    6 +++---
 .../Banshee.InternetRadio/InternetRadioSource.cs   |    2 +-
 .../Banshee.Lastfm.Radio/StationSource.cs          |    6 +++---
 .../Banshee.PlayQueue/PlayQueueSource.cs           |    4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.PlaybackController/IBasicPlaybackController.cs b/src/Core/Banshee.Services/Banshee.PlaybackController/IBasicPlaybackController.cs
index 4d793c7..9825f8a 100644
--- a/src/Core/Banshee.Services/Banshee.PlaybackController/IBasicPlaybackController.cs
+++ b/src/Core/Banshee.Services/Banshee.PlaybackController/IBasicPlaybackController.cs
@@ -31,7 +31,7 @@ namespace Banshee.PlaybackController
     public interface IBasicPlaybackController
     {
         bool First ();
-        bool Next (bool restart);
+        bool Next (bool restart, bool userRequested);
         bool Previous (bool restart);
     }
 }
diff --git a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
index 81cf3e2..e06a232 100644
--- a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
+++ b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
@@ -233,9 +233,9 @@ namespace Banshee.PlaybackController
 
             player_engine.IncrementLastPlayed ();
             
-            if (Source is IBasicPlaybackController && ((IBasicPlaybackController)Source).Next (restart)) {
+            if (Source is IBasicPlaybackController && ((IBasicPlaybackController)Source).Next (restart, true)) {
             } else {
-                ((IBasicPlaybackController)this).Next (restart);
+                ((IBasicPlaybackController)this).Next (restart, true);
             }
             
             OnTransition ();
@@ -271,7 +271,7 @@ namespace Banshee.PlaybackController
             return true;
         }
         
-        bool IBasicPlaybackController.Next (bool restart)
+        bool IBasicPlaybackController.Next (bool restart, bool userRequested)
         {
             if (CurrentTrack != null) {
                 previous_stack.Push (CurrentTrack);
diff --git a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
index 97e8059..51b82cd 100644
--- a/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
+++ b/src/Extensions/Banshee.InternetRadio/Banshee.InternetRadio/InternetRadioSource.cs
@@ -279,7 +279,7 @@ namespace Banshee.InternetRadio
             return false;
         }
         
-        public bool Next (bool restart)
+        public bool Next (bool restart, bool userRequested)
         {
             RadioTrackInfo radio_track = ServiceManager.PlaybackController.CurrentTrack as RadioTrackInfo;
             if (radio_track != null && radio_track.PlayNextStream ()) {
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
index e74426f..6b27d43 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
@@ -294,11 +294,11 @@ namespace Banshee.Lastfm.Radio
 
         bool IBasicPlaybackController.First ()
         {
-            return ((IBasicPlaybackController)this).Next (false);
+            return ((IBasicPlaybackController)this).Next (false, true);
         }
         
         private bool playback_requested;    
-        bool IBasicPlaybackController.Next (bool restart)
+        bool IBasicPlaybackController.Next (bool restart, bool userRequested)
         {
             TrackInfo next = NextTrack;
             if (next != null) {
@@ -372,7 +372,7 @@ namespace Banshee.Lastfm.Radio
 
                             if (playback_requested) {
                                 if (this == ServiceManager.PlaybackController.Source ) {
-                                    ((IBasicPlaybackController)this).Next (false);
+                                    ((IBasicPlaybackController)this).Next (false, true);
                                 }
                                 playback_requested = false;
                             }
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
index 8742d56..d079cd8 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
@@ -235,10 +235,10 @@ namespace Banshee.PlayQueue
 
         bool IBasicPlaybackController.First ()
         {
-            return ((IBasicPlaybackController)this).Next (false);
+            return ((IBasicPlaybackController)this).Next (false, true);
         }
         
-        bool IBasicPlaybackController.Next (bool restart)
+        bool IBasicPlaybackController.Next (bool restart, bool userRequested)
         {
             RemovePlayingTrack ();
             



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