diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-10 19:07:29 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-10 19:07:29 +0000 |
commit | 70fa6d15aa408ce82131d9e6c8eb4cc384f8e846 (patch) | |
tree | ab1eae8139b8a2bfd37cc7ddb007c3f6892aa26c /protocols/Tox/src/tox_events.cpp | |
parent | 7e5ea8ede78268b68b86f3f6d279deaf24593fb2 (diff) |
Tox:
- fixed account manager page
- added account options page
- removed test code
git-svn-id: http://svn.miranda-ng.org/main/trunk@10147 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_events.cpp')
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index 550cdd2999..d4ab8a8960 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -1,5 +1,45 @@ #include "common.h"
+int CToxProto::OnModulesLoaded(WPARAM, LPARAM)
+{
+ HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, this);
+
+ return 0;
+}
+
+INT_PTR CToxProto::OnAccountManagerInit(WPARAM, LPARAM lParam)
+{
+ return (INT_PTR)CreateDialogParam(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_ACCMGR),
+ (HWND)lParam,
+ &CToxProto::MainOptionsProc,
+ (LPARAM)this);
+}
+
+int CToxProto::OnOptionsInit(void *obj, WPARAM wParam, LPARAM lParam)
+{
+ CToxProto *proto = (CToxProto*)obj;
+
+ char *title = mir_t2a(proto->m_tszUserName);
+
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
+ odp.hInstance = g_hInstance;
+ odp.pszTitle = title;
+ odp.dwInitParam = LPARAM(obj);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pszGroup = LPGEN("Network");
+
+ odp.pszTab = LPGEN("Account");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAIN);
+ odp.pfnDlgProc = MainOptionsProc;
+ Options_AddPage(wParam, &odp);
+
+ mir_free(title);
+
+ return 0;
+}
+
void CToxProto::OnFriendRequest(Tox *tox, const uint8_t *userId, const uint8_t *message, const uint16_t messageSize, void *arg)
{
}
|