summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/resource.h2
-rw-r--r--protocols/Tox/src/tox_options.cpp39
-rw-r--r--protocols/Tox/src/tox_options.h39
3 files changed, 71 insertions, 9 deletions
diff --git a/protocols/Tox/src/resource.h b/protocols/Tox/src/resource.h
index 69770bb555..35c43d6488 100644
--- a/protocols/Tox/src/resource.h
+++ b/protocols/Tox/src/resource.h
@@ -36,7 +36,9 @@
#define IDC_PORT 1019
#define IDC_PKEY 1020
#define IDC_COMBO_AUDIOINPUT 1021
+#define IDC_AUDIOINPUT 1021
#define IDC_COMBO_AUDIOOUTPUT 1022
+#define IDC_AUDIOOUTPUT 1022
#define IDC_AUDIOFILTER 1023
#define IDC_COMBO_VIDEOINPUT 1024
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 25443fb59e..49860ff5bd 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -1,6 +1,6 @@
#include "common.h"
-CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog, HWND hwndParent)
+CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog)
: CToxDlgBase(proto, idDialog, false),
m_toxAddress(this, IDC_TOXID), m_toxAddressCopy(this, IDC_CLIPBOARD),
m_profileCreate(this, IDC_PROFILE_NEW), m_profileImport(this, IDC_PROFILE_IMPORT),
@@ -8,7 +8,6 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog, HWND hwndParent
m_password(this, IDC_PASSWORD), m_group(this, IDC_GROUP),
m_enableUdp(this, IDC_ENABLE_UDP), m_enableIPv6(this, IDC_ENABLE_IPV6)
{
- SetParent(hwndParent);
CreateLink(m_toxAddress, TOX_SETTINGS_ID, _T(""));
CreateLink(m_nickname, "Nick", _T(""));
@@ -148,6 +147,33 @@ void CToxOptionsMain::OnApply()
/////////////////////////////////////////////////////////////////////////////////
+CToxOptionsMultimedia::CToxOptionsMultimedia(CToxProto *proto)
+ : CToxDlgBase(proto, IDD_OPTIONS_AV, false),
+ m_audioInput(this, IDC_AUDIOINPUT), m_audioOutput(this, IDC_AUDIOOUTPUT)
+{
+ m_audioInput.OnChange = Callback(this, &CToxOptionsMultimedia::AudioInput_OnClick);
+ m_audioOutput.OnChange = Callback(this, &CToxOptionsMultimedia::AudioOutput_OnClick);
+}
+
+void CToxOptionsMultimedia::OnInitDialog()
+{
+ CToxDlgBase::OnInitDialog();
+}
+
+void CToxOptionsMultimedia::AudioInput_OnClick(CCtrlData*)
+{
+}
+
+void CToxOptionsMultimedia::AudioOutput_OnClick(CCtrlData*)
+{
+}
+
+void CToxOptionsMultimedia::OnApply()
+{
+}
+
+/////////////////////////////////////////////////////////////////////////////////
+
CToxNodeEditor::CToxNodeEditor(int iItem, CCtrlListView *m_nodes)
: CSuper(g_hInstance, IDD_NODE_EDITOR),
m_ipv4(this, IDC_IPV4), m_ipv6(this, IDC_IPV6),
@@ -482,11 +508,16 @@ int CToxProto::OnOptionsInit(WPARAM wParam, LPARAM)
odp.ptszGroup = LPGENT("Network");
odp.ptszTab = LPGENT("Account");
- odp.pDialog = new CToxOptionsMain(this, IDD_OPTIONS_MAIN);
+ odp.pDialog = CToxOptionsMain::CreateOptionsPage(this);
+ Options_AddPage(wParam, &odp);
+
+ odp.ptszTab = LPGENT("Multimedia");
+ odp.pDialog = CToxOptionsMultimedia::CreateOptionsPage(this);
Options_AddPage(wParam, &odp);
odp.ptszTab = LPGENT("Nodes");
- odp.pDialog = new CToxOptionsNodeList(this);
+ odp.pDialog = CToxOptionsNodeList::CreateOptionsPage(this);
Options_AddPage(wParam, &odp);
+
return 0;
}
diff --git a/protocols/Tox/src/tox_options.h b/protocols/Tox/src/tox_options.h
index afda3aee4e..6edc2688e6 100644
--- a/protocols/Tox/src/tox_options.h
+++ b/protocols/Tox/src/tox_options.h
@@ -30,14 +30,41 @@ protected:
void OnApply();
public:
- CToxOptionsMain(CToxProto *proto, int idDialog, HWND hwndParent = NULL);
+ CToxOptionsMain(CToxProto *proto, int idDialog);
static CDlgBase *CreateAccountManagerPage(void *param, HWND owner)
{
- CToxOptionsMain *page = new CToxOptionsMain((CToxProto*)param, IDD_ACCOUNT_MANAGER, owner);
+ CToxOptionsMain *page = new CToxOptionsMain((CToxProto*)param, IDD_ACCOUNT_MANAGER);
+ page->SetParent(owner);
page->Show();
return page;
}
+
+ static CDlgBase *CreateOptionsPage(void *param) { return new CToxOptionsMain((CToxProto*)param, IDD_OPTIONS_MAIN); }
+};
+
+/////////////////////////////////////////////////////////////////////////////////
+
+class CToxOptionsMultimedia : public CToxDlgBase
+{
+private:
+ typedef CToxDlgBase CSuper;
+
+ CCtrlCombo m_audioInput;
+ CCtrlCombo m_audioOutput;
+
+protected:
+ void OnInitDialog();
+
+ void AudioInput_OnClick(CCtrlData*);
+ void AudioOutput_OnClick(CCtrlData*);
+
+ void OnApply();
+
+public:
+ CToxOptionsMultimedia(CToxProto *proto);
+
+ static CDlgBase *CreateOptionsPage(void *param) { return new CToxOptionsMultimedia((CToxProto*)param); }
};
/////////////////////////////////////////////////////////////////////////////////
@@ -92,9 +119,6 @@ private:
CCtrlNodeList m_nodes;
CCtrlButton m_addNode;
-public:
- CToxOptionsNodeList(CToxProto *proto);
-
protected:
void OnInitDialog();
void OnApply();
@@ -103,6 +127,11 @@ protected:
void OnNodeListDoubleClick(CCtrlBase*);
void OnNodeListClick(CCtrlListView::TEventInfo *evt);
void OnNodeListKeyDown(CCtrlListView::TEventInfo *evt);
+
+public:
+ CToxOptionsNodeList(CToxProto *proto);
+
+ static CDlgBase *CreateOptionsPage(void *param) { return new CToxOptionsNodeList((CToxProto*)param); }
};
#endif //_TOX_OPTIONS_H_ \ No newline at end of file