From c832814af010aae7ac115b1a1347ca94871367ff Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 18 Aug 2018 17:38:23 +0100 Subject: [PATCH] [ui] small fixes for RTL languages --- src/rufus.c | 11 +++-------- src/rufus.rc | 10 +++++----- src/stdio.c | 2 +- src/stdlg.c | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/rufus.c b/src/rufus.c index 2782af6d..e887c938 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -1521,14 +1521,9 @@ static void InitDialog(HWND hDlg) for (i=0; (i<3) && ((token = strtok(NULL, ".")) != NULL); i++) rufus_version[i] = (uint16_t)atoi(token); - // Redefine the title to be able to add "Alpha" or "Beta" and get the version in the right order for RTL - if (!right_to_left_mode) { - static_sprintf(tmp, APPLICATION_NAME " %d.%d.%d%s%s", rufus_version[0], rufus_version[1], rufus_version[2], - IsAlphaOrBeta(), (ini_file != NULL)?"(Portable)":""); - } else { - static_sprintf(tmp, "%s%s%d.%d.%d " APPLICATION_NAME, (ini_file != NULL)?"(Portable)":"", IsAlphaOrBeta(), - rufus_version[0], rufus_version[1], rufus_version[2]); - } + // Redefine the title to be able to add "Alpha" or "Beta" + static_sprintf(tmp, APPLICATION_NAME " %d.%d.%d%s%s", rufus_version[0], rufus_version[1], rufus_version[2], + IsAlphaOrBeta(), (ini_file != NULL)?"(Portable)":""); SetWindowTextU(hDlg, tmp); // Now that we have a title, we can find the handle of our Dialog dialog_handle = FindWindowA(NULL, tmp); diff --git a/src/rufus.rc b/src/rufus.rc index bde0a8c7..c4014c8c 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -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.2.1371" +CAPTION "Rufus 3.2.1372" 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,2,1371,0 - PRODUCTVERSION 3,2,1371,0 + FILEVERSION 3,2,1372,0 + PRODUCTVERSION 3,2,1372,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.2.1371" + VALUE "FileVersion", "3.2.1372" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus-3.2.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.2.1371" + VALUE "ProductVersion", "3.2.1372" END END BLOCK "VarFileInfo" diff --git a/src/stdio.c b/src/stdio.c index 4353d6a4..67b1bb2d 100644 --- a/src/stdio.c +++ b/src/stdio.c @@ -219,7 +219,7 @@ char* SizeToHumanReadable(uint64_t size, BOOL copy_to_log, BOOL fake_units) } else { t = (double)upo2((uint16_t)hr_size); i_size = (uint16_t)((fabs(1.0f-(hr_size / t)) < 0.05f)?t:hr_size); - static_sprintf(str_size, "%s%d%s%s", dir, i_size, dir, _msg_table[MSG_020+suffix-MSG_000]); + static_sprintf(str_size, "%s%d%s %s", dir, i_size, dir, _msg_table[MSG_020+suffix-MSG_000]); } } else { static_sprintf(str_size, (hr_size * 10.0 - (floor(hr_size) * 10.0)) < 0.5? diff --git a/src/stdlg.c b/src/stdlg.c index a7067b1d..1b279772 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -571,7 +571,7 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP ResizeButtonHeight(hDlg, IDOK); static_sprintf(about_blurb, about_blurb_format, lmprintf(MSG_174|MSG_RTF), lmprintf(MSG_175|MSG_RTF, rufus_version[0], rufus_version[1], rufus_version[2]), - right_to_left_mode?"Akeo \\\\ Pete Batard 2011-2018 © Copyright":"Copyright © 2011-2018 Pete Batard / Akeo", + "Copyright © 2011-2018 Pete Batard / Akeo", lmprintf(MSG_176|MSG_RTF), lmprintf(MSG_177|MSG_RTF), lmprintf(MSG_178|MSG_RTF)); for (i=0; i