summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-13 15:12:46 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-13 15:12:46 +0000
commit124f58006ce473de9dc391c7ced1f12875df080f (patch)
tree106c4bcd3774c84b20b42c63559b2dc588a50dec /protocols/Tox
parent6d0076208df04f1d161220beb7cd9155330dead9 (diff)
dialog fix for SkypeWeb & Tox
git-svn-id: http://svn.miranda-ng.org/main/trunk@12788 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/res/resource.rc8
-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
4 files changed, 75 insertions, 13 deletions
diff --git a/protocols/Tox/res/resource.rc b/protocols/Tox/res/resource.rc
index f6fc1c7c96..b2f892f7ae 100644
--- a/protocols/Tox/res/resource.rc
+++ b/protocols/Tox/res/resource.rc
@@ -186,12 +186,12 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "Multimedia",-1,7,7,296,89
LTEXT "Audio input device",-1,12,17,60,8
- COMBOBOX IDC_COMBO_AUDIOINPUT,12,26,138,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_AUDIOINPUT,12,26,138,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Audio output device",-1,12,42,65,8
- COMBOBOX IDC_COMBO_AUDIOOUTPUT,12,52,138,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_AUDIOOUTPUT,12,52,138,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Filter audio",IDC_AUDIOFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,28,51,10
- LTEXT "Video input device",-1,15,68,59,8
- COMBOBOX IDC_COMBO_VIDEOINPUT,12,78,138,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Video input device",-1,15,68,59,8,NOT WS_VISIBLE
+ COMBOBOX IDC_COMBO_VIDEOINPUT,12,78,138,30,CBS_DROPDOWN | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
END
IDD_CHATROOM_INVITE DIALOGEX 0, 0, 190, 179
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