parent
89e06e802f
commit
1975f596b6
|
@ -95,7 +95,7 @@
|
|||
|
||||
(define on? #f)
|
||||
(define/public (highlighting-shown?) on?)
|
||||
|
||||
|
||||
(define report-cache #f)
|
||||
(define/public (add-highlights #:use-cache? [use-cache? #f])
|
||||
(clear-highlights)
|
||||
|
@ -123,7 +123,7 @@
|
|||
(set! highlights '())
|
||||
(send (get-tab) hide-optimization-coach-panel)
|
||||
(set! on? #f))
|
||||
|
||||
|
||||
(define/augment (on-insert start len)
|
||||
(clear-highlights))
|
||||
(define/augment (on-delete start len)
|
||||
|
@ -206,13 +206,13 @@
|
|||
(define tab-switch-mixin
|
||||
(mixin (drracket:unit:frame<%>) ()
|
||||
(inherit set-show-menu-sort-key get-current-tab)
|
||||
|
||||
|
||||
(define/public (get-coach-menu-item) coach-menu-item)
|
||||
|
||||
|
||||
(define/override (add-show-menu-items show-menu)
|
||||
(super add-show-menu-items show-menu)
|
||||
(set! coach-menu-item
|
||||
(new menu-item%
|
||||
(new menu-item%
|
||||
[label (string-constant show-optimization-coach)]
|
||||
[parent show-menu]
|
||||
[demand-callback
|
||||
|
@ -221,21 +221,21 @@
|
|||
(if (get-field panel (get-current-tab))
|
||||
(string-constant hide-optimization-coach)
|
||||
(string-constant show-optimization-coach))))]
|
||||
[callback
|
||||
[callback
|
||||
(λ (a b)
|
||||
(define tab (get-current-tab))
|
||||
(if (get-field panel tab)
|
||||
(send (send tab get-defs) clear-highlights)
|
||||
(optimization-coach-callback this)))]))
|
||||
(set-show-menu-sort-key coach-menu-item 403))
|
||||
|
||||
|
||||
(define/augment (on-tab-change old-tab new-tab)
|
||||
(send old-tab hide-optimization-coach-panel #f) ; don't close it
|
||||
(when (get-field panel new-tab) ; if it was open before
|
||||
(send new-tab show-optimization-coach-panel)))
|
||||
|
||||
|
||||
(define coach-menu-item #f)
|
||||
|
||||
|
||||
(super-new)))
|
||||
|
||||
(drracket:get/extend:extend-unit-frame tab-switch-mixin))
|
||||
|
|
Loading…
Reference in New Issue
Block a user