diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 6 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.h | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 5 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/icq_menu.cpp | 6 | ||||
-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 | ||||
-rw-r--r-- | protocols/MSN/src/msn.cpp | 5 | ||||
-rw-r--r-- | protocols/MSN/src/msn_menu.cpp | 5 | ||||
-rw-r--r-- | protocols/Yahoo/src/yahoo.h | 2 |
11 files changed, 10 insertions, 43 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 8a08ca5d74..57dcf2a2da 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -277,7 +277,7 @@ void GGPROTO::block_init() mi.pszContactOwner = m_szModuleName;
hBlockMenuItem = Menu_AddContactMenuItem(&mi);
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, gg_prebuildcontactmenu);
}
//////////////////////////////////////////////////////////
@@ -285,7 +285,6 @@ void GGPROTO::block_init() void GGPROTO::block_uninit()
{
- UnhookEvent(hPrebuildMenuHook);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
}
@@ -385,9 +384,6 @@ extern "C" int __declspec(dllexport) Load(void) extern "C" int __declspec(dllexport) Unload()
{
- LocalEventUnhook(hHookModulesLoaded);
- LocalEventUnhook(hHookPreShutdown);
-
// Cleanup WinSock
WSACleanup();
return 0;
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h index a33ad71c14..2ae43a64d2 100644 --- a/protocols/Gadu-Gadu/src/gg.h +++ b/protocols/Gadu-Gadu/src/gg.h @@ -289,8 +289,6 @@ typedef struct #define GG_POPUP_WARNING 8
#define GG_POPUP_MULTILOGON 16
-#define LocalEventUnhook(hook) if (hook) UnhookEvent(hook)
-
// Some MSVC compatibility with gcc
#ifdef _MSC_VER
#ifndef strcasecmp
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index d0e6814dd8..54dbfd2ea2 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -88,7 +88,7 @@ void CIrcProto::InitMainMenus(void) /////////////////////////////////////////////////////////////////////////////////////////
static HGENMENU hUMenuChanSettings, hUMenuWhois, hUMenuDisconnect, hUMenuIgnore;
-static HANDLE hPreBuildContactMenu, hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
+static HANDLE hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
static CIrcProto* IrcGetInstanceByHContact(HANDLE hContact)
{
@@ -178,12 +178,11 @@ void InitContactMenus(void) hUMenuIgnore = Menu_AddContactMenuItem(&mi);
hMenuIgnore = CreateServiceFunction( temp, IrcMenuIgnore );
- hPreBuildContactMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IrcPrebuildContactMenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IrcPrebuildContactMenu);
}
void UninitContactMenus(void)
{
- UnhookEvent(hPreBuildContactMenu);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hUMenuChanSettings, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hUMenuWhois, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hUMenuDisconnect, 0);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index c15f1526be..a038d9f792 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -29,8 +29,6 @@ #include <m_skin.h>
-static HANDLE hPrebuildMenuHook;
-
HANDLE g_hContactMenuItems[6];
HANDLE g_hContactMenuSvc[6];
@@ -118,7 +116,7 @@ void g_MenuInit(void) ///////////////
// Contact menu
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IcqPrebuildContactMenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, IcqPrebuildContactMenu);
// Contact menu initialization
@@ -179,8 +177,6 @@ void g_MenuInit(void) void g_MenuUninit(void)
{
- UnhookEvent(hPrebuildMenuHook);
-
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_REQUEST], 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_GRANT], 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)g_hContactMenuItems[ICMI_AUTH_REVOKE], 0);
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);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index 2dee47d58e..0f4079639b 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -29,8 +29,6 @@ HINSTANCE hInst; int hLangpack;
TIME_API tmi;
-HANDLE hMooduleLoaded;
-
/////////////////////////////////////////////////////////////////////////////////////////
// Initialization routines
@@ -117,7 +115,7 @@ extern "C" int __declspec(dllexport) Load(void) mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
- hMooduleLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
pd.szName = "MSN";
@@ -138,7 +136,6 @@ extern "C" int __declspec(dllexport) Unload(void) {
MSN_RemoveContactMenus();
MsnLinks_Destroy();
- UnhookEvent(hMooduleLoaded);
return 0;
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index ddc2e1c4cc..aa8c3cb5ab 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_global.h"
#include "msn_proto.h"
-static HANDLE hPrebuildMenuHook;
static HGENMENU
hBlockMenuItem,
hLiveSpaceMenuItem,
@@ -483,13 +482,11 @@ void MSN_InitContactMenu(void) mi.pszName = LPGEN("Open &Hotmail Inbox");
hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi);
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MSN_OnPrebuildContactMenu);
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MSN_OnPrebuildContactMenu);
}
void MSN_RemoveContactMenus(void)
{
- UnhookEvent(hPrebuildMenuHook);
-
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hBlockMenuItem, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hLiveSpaceMenuItem, 0);
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hNetmeetingMenuItem, 0);
diff --git a/protocols/Yahoo/src/yahoo.h b/protocols/Yahoo/src/yahoo.h index 3241092599..c0875f3f02 100644 --- a/protocols/Yahoo/src/yahoo.h +++ b/protocols/Yahoo/src/yahoo.h @@ -95,8 +95,6 @@ extern int do_yahoo_debug; #define STYLE_DEFAULTBGCOLOUR RGB(173,206,247)
-#define LocalEventUnhook(hook) if (hook) UnhookEvent(hook)
-
struct _conn {
unsigned int tag;
int id;
|