From dd96e20eb908dbbecf1a17fdeee0c44ed8b3a974 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Jul 2012 19:03:51 +0000 Subject: slightly rewritten finger git-svn-id: http://svn.miranda-ng.org/main/trunk@1244 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FingerPrintModPlus/src/utilities.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'plugins/FingerPrintModPlus/src/utilities.cpp') diff --git a/plugins/FingerPrintModPlus/src/utilities.cpp b/plugins/FingerPrintModPlus/src/utilities.cpp index cd275caf77..5b623af54b 100644 --- a/plugins/FingerPrintModPlus/src/utilities.cpp +++ b/plugins/FingerPrintModPlus/src/utilities.cpp @@ -283,21 +283,9 @@ static LRESULT ControlAddStringUtf(HWND ctrl, DWORD msg, LPCSTR szString) LPSTR szItem = TranslateUtfStatic(szString, str, MAX_PATH); LRESULT item = -1; - if (gbUnicodeAPI) - { - LPWSTR wItem = make_unicode_string(szItem); - - item = SendMessageW(ctrl, msg, 0, (LPARAM)wItem); - SAFE_FREE(wItem); - } - else - { - size_t size = strlennull(szItem) + 2; - LPSTR aItem = (LPSTR)_alloca(size); - - if (utf8_decode_static(szItem, aItem, (int)size)) - item = SendMessageA(ctrl, msg, 0, (LPARAM)aItem); - } + LPWSTR wItem = make_unicode_string(szItem); + item = SendMessageW(ctrl, msg, 0, (LPARAM)wItem); + SAFE_FREE(wItem); return item; } -- cgit v1.2.3