diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-15 14:33:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-15 14:33:51 +0300 |
commit | 8b5bf4464597453a75453f1a0bac151372722250 (patch) | |
tree | 0dc5cfcf5f95cc215af79b7e82d7cc7f653f39c2 | |
parent | 16babdd1df52d927863ef0663b662dfea663b202 (diff) |
NewGPG: fix for utf8 at screen
-rwxr-xr-x | plugins/New_GPG/src/ui.cpp | 9 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp index a03b51e108..37ee942976 100755 --- a/plugins/New_GPG/src/ui.cpp +++ b/plugins/New_GPG/src/ui.cpp @@ -208,12 +208,9 @@ bool CDlgFirstRun::OnInitDialog() continue; if (StriStr(pa->szModuleName, "weather")) continue; - std::string acc = toUTF8(pa->tszAccountName); - acc += "("; - acc += pa->szModuleName; - acc += ")"; - //acc += "_KeyID"; - combo_ACCOUNT.AddStringA(acc.c_str()); + + CMStringW wszAcc(FORMAT, L"%s (%S)", pa->tszAccountName, pa->szModuleName); + combo_ACCOUNT.AddString(wszAcc); } combo_ACCOUNT.SelectString(TranslateT("Default")); string keyinfo = Translate("key ID"); diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 8318077ea9..b9e0c1bff7 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -847,10 +847,8 @@ static JABBER_HANDLER_FUNC PresenceHandler(IJabberInterface*, TiXmlElement* node string::size_type p1 = out.find("key ID ") + mir_strlen("key ID "); string::size_type p2 = out.find("\n", p1); if (p1 != string::npos && p2 != string::npos) { - MCONTACT hContact = NULL; - for (auto p : globals.Accounts) { - hContact = p->getJabberInterface()->ContactFromJID(node->Attribute("from")); + MCONTACT hContact = p->getJabberInterface()->ContactFromJID(node->Attribute("from")); if (hContact) globals.hcontact_data[hContact].key_in_prescense = out.substr(p1, p2 - p1 - 1).c_str(); } |