diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-27 10:19:26 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-27 10:19:26 +0000 |
commit | 22b35cdc0d13336366efe44b57d682d5be6bae52 (patch) | |
tree | dc4fb01f13f4b11391c2c1c704d10b4ecc9c66b8 /protocols/Tox/src/tox_avatars.cpp | |
parent | 93467b8c3702be5fc9f9b60c3ff6863cb37ccd8d (diff) |
Tox:
- password field temporary disables
- some changes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10613 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r-- | protocols/Tox/src/tox_avatars.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index ef4810e520..714ee76473 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -1,6 +1,6 @@ #include "common.h"
-std::tstring CToxProto::GetContactAvatarFilePath(MCONTACT hContact)
+std::tstring CToxProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR path[MAX_PATH];
mir_sntprintf(path, SIZEOF(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -117,7 +117,7 @@ INT_PTR CToxProto::GetAvatarInfo(WPARAM, LPARAM lParam) ptrA id(getStringA(pai->hContact, TOX_SETTINGS_ID));
if (id != NULL)
{
- std::tstring path = GetContactAvatarFilePath(pai->hContact);
+ std::tstring path = GetAvatarFilePath(pai->hContact);
if (IsFileExists(path))
{
_tcsncpy(pai->filename, path.c_str(), SIZEOF(pai->filename));
@@ -137,7 +137,7 @@ INT_PTR CToxProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) return -2;
}
- std::tstring path(GetContactAvatarFilePath(NULL));
+ std::tstring path(GetAvatarFilePath());
if (IsFileExists(path))
{
_tcsncpy((TCHAR*)wParam, path.c_str(), (int)lParam);
@@ -151,7 +151,7 @@ INT_PTR CToxProto::GetMyAvatar(WPARAM wParam, LPARAM lParam) INT_PTR CToxProto::SetMyAvatar(WPARAM wParam, LPARAM lParam)
{
TCHAR *path = (TCHAR*)lParam;
- std::tstring avatarPath = GetContactAvatarFilePath(NULL);
+ std::tstring avatarPath = GetAvatarFilePath();
if (path != NULL)
{
if (!CopyFile(path, avatarPath.c_str(), FALSE))
@@ -188,7 +188,7 @@ void CToxProto::OnGotFriendAvatarInfo(Tox *tox, int32_t number, uint8_t format, MCONTACT hContact = proto->FindContact(number);
if (hContact)
{
- std::tstring path = proto->GetContactAvatarFilePath(hContact);
+ std::tstring path = proto->GetAvatarFilePath(hContact);
if (format == TOX_AVATAR_FORMAT_NONE)
{
proto->delSetting(hContact, TOX_SETTINGS_AVATAR_HASH);
@@ -226,7 +226,7 @@ void CToxProto::OnGotFriendAvatarData(Tox *tox, int32_t number, uint8_t format, {
db_set_blob(hContact, proto->m_szModuleName, TOX_SETTINGS_AVATAR_HASH, hash, TOX_HASH_LENGTH);
- std::tstring path = proto->GetContactAvatarFilePath(hContact);
+ std::tstring path = proto->GetAvatarFilePath(hContact);
FILE *hFile = _tfopen(path.c_str(), L"wb");
if (hFile)
{
|