summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-05 13:39:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-05 13:39:25 +0300
commit563aac340768af4f96fd74a3246098cc3bdf47e0 (patch)
tree1b5493871936484788b3767d6a3c32066e47b4d5 /plugins
parent73c62ca9fc13c48a7768136279f0d70ac478c04b (diff)
fixes #1825 (spin control initialization should be done in the constructor, not inside OnInitDialog)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BossKeyPlus/src/Options.cpp3
-rw-r--r--plugins/Db_autobackups/src/options.cpp7
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp3
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp41
4 files changed, 16 insertions, 38 deletions
diff --git a/plugins/BossKeyPlus/src/Options.cpp b/plugins/BossKeyPlus/src/Options.cpp
index 1d9b42bc03..ccd861cdc0 100644
--- a/plugins/BossKeyPlus/src/Options.cpp
+++ b/plugins/BossKeyPlus/src/Options.cpp
@@ -220,7 +220,7 @@ public:
m_chkHideIfWinIdle(this, IDC_MAINOPT_HIDEIFWINIDLE),
m_chkHideIfMirIdle(this, IDC_MAINOPT_HIDEIFMIRIDLE),
m_edtTime(this, IDC_MAINOPT_TIME),
- m_spnTime(this, IDC_MAINOPT_SPIN_TIME),
+ m_spnTime(this, IDC_MAINOPT_SPIN_TIME, 99, 1),
m_chkHideOnStart(this, IDC_MAINOPT_HIDEONSTART),
m_chkMenuItem(this, IDC_MAINOPT_MENUITEM),
m_chkRestore(this, IDC_MAINOPT_RESTORE)
@@ -237,7 +237,6 @@ public:
wchar_t szMinutes[4] = { 0 };
_itow(minutes, szMinutes, 10);
m_edtTime.SendMsg(EM_LIMITTEXT, 2, 0);
- m_spnTime.SetRange(1, 99);
m_edtTime.SetText(szMinutes);
m_chkHideIfLock.SetState(g_wMaskAdv & OPT_HIDEIFLOCK);
m_chkMenuItem.SetState(g_wMaskAdv & OPT_MENUITEM);
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index 9279200f20..652ef103c4 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -130,9 +130,9 @@ public:
m_disable(this, IDC_RAD_DISABLED), m_backupOnStart(this, IDC_RAD_START),
m_backupOnExit(this, IDC_RAD_EXIT), m_backupPeriodic(this, IDC_RAD_PERIODIC),
m_backup(this, IDC_BUT_NOW), m_backupProfile(this, IDC_BACKUPPROFILE),
- m_period(this, SPIN_PERIOD), m_periodType(this, IDC_PT),
+ m_period(this, SPIN_PERIOD, 60, 1), m_periodType(this, IDC_PT),
m_folder(this, IDC_ED_FOLDER), m_browseFolder(this, IDC_BUT_BROWSE), m_filemask(this, IDC_FILEMASK),
- m_foldersPageLink(this, IDC_LNK_FOLDERS, nullptr), m_numBackups(this, SPIN_NUMBACKUPS),
+ m_foldersPageLink(this, IDC_LNK_FOLDERS, nullptr), m_numBackups(this, SPIN_NUMBACKUPS, 9999, 1),
m_disableProgress(this, IDC_CHK_NOPROG), m_disablePopups(this, IDC_CHK_NOPOPUP),
m_useZip(this, IDC_CHK_USEZIP), m_useCloudFile(this, IDC_CLOUDFILE),
m_cloudFileService(this, IDC_CLOUDFILESEVICE)
@@ -165,9 +165,6 @@ public:
m_backupOnExit.SetState(g_plugin.backup_types & BT_EXIT ? TRUE : FALSE);
m_backupPeriodic.SetState(g_plugin.backup_types & BT_PERIODIC ? TRUE : FALSE);
- m_period.SetRange(60, 1);
-
- m_numBackups.SetRange(9999, 1);
m_numBackups.SetPosition(g_plugin.num_backups);
m_periodType.AddString(TranslateT("days"));
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index f11c4076de..ec7d0f3cdf 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -669,7 +669,7 @@ bool CImportFeed::OnClose()
CFeedEditor::CFeedEditor(int iItem, CCtrlListView *m_feeds, MCONTACT Contact)
: CSuper(g_plugin, IDD_ADDFEED),
m_feedtitle(this, IDC_FEEDTITLE), m_feedurl(this, IDC_FEEDURL),
- m_checktime(this, IDC_CHECKTIME), m_checktimespin(this, IDC_TIMEOUT_VALUE_SPIN),
+ m_checktime(this, IDC_CHECKTIME), m_checktimespin(this, IDC_TIMEOUT_VALUE_SPIN, 999),
m_checkfeed(this, IDC_DISCOVERY), m_useauth(this, IDC_USEAUTH),
m_login(this, IDC_LOGIN), m_password(this, IDC_PASSWORD),
m_tagedit(this, IDC_TAGSEDIT), m_reset(this, IDC_RESET),
@@ -691,7 +691,6 @@ bool CFeedEditor::OnInitDialog()
else
SetWindowText(m_hwnd, TranslateT("Change Feed"));
m_checktime.SetMaxLength(3);
- m_checktimespin.SetRange(999, 0);
if (m_iItem > -1 && m_hContact == 0) {
wchar_t SelNick[MAX_PATH], SelUrl[MAX_PACKAGE_NAME];
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index e298e73a4f..14881c39b2 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -579,7 +579,7 @@ public:
CDlgBase(g_plugin, IDD_OPT_MSGDLG),
urlHelp(this, IDC_HELP_GENERAL, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/General_settings"),
btnReset(this, IDC_RESETWARNINGS),
- spnAvaSize(this, IDC_AVATARSPIN),
+ spnAvaSize(this, IDC_AVATARSPIN, 150),
chkAvaPreserve(this, IDC_PRESERVEAVATARSIZE)
{
btnReset.OnClick = Callback(this, &COptMainDlg::onClick_Reset);
@@ -591,7 +591,6 @@ public:
chkAvaPreserve.SetState(M.GetByte("dontscaleavatars", 0));
- spnAvaSize.SetRange(150);
spnAvaSize.SetPosition(M.GetDword("avatarheight", 100));
return true;
}
@@ -661,11 +660,11 @@ public:
: CDlgBase(g_plugin, IDD_OPT_MSGLOG),
btnModify(this, IDC_MODIFY),
btnRtlModify(this, IDC_RTLMODIFY),
- spnTrim(this, IDC_TRIMSPIN),
- spnLeft(this, IDC_INDENTSPIN),
- spnRight(this, IDC_RINDENTSPIN),
- spnLoadTime(this, IDC_LOADTIMESPIN),
- spnLoadCount(this, IDC_LOADCOUNTSPIN),
+ spnTrim(this, IDC_TRIMSPIN, 1000, 5),
+ spnLeft(this, IDC_INDENTSPIN, 1000),
+ spnRight(this, IDC_RINDENTSPIN, 1000),
+ spnLoadTime(this, IDC_LOADTIMESPIN, 24 * 60),
+ spnLoadCount(this, IDC_LOADCOUNTSPIN, 100),
chkLoadTime(this, IDC_LOADTIME),
chkLoadCount(this, IDC_LOADCOUNT),
chkAlwaysTrim(this, IDC_ALWAYSTRIM),
@@ -707,20 +706,12 @@ public:
TreeViewInit(GetDlgItem(m_hwnd, IDC_LOGOPTIONS), CTranslator::TREE_LOG, dwFlags, FALSE);
- spnLeft.SetRange(1000);
spnLeft.SetPosition(M.GetDword("IndentAmount", 20));
-
- spnRight.SetRange(1000);
spnRight.SetPosition(M.GetDword("RightIndent", 20));
-
- spnLoadCount.SetRange(100);
spnLoadCount.SetPosition(g_plugin.getWord(SRMSGSET_LOADCOUNT, SRMSGDEFSET_LOADCOUNT));
-
- spnLoadTime.SetRange(24 * 60);
spnLoadTime.SetPosition(g_plugin.getWord(SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME));
DWORD maxhist = M.GetDword("maxhist", 0);
- spnTrim.SetRange(1000, 5);
spnTrim.SetPosition(maxhist);
spnTrim.Enable(maxhist != 0);
Utils::enableDlgControl(m_hwnd, IDC_TRIM, maxhist != 0);
@@ -1032,7 +1023,7 @@ public:
CDlgBase(g_plugin, IDD_OPT_TABBEDMSG),
chkLimit(this, IDC_CUT_TABTITLE),
edtLimit(this, IDC_CUT_TITLEMAX),
- spnLimit(this, IDC_CUT_TITLEMAXSPIN),
+ spnLimit(this, IDC_CUT_TITLEMAXSPIN, 20, 5),
btnSetup(this, IDC_SETUPAUTOCREATEMODES),
cmbEscMode(this, IDC_ESCMODE)
{
@@ -1046,7 +1037,6 @@ public:
TreeViewInit(GetDlgItem(m_hwnd, IDC_TABMSGOPTIONS), CTranslator::TREE_TAB, 0, FALSE);
chkLimit.SetState(M.GetByte("cuttitle", 0));
- spnLimit.SetRange(20, 5);
spnLimit.SetPosition(db_get_w(0, SRMSGMOD_T, "cut_at", 15));
onChange_Cut(&chkLimit);
@@ -1123,9 +1113,9 @@ public:
COptContainersDlg()
: CDlgBase(g_plugin, IDD_OPT_CONTAINERS),
urlHelp(this, IDC_HELP_CONTAINERS, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Containers"),
- spnNumFlash(this, IDC_NRFLASHSPIN),
- spnTabLimit(this, IDC_TABLIMITSPIN),
- spnFlashDelay(this, IDC_FLASHINTERVALSPIN),
+ spnNumFlash(this, IDC_NRFLASHSPIN, 255),
+ spnTabLimit(this, IDC_TABLIMITSPIN, 1000, 1),
+ spnFlashDelay(this, IDC_FLASHINTERVALSPIN, 10000, 500),
chkUseAero(this, IDC_USEAERO),
chkUseAeroPeek(this, IDC_USEAEROPEEK),
cmbAeroEffect(this, IDC_AEROEFFECT),
@@ -1143,17 +1133,13 @@ public:
chkGroup.SetState(M.GetByte("useclistgroups", 0));
chkLimits.SetState(M.GetByte("limittabs", 0));
- spnTabLimit.SetRange(1000, 1);
spnTabLimit.SetPosition(M.GetDword("maxtabs", 1));
onChangeLimits(nullptr);
chkSingle.SetState(M.GetByte("singlewinmode", 0));
chkDefault.SetState(!(chkGroup.GetState() || chkLimits.GetState() || chkSingle.GetState()));
- spnNumFlash.SetRange(255);
spnNumFlash.SetPosition(M.GetByte("nrflash", 4));
-
- spnFlashDelay.SetRange(10000, 500);
spnFlashDelay.SetPosition(M.GetDword("flashinterval", 1000));
chkUseAero.SetState(M.GetByte("useAero", 1));
@@ -1208,8 +1194,8 @@ public:
CDlgBase(g_plugin, IDD_OPTIONS_PLUS),
urlHelp(this, IDC_PLUS_HELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Typing_notifications"),
btnRevert(this, IDC_PLUS_REVERT),
- spnTimeout(this, IDC_TIMEOUTSPIN),
- spnHistSize(this, IDC_HISTORYSIZESPIN)
+ spnTimeout(this, IDC_TIMEOUTSPIN, 300, SRMSGSET_MSGTIMEOUT_MIN / 1000),
+ spnHistSize(this, IDC_HISTORYSIZESPIN, 255, 15)
{
btnRevert.OnClick = Callback(this, &COptAdvancedDlg::onClick_Revert);
}
@@ -1218,10 +1204,7 @@ public:
{
TreeViewInit(GetDlgItem(m_hwnd, IDC_PLUS_CHECKTREE), CTranslator::TREE_MODPLUS, 0, FALSE);
- spnTimeout.SetRange(300, SRMSGSET_MSGTIMEOUT_MIN / 1000);
spnTimeout.SetPosition(PluginConfig.m_MsgTimeout / 1000);
-
- spnHistSize.SetRange(255, 15);
spnHistSize.SetPosition(M.GetByte("historysize", 0));
return true;
}