From 6be9b9c1dd00da5ecd33cbc20ece4162ba56c402 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 Jul 2014 14:11:25 +0000 Subject: db_mc_tryMeta applied git-svn-id: http://svn.miranda-ng.org/main/trunk@9860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/src/CContactList.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/MirandaG15/src/CContactList.cpp') diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index 904090ddd8..3f951be342 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -81,7 +81,7 @@ CContactListEntry *CContactList::GetContactData(CListEntry *pItem = NULL; - if((!CAppletManager::IsSubContact(hContact) && !CConfig::GetBoolSetting(CLIST_USEGROUPS)) || strGroup.empty()) + if((!db_mc_isSub(hContact) && !CConfig::GetBoolSetting(CLIST_USEGROUPS)) || strGroup.empty()) { pItem = AddItem(psContact); ((CListContainer*)this)->sort(CContactList::CompareEntries); @@ -180,7 +180,7 @@ void CContactList::AddContact(MCONTACT hContact) } pItem = pGroup->AddItem(psContact); - if(!CAppletManager::IsSubContact(hContact) && iStatus != ID_STATUS_OFFLINE) + if(!db_mc_isSub(hContact) && iStatus != ID_STATUS_OFFLINE) ChangeGroupObjectCounters(pGroup->GetGroupData()->strPath,0,1); pGroup->sort(CContactList::CompareEntries); @@ -220,7 +220,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { if(db_get_b(pEntry->hHandle,"CList","Hidden",0)) return false; - if(CAppletManager::IsSubContact(pEntry->hHandle)) { + if(db_mc_isSub(pEntry->hHandle)) { MCONTACT hMetaContact = db_mc_getMeta(pEntry->hHandle); if(db_get_b(hMetaContact,"CList","Hidden",0)) return false; @@ -266,10 +266,10 @@ void CContactList::RemoveContact(MCONTACT hContact) { // Update the contacts group if it has one if(pGroup->GetType() != ROOT) { - if(!CAppletManager::IsSubContact(hContact) && pEntry->iStatus != ID_STATUS_OFFLINE) + if(!db_mc_isSub(hContact) && pEntry->iStatus != ID_STATUS_OFFLINE) ChangeGroupObjectCounters(pGroup->GetGroupData()->strPath,0,-1); - if(!CAppletManager::IsSubContact(hContact) && pEntry->iMessages > 0) + if(!db_mc_isSub(hContact) && pEntry->iMessages > 0) ChangeGroupObjectCounters(pGroup->GetGroupData()->strPath,0,0,-pEntry->iMessages); } @@ -739,10 +739,10 @@ void CContactList::OnStatusChange(MCONTACT hContact,int iStatus) CListContainer* pGroup = ((CListContainer*)pContactEntry->GetParent()); if(pGroup->GetType() != ROOT) { - if(!CAppletManager::IsSubContact(hContact) && iStatus == ID_STATUS_OFFLINE && iOldStatus != ID_STATUS_OFFLINE) + if(!db_mc_isSub(hContact) && iStatus == ID_STATUS_OFFLINE && iOldStatus != ID_STATUS_OFFLINE) ChangeGroupObjectCounters(pGroup->GetGroupData()->strPath,0,-1); - else if(!CAppletManager::IsSubContact(hContact) && iStatus != ID_STATUS_OFFLINE && iOldStatus == ID_STATUS_OFFLINE) + else if(!db_mc_isSub(hContact) && iStatus != ID_STATUS_OFFLINE && iOldStatus == ID_STATUS_OFFLINE) ChangeGroupObjectCounters(pGroup->GetGroupData()->strPath,0,1); } @@ -796,7 +796,7 @@ void CContactList::OnContactAdded(MCONTACT hContact) if(!pGroup) pGroup = CreateGroupObjectByPath(strGroup); - if(!CAppletManager::IsSubContact(hContact)) + if(!db_mc_isSub(hContact)) ChangeGroupObjectCounters(strGroup,1); } } @@ -817,7 +817,7 @@ void CContactList::OnContactDeleted(MCONTACT hContact) CContactListGroup *pGroup = GetGroupObjectByPath(strGroup); - if(!CAppletManager::IsSubContact(hContact)) + if(!db_mc_isSub(hContact)) ChangeGroupObjectCounters(strGroup,-1); if(pGroup->iMembers <= 0) @@ -851,7 +851,7 @@ void CContactList::OnContactGroupChanged(MCONTACT hContact,tstring strGroup) if(pContainer->GetType() != ROOT) { pOldGroup = pContainer->GetGroupData(); - if(!CAppletManager::IsSubContact(hContact)) + if(!db_mc_isSub(hContact)) ChangeGroupObjectCounters(pOldGroup->strPath,-1); } @@ -861,7 +861,7 @@ void CContactList::OnContactGroupChanged(MCONTACT hContact,tstring strGroup) CContactListGroup *pGroup = GetGroupObjectByPath(strGroup); if(!pGroup) pGroup = CreateGroupObjectByPath(strGroup); - if(!CAppletManager::IsSubContact(hContact)) + if(!db_mc_isSub(hContact)) ChangeGroupObjectCounters(strGroup,1); } @@ -1043,7 +1043,7 @@ void CContactList::InitializeGroupObjects() pGroup = CreateGroupObjectByPath(strGroup); // update it's counters - if(!CAppletManager::IsSubContact(hContact)) + if(!db_mc_isSub(hContact)) ChangeGroupObjectCounters(strGroup,1); } -- cgit v1.2.3