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 /protocols/JabberG | |
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 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 7 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.h | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 6 |
4 files changed, 4 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 466f9098cf..dff3e0c5a0 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -72,7 +72,6 @@ HRESULT (WINAPI *JabberDrawThemeParentBackground)(HWND, HDC, RECT *) = NULL; /////////////////////////////////////////////////////////////////////////////
BOOL jabberChatDllPresent = FALSE;
-HANDLE hModulesLoaded, hModulesLoadedTB;
HANDLE hExtraActivity = NULL;
HANDLE hExtraMood = NULL;
@@ -148,7 +147,7 @@ static INT_PTR g_SvcParseXmppUri(WPARAM w, LPARAM l) static int OnModulesLoaded(WPARAM, LPARAM)
{
- hModulesLoadedTB = HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
+ HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
bSecureIM = (ServiceExists("SecureIM/IsContactSecured"));
bMirOTR = (int)GetModuleHandle(_T("mirotr.dll"));
@@ -264,7 +263,7 @@ extern "C" int __declspec(dllexport) Load() g_IconsInit();
g_XstatusIconsInit();
g_MenuInit();
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
JabberUserInfoInit();
return 0;
@@ -275,9 +274,6 @@ extern "C" int __declspec(dllexport) Load() extern "C" int __declspec(dllexport) Unload(void)
{
- UnhookEvent(hModulesLoaded);
- UnhookEvent(hModulesLoadedTB);
-
g_MenuUninit();
g_Instances.destroy();
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index b6d2525fcf..db09e790c4 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -107,17 +107,12 @@ CIconPool::CPoolItem::~CPoolItem() }
CIconPool::CIconPool() :
- m_items(10, CIconPool::CPoolItem::cmp),
- m_hOnExtraIconsRebuild(NULL)
+ m_items(10, CIconPool::CPoolItem::cmp)
{
}
CIconPool::~CIconPool()
{
- if (m_hOnExtraIconsRebuild) {
- UnhookEvent(m_hOnExtraIconsRebuild);
- m_hOnExtraIconsRebuild = NULL;
- }
}
void CIconPool::RegisterIcon(const char *name, TCHAR *filename, int iconid, TCHAR *szSection, TCHAR *szDescription)
diff --git a/protocols/JabberG/src/jabber_icolib.h b/protocols/JabberG/src/jabber_icolib.h index 398969767d..4cf0b1e84e 100644 --- a/protocols/JabberG/src/jabber_icolib.h +++ b/protocols/JabberG/src/jabber_icolib.h @@ -54,7 +54,6 @@ private: };
OBJLIST<CPoolItem> m_items;
- HANDLE m_hOnExtraIconsRebuild;
CPoolItem *FindItemByName(const char *name);
};
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 3f78cbb360..6341669e62 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -42,8 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static HANDLE hChooserMenu;
static int iChooserMenuPos = 30000;
-static HANDLE hPrebuildMenuHook;
-
static HGENMENU g_hMenuRequestAuth;
static HGENMENU g_hMenuGrantAuth;
static HGENMENU g_hMenuRevokeAuth;
@@ -195,7 +193,7 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) void g_MenuInit(void)
{
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, JabberPrebuildContactMenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, JabberPrebuildContactMenu);
CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService);
@@ -358,8 +356,6 @@ void g_MenuUninit(void) CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuLogin, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuRefresh, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hMenuAddBookmark, 0);
-
- UnhookEvent(hPrebuildMenuHook);
}
/////////////////////////////////////////////////////////////////////////////////////////
|