diff options
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r-- | plugins/AutoShutdown/src/main.cpp | 3 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/options.cpp | 23 | ||||
-rw-r--r-- | plugins/AutoShutdown/src/options.h | 3 |
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);
|