diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-05 13:39:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-05 13:39:25 +0300 |
commit | 563aac340768af4f96fd74a3246098cc3bdf47e0 (patch) | |
tree | 1b5493871936484788b3767d6a3c32066e47b4d5 | |
parent | 73c62ca9fc13c48a7768136279f0d70ac478c04b (diff) |
fixes #1825 (spin control initialization should be done in the constructor, not inside OnInitDialog)
-rw-r--r-- | include/m_gui.h | 5 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 320286 -> 320024 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 321700 -> 321434 bytes | |||
-rw-r--r-- | plugins/BossKeyPlus/src/Options.cpp | 3 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/options.cpp | 7 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Options.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 41 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/options.cpp | 8 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/options.cpp | 7 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 7 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.cpp | 15 | ||||
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 24 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 10 | ||||
-rw-r--r-- | src/core/stdautoaway/src/options.cpp | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 7 | ||||
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 3 | ||||
-rw-r--r-- | src/mir_core/src/CCtrlSpin.cpp | 13 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 3 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 3 |
20 files changed, 66 insertions, 105 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index d02df66fbf..9230708e8e 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -876,17 +876,18 @@ class MIR_CORE_EXPORT CCtrlSpin : public CCtrlData {
typedef CCtrlData CSuper;
+ WORD m_wMin, m_wMax;
+
BOOL OnNotify(int, NMHDR*) override;
public:
- CCtrlSpin(CDlgBase *dlg, int ctrlId);
+ CCtrlSpin(CDlgBase *dlg, int ctrlId, WORD max = 100, WORD min = 0);
bool OnApply() override;
void OnReset() override;
WORD GetPosition();
void SetPosition(WORD pos);
- void SetRange(WORD max, WORD min = 0);
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex 6d8215382b..5aceb01463 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex d96c8e9bd8..f3c2402795 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib 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;
}
diff --git a/protocols/Gadu-Gadu/src/options.cpp b/protocols/Gadu-Gadu/src/options.cpp index b1b1d4af99..ca3b411b79 100644 --- a/protocols/Gadu-Gadu/src/options.cpp +++ b/protocols/Gadu-Gadu/src/options.cpp @@ -18,9 +18,9 @@ GaduOptions::GaduOptions(PROTO_INTERFACE *proto) : GaduOptionsDlgConference::GaduOptionsDlgConference(GaduProto *proto) : GaduDlgBase(proto, IDD_OPT_GG_CONFERENCE), cmbPolicyForAllChatParticipants(this, IDC_GC_POLICY_TOTAL), - edtNumberOfAllChatParticipants(this, IDC_GC_COUNT_TOTAL_SPIN), + edtNumberOfAllChatParticipants(this, IDC_GC_COUNT_TOTAL_SPIN, 250), cmbPolicyForUnknownChatParticipants(this, IDC_GC_POLICY_UNKNOWN), - edtNumberOfUnknownChatParticipants(this, IDC_GC_COUNT_UNKNOWN_SPIN), + edtNumberOfUnknownChatParticipants(this, IDC_GC_COUNT_UNKNOWN_SPIN, 250), cmbDefaultChatPolicy(this, IDC_GC_POLICY_DEFAULT) { CreateLink(cmbPolicyForAllChatParticipants, GG_KEY_GC_POLICY_TOTAL, DBVT_WORD, GG_KEYDEF_GC_POLICY_TOTAL); @@ -40,16 +40,12 @@ bool GaduOptionsDlgConference::OnInitDialog() int listIndex = m_proto->getWord(GG_KEY_GC_POLICY_TOTAL, GG_KEYDEF_GC_POLICY_TOTAL); cmbPolicyForAllChatParticipants.SetCurSel(listIndex); - edtNumberOfAllChatParticipants.SetRange(250U); - cmbPolicyForUnknownChatParticipants.AddString(TranslateT("Allow"), 0L); cmbPolicyForUnknownChatParticipants.AddString(TranslateT("Ask"), 1L); cmbPolicyForUnknownChatParticipants.AddString(TranslateT("Ignore"), 2L); listIndex = m_proto->getWord(GG_KEY_GC_POLICY_UNKNOWN, GG_KEYDEF_GC_POLICY_UNKNOWN); cmbPolicyForUnknownChatParticipants.SetCurSel(listIndex); - edtNumberOfUnknownChatParticipants.SetRange(250U); - cmbDefaultChatPolicy.AddString(TranslateT("Allow"), 0L); cmbDefaultChatPolicy.AddString(TranslateT("Ask"), 1L); cmbDefaultChatPolicy.AddString(TranslateT("Ignore"), 2L); diff --git a/protocols/ICQ-WIM/src/options.cpp b/protocols/ICQ-WIM/src/options.cpp index 36d74c8903..b4706423d6 100644 --- a/protocols/ICQ-WIM/src/options.cpp +++ b/protocols/ICQ-WIM/src/options.cpp @@ -164,8 +164,8 @@ class CIcqOptionsDlg : public CProtoDlgBase<CIcqProto> public: CIcqOptionsDlg(CIcqProto *ppro, int iDlgID, bool bFullDlg) : CProtoDlgBase<CIcqProto>(ppro, iDlgID), - spin1(this, IDC_SPIN1), - spin2(this, IDC_SPIN2), + spin1(this, IDC_SPIN1, 3600), + spin2(this, IDC_SPIN2, 3600), edtUin(this, IDC_UIN), edtEmail(this, IDC_EMAIL), edtDiff1(this, IDC_DIFF1), @@ -206,9 +206,6 @@ public: cmbStatus2.SetItemData(idx, iStatus); if (iStatus == m_proto->m_iStatus2) cmbStatus2.SetCurSel(idx); - - spin1.SetRange(3600); - spin2.SetRange(3600); } onChange_Timeout1(0); diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 14b3c4ae8c..accfb1ac39 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -471,8 +471,8 @@ CConnectPrefsDlg::CConnectPrefsDlg(CIrcProto* _pro) m_enableServer(this, IDC_STARTUP),
m_onlineTimer(this, IDC_ONLINETIMER),
m_limit(this, IDC_LIMIT),
- m_spin1(this, IDC_SPIN1),
- m_spin2(this, IDC_SPIN2),
+ m_spin1(this, IDC_SPIN1, 999, 20),
+ m_spin2(this, IDC_SPIN2, 200),
m_ssl(this, IDC_SSL),
m_serverlistModified(false)
{
@@ -516,10 +516,7 @@ bool CConnectPrefsDlg::OnInitDialog() }
}
- m_spin1.SetRange(999, 20);
m_spin1.SetPosition(m_proto->m_onlineNotificationTime);
-
- m_spin2.SetRange(200);
m_spin2.SetPosition(m_proto->m_onlineNotificationLimit);
m_nick.SetText(m_proto->m_nick);
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index 9f2e996286..3c0197d400 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -1,10 +1,13 @@ #include "stdafx.h"
-CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent)
- : CSteamDlgBase(proto, idDialog),
- m_username(this, IDC_USERNAME), m_password(this, IDC_PASSWORD),
- m_group(this, IDC_GROUP), m_biggerAvatars(this, IDC_BIGGER_AVATARS),
- m_showChatEvents(this, IDC_SHOW_CHAT_EVENTS), m_pollingErrorLimit(this, IDC_POLLINGERRORLIMITSPIN)
+CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent) :
+ CSteamDlgBase(proto, idDialog),
+ m_username(this, IDC_USERNAME),
+ m_password(this, IDC_PASSWORD),
+ m_group(this, IDC_GROUP),
+ m_biggerAvatars(this, IDC_BIGGER_AVATARS),
+ m_showChatEvents(this, IDC_SHOW_CHAT_EVENTS),
+ m_pollingErrorLimit(this, IDC_POLLINGERRORLIMITSPIN, 255)
{
SetParent(hwndParent);
@@ -26,8 +29,6 @@ bool CSteamOptionsMain::OnInitDialog() SendMessage(m_username.GetHwnd(), EM_LIMITTEXT, 64, 0);
SendMessage(m_password.GetHwnd(), EM_LIMITTEXT, 64, 0);
SendMessage(m_group.GetHwnd(), EM_LIMITTEXT, 64, 0);
-
- m_pollingErrorLimit.SetRange(255, 0);
return true;
}
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index aea111580d..3f7777e56a 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -2,14 +2,21 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog)
: CToxDlgBase(proto, idDialog),
- m_toxAddress(this, IDC_TOXID), m_toxAddressCopy(this, IDC_CLIPBOARD),
- m_profileCreate(this, IDC_PROFILE_NEW), m_profileImport(this, IDC_PROFILE_IMPORT),
- m_profileExport(this, IDC_PROFILE_EXPORT), m_nickname(this, IDC_NAME),
- m_passwordCreate(this, IDC_PASSWORD_CREATE), m_passwordChange(this, IDC_PASSWORD_CHANGE),
- m_passwordRemove(this, IDC_PASSWORD_REMOVE), m_group(this, IDC_GROUP),
+ m_toxAddress(this, IDC_TOXID),
+ m_toxAddressCopy(this, IDC_CLIPBOARD),
+ m_profileCreate(this, IDC_PROFILE_NEW),
+ m_profileImport(this, IDC_PROFILE_IMPORT),
+ m_profileExport(this, IDC_PROFILE_EXPORT),
+ m_nickname(this, IDC_NAME),
+ m_passwordCreate(this, IDC_PASSWORD_CREATE),
+ m_passwordChange(this, IDC_PASSWORD_CHANGE),
+ m_passwordRemove(this, IDC_PASSWORD_REMOVE),
+ m_group(this, IDC_GROUP),
m_enableUdp(this, IDC_ENABLE_UDP), m_enableUdpHolePunching(this, IDC_ENABLE_HOLEPUNCHING),
- m_enableIPv6(this, IDC_ENABLE_IPV6), m_enableLocalDiscovery(this, IDC_ENABLE_LOCALDISCOVERY),
- m_maxConnectRetries(this, IDC_MAXCONNECTRETRIESSPIN), m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIESSPIN)
+ m_enableIPv6(this, IDC_ENABLE_IPV6),
+ m_enableLocalDiscovery(this, IDC_ENABLE_LOCALDISCOVERY),
+ m_maxConnectRetries(this, IDC_MAXCONNECTRETRIESSPIN, 255, 1),
+ m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIESSPIN, 255, 1)
{
CreateLink(m_toxAddress, TOX_SETTINGS_ID, L"");
CreateLink(m_nickname, "Nick", L"");
@@ -65,9 +72,6 @@ bool CToxOptionsMain::OnInitDialog() m_toxAddress.SetMaxLength(TOX_ADDRESS_SIZE * 2);
m_nickname.SetMaxLength(TOX_MAX_NAME_LENGTH);
m_group.SetMaxLength(64);
-
- m_maxConnectRetries.SetRange(255, 1);
- m_maxReconnectRetries.SetRange(255, 1);
return true;
}
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 678fea38f0..aea8c07717 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -233,7 +233,7 @@ CVkOptionAdvancedForm::CVkOptionAdvancedForm(CVkProto *proto) : m_cbMesAsUnread(this, IDC_MESASUREAD),
m_cbForceInvisibleStatus(this, IDC_FORCE_ONLINE_ON_ACT),
m_edtInvInterval(this, IDC_ED_INT_INVIS),
- m_spInvInterval(this, IDC_SPIN_INT_INVIS),
+ m_spInvInterval(this, IDC_SPIN_INT_INVIS, 15),
m_cbSendVKLinksAsAttachments(this, IDC_SENDVKURLSASATTACH),
m_cbLoadSentAttachments(this, IDC_LOADSENTATTACH),
m_cbPopupContactsMusic(this, IDC_POPUP_CONTACT_MUSIC),
@@ -272,7 +272,6 @@ bool CVkOptionAdvancedForm::OnInitDialog() m_cbSendMetodBroadcast.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendBroadcastOnly);
m_cbMusicSendStatus.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendStatusOnly);
- m_spInvInterval.SetRange(15);
m_spInvInterval.SetPosition(m_proto->m_vkOptions.iInvisibleInterval);
On_cbForceInvisibleStatusChange(&m_cbForceInvisibleStatus);
@@ -315,10 +314,10 @@ CVkOptionFeedsForm::CVkOptionFeedsForm(CVkProto *proto) : CVkDlgBase(proto, IDD_OPT_FEEDS),
m_cbNewsEnabled(this, IDC_NEWS_ENBL),
m_edtNewsInterval(this, IDC_ED_INT_NEWS),
- m_spNewsInterval(this, IDC_SPIN_INT_NEWS),
+ m_spNewsInterval(this, IDC_SPIN_INT_NEWS, 60 * 24, 1),
m_cbNotificationsEnabled(this, IDC_NOTIF_ENBL),
m_edtNotificationsInterval(this, IDC_ED_INT_NOTIF),
- m_spNotificationsInterval(this, IDC_SPIN_INT_NOTIF),
+ m_spNotificationsInterval(this, IDC_SPIN_INT_NOTIF, 60 * 24, 1),
m_cbNotificationsMarkAsViewed(this, IDC_NOTIF_MARK_VIEWED),
m_cbSpecialContactAlwaysEnabled(this, IDC_SPEC_CONT_ENBL),
m_cbNewsAutoClearHistory(this, IDC_NEWSAUTOCLEAR),
@@ -370,10 +369,7 @@ CVkOptionFeedsForm::CVkOptionFeedsForm(CVkProto *proto) : bool CVkOptionFeedsForm::OnInitDialog()
{
- m_spNewsInterval.SetRange(60 * 24, 1);
m_spNewsInterval.SetPosition(m_proto->m_vkOptions.iNewsInterval);
-
- m_spNotificationsInterval.SetRange(60 * 24, 1);
m_spNotificationsInterval.SetPosition(m_proto->m_vkOptions.iNotificationsInterval);
On_cbNewsEnabledChange(&m_cbNewsEnabled);
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
|