summaryrefslogtreecommitdiff
path: root/src/modules/langpack/lpopts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-27 08:19:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-27 08:19:01 +0000
commit02e0b5fa1e53f956e91f44c6437635f0b087a2f1 (patch)
tree0c62558d818908858728df7998d6b9eca0d645b2 /src/modules/langpack/lpopts.cpp
parent50c5a4df6a314b42a695f6e53a2df10c7d20aba4 (diff)
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
Diffstat (limited to 'src/modules/langpack/lpopts.cpp')
-rw-r--r--src/modules/langpack/lpopts.cpp14
1 files changed, 5 insertions, 9 deletions
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));
}