From 131df52482cca78c08a9a17d1a6b329442c60490 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 31 Oct 2014 19:06:05 +0000 Subject: [PATCH] [ui] fix unwanted behaviour when ISO is unsupported * Remove "Scanning Image..." from status, and prevent the Start from being enabled when no drive is selected * Closes #375 --- src/localization.c | 3 ++- src/rufus.c | 3 ++- src/rufus.rc | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/localization.c b/src/localization.c index 2cae1dcd..32e26eb0 100644 --- a/src/localization.c +++ b/src/localization.c @@ -417,7 +417,8 @@ void PrintStatus(unsigned int duration, BOOL debug, int msg_id, ...) if (msg_id < 0) { //A negative msg_id clears the status - SendMessageLU(GetDlgItem(hMainDialog, IDC_STATUS), SB_SETTEXTW, SBT_OWNERDRAW, ""); + szStatusMessage[0] = 0; + SendMessageLU(GetDlgItem(hMainDialog, IDC_STATUS), SB_SETTEXTW, SBT_OWNERDRAW, szStatusMessage); return; } diff --git a/src/rufus.c b/src/rufus.c index b9ad037d..08d35f24 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -749,7 +749,7 @@ void UpdateProgress(int op, float percent) static void EnableControls(BOOL bEnable) { EnableWindow(GetDlgItem(hMainDialog, IDC_DEVICE), bEnable); - EnableWindow(GetDlgItem(hMainDialog, IDC_START), bEnable); + EnableWindow(GetDlgItem(hMainDialog, IDC_START), (ComboBox_GetCurSel(hDeviceList)<0)?FALSE:bEnable); EnableWindow(GetDlgItem(hMainDialog, IDC_ABOUT), bEnable); EnableWindow(GetDlgItem(hMainDialog, IDC_BADBLOCKS), bEnable); EnableBootOptions(bEnable, FALSE); @@ -962,6 +962,7 @@ DWORD WINAPI ISOScanThread(LPVOID param) MessageBoxU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK|MB_ICONINFORMATION|MB_IS_RTL); safe_free(image_path); SetMBRProps(); + PrintStatus(0, FALSE, -1); } else { // Enable bootable and set Target System and FS accordingly CheckDlgButton(hMainDialog, IDC_BOOT, BST_CHECKED); diff --git a/src/rufus.rc b/src/rufus.rc index 4f9b5304..9fdfffae 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 1.4.11.523" +CAPTION "Rufus 1.4.11.524" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -165,7 +165,7 @@ END RTL_IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL -CAPTION "Rufus 1.4.11.523" +CAPTION "Rufus 1.4.11.524" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -428,8 +428,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,11,523 - PRODUCTVERSION 1,4,11,523 + FILEVERSION 1,4,11,524 + PRODUCTVERSION 1,4,11,524 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -446,13 +446,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "1.4.11.523" + VALUE "FileVersion", "1.4.11.524" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "1.4.11.523" + VALUE "ProductVersion", "1.4.11.524" END END BLOCK "VarFileInfo"