From ec8df0b2db28de4184dfc868044dba41cc91d0f0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Mar 2022 16:56:34 +0300 Subject: NEN: correct processing of timeouts = -1 --- plugins/NewEventNotify/src/popup.cpp | 6 +++++- plugins/NewEventNotify/src/stdafx.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/NewEventNotify/src') diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 87ac31875a..6f70f20e25 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -374,7 +374,11 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) pdata->eventType = eventType; pdata->hContact = hContact; pdata->events.push_back(hEvent); - pdata->iSeconds = (iSeconds > 0) ? iSeconds : g_plugin.iDelayDefault; + switch (iSeconds) { + case -1: pdata->iSeconds = 65535; break; // kinda forrever + case 0: pdata->iSeconds = g_plugin.iDelayDefault; break; + default: pdata->iSeconds = iSeconds; break; + } // finally create the popup pudw.lchContact = hContact; diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h index 9262f1a608..1e0f5d515a 100644 --- a/plugins/NewEventNotify/src/stdafx.h +++ b/plugins/NewEventNotify/src/stdafx.h @@ -57,7 +57,7 @@ #define DEFAULT_COLBACK RGB(255,255,128) #define DEFAULT_COLTEXT RGB(0,0,0) -#define DEFAULT_DELAY -1 +#define DEFAULT_DELAY 0 #define EVENTTYPE_ERRMSG 25366 -- cgit v1.2.3