summaryrefslogtreecommitdiff
path: root/plugins/XSoundNotify
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-11 13:26:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-11 13:26:56 +0300
commit6bb048378e2b73c908f4512d9a925e736bd44fda (patch)
tree59fa9ffce6e00d82c3b6254b7e5d2cdcde3bdb89 /plugins/XSoundNotify
parent383409527e474e83078178f5e80975b64fb5ffcf (diff)
CCtrlCombo::GetCurData = suitable helper for combo boxes
Diffstat (limited to 'plugins/XSoundNotify')
-rw-r--r--plugins/XSoundNotify/src/options.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp
index c720c8ecb4..bab5567543 100644
--- a/plugins/XSoundNotify/src/options.cpp
+++ b/plugins/XSoundNotify/src/options.cpp
@@ -32,9 +32,9 @@ class COptionsDlg : public CDlgBase
XSN_Data* ObtainData()
{
- LPARAM hContact = comboUser.GetItemData(comboUser.GetCurSel());
+ LPARAM hContact = comboUser.GetCurData();
if (hContact == -1) {
- PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetItemData(comboAcc.GetCurSel());
+ PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetCurData();
XSN_Data *p = XSN_Users.find((XSN_Data *)&pa->szModuleName);
if (p == nullptr)
XSN_Users.insert(p = new XSN_Data(pa->szModuleName, chkIgnore.GetState()));
@@ -114,8 +114,7 @@ public:
chkIgnore.SetState(false);
label.SetText(TranslateT("Not set"));
- int cursel = comboAcc.GetCurSel();
- PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetItemData(cursel);
+ PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetCurData();
comboUser.AddString(TranslateT("All contacts"), -1);
for (auto &hContact : Contacts(pa->szModuleName)) {
@@ -130,9 +129,9 @@ public:
btnChoose.Enable();
chkIgnore.Enable();
- LPARAM hContact = comboUser.GetItemData(comboUser.GetCurSel());
+ LPARAM hContact = comboUser.GetCurData();
if (hContact == -1) {
- PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetItemData(comboAcc.GetCurSel());
+ PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetCurData();
ptrW wszText(g_plugin.getWStringA(pa->szModuleName));
if (wszText) {
btnTest.Enable();
@@ -226,9 +225,9 @@ public:
chkIgnore.SetState(false);
label.SetText(TranslateT("Not set"));
- LPARAM hContact = comboUser.GetItemData(comboUser.GetCurSel());
+ LPARAM hContact = comboUser.GetCurData();
if (hContact == -1) {
- PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetItemData(comboAcc.GetCurSel());
+ PROTOACCOUNT *pa = (PROTOACCOUNT *)comboAcc.GetCurData();
XSN_Data *p = XSN_Users.find((XSN_Data *)&pa->szModuleName);
if (p != nullptr) {
XSN_Users.remove(p);