summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 26f2375d0a..91689bf1c8 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -30,6 +30,7 @@ HGENMENU hEnableDisableMenu;
char szMetaModuleName[256] = {0};
STATUS StatusList[STATUS_COUNT];
+HWND SecretWnd;
int hLangpack;
PLUGININFOEX pluginInfoEx = {
@@ -1025,7 +1026,7 @@ int ProtoAck(WPARAM wParam,LPARAM lParam)
//Enable the popups for this protocol.
int idTimer = AddAtomA(szProto);
if (idTimer)
- SetTimer(NULL, idTimer, (UINT)opt.PopupConnectionTimeout*1000, ConnectionTimerProc);
+ SetTimer(SecretWnd, idTimer, (UINT)opt.PopupConnectionTimeout*1000, ConnectionTimerProc);
}
}
@@ -1113,6 +1114,10 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
HookEvent(ME_MSG_WINDOWEVENT, OnWindowEvent);
HookEvent(ME_TTB_MODULELOADED, InitTopToolbar);
+ SecretWnd = CreateWindowEx(WS_EX_TOOLWINDOW,_T("static"),_T("ConnectionTimerWindow"),0,
+ CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,HWND_DESKTOP,
+ NULL,hInst,NULL);
+
int count = 0;
PROTOACCOUNT **accounts = NULL;
CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&count, (LPARAM)&accounts);
@@ -1126,6 +1131,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
+static int OnShutdown(WPARAM, LPARAM)
+{
+ DestroyWindow(SecretWnd);
+ return 0;
+}
+
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -1135,6 +1146,7 @@ extern "C" int __declspec(dllexport) Load(void)
//We create this Hook which will notify everyone when a contact changes his status.
hHookContactStatusChanged = CreateHookableEvent(ME_STATUSCHANGE_CONTACTSTATUSCHANGED);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
//We add the option page and the user info page (it's needed because options are loaded after plugins)
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
//This is needed for "NoSound"-like routines.