summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 20:12:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 20:12:53 +0300
commit488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (patch)
tree96b0db981b4f5054f24d484902b597ba7da1c1a5 /plugins/AutoShutdown/src
parent9b35784c5042984fbb60785f0a4a41a64af545f6 (diff)
end of ME_OPT_INITIALISE related zoo in another plugins
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r--plugins/AutoShutdown/src/main.cpp3
-rw-r--r--plugins/AutoShutdown/src/options.cpp23
-rw-r--r--plugins/AutoShutdown/src/options.h3
3 files changed, 3 insertions, 26 deletions
diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp
index f9f7d81ce6..9fa00794ef 100644
--- a/plugins/AutoShutdown/src/main.cpp
+++ b/plugins/AutoShutdown/src/main.cpp
@@ -74,15 +74,14 @@ int CMPlugin::Load()
InitShutdownSvc();
InitWatcher(); /* before InitSettingsDlg() */
InitSettingsDlg();
- InitOptions();
+ HookEvent(ME_OPT_INITIALISE, OptInit);
HookEvent(ME_SYSTEM_MODULESLOADED, ShutdownModulesLoaded);
return 0;
}
int CMPlugin::Unload()
{
- UninitOptions();
UninitWatcher(); /* before UninitFrame() */
UninitFrame();
UninitShutdownSvc();
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index e882eb49d3..f46c1d344e 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -21,11 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-/* Option Page */
-static HANDLE hHookOptInit;
-/* Trigger */
-static HANDLE hHookModulesLoaded;
-
/************************* Option Page ********************************/
#define M_ENABLE_SUBCTLS (WM_APP+111)
@@ -103,7 +98,7 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
return FALSE;
}
-static int ShutdownOptInit(WPARAM wParam, LPARAM)
+int OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = {};
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SHUTDOWN);
@@ -116,19 +111,3 @@ static int ShutdownOptInit(WPARAM wParam, LPARAM)
g_plugin.addOptions(wParam, &odp);
return 0;
}
-
-/************************* Misc ***************************************/
-
-void InitOptions(void)
-{
- /* Option Page */
- hHookOptInit = HookEvent(ME_OPT_INITIALISE, ShutdownOptInit);
-}
-
-void UninitOptions(void)
-{
- /* Option Page */
- UnhookEvent(hHookOptInit);
- /* Trigger */
- UnhookEvent(hHookModulesLoaded);
-}
diff --git a/plugins/AutoShutdown/src/options.h b/plugins/AutoShutdown/src/options.h
index d5e735f7f0..238fefdb89 100644
--- a/plugins/AutoShutdown/src/options.h
+++ b/plugins/AutoShutdown/src/options.h
@@ -22,5 +22,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
/* Misc */
-void InitOptions(void);
-void UninitOptions(void);
+int OptInit(WPARAM, LPARAM);