Mercurial > ~darius > hgwebdir.cgi > mservtk
changeset 4:32f624fc18cc
Resolve merge conflicts..
Make sure we aren't doing anything else when we process RT events.
author | darius |
---|---|
date | Fri, 11 Aug 2000 17:46:47 +0000 |
parents | 4343bc7f829a |
children | b6c495b5eeda |
files | mservtk.tcl |
diffstat | 1 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mservtk.tcl Fri May 05 08:55:29 2000 +0000 +++ b/mservtk.tcl Fri Aug 11 17:46:47 2000 +0000 @@ -44,6 +44,8 @@ set state(tmpphrase) ""; set state(sortmode) "Title"; + set state(rtlist) ""; + wm withdraw .; f_readconf; @@ -73,7 +75,17 @@ update_timer; while {1} { - vwait state(exit); + vwait state; + + if {$state(rtlist) != ""} { + # Copy it so we don't stomp any new additions + set tmp $state(rtlist); + set state(rtlist) ""; + + foreach t $state(rtlist) { + n_rthandler [lindex $t 0] [lindex $t 1]; + } + } if {$state(exit) == 1} { exit; @@ -810,7 +822,7 @@ proc n_rthandler {code data} { global songs; - log "%s" "Got RT - $code $data"; +# log "%s" "Got RT - $code $data"; switch -- $code { 600 { @@ -852,7 +864,8 @@ } if {$rth != ""} { - n_rthandler [lindex $rth 0] [lindex $rth 1]; +# n_rthandler [lindex $rth 0] [lindex $rth 1]; + lappend state(rtlist) $rth; } }