From: H.G. Muller Date: Fri, 2 Oct 2009 23:39:20 +0000 (-0700) Subject: small fixes for the JAWS version X-Git-Tag: v4.4.1.20091019~62 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=08b791a1526fb669916eec752752f1cbb0582de1;p=xboard.git small fixes for the JAWS version * I moved saying 'check' by the JAWS version to where castling also benefits from it. * I made sure the check symbols are also recognized on promotion moves * In the non-JAWS version, define the plain arrows as shortcut keys for the button bar --- diff --git a/winboard/jaws.c b/winboard/jaws.c index 95f70d2..9d8ec9c 100644 --- a/winboard/jaws.c +++ b/winboard/jaws.c @@ -919,13 +919,14 @@ SayWhosTurn() } } +extern char *commentList[]; VOID SayMachineMove(int evenIfDuplicate) { int len, xPos, yPos, moveNr, secondSpace = 0, castle = 0, n; ChessSquare currentpiece; - char *piece, *xchar, *ynum, *p; + char *piece, *xchar, *ynum, *p, checkMark = 0; char c, buf[MSG_SIZ], comment[MSG_SIZ]; static char disambiguation[2]; static int previousMove = 0; @@ -981,6 +982,7 @@ SayMachineMove(int evenIfDuplicate) if(secondSpace) len = secondSpace; // position behind move if(messageText[len-1] == '+' || messageText[len-1] == '#') { /* you are in checkmate */ len--; // strip off check or mate indicator + checkMark = messageText[len]; // make sure still seen after we stip off promo piece } if(messageText[len-2] == '=') { /* promotion */ len-=2; // strip off promotion piece @@ -1037,11 +1039,11 @@ SayMachineMove(int evenIfDuplicate) SayString(piece, FALSE); } else SayString("Capturing onn passann",FALSE); } - if(messageText[len] == '+') SayString("check", FALSE); else - if(messageText[len] == '#') { + } + if(checkMark == '+') SayString("check", FALSE); else + if(checkMark == '#') { SayString("finishing off", FALSE); SayString(WhiteOnMove(n) ? "White" : "Black", FALSE); - } } } @@ -1062,6 +1064,8 @@ SayMachineMove(int evenIfDuplicate) SayString(comment, FALSE); // alphabetic comment (usually game end) } else if(p) SayString(p, FALSE); + if(commentDialog && commentList[currentMove]) SetFocus(commentDialog); + } else { /* starts not with digit */ if(StrCaseStr(messageText, "illegal")) PlayIcsUnfinishedSound(); diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 7913e29..4d63c78 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -1413,6 +1413,12 @@ BEGIN VK_PRIOR, IDM_LoadPrevPosition, VIRTKEY, SHIFT, ALT, NOINVERT VK_LEFT, IDM_Backward, VIRTKEY, ALT, NOINVERT VK_RIGHT, IDM_Forward, VIRTKEY, ALT, NOINVERT +#ifndef JAWS + VK_LEFT, IDM_Backward, VIRTKEY, NOINVERT + VK_RIGHT, IDM_Forward, VIRTKEY, NOINVERT + VK_DOWN, IDM_ToEnd, VIRTKEY, NOINVERT + VK_DOWN, IDM_ToStart, VIRTKEY, NOINVERT +#endif END NO_ALT ACCELERATORS MOVEABLE PURE