summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_options.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-14 19:56:42 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-14 19:56:42 +0000
commit29fcbd4c970c7b2aba1539519b8ec68f0370a1e2 (patch)
treeed4139f9b0ab7eb9d41ae2416a5cfd562ccea22f /protocols/Tox/src/tox_options.cpp
parent14001c799e72b8eefa523f8ff7ce44c443c78db8 (diff)
Tox: more point to save tox data
git-svn-id: http://svn.miranda-ng.org/main/trunk@10184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r--protocols/Tox/src/tox_options.cpp5
1 files changed, 5 insertions, 0 deletions
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);