From 59822f2c393d553d43adb4a5eb8daf77609063f2 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 22 Mar 2011 14:09:37 +0200 Subject: new threading code (part 2, usable) --- metacontacts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'metacontacts.cpp') diff --git a/metacontacts.cpp b/metacontacts.cpp index 30d3a75..c451d9f 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -58,14 +58,14 @@ HANDLE metaGetMostOnline(HANDLE hContact) if(bMetaContacts) return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0); - return 0; + return hContact; } HANDLE metaGetDefault(HANDLE hContact) { if(bMetaContacts) return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0); - return 0; + return hContact; } HANDLE metaGetCurrent(HANDLE hContact) -- cgit v1.2.3 From 6890c7c42b314e31902cf174ad2ce1bdb8f62e1c Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 31 Mar 2011 20:32:41 +0300 Subject: fixed another metacontacts problem, optimized some functions --- metacontacts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'metacontacts.cpp') diff --git a/metacontacts.cpp b/metacontacts.cpp index c451d9f..8e282c6 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -43,7 +43,7 @@ HANDLE metaGetContact(HANDLE hContact) { if(bMetaContacts) return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); - return 0; + return hContact; } bool metaIsSubcontact(HANDLE hContact) { -- cgit v1.2.3 From 8cdda41b119526a2741938d57b7e066e1697315b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 1 Apr 2011 02:20:17 +0300 Subject: hm )) --- metacontacts.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'metacontacts.cpp') diff --git a/metacontacts.cpp b/metacontacts.cpp index 8e282c6..46185e4 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -42,7 +42,8 @@ bool metaIsDefaultSubContact(HANDLE hContact) HANDLE metaGetContact(HANDLE hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); + if(metaIsSubcontact(hContact)) + return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); return hContact; } bool metaIsSubcontact(HANDLE hContact) @@ -57,32 +58,19 @@ HANDLE metaGetMostOnline(HANDLE hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,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); + if(metaIsProtoMetaContacts(hContact)) + return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0); return hContact; } -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; -} - DWORD metaGetContactsNum(HANDLE hContact) { -- cgit v1.2.3