summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_message.h1
-rw-r--r--src/mir_app/src/chat.h3
-rw-r--r--src/mir_app/src/pluginopts.cpp3
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp4
4 files changed, 3 insertions, 8 deletions
diff --git a/include/m_message.h b/include/m_message.h
index d6a1ec0159..1af56057d0 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -271,6 +271,7 @@ EXTERN_C MIR_APP_DLL(void) Srmm_RedrawToolbarIcons(HWND hwndDlg);
// ToolBar loaded event
// This event will be send after module loaded and after each toolbar reset
// You should add your buttons on this event
+// NOTE: this event is temporary, you need to hook it using HookTemporaryEvent
#define ME_MSG_TOOLBARLOADED "SRMM/ButtonsBar/ModuleLoaded"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 752f489577..290f4f6efa 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -101,9 +101,6 @@ 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 6a3e2d7fba..081ecbcd73 100644
--- a/src/mir_app/src/pluginopts.cpp
+++ b/src/mir_app/src/pluginopts.cpp
@@ -201,9 +201,6 @@ 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 7381fafcfb..e7f1c5e1bd 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -829,9 +829,10 @@ static int SrmmModulesLoaded(WPARAM, LPARAM)
return 0;
}
-void CALLBACK SrmmLoadToolbar()
+static void CALLBACK SrmmLoadToolbar()
{
NotifyEventHooks(hHookToolBarLoadedEvt, 0, 0);
+ DestroyHookableEvent(hHookToolBarLoadedEvt);
}
static int ConvertToolbarData(const char *szSetting, LPARAM)
@@ -873,7 +874,6 @@ void LoadSrmmToolbarModule()
void UnloadSrmmToolbarModule()
{
DestroyHookableEvent(hHookButtonPressedEvt);
- DestroyHookableEvent(hHookToolBarLoadedEvt);
wipeList(arButtonsList);
}