Revert "Be wary that the default-shortcut-prefix might be"

This reverts commit 47b1195502.
This commit is contained in:
Ryan Culpepper 2014-01-03 18:07:49 -05:00
parent 1018b83f0f
commit 0cfeae7a30
2 changed files with 21 additions and 41 deletions

View File

@ -730,15 +730,14 @@
(send item enable (and frame (> (length (send frame get-tabs)) 1)))))])
(group:add-to-windows-menu
(λ (windows-menu)
(define shortcut? (not (equal? 'shift (get-default-shortcut-prefix))))
(define sprefix (if (eq? (system-type) 'windows)
(cons 'shift (get-default-shortcut-prefix))
(get-default-shortcut-prefix)))
(new menu-item%
[parent windows-menu]
[label (string-constant prev-tab)]
[shortcut (and shortcut? #\[)]
[shortcut-prefix (if shortcut? sprefix (get-default-shortcut-prefix))]
[shortcut #\[]
[shortcut-prefix sprefix]
[demand-callback dc]
[callback (λ (item _)
(let ([frame (find-frame item)])
@ -755,21 +754,18 @@
(when frame
(send frame next-tab))))])
(define-values (mprefix use-shortcut?)
(case (system-type)
[(windows unix)
(if (equal? (get-default-shortcut-prefix) 'ctl)
(values (list* 'alt 'shift (get-default-shortcut-prefix)) #f)
(values (get-default-shortcut-prefix) #t))]
[(macosx)
(values (cons 'option (get-default-shortcut-prefix)) #t)]))
(define mprefix (case (system-type)
[(windows unix)
(list* 'alt 'shift (get-default-shortcut-prefix))]
[(macosx)
(list* 'option (get-default-shortcut-prefix))]))
(new menu-item%
[parent windows-menu]
[label (string-constant move-current-tab-right)]
[demand-callback dc]
[shortcut-prefix mprefix]
[shortcut (and use-shortcut? #\])]
[shortcut-prefix mprefix]
[shortcut #\]]
[callback (λ (item _)
(let ([frame (find-frame item)])
(when frame
@ -779,8 +775,8 @@
[parent windows-menu]
[label (string-constant move-current-tab-left)]
[demand-callback dc]
[shortcut-prefix mprefix]
[shortcut (and shortcut? #\[)]
[shortcut-prefix mprefix]
[shortcut #\[]
[callback (λ (item _)
(let ([frame (find-frame item)])
(when frame

View File

@ -3370,12 +3370,8 @@
(λ (mi) (send mi set-label (if (send resizable-panel get-vertical?)
(string-constant use-horizontal-layout)
(string-constant use-vertical-layout))))]
[shortcut (if (member 'shift (get-default-shortcut-prefix))
#f
#\l)]
[shortcut-prefix (if (member 'shift (get-default-shortcut-prefix))
(get-default-shortcut-prefix)
(cons 'shift (get-default-shortcut-prefix)))])])
[shortcut #\l]
[shortcut-prefix (cons 'shift (get-default-shortcut-prefix))])])
(set-show-menu-sort-key layout-item 103))
(let ([overview-menu-item
@ -3518,16 +3514,10 @@
(demand-callback (λ (item) (split-demand item))))]
[collapse
(new menu:can-restore-menu-item%
(shortcut (if (or (equal? (system-type) 'macosx)
(member 'shift (get-default-shortcut-prefix)))
#f
#\m))
(shortcut-prefix (cond
[(or (equal? (system-type) 'macosx)
(member 'shift (get-default-shortcut-prefix)))
(get-default-shortcut-prefix)]
[else
(cons 'shift (get-default-shortcut-prefix))]))
(shortcut (if (eq? (system-type) 'macosx) #f #\m))
(shortcut-prefix (if (eq? (system-type) 'macosx)
(get-default-shortcut-prefix)
(cons 'shift (get-default-shortcut-prefix))))
(label (string-constant collapse-menu-item-label))
(parent (get-show-menu))
(callback (λ (x y) (collapse)))
@ -3768,10 +3758,8 @@
(lambda (file-menu)
(new menu:can-restore-menu-item%
[label (string-constant open-collection-path)]
[shortcut (if (member 'shift (get-default-shortcut-prefix)) #f #\o)]
[shortcut-prefix (if (member 'shift (get-default-shortcut-prefix))
(get-default-shortcut-prefix)
(cons 'shift (get-default-shortcut-prefix)))]
[shortcut #\o]
[shortcut-prefix (cons 'shift (get-default-shortcut-prefix))]
[parent file-menu]
[callback
(λ (x y)
@ -3874,12 +3862,8 @@
label)
(new menu:can-restore-checkable-menu-item%
[label label]
[shortcut (if (member 'shift (get-default-shortcut-prefix))
#f
shortcut)]
[shortcut-prefix (if (member 'shift (get-default-shortcut-prefix))
(get-default-shortcut-prefix)
(cons 'shift (get-default-shortcut-prefix)))]
[shortcut shortcut]
[shortcut-prefix (cons 'shift (get-default-shortcut-prefix))]
[parent edit-menu]
[demand-callback
(λ (item)