Added GetShortcutKey().
commitcd5382cedf1a48a5d9e5a147fb48d892a4ff44fc
authorIain Patterson <wm@iain.cx>
Wed, 27 Mar 2013 11:58:47 +0000 (27 11:58 +0000)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 28 Mar 2013 18:47:25 +0000 (28 18:47 +0000)
treecf21912aeb49447d45aa49054c1988ca546b3dc6
parent0da2b6e928644a5360aec6ac03540cd747be5060
Added GetShortcutKey().

The function getShortcutString() was defined statically in winmenu.c.

Replace it with the new function GetShortcutKey() which calls the
existing function GetShortcutString() so it can be used elsewhere and
cut down on code duplication.

A result of this change is that shortcuts are now labelled consistently.
Previously the format was different in generated menus, which used, for
example, M1 to refer to Mod1 whereas window menus used the full string
Mod1.  Now both use the shorter form.

One could argue that the new function name is more consistent, as now
GetShortcutString() takes a char * argument and GetShortcutKey() takes a
WShortcutKey argument.  That argument assumes that the original
intention behind the name of GetShortcutString() was not to hint that it
returns a String...
src/funcs.h
src/misc.c
src/winmenu.c