summaryrefslogtreecommitdiff
path: root/openbox/menu.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2009-07-05 22:27:25 +0200
committerMikael Magnusson <mikachu@gmail.com>2009-09-19 15:03:12 +0200
commit308478e4a5f4dc76d69395dda8a9bc42cb69eec4 (patch)
tree54ec31d91428b2a7d3e4c7bdf902fe182abfc25d /openbox/menu.c
parent3f72b9d67f21781e513a9c058e8624b8b86b92ea (diff)
parentba1ac214dfdbc0539c922e84c2318c1bf2566c0c (diff)
Merge branch 'backport' into work
Conflicts: openbox/actions/desktop.c openbox/client.c openbox/event.c openbox/extensions.c openbox/popup.c openbox/screen.c parser/parse.c
Diffstat (limited to 'openbox/menu.c')
-rw-r--r--openbox/menu.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index f7d50e39..3e45fb93 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -232,10 +232,13 @@ static gunichar parse_shortcut(const gchar *label, gboolean allow_shortcut,
/* you have to use a printable ascii character for shortcuts
don't allow space either, so you can have like "a _ b"
*/
- if (VALID_SHORTCUT(*(i+1))) {
- shortcut = g_unichar_tolower(g_utf8_get_char(i+1));
- *position = i - *strippedlabel;
- *always_show = TRUE;
+ if (VALID_SHORTCUT(*(i+1)) || *(i+1) == '_') {
+ /* Allow you to escape the first _ by putting __ */
+ if (*(i+1) != '_') {
+ shortcut = g_unichar_tolower(g_utf8_get_char(i+1));
+ *position = i - *strippedlabel;
+ *always_show = TRUE;
+ }
/* remove the '_' from the string */
for (; *i != '\0'; ++i)