예제 #1
0
void UnloadContactListModule()
{
	if (!hCListImages)
		return;

	// remove transitory contacts
	for (MCONTACT hContact = db_find_first(); hContact != NULL; ) {
		MCONTACT hNext = db_find_next(hContact);
		if (db_get_b(hContact, "CList", "NotOnList", 0))
			CallService(MS_DB_CONTACT_DELETE, hContact, 0);
		hContact = hNext;
	}
	ImageList_Destroy(hCListImages);
	UninitCListEvents();
	DestroyHookableEvent(hContactDoubleClicked);
}
예제 #2
0
static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam)
{
	HANDLE hContact,hNext;

	//remove transitory contacts
	hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
	while(hContact!=NULL) {
		hNext=(HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0);
		if(DBGetContactSettingByte(hContact,"CList","NotOnList",0))
			CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
		hContact=hNext;
	}
	ImageList_Destroy(hCListImages);
	UnhookEvent(hProtoAckHook);
	UnhookEvent(hSettingChanged);
	UninitCustomMenus();
	UninitCListEvents();
	FreeDisplayNameCache(&lContactsCache);
	if (protoIconIndex) mir_free(protoIconIndex);
	DestroyHookableEvent(hContactDoubleClicked);
	return 0;
}