diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-19 18:32:13 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-19 18:32:13 +0300 |
commit | 9ecbbd90b88cf0fa4ea9d679159c81aa161d38aa (patch) | |
tree | 69f507428ace8a763acaa69cf1f2cd6e4a9ce357 /plugins/TabSRMM | |
parent | a8d6dada3453451daf3110759c2f9750b7998043 (diff) |
tabSRMM: fix for garbage BBCodes when sending messages
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 9 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 2 |
2 files changed, 4 insertions, 7 deletions
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;
|