From 3e3126667e23dced27dec0a1963c0e5f4f076b3c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 4 Dec 2011 20:13:51 +0000 Subject: [PATCH] [ui] remove "Default allocation size" entry to use "(Default)" suffix instead * also properly set media type when formatting --- format.c | 3 +-- rufus.c | 20 +++++++++----------- rufus.rc | 12 ++++++------ 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/format.c b/format.c index 33e7e4d2..a9b7c41f 100644 --- a/format.c +++ b/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>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; } diff --git a/rufus.rc b/rufus.rc index 7f7e3940..8df7f686 100644 --- a/rufus.rc +++ b/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 "https://github.com/pbatard/rufus",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"