Beispiel #1
0
void applyExtraImage(MCONTACT hContact)
{
	int ignore = isIgnored(hContact, IGNOREEVENT_ALL);
	if (ignore == 1)
		ExtraIcon_SetIconByName(hExtraIcon, hContact, "ignore_full");
	else if (ignore == 0)
		ExtraIcon_Clear(hExtraIcon, hContact);
	else if (isIgnored(hContact, IGNOREEVENT_MESSAGE))
		ExtraIcon_SetIconByName(hExtraIcon, hContact, "ignore_mess");
	else
		ExtraIcon_SetIconByName(hExtraIcon, hContact, "ignore_part");
}
Beispiel #2
0
int onExtraImageApplying(WPARAM hContact, LPARAM)
{
	if (db_get_b(hContact, MODULENAME, "MissYou", 0))
		ExtraIcon_SetIconByName(hExtraIcon, hContact, "enabled_icon");

	return 0;
}
Beispiel #3
0
int ExtraIconsApply(WPARAM wParam, LPARAM lParam)
{
    if (wParam == NULL)
        return 0;

    if (hasMobileClient(wParam, lParam))
        ExtraIcon_SetIconByName(hExtraIcon, wParam, "mobile_icon");
    else
        ExtraIcon_Clear(hExtraIcon, wParam);

    return 0;
}
Beispiel #4
0
/**
 * Menu item click action
 */
INT_PTR MenuMissYouClick(WPARAM hContact, LPARAM)
{
	if (db_get_b(hContact, MODULENAME, "MissYou", 0)) {
		db_set_b(hContact, MODULENAME, "MissYou", 0);
		ExtraIcon_Clear(hExtraIcon, hContact);
	}
	else {
		db_set_b(hContact, MODULENAME, "MissYou", 1);
		ExtraIcon_SetIconByName(hExtraIcon, hContact, "enabled_icon");
	}

	return 0;
}
static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
	if (ghExtraIconSvc != INVALID_HANDLE_VALUE) {
		char *icoName;
		switch (GenderOf(hContact)) {
			case 'M':  icoName = ICO_COMMON_MALE;   break;
			case 'F':  icoName = ICO_COMMON_FEMALE; break;
			default:   icoName = NULL;
		}
		ExtraIcon_SetIconByName(ghExtraIconSvc, hContact, icoName);
	}
	return 0;
}
Beispiel #6
0
static void CALLBACK SetExtraImage(MCONTACT hContact)
{
	if (!bShowExtraIcon)
		return;
		
	int countryNumber = ServiceDetectContactOriginCountry(hContact, 0);
	if (countryNumber == 0xFFFF && !bUseUnknown)
		ExtraIcon_Clear(hExtraIcon, hContact);
	else {
		char szId[20];
		mir_snprintf(szId, (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber);
		ExtraIcon_SetIconByName(hExtraIcon, hContact, szId);
	}
}