update the show line numbers menu option when it is selected
This commit is contained in:
parent
a9b9f0c0de
commit
9755d565bd
|
@ -1452,7 +1452,7 @@ module browser threading seems wrong.
|
|||
(preferences:get 'drracket:show-line-numbers?))
|
||||
|
||||
(define/public (show-line-numbers! show)
|
||||
(re-initialize-definitions-canvas))
|
||||
(re-initialize-definitions-canvas show))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
|
@ -2797,10 +2797,9 @@ module browser threading seems wrong.
|
|||
(with-line-numbers)
|
||||
(without-line-numbers)))
|
||||
|
||||
(define/private (re-initialize-definitions-canvas)
|
||||
(define/private (re-initialize-definitions-canvas show)
|
||||
(begin-container-sequence)
|
||||
(set! definitions-canvas (create-definitions-canvas
|
||||
(show-line-numbers?)))
|
||||
(set! definitions-canvas (create-definitions-canvas show))
|
||||
(set! definitions-canvases (list definitions-canvas))
|
||||
(update-shown)
|
||||
(send (send definitions-canvas get-editor) update-numbers)
|
||||
|
@ -3913,10 +3912,16 @@ module browser threading seems wrong.
|
|||
(register-capability-menu-item 'drscheme:special:insert-lambda insert-menu))
|
||||
|
||||
(new menu:can-restore-menu-item%
|
||||
[label (string-constant show-line-numbers)]
|
||||
[label (if (show-line-numbers?)
|
||||
(string-constant hide-line-numbers)
|
||||
(string-constant show-line-numbers))]
|
||||
[parent (get-show-menu)]
|
||||
[callback (lambda (x y)
|
||||
[callback (lambda (self event)
|
||||
(define value (preferences:get 'drracket:show-line-numbers?))
|
||||
(send self set-label
|
||||
(if value
|
||||
(string-constant show-line-numbers)
|
||||
(string-constant hide-line-numbers)))
|
||||
(preferences:set 'drracket:show-line-numbers? (not value))
|
||||
(show-line-numbers! (not value)))])
|
||||
|
||||
|
|
|
@ -448,7 +448,8 @@ please adhere to these guidelines:
|
|||
(show-interactions-on-execute "Automatically open interactions window when running a program")
|
||||
(switch-to-module-language-automatically "Automatically switch to the module language when opening a module")
|
||||
(interactions-beside-definitions "Put the interactions window beside the definitions window") ;; in preferences, below the checkbox one line above this one
|
||||
(show-line-numbers "Show line numbers next to the definitions window")
|
||||
(show-line-numbers "Show line numbers")
|
||||
(hide-line-numbers "Hide line numbers")
|
||||
(limit-interactions-size "Limit interactions size")
|
||||
(background-color "Background Color")
|
||||
(default-text-color "Default text") ;; used for configuring colors, but doesn't need the word "color"
|
||||
|
|
Loading…
Reference in New Issue
Block a user