From 8278b0f406d3e1f1d2d2938b0047f255fa0f2825 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Jun 2013 09:52:51 +0000 Subject: automatic displaying custom events in tabSRMM according to their masks git-svn-id: http://svn.miranda-ng.org/main/trunk@5111 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msglog.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'plugins/TabSRMM/src/msglog.cpp') diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 75784e1987..83cad550e6 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -543,20 +543,18 @@ static char *CreateRTFTail(struct TWindowData *dat) return buffer; } -int TSAPI DbEventIsShown(struct TWindowData *dat, DBEVENTINFO * dbei) +int TSAPI DbEventIsShown(struct TWindowData *dat, DBEVENTINFO *dbei) { - switch (dbei->eventType) { - case EVENTTYPE_MESSAGE: + if (!IsCustomEvent(dbei->eventType)) return 1; - case EVENTTYPE_FILE: - return(dat->dwFlagsEx & MWF_SHOW_FILEEVENTS); - } + if (DbEventIsForMsgWindow(dbei)) + return 1; return IsStatusEvent(dbei->eventType); } -static int DbEventIsForMsgWindow(DBEVENTINFO *dbei) +int DbEventIsForMsgWindow(DBEVENTINFO *dbei) { DBEVENTTYPEDESCR* et = ( DBEVENTTYPEDESCR* )CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); return et && ( et->flags & DETF_MSGWINDOW ); @@ -1030,6 +1028,12 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont mir_free( tszFileName ); } break; + default: + if (IsCustomEvent(dbei.eventType)) { + TCHAR* tszText = DbGetEventTextT(&dbei, CP_ACP); + AppendUnicodeToBuffer(&buffer, &bufferEnd, &bufferAlloced, tszText, 0); + } + break; } break; case '*': // bold -- cgit v1.2.3