summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src
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 /plugins/FTPFileYM/src
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 'plugins/FTPFileYM/src')
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp10
-rw-r--r--plugins/FTPFileYM/src/job_packer.cpp10
-rw-r--r--plugins/FTPFileYM/src/job_upload.cpp18
-rw-r--r--plugins/FTPFileYM/src/utils.cpp4
5 files changed, 22 insertions, 22 deletions
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 3e6fc46699..1706832239 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -131,7 +131,7 @@ void UploadDialog::Tab::select()
void UploadDialog::Tab::labelCompleted()
{
TCHAR buff[64], buff2[256];
- mir_sntprintf(buff2, _T("* %s"), Utils::getTextFragment(m_job->m_tszFileName, 20, buff));
+ mir_sntprintf(buff2, L"* %s", Utils::getTextFragment(m_job->m_tszFileName, 20, buff));
TCITEM tab = { 0 };
tab.mask = TCIF_TEXT;
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp
index f3cab81cd3..92dabed7d9 100644
--- a/plugins/FTPFileYM/src/job_generic.cpp
+++ b/plugins/FTPFileYM/src/job_generic.cpp
@@ -54,8 +54,8 @@ GenericJob::~GenericJob()
int GenericJob::openFileDialog()
{
- TCHAR temp[MAX_PATH] = _T("");
- mir_sntprintf(temp, _T("%s\0*.*\0"), TranslateT("All Files (*.*)"));
+ TCHAR temp[MAX_PATH] = L"";
+ mir_sntprintf(temp, L"%s\0*.*\0", TranslateT("All Files (*.*)"));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
@@ -92,7 +92,7 @@ void GenericJob::getFilesFromOpenDialog()
{
TCHAR *ptr = m_tszFilePath + length + 1;
while (ptr[0]) {
- mir_sntprintf(stzFile, _T("%s\\%s"), m_tszFilePath, ptr);
+ mir_sntprintf(stzFile, L"%s\\%s", m_tszFilePath, ptr);
addFile(stzFile);
ptr += mir_tstrlen(ptr) + 1;
}
@@ -113,10 +113,10 @@ int GenericJob::getFilesFromFolder(TCHAR *stzFolder)
}
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.*", &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- mir_sntprintf(stzFile, _T("%s\\%s"), stzFolder, ffd.cFileName);
+ mir_sntprintf(stzFile, L"%s\\%s", stzFolder, ffd.cFileName);
addFile(stzFile);
}
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp
index 7d98a18fbd..3a6b037d5a 100644
--- a/plugins/FTPFileYM/src/job_packer.cpp
+++ b/plugins/FTPFileYM/src/job_packer.cpp
@@ -54,11 +54,11 @@ void PackerJob::getZipFilePath()
}
if (stzFileName[0] == '\0')
- mir_tstrcpy(stzFileName, _T("archive"));
+ mir_tstrcpy(stzFileName, L"archive");
GetTempPath(_countof(buff), buff);
- mir_sntprintf(m_tszFilePath, _T("%s%s.zip"), buff, stzFileName);
+ mir_sntprintf(m_tszFilePath, L"%s%s.zip", buff, stzFileName);
mir_tstrcpy(m_tszFileName, Utils::getFileNameFromPath(m_tszFilePath));
if (opt.bSetZipName)
@@ -161,7 +161,7 @@ int PackerJob::createZipFile()
FREE(file);
if (err == ZIP_OK) {
- FILE *fin = _tfopen(m_files[i], _T("rb"));
+ FILE *fin = _tfopen(m_files[i], L"rb");
if (fin) {
do {
if (isCanceled()) {
@@ -245,8 +245,8 @@ void PackerJob::updateStats()
int m = (s - d * 60 * 60 * 24 - h * 60 * 60) / 60;
s = s - (d * 24 * 60 * 60) - (h * 60 * 60) - (m * 60);
- if (d > 0) mir_sntprintf(buff, _T("%dd %02d:%02d:%02d"), d, h, m, s);
- else mir_sntprintf(buff, _T("%02d:%02d:%02d"), h, m, s);
+ if (d > 0) mir_sntprintf(buff, L"%dd %02d:%02d:%02d", d, h, m, s);
+ else mir_sntprintf(buff, L"%02d:%02d:%02d", h, m, s);
mir_sntprintf(m_tab->m_stzRemain, TranslateT("%s (%d kB/%d kB)"), buff, (m_uiFileSize - m_uiReaded) / 1024, m_uiFileSize / 1024);
refreshTab(false);
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp
index cc21b299cc..f4bb1b2fb3 100644
--- a/plugins/FTPFileYM/src/job_upload.cpp
+++ b/plugins/FTPFileYM/src/job_upload.cpp
@@ -266,7 +266,7 @@ void UploadJob::upload()
{
refreshTab(true);
- m_fp = _tfopen(m_tszFilePath, _T("rb"));
+ m_fp = _tfopen(m_tszFilePath, L"rb");
if (m_fp == NULL) {
Utils::msgBox(TranslateT("Error occurred when opening local file.\nAborting file upload..."), MB_OK | MB_ICONERROR);
return;
@@ -391,10 +391,10 @@ void UploadJob::updateStats()
m_avgSpeed /= _countof(m_lastSpeed) + 1;
m_lastSpeed[0] = speed;
- mir_sntprintf(m_tab->m_stzSpeed, _T("%0.1f kB/s"), m_avgSpeed);
+ mir_sntprintf(m_tab->m_stzSpeed, L"%0.1f kB/s", m_avgSpeed);
double perc = m_uiFileSize ? ((double)m_uiTotalSent / m_uiFileSize) * 100 : 0;
- mir_sntprintf(m_tab->m_stzComplet, _T("%0.1f%% (%d kB/%d kB)"), perc, (int)m_uiTotalSent / 1024, (int)m_uiFileSize / 1024);
+ mir_sntprintf(m_tab->m_stzComplet, L"%0.1f%% (%d kB/%d kB)", perc, (int)m_uiTotalSent / 1024, (int)m_uiFileSize / 1024);
long s = (m_uiFileSize - m_uiTotalSent) / (long)(m_avgSpeed * 1024);
int d = (s / 60 / 60 / 24);
@@ -403,9 +403,9 @@ void UploadJob::updateStats()
s = s - (d * 24 * 60 * 60) - (h * 60 * 60) - (m * 60);
TCHAR buff[256];
- if (d > 0) mir_sntprintf(buff, _T("%dd %02d:%02d:%02d"), d, h, m, s);
- else mir_sntprintf(buff, _T("%02d:%02d:%02d"), h, m, s);
- mir_sntprintf(m_tab->m_stzRemain, _T("%s (%d kB/%d kB)"), buff, (m_uiFileSize - m_uiTotalSent) / 1024, m_uiFileSize / 1024);
+ if (d > 0) mir_sntprintf(buff, L"%dd %02d:%02d:%02d", d, h, m, s);
+ else mir_sntprintf(buff, L"%02d:%02d:%02d", h, m, s);
+ mir_sntprintf(m_tab->m_stzRemain, L"%s (%d kB/%d kB)", buff, (m_uiFileSize - m_uiTotalSent) / 1024, m_uiFileSize / 1024);
refreshTab(false);
}
@@ -449,9 +449,9 @@ void UploadJob::refreshTab(bool bTabChanged)
}
if (isCompleted()) {
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_SPEED, _T(""));
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_COMPLETED, _T(""));
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_REMAIN, _T(""));
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_SPEED, L"");
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_COMPLETED, L"");
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_REMAIN, L"");
SetDlgItemTextA(uDlg->m_hwnd, IDC_ED_URL, m_szFileLink);
SendDlgItemMessage(uDlg->m_hwnd, IDC_PB_UPLOAD, PBM_SETRANGE32, 0, (LPARAM)100);
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp
index 896445784c..d17bb4ba6c 100644
--- a/plugins/FTPFileYM/src/utils.cpp
+++ b/plugins/FTPFileYM/src/utils.cpp
@@ -62,7 +62,7 @@ TCHAR* Utils::getFileNameFromPath(TCHAR *stzPath)
{
TCHAR *pch = _tcsrchr(stzPath, '\\');
if (pch) return pch + 1;
- else return _T("file.zip");
+ else return L"file.zip";
}
TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff)
@@ -70,7 +70,7 @@ TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff)
if (mir_tstrlen(stzText) > length) {
mir_tstrcpy(buff, stzText);
buff[length - 1] = 0;
- mir_tstrcat(buff, _T("..."));
+ mir_tstrcat(buff, L"...");
return buff;
}