From 11e52f62107c6be76b9a56bb95b7682e08e8c1ac Mon Sep 17 00:00:00 2001 From: jthedering <51533355+jthedering@users.noreply.github.com> Date: Sat, 25 Jan 2014 16:40:17 +0000 Subject: [PATCH] Fixed: Configurator requested unneeded reboot on Windows versions before 8.1 Fixed: Configurator language was German on French Windows version --- Configurator/Configurator.cpp | 14 +++++++------- Configurator/Configurator.rc | Bin 14594 -> 15258 bytes 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Configurator/Configurator.cpp b/Configurator/Configurator.cpp index 58a4663..45443dc 100644 --- a/Configurator/Configurator.cpp +++ b/Configurator/Configurator.cpp @@ -241,12 +241,12 @@ bool Configurator::onButtonClicked(unsigned sourceId) OpenClipboard(hDlg); - HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (command.length() + 1) * sizeof(wchar_t)); + HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (command.length() + 1) * sizeof(wchar_t)); wchar_t* data = (wchar_t*)GlobalLock(hData); - memcpy(data, command.c_str(), (command.length() + 1) * sizeof(wchar_t)); - GlobalUnlock(data); - - SetClipboardData(CF_UNICODETEXT, hData); + memcpy(data, command.c_str(), (command.length() + 1) * sizeof(wchar_t)); + GlobalUnlock(data); + + SetClipboardData(CF_UNICODETEXT, hData); CloseClipboard(); } @@ -269,7 +269,7 @@ bool Configurator::onButtonClicked(unsigned sourceId) LoadStringW(hInstance, IDS_AFTERINSTALL, stringBuf, sizeof(stringBuf)/sizeof(wchar_t)); MessageBoxW(hDlg, stringBuf, L"Info", MB_ICONINFORMATION | MB_OK); } - else if(sourceId == IDOK) + else if(sourceId == IDOK && RegistryHelper::isWindowsVersionAtLeast(6, 3)) // Windows 8.1 { wchar_t captionBuf[255]; LoadStringW(hInstance, IDS_SHOULD_REBOOT_CAPTION, captionBuf, sizeof(captionBuf)/sizeof(wchar_t)); @@ -443,4 +443,4 @@ INT_PTR CALLBACK dlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) break; } return (INT_PTR)FALSE; -} +} \ No newline at end of file diff --git a/Configurator/Configurator.rc b/Configurator/Configurator.rc index 9557b0712bbb8f491ddfa98abbbc28d2b523d018..4e77efda69e7aacd5f2c17640262a466ca484c4e 100644 GIT binary patch delta 103 zcmZoFnpM7`LTU0DQ>o2yx&@q*b@Y}@juR8&)L;l@2xf3((473yTzGPW*sjSE;(V;} tAkoPS<+g6tP_AO(%w#BLP+%xw$e*mQBE9*T`YKj*eY$HlpEEOI0syfZAJhN< delta 49 zcmV-10M7rKcY<=Tcp|f=Eh+^Ga{y=nVE}9ZY?ECt8?*E>ss)p978aAhIHt2;Bccei HW;rwhz{e4+