diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-21 13:33:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-21 13:33:15 +0000 |
commit | f88a78aab5585dce0eba9646790192c59151b71a (patch) | |
tree | fbe87f5b5cc908d9caf4a9ef6ecd3ac9725369f1 /src/modules/plugins/pluginopts.cpp | |
parent | 207dc7f6cf7717d1aec31c20215a944ae0079568 (diff) |
fix for umlauts in plugin's info
git-svn-id: http://svn.miranda-ng.org/main/trunk@3217 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins/pluginopts.cpp')
-rw-r--r-- | src/modules/plugins/pluginopts.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 2f64861b79..2d473a5cf8 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -235,6 +235,14 @@ static int CALLBACK SortPlugins(WPARAM i1, LPARAM i2, LPARAM lParamSort) return _tcscmp(p1->fileName, p2->fileName);
}
+static TCHAR* latin2t(const char *p)
+{
+ if (p == NULL)
+ return mir_tstrdup( _T(""));
+
+ return mir_a2t_cp(p, 1250);
+}
+
INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
@@ -354,14 +362,21 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar ListView_GetItemText(hwndList, hdr->iItem, 1, buf, SIZEOF(buf));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGININFOFRAME), sel ? buf : _T(""));
- SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), sel ? dat->author : "");
- SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), sel ? dat->authorEmail : "");
+ mir_ptr<TCHAR> tszAuthor( latin2t(sel ? dat->author : NULL));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), tszAuthor);
+
+ mir_ptr<TCHAR> tszEmail( latin2t(sel ? dat->authorEmail : NULL));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), tszEmail);
mir_ptr<TCHAR> p( Langpack_PcharToTchar(dat->description));
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? (TCHAR*)p : _T(""));
- SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), sel ? dat->copyright : "");
- SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINURL), sel ? dat->homepage : "");
+ mir_ptr<TCHAR> tszCopyright( latin2t(sel ? dat->copyright : NULL));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), tszCopyright);
+
+ mir_ptr<TCHAR> tszUrl( latin2t(sel ? dat->homepage : NULL));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINURL), tszUrl);
+
if (equalUUID(miid_last, dat->uuid))
SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINPID), sel ? TranslateT("<none>") : _T(""));
else {
|