From 93bbcf1646e427be610273ae977a349705dcf39c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 17 Mar 2013 11:20:14 +0000 Subject: two forgotten DestroyWindow() git-svn-id: http://svn.miranda-ng.org/main/trunk@4071 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins/NewXstatusNotify') diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index c614c702f1..350f99f536 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1021,8 +1021,7 @@ int ProtoAck(WPARAM wParam,LPARAM lParam) //The protocol changed from a disconnected status to a connected status. //Enable the popups for this protocol. int idTimer = AddAtomA(szProto); - if (idTimer) - { + if (idTimer) { char TimerProtoName[256]; mir_snprintf(TimerProtoName, sizeof(TimerProtoName), "ConnectionTimeout%s", szProto); UINT ConnectTimer = db_get_dw(0, MODULE, TimerProtoName, db_get_dw(0, MODULE, "ConnectionTimeout", 10000)); @@ -1132,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); @@ -1141,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