From 910d2d08873ba04bd70f9a427beb55c31fd44a3f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 31 Jan 2023 14:29:13 +0300 Subject: =?UTF-8?q?fixes=20#3323=20(=D0=9D=D0=B0=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B9=D0=BA=D0=B0=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20ICQ=20=D0=B8=20Telegram)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/options.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'protocols/Telegram') diff --git a/protocols/Telegram/src/options.cpp b/protocols/Telegram/src/options.cpp index af8c0c2545..9986ba7c45 100644 --- a/protocols/Telegram/src/options.cpp +++ b/protocols/Telegram/src/options.cpp @@ -60,14 +60,14 @@ public: ///////////////////////////////////////////////////////////////////////////////////////// // Advanced options -class CIcqOptionsAdv : public CProtoDlgBase +class CAdvOptionsDlg : public CProtoDlgBase { CCtrlEdit edtDiff1, edtDiff2; CCtrlSpin spin1, spin2; CCtrlCombo cmbStatus1, cmbStatus2; public: - CIcqOptionsAdv(CTelegramProto *ppro) : + CAdvOptionsDlg(CTelegramProto *ppro) : CProtoDlgBase(ppro, IDD_OPTIONS_ADV), spin1(this, IDC_SPIN1, 32000), spin2(this, IDC_SPIN2, 32000), @@ -76,8 +76,8 @@ public: cmbStatus1(this, IDC_STATUS1), cmbStatus2(this, IDC_STATUS2) { - edtDiff1.OnChange = Callback(this, &CIcqOptionsAdv::onChange_Timeout1); - edtDiff2.OnChange = Callback(this, &CIcqOptionsAdv::onChange_Timeout2); + edtDiff1.OnChange = Callback(this, &CAdvOptionsDlg::onChange_Timeout1); + edtDiff2.OnChange = Callback(this, &CAdvOptionsDlg::onChange_Timeout2); CreateLink(spin1, ppro->m_iTimeDiff1); CreateLink(spin2, ppro->m_iTimeDiff2); @@ -123,8 +123,7 @@ public: void onChange_Timeout2(CCtrlEdit *) { - bool bEnabled = edtDiff2.GetInt() != 0; - cmbStatus2.Enable(bEnabled); + cmbStatus2.Enable(edtDiff1.GetInt() != 0 && edtDiff2.GetInt() != 0); } }; @@ -152,7 +151,7 @@ int CTelegramProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.position = 2; odp.szTab.w = LPGENW("Advanced"); - odp.pDialog = new CIcqOptionsAdv(this); + odp.pDialog = new CAdvOptionsDlg(this); g_plugin.addOptions(wParam, &odp); return 0; } -- cgit v1.2.3