summaryrefslogtreecommitdiff
path: root/plugins/Folders/src/hooked_events.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Folders/src/hooked_events.cpp')
-rw-r--r--plugins/Folders/src/hooked_events.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/plugins/Folders/src/hooked_events.cpp b/plugins/Folders/src/hooked_events.cpp
index cc939a4e7b..6846f33c04 100644
--- a/plugins/Folders/src/hooked_events.cpp
+++ b/plugins/Folders/src/hooked_events.cpp
@@ -20,24 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
-HANDLE hOptionsInitialize;
-
-int HookEvents()
-{
- hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialize);
- return 0;
-}
-
-int UnhookEvents()
-{
- UnhookEvent(hOptionsInitialize);
- return 0;
-}
-
-int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
+static int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FOLDERS);
@@ -49,4 +34,10 @@ int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
Options_AddPage(wParam, &odp);
return 0;
-} \ No newline at end of file
+}
+
+int HookEvents()
+{
+ HookEvent(ME_OPT_INITIALISE, OnOptionsInitialize);
+ return 0;
+}