From 8cdda41b119526a2741938d57b7e066e1697315b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 1 Apr 2011 02:20:17 +0300 Subject: hm )) --- main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 3f8b70c..cccb846 100644 --- a/main.cpp +++ b/main.cpp @@ -1839,7 +1839,7 @@ void ImportKey() } } else - DBWriteContactSettingTString(metaGetCurrent(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str()); + DBWriteContactSettingTString(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", new_key.c_str()); } else DBWriteContactSettingTString(hContact, szGPGModuleName, "GPGPubKey", new_key.c_str()); @@ -1859,7 +1859,7 @@ void ImportKey() DeleteFile(tmp2); wfstream f(tmp2, std::ios::out); if(metaIsProtoMetaContacts(hContact)) - ptmp = UniGetContactSettingUtf(metaGetCurrent(hContact), szGPGModuleName, "GPGPubKey", _T("")); + ptmp = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", _T("")); else ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); wstring new_key = ptmp; @@ -1959,7 +1959,7 @@ void ImportKey() char *tmp = NULL; string::size_type s = output.find("gpg: key ") + strlen("gpg: key "); string::size_type s2 = output.find(":", s); - DBWriteContactSettingString(metaGetCurrent(hContact), szGPGModuleName, "KeyID", output.substr(s,s2-s).c_str()); + DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyID", output.substr(s,s2-s).c_str()); s2+=2; s = output.find("“", s2); if(s == string::npos) @@ -1976,7 +1976,7 @@ void ImportKey() tmp = new char [output.substr(s,s2-s-1).length()+1]; strcpy(tmp, output.substr(s,s2-s-1).c_str()); mir_utf8decode(tmp, 0); - DBWriteContactSettingString(metaGetCurrent(hContact), szGPGModuleName, "KeyMainName", tmp); + DBWriteContactSettingString(metaGetContact(hContact), szGPGModuleName, "KeyMainName", tmp); mir_free(tmp); if((s = output.find(")", s2)) == string::npos) s = output.find(">", s2); @@ -1988,14 +1988,14 @@ void ImportKey() tmp = new char [output.substr(s2,s-s2).length()+1]; strcpy(tmp, output.substr(s2,s-s2).c_str()); mir_utf8decode(tmp, 0); - DBWriteContactSettingString(metaGetCurrent(hContact), szGPGModuleName, "KeyComment", tmp); + DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyComment", tmp); mir_free(tmp); s+=3; s2 = output.find(">", s); tmp = new char [output.substr(s,s2-s).length()+1]; strcpy(tmp, output.substr(s,s2-s).c_str()); mir_utf8decode(tmp, 0); - DBWriteContactSettingString(metaGetCurrent(hContact), szGPGModuleName, "KeyMainEmail", tmp); + DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainEmail", tmp); mir_free(tmp); } else @@ -2003,10 +2003,10 @@ void ImportKey() tmp = new char [output.substr(s2,s-s2).length()+1]; strcpy(tmp, output.substr(s2,s-s2).c_str()); mir_utf8decode(tmp, 0); - DBWriteContactSettingString(metaGetCurrent(hContact), szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str()); + DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str()); mir_free(tmp); } - DBDeleteContactSetting(metaGetCurrent(hContact), szGPGModuleName, "bAlwatsTrust"); + DBDeleteContactSetting(metaGetMostOnline(hContact), szGPGModuleName, "bAlwatsTrust"); } } else -- cgit v1.2.3