~dobey/ubuntu/natty/banshee/fix-and-amz

« back to all changes in this revision

Viewing changes to src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2010-01-28 23:52:53 UTC
  • mto: (6.4.6 sid) (1.14.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20100128235253-qyw3pkf2vw7ld3kg
ImportĀ upstreamĀ versionĀ 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
            OnTransition ();
254
254
        }
255
255
 
 
256
        public void RestartOrPrevious ()
 
257
        {
 
258
            RestartOrPrevious (RepeatMode == PlaybackRepeatMode.RepeatAll);
 
259
        }
 
260
 
 
261
        public void RestartOrPrevious (bool restart)
 
262
        {
 
263
            const int delay = 4000; // ms
 
264
            if (player_engine.Position < delay) {
 
265
                Previous ();
 
266
            } else {
 
267
                var track = player_engine.CurrentTrack;
 
268
                if (track != null) {
 
269
                    player_engine.Close ();
 
270
                    player_engine.OpenPlay (track);
 
271
                }
 
272
            }
 
273
        }
 
274
 
256
275
        bool IBasicPlaybackController.First ()
257
276
        {
258
277
            if (Source.Count > 0) {