X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fmenu.c;h=58b6280e5d6c4939a775d6bfcc08bb39d806c176;hb=cf033623a0f5519a42d13119db5e023ffe08a1ac;hp=0c10b757e5ce95b9ff0d56da0d8ca6961568c775;hpb=2cb31da22c0a357a2251aabc660e0cc14b215d97;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index 0c10b757..58b6280e 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -62,7 +62,6 @@ static gunichar parse_shortcut(const gchar *label, gboolean allow_shortcut, gchar **strippedlabel, guint *position, gboolean *always_show); - static void client_dest(ObClient *client, gpointer data) { /* menus can be associated with a client, so close any that are since @@ -233,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)