diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-18 14:21:10 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-18 14:21:10 +0300 |
commit | 6160ab394c57080c71b737375f47d1fb7b6a16d0 (patch) | |
tree | 2c77e37835730a77ccb1826f30b1ab005a25bd6d /src | |
parent | 6ed0f28f9288a76e479b916f2e579b1a61ac47fd (diff) |
fixes #4130 (Переделать настройку "использовать сторонний просмотрщик журнала в групповых чатах")
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 1 | ||||
-rw-r--r-- | src/mir_app/src/options.cpp | 13 | ||||
-rw-r--r-- | src/mir_core/src/Windows/CDlgBase.cpp | 3 |
3 files changed, 6 insertions, 11 deletions
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 4126dd5974..3ccc299225 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -337,6 +337,7 @@ public: }
pshn.hdr.code = PSN_APPLY;
+ pshn.lParam = IDOK;
for (auto &odp : m_pages) {
if (odp->hwnd == nullptr || !odp->changed)
continue;
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index c29013a30e..a0766677f1 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -814,6 +814,9 @@ public: bool OnApply() override
{
+ if (GetParent(GetFocus()) == GetDlgItem(m_hwnd, IDC_KEYWORD_FILTER))
+ return false;
+
m_btnApply.Disable();
SetFocus(m_pageTree.GetHwnd());
@@ -832,6 +835,7 @@ public: PSHNOTIFY pshn = {};
pshn.hdr.code = PSN_APPLY;
+ pshn.lParam = (m_bExiting) ? IDOK : IDC_APPLY;
for (auto &p : m_arOpd) {
if (p == nullptr)
continue;
@@ -883,15 +887,6 @@ public: m_btnApply.Disable();
}
- void OnOk(void*)
- {
- if (GetParent(GetFocus()) == GetDlgItem(m_hwnd, IDC_KEYWORD_FILTER))
- return;
-
- OnApply();
- Close();
- }
-
void OnCancel(CCtrlButton*)
{
PSHNOTIFY pshn;
diff --git a/src/mir_core/src/Windows/CDlgBase.cpp b/src/mir_core/src/Windows/CDlgBase.cpp index 9740a5b19f..c2ffcb3210 100644 --- a/src/mir_core/src/Windows/CDlgBase.cpp +++ b/src/mir_core/src/Windows/CDlgBase.cpp @@ -349,8 +349,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (pnmh->idFrom == 0) {
switch (pnmh->code) {
case PSN_APPLY:
- if (LPPSHNOTIFY(lParam)->lParam != 3) // IDC_APPLY
- m_bExiting = true;
+ m_bExiting = ((PSHNOTIFY*)pnmh)->lParam != 3; // IDC_APPLY
if (!VerifyControls(&CCtrlBase::OnApply))
m_bExiting = false;
|