summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_contacts.cpp5
-rw-r--r--protocols/Tox/src/tox_proto.cpp2
-rw-r--r--protocols/Tox/src/tox_proto.h1
-rw-r--r--protocols/Tox/src/tox_utils.cpp16
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)