diff options
author | George Hazan <george.hazan@gmail.com> | 2024-11-09 18:48:38 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-11-09 18:48:38 +0300 |
commit | 9a4428ce1a6e76ed25e3e30d85cf119e7b437891 (patch) | |
tree | 35cbba641566122067fcffa8d6d26db1806f9013 /plugins/TabSRMM | |
parent | bb00cb91a13b2afefa650e5f3ae192e00ec5d719 (diff) |
code cleaning
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 476d42eb5f..3d93d6d4a5 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -923,10 +923,8 @@ void CMsgDialog::onClick_Filter(CCtrlButton *pButton) if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
ShowFilterMenu();
else {
- if (m_hwndFilter) {
+ if (m_hwndFilter)
SendMessage(m_hwndFilter, WM_CLOSE, 0, 0);
- m_hwndFilter = nullptr;
- }
RedrawLog();
UpdateTitle();
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index c2f2afd3e3..b7696c9658 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -1768,11 +1768,9 @@ static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP Chat_SetFilters(pDlg->getChat());
pDlg->RedrawLog();
}
- DestroyWindow(hwndDlg);
- break;
- case WM_DESTROY:
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
+ pDlg->m_hwndFilter = nullptr;
+ DestroyWindow(hwndDlg);
break;
}
return FALSE;
@@ -2551,10 +2549,8 @@ void CMsgDialog::UpdateWindowState(UINT msg) RECT rcFilter;
GetWindowRect(m_hwndFilter, &rcFilter);
- if (!PtInRect(&rcFilter, pt)) {
+ if (!PtInRect(&rcFilter, pt))
SendMessage(m_hwndFilter, WM_CLOSE, 1, 1);
- m_hwndFilter = nullptr;
- }
}
if (m_bIsAutosizingInput && m_iInputAreaHeight == -1) {
|