From: Dana Jansens Date: Wed, 26 Mar 2003 00:22:10 +0000 (+0000) Subject: case insensitive X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=4f2696d3ef4a842257aa2dd246c0e12d505a2adb;p=chaz%2Fopenbox case insensitive --- diff --git a/plugins/keyboard/translate.c b/plugins/keyboard/translate.c index 9de898e6..d1fdc58d 100644 --- a/plugins/keyboard/translate.c +++ b/plugins/keyboard/translate.c @@ -4,13 +4,17 @@ static guint translate_modifier(char *str) { - if (!strcmp("Mod1", str) || !strcmp("A", str)) return Mod1Mask; - else if (!strcmp("Mod2", str)) return Mod2Mask; - else if (!strcmp("Mod3", str)) return Mod3Mask; - else if (!strcmp("Mod4", str) || !strcmp("W", str)) return Mod4Mask; - else if (!strcmp("Mod5", str)) return Mod5Mask; - else if (!strcmp("Control", str) || !strcmp("C", str)) return ControlMask; - else if (!strcmp("Shift", str) || !strcmp("S", str)) return ShiftMask; + if (!g_ascii_strcasecmp("Mod1", str) || + !g_ascii_strcasecmp("A", str)) return Mod1Mask; + else if (!g_ascii_strcasecmp("Mod2", str)) return Mod2Mask; + else if (!g_ascii_strcasecmp("Mod3", str)) return Mod3Mask; + else if (!g_ascii_strcasecmp("Mod4", str) || + !g_ascii_strcasecmp("W", str)) return Mod4Mask; + else if (!g_ascii_strcasecmp("Mod5", str)) return Mod5Mask; + else if (!g_ascii_strcasecmp("Control", str) || + !g_ascii_strcasecmp("C", str)) return ControlMask; + else if (!g_ascii_strcasecmp("Shift", str) || + !g_ascii_strcasecmp("S", str)) return ShiftMask; g_warning("Invalid modifier '%s' in binding.", str); return 0; }