summaryrefslogtreecommitdiff
path: root/protocols
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 /protocols
parent73c62ca9fc13c48a7768136279f0d70ac478c04b (diff)
fixes #1825 (spin control initialization should be done in the constructor, not inside OnInitDialog)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Gadu-Gadu/src/options.cpp8
-rw-r--r--protocols/ICQ-WIM/src/options.cpp7
-rw-r--r--protocols/IRCG/src/options.cpp7
-rw-r--r--protocols/Steam/src/steam_options.cpp15
-rw-r--r--protocols/Tox/src/tox_options.cpp24
-rw-r--r--protocols/VKontakte/src/vk_options.cpp10
6 files changed, 31 insertions, 40 deletions
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);