From 29fcbd4c970c7b2aba1539519b8ec68f0370a1e2 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 14 Aug 2014 19:56:42 +0000 Subject: Tox: more point to save tox data git-svn-id: http://svn.miranda-ng.org/main/trunk@10184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_options.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/Tox/src/tox_options.cpp') diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index f4eb2e6e5d..74463dc454 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -107,6 +107,11 @@ INT_PTR CALLBACK CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, GetDlgItemTextA(hwnd, IDC_USERNAME, username, SIZEOF(username)); proto->setString("Username", username); + if (tox_set_name(proto->tox, (uint8_t*)&username[0], strlen(username)) == 0) + { + proto->SaveToxData(); + } + char dataPath[128]; GetDlgItemTextA(hwnd, IDC_DATAPATH, dataPath, SIZEOF(dataPath)); proto->setString("DataPath", dataPath); -- cgit v1.2.3