From 9de0202a0b12838d505825413c3cbcce5edabc11 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2013 22:12:20 +0000 Subject: cleanup of the unnecessary UnhookEvent() calls git-svn-id: http://svn.miranda-ng.org/main/trunk@3909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp | 11 +---------- plugins/Clist_nicer/src/clc.cpp | 12 +++--------- plugins/Clist_nicer/src/clui.cpp | 3 +-- 3 files changed, 5 insertions(+), 21 deletions(-) (limited to 'plugins/Clist_nicer/src') diff --git a/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp b/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp index 7daa97cf9d..c0456bb1e1 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp @@ -1,6 +1,5 @@ #include -HANDLE hOnCntMenuBuild; HANDLE hPriorityItem = 0, hFloatingItem = 0; static int OnContactMenuBuild(WPARAM wParam,LPARAM lParam) @@ -34,14 +33,6 @@ static int OnContactMenuBuild(WPARAM wParam,LPARAM lParam) int MTG_OnmodulesLoad(WPARAM wParam,LPARAM lParam) { - hOnCntMenuBuild=HookEvent(ME_CLIST_PREBUILDCONTACTMENU,OnContactMenuBuild); - return 0; -} - -int UnloadMoveToGroup(void) -{ - if (hOnCntMenuBuild) - UnhookEvent(hOnCntMenuBuild); - + HookEvent(ME_CLIST_PREBUILDCONTACTMENU,OnContactMenuBuild); return 0; } diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 99e1ff7668..36ca706c00 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -46,9 +46,7 @@ extern int during_sizing; HIMAGELIST hCListImages; -HANDLE hIcoLibChanged = 0, hSvc_GetContactStatusMsg = 0; - -static HANDLE hClcSettingsChanged, hClcDBEvent = 0; +HANDLE hSvc_GetContactStatusMsg = 0; static HRESULT(WINAPI *MyCloseThemeData)(HANDLE); @@ -195,10 +193,6 @@ static int ClcPreshutdown(WPARAM wParam, LPARAM lParam) cfg::shutDown = TRUE; if (hSvc_GetContactStatusMsg) DestroyServiceFunction(hSvc_GetContactStatusMsg); - UnhookEvent(hClcSettingsChanged); - UnhookEvent(hClcDBEvent); - if (hIcoLibChanged) - UnhookEvent(hIcoLibChanged); return 0; } @@ -244,8 +238,8 @@ int LoadCLCModule(void) hCListImages = (HIMAGELIST) CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0); - hClcSettingsChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged); - hClcDBEvent = HookEvent(ME_DB_EVENT_ADDED, ClcEventAdded); + HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged); + HookEvent(ME_DB_EVENT_ADDED, ClcEventAdded); HookEvent(ME_OPT_INITIALISE, ClcOptInit); HookEvent(ME_SYSTEM_SHUTDOWN, ClcPreshutdown); return 0; diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index e6dcd1022b..f3544e008c 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -86,7 +86,6 @@ void FLT_SnapToEdges(HWND hwnd); void DestroyTrayMenu(HMENU hMenu); extern LONG g_cxsmIcon, g_cysmIcon; -extern HANDLE hIcoLibChanged; SIZE g_oldSize = {0}; POINT g_oldPos = {0}; @@ -340,7 +339,7 @@ void CLN_LoadAllIcons(BOOL mode) { if (mode) { InitIcoLib(); - hIcoLibChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IcoLibChanged); + HookEvent(ME_SKIN2_ICONSCHANGED, IcoLibChanged); } CacheClientIcons(); } -- cgit v1.2.3