summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-19 14:11:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-19 14:11:25 +0000
commit6be9b9c1dd00da5ecd33cbc20ece4162ba56c402 (patch)
tree73fbf2e3632a8372d8102a07c4f374b3289c7e97 /plugins/New_GPG/src/main.cpp
parente4a8fd6f323b262018bae68bfe87da65cf2092c0 (diff)
db_mc_tryMeta applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@9860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/main.cpp')
-rwxr-xr-xplugins/New_GPG/src/main.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 49651b7fb8..97ba1eabe9 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -2271,11 +2271,10 @@ void ImportKey()
MCONTACT hContact = new_key_hcnt;
new_key_hcnt_mutex.unlock();
bool for_all_sub = false;
- if(metaIsProtoMetaContacts(hContact))
+ if(db_mc_isMeta(hContact)) {
if(MessageBox(0, TranslateT("Do you want to load key for all subcontacts?"), TranslateT("Metacontact detected"), MB_YESNO) == IDYES)
for_all_sub = true;
- if(metaIsProtoMetaContacts(hContact))
- {
+
if(for_all_sub)
{
int count = db_mc_getSubCount(hContact);
@@ -2286,11 +2285,10 @@ void ImportKey()
db_set_ts(hcnt, szGPGModuleName, "GPGPubKey", new_key.c_str());
}
}
- else
- db_set_ts(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str());
+ else db_set_ts(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str());
}
- else
- db_set_ts(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str());
+ else db_set_ts(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str());
+
new_key.clear();
{ //gpg execute block
std::vector<wstring> cmd;
@@ -2306,7 +2304,7 @@ void ImportKey()
_tcscat(tmp2, _T("temporary_exported.asc"));
boost::filesystem::remove(tmp2);
wfstream f(tmp2, std::ios::out);
- if(metaIsProtoMetaContacts(hContact))
+ if(db_mc_isMeta(hContact))
ptmp = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", _T(""));
else
ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));
@@ -2328,7 +2326,7 @@ void ImportKey()
if(result == pxNotFound)
return;
{
- if(metaIsProtoMetaContacts(hContact))
+ if(db_mc_isMeta(hContact))
{
if(for_all_sub)
{