From a8d5c9f6c36f8ff09aa3d66038dbcc5a5d4c9b84 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 16 Mar 2018 18:59:40 +0000 Subject: [PATCH] [internal] UI redesign, part 13 * Gotta continue climbing that hill... --- _sign.cmd | 2 +- res/appstore/packme.cmd | 2 +- res/localization/ChangeLog.txt | 11 +++++++---- res/localization/rufus.loc | 16 +++++++++------- src/dev.c | 6 +++--- src/rufus.c | 25 ++++++++++++++++++------- src/rufus.h | 1 + 7 files changed, 40 insertions(+), 23 deletions(-) diff --git a/_sign.cmd b/_sign.cmd index 1d06afa6..0dca7621 100644 --- a/_sign.cmd +++ b/_sign.cmd @@ -1,3 +1,3 @@ @echo off -"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 %1 exit diff --git a/res/appstore/packme.cmd b/res/appstore/packme.cmd index 121bcd87..f9bb3dcf 100644 --- a/res/appstore/packme.cmd +++ b/res/appstore/packme.cmd @@ -17,7 +17,7 @@ copy "..\..\rufus-%VERSION%.exe" "rufus.exe" "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakePri" new /o /pr . /cf priconfig.xml "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\MakeAppx" pack /o /d . /p Rufus-%VERSION%.appx if ERRORLEVEL 1 goto out -"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\SignTool" sign /v /sha1 5759b23dc8f45e9120a7317f306e5b6890b612f0 /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 Rufus-%VERSION%.appx +"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\SignTool" sign /v /sha1 9ce9a71ccab3b38a74781b975f1c228222cf7d3b /fd SHA256 /tr http://timestamp.comodoca.com/rfc3161 /td SHA256 Rufus-%VERSION%.appx :out del /q rufus.exe del /q priconfig.xml diff --git a/res/localization/ChangeLog.txt b/res/localization/ChangeLog.txt index a07b9543..27dcf1b6 100644 --- a/res/localization/ChangeLog.txt +++ b/res/localization/ChangeLog.txt @@ -38,11 +38,12 @@ o Version 1.0.23 (2018.??.??) - *NEW* MSG_121 "Show %s" - *NEW* MSG_122 "Hide %s" MSG_119/120 + MSG_121/122 are used to create the advanced options clickable toolbars - - *REPLACED* MSG_150 -> "Method that will be used to create partitions." - - *REPLACED* MSG_151 -> "Type of computer you plan to use this bootable drive with. It is up to YOU to find whether your target is of BIOS or UEFI type.\n" + - *REPLACED* MSG_150 -> "Type of computer you plan to use this bootable drive with. It is up to YOU to find whether your target is of BIOS or UEFI type.\n" "Be mindful that CSM, which can be enabled or disabled on UEFI computers, means 'BIOS emulation', and is not really UEFI." - - *REPLACED* MSG_152 -> "Note: 'UEFI-CSM' means BIOS emulation under UEFI (i.e. 'Legacy Mode') and is not the same as genuine UEFI." - Be mindful that you probably don't want to translate 'Legacy Mode' as this is an option that usually appears in English in the UEFI settings. + - *REPLACED* MSG_151 -> ""Note: 'UEFI-CSM' means that the device will only boot in BIOS emulation mode under UEFI (also known as 'Legacy Mode'), and not in native UEFI mode." + Be mindful that you probably don't want to translate 'Legacy Mode' as this is an option that usually appears in English in the UEFI settings. + - *REPLACED* MSG_152 -> "Note: 'non CSM' means that the device will only boot in native UEFI mode, and not in BIOS emulation mode (also known as 'Legacy Mode')." + - *REPLACED* MSG_163 -> "Method that will be used to create partitions." - *NEW* MSG_278 "Checking for conflicting processes..." - *REPLACED* MSG_280 "Image selection" -> "Disk or ISO image" - *REPLACED* MSG_281 "(Please select an image)" -> "%s (Please select)" @@ -57,6 +58,8 @@ o Version 1.0.23 (2018.??.??) - *NEW* MSG_314 "Create a disk image of the selected device" - *UPDATED* On IDD_LOG, IDC_LOG_CLEAR, IDC_LOG_SAVE and IDCANCEL were updated to remove the redundant mention of "Log" in the buttons for the languages who did that. *PLEASE* verify that the modification looks correct in your language. + - *UPDATED* Log dialog buttons (in the 'g IDD_LOG' section). "Save Log", "Clear Log" "Close Log" have become "Save", "Clear", "Close". + I updated existing translations to remove the mention of "Log". Please check that it was done properly. o Version 1.0.22 (2017.07.17) - *NEW* MSG_295 "Warning: Unofficial version" diff --git a/res/localization/rufus.loc b/res/localization/rufus.loc index 131ff060..29f38f1d 100644 --- a/res/localization/rufus.loc +++ b/res/localization/rufus.loc @@ -358,11 +358,11 @@ t MSG_120 "advanced format options" t MSG_121 "Show %s" t MSG_122 "Hide %s" # Tooltips -t MSG_150 "Method that will be used to create partitions." -t MSG_151 "Type of computer you plan to use this bootable drive with. It is up to YOU to find whether your target is of BIOS or UEFI type.\n" +t MSG_150 "Type of computer you plan to use this bootable drive with. It is up to YOU to find whether your target is of BIOS or UEFI type.\n" "Be mindful that CSM, which can be enabled or disabled on UEFI computers, means 'BIOS emulation', and is not really UEFI." # Note: You shouldn't translate 'Legacy Mode' below, as this is an option that usually appears in English in the UEFI settings. -t MSG_152 "Note: 'UEFI-CSM' means BIOS emulation under UEFI (i.e. 'Legacy Mode') and is not the same as genuine UEFI." +t MSG_151 "Note: 'UEFI-CSM' means that the device will only boot in BIOS emulation mode under UEFI (also known as 'Legacy Mode'), and not in native UEFI mode." +t MSG_152 "Note: 'non CSM' means that the device will only boot in native UEFI mode, and not in BIOS emulation mode (also known as 'Legacy Mode')." t MSG_153 "Test pattern: 0x%02X" t MSG_154 "Test pattern: 0x%02X, 0x%02X" t MSG_155 "Test pattern: 0x%02X, 0x%02X, 0x%02X" @@ -373,6 +373,7 @@ t MSG_159 "Use this field to set the drive label\nInternational characters are a t MSG_160 "Toggle advanced options" t MSG_161 "Check the device for bad blocks using a test pattern" t MSG_162 "Uncheck this box to use the \"slow\" format method" +t MSG_163 "Method that will be used to create partitions." t MSG_164 "Method that will be used to make the drive bootable" t MSG_165 "Click to select an image..." t MSG_166 "Check this box to allow the display of international labels " @@ -5119,10 +5120,10 @@ t MSG_121 "Afficher les %s" t MSG_122 "Cacher les %s" # Tooltips -t MSG_150 "Methode qui sera utilisée pour créer les partitions." -t MSG_151 "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de VOTRE responsabilité de savoir s'il s'agit d'un type BIOS ou UEFI.\n" +t MSG_150 "Type d'ordinateur avec lequel vous comptez utiliser ce disque démarrable. Il est de VOTRE responsabilité de déterminer s'il s'agit d'un type BIOS ou UEFI.\n" "Veuillez noter que CSM, qui peut être activé ou désactivé sur les machines de type UEFI, signifie 'émulation BIOS', et n'est pas vraiment UEFI." -t MSG_152 "Note: 'UEFI-CSM' signifie émulation BIOS sous UEFI (i.e. 'Legacy Mode') et n'est pas véritablement UEFI." +t MSG_151 "Note: 'UEFI-CSM' signifie que le périphérique démarrera seulement en mode émulation BIOS sous UEFI (i.e. 'Legacy Mode'), et non pas en mode UEFI natif." +t MSG_152 "Note: 'non CSM' signifie que le périphérique démarrera seulement en mode UEFI natif, et non pas en mode émulation BIOS (i.e. 'Legacy Mode')." t MSG_153 "Motif de test : 0x%02X" t MSG_154 "Motif de test : 0x%02X, 0x%02X" t MSG_155 "Motif de test : 0x%02X, 0x%02X, 0x%02X" @@ -5133,7 +5134,8 @@ t MSG_159 "Utilisez ce champ pour mettre à jour le nom du volume.\n" "Les caractères étendus et les accents sont acceptés" t MSG_160 "Affiche/Cache les options avancées " t MSG_161 "Détecte la présence de blocs défectueux en écrivant un motif de test" -t MSG_162 "Décochez cette case si vous voulez utiliser la méthode de formatage \"lente\" " +t MSG_162 "Décochez cette case si vous voulez utiliser la méthode de formatage \"lente\"" +t MSG_163 "Methode qui sera utilisée pour créer les partitions." t MSG_164 "Méthode à utiliser pour rendre le périphérique démarrable " t MSG_165 "Cliquez ici pour sélectionner une image..." t MSG_166 "Cochez cette case pour permettre l’affichage des caractères étendus/internationaux " diff --git a/src/dev.c b/src/dev.c index 5c742bd1..9dfa1390 100644 --- a/src/dev.c +++ b/src/dev.c @@ -84,8 +84,8 @@ static BOOL GetUSBProperties(char* parent_path, char* device_id, usb_device_prop uprintf("Could not open hub %s: %s", parent_path, WindowsErrorString()); goto out; } - memset(&conn_info, 0, sizeof(conn_info)); size = sizeof(conn_info); + memset(&conn_info, 0, size); conn_info.ConnectionIndex = (ULONG)props->port; // coverity[tainted_data_argument] if (!DeviceIoControl(handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, &conn_info, size, &conn_info, size, &size, NULL)) { @@ -105,8 +105,8 @@ static BOOL GetUSBProperties(char* parent_path, char* device_id, usb_device_prop // In their great wisdom, Microsoft decided to BREAK the USB speed report between Windows 7 and Windows 8 if (nWindowsVersion >= WINDOWS_8) { - memset(&conn_info_v2, 0, sizeof(conn_info_v2)); size = sizeof(conn_info_v2); + memset(&conn_info_v2, 0, size); conn_info_v2.ConnectionIndex = (ULONG)props->port; conn_info_v2.Length = size; conn_info_v2.SupportedUsbProtocols.Usb300 = 1; @@ -152,8 +152,8 @@ BOOL ResetDevice(int index) goto out; } - memset(&cycle_port, 0, sizeof(cycle_port)); size = sizeof(cycle_port); + memset(&cycle_port, 0, size); cycle_port.ConnectionIndex = DrivePort[index]; uprintf("Cycling port %d (reset) on %s", DrivePort[index], DriveHub.String[index]); // As per https://msdn.microsoft.com/en-us/library/windows/hardware/ff537340.aspx diff --git a/src/rufus.c b/src/rufus.c index 3fe3c774..0d8a7ad2 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -189,8 +189,10 @@ static void SetAllowedFileSystems(void) break; case BT_IMAGE: if (!HAS_WINDOWS(img_report) || (tt != TT_BIOS) || allow_dual_uefi_bios) { - allowed_filesystem[FS_FAT16] = TRUE; - allowed_filesystem[FS_FAT32] = TRUE; + if (!HAS_WINTOGO(img_report) || (ComboBox_GetCurSel(GetDlgItem(hMainDialog, IDC_IMAGE_OPTION)) != 1)) { + allowed_filesystem[FS_FAT16] = TRUE; + allowed_filesystem[FS_FAT32] = TRUE; + } } allowed_filesystem[FS_NTFS] = TRUE; break; @@ -336,7 +338,8 @@ static void SetPartitionSchemeAndTargetSystem(BOOL only_target) ComboBox_AddStringU(hTargetSystem, lmprintf(MSG_033)), TT_BIOS)); IGNORE_RETVAL(ComboBox_SetCurSel(hTargetSystem, 0)); tt = (int)ComboBox_GetItemData(hTargetSystem, ComboBox_GetCurSel(hTargetSystem)); - ShowWindow(GetDlgItem(hMainDialog, IDS_CSM_HELP_TXT), has_uefi_csm ? SW_SHOW : SW_HIDE); + // Can't update a tooltip from a thread, so we send a message instead + SendMessage(hMainDialog, UM_UPDATE_CSM_TOOLTIP, 0, 0); } // Populate the Allocation unit size field @@ -760,6 +763,7 @@ static void EnableControls(BOOL bEnable) bEnable = ((bt == BT_IMAGE) && (image_path != NULL) && (!img_report.is_iso)) ? FALSE : bEnable; EnableWindow(hPartitionScheme, bEnable); EnableWindow(hTargetSystem, bEnable); + EnableWindow(GetDlgItem(hMainDialog, IDS_CSM_HELP_TXT), bEnable); EnableWindow(hFileSystem, bEnable); EnableWindow(hClusterSize, bEnable); } @@ -2452,9 +2456,9 @@ static void InitDialog(HWND hDlg) CreateTooltip(GetDlgItem(hDlg, IDC_LIST_USB_HDD), lmprintf(MSG_170), -1); CreateTooltip(hStart, lmprintf(MSG_171), -1); CreateTooltip(GetDlgItem(hDlg, IDC_ABOUT), lmprintf(MSG_172), -1); - CreateTooltip(hPartitionScheme, lmprintf(MSG_150), -1); - CreateTooltip(hTargetSystem, lmprintf(MSG_151), 30000); - CreateTooltip(GetDlgItem(hDlg, IDS_CSM_HELP_TXT), lmprintf(MSG_152), 30000); + CreateTooltip(hPartitionScheme, lmprintf(MSG_163), -1); + CreateTooltip(hTargetSystem, lmprintf(MSG_150), 30000); + CreateTooltip(GetDlgItem(hDlg, IDS_CSM_HELP_TXT), lmprintf(MSG_151), 30000); CreateTooltip(GetDlgItem(hDlg, IDC_HASH), lmprintf(MSG_272), -1); CreateTooltip(GetDlgItem(hDlg, IDC_SAVE), lmprintf(MSG_304), -1); CreateTooltip(GetDlgItem(hDlg, IDC_IMAGE_OPTION), lmprintf(MSG_305), 30000); @@ -2875,6 +2879,9 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA nDeviceIndex = ComboBox_GetCurSel(hDeviceList); DeviceNum = (nDeviceIndex == CB_ERR) ? 0 : (DWORD)ComboBox_GetItemData(hDeviceList, nDeviceIndex); break; + case IDC_IMAGE_OPTION: + SetFileSystemAndClusterSize(NULL); + break; case IDC_NB_PASSES: if (HIWORD(wParam) != CBN_SELCHANGE) break; @@ -2884,7 +2891,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA if (HIWORD(wParam) != CBN_SELCHANGE) break; tt = (int)ComboBox_GetItemData(hTargetSystem, ComboBox_GetCurSel(hTargetSystem)); - ShowWindow(GetDlgItem(hMainDialog, IDS_CSM_HELP_TXT), ((tt == TT_BIOS) && (has_uefi_csm)) ? SW_SHOW : SW_HIDE); + SendMessage(hMainDialog, UM_UPDATE_CSM_TOOLTIP, 0, 0); SetFileSystemAndClusterSize(NULL); break; case IDC_PARTITION_TYPE: @@ -3132,6 +3139,10 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA } return (INT_PTR)TRUE; + case UM_UPDATE_CSM_TOOLTIP: + ShowWindow(GetDlgItem(hMainDialog, IDS_CSM_HELP_TXT), ((tt == TT_UEFI) || has_uefi_csm) ? SW_SHOW : SW_HIDE); + CreateTooltip(GetDlgItem(hMainDialog, IDS_CSM_HELP_TXT), lmprintf((tt == TT_UEFI) ? MSG_152 : MSG_151), 30000); + break; case UM_MEDIA_CHANGE: wParam = DBT_CUSTOMEVENT; // Fall through diff --git a/src/rufus.h b/src/rufus.h index f7d2081a..77d631b5 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -152,6 +152,7 @@ enum user_message_type { UM_PROGRESS_INIT, UM_PROGRESS_EXIT, UM_NO_UPDATE, + UM_UPDATE_CSM_TOOLTIP, // Start of the WM IDs for the language menu items UM_LANGUAGE_MENU = WM_APP + 0x100 };