summaryrefslogtreecommitdiff
path: root/plugins/NewEventNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-03-02 16:56:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-03-02 16:56:34 +0300
commitec8df0b2db28de4184dfc868044dba41cc91d0f0 (patch)
tree97a21bc4a1a934e31de172778bb146f12e149a48 /plugins/NewEventNotify/src
parente408bf603abd2e8afa2c838a411ad52f5a6a7c92 (diff)
NEN: correct processing of timeouts = -1
Diffstat (limited to 'plugins/NewEventNotify/src')
-rw-r--r--plugins/NewEventNotify/src/popup.cpp6
-rw-r--r--plugins/NewEventNotify/src/stdafx.h2
2 files changed, 6 insertions, 2 deletions
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