From 908e0f5b49738689ac2bc4aef9807a717633d1dc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 31 Oct 2013 16:47:48 +0000 Subject: fixed status change popups and sounds git-svn-id: http://svn.miranda-ng.org/main/trunk@6721 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3