Changeset 21820 in project


Ignore:
Timestamp:
12/05/10 18:44:02 (9 years ago)
Author:
felix winkelmann
Message:

progress-indicators 0.2

Location:
release/4/progress-indicators
Files:
1 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/progress-indicators/tags/0.2/progress-indicators.scm

    r17268 r21820  
    6060    (spinner-once-set! spn #f)))
    6161
    62 (define (finish-progress-bar! pbar)
     62(define (finish-progress-bar! pbar #!optional clr)
    6363  (clear pbar)
    64   (progress-bar-value-set! pbar (progress-bar-max pbar))
    65   (show pbar (progress-bar-end-message pbar) #t)
    66   (newline (progress-bar-port pbar)) )
     64  (unless clr
     65    (progress-bar-value-set! pbar (progress-bar-max pbar))
     66    (show pbar (progress-bar-end-message pbar) #t)
     67    (newline (progress-bar-port pbar)) ))
    6768
    6869(define (advance-progress-bar! pbar #!optional (amount 1))
  • release/4/progress-indicators/tags/0.2/progress-indicators.setup

    r17268 r21820  
    77 'progress-indicators
    88 '("progress-indicators.so" "progress-indicators.import.so")
    9  '((version 0.1)))
     9 '((version 0.2)))
    1010
  • release/4/progress-indicators/tags/0.2/tests/run.scm

    r17268 r21820  
    2323  (finish-progress-bar! s))
    2424
     25(print "clear:")
     26
     27(let ((s (make-progress-bar max: 100)))
     28  (spin
     29   20 0.1
     30   (lambda ()
     31     (advance-progress-bar! s (/ 100 20))))
     32  (finish-progress-bar! s #t))
     33
    2534(let ((s (make-spinner)))
    2635  (spin 20 0.1 (cut advance-spinner! s))
  • release/4/progress-indicators/trunk/progress-indicators.scm

    r17268 r21820  
    6060    (spinner-once-set! spn #f)))
    6161
    62 (define (finish-progress-bar! pbar)
     62(define (finish-progress-bar! pbar #!optional clr)
    6363  (clear pbar)
    64   (progress-bar-value-set! pbar (progress-bar-max pbar))
    65   (show pbar (progress-bar-end-message pbar) #t)
    66   (newline (progress-bar-port pbar)) )
     64  (unless clr
     65    (progress-bar-value-set! pbar (progress-bar-max pbar))
     66    (show pbar (progress-bar-end-message pbar) #t)
     67    (newline (progress-bar-port pbar)) ))
    6768
    6869(define (advance-progress-bar! pbar #!optional (amount 1))
  • release/4/progress-indicators/trunk/progress-indicators.setup

    r17268 r21820  
    77 'progress-indicators
    88 '("progress-indicators.so" "progress-indicators.import.so")
    9  '((version 0.1)))
     9 '((version 0.2)))
    1010
  • release/4/progress-indicators/trunk/tests/run.scm

    r17268 r21820  
    2323  (finish-progress-bar! s))
    2424
     25(print "clear:")
     26
     27(let ((s (make-progress-bar max: 100)))
     28  (spin
     29   20 0.1
     30   (lambda ()
     31     (advance-progress-bar! s (/ 100 20))))
     32  (finish-progress-bar! s #t))
     33
    2534(let ((s (make-spinner)))
    2635  (spin 20 0.1 (cut advance-spinner! s))
Note: See TracChangeset for help on using the changeset viewer.