summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdautoaway/src/options.cpp3
-rw-r--r--src/core/stdmsg/src/chat_options.cpp9
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp7
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp3
-rw-r--r--src/mir_core/src/CCtrlSpin.cpp13
-rw-r--r--src/mir_core/src/mir_core.def3
-rw-r--r--src/mir_core/src/mir_core64.def3
7 files changed, 16 insertions, 25 deletions
diff --git a/src/core/stdautoaway/src/options.cpp b/src/core/stdautoaway/src/options.cpp
index 33c9a25713..ad04fdb3a3 100644
--- a/src/core/stdautoaway/src/options.cpp
+++ b/src/core/stdautoaway/src/options.cpp
@@ -59,7 +59,7 @@ public:
COptionsDlg() :
CDlgBase(g_plugin, IDD_OPT_IDLE),
edt1sttime(this, IDC_IDLE1STTIME),
- spinIdle(this, IDC_IDLESPIN),
+ spinIdle(this, IDC_IDLESPIN, 60, 1),
cmbAAStatus(this, IDC_AASTATUS),
chkShort(this, IDC_IDLESHORT),
chkLocked(this, IDC_LOCKED),
@@ -91,7 +91,6 @@ public:
{
chkOnWindows.SetState(!g_plugin.bIdleMethod);
- spinIdle.SetRange(60, 1);
spinIdle.SetPosition(g_plugin.iIdleTime1st);
for (auto &it : aa_Status)
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp
index 91a6d735c5..4089bea769 100644
--- a/src/core/stdmsg/src/chat_options.cpp
+++ b/src/core/stdmsg/src/chat_options.cpp
@@ -432,9 +432,9 @@ class COptLogDlg : public CDlgBase
public:
COptLogDlg() :
CDlgBase(g_plugin, IDD_OPTIONS2),
- spin2(this, IDC_SPIN2),
- spin3(this, IDC_SPIN3),
- spin4(this, IDC_SPIN4),
+ spin2(this, IDC_SPIN2, 5000),
+ spin3(this, IDC_SPIN3, 10000),
+ spin4(this, IDC_SPIN4, 255, 10),
edtGroup(this, IDC_GROUP),
edtLimit(this, IDC_LIMIT),
@@ -458,11 +458,8 @@ public:
bool OnInitDialog() override
{
- spin2.SetRange(5000);
spin2.SetPosition(db_get_w(0, CHAT_MODULE, "LogLimit", 100));
- spin3.SetRange(10000);
spin3.SetPosition(db_get_w(0, CHAT_MODULE, "LoggingLimit", 100));
- spin4.SetRange(255, 10);
spin4.SetPosition(db_get_b(0, CHAT_MODULE, "NicklistRowDist", 12));
edtGroup.SetText(ptrW(Chat_GetGroup()));
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index bbe98a0d34..432691a177 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -330,8 +330,8 @@ public:
chkLoadCount(this, IDC_LOADCOUNT),
chkLoadUnread(this, IDC_LOADUNREAD),
- spinTime(this, IDC_LOADTIMESPIN),
- spinCount(this, IDC_LOADCOUNTSPIN)
+ spinTime(this, IDC_LOADTIMESPIN, 12 * 60),
+ spinCount(this, IDC_LOADCOUNTSPIN, 100)
{
chkTime.OnChange = Callback(this, &COptionLogDlg::onChange_Time);
chkLoadUnread.OnChange = chkLoadCount.OnChange = chkLoadTime.OnChange = Callback(this, &COptionLogDlg::onChange_Load);
@@ -362,9 +362,8 @@ public:
EnableWindow(GetDlgItem(m_hwnd, IDC_STMINSOLD), TRUE);
break;
}
- spinCount.SetRange(100);
+
spinCount.SetPosition(g_dat.nLoadCount);
- spinTime.SetRange(12 * 60);
spinTime.SetPosition(g_dat.nLoadTime);
onChange_Time(nullptr);
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 8c125492dd..7b47a9afbe 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -602,7 +602,7 @@ class CSrmmToolbarOptions : public CDlgBase
public:
CSrmmToolbarOptions() :
CDlgBase(g_plugin, IDD_OPT_TOOLBAR),
- m_gap(this, IDC_SPIN1),
+ m_gap(this, IDC_SPIN1, 10),
m_btnIM(this, IDC_IMCHECK),
m_btnChat(this, IDC_CHATCHECK),
m_toolBar(this, IDC_TOOLBARTREE),
@@ -628,7 +628,6 @@ public:
m_btnChat.Disable();
m_btnHidden.Disable();
- m_gap.SetRange(10);
m_gap.SetPosition(db_get_b(0, BB_MODULE_NAME, "ButtonsBarGap", 1));
return true;
}
diff --git a/src/mir_core/src/CCtrlSpin.cpp b/src/mir_core/src/CCtrlSpin.cpp
index 301bbd2627..4d8f343c98 100644
--- a/src/mir_core/src/CCtrlSpin.cpp
+++ b/src/mir_core/src/CCtrlSpin.cpp
@@ -25,8 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlSpin class
-CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId)
- : CCtrlData(dlg, ctrlId)
+CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId, WORD wMax, WORD wMin) :
+ CCtrlData(dlg, ctrlId),
+ m_wMin(wMin),
+ m_wMax(wMax)
{}
BOOL CCtrlSpin::OnNotify(int, NMHDR *pnmh)
@@ -49,6 +51,8 @@ bool CCtrlSpin::OnApply()
void CCtrlSpin::OnReset()
{
+ SendMsg(UDM_SETRANGE, 0, MAKELPARAM(m_wMax, m_wMin));
+
if (m_dbLink != nullptr)
SetPosition(LoadInt());
}
@@ -62,8 +66,3 @@ void CCtrlSpin::SetPosition(WORD wPos)
{
SendMsg(UDM_SETPOS, 0, wPos);
}
-
-void CCtrlSpin::SetRange(WORD wMax, WORD wMin)
-{
- SendMsg(UDM_SETRANGE, 0, MAKELPARAM(wMax, wMin));
-}
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index f5c92d7159..7efc1b209d 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -955,11 +955,10 @@ db_get_contact_count @1158
db_is_contact @1159
db_set_safety_mode @1160
db_delete_module @1161
-??0CCtrlSpin@@QAE@PAVCDlgBase@@H@Z @1163 NONAME
+??0CCtrlSpin@@QAE@PAVCDlgBase@@HGG@Z @1163 NONAME
??1CCtrlSpin@@UAE@XZ @1164 NONAME
??_7CCtrlSpin@@6B@ @1166 NONAME
?SetMaxLength@CCtrlEdit@@QAEXI@Z @1167 NONAME
-?SetRange@CCtrlSpin@@QAEXGG@Z @1168 NONAME
db_get_current @1169
CallFunctionSync @1170
??0CProgress@@QAE@PAVCDlgBase@@H@Z @1172 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 87050de4e9..950ee03774 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -955,11 +955,10 @@ db_get_contact_count @1158
db_is_contact @1159
db_set_safety_mode @1160
db_delete_module @1161
-??0CCtrlSpin@@QEAA@PEAVCDlgBase@@H@Z @1163 NONAME
+??0CCtrlSpin@@QEAA@PEAVCDlgBase@@HGG@Z @1163 NONAME
??1CCtrlSpin@@UEAA@XZ @1164 NONAME
??_7CCtrlSpin@@6B@ @1166 NONAME
?SetMaxLength@CCtrlEdit@@QEAAXI@Z @1167 NONAME
-?SetRange@CCtrlSpin@@QEAAXGG@Z @1168 NONAME
db_get_current @1169
CallFunctionSync @1170
??0CProgress@@QEAA@PEAVCDlgBase@@H@Z @1172 NONAME