summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/svc_reminder.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-03 17:32:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-03 17:32:37 +0000
commit31b191bc8ddb639e488ab8306f71ac1dbabf16f0 (patch)
treeaa661023372aa18381e46c7f6fcecf67856ac8ae /plugins/UserInfoEx/src/svc_reminder.cpp
parent6ba829af4e0c008865675b67b868f33d8e7641df (diff)
removing built-in Clist Modern extra icons part I
git-svn-id: http://svn.miranda-ng.org/main/trunk@2167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_reminder.cpp')
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp84
1 files changed, 28 insertions, 56 deletions
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index c26e2027e6..bfde666a9b 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -268,58 +268,32 @@ static HANDLE GetCListExtraIcon(const CEvent &evt)
**/
static VOID NotifyWithExtraIcon(HANDLE hContact, const CEvent &evt)
{
- if (myGlobals.HaveCListExtraIcons && gRemindOpts.bCListExtraIcon)
- {
- if (!myGlobals.ExtraIconsServiceExist)
- {
- IconExtraColumn iec;
+ if (gRemindOpts.bCListExtraIcon) {
+ CHAR szIcon[MAXSETTING];
- iec.cbSize = sizeof(IconExtraColumn);
- iec.ColumnType = gRemindOpts.bCListExtraIcon;
- iec.hImage = GetCListExtraIcon(evt);
- CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hContact, (LPARAM)&iec);
- }
- else
- {
- CHAR szIcon[MAXSETTING];
- EXTRAICON ico;
+ EXTRAICON ico = { sizeof(ico) };
+ ico.hContact = hContact;
+ ico.hExtraIcon = ExtraIcon;
+ switch (evt._eType) {
+ case CEvent::BIRTHDAY:
+ if (evt._wDaysLeft > 9)
+ ico.icoName = ICO_RMD_DTAX;
+ else {
+ mir_snprintf(szIcon, SIZEOF(szIcon), MODNAME"_rmd_dtb%u", evt._wDaysLeft);
+ ico.icoName = szIcon;
+ }
+ break;
- ico.cbSize=sizeof(ico);
- ico.hContact=hContact;
- ico.hExtraIcon=ExtraIcon;
- switch (evt._eType)
- {
- case CEvent::BIRTHDAY:
- {
- if (evt._wDaysLeft > 9)
- {
- ico.icoName=ICO_RMD_DTAX;
- }
- else
- {
- mir_snprintf(szIcon, SIZEOF(szIcon), MODNAME"_rmd_dtb%u", evt._wDaysLeft);
- ico.icoName=szIcon;
- }
- break;
- }
- case CEvent::ANNIVERSARY:
- {
- if (evt._wDaysLeft > 9)
- {
- ico.icoName=ICO_RMD_DTAX;
- }
- else
- {
- mir_snprintf(szIcon, SIZEOF(szIcon), MODNAME"_rmd_dta%u", evt._wDaysLeft);
- ico.icoName=szIcon;
- }
- break;
- }
- default:
- ico.icoName=(char *)0;
+ case CEvent::ANNIVERSARY:
+ if (evt._wDaysLeft > 9)
+ ico.icoName = ICO_RMD_DTAX;
+ else {
+ mir_snprintf(szIcon, SIZEOF(szIcon), MODNAME"_rmd_dta%u", evt._wDaysLeft);
+ ico.icoName = szIcon;
}
- CallService(MS_EXTRAICON_SET_ICON, (WPARAM)&ico, 0);
+ break;
}
+ CallService(MS_EXTRAICON_SET_ICON, (WPARAM)&ico, 0);
}
}
@@ -1081,15 +1055,13 @@ VOID SvcReminderEnable(BOOLEAN bEnable)
{
if (bEnable) // Reminder is on
{
- if (myGlobals.ExtraIconsServiceExist && (ExtraIcon == INVALID_HANDLE_VALUE))
- {
- EXTRAICON_INFO ico = {0};
+ if (ExtraIcon == INVALID_HANDLE_VALUE) {
+ EXTRAICON_INFO ico = { sizeof(ico) };
ico.type = EXTRAICON_TYPE_ICOLIB;
- ico.cbSize=sizeof(ico);
- ico.name="Reminder";
- ico.description="Reminder (uinfoex)";
- ico.descIcon=ICO_COMMON_ANNIVERSARY;
- ExtraIcon=(HANDLE)CallService(MS_EXTRAICON_REGISTER, (WPARAM)&ico, 0);
+ ico.name = "Reminder";
+ ico.description = "Reminder (uinfoex)";
+ ico.descIcon = ICO_COMMON_ANNIVERSARY;
+ ExtraIcon = (HANDLE)CallService(MS_EXTRAICON_REGISTER, (WPARAM)&ico, 0);
ZeroMemory(&ico,sizeof(ico));
}
// init hooks