* Massachusetts. \r
*\r
* Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,\r
- * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.\r
+ * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.\r
*\r
* Enhancements Copyright 2005 Alessandro Scotti\r
*\r
#define ABOUTBOX -1 /* not sure why these are needed */\r
#define ABOUTBOX2 -1\r
\r
-int dialogItems[][41 ] = {\r
+int dialogItems[][42] = {\r
{ ABOUTBOX, IDOK, OPT_MESS, 400 }, \r
{ DLG_TimeControl, IDC_Babble, OPT_TCUseMoves, OPT_TCUseInc, OPT_TCUseFixed, \r
OPT_TCtext1, OPT_TCtext2, OPT_TCitext1, OPT_TCitext2, OPT_TCftext, GPB_Factors, IDC_Factor1, IDC_Factor2, IDOK, IDCANCEL }, \r
{ DLG_LoadOptions, OPT_Autostep, OPT_AStext1, OPT_Exact, OPT_Subset, OPT_Struct, OPT_Material, OPT_Range, OPT_Difference,\r
- OPT_elo1, OPT_elo2, OPT_date, OPT_Stretch, OPT_Stretcht, OPT_Reversed, OPT_SearchMode, IDOK, IDCANCEL }, \r
+ OPT_elo1t, OPT_elo2t, OPT_datet, OPT_Stretch, OPT_Stretcht, OPT_Reversed, OPT_SearchMode, OPT_Mirror, OPT_thresholds, IDOK, IDCANCEL }, \r
{ DLG_SaveOptions, OPT_Autosave, OPT_AVPrompt, OPT_AVToFile, OPT_AVBrowse,\r
801, OPT_PGN, OPT_Old, OPT_OutOfBookInfo, IDOK, IDCANCEL }, \r
{ 1536, 1090, IDC_Directories, 1089, 1091, IDOK, IDCANCEL, 1038, IDC_IndexNr, 1037 }, \r
OPT_ChooseLightSquareColor, OPT_ChooseDarkSquareColor, OPT_ChooseWhitePieceColor,\r
OPT_ChooseBlackPieceColor, OPT_ChooseHighlightSquareColor, OPT_ChoosePremoveHighlightColor,\r
OPT_Monochrome, OPT_AllWhite, OPT_UpsideDown, OPT_DefaultBoardColors, GPB_Colors,\r
- IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont }, \r
+ IDC_Light, IDC_Dark, IDC_White, IDC_Black, IDC_High, IDC_PreHigh, GPB_Size, OPT_Bitmaps, OPT_PieceFont, OPT_Grid }, \r
{ DLG_NewVariant, IDOK, IDCANCEL, OPT_VariantNormal, OPT_VariantFRC, OPT_VariantWildcastle,\r
OPT_VariantNocastle, OPT_VariantLosers, OPT_VariantGiveaway, OPT_VariantSuicide,\r
OPT_Variant3Check, OPT_VariantTwoKings, OPT_VariantAtomic, OPT_VariantCrazyhouse,\r
{ 0 }\r
};\r
\r
-static char languageBuf[50000], *foreign[1000], *english[1000], *languageFile[MSG_SIZ];\r
+static char languageBuf[70000], *foreign[1000], *english[1000], *languageFile[MSG_SIZ];\r
static int lastChecked;\r
static char oldLanguage[MSG_SIZ], *menuText[10][30];\r
extern int tinyLayout;\r
{ // return the translation of the given string\r
// efficiency can be improved a lot...\r
int i=0;\r
+ static char buf[MSG_SIZ];\r
//if(appData.debugMode) fprintf(debugFP, "T_(%s)\n", s);\r
if(!barbaric) return s;\r
if(!s) return ""; // sanity\r
while(english[i]) {\r
if(!strcmp(s, english[i])) return foreign[i];\r
+ if(english[i][0] == '%' && strstr(s, english[i]+1) == s) { // allow translation of strings with variable ending\r
+ snprintf(buf, MSG_SIZ, "%s%s", foreign[i], s + strlen(english[i]+1)); // keep unmatched portion\r
+ return buf;\r
+ }\r
i++;\r
}\r
return s;\r
#define JAWS_INIT\r
#define JAWS_ARGS\r
#define JAWS_ALT_INTERCEPT\r
-#define JAWS_KB_NAVIGATION\r
+#define JAWS_KBUP_NAVIGATION\r
+#define JAWS_KBDOWN_NAVIGATION\r
#define JAWS_MENU_ITEMS\r
#define JAWS_SILENCE\r
#define JAWS_REPLAY\r
0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);\r
#endif\r
ShowWindow(hwndConsole, nCmdShow);\r
- if(appData.chatBoxes) { // [HGM] chat: open chat boxes\r
- char buf[MSG_SIZ], *p = buf, *q;\r
- safeStrCpy(buf, appData.chatBoxes, sizeof(buf)/sizeof(buf[0]) );\r
- do {\r
- q = strchr(p, ';');\r
- if(q) *q++ = 0;\r
- if(*p) ChatPopUp(p);\r
- } while(p=q);\r
- }\r
SetActiveWindow(hwndConsole);\r
}\r
if(!appData.noGUI) UpdateWindow(hwnd); else ShowWindow(hwnd, SW_MINIMIZE);\r
switch (message) {\r
case WM_LBUTTONDOWN:\r
if (PtInRect((LPRECT) &whiteRect, pt)) {\r
- ClockClick(flipClock);\r
+ ClockClick(flipClock); break;\r
} else if (PtInRect((LPRECT) &blackRect, pt)) {\r
- ClockClick(!flipClock);\r
+ ClockClick(!flipClock); break;\r
}\r
dragInfo.start.x = dragInfo.start.y = -1;\r
dragInfo.from = dragInfo.start;\r
if(y == -2) {\r
/* [HGM] right mouse button in clock area edit-game mode ups clock */\r
if (PtInRect((LPRECT) &whiteRect, pt)) {\r
- if (gameMode == EditGame || GetKeyState(VK_SHIFT) < 0) AdjustClock(flipClock, 1);\r
+ if (GetKeyState(VK_SHIFT) < 0) AdjustClock(flipClock, 1);\r
} else if (PtInRect((LPRECT) &blackRect, pt)) {\r
- if (gameMode == EditGame || GetKeyState(VK_SHIFT) < 0) AdjustClock(!flipClock, 1);\r
+ if (GetKeyState(VK_SHIFT) < 0) AdjustClock(!flipClock, 1);\r
}\r
break;\r
}\r
char fileTitle[MSG_SIZ];\r
char buf[MSG_SIZ];\r
static SnapData sd;\r
+ static int peek=0;\r
\r
switch (message) {\r
\r
MouseEvent(hwnd, message, wParam, lParam);\r
break;\r
\r
- JAWS_KB_NAVIGATION\r
+ case WM_KEYUP:\r
+ if((char)wParam == '\b') {\r
+ ForwardEvent(); peek = 0;\r
+ }\r
+\r
+ JAWS_KBUP_NAVIGATION\r
+\r
+ break;\r
+\r
+ case WM_KEYDOWN:\r
+ if((char)wParam == '\b') {\r
+ if(!peek) BackwardEvent(), peek = 1;\r
+ }\r
+\r
+ JAWS_KBDOWN_NAVIGATION\r
+\r
+ break;\r
\r
case WM_CHAR:\r
\r
char consoleTitle[MSG_SIZ];\r
\r
snprintf(consoleTitle, MSG_SIZ, "%s: %s", szConsoleTitle, str);\r
- SetWindowText(hwndConsole, consoleTitle);\r
+ SetWindowText(hwndConsole, consoleTitle);\r
+\r
+ if(appData.chatBoxes) { // [HGM] chat: open chat boxes\r
+ char buf[MSG_SIZ], *p = buf, *q;\r
+ safeStrCpy(buf, appData.chatBoxes, sizeof(buf)/sizeof(buf[0]) );\r
+ do {\r
+ q = strchr(p, ';');\r
+ if(q) *q++ = 0;\r
+ if(*p) ChatPopUp(p);\r
+ } while(p=q);\r
+ }\r
+\r
+ SetActiveWindow(hwndMain);\r
}\r
\r
void\r