add a preference to disable the arrows in online check syntax (and regular check syntax too)

This commit is contained in:
Robby Findler 2012-12-21 22:08:51 -06:00
parent 84057ce3d5
commit 7cad346cf8
3 changed files with 12 additions and 4 deletions

View File

@ -2294,4 +2294,7 @@
(connect-to-prefs read-choice 'drracket:online-expansion:read-in-defs-errors) (connect-to-prefs read-choice 'drracket:online-expansion:read-in-defs-errors)
(connect-to-prefs var-choice 'drracket:online-expansion:variable-errors) (connect-to-prefs var-choice 'drracket:online-expansion:variable-errors)
(connect-to-prefs other-choice 'drracket:online-expansion:other-errors) (connect-to-prefs other-choice 'drracket:online-expansion:other-errors)
(preferences:add-check parent-vp
'drracket:syncheck:show-arrows?
(string-constant show-arrows-on-mouseover))
parent-vp)))) parent-vp))))

View File

@ -87,6 +87,7 @@ If the namespace does not, they are colored the unbound color.
'drracket:check-syntax-error-report-window-percentage 'drracket:check-syntax-error-report-window-percentage
1/10 1/10
number-between-zero-and-one?)) number-between-zero-and-one?))
(preferences:set-default 'drracket:syncheck:show-arrows? #t boolean?)
(define (syncheck-add-to-preferences-panel parent) (define (syncheck-add-to-preferences-panel parent)
(color-prefs:build-color-selection-panel parent (color-prefs:build-color-selection-panel parent
@ -726,7 +727,8 @@ If the namespace does not, they are colored the unbound color.
(define/public (syncheck:add-arrow start-text start-pos-left start-pos-right (define/public (syncheck:add-arrow start-text start-pos-left start-pos-right
end-text end-pos-left end-pos-right end-text end-pos-left end-pos-right
actual? level) actual? level)
(when arrow-records (when (and arrow-records
(preferences:get 'drracket:syncheck:show-arrows?))
(when (add-to-bindings-table (when (add-to-bindings-table
start-text start-pos-left start-pos-right start-text start-pos-left start-pos-right
end-text end-pos-left end-pos-right) end-text end-pos-left end-pos-right)
@ -738,7 +740,8 @@ If the namespace does not, they are colored the unbound color.
;; syncheck:add-tail-arrow : text number text number -> void ;; syncheck:add-tail-arrow : text number text number -> void
(define/public (syncheck:add-tail-arrow from-text from-pos to-text to-pos) (define/public (syncheck:add-tail-arrow from-text from-pos to-text to-pos)
(when arrow-records (when (and arrow-records
(preferences:get 'drracket:syncheck:show-arrows?))
(let ([tail-arrow (make-tail-arrow to-text to-pos from-text from-pos)]) (let ([tail-arrow (make-tail-arrow to-text to-pos from-text from-pos)])
(add-to-range/key from-text from-pos (+ from-pos 1) tail-arrow #f #f) (add-to-range/key from-text from-pos (+ from-pos 1) tail-arrow #f #f)
(add-to-range/key to-text to-pos (+ to-pos 1) tail-arrow #f #f)))) (add-to-range/key to-text to-pos (+ to-pos 1) tail-arrow #f #f))))

View File

@ -241,10 +241,10 @@ please adhere to these guidelines:
(jump-to-error "Jump to Error") (jump-to-error "Jump to Error")
(online-expansion-is-disabled "Background expansion is disabled") (online-expansion-is-disabled "Background expansion is disabled")
;; these next two show up in the bar along the bottom of the drracket window ; these next two show up in the bar along the bottom of the drracket window
(online-expansion-pending "Background expansion pending ...") (online-expansion-pending "Background expansion pending ...")
(online-expansion-finished "Background expansion finished") ;; note: there may still be errors in this case (online-expansion-finished "Background expansion finished") ;; note: there may still be errors in this case
;; the next two show up in a menu when you click on the circle in the bottom right corner ; the next two show up in a menu when you click on the circle in the bottom right corner
(disable-online-expansion "Disable background expansion") (disable-online-expansion "Disable background expansion")
(enable-online-expansion "Enable background expansion") (enable-online-expansion "Enable background expansion")
;; the online expansion preferences pane ;; the online expansion preferences pane
@ -256,6 +256,8 @@ please adhere to these guidelines:
; locations the errors can be shown ; locations the errors can be shown
(online-expansion-error-gold-highlight "with gold highlighting") (online-expansion-error-gold-highlight "with gold highlighting")
(online-expansion-error-margin "in the margin") (online-expansion-error-margin "in the margin")
; the label of a preference in the (string-constant online-expansion) section
(show-arrows-on-mouseover "Show binding and tail-position arrows on mouseover")
;;; info bar at botttom of drscheme frame ;;; info bar at botttom of drscheme frame
(collect-button-label "GC") (collect-button-label "GC")
(read-only "Read only") (read-only "Read only")