From: H.G. Muller Date: Tue, 30 Nov 2010 11:22:32 +0000 (+0100) Subject: Write key bindings in XBoard menus X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1ffdc739280a7ea84cc1df3697cf40756795eb82;p=xboard.git Write key bindings in XBoard menus Unfortunately tabs are not understood in menu texts, so fine-tuning through spaces is necessary to get some sort of ragged alignment. --- diff --git a/xboard.c b/xboard.c index 14dac2c..036e7e8 100644 --- a/xboard.c +++ b/xboard.c @@ -592,12 +592,12 @@ static Pixmap xpmMask[BlackKing + 1]; SizeDefaults sizeDefaults[] = SIZE_DEFAULTS; MenuItem fileMenu[] = { - {N_("New Game"), "New Game", ResetProc}, - {N_("New Shuffle Game ..."), "New Shuffle Game", ShuffleMenuProc}, - {N_("New Variant ..."), "New Variant", NewVariantProc}, // [HGM] variant: not functional yet + {N_("New Game Ctrl+N"), "New Game", ResetProc}, + {N_("New Shuffle Game ..."), "New Shuffle Game", ShuffleMenuProc}, + {N_("New Variant ... Alt+Shift+V"), "New Variant", NewVariantProc}, // [HGM] variant: not functional yet {"----", NULL, NothingProc}, - {N_("Load Game"), "Load Game", LoadGameProc}, - {N_("Load Position"), "Load Position", LoadPositionProc}, + {N_("Load Game Ctrl+O"), "Load Game", LoadGameProc}, + {N_("Load Position Ctrl+Shift+O"), "Load Position", LoadPositionProc}, // {N_("Load Next Game"), "Load Next Game", LoadNextGameProc}, // {N_("Load Previous Game"), "Load Previous Game", LoadPrevGameProc}, // {N_("Reload Same Game"), "Reload Same Game", ReloadGameProc}, @@ -605,47 +605,46 @@ MenuItem fileMenu[] = { // {N_("Load Next Position"), "Load Next Position", LoadNextPositionProc}, // {N_("Load Previous Position"), "Load Previous Position", LoadPrevPositionProc}, // {N_("Reload Same Position"), "Reload Same Position", ReloadPositionProc}, - {N_("Save Game"), "Save Game", SaveGameProc}, - {N_("Save Position"), "Save Position", SavePositionProc}, + {N_("Save Game Ctrl+S"), "Save Game", SaveGameProc}, + {N_("Save Position Ctrl+Shift+S"), "Save Position", SavePositionProc}, {"----", NULL, NothingProc}, {N_("Mail Move"), "Mail Move", MailMoveProc}, {N_("Reload CMail Message"), "Reload CMail Message", ReloadCmailMsgProc}, {"----", NULL, NothingProc}, - {N_("Exit"), "Exit", QuitProc}, + {N_("Quit Ctr+Q"), "Exit", QuitProc}, {NULL, NULL, NULL} }; MenuItem editMenu[] = { - {N_("Copy Game"), "Copy Game", CopyGameProc}, - {N_("Copy Position"), "Copy Position", CopyPositionProc}, + {N_("Copy Game Ctrl+C"), "Copy Game", CopyGameProc}, + {N_("Copy Position Ctrl+Shift+C"), "Copy Position", CopyPositionProc}, {"----", NULL, NothingProc}, - {N_("Paste Game"), "Paste Game", PasteGameProc}, - {N_("Paste Position"), "Paste Position", PastePositionProc}, + {N_("Paste Game Ctrl+V"), "Paste Game", PasteGameProc}, + {N_("Paste Position Ctrl+Shift+V"), "Paste Position", PastePositionProc}, {"----", NULL, NothingProc}, - {N_("Edit Game"), "Edit Game", EditGameProc}, - {N_("Edit Position"), "Edit Position", EditPositionProc}, + {N_("Edit Game Ctrl+E"), "Edit Game", EditGameProc}, + {N_("Edit Position Ctrl+Shift+E"), "Edit Position", EditPositionProc}, + {N_("Edit Tags"), "Edit Tags", EditTagsProc}, + {N_("Edit Comment"), "Edit Comment", EditCommentProc}, {"----", NULL, NothingProc}, - {N_("Edit Tags"), "Edit Tags", EditTagsProc}, - {N_("Edit Comment"), "Edit Comment", EditCommentProc}, + {N_("Revert Home"), "Revert", RevertProc}, + {N_("Annotate"), "Annotate", AnnotateProc}, + {N_("Truncate Game End"), "Truncate Game", TruncateGameProc}, {"----", NULL, NothingProc}, - {N_("Revert"), "Revert", RevertProc}, - {N_("Annotate"), "Annotate", AnnotateProc}, - {N_("Truncate Game"), "Truncate Game", TruncateGameProc}, - {"----", NULL, NothingProc}, - {N_("Backward"), "Backward", BackwardProc}, - {N_("Forward"), "Forward", ForwardProc}, - {N_("Back to Start"), "Back to Start", ToStartProc}, - {N_("Forward to End"), "Forward to End", ToEndProc}, + {N_("Backward Alt+Left"), "Backward", BackwardProc}, + {N_("Forward Alt+Right"), "Forward", ForwardProc}, + {N_("Back to Start Alt+Home"), "Back to Start", ToStartProc}, + {N_("Forward to End Alt+End"), "Forward to End", ToEndProc}, {NULL, NULL, NULL} }; MenuItem viewMenu[] = { - {N_("Flip View"), "Flip View", FlipViewProc}, + {N_("Flip View F2"), "Flip View", FlipViewProc}, {"----", NULL, NothingProc}, - {N_("Engine Output"), "Show Engine Output", EngineOutputProc}, - {N_("Evaluation Graph"), "Show Evaluation Graph", EvalGraphProc}, - {N_("Game List"), "Show Game List", ShowGameListProc}, - {N_("Move History"), "Show Move History", HistoryShowProc}, // [HGM] hist: activate 4.2.7 code + {N_("Engine Output Alt+Shift+O"), "Show Engine Output", EngineOutputProc}, + {N_("Move History Alt+Shift+H"), "Show Move History", HistoryShowProc}, // [HGM] hist: activate 4.2.7 code + {N_("Evaluation Graph Alt+Shift+E"), "Show Evaluation Graph", EvalGraphProc}, + {N_("Game List Alt+Shift+G"), "Show Game List", ShowGameListProc}, {"----", NULL, NothingProc}, {N_("Tags"), "Show Tags", EditTagsProc}, {N_("Comments"), "Show Comments", EditCommentProc}, @@ -654,33 +653,33 @@ MenuItem viewMenu[] = { }; MenuItem modeMenu[] = { - {N_("Machine White"), "Machine White", MachineWhiteProc}, - {N_("Machine Black"), "Machine Black", MachineBlackProc}, - {N_("Two Machines"), "Two Machines", TwoMachinesProc}, - {N_("Analysis Mode"), "Analysis Mode", AnalyzeModeProc}, - {N_("Analyze File"), "Analyze File", AnalyzeFileProc }, - {N_("Edit Game"), "Edit Game", EditGameProc}, - {N_("Edit Position"), "Edit Position", EditPositionProc}, + {N_("Machine White Ctrl+W"), "Machine White", MachineWhiteProc}, + {N_("Machine Black Ctrl+B"), "Machine Black", MachineBlackProc}, + {N_("Two Machines Ctrl+T"), "Two Machines", TwoMachinesProc}, + {N_("Analysis Mode Ctrl+A"), "Analysis Mode", AnalyzeModeProc}, + {N_("Analyze File Ctrl+F"), "Analyze File", AnalyzeFileProc }, + {N_("Edit Game Ctrl+E"), "Edit Game", EditGameProc}, + {N_("Edit Position Ctrl+Shift+E"), "Edit Position", EditPositionProc}, {N_("Training"), "Training", TrainingProc}, {N_("ICS Client"), "ICS Client", IcsClientProc}, {"----", NULL, NothingProc}, - {N_("Pause"), "Pause", PauseProc}, + {N_("Pause Pause"), "Pause", PauseProc}, {NULL, NULL, NULL} }; MenuItem actionMenu[] = { - {N_("Accept"), "Accept", AcceptProc}, - {N_("Decline"), "Decline", DeclineProc}, - {N_("Rematch"), "Rematch", RematchProc}, + {N_("Accept F3"), "Accept", AcceptProc}, + {N_("Decline F4"), "Decline", DeclineProc}, + {N_("Rematch F12"), "Rematch", RematchProc}, {"----", NULL, NothingProc}, - {N_("Call Flag"), "Call Flag", CallFlagProc}, - {N_("Draw"), "Draw", DrawProc}, - {N_("Adjourn"), "Adjourn", AdjournProc}, - {N_("Abort"), "Abort", AbortProc}, - {N_("Resign"), "Resign", ResignProc}, + {N_("Call Flag F5"), "Call Flag", CallFlagProc}, + {N_("Draw F6"), "Draw", DrawProc}, + {N_("Adjourn F7"), "Adjourn", AdjournProc}, + {N_("Abort F8"),"Abort", AbortProc}, + {N_("Resign F9"), "Resign", ResignProc}, {"----", NULL, NothingProc}, - {N_("Stop Observing"), "Stop Observing", StopObservingProc}, - {N_("Stop Examining"), "Stop Examining", StopExaminingProc}, + {N_("Stop Observing F10"), "Stop Observing", StopObservingProc}, + {N_("Stop Examining F11"), "Stop Examining", StopExaminingProc}, {N_("Upload to Examine"), "Upload to Examine", UploadProc}, {"----", NULL, NothingProc}, {N_("Adjudicate to White"), "Adjudicate to White", AdjuWhiteProc}, @@ -693,22 +692,22 @@ MenuItem engineMenu[] = { {N_("Engine #1 Settings ..."), "Engine #1 Settings", FirstSettingsProc}, {N_("Engine #2 Settings ..."), "Engine #2 Settings", SecondSettingsProc}, {"----", NULL, NothingProc}, - {N_("Move Now"), "Move Now", MoveNowProc}, - {N_("Retract Move"), "Retract Move", RetractMoveProc}, + {N_("Move Now Ctrl+M"), "Move Now", MoveNowProc}, + {N_("Retract Move Ctrl+X"), "Retract Move", RetractMoveProc}, {NULL, NULL, NULL} }; MenuItem optionsMenu[] = { - {N_("Time Control ..."), "Time Control", TimeControlProc}, - {N_("Common Engine ..."), "Common Engine", UciMenuProc}, - {N_("Adjudications ..."), "Adjudications", EngineMenuProc}, - {N_("Game List ..."), "Game List", GameListOptionsPopUp}, + {N_("Time Control ... Alt+Shift+T"), "Time Control", TimeControlProc}, + {N_("Common Engine ... Alt+Shift+U"), "Common Engine", UciMenuProc}, + {N_("Adjudications ... Alt+Shift+J"), "Adjudications", EngineMenuProc}, + {N_("Game List ..."), "Game List", GameListOptionsPopUp}, {"----", NULL, NothingProc}, - {N_("Always Queen"), "Always Queen", AlwaysQueenProc}, + {N_("Always Queen Ctrl+Shift+Q"), "Always Queen", AlwaysQueenProc}, {N_("Animate Dragging"), "Animate Dragging", AnimateDraggingProc}, - {N_("Animate Moving"), "Animate Moving", AnimateMovingProc}, + {N_("Animate Moving Ctrl+Shift+A"), "Animate Moving", AnimateMovingProc}, {N_("Auto Comment"), "Auto Comment", AutocommProc}, - {N_("Auto Flag"), "Auto Flag", AutoflagProc}, + {N_("Auto Flag Ctrl+Shift+F"), "Auto Flag", AutoflagProc}, {N_("Auto Flip View"), "Auto Flip View", AutoflipProc}, {N_("Auto Observe"), "Auto Observe", AutobsProc}, {N_("Auto Raise Board"), "Auto Raise Board", AutoraiseProc}, @@ -724,14 +723,14 @@ MenuItem optionsMenu[] = { {N_("ICS Alarm"), "ICS Alarm", IcsAlarmProc}, {N_("Old Save Style"), "Old Save Style", OldSaveStyleProc}, {N_("Periodic Updates"), "Periodic Updates", PeriodicUpdatesProc}, - {N_("Ponder Next Move"), "Ponder Next Move", PonderNextMoveProc}, + {N_("Ponder Next Move Ctrl+Shift+P"), "Ponder Next Move", PonderNextMoveProc}, {N_("Popup Exit Message"), "Popup Exit Message", PopupExitMessageProc}, {N_("Popup Move Errors"), "Popup Move Errors", PopupMoveErrorsProc}, {N_("Premove"), "Premove", PremoveProc}, {N_("Quiet Play"), "Quiet Play", QuietPlayProc}, {N_("Show Coords"), "Show Coords", ShowCoordsProc}, - {N_("Hide Thinking"), "Hide Thinking", HideThinkingProc}, - {N_("Test Legality"), "Test Legality", TestLegalityProc}, + {N_("Hide Thinking Ctrl+Shift+H"), "Hide Thinking", HideThinkingProc}, + {N_("Test Legality Ctrl+Shift+L"), "Test Legality", TestLegalityProc}, {"----", NULL, NothingProc}, {N_("Save Settings Now"), "Save Settings Now", SaveSettingsProc}, {N_("Save Settings on Exit"), "Save Settings on Exit", SaveOnExitProc}, @@ -739,8 +738,8 @@ MenuItem optionsMenu[] = { }; MenuItem helpMenu[] = { - {N_("Info XBoard"), "Info XBoard", InfoProc}, - {N_("Man XBoard"), "Man XBoard", ManProc}, + {N_("Info XBoard"), "Info XBoard", InfoProc}, + {N_("Man XBoard F1"), "Man XBoard", ManProc}, {"----", NULL, NothingProc}, {N_("Hint"), "Hint", HintProc}, {N_("Book"), "Book", BookProc},