small fixes for the JAWS version
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 2 Oct 2009 23:39:20 +0000 (16:39 -0700)
committerArun Persaud <arun@nubati.net>
Fri, 2 Oct 2009 23:39:20 +0000 (16:39 -0700)
* 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

winboard/jaws.c
winboard/winboard.rc

index 95f70d2..9d8ec9c 100644 (file)
@@ -919,13 +919,14 @@ SayWhosTurn()
        }\r
 }\r
        \r
+extern char *commentList[];\r
 \r
 VOID\r
 SayMachineMove(int evenIfDuplicate)\r
 {\r
        int len, xPos, yPos, moveNr, secondSpace = 0, castle = 0, n;\r
        ChessSquare currentpiece;\r
-       char *piece, *xchar, *ynum, *p;\r
+       char *piece, *xchar, *ynum, *p, checkMark = 0;\r
        char c, buf[MSG_SIZ], comment[MSG_SIZ];\r
        static char disambiguation[2];\r
        static int previousMove = 0;\r
@@ -981,6 +982,7 @@ SayMachineMove(int evenIfDuplicate)
                if(secondSpace) len = secondSpace; // position behind move\r
                if(messageText[len-1] == '+' || messageText[len-1] == '#') {  /* you are in checkmate */\r
                        len--; // strip off check or mate indicator\r
+                     checkMark = messageText[len]; // make sure still seen after we stip off promo piece\r
                }\r
                if(messageText[len-2] == '=') {  /* promotion */\r
                        len-=2; // strip off promotion piece\r
@@ -1037,11 +1039,11 @@ SayMachineMove(int evenIfDuplicate)
                                        SayString(piece, FALSE);\r
                                } else SayString("Capturing onn passann",FALSE);\r
                        }\r
-                       if(messageText[len] == '+') SayString("check", FALSE); else\r
-                       if(messageText[len] == '#') {\r
+                   }\r
+                   if(checkMark == '+') SayString("check", FALSE); else\r
+                   if(checkMark == '#') {\r
                                SayString("finishing off", FALSE);\r
                                SayString(WhiteOnMove(n) ? "White" : "Black", FALSE);\r
-                       }\r
                    }\r
                }\r
 \r
@@ -1062,6 +1064,8 @@ SayMachineMove(int evenIfDuplicate)
                    SayString(comment, FALSE); // alphabetic comment (usually game end)\r
                } else if(p) SayString(p, FALSE);\r
 \r
+               if(commentDialog && commentList[currentMove]) SetFocus(commentDialog);\r
+\r
            } else {\r
                /* starts not with digit */\r
                if(StrCaseStr(messageText, "illegal")) PlayIcsUnfinishedSound();\r
index 7913e29..4d63c78 100644 (file)
@@ -1413,6 +1413,12 @@ BEGIN
     VK_PRIOR,       IDM_LoadPrevPosition,   VIRTKEY, SHIFT, ALT, NOINVERT\r
     VK_LEFT,        IDM_Backward,           VIRTKEY, ALT, NOINVERT\r
     VK_RIGHT,       IDM_Forward,            VIRTKEY, ALT, NOINVERT\r
+#ifndef JAWS\r
+    VK_LEFT,        IDM_Backward,           VIRTKEY, NOINVERT\r
+    VK_RIGHT,       IDM_Forward,            VIRTKEY, NOINVERT\r
+    VK_DOWN,        IDM_ToEnd,              VIRTKEY, NOINVERT\r
+    VK_DOWN,        IDM_ToStart,            VIRTKEY, NOINVERT\r
+#endif\r
 END\r
 \r
 NO_ALT ACCELERATORS MOVEABLE PURE \r