From: H.G.Muller Date: Tue, 20 Jan 2015 11:02:19 +0000 (+0100) Subject: Define mnemonics for main menu bar X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=7304138955ef81f821e739b772cdce89509f518d;p=xboard.git Define mnemonics for main menu bar --- diff --git a/dialogs.c b/dialogs.c index e932247..c58c3d0 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2476,14 +2476,14 @@ CCB (int n) Option mainOptions[] = { // description of main window in terms of generic dialog creator { 0, 0xCA, 0, NULL, NULL, "", NULL, BarBegin, "" }, // menu bar - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("File") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Edit") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("View") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Mode") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Action") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Engine") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Options") }, - { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("Help") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_File") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_Edit") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_View") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_Mode") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_Action") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("E_ngine") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_Options") }, + { 0, COMBO_CALLBACK, 0, NULL, (void*)&MenuCallback, NULL, NULL, DropDown, N_("_Help") }, { 0, 0, 0, NULL, (void*)&SizeKludge, "", NULL, BarEnd, "" }, { 0, LR|T2T|BORDER|SAME_ROW, 0, NULL, NULL, NULL, NULL, Label, "1" }, // optional title in window { 50, LL|TT, 100, NULL, (void*) &LogoW, NULL, NULL, Skip, "" }, // white logo diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 27a6a57..ccc7588 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1571,7 +1571,7 @@ if(appData.debugMode) printf("n=%d, h=%d, w=%d\n",n,height,width); // XtSetArg(args[j], XtNmenuName, XtNewString(option[i].name)); j++; // XtSetArg(args[j], XtNlabel, msg); j++; option[i].handle = (void*) - (menuButton = gtk_menu_item_new_with_label(msg)); + (menuButton = gtk_menu_item_new_with_mnemonic(msg)); gtk_widget_show(menuButton); option[i].textValue = (char*) (menu = CreateMenuPopup(option + i, i + 256*dlgNr, -1)); gtk_menu_item_set_submenu(GTK_MENU_ITEM (menuButton), menu);