summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msglog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-24 09:52:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-24 09:52:51 +0000
commit8278b0f406d3e1f1d2d2938b0047f255fa0f2825 (patch)
tree8de9f0448a1235d5d73cd4b4af0aa8673a9bff9f /plugins/TabSRMM/src/msglog.cpp
parent04c18aa4ab21f78ddd29fcbdc18afba148f96135 (diff)
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
Diffstat (limited to 'plugins/TabSRMM/src/msglog.cpp')
-rw-r--r--plugins/TabSRMM/src/msglog.cpp18
1 files changed, 11 insertions, 7 deletions
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