diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-13 22:08:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-13 22:08:36 +0300 |
commit | b320ea34a3c94778b8c71b942948e97b554cf186 (patch) | |
tree | 0dd7582b97d1405ea70b71b0a65ec89b1792f7fc /plugins/TabSRMM/src | |
parent | 63a0d8d6c47896e05630896ef2794fab55a99f31 (diff) |
tabSRMM: further log code cleaning
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 |
3 files changed, 12 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 4410a7f04c..308729a68d 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -1204,6 +1204,13 @@ void CLogWindow::Attach() m_rtf.SendMsg(EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(3, 3));
}
+void CLogWindow::Clear()
+{
+ CSuper::Clear();
+
+ m_pDlg.m_bLogEmpty = true;
+}
+
void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend)
{
LogEvents(hDbEventFirst, count, fAppend, nullptr);
@@ -1264,7 +1271,8 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DBEVEN m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel);
}
else {
- SetWindowText(m_rtf.GetHwnd(), L"");
+ Clear();
+
sel.cpMin = 0;
sel.cpMax = GetWindowTextLength(m_rtf.GetHwnd());
m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel);
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 96ff92a1e5..2fc0efafe4 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -607,7 +607,7 @@ public: {
m_pLog = new CLogWindow(*this);
- m_dwFlags = m_pContainer->m_theme.dwFlags | MWF_LOG_RTL;
+ m_dwFlags = m_pContainer->m_theme.dwFlags;
m_cache = new CContactCache(m_hContact);
m_cache->updateNick();
@@ -742,8 +742,7 @@ public: m_dwFlags = (rtl ? m_dwFlags | MWF_LOG_RTL : m_dwFlags & ~MWF_LOG_RTL);
m_dwFlags = (iIndex == 0 || iIndex == 1) ? m_dwFlags & ~MWF_LOG_GROUPMODE : m_dwFlags | MWF_LOG_GROUPMODE;
mir_snwprintf(m_wszMyNickname, L"My Nickname");
- m_pLog->Clear();
- LOG()->LogEvents(0, 1, true, &dbei);
+ LOG()->LogEvents(0, 1, false, &dbei);
if (changed)
memcpy(tSet->szTemplates[inEdit], szTemp, TEMPLATE_LENGTH * sizeof(wchar_t));
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 8246824ffa..8e852a8368 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -315,6 +315,7 @@ public: }
void Attach() override;
+ void Clear() override;
void LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) override;
void LogEvents(struct LOGINFO *, bool) override;
void ScrollToBottom() override;
|