diff --git a/src/localization.c b/src/localization.c index a3eaad3b..e713999f 100644 --- a/src/localization.c +++ b/src/localization.c @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Localization functions, a.k.a. "Everybody is doing it wrong but me!" - * Copyright © 2013-2015 Pete Batard + * Copyright © 2013-2016 Pete Batard * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -630,6 +630,6 @@ WORD get_language_id(loc_cmd* lcmd) } ubpushf("NOTE: No Windows Language Pack is installed for %s on this system.\r\n" - "This means that some controls will still be displayed using the system locale.", lcmd->txt[1]); + "This means that some controls may still be displayed using the system locale.", lcmd->txt[1]); return MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT); } diff --git a/src/localization.h b/src/localization.h index 1fa9e3c8..ddb0f01d 100644 --- a/src/localization.h +++ b/src/localization.h @@ -1,7 +1,7 @@ /* * Rufus: The Reliable USB Formatting Utility * Localization functions, a.k.a. "Everybody is doing it wrong but me!" - * Copyright © 2013-2014 Pete Batard + * Copyright © 2013-2016 Pete Batard * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/rufus.c b/src/rufus.c index 6d7da1b6..28811b82 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -888,7 +888,7 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; HFONT hf; - long lfHeight; + long lfHeight, style; DWORD log_size; char *log_buffer = NULL, *filepath; EXT_DECL(log_ext, "rufus.log", __VA_GROUP__("*.log"), __VA_GROUP__("Rufus log")); @@ -896,6 +896,7 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_INITDIALOG: apply_localization(IDD_LOG, hDlg); hLog = GetDlgItem(hDlg, IDC_LOG_EDIT); + // Increase the size of our log textbox to MAX_LOG_SIZE (unsigned word) PostMessage(hLog, EM_LIMITTEXT, MAX_LOG_SIZE , 0); // Set the font to Unicode so that we can display anything @@ -908,6 +909,18 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SendDlgItemMessageA(hDlg, IDC_LOG_EDIT, WM_SETFONT, (WPARAM)hf, TRUE); // Set 'Close Log' as the selected button SendMessage(hDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlg, IDCANCEL), TRUE); + + // Suppress any inherited RTL flags from our edit control's style. Otherwise + // the displayed text becomes a mess due to Windows trying to interpret + // dots, parenthesis, columns and so on in an RTL context... + // We also take this opportunity to fix the scroll bar and text alignment. + style = GetWindowLong(hLog, GWL_EXSTYLE); + style &= ~(WS_EX_RTLREADING | WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR); + SetWindowLong(hLog, GWL_EXSTYLE, style); + style = GetWindowLong(hLog, GWL_STYLE); + style &= ~(ES_RIGHT); + SetWindowLong(hLog, GWL_STYLE, style); + break; case WM_COMMAND: switch (LOWORD(wParam)) { @@ -2835,7 +2848,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine }; // Disable loading system DLLs from the current directory (sideloading mitigation) +#ifndef DDKBUILD // WDK doesn't know about that one SetDllDirectoryA(""); +#endif uprintf("*** " APPLICATION_NAME " init ***\n"); diff --git a/src/rufus.rc b/src/rufus.rc index 4dcc3756..58e94ab3 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,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 EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.7.856" +CAPTION "Rufus 2.7.857" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -320,8 +320,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,7,856,0 - PRODUCTVERSION 2,7,856,0 + FILEVERSION 2,7,857,0 + PRODUCTVERSION 2,7,857,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -338,13 +338,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.7.856" + VALUE "FileVersion", "2.7.857" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.7.856" + VALUE "ProductVersion", "2.7.857" END END BLOCK "VarFileInfo"