diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-07 15:32:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-07 15:32:08 +0300 |
commit | 978b44865b77eb0029e6033dcbfc0876954cef2e (patch) | |
tree | ccdf74bb1e55640a5dadcd7693928adcf72a17e8 /src/core | |
parent | c46f4344f007d814131d25fa5aec6fdb4c7a049d (diff) |
SRMM events are now created inside the core to avoid problems with dynamic plugin unload
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/cmdlist.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 7 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 1 |
4 files changed, 3 insertions, 11 deletions
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index 28d06b9517..a63430bf1c 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -101,7 +101,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *sz dbei.pBlob = (PBYTE)p->szMsg;
MessageWindowEvent evt = { id, hContact, &dbei };
- NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
+ NotifyEventHooks(pci->hevPreCreate, 0, (LPARAM)&evt);
p->szMsg = (char*)dbei.pBlob;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ac2b92bf73..4ad170a8bf 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -771,7 +771,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) }
// First notification
- NotifyEventHooks(hHookWinPopup, 0, (LPARAM)&mwpd);
+ NotifyEventHooks(pci->hevWinPopup, 0, (LPARAM)&mwpd);
// Someone added items?
if (GetMenuItemCount(mwpd.hMenu) > 0) {
@@ -781,7 +781,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) // Second notification
mwpd.uType = MSG_WINDOWPOPUP_SELECTED;
- NotifyEventHooks(hHookWinPopup, 0, (LPARAM)&mwpd);
+ NotifyEventHooks(pci->hevWinPopup, 0, (LPARAM)&mwpd);
switch (mwpd.selection) {
case IDM_UNDO:
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index bd0301088b..36675d350b 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -30,7 +30,6 @@ const CLSID IID_IRichEditOleCallback = { 0x00020D03, 0x00, 0x00, { 0xC0, 0x00, 0 int OnCheckPlugins(WPARAM, LPARAM);
-HANDLE hHookWinPopup, hHookWinWrite;
HGENMENU hMsgMenuItem;
HMODULE hMsftEdit;
@@ -522,9 +521,6 @@ int LoadSendRecvMessageModule(void) CreateServiceFunction(MS_MSG_SETSTATUSTEXT, SetStatusText);
CreateServiceFunction("SRMsg/ReadMessage", ReadMessageCommand);
- hHookWinPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
- hHookWinWrite = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
-
SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (focused window)"));
SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (unfocused window)"));
SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (new session)"));
@@ -539,9 +535,6 @@ int LoadSendRecvMessageModule(void) void SplitmsgShutdown(void)
{
- DestroyHookableEvent(hHookWinPopup);
- DestroyHookableEvent(hHookWinWrite);
-
FreeMsgLogIcons();
FreeLibrary(hMsftEdit);
msgQueue_destroy();
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index dc0b0dbe05..b8248a870d 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -81,7 +81,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define GC_SWITCHTAB (WM_USER+0x106)
extern HINSTANCE g_hInst;
-extern HANDLE hHookWinPopup, hHookWinWrite;
/////////////////////////////////////////////////////////////////////////////////////////
|