diff options
author | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
commit | a76776079b6d15e92dffd0c5c0016389092b1c8b (patch) | |
tree | ac686f25c8714b11824624b7773f499035b6827c /protocols | |
parent | 7fc01c9c474a732cd8b978d2f163f0839b2f956d (diff) |
Fixes related with 7fc01c9
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Steam/src/steam_options.cpp | 7 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.h | 3 | ||||
-rw-r--r-- | protocols/Tox/res/resource.rc | 6 | ||||
-rw-r--r-- | protocols/Tox/src/tox_dialogs.h | 27 | ||||
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 24 | ||||
-rw-r--r-- | protocols/Tox/src/tox_options.h | 23 |
6 files changed, 14 insertions, 76 deletions
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index bfc0255b09..88716ca0c9 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -3,8 +3,8 @@ CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent)
: CSteamDlgBase(proto, idDialog, false),
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_POLLINGERRORLIMIT), m_pollingErrorLimitSpin(this, IDC_POLLINGERRORLIMITSPIN)
+ m_group(this, IDC_GROUP), m_biggerAvatars(this, IDC_BIGGER_AVATARS),
+ m_showChatEvents(this, IDC_SHOW_CHAT_EVENTS), m_pollingErrorLimit(this, IDC_POLLINGERRORLIMITSPIN)
{
SetParent(hwndParent);
@@ -27,8 +27,7 @@ void CSteamOptionsMain::OnInitDialog() SendMessage(m_password.GetHwnd(), EM_LIMITTEXT, 64, 0);
SendMessage(m_group.GetHwnd(), EM_LIMITTEXT, 64, 0);
- m_pollingErrorLimitSpin.SetRange(255, 0);
- m_pollingErrorLimitSpin.SetPosition(m_proto->getByte("PollingErrorsLimit", STEAM_API_POLLING_ERRORS_LIMIT));
+ m_pollingErrorLimit.SetRange(255, 0);
}
void CSteamOptionsMain::OnApply()
diff --git a/protocols/Steam/src/steam_options.h b/protocols/Steam/src/steam_options.h index 388bf2c70a..d0aaf03bd9 100644 --- a/protocols/Steam/src/steam_options.h +++ b/protocols/Steam/src/steam_options.h @@ -11,8 +11,7 @@ private: CCtrlCheck m_biggerAvatars;
CCtrlCheck m_showChatEvents;
- CCtrlEdit m_pollingErrorLimit;
- CCtrlSpin m_pollingErrorLimitSpin;
+ CCtrlSpin m_pollingErrorLimit;
protected:
CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent = NULL);
diff --git a/protocols/Tox/res/resource.rc b/protocols/Tox/res/resource.rc index 741f076104..90ddb8da93 100644 --- a/protocols/Tox/res/resource.rc +++ b/protocols/Tox/res/resource.rc @@ -63,7 +63,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_TOX ICON "tox.ico"
+
IDI_ME ICON "me.ico"
+
IDI_EDIT ICON "edit.ico"
@@ -209,9 +211,9 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,101,65,50,14
PUSHBUTTON "Cancel",IDCANCEL,154,65,50,14
EDITTEXT IDC_PASSWORD_NEW,7,14,197,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "New password:",-1,7,4,197,8
+ LTEXT "New password:",IDC_STATIC,7,4,197,8
EDITTEXT IDC_PASSWORD_CONFIRM,7,39,197,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "Confirm password:",-1,7,29,197,8
+ LTEXT "Confirm password:",IDC_STATIC,7,29,197,8
LTEXT "",IDC_PASSWORD_VALIDATION,7,55,197,8
END
diff --git a/protocols/Tox/src/tox_dialogs.h b/protocols/Tox/src/tox_dialogs.h index dedd355e1b..b5cbba0639 100644 --- a/protocols/Tox/src/tox_dialogs.h +++ b/protocols/Tox/src/tox_dialogs.h @@ -1,33 +1,6 @@ #ifndef _TOX_DIALOGS_H_
#define _TOX_DIALOGS_H_
-class CCtrlLabel : public CCtrlData
-{
- typedef CCtrlData CSuper;
-
-public:
- CCtrlLabel(CDlgBase *dlg, int ctrlId) :
- CSuper(dlg, ctrlId)
- {
- }
-
- virtual void OnInit()
- {
- CSuper::OnInit();
- OnReset();
- }
-
- virtual void OnReset()
- {
- if (GetDataType() == DBVT_WCHAR)
- SetText(LoadText());
- else if (GetDataType() != DBVT_DELETED)
- SetInt(LoadInt());
- }
-};
-
-///////////////////////////////////////////////
-
typedef CProtoDlgBase<CToxProto> CToxDlgBase;
#endif //_TOX_DIALOGS_H_
\ No newline at end of file diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 71353d3263..119bce5a0d 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -9,8 +9,7 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog) 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_MAXCONNECTRETRIES), m_maxConnectRetriesSpin(this, IDC_MAXCONNECTRETRIESSPIN),
- m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIES), m_maxReconnectRetriesSpin(this, IDC_MAXRECONNECTRETRIESSPIN)
+ m_maxConnectRetries(this, IDC_MAXCONNECTRETRIESSPIN), m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIESSPIN)
{
CreateLink(m_toxAddress, TOX_SETTINGS_ID, L"");
CreateLink(m_nickname, "Nick", L"");
@@ -67,10 +66,8 @@ void CToxOptionsMain::OnInitDialog() m_nickname.SetMaxLength(TOX_MAX_NAME_LENGTH);
m_group.SetMaxLength(64);
- m_maxConnectRetriesSpin.SetRange(255, 1);
- m_maxConnectRetriesSpin.SetPosition(m_proto->getByte("MaxConnectRetries", TOX_MAX_CONNECT_RETRIES));
- m_maxReconnectRetriesSpin.SetRange(255, 1);
- m_maxReconnectRetriesSpin.SetPosition(m_proto->getByte("MaxReconnectRetries", TOX_MAX_RECONNECT_RETRIES));
+ m_maxConnectRetries.SetRange(255, 1);
+ m_maxReconnectRetries.SetRange(255, 1);
}
void CToxOptionsMain::PasswordCreate_OnClick(CCtrlButton*)
@@ -333,21 +330,6 @@ void CToxNodeEditor::OnClose() Utils_SaveWindowPosition(m_hwnd, NULL, MODULE, "EditNodeDlg");
}
-/****************************************/
-
-CCtrlNodeList::CCtrlNodeList(CDlgBase* dlg, int ctrlId)
- : CCtrlListView(dlg, ctrlId)
-{}
-
-BOOL CCtrlNodeList::OnNotify(int idCtrl, NMHDR *pnmh)
-{
- if (pnmh->code == NM_CLICK) {
- TEventInfo evt = { this, pnmh };
- OnClick(&evt);
- return TRUE;
- }
- return CCtrlListView::OnNotify(idCtrl, pnmh);
-}
/****************************************/
diff --git a/protocols/Tox/src/tox_options.h b/protocols/Tox/src/tox_options.h index 5a85edea61..74987139da 100644 --- a/protocols/Tox/src/tox_options.h +++ b/protocols/Tox/src/tox_options.h @@ -24,10 +24,8 @@ private: CCtrlCheck m_enableIPv6;
CCtrlCheck m_enableLocalDiscovery;
- CCtrlEdit m_maxConnectRetries;
- CCtrlSpin m_maxConnectRetriesSpin;
- CCtrlEdit m_maxReconnectRetries;
- CCtrlSpin m_maxReconnectRetriesSpin;
+ CCtrlSpin m_maxConnectRetries;
+ CCtrlSpin m_maxReconnectRetries;
protected:
void OnInitDialog();
@@ -85,21 +83,6 @@ public: CToxNodeEditor(int iItem, CCtrlListView *m_list);
};
-/****************************************/
-
-class CCtrlNodeList : public CCtrlListView
-{
-private:
- typedef CCtrlListView CSuper;
-
-protected:
- BOOL OnNotify(int idCtrl, NMHDR *pnmh);
-
-public:
- CCtrlNodeList(CDlgBase* dlg, int ctrlId);
-
- CCallback<TEventInfo> OnClick;
-};
/****************************************/
@@ -108,7 +91,7 @@ class CToxOptionsNodeList : public CToxDlgBase private:
typedef CToxDlgBase CSuper;
- CCtrlNodeList m_nodes;
+ CCtrlListView m_nodes;
CCtrlButton m_addNode;
CCtrlButton m_updateNodes;
|