summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-04 23:30:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-04 23:30:04 +0300
commitd1f7d1ebda857c901e7ec5a164c3ce1c5822ac59 (patch)
treebc5c54557b47d5bca93a559e4e10acf0bf639010 /protocols
parentfe2001a3e670b14724c180ccf1be8180f2ab9864 (diff)
ICQ10: if timeout is disabled, status field should also be disabled
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/options.cpp24
-rw-r--r--protocols/ICQ-WIM/src/resource.h1
2 files changed, 23 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/options.cpp b/protocols/ICQ-WIM/src/options.cpp
index f470d604de..36d74c8903 100644
--- a/protocols/ICQ-WIM/src/options.cpp
+++ b/protocols/ICQ-WIM/src/options.cpp
@@ -154,7 +154,7 @@ void CIcqProto::OnLoginViaPhone(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pRe
class CIcqOptionsDlg : public CProtoDlgBase<CIcqProto>
{
- CCtrlEdit edtUin, edtEmail, edtPassword;
+ CCtrlEdit edtUin, edtEmail, edtPassword, edtDiff1, edtDiff2;
CCtrlSpin spin1, spin2;
CCtrlCombo cmbStatus1, cmbStatus2;
CCtrlCheck chkHideChats;
@@ -168,6 +168,8 @@ public:
spin2(this, IDC_SPIN2),
edtUin(this, IDC_UIN),
edtEmail(this, IDC_EMAIL),
+ edtDiff1(this, IDC_DIFF1),
+ edtDiff2(this, IDC_DIFF2),
btnCreate(this, IDC_REGISTER),
cmbStatus1(this, IDC_STATUS1),
cmbStatus2(this, IDC_STATUS2),
@@ -176,6 +178,9 @@ public:
{
btnCreate.OnClick = Callback(this, &CIcqOptionsDlg::onClick_Register);
+ edtDiff1.OnChange = Callback(this, &CIcqOptionsDlg::onChange_Timeout1);
+ edtDiff2.OnChange = Callback(this, &CIcqOptionsDlg::onChange_Timeout2);
+
CreateLink(edtUin, ppro->m_dwUin);
CreateLink(edtEmail, ppro->m_szEmail);
CreateLink(edtPassword, ppro->m_szPassword);
@@ -205,6 +210,8 @@ public:
spin1.SetRange(3600);
spin2.SetRange(3600);
}
+
+ onChange_Timeout1(0);
}
if (m_proto->m_dwUin == 0)
@@ -234,6 +241,21 @@ public:
if (dlg.DoModal()) // force exit to avoid data corruption
PostMessage(m_hwndParent, WM_COMMAND, MAKELONG(IDCANCEL, BN_CLICKED), 0);
}
+
+ void onChange_Timeout1(CCtrlEdit*)
+ {
+ bool bEnabled = edtDiff1.GetInt() != 0;
+ spin2.Enable(bEnabled);
+ edtDiff2.Enable(bEnabled);
+ cmbStatus1.Enable(bEnabled);
+ cmbStatus2.Enable(bEnabled && edtDiff2.GetInt() != 0);
+ }
+
+ void onChange_Timeout2(CCtrlEdit*)
+ {
+ bool bEnabled = edtDiff2.GetInt() != 0;
+ cmbStatus2.Enable(bEnabled);
+ }
};
INT_PTR CIcqProto::CreateAccMgrUI(WPARAM, LPARAM hwndParent)
diff --git a/protocols/ICQ-WIM/src/resource.h b/protocols/ICQ-WIM/src/resource.h
index c62742adb3..ee3336bc9e 100644
--- a/protocols/ICQ-WIM/src/resource.h
+++ b/protocols/ICQ-WIM/src/resource.h
@@ -20,7 +20,6 @@
#define IDC_ONLINESINCE 1010
#define IDC_IDLETIME 1011
#define IDC_NICK 1012
-#define IDC_IDLETIME2 1013
#define IDC_MEMBERSINCE 1013
#define IDC_LASTSEEN 1014
#define IDC_EMAIL 1015