diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-01-08 11:43:23 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-01-08 11:43:23 +0000 |
commit | ac22f38b00333bc5e040bec7a7a3fe17440d39a9 (patch) | |
tree | 9c1743f9bda7ff595ce816807ee5366bbee8247a /protocols/Tox/src | |
parent | 73e5ac314f168e2159e86c4f7f4f82089d7b2363 (diff) |
Tox:
- fixed minor issues
- updated tox core
git-svn-id: http://svn.miranda-ng.org/main/trunk@16059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 28 | ||||
-rw-r--r-- | protocols/Tox/src/tox_events.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 1 | ||||
-rw-r--r-- | protocols/Tox/src/version.h | 2 |
5 files changed, 15 insertions, 20 deletions
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 <stdver.h>
|