From: H.G. Muller Date: Thu, 23 Jun 2011 12:02:50 +0000 (+0200) Subject: Add tab stops in WB generic popup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c221f1fcc16ca18090ea6a6d663efddc156e4c02;p=xboard.git Add tab stops in WB generic popup The WinBoard generic popup did not put tab stops on push buttons, including the OK and cancel button, with as a consequence that these were skipped when tabbing through the dialog controls. In addition the tabbing could not begin before the user selected one of the controls with the mouse. Now all buttons have tab stops, and the cancel button is given focus when the dialog pops up. --- diff --git a/winboard/wsettings.c b/winboard/wsettings.c index ae0f99c..a1909ac 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -425,7 +425,7 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa // CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER)); SetOptionValues(hDlg, activeCps, activeList); -// SetFocus(GetDlgItem(hDlg, IDC_NFG_Edit)); + SetFocus(GetDlgItem(hDlg, IDCANCEL)); break; @@ -555,7 +555,7 @@ void AddOption(int x, int y, Control type, int i) case Button: case ResetButton: case SaveButton: - AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, i); + AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i); case Message: default: break; @@ -595,12 +595,12 @@ CreateDialogTemplate(int *layoutList, int nr, Option *optionList) // add butons at the bottom of dialog window y += 13*(nr>>1)+5; - AddControl(x+225, y+18*(buttonRows-1), 30, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDOK-2000); - AddControl(x+260, y+18*(buttonRows-1), 40, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDCANCEL-2000); for(i=0; i