diff options
Diffstat (limited to 'plugins/NotesAndReminders/src')
-rw-r--r-- | plugins/NotesAndReminders/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/reminders.cpp | 19 |
2 files changed, 8 insertions, 13 deletions
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 0c54cd6626..67b3a00901 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -1,5 +1,6 @@ #include "globals.h"
+CLIST_INTERFACE *pcli;
HINSTANCE hinstance = NULL;
HINSTANCE hmiranda = NULL;
int hLangpack;
@@ -299,6 +300,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved) extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
+ mir_getCLI();
hmiranda = GetModuleHandle(NULL);
INITCOMMONCONTROLSEX ctrls = {0};
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 87222c5e08..42f011736e 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -180,21 +180,14 @@ static REMINDERDATA* FindReminder(DWORD uid) static void RemoveReminderSystemEvent(REMINDERDATA *p)
{
- if (p->SystemEventQueued)
- {
- int i;
-
- for (i=0; ; i++)
- {
- CLISTEVENT *pev = (CLISTEVENT*) CallService(MS_CLIST_GETEVENT,(WPARAM)INVALID_HANDLE_VALUE,i);
+ if (p->SystemEventQueued) {
+ for (int i = 0; ; i++) {
+ CLISTEVENT *pev = pcli->pfnGetEvent(-1, i);
if (!pev)
break;
- if ((ULONG)pev->lParam == p->uid && !pev->hContact
- && pev->pszService && !mir_strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder"))
- {
- if ( !CallService(MS_CLIST_REMOVEEVENT,(WPARAM)pev->hContact,(LPARAM)pev->hDbEvent) )
- {
+ if ((ULONG)pev->lParam == p->uid && !pev->hContact && pev->pszService && !mir_strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder")) {
+ if (!pcli->pfnRemoveEvent(pev->hContact, pev->hDbEvent)) {
p->SystemEventQueued = FALSE;
if (QueuedReminderCount)
QueuedReminderCount--;
@@ -694,7 +687,7 @@ static void FireReminder(REMINDERDATA *pReminder, BOOL *pHasPlayedSound) ev.lParam = (LPARAM)pReminder->uid;
ev.pszService = MODULENAME"/OpenTriggeredReminder";
ev.pszTooltip = Translate("Reminder");
- CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&ev);
+ pcli->pfnAddEvent(&ev);
}
pReminder->SystemEventQueued = TRUE;
|