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

[loc] fix multiple issues with the ISO progress dialog

* Fix language not being applied when switching locale
* Disable controls when scanning is in progress
* Fix Cancel button staying disabled
* Also fix trailing whitespaces and typo in loc file
* Closes #258
This commit is contained in:
Pete Batard 2013-12-27 16:06:59 +00:00
parent d5a02c63f1
commit 92fd7636a7
3 changed files with 41 additions and 29 deletions

View file

@ -938,7 +938,7 @@ m IDC_POLICY -15,0
m IDCANCEL +25,0 m IDCANCEL +25,0
s IDS_UPDATE_SETTINGS_GRP 25,0 s IDS_UPDATE_SETTINGS_GRP 25,0
# Dialog that appears when a new is available # Dialog that appears when a new version is available
g IDD_NEW_VERSION g IDD_NEW_VERSION
t IDD_NEW_VERSION "Controleer op updates - Rufus" t IDD_NEW_VERSION "Controleer op updates - Rufus"
t IDS_NEW_VERSION_AVAIL_TXT "Een nieuwere versie is beschikbaar. Download de laatste versie a.u.b!" t IDS_NEW_VERSION_AVAIL_TXT "Een nieuwere versie is beschikbaar. Download de laatste versie a.u.b!"

View file

@ -1098,6 +1098,7 @@ BOOL CALLBACK ISOProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
return TRUE; return TRUE;
case UM_ISO_INIT: case UM_ISO_INIT:
iso_op_in_progress = TRUE; iso_op_in_progress = TRUE;
EnableWindow(GetDlgItem(hISOProgressDlg, IDC_ISO_ABORT), TRUE);
CenterDialog(hDlg); CenterDialog(hDlg);
ShowWindow(hDlg, SW_SHOW); ShowWindow(hDlg, SW_SHOW);
UpdateWindow(hDlg); UpdateWindow(hDlg);
@ -1133,6 +1134,7 @@ BOOL CALLBACK ISOProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
DWORD WINAPI ISOScanThread(LPVOID param) DWORD WINAPI ISOScanThread(LPVOID param)
{ {
int i; int i;
BOOL r;
FILE* fd; FILE* fd;
const char* old_c32_name[NB_OLD_C32] = OLD_C32_NAMES; const char* old_c32_name[NB_OLD_C32] = OLD_C32_NAMES;
const char* new_c32_url[NB_OLD_C32] = NEW_C32_URL; const char* new_c32_url[NB_OLD_C32] = NEW_C32_URL;
@ -1140,7 +1142,10 @@ DWORD WINAPI ISOScanThread(LPVOID param)
if (iso_path == NULL) if (iso_path == NULL)
goto out; goto out;
PrintStatus(0, TRUE, MSG_202); PrintStatus(0, TRUE, MSG_202);
if (!ExtractISO(iso_path, "", TRUE)) { EnableControls(FALSE);
r = ExtractISO(iso_path, "", TRUE);
EnableControls(TRUE);
if (!r) {
SendMessage(hISOProgressDlg, UM_ISO_EXIT, 0, 0); SendMessage(hISOProgressDlg, UM_ISO_EXIT, 0, 0);
PrintStatus(0, TRUE, MSG_203); PrintStatus(0, TRUE, MSG_203);
safe_free(iso_path); safe_free(iso_path);
@ -1966,6 +1971,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
if (!IsWindow(hISOProgressDlg)) { if (!IsWindow(hISOProgressDlg)) {
hISOProgressDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_ISO_EXTRACT), hISOProgressDlg = CreateDialogW(hMainInstance, MAKEINTRESOURCEW(IDD_ISO_EXTRACT),
hDlg, (DLGPROC)ISOProc); hDlg, (DLGPROC)ISOProc);
// The window is not visible by default but takes focus => restore it // The window is not visible by default but takes focus => restore it
SetFocus(hDlg); SetFocus(hDlg);
} }
@ -2218,6 +2224,12 @@ relaunch:
if (get_loc_data_file(loc_file, selected_locale)) if (get_loc_data_file(loc_file, selected_locale))
WriteRegistryKeyStr(REGKEY_HKCU, REGKEY_LOCALE, selected_locale->txt[0]); WriteRegistryKeyStr(REGKEY_HKCU, REGKEY_LOCALE, selected_locale->txt[0]);
// Destroy the ISO progress window, if it exists
if (hISOProgressDlg != NULL) {
DestroyWindow(hISOProgressDlg);
hISOProgressDlg = NULL;
}
// Create the main Window // Create the main Window
hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG), NULL, MainCallback); hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG), NULL, MainCallback);
if (hDlg == NULL) { if (hDlg == NULL) {

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329 IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.4.2.363" CAPTION "Rufus v1.4.2.364"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -288,8 +288,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,2,363 FILEVERSION 1,4,2,364
PRODUCTVERSION 1,4,2,363 PRODUCTVERSION 1,4,2,364
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -306,13 +306,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.2.363" VALUE "FileVersion", "1.4.2.364"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.4.2.363" VALUE "ProductVersion", "1.4.2.364"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"