diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-09 21:50:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-09 21:50:49 +0000 |
commit | 0173277372e2962b8f5703a0ebad7892dda15e6c (patch) | |
tree | d1ff4bbecbc00f8d77b9a71c71579de53246303c /plugins/MirandaG15/src | |
parent | 61dfdec9a37cc06a6ee624aaaf03df41f821c1c6 (diff) |
end of the old MC API
git-svn-id: http://svn.miranda-ng.org/main/trunk@8534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src')
-rw-r--r-- | plugins/MirandaG15/src/CContactList.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index c9f01b8187..fad2ae47a5 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -150,10 +150,10 @@ void CContactList::AddContact(MCONTACT hContact) pGroup->sort(CContactList::CompareEntries);
// check that all subcontacts exist
- int numContacts = CallService(MS_MC_GETNUMCONTACTS,hContact,0);
+ int numContacts = db_mc_getSubCount(hContact);
MCONTACT hSubContact = NULL;
for(int i=0;i<numContacts;i++) {
- hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, (LPARAM)i);
+ hSubContact = db_mc_getSub(hContact, i);
RemoveContact(hSubContact);
AddContact(hSubContact);
}
@@ -203,13 +203,12 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { }
} else {
if(pEntry->iStatus == ID_STATUS_OFFLINE) {
- DWORD dwNumContacts = (DWORD)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)pEntry->hHandle,0);
- for(DWORD i = 0; i < dwNumContacts; i++) {
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
+ int dwNumContacts = db_mc_getSubCount(pEntry->hHandle);
+ for(int i = 0; i < dwNumContacts; i++) {
+ MCONTACT hSubContact = db_mc_getSub(pEntry->hHandle,i);
char *szProto = GetContactProto(hSubContact);
- if(db_get_w(hSubContact,szProto,"Status",ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
+ if(db_get_w(hSubContact,szProto,"Status",ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
return true;
- }
}
}
}
@@ -279,9 +278,9 @@ void CContactList::RemoveContact(MCONTACT hContact) { else {
pGroup->RemoveGroup(((CListContainer<CContactListEntry*,CContactListGroup*>*)pContactEntry)->GetGroupData());
// Reenumerate all subcontacts (maybe MetaContacts was disabled
- int numContacts = CallService(MS_MC_GETNUMCONTACTS,hContact,0);
+ int numContacts = db_mc_getSubCount(hContact);
for(int i=0;i<numContacts;i++) {
- MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,hContact, (LPARAM)i);
+ MCONTACT hSubContact = db_mc_getSub(hContact, i);
if(!FindContact(hSubContact))
AddContact(hSubContact);
}
|