diff options
author | George Hazan <ghazan@miranda.im> | 2022-02-08 19:22:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-02-08 19:22:02 +0300 |
commit | 760867149a99443036f53c73190d53bd87039def (patch) | |
tree | 1711908197fb43057a11ba71fbd0019553b65c52 /plugins/IEView/src | |
parent | 5aebbf6c518190ea03ef3e26ef3f0cd74ff928ce (diff) |
fixes #3023 (IEView: не отображаются подписи к файлтрансферам)
Diffstat (limited to 'plugins/IEView/src')
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 12 | ||||
-rw-r--r-- | plugins/IEView/src/Template.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/Template.h | 1 | ||||
-rw-r--r-- | plugins/IEView/src/TemplateHTMLBuilder.cpp | 11 | ||||
-rw-r--r-- | plugins/IEView/src/ieview_logger.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/version.h | 2 |
6 files changed, 10 insertions, 20 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index bc46529b1d..3398d2b003 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -216,13 +216,13 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) }
IEVIEWEVENTDATA *eventData = new IEVIEWEVENTDATA;
- eventData->dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2 |
+ eventData->dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK |
(dbei.flags & DBEF_READ ? IEEDF_READ : 0) | (dbei.flags & DBEF_SENT ? IEEDF_SENT : 0) | (dbei.flags & DBEF_RTL ? IEEDF_RTL : 0);
if (event->dwFlags & IEEF_RTL)
eventData->dwFlags |= IEEDF_RTL;
eventData->time = dbei.timestamp;
- eventData->szNick.a = eventData->szText.a = eventData->szText2.a = nullptr;
+ eventData->szNick.a = eventData->szText.a = nullptr;
if (dbei.flags & DBEF_SENT) {
eventData->szNick.w = getContactName(NULL, szProto);
eventData->bIsMe = TRUE;
@@ -243,8 +243,11 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) char* filename = ((char *)dbei.pBlob) + sizeof(uint32_t);
char* descr = filename + mir_strlen(filename) + 1;
eventData->szText.w = DbEvent_GetString(&dbei, filename);
- if (*descr != '\0')
- eventData->szText2.w = DbEvent_GetString(&dbei, descr);
+ if (*descr != '\0') {
+ CMStringW tmp(FORMAT, L"%s (%s)", eventData->szText.w, ptrW(DbEvent_GetString(&dbei, descr)).get());
+ mir_free((void*)eventData->szText.w);
+ eventData->szText.w = tmp.Detach();
+ }
eventData->iType = IEED_EVENT_FILE;
}
else if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
@@ -279,7 +282,6 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) for (IEVIEWEVENTDATA* eventData2 = newEvent.eventData; eventData2 != nullptr;) {
IEVIEWEVENTDATA *eventData = eventData2->next;
mir_free((void*)eventData2->szText.w);
- mir_free((void*)eventData2->szText2.w);
mir_free((void*)eventData2->szNick.w);
delete eventData2;
eventData2 = eventData;
diff --git a/plugins/IEView/src/Template.cpp b/plugins/IEView/src/Template.cpp index c171a141c1..5571182887 100644 --- a/plugins/IEView/src/Template.cpp +++ b/plugins/IEView/src/Template.cpp @@ -123,7 +123,6 @@ static TokenDef tokenNames[] = { TokenDef("%nickIn%", Token::NICKIN, 0),
TokenDef("%nickOut%", Token::NICKOUT, 1),
TokenDef("%statusMsg%", Token::STATUSMSG, 0),
- TokenDef("%fileDesc%", Token::FILEDESC, 0),
TokenDef("%\\name%", Token::INAME, 1),
TokenDef("%\\time%", Token::TIME, 1),
@@ -143,7 +142,6 @@ static TokenDef tokenNames[] = { TokenDef("%\\nickIn%", Token::NICKIN, 1),
TokenDef("%\\nickOut%", Token::NICKOUT, 1),
TokenDef("%\\statusMsg%", Token::STATUSMSG, 1),
- TokenDef("%\\fileDesc%", Token::FILEDESC, 1)
};
void Template::tokenize()
diff --git a/plugins/IEView/src/Template.h b/plugins/IEView/src/Template.h index a42c4c92af..64ac8ab561 100644 --- a/plugins/IEView/src/Template.h +++ b/plugins/IEView/src/Template.h @@ -60,7 +60,6 @@ public: STATUSMSG,
NICKIN,
NICKOUT,
- FILEDESC,
};
Token(int, const char *, int);
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index a93f761fda..b9688859b6 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -385,7 +385,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, tmpltName[1] = nullptr;
groupTemplate = nullptr;
- char *szName = nullptr, *szText = nullptr, *szFileDesc = nullptr;
+ char *szName = nullptr, *szText = nullptr;
if (event->eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(event->hContact, eventData->szNick.w, ENF_NAMESMILEYS, true);
else
@@ -396,11 +396,6 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, else
szText = encodeUTF8(event->hContact, eventData->szText.a, event->codepage, ENF_ALL, isSent);
- if (eventData->dwFlags & IEEDF_UNICODE_TEXT2)
- szFileDesc = encodeUTF8(event->hContact, eventData->szText2.w, 0, isSent);
- else
- szFileDesc = encodeUTF8(event->hContact, eventData->szText2.a, event->codepage, 0, isSent);
-
if (eventData->iType == IEED_EVENT_MESSAGE) {
if (!isRTL) {
if (isGrouping && (getFlags(protoSettings) & Options::LOG_GROUP_MESSAGES)) {
@@ -523,9 +518,6 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, case Token::NICKOUT:
tokenVal = szNickOut;
break;
- case Token::FILEDESC:
- tokenVal = szFileDesc;
- break;
}
if (tokenVal != nullptr) {
if (token->getEscape())
@@ -540,7 +532,6 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, mir_free(szName);
mir_free(szText);
- mir_free(szFileDesc);
view->write(str);
}
diff --git a/plugins/IEView/src/ieview_logger.cpp b/plugins/IEView/src/ieview_logger.cpp index 13f781cd74..9da4150847 100644 --- a/plugins/IEView/src/ieview_logger.cpp +++ b/plugins/IEView/src/ieview_logger.cpp @@ -163,7 +163,7 @@ public: } ied.dwData |= IEEDD_GC_SHOW_TIME | IEEDD_GC_SHOW_ICON; - ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2; + ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK; HandleIEEvent(0, LPARAM(&event)); pLog = pLog->prev; diff --git a/plugins/IEView/src/version.h b/plugins/IEView/src/version.h index f21ae3bcf4..cb866319f0 100644 --- a/plugins/IEView/src/version.h +++ b/plugins/IEView/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 1 #define __MINOR_VERSION 6 #define __RELEASE_NUM 0 -#define __BUILD_NUM 4 +#define __BUILD_NUM 5 #include <stdver.h> |