diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-10 13:53:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-10 13:53:59 +0300 |
commit | 926a493a89fbe3d56b7f2b5a3160dc949b401529 (patch) | |
tree | 24b0208e7de7c37ccfefcf901fcede8f4b43686d /src | |
parent | 177c0b2f3410f7cf14b52ff33e00ff26bcbd37d8 (diff) |
fixes #1060 (StopSpam: cannot enable/disable plugin until restart)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/options.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 78ec37c135..2db108f1a4 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -1202,6 +1202,13 @@ static INT_PTR OpenOptionsDialog(WPARAM, LPARAM) return 0;
}
+static int OptDynamicLoadOptions(WPARAM, LPARAM hInstance)
+{
+ OptionsPageList arPages(1);
+ CallPluginEventHook((HINSTANCE)hInstance, hOptionsInitEvent, (WPARAM)&arPages, 0);
+ return 0;
+}
+
static int OptModulesLoaded(WPARAM, LPARAM)
{
CMenuItem mi;
@@ -1226,6 +1233,7 @@ int LoadOptionsModule(void) hOptionsInitEvent = CreateHookableEvent(ME_OPT_INITIALISE);
HookEvent(ME_OPT_INITIALISE, LangpackOptionsInit);
+ HookEvent(ME_SYSTEM_MODULELOAD, OptDynamicLoadOptions);
HookEvent(ME_SYSTEM_MODULESLOADED, OptModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownOptionsModule);
return 0;
|