From 0f5d6891e9a94f592a799d83fdbc79cbe36b8734 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Jul 2017 20:23:58 +0300 Subject: fixes #757 (Scriver: send message by Enter don't work until restart) --- src/mir_app/src/chat.h | 3 +++ src/mir_app/src/pluginopts.cpp | 6 +++++- src/mir_app/src/srmm_toolbar.cpp | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h index 136ea36752..444aa25fd8 100644 --- a/src/mir_app/src/chat.h +++ b/src/mir_app/src/chat.h @@ -100,6 +100,9 @@ void LoadChatIcons(void); int LoadChatModule(void); void UnloadChatModule(void); +// srmm_toolbar.cpp +void CALLBACK SrmmLoadToolbar(); + // tools.c int DoRtfToTags(CMStringW &pszText, int iNumColors, COLORREF *pColors); wchar_t *RemoveFormatting(const wchar_t* pszText); diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 73c980c3cf..c31e5c4816 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -26,9 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include +#include "chat.h" #include "plugins.h" -extern MUUID miid_clist, miid_database, miid_protocol; +extern MUUID miid_clist, miid_database, miid_protocol, miid_srmm; HANDLE hevLoadModule, hevUnloadModule; static bool bOldMode = false; @@ -200,6 +201,9 @@ static bool LoadPluginDynamically(PluginListItemData *dat) if (CallPluginEventHook(pPlug->bpi.hInst, hModulesLoadedEvent, 0, 0) != 0) goto LBL_Error; + if (hasMuuid(pPlug->bpi, miid_srmm)) + SrmmLoadToolbar(); + dat->hInst = pPlug->bpi.hInst; NotifyFastHook(hevLoadModule, (WPARAM)pPlug->bpi.pluginInfo, (LPARAM)pPlug->bpi.hInst); return true; diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index 2cf4504354..8a23b50565 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -779,7 +779,7 @@ static int SrmmModulesLoaded(WPARAM, LPARAM) return 0; } -static void CALLBACK SrmmLoadToolbar() +void CALLBACK SrmmLoadToolbar() { NotifyEventHooks(hHookToolBarLoadedEvt, 0, 0); } -- cgit v1.2.3