summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-20 15:48:24 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-20 15:48:24 +0300
commitbad201c5132117e8b227021b12ff9e5377a98496 (patch)
tree16ec7d19ba8ab8e179b53c6854dd69f3fa50c665 /options.cpp
parent093731d35e605ede9798ace4ac73c77a51012a6c (diff)
fixed utf8 encoding in key list (finally ...)
Diffstat (limited to 'options.cpp')
-rwxr-xr-xoptions.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/options.cpp b/options.cpp
index 8efc0c2..0e952b7 100755
--- a/options.cpp
+++ b/options.cpp
@@ -151,10 +151,20 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
mir_free(tmp2);
ListView_SetItemText(hwndList, iRow, 1, (_tcslen(tmp) > 1)?tmp:_T("not set"));
mir_free(tmp);
- tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", _T(""));
+ char *tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", "");
+ if(!toUTF16(tmp2).empty())
+ tmp = mir_wstrdup(toUTF16(tmp2).c_str());
+ else
+ tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", _T(""));
+ mir_free(tmp2);
ListView_SetItemText(hwndList, iRow, 2, (_tcslen(tmp) > 1)?tmp:_T("not set"));
mir_free(tmp);
- tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", _T(""));
+ tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", "");
+ if(!toUTF16(tmp2).empty())
+ tmp = mir_wstrdup(toUTF16(tmp2).c_str());
+ else
+ tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", _T(""));
+ mir_free(tmp2);
ListView_SetItemText(hwndList, iRow, 3, (_tcslen(tmp) > 1)?tmp:_T("not set"));
mir_free(tmp);
if(DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0))