summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-01 01:28:48 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-01 01:28:48 +0300
commit089c1fb6bcbdb5ea07419486b78da9c3e120ee9c (patch)
tree1cf07b44871112d8fb54f848032bd899200b6dd3
parent6890c7c42b314e31902cf174ad2ce1bdb8f62e1c (diff)
)
-rw-r--r--icons.cpp10
-rw-r--r--messages.cpp1
-rw-r--r--utilities.cpp7
3 files changed, 9 insertions, 9 deletions
diff --git a/icons.cpp b/icons.cpp
index 1f4d353..a4099db 100644
--- a/icons.cpp
+++ b/icons.cpp
@@ -81,9 +81,11 @@ void setClistIcon(HANDLE hContact)
{
bool enabled = isContactSecured(hContact);
extern HANDLE g_hCLIcon;
- HANDLE hMC = metaGetContact(hContact);
+ HANDLE hMC = hContact;
+ if(metaIsProtoMetaContacts(hContact))
+ hMC = metaGetContact(hContact);
if(g_hCLIcon && enabled)
- { // обновить иконки в clist
+ {
HICON icon = IconLibGetIcon("secured");
IconExtraColumn iec = {0};
iec.cbSize = sizeof(iec);
@@ -104,7 +106,9 @@ void setSrmmIcon(HANDLE hContact)
{
hContact = metaGetCurrent(hContact);
bool enabled = isContactSecured(hContact);
- HANDLE hMC = metaGetContact(hContact);
+ HANDLE hMC = hContact;
+ if(metaIsProtoMetaContacts(hContact))
+ hMC = metaGetContact(hContact);
if(ServiceExists(MS_MSG_MODIFYICON))
{ // обновить иконки в srmm
StatusIconData sid = {0};
diff --git a/messages.cpp b/messages.cpp
index e1b3bdf..226445a 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -820,7 +820,6 @@ int SendMsgSvc(WPARAM w, LPARAM l)
{
mir_free(msg);
return CallService(MS_PROTO_CHAINSEND, w, l);
-// return returnNoError(ccs->hContact);
}
boost::thread *thr = new boost::thread(boost::bind(SendMsgSvc_func, ccs->hContact, msg, (DWORD)ccs->wParam));
return returnNoError(ccs->hContact);
diff --git a/utilities.cpp b/utilities.cpp
index f05ebed..201f359 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -975,12 +975,9 @@ void AddHandlers()
bool isContactSecured(HANDLE hContact)
{
- BYTE gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
- if(!gpg_enc)
- {
+ if(metaIsProtoMetaContacts(hContact))
hContact = metaGetContact(hContact);
- gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
- }
+ BYTE gpg_enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
if(!gpg_enc)
return false;
TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T(""));