From 6f2c99a32c9e539fc61edb6b836e8805b013a180 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Mar 2013 20:43:46 +0000 Subject: - unused constant MIRANDA_IDLE_INFO_SIZE_1 removed; - proper tracking of autoaway sound options; - code cleanup for MIRANDA_IDLE_INFO initialization; git-svn-id: http://svn.miranda-ng.org/main/trunk@4156 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'plugins/NewXstatusNotify') diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 350f99f536..4a7dd0e047 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -991,13 +991,15 @@ void InitStatusList() VOID CALLBACK ConnectionTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { - if (uMsg == WM_TIMER) - { - char szProto[256]; - //We've received a timer message: enable the popups for a specified protocol. + if (uMsg == WM_TIMER) { KillTimer(hwnd, idEvent); - DWORD dwResult = (DWORD)GetAtomNameA((ATOM)idEvent, szProto, sizeof(szProto)); - if (dwResult) db_set_b(0, MODULE, szProto, 1); + + //We've received a timer message: enable the popups for a specified protocol. + char szProto[256]; + if ( GetAtomNameA((ATOM)idEvent, szProto, sizeof(szProto)) > 0) { + db_set_b(0, MODULE, szProto, 1); + DeleteAtom((ATOM)idEvent); + } } } -- cgit v1.2.3