diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-11 13:26:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-11 13:26:56 +0300 |
commit | 6bb048378e2b73c908f4512d9a925e736bd44fda (patch) | |
tree | 59fa9ffce6e00d82c3b6254b7e5d2cdcde3bdb89 /protocols/JabberG/src/jabber_opt.cpp | |
parent | 383409527e474e83078178f5e80975b64fb5ffcf (diff) |
CCtrlCombo::GetCurData = suitable helper for combo boxes
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_opt.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index ebc3eba2fd..fcd78fc404 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -488,13 +488,10 @@ protected: else
m_proto->delSetting("Password");
- int index = m_cbLocale.GetCurSel();
- if (index >= 0) {
- char *szLanguageCode = (char*)m_cbLocale.GetItemData(index);
- if (szLanguageCode) {
- m_proto->setString("XmlLang", szLanguageCode);
- replaceStr(m_proto->m_tszSelectedLang, szLanguageCode);
- }
+ char *szLanguageCode = (char*)m_cbLocale.GetCurData();
+ if (szLanguageCode && szLanguageCode != INVALID_HANDLE_VALUE) {
+ m_proto->setString("XmlLang", szLanguageCode);
+ replaceStr(m_proto->m_tszSelectedLang, szLanguageCode);
}
if (m_cbMam.Enabled() && m_cbMam.GetCurSel() != m_proto->m_iMamMode)
@@ -1272,7 +1269,7 @@ private: void cbType_OnChange(CCtrlData *sender)
{
CCtrlCombo *chk = (CCtrlCombo *)sender;
- setupConnection(chk->GetItemData(chk->GetCurSel()));
+ setupConnection(chk->GetCurData());
CheckRegistration();
}
|