void cli_AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int updateTotalCount,int checkHideOffline)
{
	struct ClcGroup *group;
	struct ClcContact * cont;
	pdisplayNameCacheEntry cacheEntry=(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact);
	if(dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_cache_nHiddenSubcontact) return;		//contact should not be added
	if(!dat->IsMetaContactsEnabled && cacheEntry && g_szMetaModuleName && !mir_strcmp(cacheEntry->m_cache_cszProto,g_szMetaModuleName)) return;
	corecli.pfnAddContactToTree(hwnd,dat,hContact,updateTotalCount,checkHideOffline);
	if (FindItem(hwnd,dat,hContact,&cont,&group,NULL,FALSE))
		_LoadDataToContact(cont, group, dat, hContact);
	return;
}
Esempio n. 2
0
void cli_AddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
{
	ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
	if (dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_bIsSub)
		return;		//contact should not be added

	if (!dat->IsMetaContactsEnabled && cacheEntry && !mir_strcmp(cacheEntry->m_cache_cszProto, META_PROTO))
		return;

	corecli.pfnAddContactToTree(hwnd, dat, hContact, updateTotalCount, checkHideOffline);

	ClcGroup *group;
	ClcContact *cont;
	if (FindItem(hwnd, dat, hContact, &cont, &group, NULL, FALSE))
		_LoadDataToContact(cont, group, dat, hContact);
}
Esempio n. 3
0
static ClcContact* AddContactToGroup(ClcData *dat, ClcGroup *group, ClcCacheEntry *cacheEntry)
{
	if (cacheEntry == NULL) return NULL;
	if (group == NULL) return NULL;
	if (dat == NULL) return NULL;
	MCONTACT hContact = cacheEntry->hContact;
	dat->needsResort = 1;
	int i;
	for (i = group->cl.count - 1; i >= 0; i--)
		if (group->cl.items[i]->type != CLCIT_INFO || !(group->cl.items[i]->flags&CLCIIF_BELOWCONTACTS)) break;
	i = cli_AddItemToGroup(group, i + 1);

	_LoadDataToContact(group->cl.items[i], group, dat, hContact);
	cacheEntry = pcli->pfnGetCacheEntry(hContact);
	ClearRowByIndexCache();
	return group->cl.items[i];
}
static struct ClcContact * AddContactToGroup(struct ClcData *dat,struct ClcGroup *group, pdisplayNameCacheEntry cacheEntry)
{
	HANDLE hContact;
	int i;
	if (cacheEntry==NULL) return NULL;
	if (group==NULL) return NULL;
	if (dat==NULL) return NULL;
	hContact=cacheEntry->m_cache_hContact;
	dat->NeedResort=1;
	for(i=group->cl.count-1;i>=0;i--)
		if(group->cl.items[i]->type!=CLCIT_INFO || !(group->cl.items[i]->flags&CLCIIF_BELOWCONTACTS)) break;
	i=cli_AddItemToGroup(group,i+1);

	_LoadDataToContact(group->cl.items[i], group, dat, hContact);
	cacheEntry=(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact);
	ClearRowByIndexCache();
	return group->cl.items[i];
}