summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/New_GPG/src/ui.cpp9
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp4
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();
}