summaryrefslogtreecommitdiff
path: root/plugins/NewEventNotify
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-13 14:23:13 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-13 14:23:13 +0300
commitc7d065645853b2e614e8557fa01057efaf5e6517 (patch)
tree6b5233ed788e31014e868c007ccb469ca4d64e60 /plugins/NewEventNotify
parent831bffd63776f4ffe82245cadf2b95c48cd44d38 (diff)
DbEvent_GetTextA: unused function removed
Diffstat (limited to 'plugins/NewEventNotify')
-rw-r--r--plugins/NewEventNotify/src/popup.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 4fb80b8342..a33b7f5f4c 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -157,7 +157,7 @@ static wchar_t* ShortenPreview(DB::EventInfo &dbei)
if (iPreviewLimit > 500 || iPreviewLimit == 0)
iPreviewLimit = 500;
- wchar_t *buf = DbEvent_GetTextW(&dbei);
+ wchar_t *buf = dbei.getText();
if (mir_wstrlen(buf) > iPreviewLimit) {
fAddEllipsis = true;
size_t iIndex = iPreviewLimit;
@@ -294,7 +294,7 @@ static wchar_t* GetEventPreview(DB::EventInfo &dbei)
// support for custom database event types
DBEVENTTYPEDESCR *pei = DbEvent_GetType(dbei.szModule, dbei.eventType);
if (pei && pBlob) {
- comment1 = DbEvent_GetTextW(&dbei);
+ comment1 = dbei.getText();
commentFix = pei->descr;
}
else commentFix = POPUP_COMMENT_OTHER;
@@ -363,12 +363,7 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
}
// get DBEVENTINFO with pBlob if preview is needed (when is test then is off)
- DB::EventInfo dbe;
- if (hEvent) {
- if ((g_plugin.bPreview || eventType == EVENTTYPE_ADDED || eventType == EVENTTYPE_AUTHREQUEST))
- dbe.cbBlob = -1;
- db_event_get(hEvent, &dbe);
- }
+ DB::EventInfo dbe(hEvent, g_plugin.bPreview || eventType == EVENTTYPE_ADDED || eventType == EVENTTYPE_AUTHREQUEST);
// retrieve correct hContact for AUTH events
if (dbe.pBlob && (eventType == EVENTTYPE_ADDED || eventType == EVENTTYPE_AUTHREQUEST))