summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-06 22:12:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-06 22:12:20 +0000
commit9de0202a0b12838d505825413c3cbcce5edabc11 (patch)
tree6f1f707f3e17c19e5cd08745e76c5299f9ba827b /src
parent4e3088029101cc1e9bbc46984910a47bc0530e8f (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 'src')
-rw-r--r--src/modules/clist/clc.cpp9
-rw-r--r--src/modules/clist/clistmenus.cpp5
-rw-r--r--src/modules/clist/clistmod.cpp9
-rw-r--r--src/modules/clist/movetogroup.cpp5
4 files changed, 6 insertions, 22 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index f914547fda..b81523c3af 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -36,8 +36,6 @@ static BOOL bModuleInitialized = FALSE;
static HANDLE hClcWindowList;
static HANDLE hShowInfoTipEvent;
HANDLE hHideInfoTipEvent;
-static HANDLE hAckHook;
-static HANDLE hClcSettingsChanged;
int g_IconWidth, g_IconHeight;
@@ -223,12 +221,12 @@ int LoadCLCModule(void)
HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, ClcAccountsChanged);
- hClcSettingsChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
HookEvent(ME_DB_CONTACT_ADDED, ClcContactAdded);
HookEvent(ME_DB_CONTACT_DELETED, ClcContactDeleted);
HookEvent(ME_CLIST_CONTACTICONCHANGED, ClcContactIconChanged);
HookEvent(ME_SKIN_ICONSCHANGED, ClcIconsChanged);
- hAckHook = (HANDLE) HookEvent(ME_PROTO_ACK, ClcProtoAck);
+ HookEvent(ME_PROTO_ACK, ClcProtoAck);
InitCustomMenus();
return 0;
@@ -238,9 +236,6 @@ void UnloadClcModule()
{
if ( !bModuleInitialized) return;
- UnhookEvent(hAckHook);
- UnhookEvent(hClcSettingsChanged);
-
mir_free(cli.clcProto);
FreeDisplayNameCache();
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 7e3521eee9..a8b4bfd0c3 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -56,8 +56,6 @@ bool prochotkey;
HANDLE hPreBuildMainMenuEvent, hStatusModeChangeEvent, hPreBuildContactMenuEvent;
-static HANDLE hAckHook;
-
static HMENU hMainMenu, hStatusMenu = 0;
static const int statusModeList[ MAX_STATUS_COUNT ] =
{
@@ -1319,7 +1317,7 @@ void InitCustomMenus(void)
cli.hPreBuildStatusMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDSTATUSMENU);
hStatusModeChangeEvent = CreateHookableEvent(ME_CLIST_STATUSMODECHANGE);
- hAckHook = (HANDLE)HookEvent(ME_PROTO_ACK, MenuProtoAck);
+ HookEvent(ME_PROTO_ACK, MenuProtoAck);
hMainMenu = CreatePopupMenu();
hStatusMenu = CreatePopupMenu();
@@ -1408,5 +1406,4 @@ void UninitCustomMenus(void)
DestroyMenu(hMainMenu);
DestroyMenu(hStatusMenu);
- UnhookEvent(hAckHook);
}
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp
index 79fb3a7fe8..65b1b7eebf 100644
--- a/src/modules/clist/clistmod.cpp
+++ b/src/modules/clist/clistmod.cpp
@@ -56,9 +56,6 @@ struct ProtoIconIndex
OBJLIST<ProtoIconIndex> protoIconIndex(5);
-static HANDLE hProtoAckHook;
-static HANDLE hContactSettingChanged;
-
TCHAR* fnGetStatusModeDescription(int mode, int flags)
{
static TCHAR szMode[64];
@@ -498,10 +495,10 @@ int LoadContactListModule2(void)
{
HookEvent(ME_SYSTEM_MODULESLOADED, ContactListModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, ContactListAccountsChanged);
- hContactSettingChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged);
HookEvent(ME_DB_CONTACT_ADDED, ContactAdded);
HookEvent(ME_DB_CONTACT_DELETED, ContactDeleted);
- hProtoAckHook = (HANDLE) HookEvent(ME_PROTO_ACK, ProtocolAck);
+ HookEvent(ME_PROTO_ACK, ProtocolAck);
hContactDoubleClicked = CreateHookableEvent(ME_CLIST_DOUBLECLICKED);
hContactIconChangedEvent = CreateHookableEvent(ME_CLIST_CONTACTICONCHANGED);
@@ -561,9 +558,7 @@ void UnloadContactListModule()
hContact = hNext;
}
ImageList_Destroy(hCListImages);
- UnhookEvent(hProtoAckHook);
UninitCListEvents();
protoIconIndex.destroy();
DestroyHookableEvent(hContactDoubleClicked);
- UnhookEvent(hContactSettingChanged);
}
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp
index 1c95688b0a..fe5b43e933 100644
--- a/src/modules/clist/movetogroup.cpp
+++ b/src/modules/clist/movetogroup.cpp
@@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "..\..\core\commonheaders.h"
-HANDLE hOnCntMenuBuild;
HGENMENU hMoveToGroupItem = 0, hPriorityItem = 0, hFloatingItem = 0;
LIST<HANDLE> lphGroupsItems(5);
@@ -144,14 +143,12 @@ static INT_PTR MTG_DOMOVE(WPARAM wParam, LPARAM lParam)
void MTG_OnmodulesLoad()
{
- hOnCntMenuBuild = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnContactMenuBuild);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnContactMenuBuild);
CreateServiceFunction(MTG_MOVE, MTG_DOMOVE);
}
int UnloadMoveToGroup(void)
{
- UnhookEvent(hOnCntMenuBuild);
lphGroupsItems.destroy();
-
return 0;
}