Skip to content

Commit d99b4b0

Browse files
Oblomovpaulusmack
authored andcommitted
gitk: Accelerators for the main menu
This allows fast, keyboard-only usage of the menu (e.g. Alt+V, N to open a new view). Signed-off-by: Giuseppe Bilotta <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent b6f92a8 commit d99b4b0

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

gitk

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,47 +2065,47 @@ proc makewindow {} {
20652065
# The "mc" arguments here are purely so that xgettext
20662066
# sees the following string as needing to be translated
20672067
set file {
2068-
mc "File" cascade {
2069-
{mc "Update" command updatecommits -accelerator F5}
2070-
{mc "Reload" command reloadcommits -accelerator Shift-F5}
2071-
{mc "Reread references" command rereadrefs}
2072-
{mc "List references" command showrefs -accelerator F2}
2068+
mc "&File" cascade {
2069+
{mc "&Update" command updatecommits -accelerator F5}
2070+
{mc "&Reload" command reloadcommits -accelerator Shift-F5}
2071+
{mc "Reread re&ferences" command rereadrefs}
2072+
{mc "&List references" command showrefs -accelerator F2}
20732073
{xx "" separator}
2074-
{mc "Start git gui" command {exec git gui &}}
2074+
{mc "Start git &gui" command {exec git gui &}}
20752075
{xx "" separator}
2076-
{mc "Quit" command doquit -accelerator Meta1-Q}
2076+
{mc "&Quit" command doquit -accelerator Meta1-Q}
20772077
}}
20782078
set edit {
2079-
mc "Edit" cascade {
2080-
{mc "Preferences" command doprefs}
2079+
mc "&Edit" cascade {
2080+
{mc "&Preferences" command doprefs}
20812081
}}
20822082
set view {
2083-
mc "View" cascade {
2084-
{mc "New view..." command {newview 0} -accelerator Shift-F4}
2085-
{mc "Edit view..." command editview -state disabled -accelerator F4}
2086-
{mc "Delete view" command delview -state disabled}
2083+
mc "&View" cascade {
2084+
{mc "&New view..." command {newview 0} -accelerator Shift-F4}
2085+
{mc "&Edit view..." command editview -state disabled -accelerator F4}
2086+
{mc "&Delete view" command delview -state disabled}
20872087
{xx "" separator}
2088-
{mc "All files" radiobutton {selectedview 0} -command {showview 0}}
2088+
{mc "&All files" radiobutton {selectedview 0} -command {showview 0}}
20892089
}}
20902090
if {[tk windowingsystem] ne "aqua"} {
20912091
set help {
2092-
mc "Help" cascade {
2093-
{mc "About gitk" command about}
2094-
{mc "Key bindings" command keys}
2092+
mc "&Help" cascade {
2093+
{mc "&About gitk" command about}
2094+
{mc "&Key bindings" command keys}
20952095
}}
20962096
set bar [list $file $edit $view $help]
20972097
} else {
20982098
proc ::tk::mac::ShowPreferences {} {doprefs}
20992099
proc ::tk::mac::Quit {} {doquit}
21002100
lset file end [lreplace [lindex $file end] end-1 end]
21012101
set apple {
2102-
xx "Apple" cascade {
2103-
{mc "About gitk" command about}
2102+
xx "&Apple" cascade {
2103+
{mc "&About gitk" command about}
21042104
{xx "" separator}
21052105
}}
21062106
set help {
2107-
mc "Help" cascade {
2108-
{mc "Key bindings" command keys}
2107+
mc "&Help" cascade {
2108+
{mc "&Key bindings" command keys}
21092109
}}
21102110
set bar [list $apple $file $view $help]
21112111
}
@@ -4468,8 +4468,8 @@ proc showview {n} {
44684468

44694469
set curview $n
44704470
set selectedview $n
4471-
.bar.view entryconf [mca "Edit view..."] -state [expr {$n == 0? "disabled": "normal"}]
4472-
.bar.view entryconf [mca "Delete view"] -state [expr {$n == 0? "disabled": "normal"}]
4471+
.bar.view entryconf [mca "&Edit view..."] -state [expr {$n == 0? "disabled": "normal"}]
4472+
.bar.view entryconf [mca "&Delete view"] -state [expr {$n == 0? "disabled": "normal"}]
44734473

44744474
run refill_reflist
44754475
if {![info exists viewcomplete($n)]} {

0 commit comments

Comments
 (0)