diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-14 17:50:50 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-14 17:50:50 +0000 |
commit | c88a84620596987aeb21e55b4eb3d71a4bf4d5d1 (patch) | |
tree | 93fb30e0da6e173a257fdaa93bb50e696f660426 /protocols/Tox/src | |
parent | 50096f107de419136ec3eb8a692759651994bb14 (diff) |
Tox:
- updated protocol icons
- updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@10447 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r-- | protocols/Tox/src/tox_contacts.cpp | 5 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.h | 1 | ||||
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 16 |
4 files changed, 5 insertions, 19 deletions
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index e3c2b94247..d86ab1ecbc 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -5,11 +5,6 @@ WORD CToxProto::GetContactStatus(MCONTACT hContact) return getWord(hContact, "Status", ID_STATUS_OFFLINE);
}
-bool CToxProto::IsContactOnline(MCONTACT hContact)
-{
- return GetContactStatus(hContact) == ID_STATUS_ONLINE;
-}
-
void CToxProto::SetContactStatus(MCONTACT hContact, WORD status)
{
WORD oldStatus = GetContactStatus(hContact);
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index d1e71ed376..ab2cfe61a7 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -16,7 +16,7 @@ PROTO<CToxProto>(protoName, userName) GetModuleFileName(g_hInstance, filePath, MAX_PATH);
wchar_t sectionName[100];
- mir_sntprintf(sectionName, SIZEOF(sectionName), _T("%s/%s"), LPGENT("Protocols"), MODULE);
+ mir_sntprintf(sectionName, SIZEOF(sectionName), _T("%s/%s"), LPGENT("Protocols"), _A2T(MODULE));
char settingName[100];
mir_snprintf(settingName, SIZEOF(settingName), "%s_%s", MODULE, "main");
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index e18c98f7b6..6d19d708bc 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -153,7 +153,6 @@ private: // contacts
WORD GetContactStatus(MCONTACT hContact);
- bool IsContactOnline(MCONTACT hContact);
void SetContactStatus(MCONTACT hContact, WORD status);
void SetAllContactsStatus(WORD status);
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 80d8cdd0e9..47759ffd5c 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -124,17 +124,10 @@ bool CToxProto::IsFileExists(std::tstring path) std::tstring CToxProto::GetToxProfilePath()
{
std::tstring profilePath;
- //ptrA path(getStringA("DataPath"));
- //if (path)
- //{
- // profilePath = path;
- //}
- //if (profilePath.empty())
- {
- TCHAR defaultPath[MAX_PATH];
- mir_sntprintf(defaultPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), m_tszUserName);
- profilePath = defaultPath;
- }
+ TCHAR defaultPath[MAX_PATH];
+ mir_sntprintf(defaultPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), m_tszUserName);
+ profilePath = defaultPath;
+
return profilePath;
}
@@ -180,7 +173,6 @@ void CToxProto::SaveToxData() uint32_t size = tox_size(tox);
uint8_t *data = (uint8_t*)mir_alloc(size);
-
tox_save(tox, data);
if (fwrite(data, sizeof(uint8_t), size, hFile) != size)
|