diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-07-29 01:01:18 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-07-29 01:01:18 +0300 |
commit | 8ef18318d8f81a533c0e3bc5c10c76fec0be3b5f (patch) | |
tree | 88eb30555006e99e5cc446eee4520f3f955eae99 /srmm.cpp | |
parent | 191c2e330ab91f4b35860e08c5424667ed1893c5 (diff) | |
parent | 64c6452c697a05ab0b0d4bbbda167ddc35215397 (diff) |
Merge branch 'new_gpg' into new_gpg_autoexchangenew_gpg_autoexchange
Conflicts:
main.cpp
messages.cpp
Diffstat (limited to 'srmm.cpp')
-rwxr-xr-x[-rw-r--r--] | srmm.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,4 +1,4 @@ -// Copyright © 2010 SecureIM developers (baloo and others), sss
+// Copyright © 2010-2012 SecureIM developers (baloo and others), sss
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -34,9 +34,12 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) { int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
- HANDLE hMeta = hContact;
+ HANDLE hMeta = NULL;
if(metaIsProtoMetaContacts(hContact))
+ {
+ hMeta = hContact;
hContact = metaGetMostOnline(hContact); // возьмем тот, через который пойдет сообщение
+ }
else if(metaIsSubcontact(hContact))
hMeta = metaGetContact(hContact);
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
@@ -50,7 +53,7 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { if(enc)
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0);
- DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 0);
+ hMeta?DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 0):0;
setSrmmIcon(hContact);
setClistIcon(hContact);
}
@@ -68,7 +71,7 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { else
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 1);
- DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1);
+ hMeta?DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1):0;
setSrmmIcon(hContact);
setClistIcon(hContact);
return 0;
@@ -76,7 +79,7 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) { if(isContactHaveKey(hContact))
{
DBWriteContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 1);
- DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1);
+ hMeta?DBWriteContactSettingByte(hMeta, szGPGModuleName, "GPGEncryption", 1):0;
setSrmmIcon(hContact);
setClistIcon(hContact);
}
|