summaryrefslogtreecommitdiff
path: root/plugins/HistoryLinkListPlus/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryLinkListPlus/src')
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp5
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp19
2 files changed, 7 insertions, 17 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 016724e8fe..69cd060b33 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -90,10 +90,7 @@ static INT_PTR LinkList_Main(WPARAM hContact, LPARAM)
memset(listStart, 0, sizeof(LISTELEMENT));
do {
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- db_event_get(hEvent, &dbe);
-
+ DB::EventInfo dbe(hEvent);
if (dbe.eventType == EVENTTYPE_MESSAGE) {
// Call function to find URIs
if (ExtractURI(&dbe, hEvent, listStart) < 0) {
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index 406ce734be..4b4736ea53 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -380,9 +380,7 @@ void WriteLinkList(HWND hDlg, uint8_t params, LISTELEMENT *listStart, LPCTSTR se
// Perform deep scan
if (actualElement->hEvent != NULL)
{
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- db_event_get(actualElement->hEvent, &dbe);
+ DB::EventInfo dbe(actualElement->hEvent);
ptrW msg(DbEvent_GetTextW(&dbe, CP_ACP));
if (wcsstr(msg, searchString))
@@ -610,11 +608,9 @@ void WriteMessage(HWND hDlg, LISTELEMENT *listStart, int actLinePos)
if (actualElement->linePos == actLinePos) {
MEVENT hEvent = actualElement->hEvent;
if (hEvent != NULL) {
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- db_event_get(hEvent, &dbe);
-
SetDlgItemTextW(hDlg, IDC_MESSAGE, L"");
+
+ DB::EventInfo dbe(hEvent);
SendDlgItemMessage(hDlg, IDC_MESSAGE, EM_REPLACESEL, FALSE, ptrW(DbEvent_GetTextW(&dbe, CP_ACP)));
}
break;
@@ -763,9 +759,7 @@ void GetListInfo(uint8_t params, LISTELEMENT *listStart, LPCTSTR searchString, s
// Perform deep scan
if (actualElement->hEvent != NULL)
{
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- db_event_get(actualElement->hEvent, &dbe);
+ DB::EventInfo dbe(actualElement->hEvent);
if (wcsstr((LPTSTR)dbe.pBlob, searchString))
filter3 = 1;
@@ -1165,9 +1159,8 @@ int DBUpdate(WPARAM wParam, LPARAM hEvent)
return 0;
if (hDlg) {
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- if (db_event_get(hEvent, &dbe))
+ DB::EventInfo dbe(hEvent);
+ if (!dbe)
return 0;
if (dbe.eventType == EVENTTYPE_MESSAGE) {