From 109a683aa1af5a3b8b7b677f100de6c87c47b09d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 9 Sep 2006 03:37:31 +0000 Subject: [PATCH] PR 8271 svn: r4283 --- collects/drscheme/private/debug.ss | 1 + collects/framework/private/frame.ss | 27 ++++++++++++++++++- .../english-string-constants.ss | 2 ++ doc/release-notes/drscheme/HISTORY | 5 ++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/collects/drscheme/private/debug.ss b/collects/drscheme/private/debug.ss index 1fc452778d..6909e2067f 100644 --- a/collects/drscheme/private/debug.ss +++ b/collects/drscheme/private/debug.ss @@ -745,6 +745,7 @@ profile todo: (inherit get-top-level-window) (define/augment (after-many-evals) + (printf "updating test coverage\n") (when test-coverage-info (send (get-context) show-test-coverage-annotations test-coverage-info diff --git a/collects/framework/private/frame.ss b/collects/framework/private/frame.ss index 5524210442..9df4a33c22 100644 --- a/collects/framework/private/frame.ss +++ b/collects/framework/private/frame.ss @@ -873,7 +873,7 @@ (make-object message% (string-constant overwrite) (get-info-panel))] - [define position-canvas (make-object editor-canvas% (get-info-panel) #f '(no-hscroll no-vscroll))] + [define position-canvas (make-object click-pref-editor-canvas% (get-info-panel) #f '(no-hscroll no-vscroll))] [define position-edit (make-object text%)] @@ -912,6 +912,31 @@ (send position-edit hide-caret #t) (send position-edit lock #t))) + (define click-pref-editor-canvas% + (class editor-canvas% + (inherit popup-menu) + (define/override (on-event evt) + (cond + [(send evt button-down? 'right) + (let ([menu (new popup-menu%)] + [line-numbers? (preferences:get 'framework:display-line-numbers)]) + (new checkable-menu-item% + [parent menu] + [label (string-constant show-line-and-column-numbers)] + [callback (λ (x y) (preferences:set 'framework:display-line-numbers #t))] + [checked line-numbers?]) + (new checkable-menu-item% + [parent menu] + [label (string-constant show-character-offsets)] + [callback (λ (x y) (preferences:set 'framework:display-line-numbers #f))] + [checked (not line-numbers?)]) + (popup-menu menu + (+ 1 (send evt get-x)) + (+ 1 (send evt get-y))))] + [else + (super on-event evt)])) + (super-new))) + (define pasteboard-info<%> (interface (info<%>))) (define pasteboard-info-mixin (mixin (basic<%>) (pasteboard-info<%>) diff --git a/collects/string-constants/english-string-constants.ss b/collects/string-constants/english-string-constants.ss index a42354c1ef..2f83c98bb6 100644 --- a/collects/string-constants/english-string-constants.ss +++ b/collects/string-constants/english-string-constants.ss @@ -398,6 +398,8 @@ please adhere to these guidelines: (show-status-line "Show status-line") (count-columns-from-one "Count column numbers from one") (display-line-numbers "Display line numbers in buffer; not character offsets") + (show-line-and-column-numbers "Show line & column numbers") ; used for popup menu; right click on line/column box in bottom of drs window + (show-character-offsets "Show character offsets") ; used for popup menu; right click on line/column box in bottom of drs window (enable-keybindings-in-menus "Enable keybindings in menus") (automatically-to-ps "Automatically print to PostScript file") (option-as-meta "Treat option key as meta") ;; macos/macos x only diff --git a/doc/release-notes/drscheme/HISTORY b/doc/release-notes/drscheme/HISTORY index c0146e440d..02c8f6cf60 100644 --- a/doc/release-notes/drscheme/HISTORY +++ b/doc/release-notes/drscheme/HISTORY @@ -2,6 +2,11 @@ Version 353 ------------------------------ + . right clicking on the line/column offset display in the + bottom part of drscheme's window lets you toggle between + character offsets (from the beginning of the buffer) and + line/column counts. + . user-defined keybindings can now be loaded directly from PLaneT, via a new menu item in the Edit menu.