summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/miranda.cpp7
-rwxr-xr-xplugins/New_GPG/src/ui.cpp2
-rw-r--r--plugins/NotesAndReminders/src/reminders.cpp18
-rw-r--r--plugins/PluginUpdater/src/Options.cpp2
-rw-r--r--plugins/StatusManager/src/ss_options.cpp12
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp7
-rw-r--r--plugins/XSoundNotify/src/options.cpp15
7 files changed, 26 insertions, 37 deletions
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp
index 3209f7ec24..12c0255c83 100644
--- a/plugins/Import/src/miranda.cpp
+++ b/plugins/Import/src/miranda.cpp
@@ -181,13 +181,8 @@ void CMirandaPageDlg::onClick_Path(CCtrlButton*)
void CMirandaPageDlg::onChange_Pattern(CCtrlCombo*)
{
- m_iFileType = -1;
- int iCur = m_cmbFileType.GetCurSel();
- if (iCur == -1)
- return;
-
// standard import for Miranda
- m_iFileType = m_cmbFileType.GetItemData(iCur);
+ m_iFileType = m_cmbFileType.GetCurData();
if (m_iFileType == -1) {
g_pBatch->m_pPattern = nullptr;
btnPath.Hide();
diff --git a/plugins/New_GPG/src/ui.cpp b/plugins/New_GPG/src/ui.cpp
index ee7cc2e65a..fb4b67d348 100755
--- a/plugins/New_GPG/src/ui.cpp
+++ b/plugins/New_GPG/src/ui.cpp
@@ -789,7 +789,7 @@ public:
CMStringW keyinfo = TranslateT("key ID");
keyinfo += ": ";
- m_szCurrAcc = (const char *)pCombo->GetItemData(pCombo->GetCurSel());
+ m_szCurrAcc = (const char *)pCombo->GetCurData();
if (m_szCurrAcc == nullptr) {
keyinfo += g_plugin.getMStringW("KeyID", TranslateT("not set"));
}
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp
index bf47810ee1..d09ff0cd3b 100644
--- a/plugins/NotesAndReminders/src/reminders.cpp
+++ b/plugins/NotesAndReminders/src/reminders.cpp
@@ -669,7 +669,7 @@ protected:
// absolute time specified in combobox item data
if (!m_bManualTime) {
// use preset value
- UINT nDeltaSeconds = cmbTime.GetItemData(cmbTime.GetCurSel());
+ UINT nDeltaSeconds = cmbTime.GetCurData();
if (m_bRelativeCombo) {
// combine date from pDate (local) and time from savedLi (utc)
SYSTEMTIME st, st2;
@@ -1204,7 +1204,7 @@ public:
ULONGLONG li;
SystemTimeToFileTime(&tm, (FILETIME*)&li);
- int TT = cmbRemindAgainIn.GetItemData(cmbRemindAgainIn.GetCurSel()) * 60;
+ int TT = cmbRemindAgainIn.GetCurData() * 60;
if (TT >= 24 * 3600) {
// selection is 1 day or more, take daylight saving boundaries into consideration
// (ie. 24 hour might actually be 23 or 25, in order for reminder to pop up at the
@@ -1421,10 +1421,8 @@ public:
if (!GetTriggerTime(m_savedLi, Date))
return;
- int RepeatSound = cmbRepeat.GetCurSel();
- if (RepeatSound != -1)
- RepeatSound = cmbRepeat.GetItemData(RepeatSound);
- else
+ int RepeatSound = cmbRepeat.GetCurData();
+ if (RepeatSound == -1)
RepeatSound = 0;
bool bClose = g_plugin.bCloseAfterAddReminder || m_pReminder;
@@ -1435,7 +1433,7 @@ public:
SystemTimeToFileTime(&Date, (FILETIME*)&TempRem->When);
TempRem->wszText = ptrW(edtText.GetText());
TempRem->bRepeat = chkRepeat.GetState();
- TempRem->SoundSel = cmbSound.GetItemData(cmbSound.GetCurSel());
+ TempRem->SoundSel = cmbSound.GetCurData();
TempRem->RepeatSound = TempRem->SoundSel < 0 ? 0 : (UINT)RepeatSound;
InsertReminder(TempRem);
}
@@ -1446,7 +1444,7 @@ public:
m_pReminder->wszText = ptrW(edtText.GetText());
m_pReminder->bRepeat = chkRepeat.GetState();
- m_pReminder->SoundSel = cmbSound.GetItemData(cmbSound.GetCurSel());
+ m_pReminder->SoundSel = cmbSound.GetCurData();
m_pReminder->RepeatSound = m_pReminder->SoundSel < 0 ? 0 : (UINT)RepeatSound;
// re-insert tree item sorted
@@ -1470,7 +1468,7 @@ public:
void onClick_PlaySound(CCtrlButton*)
{
- int n = cmbSound.GetItemData(cmbSound.GetCurSel());
+ int n = cmbSound.GetCurData();
switch (n) {
case 0:
Skin_PlaySound("AlertReminder");
@@ -1486,7 +1484,7 @@ public:
void onChange_Sound(CCtrlCombo*)
{
- int n = cmbSound.GetItemData(cmbSound.GetCurSel());
+ int n = cmbSound.GetCurData();
btnPlaySound.Enable(n >= 0);
cmbRepeat.Enable(n >= 0);
}
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index bf015eccb3..b03bad8cd2 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -223,7 +223,7 @@ public:
bool OnApply() override
{
- g_plugin.iPeriodMeasure = cmbPeriod.GetItemData(cmbPeriod.GetCurSel());
+ g_plugin.iPeriodMeasure = cmbPeriod.GetCurData();
wchar_t buffer[3] = { 0 };
Edit_GetText(GetDlgItem(m_hwnd, IDC_PERIOD), buffer, _countof(buffer));
diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/ss_options.cpp
index e49263197a..b68398d1dc 100644
--- a/plugins/StatusManager/src/ss_options.cpp
+++ b/plugins/StatusManager/src/ss_options.cpp
@@ -364,7 +364,7 @@ public:
SSPlugin.setDword(SETTING_SETPROFILEDELAY, GetDlgItemInt(m_hwnd, IDC_SETPROFILEDELAY, nullptr, FALSE));
if (bChecked || chkShowDialog.GetState())
- SSPlugin.setWord(SETTING_DEFAULTPROFILE, (WORD)profiles.GetItemData(profiles.GetCurSel()));
+ SSPlugin.setWord(SETTING_DEFAULTPROFILE, (WORD)profiles.GetCurData());
SSPlugin.setByte(SETTING_OVERRIDE, (BYTE)IsDlgButtonChecked(m_hwnd, IDC_OVERRIDE));
SSPlugin.setByte(SETTING_SHOWDIALOG, bChecked = chkShowDialog.GetState());
@@ -411,7 +411,7 @@ public:
void onClick_Show(CCtrlButton*)
{
- CCmdlDlg *pDlg = new CCmdlDlg(profiles.GetItemData(profiles.GetCurSel()));
+ CCmdlDlg *pDlg = new CCmdlDlg(profiles.GetCurData());
pDlg->Show();
}
@@ -541,7 +541,7 @@ class CSSAdvancedOptDlg : public CDlgBase
void SetProfile()
{
- int sel = cmbProfile.GetItemData(cmbProfile.GetCurSel());
+ int sel = cmbProfile.GetCurData();
chkCreateTTB.SetState(arProfiles[sel].createTtb);
chkShowDialog.SetState(arProfiles[sel].showDialog);
chkCreateMMI.SetState(arProfiles[sel].createMmi);
@@ -756,7 +756,7 @@ public:
void onClick_Delete(CCtrlButton*)
{
// wparam == profile no
- int sel = cmbProfile.GetItemData(cmbProfile.GetCurSel());
+ int sel = cmbProfile.GetCurData();
if (arProfiles.getCount() == 1) {
MessageBox(nullptr, TranslateT("At least one profile must exist"), TranslateT("Status manager"), MB_OK);
return;
@@ -817,7 +817,7 @@ public:
void onChange_Hotkey(CCtrlEdit*)
{
- int sel = cmbProfile.GetItemData(cmbProfile.GetCurSel());
+ int sel = cmbProfile.GetCurData();
arProfiles[sel].hotKey = edtHotkey.SendMsg(HKM_GETHOTKEY, 0, 0);
}
@@ -850,7 +850,7 @@ public:
void onChange_Option(CCtrlCheck*)
{
- int sel = cmbProfile.GetItemData(cmbProfile.GetCurSel());
+ int sel = cmbProfile.GetCurData();
PROFILEOPTIONS &po = arProfiles[sel];
po.createMmi = chkCreateMMI.GetState();
po.inSubMenu = chkInSubmenu.GetState();
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index f2490ce868..c850592ec7 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -361,11 +361,8 @@ public:
void onSelChange_filter(CCtrlCombo*)
{
- LRESULT lr = m_filter.GetCurSel();
- if (lr != CB_ERR) {
- m_hFilter = m_filter.GetItemData(lr);
- FillList();
- }
+ m_hFilter = m_filter.GetCurData();
+ FillList();
}
void onMenu_list(CCtrlListView::TEventInfo*)
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);