summaryrefslogtreecommitdiff
path: root/plugins/Folders/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Folders/src')
-rw-r--r--plugins/Folders/src/folders.cpp1
-rw-r--r--plugins/Folders/src/hooked_events.cpp27
-rw-r--r--plugins/Folders/src/hooked_events.h2
3 files changed, 9 insertions, 21 deletions
diff --git a/plugins/Folders/src/folders.cpp b/plugins/Folders/src/folders.cpp
index d9e61f675f..e44a7f7485 100644
--- a/plugins/Folders/src/folders.cpp
+++ b/plugins/Folders/src/folders.cpp
@@ -58,7 +58,6 @@ extern "C" __declspec(dllexport) int Load(void)
extern "C" __declspec(dllexport) int Unload()
{
DestroyEvents();
- UnhookEvents();
return 0;
}
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;
+}
diff --git a/plugins/Folders/src/hooked_events.h b/plugins/Folders/src/hooked_events.h
index 7a2d427e18..0df8dc07ce 100644
--- a/plugins/Folders/src/hooked_events.h
+++ b/plugins/Folders/src/hooked_events.h
@@ -26,9 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern HANDLE hOptionsInitialize;
-int UnhookEvents();
int HookEvents();
-int OnOptionsInitialize(WPARAM wParam, LPARAM lParam);
#endif \ No newline at end of file