From 5bef9cc96f37de38f9f6388d5eeb42b8ed85edbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 4 Feb 2020 15:51:38 +0300 Subject: fixes #2197 ([0.95.11 x64] IRC: Update broke text transformation shortcuts) --- plugins/TabSRMM/src/generic_msghandlers.cpp | 4 ++-- plugins/TabSRMM/src/msgdialog.cpp | 8 ++++---- plugins/TabSRMM/src/msgdlgother.cpp | 2 ++ plugins/TabSRMM/src/msglog.cpp | 3 +-- plugins/TabSRMM/src/msgs.h | 2 +- plugins/TabSRMM/src/userprefs.cpp | 2 +- plugins/TabSRMM/src/version.h | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 2f9184d7b7..bf7794e3f8 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -883,7 +883,7 @@ void CMsgDialog::DM_NotifyTyping(int mode) CallService(MS_PROTO_SELFISTYPING, hContact, m_nTypeMode); } -void CMsgDialog::DM_OptionsApplied(WPARAM, LPARAM lParam) +void CMsgDialog::DM_OptionsApplied(bool bRemakeLog) { m_szMicroLf[0] = 0; if (!m_pContainer->m_theme.isPrivate) { @@ -909,7 +909,7 @@ void CMsgDialog::DM_OptionsApplied(WPARAM, LPARAM lParam) if (m_hwnd == m_pContainer->m_hwndActive) SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0); InvalidateRect(m_message.GetHwnd(), nullptr, FALSE); - if (!lParam) { + if (bRemakeLog) { if (IsIconic(m_pContainer->m_hwnd)) m_bDeferredRemakeLog = true; else diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 01931cd794..7da67c41ea 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -599,7 +599,7 @@ bool CMsgDialog::OnInitDialog() if (m_hContact) FindFirstEvent(); - DM_OptionsApplied(0, 0); + DM_OptionsApplied(); // restore saved msg if any... if (m_hContact) { @@ -1474,7 +1474,7 @@ int CMsgDialog::OnFilter(MSGFILTER *pFilter) db_unset(m_hContact, SRMSGMOD_T, "mwmask"); db_unset(m_hContact, SRMSGMOD_T, "mwflags"); } - DM_OptionsApplied(0, 0); + DM_OptionsApplied(); RemakeLog(); } return _dlgReturn(m_hwnd, 1); @@ -2527,7 +2527,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (isChat()) RedrawLog(); else - DM_OptionsApplied(0, 0); + DM_OptionsApplied(); break; case WM_NOTIFY: @@ -2689,7 +2689,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; case DM_OPTIONSAPPLIED: - DM_OptionsApplied(wParam, lParam); + DM_OptionsApplied(lParam == 0); return 0; case DM_UPDATESTATUSMSG: diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index aceae943ab..e74ea6b5ba 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1865,6 +1865,8 @@ void CMsgDialog::UpdateNickList() void CMsgDialog::UpdateOptions() { + GetSendFormat(); + DM_InitRichEdit(); m_btnOk.SendMsg(BUTTONSETASNORMAL, TRUE, 0); diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index b5e2f832ef..1d03aa7a1c 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -357,8 +357,7 @@ static void Build_RTF_Header(CMStringA &str, CMsgDialog *dat) // paragraph header str.AppendFormat("}"); - // indent: - // real indent is set in msgdialog.c (DM_OPTIONSAPPLIED) + // indent if (!(dat->m_dwFlags & MWF_LOG_INDENT)) str.AppendFormat("\\li%u\\ri%u\\fi%u\\tx%u", 2 * 15, 2 * 15, 0, 70 * 15); } diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 6b5ce9b6ed..f40792901b 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -580,7 +580,7 @@ public: return m_pContainer->IsActive() && m_pContainer->m_hwndActive == m_hwnd; } - void DM_OptionsApplied(WPARAM wParam, LPARAM lParam); + void DM_OptionsApplied(bool bRemakeLog = true); void DM_RecalcPictureSize(void); void DM_ScrollToBottom(WPARAM wParam, LPARAM lParam); diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index cd4a726f20..962b5477c0 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -362,7 +362,7 @@ public: fShouldHide = false; else ShowWindow(dat->m_pContainer->m_hwnd, SW_HIDE); - dat->DM_OptionsApplied(0, 0); + dat->DM_OptionsApplied(); dat->RemakeLog(); if (fShouldHide) ShowWindow(dat->m_pContainer->m_hwnd, SW_SHOWNORMAL); diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 8fad74317d..da35591b32 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3 #define __MINOR_VERSION 6 #define __RELEASE_NUM 0 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include -- cgit v1.2.3