bongo-patches
[Top][All Lists]
Advanced

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

[bongo-patches] Fix bug preventing stop action tracks from working corre


From: Daniel Brockman
Subject: [bongo-patches] Fix bug preventing stop action tracks from working correctly (reported by Dieter Deyke)
Date: Sun, 04 Mar 2007 19:55:21 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

2007-03-04  Daniel Brockman  <address@hidden>

        Fix bug preventing stop action tracks from working correctly
        (reported by Dieter Deyke).

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-03-04 19:55:09.000000000 +0100
+++ new-bongo/bongo.el  2007-03-04 19:55:09.000000000 +0100
@@ -6046,12 +6046,15 @@
 (put 'bongo-play-random-or-stop
      'bongo-playback-mode-indicator "random")
 
-(defun bongo-start ()
+(defun bongo-start (&optional called-interactively-p)
   "Start playing the current track in the nearest playlist buffer.
 If there is no current track, perform the action appropriate for the current
-playback mode (for example, for regressive playback, play the last track).
-However, if something is already playing, do nothing."
-  (interactive)
+  playback mode (for example, for regressive playback, play the last track).
+However, if something is already playing, do nothing.
+When called interactively and the current track is a stop action track,
+  continue playback as if the action track had finished playing.
+CALLED-INTERACTIVELY-P is non-nil when called interactively."
+  (interactive (list 'called-interactively-p))
   (with-bongo-playlist-buffer
     (unless (bongo-playing-p)
       (let ((position (bongo-point-at-current-track-line)))
@@ -6063,7 +6066,8 @@
                   (bongo-play-line (bongo-point-at-last-track-line)))
                  (t
                   (bongo-perform-next-action))))
-              ((and (bongo-action-track-line-p position)
+              ((and called-interactively-p
+                    (bongo-action-track-line-p position)
                     (equal (bongo-line-action position)
                            '(bongo-stop)))
                (bongo-perform-next-action))
@@ -6129,13 +6133,14 @@
                    n (if (= n 1) "" "s"))
          "Stop playback")))
 
-(defun bongo-start/stop (&optional argument)
+(defun bongo-start/stop (&optional argument called-interactively-p)
   "Start or stop playback in the nearest Bongo playlist buffer.
-With prefix ARGUMENT, call `bongo-stop' even if already stopped."
-  (interactive "P")
+With prefix ARGUMENT, call `bongo-stop' even if already stopped.
+CALLED-INTERACTIVELY-P is non-nil when called interactively."
+  (interactive (list current-prefix-arg 'called-interactively-p))
   (if (or argument (bongo-playing-p))
       (bongo-stop argument)
-    (bongo-start)))
+    (bongo-start called-interactively-p)))
 
 (defun bongo-pause/resume ()
   "Pause or resume playback in the nearest Bongo playlist buffer.
-- 
Daniel Brockman <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]