From 3c578b8dfd002212e96a57386f1829a4ee8e011a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Thu, 3 Mar 2016 11:11:07 +0100 Subject: [PATCH] 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. --- xaw/xoptions.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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*) -- 1.7.0.4