summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_core.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-02-17 17:13:11 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-02-17 17:13:11 +0000
commitf23c4efb369478c7f8d42120c10a11f578ae3c34 (patch)
tree51fa77fd68c44a7cace8f419361df093904b4095 /protocols/Tox/src/tox_core.cpp
parent12d3b1e94a23381d8d8f94988953340baf75dc4c (diff)
added button for import
import dialog removed git-svn-id: http://svn.miranda-ng.org/main/trunk@12167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_core.cpp')
-rw-r--r--protocols/Tox/src/tox_core.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp
index 7d97b875f0..0cd6e045c3 100644
--- a/protocols/Tox/src/tox_core.cpp
+++ b/protocols/Tox/src/tox_core.cpp
@@ -58,13 +58,19 @@ bool CToxProto::InitToxCore()
uint8_t data[TOX_FRIEND_ADDRESS_SIZE];
tox_get_address(tox, data);
ToxHexAddress address(data, TOX_FRIEND_ADDRESS_SIZE);
- setString(NULL, TOX_SETTINGS_ID, address);
+ setString(TOX_SETTINGS_ID, address);
int size = tox_get_self_name_size(tox);
std::string nick(size, 0);
tox_get_self_name(tox, (uint8_t*)nick.data());
setWString("Nick", ptrW(Utf8DecodeW(nick.c_str())));
+ //temporary
+ size = tox_get_self_status_message_size(tox);
+ std::string statusmes(size, 0);
+ tox_get_self_status_message(tox, (uint8_t*)statusmes.data(), size);
+ setWString("StatusMsg", ptrW(Utf8DecodeW(statusmes.c_str())));
+
std::tstring avatarPath = GetAvatarFilePath();
if (IsFileExists(avatarPath))
{
@@ -98,6 +104,10 @@ void CToxProto::UninitToxCore()
ptrA nickname(mir_utf8encodeW(ptrT(getTStringA("Nick"))));
tox_set_name(tox, (uint8_t*)(char*)nickname, mir_strlen(nickname));
+ //temporary
+ ptrA statusmes(mir_utf8encodeW(ptrT(getTStringA("StatusMsg"))));
+ tox_set_status_message(tox, (uint8_t*)(char*)statusmes, mir_strlen(statusmes));
+
SaveToxProfile();
if (password != NULL)
{