diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-06 22:12:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-06 22:12:20 +0000 |
commit | 9de0202a0b12838d505825413c3cbcce5edabc11 (patch) | |
tree | 6f1f707f3e17c19e5cd08745e76c5299f9ba827b /plugins/Folders | |
parent | 4e3088029101cc1e9bbc46984910a47bc0530e8f (diff) |
cleanup of the unnecessary UnhookEvent() calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@3909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Folders')
-rw-r--r-- | plugins/Folders/src/folders.cpp | 1 | ||||
-rw-r--r-- | plugins/Folders/src/hooked_events.cpp | 27 | ||||
-rw-r--r-- | plugins/Folders/src/hooked_events.h | 2 |
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 |