From f88a78aab5585dce0eba9646790192c59151b71a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 21 Jan 2013 13:33:15 +0000 Subject: fix for umlauts in plugin's info git-svn-id: http://svn.miranda-ng.org/main/trunk@3217 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/init.cpp | 4 ++-- src/modules/options/options.cpp | 2 +- src/modules/plugins/pluginopts.cpp | 23 +++++++++++++++++++---- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 601c4e93e6..ef2c5ea8f8 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -44,9 +44,9 @@ PLUGININFOEX pluginInfo = { "IcqOscarJ Protocol", __VERSION_DWORD, "ICQ protocol support for Miranda NG.", - "Joe Kucera, Bio, Martin Öberg, Richard Hughes, Jon Keating, etc", + "Joe Kucera, Bio, Martin \xd6" "berg, Richard Hughes, Jon Keating, etc", "jokusoftware@miranda-im.org", - "(C) 2000-2010 M.Öberg, R.Hughes, J.Keating, Bio, Angeli-Ka, G.Hazan, J.Kucera", + "(C) 2000-2010 M.\xd6" "berg, R.Hughes, J.Keating, Bio, Angeli-Ka, G.Hazan, J.Kucera", "http://miranda-ng.org/", UNICODE_AWARE, //doesn't replace anything built-in {0x73a9615c, 0x7d4e, 0x4555, {0xba, 0xdb, 0xee, 0x5, 0xdc, 0x92, 0x8e, 0xff}} // {73A9615C-7D4E-4555-BADB-EE05DC928EFF} diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index c238f4938e..b8486f7bba 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -145,8 +145,8 @@ static HTREEITEM FindNamedTreeItemAtChildren(HWND hwndTree, HTREEITEM hItem, con static BOOL CALLBACK BoldGroupTitlesEnumChildren(HWND hwnd, LPARAM lParam) { TCHAR szClass[64]; - GetClassName(hwnd, szClass, SIZEOF(szClass)); + if ( !lstrcmp(szClass, _T("Button")) && (GetWindowLongPtr(hwnd, GWL_STYLE)&0x0F) == BS_GROUPBOX) SendMessage(hwnd, WM_SETFONT, lParam, 0); return TRUE; 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 tszAuthor( latin2t(sel ? dat->author : NULL)); + SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), tszAuthor); + + mir_ptr tszEmail( latin2t(sel ? dat->authorEmail : NULL)); + SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), tszEmail); mir_ptr 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 tszCopyright( latin2t(sel ? dat->copyright : NULL)); + SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), tszCopyright); + + mir_ptr 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("") : _T("")); else { -- cgit v1.2.3