fixed bug in language dialog -- it was not creating the details panels when they were shown initially

svn: r1292
This commit is contained in:
Robby Findler 2005-11-12 03:58:04 +00:00
parent 09aba062b7
commit fef378f468

View File

@ -687,21 +687,23 @@
;; details-callback : -> void ;; details-callback : -> void
;; flips the details-shown? flag and resets the GUI ;; flips the details-shown? flag and resets the GUI
(define (details-callback) (define (details-callback)
(let ([do-construction? (and construct-details #t)]) (do-construct-details)
(when do-construction? (set! details-shown? (not details-shown?))
(send details-button enable #f) (when re-center
(construct-details) (send re-center begin-container-sequence))
(set! construct-details #f)) (update-show/hide-details)
(when re-center
(set! details-shown? (not details-shown?)) (send re-center center 'both)
(when re-center (send re-center end-container-sequence)))
(send re-center begin-container-sequence))
(update-show/hide-details) ;; do-construct-details : -> void
(when re-center ;; construct the details panels, if they have not been constructed
(send re-center center 'both) (define (do-construct-details)
(send re-center end-container-sequence)) (when construct-details
(when do-construction? (send details-button enable #f)
(send details-button enable #t)))) (construct-details)
(set! construct-details #f)
(send details-button enable #t)))
;; show/hide-details : -> void ;; show/hide-details : -> void
;; udpates the GUI based on the details-shown? flag ;; udpates the GUI based on the details-shown? flag
@ -814,6 +816,8 @@
(send languages-hier-list min-client-height (text-height (send languages-hier-list get-editor))) (send languages-hier-list min-client-height (text-height (send languages-hier-list get-editor)))
(when get/set-selected-language-settings (when get/set-selected-language-settings
(get/set-selected-language-settings settings-to-show)) (get/set-selected-language-settings settings-to-show))
(when details-shown?
(do-construct-details))
(send languages-hier-list focus) (send languages-hier-list focus)
(values (values
(λ () selected-language) (λ () selected-language)