author | Paul Mackerras <paulus@samba.org> | |
Fri, 17 Oct 2008 11:44:42 +0000 (22:44 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Fri, 17 Oct 2008 11:44:42 +0000 (22:44 +1100) | ||
commit | f2d0bbbd680b2a11cb42eff9a63d6ff03dd4d0e5 | |
tree | 663c17ad2c8569c06efa5d252c2394f71e015e31 | tree | snapshot |
parent | 63767d5fb8fe236d8fdeba44297ac925701b27a0 | commit | diff |
gitk: New way of constructing menus that allows for Alt+letter accelerators
This is inspired by patches from Robin Rosenberg but takes a different
approach. This adds a "makemenu" procedure for constructing menus
that allows the menu layout to be specified in a clear fashion, and
provides one place where the alt+letter accelerators can be detected
and handled.
The alt+letter accelerator is specified by putting an ampersand (&)
before the letter for the accelerator in the menu item name. (Two
ampersands in succession produce one ampersand in the menu item as
it appears on screen.) This is handled in makemenu.
We also add an mca procedure which is like mc but also does the
ampersand translation, for use when we want to refer to a menu item
by name. The mca name and the locations where we use it were
shamelessly stolen from Robin Rosenberg's patch.
This doesn't actually add any alt+letter accelerators yet.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This is inspired by patches from Robin Rosenberg but takes a different
approach. This adds a "makemenu" procedure for constructing menus
that allows the menu layout to be specified in a clear fashion, and
provides one place where the alt+letter accelerators can be detected
and handled.
The alt+letter accelerator is specified by putting an ampersand (&)
before the letter for the accelerator in the menu item name. (Two
ampersands in succession produce one ampersand in the menu item as
it appears on screen.) This is handled in makemenu.
We also add an mca procedure which is like mc but also does the
ampersand translation, for use when we want to refer to a menu item
by name. The mca name and the locations where we use it were
shamelessly stolen from Robin Rosenberg's patch.
This doesn't actually add any alt+letter accelerators yet.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | diff | blob | history |