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/GmailNotifier/src/main.cpp | 2 ++ plugins/GmailNotifier/src/notify.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'plugins/GmailNotifier') diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index 9a8cf8169d..60479823c0 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -10,6 +10,7 @@ There is no warranty. #include "stdafx.h" #include "version.h" +CLIST_INTERFACE *pcli; HINSTANCE hInst; int hLangpack; UINT hTimer; @@ -88,6 +89,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" int __declspec(dllexport) Load() { mir_getLP(&pluginInfoEx); + mir_getCLI(); SkinAddNewSoundEx("Gmail", LPGEN("Other"), LPGEN("Gmail: New thread(s)")); HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser); diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index b4991cfaa5..21f1115e77 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -6,7 +6,7 @@ int OpenBrowser(WPARAM hContact, LPARAM) if (proto && !mir_strcmp(proto, MODULE_NAME)) { Account *curAcc = GetAccountByContact(hContact); PUDeletePopup(curAcc->popUpHwnd); - CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1); + pcli->pfnRemoveEvent(curAcc->hContact, 1); if (GetKeyState(VK_SHIFT) >> 8 || optionWindowIsOpen) return FALSE; @@ -45,7 +45,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA case WM_CONTEXTMENU: PUDeletePopup(hWnd); curAcc->popUpHwnd = NULL; - CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)1); + pcli->pfnRemoveEvent(hContact, 1); } return DefWindowProc(hWnd, message, wParam, lParam); } @@ -59,7 +59,7 @@ void NotifyUser(Account *curAcc) switch (curAcc->results_num) { case 0: PUDeletePopup(curAcc->popUpHwnd); - CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1); + pcli->pfnRemoveEvent(curAcc->hContact, 1); if (curAcc->oldResults_num != 0) db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_NONEW); break; @@ -87,6 +87,8 @@ void NotifyUser(Account *curAcc) } } if (opt.notifierOnTray&&newMails > 0) { + pcli->pfnRemoveEvent(curAcc->hContact, 1); + CLISTEVENT cle = {}; cle.hContact = curAcc->hContact; cle.hDbEvent = 1; @@ -94,8 +96,7 @@ void NotifyUser(Account *curAcc) cle.hIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED); cle.pszService = "GmailMNotifier/Notifying"; cle.pszTooltip = curAcc->results.next->content; - CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1); - CallServiceSync(MS_CLIST_ADDEVENT, (WPARAM)curAcc->hContact, (LPARAM)& cle); + pcli->pfnAddEvent(&cle); } if (opt.notifierOnPop&&newMails > 0) { -- cgit v1.2.3