From 67608d2587ba849bd1bb6be346efd82794197acb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 Oct 2023 15:24:55 +0300 Subject: =?UTF-8?q?fixes=20#3753=20(Scriver:=20=D0=BD=D0=B5=20=D0=B2=D0=B8?= =?UTF-8?q?=D0=B4=D0=BD=D1=8B=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/Scriver/src/msgutils.cpp | 6 +++--- plugins/TabSRMM/src/generic_msghandlers.cpp | 7 +------ plugins/TabSRMM/src/msgdialog.cpp | 2 +- plugins/TabSRMM/src/msgdlgother.cpp | 5 ----- plugins/TabSRMM/src/msgs.h | 2 +- 5 files changed, 6 insertions(+), 16 deletions(-) (limited to 'plugins') diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index ce64dba69d..fdbeb7a117 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -99,7 +99,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei) if (hDbEvent != m_hDbEventFirst && db_event_next(m_hContact, hDbEvent) == 0) m_pLog->LogEvents(hDbEvent, 1, 1); else - SendMessage(m_hwnd, DM_REMAKELOG, 0, 0); + RemakeLog(); if (!(dbei.flags & DBEF_SENT) && !dbei.isSrmm()) { if (!bIsActive) { @@ -342,11 +342,11 @@ void CMsgDialog::OnOptionsApplied() else { SetDialogToType(); - SendMessage(m_hwnd, DM_REMAKELOG, 0, 0); UpdateTabControl(); SetupInfobar(); } + ScheduleRedrawLog(); m_message.SendMsg(EM_REQUESTRESIZE, 0, 0); } @@ -607,7 +607,7 @@ void CMsgDialog::ToggleRtl() SetWindowLongPtr(m_pLog->GetHwnd(), GWL_EXSTYLE, GetWindowLongPtr(m_pLog->GetHwnd(), GWL_EXSTYLE) & ~(WS_EX_LEFTSCROLLBAR)); } m_message.SendMsg(EM_SETPARAFORMAT, 0, (LPARAM)&pf2); - SendMessage(m_hwnd, DM_REMAKELOG, 0, 0); + RemakeLog(); } void CMsgDialog::UpdateIcon() diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index af491bd4b0..fddd88cc6e 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -879,12 +879,7 @@ void CMsgDialog::OnOptionsApplied() SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 0); InvalidateRect(m_message.GetHwnd(), nullptr, FALSE); - if (IsIconic(m_pContainer->m_hwnd)) - m_bDeferredRemakeLog = true; - else if (isChat()) - RedrawLog(); - else - RemakeLog(); + ScheduleRedrawLog(); ShowWindow(m_hwndPanelPicParent, SW_SHOW); EnableWindow(m_hwndPanelPicParent, TRUE); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index b135ec52bb..3362b32625 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2370,7 +2370,7 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case DM_FORCEDREMAKELOG: m_dwFlags &= ~(MWF_LOG_ALL); m_dwFlags |= (lParam & MWF_LOG_ALL); - m_bDeferredRemakeLog = true; + ScheduleRedrawLog(); return 0; case DM_APPENDMCEVENT: diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 5f6a98e45b..e29dfdef75 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -2971,11 +2971,6 @@ void CMsgDialog::UpdateWindowState(UINT msg) } m_pContainer->cfg.flags.m_bNeedsUpdateTitle = false; - if (m_bDeferredRemakeLog && !IsIconic(m_pContainer->m_hwnd)) { - RemakeLog(); - m_bDeferredRemakeLog = false; - } - if (m_bNeedCheckSize) PostMessage(m_hwnd, DM_SAVESIZE, 0, 0); diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index c542919d86..0ac4ab7ea3 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -467,7 +467,7 @@ class CMsgDialog : public CSrmmBaseDialog bool m_fLimitedUpdate; bool m_bClrAdded; bool m_bInsertMode, m_bInitMode = true; - bool m_bDeferredScroll, m_bDeferredRemakeLog; + bool m_bDeferredScroll; bool m_bWasBackgroundCreate; int m_iRealAvatarHeight; -- cgit v1.2.3