From ac22f38b00333bc5e040bec7a7a3fe17440d39a9 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 8 Jan 2016 11:43:23 +0000 Subject: Tox: - fixed minor issues - updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@16059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/bin/x64/libtox.dll | Bin 1870447 -> 1871471 bytes protocols/Tox/bin/x64/libtox.pdb | Bin 797696 -> 797696 bytes protocols/Tox/bin/x86/libtox.dll | Bin 1649775 -> 1652335 bytes protocols/Tox/bin/x86/libtox.pdb | Bin 830464 -> 830464 bytes protocols/Tox/include/toxav.h | 1 + protocols/Tox/src/tox_core.cpp | 28 ++++++++++++---------------- protocols/Tox/src/tox_events.cpp | 2 +- protocols/Tox/src/tox_proto.cpp | 2 +- protocols/Tox/src/tox_transfer.cpp | 1 - protocols/Tox/src/version.h | 2 +- 10 files changed, 16 insertions(+), 20 deletions(-) diff --git a/protocols/Tox/bin/x64/libtox.dll b/protocols/Tox/bin/x64/libtox.dll index ce8770de80..ead87ba76d 100644 Binary files a/protocols/Tox/bin/x64/libtox.dll and b/protocols/Tox/bin/x64/libtox.dll differ diff --git a/protocols/Tox/bin/x64/libtox.pdb b/protocols/Tox/bin/x64/libtox.pdb index 55c23b04bb..d9cced1834 100644 Binary files a/protocols/Tox/bin/x64/libtox.pdb and b/protocols/Tox/bin/x64/libtox.pdb differ diff --git a/protocols/Tox/bin/x86/libtox.dll b/protocols/Tox/bin/x86/libtox.dll index 1940471390..76c5c0f20a 100644 Binary files a/protocols/Tox/bin/x86/libtox.dll and b/protocols/Tox/bin/x86/libtox.dll differ diff --git a/protocols/Tox/bin/x86/libtox.pdb b/protocols/Tox/bin/x86/libtox.pdb index 9a0ce17715..7ed9f3918e 100644 Binary files a/protocols/Tox/bin/x86/libtox.pdb and b/protocols/Tox/bin/x86/libtox.pdb differ diff --git a/protocols/Tox/include/toxav.h b/protocols/Tox/include/toxav.h index 6e033918bf..ea58625403 100644 --- a/protocols/Tox/include/toxav.h +++ b/protocols/Tox/include/toxav.h @@ -22,6 +22,7 @@ #ifndef TOXAV_H #define TOXAV_H +//#include #include #include diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 5ab131ea6e..f37ec8d866 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -37,7 +37,7 @@ Tox_Options* CToxProto::GetToxOptions() } } } - + return options; } @@ -118,22 +118,18 @@ bool CToxProto::InitToxCore(CToxThread *toxThread) void CToxProto::UninitToxCore(CToxThread *toxThread) { - if (toxThread) { - if (toxThread->toxAV) - toxav_kill(toxThread->toxAV); + if (toxThread == NULL) + return; - if (toxThread->tox) - { - CancelAllTransfers(); + if (toxThread->toxAV) + toxav_kill(toxThread->toxAV); - SaveToxProfile(toxThread); + if (toxThread->tox == NULL) + return; + + CancelAllTransfers(); + SaveToxProfile(toxThread); - if (toxThread->tox != NULL) - { - tox_kill(toxThread->tox); - toxThread->tox = NULL; - } - } - toxThread = NULL; - } + tox_kill(toxThread->tox); + toxThread->tox = NULL; } \ No newline at end of file diff --git a/protocols/Tox/src/tox_events.cpp b/protocols/Tox/src/tox_events.cpp index 80ddf9b809..fe1cb7abe5 100644 --- a/protocols/Tox/src/tox_events.cpp +++ b/protocols/Tox/src/tox_events.cpp @@ -5,7 +5,7 @@ int CToxProto::OnModulesLoaded(WPARAM, LPARAM) CToxProto::InitIcons(); CToxProto::InitMenus(); - hProfileFolderPath = FoldersRegisterCustomPathT("Tox", Translate("Profiles folder"), MIRANDA_USERDATAT); + hProfileFolderPath = FoldersRegisterCustomPathT("Tox", "ProfilesFolder", MIRANDA_USERDATAT, TranslateT("Profiles folder")); if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) { diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 4c980a26cc..7c6c4cb30c 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -206,7 +206,7 @@ int CToxProto::SetAwayMsg(int, const TCHAR *msg) { T2Utf statusMessage(msg); TOX_ERR_SET_INFO error; - if (tox_self_set_status_message(toxThread->tox, (uint8_t*)(char*)statusMessage, min(TOX_MAX_STATUS_MESSAGE_LENGTH, mir_strlen(statusMessage)), &error)) + if (!tox_self_set_status_message(toxThread->tox, (uint8_t*)(char*)statusMessage, min(TOX_MAX_STATUS_MESSAGE_LENGTH, mir_strlen(statusMessage)), &error)) logger->Log("CToxProto::SetAwayMsg: failed to set status status message %s (%d)", msg, error); } diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index c4ebeb02b0..f98c5590b2 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -198,7 +198,6 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles) if (friendNumber == UINT32_MAX) return NULL; - FILE *hFile = _tfopen(ppszFiles[0], _T("rb")); if (hFile == NULL) { diff --git a/protocols/Tox/src/version.h b/protocols/Tox/src/version.h index c2f197b3a0..3be210f073 100644 --- a/protocols/Tox/src/version.h +++ b/protocols/Tox/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 11 #define __RELEASE_NUM 1 -#define __BUILD_NUM 18 +#define __BUILD_NUM 19 #include -- cgit v1.2.3