1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[ui] improve accessibility

* Ensure that focus is set back to a button after some operations
* Remove a confusing forced focus on Start after boot type dropdown selection
* Ensure that the Advanced Options and Select Image buttons have a label that
  can be picked up by screen readers such as nvda
* Closes #243
* Closes #499
This commit is contained in:
Pete Batard 2015-05-08 23:37:22 +01:00
parent a6ec806770
commit d593e03c2b
4 changed files with 47 additions and 40 deletions

View file

@ -123,7 +123,7 @@ char lost_translators[][6] = LOST_TRANSLATORS;
*/
OPENED_LIBRARIES_VARS;
HINSTANCE hMainInstance;
HWND hMainDialog, hLangToolbar = NULL;
HWND hMainDialog, hLangToolbar = NULL, hUpdatesDlg = NULL;
char szFolderPath[MAX_PATH], app_dir[MAX_PATH];
char* image_path = NULL;
float fScale = 1.0f;
@ -1704,7 +1704,6 @@ void InitDialog(HWND hDlg)
}
// Create the language toolbar
// NB: We don't make it a tabstop as it would become the default selected button otherwise
hLangToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_TABSTOP | TBSTYLE_TRANSPARENT | CCS_NOPARENTALIGN |
CCS_NORESIZE | CCS_NODIVIDER, 0, 0, 0, 0, hMainDialog, NULL, hMainInstance, NULL);
if ((pfImageList_Create != NULL) && (pfImageList_AddIcon != NULL)) {
@ -1786,6 +1785,10 @@ void InitDialog(HWND hDlg)
CreateTooltip(GetDlgItem(hDlg, IDC_WINDOWS_INSTALL), lmprintf(MSG_199), -1);
CreateTooltip(GetDlgItem(hDlg, IDC_WINDOWS_TO_GO), lmprintf(MSG_200), -1);
// Set a label for the Advanced Mode and Select Image button for screen readers
SetWindowTextU(GetDlgItem(hDlg, IDC_ADVANCED), lmprintf(MSG_160));
SetWindowTextU(hSelectISO, lmprintf(MSG_165));
ToggleAdvanced(); // We start in advanced mode => go to basic mode
ToggleToGo();
@ -2244,11 +2247,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
ToggleImage(!IsChecked(IDC_BOOT) || (selection_default != DT_IMG));
SetToGo();
if ((selection_default == DT_ISO) || (selection_default == DT_IMG)) {
if ((image_path == NULL) || (iso_report.label[0] == 0)) {
// Set focus to the Select ISO button
SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)FALSE, 0);
SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)hSelectISO, TRUE);
} else {
if ((image_path != NULL) && (iso_report.label[0] != 0)) {
// Some distros (eg. Arch Linux) want to see a specific label => ignore user one
SetWindowTextU(hLabel, iso_report.label);
}
@ -2263,9 +2262,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
SendMessage(hMainDialog, WM_COMMAND, (CBN_SELCHANGE<<16) | IDC_FILESYSTEM,
ComboBox_GetCurSel(hFileSystem));
}
// Set focus on the start button
SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)FALSE, 0);
SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)hStart, TRUE);
// For non ISO, if the user manually set a label, try to preserve it
if (!user_changed_label)
SetWindowTextU(hLabel, SelectedDrive.proposed_label);
@ -2453,6 +2449,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
case UM_NO_UPDATE:
Notification(MSG_INFO, NULL, lmprintf(MSG_243), lmprintf(MSG_247));
// Need to manually set focus back to "Check Now" for tabbing to work
SendMessage(hUpdatesDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hUpdatesDlg, IDC_CHECK_NOW), TRUE);
break;
case UM_FORMAT_COMPLETED:

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.2.657"
CAPTION "Rufus 2.2.658"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -46,7 +46,7 @@ BEGIN
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,13,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_TOP | BS_FLAT
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
@ -78,11 +78,11 @@ CAPTION "About Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_TABSTOP | WS_VSCROLL,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,115,267,91,WS_EX_STATICEDGE
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE DIALOGEX 0, 0, 335, 205
@ -126,7 +126,7 @@ FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_TABSTOP | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -156,7 +156,7 @@ END
IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.2.657"
CAPTION "Rufus 2.2.658"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -170,13 +170,13 @@ BEGIN
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,13,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_TOP | BS_FLAT
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,183,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_SELECT_ISO,207,182,21,14,BS_ICON
PUSHBUTTON "",IDC_SELECT_ISO,207,182,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
@ -202,11 +202,11 @@ CAPTION "About Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_XP DIALOGEX 0, 0, 335, 205
@ -250,7 +250,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_TABSTOP | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -281,7 +281,7 @@ END
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.2.657"
CAPTION "Rufus 2.2.658"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -295,13 +295,13 @@ BEGIN
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,13,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_TOP | BS_FLAT
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,183,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_SELECT_ISO,207,182,21,14,BS_ICON
PUSHBUTTON "",IDC_SELECT_ISO,207,182,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
@ -328,11 +328,11 @@ CAPTION "About Rufus"
FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_RTL DIALOGEX 0, 0, 335, 205
@ -380,7 +380,7 @@ FONT 8, "Segoe UI", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_TABSTOP | WS_VSCROLL,46,8,235,130,WS_EX_STATICEDGE
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
@ -412,7 +412,7 @@ END
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.2.657"
CAPTION "Rufus 2.2.658"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -426,13 +426,13 @@ BEGIN
LTEXT "New volume label",IDS_LABEL_TXT,9,121,222,10
EDITTEXT IDC_LABEL,8,131,226,13,ES_AUTOHSCROLL
GROUPBOX "Format Options",IDS_FORMAT_OPTIONS_GRP,7,149,227,89
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_TOP | BS_FLAT
PUSHBUTTON "",IDC_ADVANCED,15,148,14,10,BS_ICON
CONTROL "Check device for bad blocks",IDC_BADBLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,161,112,10
COMBOBOX IDC_NBPASSES,128,159,100,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Quick format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,173,121,10
CONTROL "Create a bootable disk using",IDC_BOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,185,112,10
COMBOBOX IDC_BOOTTYPE,128,183,75,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_SELECT_ISO,207,182,21,14,BS_ICON
PUSHBUTTON "",IDC_SELECT_ISO,207,182,21,14,BS_ICON
CONTROL "Standard Windows installation",IDC_WINDOWS_INSTALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,23,198,205,8
CONTROL "Windows To Go",IDC_WINDOWS_TO_GO,"Button",BS_AUTORADIOBUTTON,23,210,205,8
CONTROL "Create extended label and icon files",IDC_SET_ICON,
@ -459,11 +459,11 @@ CAPTION "About Rufus"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
CONTROL "",IDC_ABOUT_BLURB,"RichEdit20W",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY,45,7,268,107
CONTROL "",IDC_ABOUT_COPYRIGHTS,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL,46,115,267,91,WS_EX_STATICEDGE
PUSHBUTTON "License",IDC_ABOUT_LICENSE,46,215,50,14,WS_GROUP
PUSHBUTTON "Updates",IDC_ABOUT_UPDATES,100,215,50,14,NOT WS_VISIBLE | WS_GROUP
DEFPUSHBUTTON "OK",IDOK,251,215,50,14,WS_GROUP
END
IDD_LICENSE_RTL_XP DIALOGEX 0, 0, 335, 205
@ -667,8 +667,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,2,657,0
PRODUCTVERSION 2,2,657,0
FILEVERSION 2,2,658,0
PRODUCTVERSION 2,2,658,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -685,13 +685,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.2.657"
VALUE "FileVersion", "2.2.658"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.2.657"
VALUE "ProductVersion", "2.2.658"
END
END
BLOCK "VarFileInfo"

View file

@ -55,6 +55,7 @@ static HICON hMessageIcon = (HICON)INVALID_HANDLE_VALUE;
static char* szMessageText = NULL;
static char* szMessageTitle = NULL;
static HWND hBrowseEdit;
extern HWND hUpdatesDlg;
static WNDPROC pOrgBrowseWndproc;
static const SETTEXTEX friggin_microsoft_unicode_amateurs = {ST_DEFAULT, CP_UTF8};
static BOOL notification_is_question;
@ -537,6 +538,8 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
SendMessage(hEdit[i], EM_SETEVENTMASK, 0, ENM_LINK);
SendMessage(hEdit[i], EM_SETBKGNDCOLOR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE));
}
// Need to send an explicit SetSel to avoid being positioned at the end of richedit control when tabstop is used
SendMessage(hEdit[1], EM_SETSEL, 0, 0);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
@ -1013,6 +1016,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
switch (message) {
case WM_INITDIALOG:
hUpdatesDlg = hDlg;
apply_localization(IDD_UPDATE_POLICY, hDlg);
SetTitleBarIcon(hDlg);
CenterDialog(hDlg);
@ -1063,6 +1067,7 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
case IDCANCEL:
reset_localization(IDD_UPDATE_POLICY);
EndDialog(hDlg, LOWORD(wParam));
hUpdatesDlg = NULL;
return (INT_PTR)TRUE;
case IDC_CHECK_NOW:
CheckForUpdates(TRUE);
@ -1266,6 +1271,8 @@ INT_PTR CALLBACK NewVersionCallback(HWND hDlg, UINT message, WPARAM wParam, LPAR
uprintf("Could not get save path\n");
break;
}
// Opening the File Dialog will make us lose tabbing focus - set it back
SendMessage(hDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlg, IDC_DOWNLOAD), TRUE);
DownloadFileThreaded(update.download_url, filepath, hDlg);
break;
}

View file

@ -469,6 +469,8 @@ BOOL GetUSBDevices(DWORD devnum)
r = TRUE;
out:
// Set 'Start' as the selected button, so that tab selection works
SendMessage(hMainDialog, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hMainDialog, IDC_START), TRUE);
safe_free(devid_list);
StrArrayDestroy(&dev_if_path);
htab_destroy(&htab_devid);