From 9ecbbd90b88cf0fa4ea9d679159c81aa161d38aa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 19 Sep 2024 18:32:13 +0300 Subject: tabSRMM: fix for garbage BBCodes when sending messages --- plugins/TabSRMM/src/generic_msghandlers.cpp | 9 ++------- plugins/TabSRMM/src/msgdialog.cpp | 2 ++ 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 8e743779e3..2c088c5912 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -455,15 +455,10 @@ void CMsgDialog::DM_InitRichEdit() cf2.yHeight = abs(lf.lfHeight) * 15; } else { - LOGFONTW lf = m_pContainer->m_theme.logFonts[MSGFONTID_MESSAGEAREA]; - COLORREF inputcharcolor = m_pContainer->m_theme.fontColors[MSGFONTID_MESSAGEAREA]; - - for (auto &it : Utils::rtf_clrs) - if (it->clr == inputcharcolor) - inputcharcolor = RGB(GetRValue(inputcharcolor), GetGValue(inputcharcolor), GetBValue(inputcharcolor) == 0 ? GetBValue(inputcharcolor) + 1 : GetBValue(inputcharcolor) - 1); + LOGFONTW &lf = m_pContainer->m_theme.logFonts[MSGFONTID_MESSAGEAREA]; cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_BOLD | CFM_ITALIC; - cf2.crTextColor = inputcharcolor; + cf2.crTextColor = m_pContainer->m_theme.fontColors[MSGFONTID_MESSAGEAREA]; cf2.bCharSet = lf.lfCharSet; wcsncpy_s(cf2.szFaceName, lf.lfFaceName, _TRUNCATE); cf2.dwEffects = ((lf.lfWeight >= FW_BOLD) ? CFE_BOLD : 0) | (lf.lfItalic ? CFE_ITALIC : 0) | (lf.lfUnderline ? CFE_UNDERLINE : 0) | (lf.lfStrikeOut ? CFE_STRIKEOUT : 0); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index dd10c1934d..f2747ceaea 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -350,6 +350,8 @@ CMsgDialog::CMsgDialog(SESSION_INFO *si) : void CMsgDialog::Init() { + GetSendFormat(); + m_szProto = Proto_GetBaseAccountName(m_hContact); m_autoClose = CLOSE_ON_CANCEL; m_forceResizable = true; -- cgit v1.2.3