made the install-plt menu item's browse
file dialog show files with ".plt" by default. Also, clarified the docs for finder:default-extension closes PR 13104
This commit is contained in:
parent
e55d32b2eb
commit
11a5721b59
|
@ -360,7 +360,13 @@
|
||||||
;; browse : -> void
|
;; browse : -> void
|
||||||
;; gets the name of a file from the user and updates file-text-field
|
;; gets the name of a file from the user and updates file-text-field
|
||||||
(define (browse)
|
(define (browse)
|
||||||
(let ([filename (finder:get-file #f "" #f "" dialog)])
|
(let ([filename (parameterize ([finder:default-extension "plt"]
|
||||||
|
[finder:default-filters
|
||||||
|
(if (eq? (system-type) 'macosx)
|
||||||
|
(finder:default-filters)
|
||||||
|
'(("PLT Files" "*.plt")
|
||||||
|
("Any" "*.*")))])
|
||||||
|
(finder:get-file #f "" #f "" dialog))])
|
||||||
(when filename
|
(when filename
|
||||||
(send file-text-field set-value (path->string filename)))))
|
(send file-text-field set-value (path->string filename)))))
|
||||||
;; from-web? : -> boolean
|
;; from-web? : -> boolean
|
||||||
|
|
|
@ -486,8 +486,8 @@
|
||||||
(parameter/c string?)
|
(parameter/c string?)
|
||||||
extension
|
extension
|
||||||
@{This parameter controls the default extension for the framework's
|
@{This parameter controls the default extension for the framework's
|
||||||
@racket[finder:put-file] dialog. Its value gets passed as the
|
@racket[finder:put-file] and @racket[finder:get-file] dialog. Its value gets passed as the
|
||||||
@racket[default-extension] argument to @racket[put-file].
|
@racket[_extension] argument to @racket[put-file] and @racket[get-file].
|
||||||
|
|
||||||
Its default value is @racket[""].})
|
Its default value is @racket[""].})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user