diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-09-02 19:26:26 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-09-02 19:26:26 +0000 |
commit | 56918868664203496199593189f67455dd4f8c38 (patch) | |
tree | 27d2a699ddcbe0edfc256b129d801734f7af1781 /protocols/Tox/src/tox_utils.cpp | |
parent | 22c79dbeea18dc46951445476976d8c634dd3c60 (diff) |
Tox:
- show error if profile loading failed
- code cleaning
- menus uid
git-svn-id: http://svn.miranda-ng.org/main/trunk@15158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index b0f2b46b18..223d3b1b70 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -33,6 +33,33 @@ int CToxProto::ToxToMirandaStatus(TOX_USER_STATUS userstatus) return status;
}
+TCHAR* CToxProto::ToxErrorToString(TOX_ERR_NEW error)
+{
+ switch (error)
+ {
+ case TOX_ERR_NEW_NULL:
+ return TranslateT("One of the arguments is not valid or ");
+ case TOX_ERR_NEW_MALLOC:
+ return TranslateT("Unable to allocate enough memory");
+ case TOX_ERR_NEW_PORT_ALLOC:
+ return TranslateT("Unable to bind to a port");
+ case TOX_ERR_NEW_PROXY_BAD_TYPE:
+ return TranslateT("The proxy type is not valid");
+ case TOX_ERR_NEW_PROXY_BAD_HOST:
+ return TranslateT("The proxy host is not valid");
+ case TOX_ERR_NEW_PROXY_BAD_PORT:
+ return TranslateT("The proxy port is not valid");
+ case TOX_ERR_NEW_PROXY_NOT_FOUND:
+ return TranslateT("The proxy address could not be resolved");
+ case TOX_ERR_NEW_LOAD_ENCRYPTED:
+ return TranslateT("The profile is encrypted");
+ case TOX_ERR_NEW_LOAD_BAD_FORMAT:
+ return TranslateT("The data format is not valid");
+ default:
+ return TranslateT("Unknown error");
+ }
+}
+
void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact)
{
if (Miranda_Terminated())
|