small gui changes
This commit is contained in:
@@ -176,12 +176,23 @@
|
||||
(dbg-rktplayer "state: ~a" st)
|
||||
(unless (eq? st state)
|
||||
(dbg-rktplayer "Changing to state ~a" st)
|
||||
(unless (eq? state #f) ; Prevent setting src twice very fast
|
||||
(if (eq? st 'playing)
|
||||
(set-play-button "buttons/pause.svg")
|
||||
(set-play-button "buttons/play.svg")
|
||||
)
|
||||
)
|
||||
(let ((el (send this element 'paused)))
|
||||
(unless (eq? state #f) ; Prevent setting src twice very fast
|
||||
(cond ((or (eq? st 'playing) (eq? st 'play))
|
||||
(set-play-button "buttons/pause.svg")
|
||||
(send el set-innerHTML! '(span (tr "playing"))))
|
||||
((eq? st 'stopped)
|
||||
(set-play-button "buttons/play.svg")
|
||||
(send el set-innerHTML! '(span (tr "stopped"))))
|
||||
((eq? st 'pauzed)
|
||||
(set-play-button "buttons/play.svg")
|
||||
(send el set-innerHTML! '(span ((class "blink")) (tr "paused"))))
|
||||
(else
|
||||
(warn-rktplayer "Unkown state for update-state ~a" st)
|
||||
(send el set-innerHTML! (list 'span
|
||||
'((class "blink"))
|
||||
(format "~a: ~a" (tr "Unknown state") st))))
|
||||
)))
|
||||
(set! state st)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user