summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-25 14:45:28 +0300
committeraunsane <aunsane@gmail.com>2018-02-25 14:45:28 +0300
commita76776079b6d15e92dffd0c5c0016389092b1c8b (patch)
treeac686f25c8714b11824624b7773f499035b6827c /protocols/Tox
parent7fc01c9c474a732cd8b978d2f163f0839b2f956d (diff)
Fixes related with 7fc01c9
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/res/resource.rc6
-rw-r--r--protocols/Tox/src/tox_dialogs.h27
-rw-r--r--protocols/Tox/src/tox_options.cpp24
-rw-r--r--protocols/Tox/src/tox_options.h23
4 files changed, 10 insertions, 70 deletions
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;