mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] remove "Default allocation size" entry to use "(Default)" suffix instead
* also properly set media type when formatting
This commit is contained in:
parent
5065c02d63
commit
3e3126667e
3 changed files with 16 additions and 19 deletions
3
format.c
3
format.c
|
@ -139,7 +139,6 @@ static BOOL FormatDrive(char DriveLetter)
|
|||
PrintStatus("Formatting...");
|
||||
PF_INIT_OR_OUT(FormatEx, fmifs);
|
||||
|
||||
// TODO: properly set MediaType
|
||||
GetWindowTextW(hFileSystem, wFSType, ARRAYSIZE(wFSType));
|
||||
// We may have a " (Default)" trail
|
||||
for (i=0; i<wcslen(wFSType); i++) {
|
||||
|
@ -150,7 +149,7 @@ static BOOL FormatDrive(char DriveLetter)
|
|||
}
|
||||
GetWindowTextW(hLabel, wLabel, ARRAYSIZE(wLabel));
|
||||
uprintf("Using cluster size: %d bytes\n", ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize)));
|
||||
pfFormatEx(wDriveRoot, RemovableMedia, wFSType, wLabel,
|
||||
pfFormatEx(wDriveRoot, SelectedDrive.Geometry.MediaType, wFSType, wLabel,
|
||||
IsChecked(IDC_QUICKFORMAT), (ULONG)ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize)),
|
||||
FormatExCallback);
|
||||
if (!IS_ERROR(FormatStatus)) {
|
||||
|
|
20
rufus.c
20
rufus.c
|
@ -181,8 +181,8 @@ out:
|
|||
*/
|
||||
static BOOL SetClusterSizes(int FSType)
|
||||
{
|
||||
char szDefault[64];
|
||||
int i;
|
||||
char szClustSize[64];
|
||||
int i, default_index = 0;
|
||||
ULONG j;
|
||||
|
||||
IGNORE_RETVAL(ComboBox_ResetContent(hClusterSize));
|
||||
|
@ -198,20 +198,18 @@ static BOOL SetClusterSizes(int FSType)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// Yes, I know there exist more efficient ways...
|
||||
for(i=0,j=SelectedDrive.ClusterSize[FSType].Default>>10;j;i++,j>>=1);
|
||||
safe_sprintf(szDefault, sizeof(szDefault), "Default allocation size (%s)", ClusterSizeLabel[i]);
|
||||
|
||||
IGNORE_RETVAL(ComboBox_SetItemData(hClusterSize, ComboBox_AddStringU(hClusterSize, szDefault),
|
||||
SelectedDrive.ClusterSize[FSType].Default));
|
||||
|
||||
for(i=0,j=0x200;j<0x10000000;i++,j<<=1) {
|
||||
if (j & SelectedDrive.ClusterSize[FSType].Allowed) {
|
||||
IGNORE_RETVAL(ComboBox_SetItemData(hClusterSize, ComboBox_AddStringU(hClusterSize, ClusterSizeLabel[i]), j));
|
||||
safe_sprintf(szClustSize, sizeof(szClustSize), "%s", ClusterSizeLabel[i]);
|
||||
if (j == SelectedDrive.ClusterSize[FSType].Default) {
|
||||
safe_strcat(szClustSize, sizeof(szClustSize), " (Default)");
|
||||
default_index = i;
|
||||
}
|
||||
IGNORE_RETVAL(ComboBox_SetItemData(hClusterSize, ComboBox_AddStringU(hClusterSize, szClustSize), j));
|
||||
}
|
||||
}
|
||||
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hClusterSize, 0));
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hClusterSize, default_index));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
12
rufus.rc
12
rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 263
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.0.0.66"
|
||||
CAPTION "Rufus v1.0.0.67"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,223,50,14
|
||||
|
@ -63,7 +63,7 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
|
||||
CONTROL "<a href=""https://github.com/pbatard/rufus/wiki/Rufus"">https://github.com/pbatard/rufus</a>",IDC_ABOUT_RUFUS_URL,
|
||||
"SysLink",WS_TABSTOP,46,47,114,9
|
||||
LTEXT "Version 1.0.0 (Build 66)",IDC_STATIC,46,19,78,8
|
||||
LTEXT "Version 1.0.0 (Build 67)",IDC_STATIC,46,19,78,8
|
||||
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
|
||||
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
|
||||
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
|
||||
|
@ -162,8 +162,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,66
|
||||
PRODUCTVERSION 1,0,0,66
|
||||
FILEVERSION 1,0,0,67
|
||||
PRODUCTVERSION 1,0,0,67
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -180,13 +180,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "akeo.ie"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.0.0.66"
|
||||
VALUE "FileVersion", "1.0.0.67"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.0.0.66"
|
||||
VALUE "ProductVersion", "1.0.0.67"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue