diff options
-rw-r--r-- | commonheaders.h | 1 | ||||
-rw-r--r-- | icons.cpp | 3 | ||||
-rw-r--r-- | init.cpp | 2 | ||||
-rw-r--r-- | metacontacts.cpp | 6 | ||||
-rw-r--r-- | options.cpp | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/commonheaders.h b/commonheaders.h index 49a1b4d..1faf221 100644 --- a/commonheaders.h +++ b/commonheaders.h @@ -44,6 +44,7 @@ using std::fstream; //boost #include <boost/thread/thread.hpp> #include <boost/thread/mutex.hpp> +//#include <boost/lexical_cast.hpp> //miranda #include <newpluginapi.h> @@ -102,7 +102,8 @@ void setClistIcon(HANDLE hContact) void setSrmmIcon(HANDLE hContact) { - bool enabled = isContactSecured(hContact); + hContact = metaGetCurrent(hContact); + bool enabled = isContactSecured(hContact); HANDLE hMC = metaGetContact(hContact); if(ServiceExists(MS_MSG_MODIFYICON)) { // обновить иконки в srmm @@ -228,7 +228,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) extern "C" int __declspec(dllexport) Unload(void) -{ +{
for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0)) DBDeleteContactSetting(hContact, szGPGModuleName, "KeyID_Prescense"); mir_free(inopentag); diff --git a/metacontacts.cpp b/metacontacts.cpp index b0eb8bf..d1e959c 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -75,9 +75,9 @@ HANDLE metaGetCurrent(HANDLE hContact) { if(!metaIsProtoMetaContacts(hContact)) return hContact; - HANDLE hcnt = metaGetDefault(hContact); - if(!IsOnline(hcnt)) - hcnt = metaGetMostOnline(hContact); + HANDLE hcnt = metaGetMostOnline (hContact); + if(!hcnt) + hcnt = metaGetDefault(hContact); return hcnt; } return hContact; diff --git a/options.cpp b/options.cpp index 7061f39..9836d67 100644 --- a/options.cpp +++ b/options.cpp @@ -637,7 +637,7 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP } } char *tmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "KeyID_Prescense", ""); - if(strlen(tmp) > 0) + if(tmp[0]) { char *tmp2 = UniGetContactSettingUtf(hcnt, szGPGModuleName, "KeyID", ""); if(strlen(tmp2) == 0) |