diff options
-rw-r--r-- | plugins/IEView/src/HistoryHTMLBuilder.cpp | 3 | ||||
-rw-r--r-- | plugins/IEView/src/ScriverHTMLBuilder.cpp | 3 | ||||
-rw-r--r-- | plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/Utils.cpp | 12 | ||||
-rw-r--r-- | plugins/IEView/src/Utils.h | 2 |
5 files changed, 20 insertions, 2 deletions
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp index 93349151da..f7b08ae861 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.cpp +++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp @@ -73,8 +73,9 @@ bool HistoryHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei) switch (dbei->eventType) {
case EVENTTYPE_MESSAGE:
return 1;
+ default:
+ return Utils::DbEventIsForHistory(dbei);
}
- return 1;
}
char *HistoryHTMLBuilder::timestampToString(DWORD dwFlags, time_t check) {
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index 17fd3bc2d3..fd6293afbc 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -76,8 +76,9 @@ bool ScriverHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei) return 1;
case EVENTTYPE_FILE:
return 1;
+ default:
+ return Utils::DbEventIsForMsgWindow(dbei);
}
- return 0;
}
void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) {
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index 5387d09fa3..6b0b3ea6aa 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -100,6 +100,8 @@ bool TabSRMMHTMLBuilder::isDbEventShown(DWORD dwFlags, DBEVENTINFO *dbei) case EVENTTYPE_ADDED:
case EVENTTYPE_AUTHREQUEST:
return 0;
+ default:
+ return Utils::DbEventIsForMsgWindow(dbei);
}
return 1;
}
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index 4c7b0ddf8d..37c0da77f2 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -185,3 +185,15 @@ void Utils::appendIcon(char **str, int *sizeAlloced, const char *iconFile) {
Utils::appendText(str, sizeAlloced, "<img class=\"img\" src=\"file://%s/plugins/ieview/%s\"/> ", workingDirUtf8, iconFile);
}
+
+bool Utils::DbEventIsForMsgWindow(DBEVENTINFO *dbei)
+{
+ DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ return et && (et->flags & DETF_MSGWINDOW);
+}
+
+bool Utils::DbEventIsForHistory(DBEVENTINFO *dbei)
+{
+ DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ return et && (et->flags & DETF_HISTORY);
+}
\ No newline at end of file diff --git a/plugins/IEView/src/Utils.h b/plugins/IEView/src/Utils.h index 124ce51673..87f107ce09 100644 --- a/plugins/IEView/src/Utils.h +++ b/plugins/IEView/src/Utils.h @@ -42,6 +42,8 @@ public: static void convertPath(wchar_t *path);
static char *escapeString(const char *a);
static int detectURL(const wchar_t *text);
+ static bool DbEventIsForMsgWindow(DBEVENTINFO *dbei);
+ static bool DbEventIsForHistory(DBEVENTINFO *dbei);
};
#endif
|