summaryrefslogtreecommitdiff
path: root/metacontacts.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:24:07 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-01 02:24:07 +0300
commita7823b56a5b08f81248e83804349bc8e9fc61206 (patch)
tree9d2e3a7a558498be03513c96c35796b948418115 /metacontacts.cpp
parentb0e1bb306eec7f2d13ff385d4c1191646cc3e7f9 (diff)
parent8cdda41b119526a2741938d57b7e066e1697315b (diff)
Merge branch 'new_gpg' into new_gpg_autoexchange
Conflicts: messages.cpp
Diffstat (limited to 'metacontacts.cpp')
-rw-r--r--metacontacts.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/metacontacts.cpp b/metacontacts.cpp
index 30d3a75..46185e4 100644
--- a/metacontacts.cpp
+++ b/metacontacts.cpp
@@ -42,8 +42,9 @@ bool metaIsDefaultSubContact(HANDLE hContact)
HANDLE metaGetContact(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
- return 0;
+ if(metaIsSubcontact(hContact))
+ return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
+ return hContact;
}
bool metaIsSubcontact(HANDLE hContact)
{
@@ -57,30 +58,17 @@ HANDLE metaGetMostOnline(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
- return 0;
+ if(metaIsProtoMetaContacts(hContact))
+ return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
+ return hContact;
}
HANDLE metaGetDefault(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
- return 0;
-}
-
-HANDLE metaGetCurrent(HANDLE hContact)
-{
- bool IsOnline(HANDLE hContact);
- if(bMetaContacts)
- {
- if(!metaIsProtoMetaContacts(hContact))
- return hContact;
- HANDLE hcnt = metaGetMostOnline (hContact);
- if(!hcnt)
- hcnt = metaGetDefault(hContact);
- return hcnt;
- }
- return hContact;
+ if(metaIsProtoMetaContacts(hContact))
+ return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
+ return hContact;
}