moved the debugging options in the details part of the module panel so they are side-by-side, which should make the dialog more likely to fit on a netbook screen

svn: r17955
This commit is contained in:
Robby Findler 2010-02-03 15:34:11 +00:00
parent ffa97036a8
commit 0bda2f0e18
2 changed files with 50 additions and 33 deletions

View File

@ -239,15 +239,30 @@
(string-constant case-sensitive-label)
input-panel
void))]
[debugging (new radio-box%
(label #f)
(choices
(list (string-constant no-debugging-or-profiling)
(string-constant debugging)
(string-constant debugging-and-profiling)
(string-constant test-coverage)))
(parent dynamic-panel)
(callback debugging-radio-box-callback))]
[debugging-panel (new horizontal-panel%
[parent dynamic-panel]
[stretchable-height #f]
[alignment '(left center)])]
[debugging-left (new radio-box%
(label #f)
(choices
(list (string-constant no-debugging-or-profiling)
(string-constant debugging)))
(parent debugging-panel)
(callback
(λ (a b)
(send debugging-right set-selection #f)
(debugging-radio-box-callback a b))))]
[debugging-right (new radio-box%
(label #f)
(choices
(list (string-constant debugging-and-profiling)
(string-constant test-coverage)))
(parent debugging-panel)
(callback
(λ (a b)
(send debugging-left set-selection #f)
(debugging-radio-box-callback a b))))]
[output-style (make-object radio-box%
(string-constant output-style-label)
(list (string-constant constructor-printing-style)
@ -272,7 +287,7 @@
(string-constant use-pretty-printer-label)
output-panel
void)])
(get-debugging-radio-box debugging)
(get-debugging-radio-box debugging-left debugging-right)
(dynamic-panel-extras dynamic-panel)
(case-lambda
@ -290,11 +305,13 @@
'mixed-fraction-e)
(send show-sharing get-value)
(send insert-newlines get-value)
(case (send debugging get-selection)
(case (send debugging-left get-selection)
[(0) 'none]
[(1) 'debug]
[(2) 'debug/profile]
[(3) 'test-coverage]))]
[(#f)
(case (send debugging-right get-selection)
[(0) 'debug/profile]
[(1) 'test-coverage])]))]
[(settings)
(when case-sensitive
(send case-sensitive set-value
@ -308,12 +325,11 @@
'repeating-decimal-e))
(send show-sharing set-value (simple-settings-show-sharing settings))
(send insert-newlines set-value (simple-settings-insert-newlines settings))
(send debugging set-selection
(case (simple-settings-annotations settings)
[(none) 0]
[(debug) 1]
[(debug/profile) 2]
[(test-coverage) 3]))])))
(case (simple-settings-annotations settings)
[(none) (send debugging-right set-selection #f) (send debugging-left set-selection 0)]
[(debug) (send debugging-right set-selection #f) (send debugging-left set-selection 1)]
[(debug/profile) (send debugging-left set-selection #f) (send debugging-right set-selection 0)]
[(test-coverage) (send debugging-left set-selection #f) (send debugging-right set-selection 1)])])))
;; simple-module-based-language-render-value/format : TST settings port (union #f (snip% -> void)) (union 'infinity number) -> void
(define (simple-module-based-language-render-value/format value settings port width)

View File

@ -407,17 +407,18 @@
(define compilation-on-check-box #f)
(define compilation-on? #t)
(define save-stacktrace-on-check-box #f)
(define debugging-radio-box #f)
(define left-debugging-radio-box #f)
(define right-debugging-radio-box #f)
(define simple-case-lambda
(drscheme:language:simple-module-based-language-config-panel
new-parent
#:case-sensitive #t
#:get-debugging-radio-box (λ (rb) (set! debugging-radio-box rb))
#:get-debugging-radio-box (λ (rb-l rb-r) (set! left-debugging-radio-box rb-l) (set! right-debugging-radio-box rb-r))
#:debugging-radio-box-callback
(λ (debugging-radio-box evt)
(update-compilation-checkbox debugging-radio-box))
(update-compilation-checkbox left-debugging-radio-box right-debugging-radio-box))
#:dynamic-panel-extras
(λ (dynamic-panel)
@ -430,14 +431,14 @@
(set! save-stacktrace-on-check-box (new check-box%
[label (string-constant preserve-stacktrace-information)]
[parent dynamic-panel])))))
(define (update-compilation-checkbox debugging-radio-box)
(case (send debugging-radio-box get-selection)
[(2 3)
(send compilation-on-check-box enable #f)
(send compilation-on-check-box set-value #f)]
(define (update-compilation-checkbox left-debugging-radio-box right-debugging-radio-box)
(case (send left-debugging-radio-box get-selection)
[(0 1)
(send compilation-on-check-box enable #t)
(send compilation-on-check-box set-value compilation-on?)]))
(send compilation-on-check-box set-value compilation-on?)]
[(#f)
(send compilation-on-check-box enable #f)
(send compilation-on-check-box set-value #f)]))
(define cp-panel (new group-box-panel%
[parent new-parent]
@ -585,7 +586,7 @@
(install-collection-paths '(default))
(update-buttons)
(install-auto-text default-auto-text)
(update-compilation-checkbox debugging-radio-box)
(update-compilation-checkbox left-debugging-radio-box right-debugging-radio-box)
(case-lambda
[()
@ -596,9 +597,9 @@
(list (get-collection-paths)
(get-command-line-args)
(get-auto-text)
(case (send debugging-radio-box get-selection)
[(2 3) #f]
[(0 1) compilation-on?])
(case (send left-debugging-radio-box get-selection)
[(0 1) compilation-on?]
[(#f) #f])
(send save-stacktrace-on-check-box get-value)))))]
[(settings)
(simple-case-lambda settings)
@ -607,7 +608,7 @@
(install-auto-text (module-language-settings-auto-text settings))
(set! compilation-on? (module-language-settings-compilation-on? settings))
(send compilation-on-check-box set-value (module-language-settings-compilation-on? settings))
(update-compilation-checkbox debugging-radio-box)
(update-compilation-checkbox left-debugging-radio-box right-debugging-radio-box)
(send save-stacktrace-on-check-box set-value (module-language-settings-full-trace? settings))
(update-buttons)]))