win32: get roots on demand for file dialog

This commit is contained in:
Matthew Flatt 2010-12-28 12:21:09 -07:00
parent 8e655dee8e
commit bfa2a57b01

View File

@ -689,15 +689,18 @@
(define editor (send this get-editor))
(define/public (lock) (send editor lock #t))
(define/public (unlock) (send editor lock #f))
(define/override (on-popup e)
(when win?
(let ([m (send this get-menu)])
(for-each (lambda (i) (send i delete))
(send m get-items))
(for-each (lambda (r)
(define l (path->string r))
(make-object menu-item% l m
(lambda _
(enter-text r)
(do-enter))))
(filesystem-root-list))))
(filesystem-root-list)))))
(lock))])
(if win?
(new c [label #f] [parent this] [init-value ""] [choices '()])