From 7e9d92453de0fbe4fdb4168ab2275108f37d6152 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 20 May 2022 21:04:44 +0300 Subject: =?UTF-8?q?fixes=20#3071=20(TabSRMM=20=D0=B8=D0=BC=D0=B5=D0=B5?= =?UTF-8?q?=D1=82=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D1=83?= =?UTF-8?q?=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BF=D0=B0=D0=BF=D0=BE=D0=B2=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B0=D0=B1=D0=BE=D1=80=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=D0=B0,=20=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA=D1=82=D1=83?= =?UTF-8?q?=D0=B5=D1=82=20=D1=81=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=BE=D0=B9=20StdPopup)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/TabSRMM/src/msgoptions.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'plugins/TabSRMM/src/msgoptions.cpp') diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index fce1efd134..e71a21132f 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1005,7 +1005,7 @@ class COptTypingDlg : public CDlgBase CCtrlClc m_clist; CCtrlCheck chkWin, chkNoWin; - CCtrlCheck chkNotifyPopup, chkNotifyTray, chkShowNotify; + CCtrlCheck chkNotifyTray, chkShowNotify; CCtrlHyperlink urlHelp; void ResetCList(CCtrlClc* = nullptr) @@ -1049,8 +1049,7 @@ public: chkWin(this, IDC_TYPEWIN), chkNoWin(this, IDC_TYPENOWIN), chkNotifyTray(this, IDC_NOTIFYTRAY), - chkShowNotify(this, IDC_SHOWNOTIFY), - chkNotifyPopup(this, IDC_NOTIFYPOPUP) + chkShowNotify(this, IDC_SHOWNOTIFY) { m_clist.OnListRebuilt = Callback(this, &COptTypingDlg::RebuildList); m_clist.OnOptionsChanged = Callback(this, &COptTypingDlg::ResetCList); @@ -1059,7 +1058,6 @@ public: chkNotifyTray.OnChange = Callback(this, &COptTypingDlg::onCheck_NotifyTray); chkShowNotify.OnChange = Callback(this, &COptTypingDlg::onCheck_ShowNotify); - chkNotifyPopup.OnChange = Callback(this, &COptTypingDlg::onCheck_NotifyPopup); } bool OnInitDialog() override @@ -1082,15 +1080,13 @@ public: CheckDlgButton(m_hwnd, IDC_NOTIFYTRAY, g_plugin.getByte(SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(m_hwnd, IDC_NOTIFYBALLOON, g_plugin.getByte("ShowTypingBalloon", 0)); - CheckDlgButton(m_hwnd, IDC_NOTIFYPOPUP, g_plugin.getByte("ShowTypingPopup", 0) ? BST_CHECKED : BST_UNCHECKED); - Utils::enableDlgControl(m_hwnd, IDC_TYPEWIN, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYTRAY) != 0); Utils::enableDlgControl(m_hwnd, IDC_TYPENOWIN, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYTRAY) != 0); Utils::enableDlgControl(m_hwnd, IDC_NOTIFYBALLOON, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYTRAY) && (IsDlgButtonChecked(m_hwnd, IDC_TYPEWIN) || IsDlgButtonChecked(m_hwnd, IDC_TYPENOWIN))); Utils::enableDlgControl(m_hwnd, IDC_TYPEFLASHWIN, IsDlgButtonChecked(m_hwnd, IDC_SHOWNOTIFY) != 0); - Utils::enableDlgControl(m_hwnd, IDC_MTN_POPUPMODE, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYPOPUP) != 0); + Utils::enableDlgControl(m_hwnd, IDC_MTN_POPUPMODE, g_plugin.bPopups); SendDlgItemMessage(m_hwnd, IDC_MTN_POPUPMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always")); SendDlgItemMessage(m_hwnd, IDC_MTN_POPUPMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always, but no popup when window is focused")); @@ -1109,15 +1105,17 @@ public: g_plugin.setByte(SRMSGSET_SHOWTYPINGWINOPEN, (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_TYPEWIN)); g_plugin.setByte(SRMSGSET_SHOWTYPINGCLIST, (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_NOTIFYTRAY)); g_plugin.setByte("ShowTypingBalloon", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_NOTIFYBALLOON)); - g_plugin.setByte("ShowTypingPopup", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_NOTIFYPOPUP)); db_set_b(0, SRMSGMOD_T, "MTN_PopupMode", (uint8_t)SendDlgItemMessage(m_hwnd, IDC_MTN_POPUPMODE, CB_GETCURSEL, 0, 0)); PluginConfig.reloadSettings(); return true; } - void onCheck_NotifyPopup(CCtrlCheck*) + INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override { - Utils::enableDlgControl(m_hwnd, IDC_MTN_POPUPMODE, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYPOPUP) != 0); + if (msg == WM_SETFOCUS) + Utils::enableDlgControl(m_hwnd, IDC_MTN_POPUPMODE, g_plugin.bPopups); + + return CDlgBase::DlgProc(msg, wParam, lParam); } void onCheck_NotifyTray(CCtrlCheck*) -- cgit v1.2.3