diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/srmm_log.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mir_app/src/srmm_log.cpp b/src/mir_app/src/srmm_log.cpp index d8a3760bad..692922236f 100644 --- a/src/mir_app/src/srmm_log.cpp +++ b/src/mir_app/src/srmm_log.cpp @@ -79,16 +79,16 @@ static bool sttEnableCustomLogs(CMsgDialog *pDlg) CSrmmLogWindow* Srmm_GetLogWindow(CMsgDialog *pDlg) { + CMStringA szViewerName; if (sttEnableCustomLogs(pDlg)) { - ptrA szCurr(db_get_sa(pDlg->m_hContact, "SRMsg", "Logger", "")); - - for (auto &it : g_arLogClasses) - if (!mir_strcmp(szCurr, it->szShortName)) - return it->pfnBuilder(*pDlg); + szViewerName = db_get_sm(pDlg->m_hContact, "SRMsg", "Logger"); + if (szViewerName.IsEmpty()) + szViewerName = db_get_sm(0, "SRMM", "Logger", "built-in"); } + else szViewerName = "built-in"; for (auto &it : g_arLogClasses) - if (!mir_strcmp(it->szShortName, "built-in")) + if (szViewerName == it->szShortName) return it->pfnBuilder(*pDlg); return nullptr; |