From c7d065645853b2e614e8557fa01057efaf5e6517 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 May 2024 14:23:13 +0300 Subject: DbEvent_GetTextA: unused function removed --- plugins/NewEventNotify/src/popup.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/NewEventNotify/src') 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)) -- cgit v1.2.3