From: H.G.Muller Date: Thu, 3 Mar 2016 10:11:07 +0000 (+0100) Subject: Suppress underscores in Xaw menus X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3c578b8dfd002212e96a57386f1829a4ee8e011a;p=xboard.git Suppress underscores in Xaw menus The underscores that indicate shortcut keys in GTK menu items were showing up in the Xaw menus. Now we remove them when creating the menu button. --- diff --git a/xaw/xoptions.c b/xaw/xoptions.c index dbe92c8..021da53 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -1225,6 +1225,11 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent 0 /* w */, 0 /* h */, 1 /* chain (always on same row) */); forelast = lastrow; msg = _(option[i].name); // write name on the menu button + if(msg) { if(*msg == '_') msg++; else if(msg[1] == '_') { // kludge to remove GTK shortkut-key indicators + static char buf[MSG_SIZ]; + strncpy(buf, msg, MSG_SIZ); msg = buf + 1; + *msg = *buf; + }} XtSetArg(args[j], XtNmenuName, XtNewString(option[i].name)); j++; XtSetArg(args[j], XtNlabel, msg); j++; option[i].handle = (void*)