added overwrite mode menu item

svn: r12916
This commit is contained in:
Robby Findler 2008-12-20 22:56:29 +00:00
parent 5cc3b529a0
commit 76fc27813a
2 changed files with 19 additions and 2 deletions

View File

@ -3082,7 +3082,7 @@ module browser threading seems wrong.
(define/override (edit-menu:between-find-and-preferences edit-menu)
(super edit-menu:between-find-and-preferences edit-menu)
(new menu-item%
(new menu:can-restore-menu-item%
[label (string-constant complete-word)]
[shortcut #\/]
[parent edit-menu]
@ -3096,6 +3096,21 @@ module browser threading seems wrong.
(send (get-edit-target-object) auto-complete))])
(add-modes-submenu edit-menu))
(define/override (edit-menu:between-select-all-and-find edit-menu)
(new menu:can-restore-checkable-menu-item%
[label (string-constant overwrite-mode)]
[parent edit-menu]
[demand-callback
(λ (mi)
(let ([target (get-edit-target-object)])
(send mi enable (get-edit-target-object))
(send mi check (and target (send target get-overwrite-mode)))))]
[callback (λ (x y)
(let ([target (get-edit-target-object)])
(send target set-overwrite-mode
(not (send target get-overwrite-mode)))))])
(super edit-menu:between-select-all-and-find edit-menu))
;; capability-menu-items : hash-table[menu -o> (listof (list menu-item number key)))
(define capability-menu-items (make-hasheq))
(define/public (register-capability-menu-item key menu)

View File

@ -676,6 +676,8 @@ please adhere to these guidelines:
(complete-word "Complete Word") ; the complete word menu item in the edit menu
(no-completions "... no completions available") ; shows up in the completions menu when there are no completions (in italics)
(overwrite-mode "Overwrite Mode")
(preferences-info "Configure your preferences")
(preferences-menu-item "Preferences...")
@ -845,7 +847,7 @@ please adhere to these guidelines:
(close-tab "Close Tab") ;; must not have any &s in it.
(close-tab-amp "&Close Tab") ;; like close-tab, but with an ampersand on the same letter as the one in close-menu-item
;;; edit-menu
;;; edit menu
(split-menu-item-label "&Split")
(collapse-menu-item-label "C&ollapse")