mirror of
https://github.com/pbatard/rufus.git
synced 2024-09-01 22:46:09 +02:00
[ui] fix FS selection when switching between To Go and regular install
This commit is contained in:
parent
d1d16ce1c5
commit
7b8c51e425
2 changed files with 15 additions and 21 deletions
20
src/rufus.c
20
src/rufus.c
|
@ -457,6 +457,8 @@ static void SetFSFromISO(void)
|
|||
int i, fs, selected_fs = FS_UNKNOWN;
|
||||
uint32_t fs_mask = 0;
|
||||
int bt = GETBIOSTYPE((int)ComboBox_GetItemData(hPartitionScheme, ComboBox_GetCurSel(hPartitionScheme)));
|
||||
BOOL windows_to_go = (togo_mode) && HAS_TOGO(iso_report) &&
|
||||
(Button_GetCheck(GetDlgItem(hMainDialog, IDC_WINDOWS_TO_GO)) == BST_CHECKED);
|
||||
|
||||
if (image_path == NULL)
|
||||
return;
|
||||
|
@ -469,13 +471,13 @@ static void SetFSFromISO(void)
|
|||
|
||||
// Syslinux and EFI have precedence over bootmgr (unless the user selected BIOS as target type)
|
||||
if ((HAS_SYSLINUX(iso_report)) || (IS_REACTOS(iso_report)) || (iso_report.has_kolibrios) ||
|
||||
((iso_report.has_efi) && (bt == BT_UEFI) && (!iso_report.has_4GB_file))) {
|
||||
((iso_report.has_efi) && (bt == BT_UEFI) && (!iso_report.has_4GB_file) && (!windows_to_go))) {
|
||||
if (fs_mask & (1<<FS_FAT32)) {
|
||||
selected_fs = FS_FAT32;
|
||||
} else if ((fs_mask & (1<<FS_FAT16)) && (!iso_report.has_kolibrios)) {
|
||||
selected_fs = FS_FAT16;
|
||||
}
|
||||
} else if ((iso_report.has_bootmgr) || (IS_WINPE(iso_report.winpe))) {
|
||||
} else if ((windows_to_go) || (iso_report.has_bootmgr) || (IS_WINPE(iso_report.winpe))) {
|
||||
if (fs_mask & (1<<FS_NTFS)) {
|
||||
selected_fs = FS_NTFS;
|
||||
}
|
||||
|
@ -2168,19 +2170,11 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
}
|
||||
break;
|
||||
case IDC_WINDOWS_INSTALL:
|
||||
if (Button_GetCheck(GetDlgItem(hMainDialog, IDC_WINDOWS_INSTALL)) == BST_CHECKED)
|
||||
SetMBRProps();
|
||||
break;
|
||||
case IDC_WINDOWS_TO_GO:
|
||||
if (Button_GetCheck(GetDlgItem(hMainDialog, IDC_WINDOWS_TO_GO)) == BST_CHECKED) {
|
||||
for (i=0; i<ComboBox_GetCount(hFileSystem); i++) {
|
||||
if (ComboBox_GetItemData(hFileSystem, i) == FS_NTFS) {
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hFileSystem, i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( (Button_GetCheck(GetDlgItem(hMainDialog, IDC_WINDOWS_INSTALL)) == BST_CHECKED) ||
|
||||
(Button_GetCheck(GetDlgItem(hMainDialog, IDC_WINDOWS_TO_GO)) == BST_CHECKED) ) {
|
||||
SetFSFromISO();
|
||||
SetMBRProps();
|
||||
CheckDlgButton(hMainDialog, IDC_RUFUS_MBR, BST_UNCHECKED);
|
||||
}
|
||||
break;
|
||||
case IDC_RUFUS_MBR:
|
||||
|
|
16
src/rufus.rc
16
src/rufus.rc
|
@ -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.0.0.590"
|
||||
CAPTION "Rufus 2.0.0.591"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -157,7 +157,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.0.0.590"
|
||||
CAPTION "Rufus 2.0.0.591"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -283,7 +283,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.0.0.590"
|
||||
CAPTION "Rufus 2.0.0.591"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -415,7 +415,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.0.0.590"
|
||||
CAPTION "Rufus 2.0.0.591"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
|
||||
|
@ -671,8 +671,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,0,0,590
|
||||
PRODUCTVERSION 2,0,0,590
|
||||
FILEVERSION 2,0,0,591
|
||||
PRODUCTVERSION 2,0,0,591
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -689,13 +689,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.0.0.590"
|
||||
VALUE "FileVersion", "2.0.0.591"
|
||||
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.0.0.590"
|
||||
VALUE "ProductVersion", "2.0.0.591"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue