From 8d371aa2b1fa5a7bfe835dee9b60d1407b33047b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Mar 2014 13:40:35 +0000 Subject: db_event_next/db_event_prev: first parameter hContact added git-svn-id: http://svn.miranda-ng.org/main/trunk@8576 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/KeyboardNotify') diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 243042486f..16f00fbdc9 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -346,12 +346,12 @@ static void FlashThreadFunction() } -BOOL checkMsgTimestamp(HANDLE hEventCurrent, DWORD timestampCurrent) +BOOL checkMsgTimestamp(MCONTACT hContact, HANDLE hEventCurrent, DWORD timestampCurrent) { if (!bFlashIfMsgOlder) return TRUE; - for (HANDLE hEvent = db_event_prev(hEventCurrent); hEvent; hEvent = db_event_prev(hEvent)) { + for (HANDLE hEvent = db_event_prev(hContact, hEventCurrent); hEvent; hEvent = db_event_prev(hContact, hEvent)) { DBEVENTINFO einfo = { sizeof(einfo) }; if(!db_event_get(hEvent, &einfo)) { if ((einfo.timestamp + wSecondsOlder) <= timestampCurrent) @@ -418,7 +418,7 @@ static int PluginMessageEventHook(WPARAM hContact, LPARAM lParam) //get DBEVENTINFO without pBlob DBEVENTINFO einfo = { sizeof(einfo) }; if (!db_event_get(hEvent, &einfo) && !(einfo.flags & DBEF_SENT)) - if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg && checkOpenWindow(hContact) && checkMsgTimestamp(hEvent, einfo.timestamp)) || + if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg && checkOpenWindow(hContact) && checkMsgTimestamp(hContact, hEvent, einfo.timestamp)) || (einfo.eventType == EVENTTYPE_URL && bFlashOnURL) || (einfo.eventType == EVENTTYPE_FILE && bFlashOnFile) || (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_URL && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) { -- cgit v1.2.3