summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-01-28 16:04:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-01-28 16:04:16 +0000
commitbb5aff746c50564ded61159c5ae28e6218d0a49d (patch)
tree0ec2ef5c4b6b6b9cf6c3bb4a606cf632e69b6d31 /plugins/NotesAndReminders/src
parent1042a84dd1f01c249a946ec708d3dae2881ecfab (diff)
another atavism removed: old stub services for clist events
git-svn-id: http://svn.miranda-ng.org/main/trunk@16181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders/src')
-rw-r--r--plugins/NotesAndReminders/src/main.cpp2
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp19
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;