cocoa: fix save-file dialog when other extensions should be allowed

This commit is contained in:
Matthew Flatt 2010-11-08 07:12:03 -07:00
parent 3747978c1e
commit 83bcdbbd81

View File

@ -42,10 +42,10 @@
arrayWithObjects: #:type (_list i _NSString) extensions
count: #:type _NSUInteger (length extensions))])
(tellv ns setAllowedFileTypes: a))))
(when (not (ormap (lambda (e)
(equal? (cadr e) "*.*"))
filters))
(tellv ns setAllowsOtherFileTypes: #:type _BOOL #f))
(let ([others? (ormap (lambda (e)
(equal? (cadr e) "*.*"))
filters)])
(tellv ns setAllowsOtherFileTypes: #:type _BOOL others?))
(cond
[(memq 'multi style)