mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
wmaker: fix control shortcut label in window menu
This patch is fixing the shortcut label used in window menu. As now when a 'control' shortcut was used, the label displayed was 'bug' cause GetShortcutString fct which is calling wXModifierFromKey fct was waiting for a 'Control' static string not the default one set to 'Ctrl' string.
This commit is contained in:
committed by
Carlos R. Mafra
parent
371818fe36
commit
9cb4388180
@@ -567,7 +567,7 @@ WDefaultEntry optionList[] = {
|
|||||||
NULL, getColor, setIconTitleBack, NULL, NULL},
|
NULL, getColor, setIconTitleBack, NULL, NULL},
|
||||||
{"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences,
|
{"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences,
|
||||||
NULL, getPropList, setSwPOptions, NULL, NULL},
|
NULL, getPropList, setSwPOptions, NULL, NULL},
|
||||||
{"ModifierKeyLabels", "(\"Shift+\", \"Ctrl+\", \"Mod1+\", \"Mod2+\", \"Mod3+\", \"Mod4+\", \"Mod5+\")", &wPreferences,
|
{"ModifierKeyLabels", "(\"Shift+\", \"Control+\", \"Mod1+\", \"Mod2+\", \"Mod3+\", \"Mod4+\", \"Mod5+\")", &wPreferences,
|
||||||
NULL, getPropList, setModifierKeyLabels, NULL, NULL},
|
NULL, getPropList, setModifierKeyLabels, NULL, NULL},
|
||||||
{"FrameBorderWidth", "1", NULL,
|
{"FrameBorderWidth", "1", NULL,
|
||||||
NULL, getInt, setFrameBorderWidth, NULL, NULL},
|
NULL, getInt, setFrameBorderWidth, NULL, NULL},
|
||||||
|
|||||||
@@ -732,7 +732,6 @@ char *GetShortcutString(const char *shortcut)
|
|||||||
{
|
{
|
||||||
char *buffer = NULL;
|
char *buffer = NULL;
|
||||||
char *k;
|
char *k;
|
||||||
/* KeySym ksym; */
|
|
||||||
int control = 0;
|
int control = 0;
|
||||||
char *tmp, *text;
|
char *tmp, *text;
|
||||||
|
|
||||||
@@ -788,7 +787,7 @@ char *GetShortcutKey(WShortKey key)
|
|||||||
if (!k) return NULL;
|
if (!k) return NULL;
|
||||||
|
|
||||||
char **m = wPreferences.modifier_labels;
|
char **m = wPreferences.modifier_labels;
|
||||||
if (key.modifier & ControlMask) tmp = wstrappend(tmp, m[1] ? m[1] : "Ctrl+");
|
if (key.modifier & ControlMask) tmp = wstrappend(tmp, m[1] ? m[1] : "Control+");
|
||||||
if (key.modifier & ShiftMask) tmp = wstrappend(tmp, m[0] ? m[0] : "Shift+");
|
if (key.modifier & ShiftMask) tmp = wstrappend(tmp, m[0] ? m[0] : "Shift+");
|
||||||
if (key.modifier & Mod1Mask) tmp = wstrappend(tmp, m[2] ? m[2] : "Mod1+");
|
if (key.modifier & Mod1Mask) tmp = wstrappend(tmp, m[2] ? m[2] : "Mod1+");
|
||||||
if (key.modifier & Mod2Mask) tmp = wstrappend(tmp, m[3] ? m[3] : "Mod2+");
|
if (key.modifier & Mod2Mask) tmp = wstrappend(tmp, m[3] ? m[3] : "Mod2+");
|
||||||
|
|||||||
Reference in New Issue
Block a user