diff options
author | George Hazan <george.hazan@gmail.com> | 2024-03-24 15:22:00 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-03-24 15:22:00 +0300 |
commit | 9774715b1914ac65ada1211322bfd080af694af9 (patch) | |
tree | 639b14e2201ffa0ebe5c514114ca30f23d1f8c70 /plugins/IEView | |
parent | b873a2605a28bbf43e9cc6679562cf6bbabad601 (diff) |
code cleaning
Diffstat (limited to 'plugins/IEView')
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 11 | ||||
-rw-r--r-- | plugins/IEView/src/ScriverHTMLBuilder.cpp | 9 |
2 files changed, 7 insertions, 13 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index c561a94f74..6ea13100b7 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -228,17 +228,18 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) eventData->szNick.w = getContactName(event->hContact, szProto);
eventData->bIsMe = FALSE;
}
- if (dbei.eventType == EVENTTYPE_MESSAGE || dbei.isSrmm()) {
+
+ if (dbei.eventType == EVENTTYPE_FILE) {
+ eventData->szText.w = DbEvent_GetTextW(&dbei);
+ eventData->iType = IEED_EVENT_FILE;
+ }
+ else if (dbei.isSrmm()) {
eventData->szText.w = DbEvent_GetTextW(&dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE)
eventData->iType = IEED_EVENT_MESSAGE;
else
eventData->iType = IEED_EVENT_STATUSCHANGE;
}
- else if (dbei.eventType == EVENTTYPE_FILE) {
- eventData->szText.w = DbEvent_GetTextW(&dbei);
- eventData->iType = IEED_EVENT_FILE;
- }
else if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
// blob is: uin(uint32_t), hContact(uint32_t), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
eventData->szText.w = mir_wstrdup(TranslateT(" requested authorization"));
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index d0fc1d3d3e..51f0c6fa6a 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -70,14 +70,7 @@ ScriverHTMLBuilder::ScriverHTMLBuilder() bool ScriverHTMLBuilder::isDbEventShown(const DB::EventInfo &dbei)
{
- switch (dbei.eventType) {
- case EVENTTYPE_MESSAGE:
- return 1;
- case EVENTTYPE_FILE:
- return 1;
- default:
- return dbei.isSrmm();
- }
+ return dbei.isSrmm();
}
void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA *lf, COLORREF *colour)
|