From bb5aff746c50564ded61159c5ae28e6218d0a49d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Jan 2016 16:04:16 +0000 Subject: 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 --- plugins/NotesAndReminders/src/main.cpp | 2 ++ plugins/NotesAndReminders/src/reminders.cpp | 19 ++++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'plugins/NotesAndReminders') 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; -- cgit v1.2.3