From 40a156173e722aaf0c9d454ac573f0a26338e065 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Aug 2017 12:26:17 +0300 Subject: ME_MSG_TOOLBARLOADED is hooked everywhere as a temporary event --- plugins/TabSRMM/src/buttonsbar.cpp | 2 +- plugins/TabSRMM/src/modplus.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 43f8cb8f44..c91d7d92fc 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -379,5 +379,5 @@ void CTabBaseDlg::CB_ChangeButton(CustomButtonData *cbd) void CB_InitCustomButtons() { - HookEvent(ME_MSG_TOOLBARLOADED, CB_InitDefaultButtons); + HookTemporaryEvent(ME_MSG_TOOLBARLOADED, CB_InitDefaultButtons); } diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp index 05d1edd95f..3bde72a450 100644 --- a/plugins/TabSRMM/src/modplus.cpp +++ b/plugins/TabSRMM/src/modplus.cpp @@ -137,6 +137,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) int ModPlus_Init() { HookEvent(ME_MSG_BUTTONPRESSED, CustomButtonPressed); - HookEvent(ME_MSG_TOOLBARLOADED, RegisterCustomButton); + + HookTemporaryEvent(ME_MSG_TOOLBARLOADED, RegisterCustomButton); return 0; } -- cgit v1.2.3