Add tab stops in WB generic popup
[xboard.git] / winboard / wsettings.c
index 84c02cb..a1909ac 100644 (file)
@@ -285,7 +285,7 @@ SetOptionValues(HWND hDlg, ChessProgramState *cps, Option *optionList)
        int j=layoutList[i];\r
        if(j == -2) SetDlgItemText( hDlg, 2000+2*i, ". . ." );\r
        if(j<0) continue;\r
-       name = optionList[j].name;\r
+       name = cps ? optionList[j].name : _(optionList[j].name);\r
        if(strstr(name, "Polyglot ") == name) name += 9;\r
        SetDlgItemText( hDlg, 2000+2*i, name );\r
 //if(appData.debugMode) fprintf(debugFP, "# %s = %d\n",optionList[j].name, optionList[j].value );\r
@@ -425,7 +425,7 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
 //        CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));\r
        SetOptionValues(hDlg, activeCps, activeList);\r
 \r
-//        SetFocus(GetDlgItem(hDlg, IDC_NFG_Edit));\r
+        SetFocus(GetDlgItem(hDlg, IDCANCEL));\r
 \r
         break;\r
 \r
@@ -555,7 +555,7 @@ void AddOption(int x, int y, Control type, int i)
        case Button:\r
        case ResetButton:\r
        case SaveButton:\r
-           AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, i);\r
+           AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i);\r
        case Message:\r
        default:\r
            break;\r
@@ -595,12 +595,12 @@ CreateDialogTemplate(int *layoutList, int nr, Option *optionList)
     // add butons at the bottom of dialog window\r
     y += 13*(nr>>1)+5;\r
 \r
-    AddControl(x+225, y+18*(buttonRows-1), 30, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDOK-2000);\r
-    AddControl(x+260, y+18*(buttonRows-1), 40, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDCANCEL-2000);\r
     for(i=0; i<buttons; i++) {\r
-       AddControl(x+70*(i%4)+5, y+18*(i/4), 65, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, 2*(nr+i));\r
+       AddControl(x+70*(i%4)+5, y+18*(i/4), 65, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 2*(nr+i));\r
        layoutList[nr+i] = buttonList[i];\r
     }\r
+    AddControl(x+225, y+18*(buttonRows-1), 30, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, IDOK-2000);\r
+    AddControl(x+260, y+18*(buttonRows-1), 40, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, IDCANCEL-2000);\r
     template.title[8] = optionList == first.option ? '1' :  '2';\r
     template.header.cy = y += 18*buttonRows+2;\r
     template.header.style &= ~WS_VSCROLL;\r
@@ -702,7 +702,7 @@ Option tourneyOptions[] = {
   { 30, 0,          0, NULL, NULL, NULL, NULL, Label, N_("If you specify an existing file, the rest of this dialog will be ignored.") },\r
   { 30, 0,          0, NULL, NULL, NULL, NULL, Label, N_("Otherwise, the file will be created, with the settings you specify below:") },\r
   { 0,  1,          0, NULL, (void*) &engineChoice, (char*) (engineMnemonic+1), (engineMnemonic+1), ComboBox, N_("Select Engine:") },\r
-  { 0xD, 7,         0, NULL, (void*) &appData.participants, "", NULL, TextBox, "Tourney participants:" },\r
+  { 0xD, 7,         0, NULL, (void*) &appData.participants, "", NULL, TextBox, N_("Tourney participants:") },\r
   { 0,  0,          0, NULL, (void*) &swiss, "", NULL, CheckBox, N_("Use Swiss pairing engine (cycles = rounds)") },\r
   { 0,  0,         10, NULL, (void*) &appData.tourneyType, "", NULL, Spin, N_("Tourney type (0=RR, 1=gauntlet):") },\r
   { 0,  0,          0, NULL, (void*) &appData.cycleSync, "", NULL, CheckBox, N_("Sync after cycle") },\r