From 287bb9bd30b7b6988a8a40f0a1be1ce387301de6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 25 Apr 2020 18:17:39 +0300 Subject: better tabSRMM compatibility --- plugins/TabSRMM/src/msgdlgother.cpp | 15 +++++++++------ plugins/TabSRMM/src/templates.cpp | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 8317d4bd0c..132a7babf3 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -856,13 +856,16 @@ void CMsgDialog::LoadSplitter() void CMsgDialog::LogEvent(DBEVENTINFO &dbei) { - dbei.flags |= DBEF_TEMPORARY; - - MEVENT hDbEvent = db_event_add(m_hContact, &dbei); - if (hDbEvent) { - m_pLog->LogEvents(hDbEvent, 1, true); - db_event_delete(hDbEvent); + if (m_iLogMode != 0) { + dbei.flags |= DBEF_TEMPORARY; + + MEVENT hDbEvent = db_event_add(m_hContact, &dbei); + if (hDbEvent) { + m_pLog->LogEvents(hDbEvent, 1, true); + db_event_delete(hDbEvent); + } } + else LOG()->LogEvents(0, 1, true, &dbei); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 4b5cc80143..a9b6e7f59a 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -262,7 +262,7 @@ void CTemplateEditDlg::onClick_Preview(CCtrlButton*) 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(); - LogEvent(dbei); + LOG()->LogEvents(0, 1, true, &dbei); if (changed) memcpy(tSet->szTemplates[inEdit], szTemp, TEMPLATE_LENGTH * sizeof(wchar_t)); } -- cgit v1.2.3