From d9e4116257cb8ca45ea5cf8b2db0a865779dbe06 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Feb 2019 18:27:18 +0300 Subject: IEView => #1846 --- plugins/IEView/src/TemplateHTMLBuilder.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index a391525b60..b1c07e4feb 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -164,7 +164,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr if (szAvatarIn == nullptr) szAvatarIn = mir_strdup(szNoAvatar); - char *szAvatarOut = getAvatar(NULL, szRealProto); + char *szAvatarOut = getAvatar(0, szRealProto); if (szAvatarOut == nullptr) szAvatarOut = mir_strdup(szNoAvatar); @@ -175,11 +175,13 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr } ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto)); - if (tszNick != NULL) + if (tszNick != nullptr) szNickIn = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true); - tszNick = Contact_GetInfo(CNF_NICK, NULL, szProto); - if (tszNick != NULL) + tszNick = Contact_GetInfo(CNF_CUSTOMNICK, 0, szProto); + if (tszNick == nullptr) + Contact_GetInfo(CNF_NICK, 0, szProto); + if (tszNick != nullptr) szNickOut = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true); Template *tmplt = nullptr; @@ -349,11 +351,13 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, } ptrW tszNick(Contact_GetInfo(CNF_NICK, event->hContact, szProto)); - if (tszNick != NULL) + if (tszNick != nullptr) szNickIn = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true); - tszNick = Contact_GetInfo(CNF_NICK, NULL, szProto); - if (tszNick != NULL) + tszNick = Contact_GetInfo(CNF_CUSTOMNICK, 0, szProto); + if (tszNick == nullptr) + tszNick = Contact_GetInfo(CNF_NICK, 0, szProto); + if (tszNick != nullptr) szNickOut = encodeUTF8(event->hContact, szRealProto, tszNick, ENF_NAMESMILEYS, true); IEVIEWEVENTDATA* eventData = event->eventData; -- cgit v1.2.3