make drracket's language dialog cope with the
absense of all teaching languages a bit better
This commit is contained in:
parent
908b036347
commit
2a2ea729ee
|
@ -751,6 +751,8 @@
|
|||
;; construct-details : (union (-> void) #f)
|
||||
(define construct-details void)
|
||||
|
||||
(define any-teaching-language-added? #f)
|
||||
|
||||
;; add-language-to-dialog : (instanceof language<%>) -> void
|
||||
;; adds the language to the dialog
|
||||
;; opens all of the turn-down tags
|
||||
|
@ -763,6 +765,8 @@
|
|||
(equal? (car positions)
|
||||
(string-constant teaching-languages))))
|
||||
|
||||
(when teaching-language? (set! any-teaching-language-added? #t))
|
||||
|
||||
;; don't show the initial language ...
|
||||
(unless (equal? positions initial-language-position)
|
||||
(unless (and (list? positions)
|
||||
|
@ -1147,6 +1151,13 @@
|
|||
(send revert-to-defaults-outer-panel stretchable-height #f)
|
||||
|
||||
(for-each add-language-to-dialog languages)
|
||||
|
||||
(unless any-teaching-language-added?
|
||||
(send languages-choice-panel change-children
|
||||
(λ (l)
|
||||
(remove* (list teaching-languages-hier-list-panel use-teaching-language-rb)
|
||||
l))))
|
||||
|
||||
(define (hier-list-sort-predicate x y)
|
||||
(cond
|
||||
[(and (x . is-a? . second-number<%>)
|
||||
|
|
Loading…
Reference in New Issue
Block a user