summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /protocols/Tox
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox.cpp2
-rw-r--r--protocols/Tox/src/tox_accounts.cpp2
-rw-r--r--protocols/Tox/src/tox_avatars.cpp8
-rw-r--r--protocols/Tox/src/tox_chatrooms.cpp2
-rw-r--r--protocols/Tox/src/tox_network.cpp2
-rw-r--r--protocols/Tox/src/tox_options.cpp36
-rw-r--r--protocols/Tox/src/tox_profile.cpp8
-rw-r--r--protocols/Tox/src/tox_transfer.cpp10
8 files changed, 35 insertions, 35 deletions
diff --git a/protocols/Tox/src/tox.cpp b/protocols/Tox/src/tox.cpp
index 5e45668519..cd67b0f8f0 100644
--- a/protocols/Tox/src/tox.cpp
+++ b/protocols/Tox/src/tox.cpp
@@ -36,7 +36,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
extern "C" int __declspec(dllexport) Load(void)
{
- g_hToxLibrary = LoadLibrary(_T("libtox.dll"));
+ g_hToxLibrary = LoadLibrary(L"libtox.dll");
if (g_hToxLibrary == NULL)
return 0;
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index 109a4532f6..f4a2ad222d 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -46,7 +46,7 @@ int CToxProto::OnAccountRenamed(WPARAM, LPARAM)
ptrT newPath(GetToxProfilePath());
TCHAR oldPath[MAX_PATH];
- mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName);
+ mir_sntprintf(oldPath, MAX_PATH, L"%s\\%s.tox", VARST(L"%miranda_userdata%"), accountName);
_trename(oldPath, newPath);
mir_free(accountName);
accountName = mir_tstrdup(m_tszUserName);
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp
index b7282e781f..b62328ae11 100644
--- a/protocols/Tox/src/tox_avatars.cpp
+++ b/protocols/Tox/src/tox_avatars.cpp
@@ -3,7 +3,7 @@
TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR *path = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1);
- mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -12,12 +12,12 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact)
ptrT address(getTStringA(hContact, TOX_SETTINGS_ID));
if (address == NULL) {
mir_free(path);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
if (hContact && mir_tstrlen(address) > TOX_PUBLIC_KEY_SIZE * 2)
address[TOX_PUBLIC_KEY_SIZE * 2] = 0;
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s.png"), path, address);
+ mir_sntprintf(path, MAX_PATH, L"%s\\%s.png", path, address);
return path;
}
@@ -231,7 +231,7 @@ void CToxProto::OnGotFriendAvatarInfo(AvatarTransferParam *transfer)
}
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
OnFileAllow(transfer->pfts.hContact, transfer, path);
}
diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp
index aba34e46b6..59580431a3 100644
--- a/protocols/Tox/src/tox_chatrooms.cpp
+++ b/protocols/Tox/src/tox_chatrooms.cpp
@@ -29,7 +29,7 @@ MCONTACT CToxProto::AddChatRoom(int groupNumber)
setWord(hContact, TOX_SETTINGS_CHAT_ID, groupNumber);
TCHAR title[MAX_PATH];
- mir_sntprintf(title, _T("%s #%d"), TranslateT("Group chat"), groupNumber);
+ mir_sntprintf(title, L"%s #%d", TranslateT("Group chat"), groupNumber);
setTString(hContact, "Nick", title);
DBVARIANT dbv;
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp
index 47b08a2396..f4e6d887f5 100644
--- a/protocols/Tox/src/tox_network.cpp
+++ b/protocols/Tox/src/tox_network.cpp
@@ -169,7 +169,7 @@ void CToxProto::UpdateNodes()
CloseHandle(hProfile);
}
- FILE *hFile = _tfopen(path, _T("w"));
+ FILE *hFile = _tfopen(path, L"w");
if (!hFile)
{
debugLogA(__FUNCTION__": failed to open tox.json");
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 887ebe88ab..527144081b 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -9,10 +9,10 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog)
m_enableUdp(this, IDC_ENABLE_UDP), m_enableIPv6(this, IDC_ENABLE_IPV6)
{
- CreateLink(m_toxAddress, TOX_SETTINGS_ID, _T(""));
- CreateLink(m_nickname, "Nick", _T(""));
- CreateLink(m_password, "Password", _T(""));
- CreateLink(m_group, TOX_SETTINGS_GROUP, _T("Tox"));
+ CreateLink(m_toxAddress, TOX_SETTINGS_ID, L"");
+ CreateLink(m_nickname, "Nick", L"");
+ CreateLink(m_password, "Password", L"");
+ CreateLink(m_group, TOX_SETTINGS_GROUP, L"Tox");
CreateLink(m_enableUdp, "EnableUDP", DBVT_BYTE, TRUE);
CreateLink(m_enableIPv6, "EnableIPv6", DBVT_BYTE, FALSE);
@@ -105,7 +105,7 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*)
void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"),
+ mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c",
TranslateT("Tox profile"), 0, 0, TranslateT("All files"), 0, 0, 0);
TCHAR profilePath[MAX_PATH] = { 0 };
@@ -118,7 +118,7 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
ofn.lpstrTitle = TranslateT("Select Tox profile");
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER;
- ofn.lpstrInitialDir = _T("%APPDATA%\\Tox");
+ ofn.lpstrInitialDir = L"%APPDATA%\\Tox";
if (!GetOpenFileName(&ofn))
return;
@@ -163,11 +163,11 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%c"),
+ mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%c",
TranslateT("Tox profile"), 0, 0, 0);
TCHAR profilePath[MAX_PATH];
- mir_tstrncpy(profilePath, _T("tox_save.tox"), _countof(profilePath));
+ mir_tstrncpy(profilePath, L"tox_save.tox", _countof(profilePath));
OPENFILENAME ofn = { sizeof(ofn) };
ofn.hwndOwner = m_hwnd;
@@ -177,7 +177,7 @@ void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*)
ofn.lpstrTitle = TranslateT("Save Tox profile");
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_EXPLORER;
- ofn.lpstrInitialDir = _T("%HOMEPATH%");
+ ofn.lpstrInitialDir = L"%HOMEPATH%";
if (!GetSaveFileName(&ofn))
return;
@@ -392,8 +392,8 @@ void CToxNodeEditor::OnOk(CCtrlBase*)
m_list->SetItem(m_iItem, 0, ipv4);
m_list->SetItem(m_iItem, 2, port);
m_list->SetItem(m_iItem, 3, pubKey);
- m_list->SetItem(m_iItem, 4, _T(""), 0);
- m_list->SetItem(m_iItem, 5, _T(""), 1);
+ m_list->SetItem(m_iItem, 4, L"", 0);
+ m_list->SetItem(m_iItem, 5, L"", 1);
SendMessage(GetParent(GetParent(m_list->GetHwnd())), PSM_CHANGED, 0, 0);
@@ -447,12 +447,12 @@ void CToxOptionsNodeList::OnInitDialog()
icon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
ImageList_AddIcon(hImageList, icon); IcoLib_ReleaseIcon(icon);
- m_nodes.AddColumn(0, _T("IPv4"), 100);
- m_nodes.AddColumn(1, _T("IPv6"), 100);
+ m_nodes.AddColumn(0, L"IPv4", 100);
+ m_nodes.AddColumn(1, L"IPv6", 100);
m_nodes.AddColumn(2, TranslateT("Port"), 50);
m_nodes.AddColumn(3, TranslateT("Public key"), 130);
- m_nodes.AddColumn(4, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL));
- m_nodes.AddColumn(5, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_nodes.AddColumn(4, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_nodes.AddColumn(5, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
m_nodes.EnableGroupView(TRUE);
m_nodes.AddGroup(0, TranslateT("Common nodes"));
@@ -567,7 +567,7 @@ void CToxOptionsNodeList::ReloadNodeList()
iItem = m_nodes.AddItem(ipv4, -1, NULL, 0);
ptrT ipv6(mir_utf8decodeT(node.at("ipv6").as_string().c_str()));
- if (mir_tstrcmp(ipv6, _T("-")))
+ if (mir_tstrcmp(ipv6, L"-"))
m_nodes.SetItem(iItem, 1, ipv6);
ptrT port(mir_utf8decodeT(node.at("port").as_string().c_str()));
@@ -606,8 +606,8 @@ void CToxOptionsNodeList::ReloadNodeList()
value = db_get_tsa(NULL, module, setting);
m_nodes.SetItem(iItem, 3, value);
- m_nodes.SetItem(iItem, 4, _T(""), 0);
- m_nodes.SetItem(iItem, 5, _T(""), 1);
+ m_nodes.SetItem(iItem, 4, L"", 0);
+ m_nodes.SetItem(iItem, 5, L"", 1);
}
}
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index 28cef7b286..8c4c49d442 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -11,8 +11,8 @@ TCHAR* CToxProto::GetToxProfilePath(const TCHAR *accountName)
{
TCHAR *profilePath = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1);
TCHAR profileRootPath[MAX_PATH];
- FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(_T("%miranda_userdata%")));
- mir_sntprintf(profilePath, MAX_PATH, _T("%s\\%s.tox"), profileRootPath, accountName);
+ FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(L"%miranda_userdata%"));
+ mir_sntprintf(profilePath, MAX_PATH, L"%s\\%s.tox", profileRootPath, accountName);
return profilePath;
}
@@ -26,7 +26,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options)
if (!IsFileExists(profilePath))
return false;
- FILE *profile = _tfopen(profilePath, _T("rb"));
+ FILE *profile = _tfopen(profilePath, L"rb");
if (profile == NULL)
{
ShowNotification(TranslateT("Unable to open Tox profile"), MB_ICONERROR);
@@ -122,7 +122,7 @@ void CToxProto::SaveToxProfile(CToxThread *toxThread)
}
ptrT profilePath(GetToxProfilePath());
- FILE *profile = _tfopen(profilePath, _T("wb"));
+ FILE *profile = _tfopen(profilePath, L"wb");
if (profile == NULL)
{
debugLogA(__FUNCTION__": failed to open tox profile");
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp
index 5c9ca9b56d..e2b3286d22 100644
--- a/protocols/Tox/src/tox_transfer.cpp
+++ b/protocols/Tox/src/tox_transfer.cpp
@@ -20,7 +20,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u
ptrT address(proto->getTStringA(hContact, TOX_SETTINGS_ID));
TCHAR avatarName[MAX_PATH];
- mir_sntprintf(avatarName, MAX_PATH, _T("%s.png"), address);
+ mir_sntprintf(avatarName, MAX_PATH, L"%s.png", address);
AvatarTransferParam *transfer = new AvatarTransferParam(friendNumber, fileNumber, avatarName, fileSize);
transfer->pfts.flags |= PFTS_RECEIVING;
@@ -56,7 +56,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u
pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.t = _T("");
+ pre.descr.t = L"";
pre.files.t = &name;
pre.lParam = (LPARAM)transfer;
ProtoChainRecvFile(hContact, &pre);
@@ -78,7 +78,7 @@ HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *
// stupid fix
TCHAR fullPath[MAX_PATH];
- mir_sntprintf(fullPath, _T("%s\\%s"), transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
+ mir_sntprintf(fullPath, L"%s\\%s", transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
transfer->ChangeName(fullPath);
if (!ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)transfer, (LPARAM)&transfer->pfts))
@@ -111,7 +111,7 @@ int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const TCHAR **szFilen
ToxHexAddress pubKey = GetContactPublicKey(transfer->friendNumber);
- TCHAR *mode = *action == FILERESUME_OVERWRITE ? _T("wb") : _T("ab");
+ TCHAR *mode = *action == FILERESUME_OVERWRITE ? L"wb" : L"ab";
if (!transfer->OpenFile(mode))
{
debugLogA(__FUNCTION__": failed to open file (%d) from %s(%d)", transfer->fileNumber, (const char*)pubKey, transfer->friendNumber);
@@ -206,7 +206,7 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles)
if (friendNumber == UINT32_MAX)
return NULL;
- FILE *hFile = _tfopen(ppszFiles[0], _T("rb"));
+ FILE *hFile = _tfopen(ppszFiles[0], L"rb");
if (hFile == NULL)
{
debugLogA(__FUNCTION__": cannot open file %s", ppszFiles[0]);