summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-10-31 16:47:48 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-10-31 16:47:48 +0000
commit908e0f5b49738689ac2bc4aef9807a717633d1dc (patch)
treebf70e060972fb35e958b92923c3d00c20f9d7ba0 /plugins/NewXstatusNotify
parent9a8742f6ebe7d74b92911d041e204e914db362b2 (diff)
fixed status change popups and sounds
git-svn-id: http://svn.miranda-ng.org/main/trunk@6721 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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.