add a menu item to put the interactions window beside/below the definitions window

This commit is contained in:
Robby Findler 2011-10-29 20:52:01 -05:00
parent d9b9cbe16a
commit e362888d6d
2 changed files with 26 additions and 0 deletions

View File

@ -3100,6 +3100,30 @@ module browser threading seems wrong.
#\e
(string-constant interactions-menu-item-help-string)))
(new menu:can-restore-menu-item%
[label (string-constant put-interactions-beside-definitions)]
[parent (get-show-menu)]
[callback (λ (x y)
(define vertical? (send resizable-panel get-vertical?))
(preferences:set 'drracket:defs/ints-horizontal vertical?)
(send resizable-panel set-orientation vertical?)
(define update-shown? (or (not interactions-shown?)
(not definitions-shown?)))
(unless interactions-shown?
(toggle-show/hide-interactions))
(unless definitions-shown?
(toggle-show/hide-definitions))
(when update-shown?
(update-shown)))]
[demand-callback
(λ (mi) (send mi set-label (if (send resizable-panel get-vertical?)
(string-constant put-interactions-beside-definitions)
(string-constant put-interactions-below-definitions))))]
[shortcut #\d]
[shortcut-prefix (cons 'shift (get-default-shortcut-prefix))])
(new separator-menu-item% [parent (get-show-menu)])
(new menu:can-restore-menu-item%
(shortcut #\u)
(label

View File

@ -906,6 +906,8 @@ please adhere to these guidelines:
(definitions-menu-item-help-string "Show/Hide the definitions window")
(show-interactions-menu-item-label "Show &Interactions")
(hide-interactions-menu-item-label "Hide &Interactions")
(put-interactions-beside-definitions "Put the Interactions Window Beside the Definitions Window")
(put-interactions-below-definitions "Put the Interactions Window Below the Definitions Window")
(interactions-menu-item-help-string "Show/Hide the interactions window")
(toolbar "Toolbar")
(toolbar-on-top "Toolbar On Top")