choose-dir
This commit is contained in:
@@ -665,11 +665,15 @@
|
||||
)
|
||||
|
||||
(define/public (choose-dir caption base-dir)
|
||||
(let ((r (ww-choose-dir win-id caption base-dir)))
|
||||
(ww-debug (format "choose-dir: ~a" r))
|
||||
(if (eq? r 'cmd-nok)
|
||||
#f
|
||||
r)))
|
||||
(let ((bdir (string-trim base-dir)))
|
||||
(when (or (string=? bdir "") (string=? bdir ".") (string=? bdir ".."))
|
||||
(set! bdir (path->string (find-system-path 'home-dir))))
|
||||
(ww-debug (format "ww-choose-dir ~a ~a ~a" win-id caption bdir))
|
||||
(let ((r (ww-choose-dir win-id caption bdir)))
|
||||
(ww-debug (format "choose-dir: ~a" r))
|
||||
(if (eq? r 'cmd-nok)
|
||||
#f
|
||||
r))))
|
||||
|
||||
(define/public (dir-choosen handle choosen dir)
|
||||
(ww-debug (format "dir-choosen: handle=~a, choosen=~a, dir=~a" handle choosen dir))
|
||||
|
||||
@@ -222,7 +222,10 @@
|
||||
(payload* (substring evt (string-length (list-ref m 0))))
|
||||
(payload (if (string=? payload* "")
|
||||
(make-hash)
|
||||
(with-input-from-string (substring payload* 1) read-json)))
|
||||
(begin
|
||||
(write payload*)(newline)
|
||||
(with-input-from-string (substring payload* 1) read-json)))
|
||||
)
|
||||
)
|
||||
(if (eq? evt-handler #f)
|
||||
(ww-error (format "process-event: no event handler to handle event ~a" evt))
|
||||
|
||||
Reference in New Issue
Block a user