summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-25 13:41:55 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-25 13:41:55 +0300
commitc6f59d75142b7568dd89f5cff691b0b58030aafd (patch)
tree6fd83d9e6a71bbf7a750a1983922121265acadd7 /plugins/TabSRMM/src
parent53669871fc860856c80c2d79cb6b21d52ea25440 (diff)
SmileyAdd: fix for the obsolete quirks in SmaileyAdd API
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp7
-rw-r--r--plugins/TabSRMM/src/msglog.cpp4
3 files changed, 6 insertions, 7 deletions
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 5cf4751391..ee62c0b288 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1350,7 +1350,7 @@ void CTip::show(const RECT& rc, POINT& pt, const HICON hIcon, const wchar_t *szT
CContactCache *c = CContactCache::getContactCache(m_hContact);
::SendMessage(m_hRich, EM_SETBKGNDCOLOR, 0, (LPARAM)PluginConfig.m_ipBackgroundGradientHigh);
- SMADD_RICHEDIT3 smadd = { sizeof(smadd) };
+ SMADD_RICHEDIT smadd = {};
smadd.hwndRichEditControl = m_hRich;
smadd.Protocolname = const_cast<char *>(c->getActiveProto());
smadd.hContact = c->getActiveContact();
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index 7816293863..ce2a2d32e6 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -931,11 +931,10 @@ ok:
if (PluginConfig.g_SmileyAddAvail && (endmark > (beginmark + 1))) {
CMStringW smcode = msg.Mid(beginmark, (endmark - beginmark) + 1);
- SMADD_BATCHPARSE2 smbp = {};
- smbp.cbSize = sizeof(smbp);
+ SMADD_BATCHPARSE smbp = {};
smbp.Protocolname = m_cache->getActiveProto();
- smbp.flag = SAFL_TCHAR | SAFL_PATH | (isSent ? SAFL_OUTGOING : 0);
- smbp.str = (wchar_t*)smcode.c_str();
+ smbp.flag = SAFL_UNICODE | SAFL_PATH | (isSent ? SAFL_OUTGOING : 0);
+ smbp.str.w = smcode.c_str();
smbp.hContact = m_hContact;
SMADD_BATCHPARSERES *smbpr = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&smbp);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index ffbb75e694..352063b2dd 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1326,7 +1326,7 @@ void CLogWindow::LogChatEvents(const LOGINFO *lin)
if (newsel.cpMin < 0)
newsel.cpMin = 0;
- SMADD_RICHEDIT3 sm = { sizeof(sm) };
+ SMADD_RICHEDIT sm = {};
sm.hwndRichEditControl = m_rtf.GetHwnd();
sm.Protocolname = si->pszModule;
sm.rangeToReplace = bRedraw ? nullptr : &newsel;
@@ -1467,7 +1467,7 @@ void CLogWindow::ReplaceIcons(LONG startAt, int fAppend, BOOL isSent)
sel.cpMin = startAt;
sel.cpMax = -1;
- SMADD_RICHEDIT3 smadd = { sizeof(smadd) };
+ SMADD_RICHEDIT smadd = {};
smadd.hwndRichEditControl = m_rtf.GetHwnd();
smadd.Protocolname = const_cast<char *>(m_pDlg.m_cache->getActiveProto());
smadd.hContact = m_pDlg.m_cache->getActiveContact();