summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_account.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-26 22:41:54 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-26 22:41:54 +0000
commit32b48e3baea25d01efde34843978cb3b94507372 (patch)
treeb40cd334bad87e29bbe3a32f5ce358ec4afacf35 /protocols/Tox/src/tox_account.cpp
parent4a1bf959c8dc0e254e3cc8efcce0f2c89108e350 (diff)
Tox:
- updater tox core - avatars support part 2 git-svn-id: http://svn.miranda-ng.org/main/trunk@10609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_account.cpp')
-rw-r--r--protocols/Tox/src/tox_account.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_account.cpp b/protocols/Tox/src/tox_account.cpp
index 8af024e9f8..b7c7276c12 100644
--- a/protocols/Tox/src/tox_account.cpp
+++ b/protocols/Tox/src/tox_account.cpp
@@ -55,7 +55,7 @@ void CToxProto::InitToxCore()
tox_callback_file_control(tox, OnFileRequest, this);
tox_callback_file_send_request(tox, OnFriendFile, this);
tox_callback_file_data(tox, OnFileData, this);
- // avatars
+ // avatars
tox_callback_avatar_info(tox, OnGotFriendAvatarInfo, this);
tox_callback_avatar_data(tox, OnGotFriendAvatarData, this);
@@ -71,6 +71,12 @@ void CToxProto::InitToxCore()
tox_get_address(tox, &pubKey[0]);
std::string address = DataToHexString(pubKey);
setString(NULL, TOX_SETTINGS_ID, address.c_str());
+
+ std::tstring avatarPath = GetContactAvatarFilePath(NULL);
+ if (IsFileExists(avatarPath))
+ {
+ SetToxAvatar(avatarPath);
+ }
}
void CToxProto::UninitToxCore()