From 0173277372e2962b8f5703a0ebad7892dda15e6c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 9 Mar 2014 21:50:49 +0000 Subject: end of the old MC API git-svn-id: http://svn.miranda-ng.org/main/trunk@8534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/src/CContactList.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins/MirandaG15/src/CContactList.cpp') 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;iiStatus == 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*)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