summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-20 17:06:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-20 17:06:15 +0000
commit04fb63c99e3a3da65613fa7a7eb2b8bfad1c582b (patch)
treee711ef51b2bea0ae2a62ceae974a7708cc432434 /plugins
parent1e04ea836d421343cafdc605f9cfe0cf79ef24f1 (diff)
oops... ME_MSG_WRITEEVENT is ME_MSG_PRECREATEEVENT now :)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4487 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/globals.cpp5
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp5
4 files changed, 8 insertions, 6 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index c69337ff02..d9486bba85 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -453,11 +453,12 @@ static int ackevent(WPARAM wParam, LPARAM lParam)
if ( !( item->flags & PREF_UTF ))
dbei.cbBlob *= sizeof(TCHAR) + 1;
dbei.pBlob = (PBYTE) item->sendBuffer;
- HANDLE hNewEvent = db_event_add(item->hContact, &dbei);
- MessageWindowEvent evt = { sizeof(evt), (int)item->hSendId, item->hContact, hNewEvent };
+ MessageWindowEvent evt = { sizeof(evt), (int)item->hSendId, item->hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
+ db_event_add(item->hContact, &dbei);
+
if (item->hwndErrorDlg != NULL)
DestroyWindow(item->hwndErrorDlg);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 85b8df532d..f98dc86fe8 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -536,7 +536,7 @@ int OnLoadModule(void)
hHookWinEvt = CreateHookableEvent(ME_MSG_WINDOWEVENT);
hHookWinPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
- hHookWinWrite = CreateHookableEvent(ME_MSG_WRITEEVENT);
+ hHookWinWrite = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (Focused Window)"));
SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)"));
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index fd7300789d..0cd43dcef5 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -540,7 +540,7 @@ static void TSAPI InitAPI()
PluginConfig.m_event_MsgWin = CreateHookableEvent(ME_MSG_WINDOWEVENT);
PluginConfig.m_event_MsgPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
- PluginConfig.m_event_WriteEvent = CreateHookableEvent(ME_MSG_WRITEEVENT);
+ PluginConfig.m_event_WriteEvent = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
}
int LoadSendRecvMessageModule(void)
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 62b31a6a57..b6041a8685 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -761,11 +761,12 @@ inform_and_discard:
if (m_jobs[iFound].dwFlags & PREF_UTF)
dbei.flags |= DBEF_UTF;
dbei.pBlob = (PBYTE) m_jobs[iFound].sendBuffer;
- hNewEvent = db_event_add(m_jobs[iFound].hOwner, &dbei);
- MessageWindowEvent evt = { sizeof(evt), (int)m_jobs[iFound].hSendId, m_jobs[iFound].hOwner, hNewEvent };
+ MessageWindowEvent evt = { sizeof(evt), (int)m_jobs[iFound].hSendId, m_jobs[iFound].hOwner, &dbei };
NotifyEventHooks(PluginConfig.m_event_WriteEvent, 0, (LPARAM)&evt);
+ hNewEvent = db_event_add(m_jobs[iFound].hOwner, &dbei);
+
if (m_pContainer)
if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))
SkinPlaySound("SendMsg");