diff options
Diffstat (limited to 'plugins/GmailNotifier/src/notify.cpp')
-rw-r--r-- | plugins/GmailNotifier/src/notify.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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) {
|