summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/msglog.cpp10
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp5
-rw-r--r--plugins/TabSRMM/src/msgs.h1
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;