From 9cecda91ac7e563b14fdba9d9cd5feea3faccf69 Mon Sep 17 00:00:00 2001
From: Alexander Lantsev <aunsane@gmail.com>
Date: Fri, 10 Apr 2015 17:54:23 +0000
Subject: Tox: cleanup

git-svn-id: http://svn.miranda-ng.org/main/trunk@12750 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 protocols/Tox/include/toxav.h      |  1 -
 protocols/Tox/src/main.cpp         |  2 --
 protocols/Tox/src/tox_avatars.cpp  |  2 --
 protocols/Tox/src/tox_contacts.cpp |  2 --
 protocols/Tox/src/tox_menus.h      | 17 ++++++++++++-----
 protocols/Tox/src/tox_transfer.cpp |  2 --
 6 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/protocols/Tox/include/toxav.h b/protocols/Tox/include/toxav.h
index 7285f45cc6..88fee4d43e 100644
--- a/protocols/Tox/include/toxav.h
+++ b/protocols/Tox/include/toxav.h
@@ -22,7 +22,6 @@
 
 #ifndef __TOXAV
 #define __TOXAV
-#include <inttypes.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp
index ffc0e5aafb..b2af02340b 100644
--- a/protocols/Tox/src/main.cpp
+++ b/protocols/Tox/src/main.cpp
@@ -37,9 +37,7 @@ extern "C" int __declspec(dllexport) Load(void)
 {
 	g_hToxLibrary = LoadLibrary(_T("libtox.dll"));
 	if (g_hToxLibrary == NULL)
-	{
 		return 0;
-	}
 
 	mir_getLP(&pluginInfo);
 
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp
index bc683bf0f6..fb37813e26 100644
--- a/protocols/Tox/src/tox_avatars.cpp
+++ b/protocols/Tox/src/tox_avatars.cpp
@@ -95,8 +95,6 @@ void CToxProto::SetToxAvatar(std::tstring path, bool checkHash)
 
 		FileTransferParam *transfer = new FileTransferParam(friendNumber, fileNumber, _T("avatar"), length);
 		transfer->pfts.hContact = hContact;
-		transfer->pfts.flags |= PFTS_SENDING;
-		//transfer->pfts.tszWorkingDir = fileDir;
 		transfer->hFile = _tfopen(path.c_str(), L"rb");
 		transfers.Add(transfer);
 	}
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index a735903756..19c7e3c46b 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -359,8 +359,6 @@ void CToxProto::OnConnectionStatusChanged(Tox*, uint32_t friendNumber, TOX_CONNE
 
 				FileTransferParam *transfer = new FileTransferParam(friendNumber, fileNumber, _T("avatar"), length);
 				transfer->pfts.hContact = hContact;
-				transfer->pfts.flags |= PFTS_SENDING;
-				//transfer->pfts.tszWorkingDir = fileDir;
 				transfer->hFile = hFile;
 				proto->transfers.Add(transfer);
 			}
diff --git a/protocols/Tox/src/tox_menus.h b/protocols/Tox/src/tox_menus.h
index bd3308afdd..0becb02269 100644
--- a/protocols/Tox/src/tox_menus.h
+++ b/protocols/Tox/src/tox_menus.h
@@ -3,13 +3,20 @@
 
 #define CMI_POSITION -201001000
 
-#define CMI_AUTH_REQUEST 0
-#define CMI_AUTH_GRANT 1
-#define CMI_MAX 2 // this item shall be the last one
+enum CMI_MENU_ITEMS
+{
+	CMI_AUTH_REQUEST,
+	CMI_AUTH_GRANT,
+	CMI_MAX // this item shall be the last one
+};
 
 #define SMI_POSITION 200000
 
-#define SMI_TOXID_COPY 0
-#define SMI_GROUPCHAT_CREATE 1
+enum SMI_MENU_ITEMS
+{
+	SMI_TOXID_COPY,
+	SMI_GROUPCHAT_CREATE,
+	SMI_MAX // this item shall be the last one
+};
 
 #endif //_TOX_MENUS_H_
\ No newline at end of file
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp
index c2cbad33cd..cb2e3d7e0f 100644
--- a/protocols/Tox/src/tox_transfer.cpp
+++ b/protocols/Tox/src/tox_transfer.cpp
@@ -22,7 +22,6 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u
 
 			FileTransferParam *transfer = new FileTransferParam(friendNumber, fileNumber, name, fileSize);
 			transfer->pfts.hContact = hContact;
-			transfer->pfts.flags |= PFTS_RECEIVING;
 			proto->transfers.Add(transfer);
 
 			if (kind == TOX_FILE_KIND_AVATAR)
@@ -216,7 +215,6 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR **pp
 
 	FileTransferParam *transfer = new FileTransferParam(friendNumber, fileNumber, fileName, fileSize);
 	transfer->pfts.hContact = hContact;
-	transfer->pfts.flags |= PFTS_SENDING;
 	transfer->pfts.tszWorkingDir = fileDir;
 	transfer->hFile = hFile;
 	transfers.Add(transfer);
-- 
cgit v1.2.3