[ui] fix an issue where target system could appear blank for UEFI:NTFS

* Also fix a regression introduced in 790b188b3d
This commit is contained in:
Pete Batard 2018-10-08 19:00:24 +02:00
parent 846857a549
commit e587997f4e
2 changed files with 9 additions and 8 deletions

View File

@ -315,7 +315,7 @@ static void SetPartitionSchemeAndTargetSystem(BOOL only_target)
ComboBox_AddStringU(hTargetSystem, lmprintf(MSG_031)), TT_BIOS));
has_uefi_csm = TRUE;
}
if (allowed_target_system[1] && !((pt == PARTITION_STYLE_MBR) && IS_BIOS_BOOTABLE(img_report) && IS_EFI_BOOTABLE(img_report)) )
if (allowed_target_system[1] && !((pt == PARTITION_STYLE_MBR) && (bt == BT_IMAGE) && IS_BIOS_BOOTABLE(img_report) && IS_EFI_BOOTABLE(img_report)) )
IGNORE_RETVAL(ComboBox_SetItemData(hTargetSystem,
ComboBox_AddStringU(hTargetSystem, lmprintf(MSG_032)), TT_UEFI));
if (allowed_target_system[2] && ((pt != PARTITION_STYLE_GPT) || (bt == BT_NON_BOOTABLE)))
@ -2104,8 +2104,10 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
case IDC_FILE_SYSTEM:
if ((HIWORD(wParam) != CBN_SELCHANGE) && (HIWORD(wParam) != CBN_SELCHANGE_INTERNAL))
break;
if (IsWindowEnabled(hFileSystem))
EnableQuickFormat(TRUE);
set_selected_fs = (HIWORD(wParam) == CBN_SELCHANGE);
fs = IsWindowEnabled(hFileSystem) ? (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem)) : -1;
fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem));
SetClusterSizes(fs);
if (fs < 0) {
EnableBootOptions(TRUE, TRUE);
@ -2118,7 +2120,6 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
}
break;
} else {
EnableQuickFormat(TRUE);
// Try to keep track of user selection
if (set_selected_fs)
selected_fs = fs;

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.4.1406"
CAPTION "Rufus 3.4.1407"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,4,1406,0
PRODUCTVERSION 3,4,1406,0
FILEVERSION 3,4,1407,0
PRODUCTVERSION 3,4,1407,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.4.1406"
VALUE "FileVersion", "3.4.1407"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.4.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.4.1406"
VALUE "ProductVersion", "3.4.1407"
END
END
BLOCK "VarFileInfo"