diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-26 13:34:09 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-26 13:34:09 +0300 |
commit | b8ebaa0bdb6be17e014d7a382b86af8c028cf00d (patch) | |
tree | 5ff2f2e64e9bf2f0d214fbc9af1d8a661d934c17 /plugins/TabSRMM | |
parent | aa23f64e684fd892a2ae51eacb71c66434efc4d0 (diff) |
Group chat options are applied alongside the private window options update
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 15 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 |
4 files changed, 13 insertions, 23 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 7fbd56f602..618661c0ef 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -494,8 +494,6 @@ void CMsgDialog::DM_InitRichEdit() szStreamOut = m_message.GetRichTextRtf();
SetWindowText(m_message.GetHwnd(), L"");
- m_pLog->UpdateOptions();
-
m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_pContainer->m_theme.inputbg);
CHARFORMAT2 cf2 = {};
@@ -850,6 +848,18 @@ void CMsgDialog::OnOptionsApplied() m_dwFlags = m_pContainer->m_theme.dwFlags;
}
+ DM_InitRichEdit();
+ GetSendFormat();
+
+ if (isChat()) {
+ m_btnOk.SendMsg(BUTTONSETASNORMAL, TRUE, 0);
+
+ m_nickList.SetItemHeight(0, g_Settings.iNickListFontHeight);
+ InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
+
+ UpdateChatOptions();
+ }
+
LoadLocalFlags();
m_hTimeZone = TimeZone_CreateByContact(m_hContact, nullptr, TZF_KNOWNONLY);
@@ -860,11 +870,9 @@ void CMsgDialog::OnOptionsApplied() // small inner margins (padding) for the text areas
m_message.SendMsg(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3));
- GetSendFormat();
SetDialogToType();
SendMessage(m_hwnd, DM_CONFIGURETOOLBAR, 0, 0);
- DM_InitRichEdit();
if (m_hwnd == m_pContainer->m_hwndActive)
SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0);
InvalidateRect(m_message.GetHwnd(), nullptr, FALSE);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 09aee40cb7..13fa713f86 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -563,10 +563,10 @@ bool CMsgDialog::OnInitDialog() LoadContactAvatar();
LoadOwnAvatar();
+ OnOptionsApplied();
if (isChat()) {
m_pLog->Clear();
- UpdateOptions();
UpdateStatusBar();
UpdateTitle();
m_hTabIcon = m_hTabStatusIcon;
@@ -580,8 +580,6 @@ bool CMsgDialog::OnInitDialog() else {
GetFirstEvent();
- OnOptionsApplied();
-
DB::ECPTR pCursor(DB::EventsRev(m_hContact));
while (MEVENT hdbEvent = pCursor.FetchNext()) {
DBEVENTINFO dbei = {};
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index f8d98cd9a1..445cf5e874 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -2578,21 +2578,6 @@ void CMsgDialog::UpdateFilterButton() }
/////////////////////////////////////////////////////////////////////////////////////////
-
-void CMsgDialog::UpdateOptions()
-{
- GetSendFormat();
-
- DM_InitRichEdit();
- m_btnOk.SendMsg(BUTTONSETASNORMAL, TRUE, 0);
-
- m_nickList.SetItemHeight(0, g_Settings.iNickListFontHeight);
- InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
-
- CSuper::UpdateOptions();
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
// update the status bar field which displays the number of characters in the input area
// and various indicators (caps lock, num lock, insert mode).
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 5817cfcb88..29b34e0d32 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -602,7 +602,6 @@ public: void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
- void UpdateOptions() override;
void UpdateStatusBar() override;
void UpdateTitle() override;
|