From 4befb20bd0cb11e9cca686a29f12e0bc6ff4657f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 17 Nov 2012 13:16:10 -0600 Subject: [PATCH] remove the mode where reader errors discovered via online check syntax are shown in the corner of the window This was an attempt to avoid opening up a whole status line in the bottom of the window much of the time. But it doesn't really work since as soon as you have a syntax error (which are relatively common) you get that whole line opened up. That it, this attempted GUI interaction depended on the bogus premise that read errors are somehow happening in a transient way between error-free states. closes PR 13267 --- collects/drracket/private/main.rkt | 4 ++-- collects/drracket/private/module-language.rkt | 20 +++++-------------- .../private/english-string-constants.rkt | 1 - .../private/french-string-constants.rkt | 1 - .../private/german-string-constants.rkt | 1 - 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/collects/drracket/private/main.rkt b/collects/drracket/private/main.rkt index 1ace972f97..877f109813 100644 --- a/collects/drracket/private/main.rkt +++ b/collects/drracket/private/main.rkt @@ -506,8 +506,8 @@ (preferences:set-default 'drracket:online-compilation-default-on #t boolean?) (preferences:set-default 'drracket:online-expansion:read-in-defs-errors - 'corner - (or/c 'margin 'gold 'corner)) + 'margin + (or/c 'margin 'gold)) (preferences:set-default 'drracket:online-expansion:variable-errors 'margin (or/c 'margin 'gold)) diff --git a/collects/drracket/private/module-language.rkt b/collects/drracket/private/module-language.rkt index a31d2f2df6..e572d9e945 100644 --- a/collects/drracket/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -1471,8 +1471,7 @@ [(reader-in-defs-error) (case (preferences:get 'drracket:online-expansion:read-in-defs-errors) [(margin) (show-error-in-margin res)] - [(gold) (show-error-as-highlighted-regions res)] - [(corner) (show-error-as-parens-in-corner res)])] + [(gold) (show-error-as-highlighted-regions res)])] [(access-violation) (send (get-tab) show-bkg-running 'failed (gui-utils:format-literal-label "~a" (vector-ref res 1))) (clear-old-error) @@ -1500,13 +1499,7 @@ (send (get-tab) show-bkg-running 'completed-successfully sc-finished-successfully)] [else (error 'module-language.rkt "unknown response from the expanding place: ~s\n" res)])) - - (define/private (show-error-as-parens-in-corner res) - (send (get-tab) show-bkg-running 'reader-in-defs-error - (gui-utils:format-literal-label "~a" (vector-ref res 1))) - (clear-old-error) - (reset-frame-expand-error #f)) - + (define/private (show-error-in-margin res) (begin-edit-sequence #f #f) (define tlw (send (get-tab) get-frame)) @@ -1937,8 +1930,7 @@ [label (string-constant online-expansion-show-read-errors-as)] [callback (make-callback 'drracket:online-expansion:read-in-defs-errors)] [choices (list (string-constant online-expansion-error-margin) - (string-constant online-expansion-error-gold-highlight) - (string-constant online-expansion-error-in-corner))])) + (string-constant online-expansion-error-gold-highlight))])) (define var-choice (new choice% [parent vp] @@ -1961,13 +1953,11 @@ (define (index->pref n) (case n [(0) 'margin] - [(1) 'gold] - [(2) 'corner])) + [(1) 'gold])) (define (pref->index p) (case p [(margin) 0] - [(gold) 1] - [(corner) 2])) + [(gold) 1])) (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 other-choice 'drracket:online-expansion:other-errors) diff --git a/collects/string-constants/private/english-string-constants.rkt b/collects/string-constants/private/english-string-constants.rkt index 19dbd61485..7320c6d9c1 100644 --- a/collects/string-constants/private/english-string-constants.rkt +++ b/collects/string-constants/private/english-string-constants.rkt @@ -251,7 +251,6 @@ please adhere to these guidelines: (online-expansion-show-variable-errors-as "Show unbound identifier errors") (online-expansion-show-other-errors-as "Show other errors") ; locations the errors can be shown - (online-expansion-error-in-corner "in the corner of the window") (online-expansion-error-gold-highlight "with gold highlighting") (online-expansion-error-margin "in the margin") ;;; info bar at botttom of drscheme frame diff --git a/collects/string-constants/private/french-string-constants.rkt b/collects/string-constants/private/french-string-constants.rkt index 91432e345b..35fdb7d2f8 100644 --- a/collects/string-constants/private/french-string-constants.rkt +++ b/collects/string-constants/private/french-string-constants.rkt @@ -237,7 +237,6 @@ (online-expansion-show-variable-errors-as "Montrer les identificateurs libres") (online-expansion-show-other-errors-as "Montrer les autres erreurs") ; locations the errors can be shown - (online-expansion-error-in-corner "dans le coin de la fenĂȘtre") (online-expansion-error-gold-highlight "par surlignage dorĂ©") (online-expansion-error-margin "dans la marge") ;;; info bar at botttom of drscheme frame diff --git a/collects/string-constants/private/german-string-constants.rkt b/collects/string-constants/private/german-string-constants.rkt index 4b54a389bc..331e3cc8f8 100644 --- a/collects/string-constants/private/german-string-constants.rkt +++ b/collects/string-constants/private/german-string-constants.rkt @@ -156,7 +156,6 @@ (online-expansion-show-variable-errors-as "Ungebundene Bezeichner anzeigen") (online-expansion-show-other-errors-as "Andere Fehler anzeigen") ; locations the errors can be shown - (online-expansion-error-in-corner "in der Ecke des Fensters") (online-expansion-error-gold-highlight "mit goldener Markierung") (online-expansion-error-margin "am Rand") ;;; info bar at botttom of drscheme frame