From 6cf38012ad10c3eb4b4eeb758d4f83107977e1d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 13 Jun 2018 21:07:14 +0300 Subject: fix for StdAutoAway options --- src/core/stdautoaway/src/idle.cpp | 3 +-- src/core/stdautoaway/src/main.cpp | 7 +++++++ src/core/stdautoaway/src/stdafx.h | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/stdautoaway/src/idle.cpp b/src/core/stdautoaway/src/idle.cpp index add27610b8..4c15eede06 100644 --- a/src/core/stdautoaway/src/idle.cpp +++ b/src/core/stdautoaway/src/idle.cpp @@ -73,12 +73,11 @@ void IdleObject_Destroy() KillTimer(nullptr, g_hTimer); } -int LoadIdleModule(void) +void LoadIdleModule(void) { IdleObject_Create(); HookEvent(ME_OPT_INITIALISE, IdleOptInit); - return 0; } void UnloadIdleModule() diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp index 4aed198a66..36cd90920b 100644 --- a/src/core/stdautoaway/src/main.cpp +++ b/src/core/stdautoaway/src/main.cpp @@ -65,6 +65,13 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAW int CMPlugin::Load() { + LoadIdleModule(); LoadAutoAwayModule(); return 0; } + +int CMPlugin::Unload() +{ + UnloadIdleModule(); + return 0; +} diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h index 98f1ef29c5..8f15893de4 100644 --- a/src/core/stdautoaway/src/stdafx.h +++ b/src/core/stdautoaway/src/stdafx.h @@ -75,6 +75,7 @@ struct CMPlugin : public PLUGIN CMPlugin(); int Load() override; + int Unload() override; CMOption bIdleCheck, bIdleMethod, bIdleOnSaver, bIdleOnFullScr, bIdleOnLock; CMOption bIdlePrivate, bIdleSoundsOff, bIdleOnTerminal, bIdleStatusLock; @@ -85,3 +86,6 @@ struct CMPlugin : public PLUGIN void IdleObject_Destroy(); void IdleObject_Create(); + +void LoadIdleModule(); +void UnloadIdleModule(); -- cgit v1.2.3