From c222bd4c7101dd33ce5c30adcb2c0539c1bf661e Mon Sep 17 00:00:00 2001
From: David Maciejak <david.maciejak@gmail.com>
Date: Mon, 25 Aug 2014 13:14:34 +0700
Subject: [PATCH] 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.
---
 src/defaults.c | 2 +-
 src/misc.c     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/defaults.c b/src/defaults.c
index 5e305c9..332c0eb 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -567,7 +567,7 @@ WDefaultEntry optionList[] = {
 	    NULL, getColor, setIconTitleBack, NULL, NULL},
 	{"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences,
 	    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},
 	{"FrameBorderWidth", "1", NULL,
 	    NULL, getInt, setFrameBorderWidth, NULL, NULL},
diff --git a/src/misc.c b/src/misc.c
index 572fbe4..3d78c93 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -732,7 +732,6 @@ char *GetShortcutString(const char *shortcut)
 {
 	char *buffer = NULL;
 	char *k;
-	/*    KeySym ksym; */
 	int control = 0;
 	char *tmp, *text;
 
@@ -788,7 +787,7 @@ char *GetShortcutKey(WShortKey key)
 	if (!k) return NULL;
 
 	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 & Mod1Mask)    tmp = wstrappend(tmp, m[2] ? m[2] : "Mod1+");
 	if (key.modifier & Mod2Mask)    tmp = wstrappend(tmp, m[3] ? m[3] : "Mod2+");
-- 
1.8.3.2

