summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat_tools.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-09 20:29:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-09 20:29:02 +0300
commite5fdfcde3880eb7edaf573fb883dd4ef86972082 (patch)
treec5d4ee388876f78024a82c4bd8ee9712e3877dbb /plugins/TabSRMM/src/chat_tools.cpp
parent2d737d50469b965c2787823a94757f4c9f0a7107 (diff)
moving session data into dialog classes
Diffstat (limited to 'plugins/TabSRMM/src/chat_tools.cpp')
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index f0233278df..75d08d6aa3 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -610,18 +610,18 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex)
*/
void Chat_SetFilters(SESSION_INFO *si)
{
- if (si == nullptr)
- return;
-
DWORD dwFlags_default = M.GetDword(CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
DWORD dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "FilterFlags", GC_EVENT_ALL);
DWORD dwMask = db_get_dw(si->hContact, CHAT_MODULE, "FilterMask", 0);
- si->iLogFilterFlags = dwFlags_default;
- for (int i = 0; i < 32; i++) {
- DWORD dwBit = 1 << i;
- if (dwMask & dwBit)
- si->iLogFilterFlags = (dwFlags_local & dwBit) ? si->iLogFilterFlags | dwBit : si->iLogFilterFlags & ~dwBit;
+ CChatRoomDlg *pDlg = si->pDlg;
+ if (pDlg) {
+ pDlg->m_iLogFilterFlags = dwFlags_default;
+ for (int i = 0; i < 32; i++) {
+ DWORD dwBit = 1 << i;
+ if (dwMask & dwBit)
+ pDlg->m_iLogFilterFlags = (dwFlags_local & dwBit) ? pDlg->m_iLogFilterFlags | dwBit : pDlg->m_iLogFilterFlags & ~dwBit;
+ }
}
dwFlags_default = M.GetDword(CHAT_MODULE, "PopupFlags", GC_EVENT_HIGHLIGHT);
@@ -648,8 +648,8 @@ void Chat_SetFilters(SESSION_INFO *si)
si->iLogTrayFlags = (dwFlags_local & dwBit) ? si->iLogTrayFlags | dwBit : si->iLogTrayFlags & ~dwBit;
}
- if (si->iLogFilterFlags == 0)
- si->bFilterEnabled = false;
+ if (pDlg != nullptr && pDlg->m_iLogFilterFlags == 0)
+ pDlg->m_bFilterEnabled = 0;
}
char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex)