From 02e0b5fa1e53f956e91f44c6437635f0b087a2f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Mar 2014 08:19:01 +0000 Subject: langpack description now goes in utf8, not in the codepage from the header git-svn-id: http://svn.miranda-ng.org/main/trunk@8770 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/langpack/lpopts.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/modules/langpack/lpopts.cpp b/src/modules/langpack/lpopts.cpp index 80d657c31e..d0258dde6b 100644 --- a/src/modules/langpack/lpopts.cpp +++ b/src/modules/langpack/lpopts.cpp @@ -25,13 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "..\..\core\commonheaders.h" #include "langpack.h" -static void SetDlgItemText_CP(HWND hwndDlg, int ctrlID, int codepage, LPCSTR str) +static void SetDlgItemText_CP(HWND hwndDlg, int ctrlID, LPCSTR str) { - int cbSize = MultiByteToWideChar(codepage, 0, str, -1, NULL, 0); - WCHAR *wszBuf = (WCHAR*)_alloca(sizeof(WCHAR)*(cbSize + 1)); - MultiByteToWideChar(codepage, 0, str, -1, wszBuf, cbSize); - wszBuf[cbSize] = 0; - SetDlgItemTextW(hwndDlg, ctrlID, wszBuf); + SetDlgItemText(hwndDlg, ctrlID, ptrT(mir_utf8decodeT(str))); } static void DisplayPackInfo(HWND hwndDlg, const LANGPACK_INFO *pack) @@ -68,9 +64,9 @@ static void DisplayPackInfo(HWND hwndDlg, const LANGPACK_INFO *pack) SetDlgItemText(hwndDlg, IDC_LANGDATE, szDate); /* general */ - SetDlgItemText_CP(hwndDlg, IDC_LANGMODUSING, pack->codepage, pack->szLastModifiedUsing); - SetDlgItemText_CP(hwndDlg, IDC_LANGAUTHORS, pack->codepage, pack->szAuthors); - SetDlgItemText_CP(hwndDlg, IDC_LANGEMAIL, pack->codepage, pack->szAuthorEmail); + SetDlgItemText_CP(hwndDlg, IDC_LANGMODUSING, pack->szLastModifiedUsing); + SetDlgItemText_CP(hwndDlg, IDC_LANGAUTHORS, pack->szAuthors); + SetDlgItemText_CP(hwndDlg, IDC_LANGEMAIL, pack->szAuthorEmail); SetDlgItemText(hwndDlg, IDC_LANGINFOFRAME, TranslateTS(pack->tszLanguage)); } -- cgit v1.2.3