fix platform-independent file dialog
This commit is contained in:
parent
aa4a0faab4
commit
00124220bd
|
@ -685,12 +685,11 @@
|
|||
(make-object message% (protect& message) p)))
|
||||
|
||||
(define dir-text
|
||||
(let ([c (class (if win? combo-field% text-field%) (super-new)
|
||||
(define editor (send this get-editor))
|
||||
(define/public (lock) (send editor lock #t))
|
||||
(define/public (unlock) (send editor lock #f))
|
||||
(let* ([c%
|
||||
(if win?
|
||||
(class combo-field%
|
||||
(super-new [choices '()])
|
||||
(define/override (on-popup e)
|
||||
(when win?
|
||||
(let ([m (send this get-menu)])
|
||||
(for-each (lambda (i) (send i delete))
|
||||
(send m get-items))
|
||||
|
@ -701,10 +700,14 @@
|
|||
(enter-text r)
|
||||
(do-enter))))
|
||||
(filesystem-root-list)))))
|
||||
text-field%)]
|
||||
[c (class c%
|
||||
(super-new)
|
||||
(define editor (send this get-editor))
|
||||
(define/public (lock) (send editor lock #t))
|
||||
(define/public (unlock) (send editor lock #f))
|
||||
(lock))])
|
||||
(if win?
|
||||
(new c [label #f] [parent this] [init-value ""] [choices '()])
|
||||
(new c [label #f] [parent this] [init-value ""]))))
|
||||
(new c [label #f] [parent this] [init-value ""])))
|
||||
|
||||
(define path-list
|
||||
(new (class list-box%
|
||||
|
|
Loading…
Reference in New Issue
Block a user