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/UserInfoEx/src/psp_profile.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/UserInfoEx/src/psp_profile.cpp') diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index c63bc0e4ab..11a1b73eaf 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -1143,22 +1143,19 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR // scan all basic protocols for the subcontacts if (DB::Module::IsMetaAndScan(pszProto)) { - int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, hContact, NULL); + int iDefault = db_mc_getDefaultNum(hContact); MCONTACT hSubContact, hDefContact; LPCSTR pszSubBaseProto; - int j, numSubs; - if ((hDefContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, iDefault)) && - (pszSubBaseProto = DB::Contact::Proto(hDefContact))) - { + if ((hDefContact = db_mc_getSub(hContact, iDefault)) && (pszSubBaseProto = DB::Contact::Proto(hDefContact))) { if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hDefContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0) return FALSE; // copy the missing settings from the other subcontacts - numSubs = CallService(MS_MC_GETNUMCONTACTS, hContact, NULL); - for (j = 0; j < numSubs; j++) { + int numSubs = db_mc_getSubCount(hContact); + for (int j = 0; j < numSubs; j++) { if (j == iDefault) continue; - if (!(hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, j))) continue; + if (!(hSubContact = db_mc_getSub(hContact, j))) continue; if (!(pszSubBaseProto = DB::Contact::Proto(hSubContact))) continue; if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hSubContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0) return FALSE; -- cgit v1.2.3