From c6f59d75142b7568dd89f5cff691b0b58030aafd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Sep 2023 13:41:55 +0300 Subject: SmileyAdd: fix for the obsolete quirks in SmaileyAdd API --- plugins/BasicHistory/src/HistoryWindow.cpp | 3 +-- plugins/BasicHistory/src/RichHtmlExport.cpp | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/BasicHistory/src') diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 813fc57860..ec120dadc9 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1189,8 +1189,7 @@ void HistoryWindow::ReplaceIcons(HWND hwndDlg, int selStart, BOOL isSent) sel.cpMin = selStart; sel.cpMax = -1; - SMADD_RICHEDIT3 smadd = { 0 }; - smadd.cbSize = sizeof(smadd); + SMADD_RICHEDIT smadd = { 0 }; smadd.hwndRichEditControl = hwndDlg; smadd.Protocolname = Proto_GetBaseAccountName(m_hContact); smadd.hContact = m_hContact; diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index 682b7240f1..0a10a71db0 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -379,12 +379,11 @@ std::wstring RichHtmlExport::ReplaceSmileys(bool isMe, const std::wstring &msg, wchar_t* msgbuf = new wchar_t[msg.length() + 1]; memcpy_s(msgbuf, (msg.length() + 1) * sizeof(wchar_t), msg.c_str(), (msg.length() + 1) * sizeof(wchar_t)); - SMADD_BATCHPARSE2 sp = { 0 }; + SMADD_BATCHPARSE sp = { 0 }; SMADD_BATCHPARSERES *spr; - sp.cbSize = sizeof(sp); sp.Protocolname = baseProto.length() == 0 ? nullptr : baseProto.c_str(); - sp.str = msgbuf; - sp.flag = SAFL_TCHAR | SAFL_PATH | (isMe ? SAFL_OUTGOING : 0); + sp.str.w = msgbuf; + sp.flag = SAFL_UNICODE | SAFL_PATH | (isMe ? SAFL_OUTGOING : 0); spr = (SMADD_BATCHPARSERES*)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&sp); delete[] msgbuf; -- cgit v1.2.3