diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-25 18:17:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-25 18:17:39 +0300 |
commit | 287bb9bd30b7b6988a8a40f0a1be1ce387301de6 (patch) | |
tree | 9c93bca690dd207f8c955b1342ab1e05a12cfa1b | |
parent | 079515ab7c42cde601dd7c3ccc7fff82d3304355 (diff) |
better tabSRMM compatibility
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 15 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 2 |
2 files changed, 10 insertions, 7 deletions
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)); } |