summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FTPFileYM')
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp6
-rw-r--r--plugins/FTPFileYM/src/dialog.h8
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp14
-rw-r--r--plugins/FTPFileYM/src/job_delete.cpp2
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp20
-rw-r--r--plugins/FTPFileYM/src/job_generic.h14
-rw-r--r--plugins/FTPFileYM/src/job_packer.cpp18
-rw-r--r--plugins/FTPFileYM/src/job_packer.h2
-rw-r--r--plugins/FTPFileYM/src/job_upload.cpp10
-rw-r--r--plugins/FTPFileYM/src/manager.cpp2
-rw-r--r--plugins/FTPFileYM/src/manager.h2
-rw-r--r--plugins/FTPFileYM/src/mir_db.cpp6
-rw-r--r--plugins/FTPFileYM/src/mir_db.h6
-rw-r--r--plugins/FTPFileYM/src/options.cpp8
-rw-r--r--plugins/FTPFileYM/src/serverlist.h2
-rw-r--r--plugins/FTPFileYM/src/utils.cpp20
-rw-r--r--plugins/FTPFileYM/src/utils.h10
17 files changed, 75 insertions, 75 deletions
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 1706832239..39192e6583 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -79,7 +79,7 @@ UploadDialog::Tab::Tab(GenericJob *Job) :
m_stzComplet[0] = 0;
m_stzRemain[0] = 0;
- TCHAR buff[256];
+ wchar_t buff[256];
TCITEM tab = { 0 };
tab.mask = TCIF_TEXT;
tab.pszText = Utils::getTextFragment(m_job->m_tszFileName, 20, buff);
@@ -130,7 +130,7 @@ void UploadDialog::Tab::select()
void UploadDialog::Tab::labelCompleted()
{
- TCHAR buff[64], buff2[256];
+ wchar_t buff[64], buff2[256];
mir_sntprintf(buff2, L"* %s", Utils::getTextFragment(m_job->m_tszFileName, 20, buff));
TCITEM tab = { 0 };
@@ -286,7 +286,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
int times[10] = { 5, 15, 30, 1 * 60, 2 * 60, 5 * 60, 10 * 60, 1 * 24 * 60, 2 * 24 * 60, 7 * 24 * 60 };
bool bChecked = (tab->m_iOptAutoDelete == -1);
- TCHAR buff[256];
+ wchar_t buff[256];
for (int i = 0; i < _countof(times); i++) {
if (i == 3 || i == 7)
diff --git a/plugins/FTPFileYM/src/dialog.h b/plugins/FTPFileYM/src/dialog.h
index 9354d45e3c..66244b7168 100644
--- a/plugins/FTPFileYM/src/dialog.h
+++ b/plugins/FTPFileYM/src/dialog.h
@@ -33,7 +33,7 @@ class UploadDialog
private:
static UploadDialog *instance;
static mir_cs mutexTabs;
- TCHAR m_tszToolTipText[1024];
+ wchar_t m_tszToolTipText[1024];
UploadDialog();
@@ -48,9 +48,9 @@ public:
bool m_bOptAutosend;
int m_iOptAutoDelete;
- TCHAR m_stzSpeed[64];
- TCHAR m_stzComplet[64];
- TCHAR m_stzRemain[64];
+ wchar_t m_stzSpeed[64];
+ wchar_t m_stzComplet[64];
+ wchar_t m_stzRemain[64];
Tab(GenericJob *Job);
~Tab();
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 3fd2de8122..c5e4d548b3 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -89,21 +89,21 @@ static void InitIcolib()
void InitMenuItems()
{
- TCHAR stzName[256];
+ wchar_t stzName[256];
CMenuItem mi;
SET_UID(mi, 0xB7132F5A, 0x65FC, 0x42C5, 0xB4, 0xCB, 0x54, 0xBC, 0xAC, 0x58, 0x34, 0xE9);
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.name.t = LPGENT("FTP File");
+ mi.name.w = LPGENW("FTP File");
hMainMenu = Menu_AddMainMenuItem(&mi);
if (opt.bUseSubmenu)
hMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.name.t = stzName;
+ mi.name.w = stzName;
mi.flags = CMIF_TCHAR | CMIF_SYSTEM;
CMenuItem mi2;
@@ -124,7 +124,7 @@ void InitMenuItems()
mi2.root = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.name.t = LPGENT("Upload file(s)");
+ mi2.name.w = LPGENW("Upload file(s)");
HGENMENU tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, mi2.position = i + UploadJob::FTP_RAWFILE);
@@ -134,7 +134,7 @@ void InitMenuItems()
mi2.root = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.name.t = LPGENT("Zip and upload file(s)");
+ mi2.name.w = LPGENW("Zip and upload file(s)");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFILE);
@@ -144,7 +144,7 @@ void InitMenuItems()
mi2.root = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.name.t = LPGENT("Zip and upload folder");
+ mi2.name.w = LPGENW("Zip and upload folder");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFOLDER);
@@ -158,7 +158,7 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.name.t = LPGENT("FTP File manager");
+ mi.name.w = LPGENW("FTP File manager");
mi.pszService = MS_FTPFILE_SHOWMANAGER;
mi.root = hMainMenu;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/FTPFileYM/src/job_delete.cpp b/plugins/FTPFileYM/src/job_delete.cpp
index 19d6aff7ad..2449d1e91a 100644
--- a/plugins/FTPFileYM/src/job_delete.cpp
+++ b/plugins/FTPFileYM/src/job_delete.cpp
@@ -89,7 +89,7 @@ void DeleteJob::run()
DBEntry::remove(m_entry->m_fileID);
}
else if (manDlg != NULL && m_treeItem) {
- TCHAR *error = mir_a2t(szError);
+ wchar_t *error = mir_a2t(szError);
mir_tstrcpy(m_treeItem->m_tszToolTip, error);
m_treeItem->setState(Manager::TreeItem::_ERROR());
FREE(error);
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp
index 92dabed7d9..9d4adf6013 100644
--- a/plugins/FTPFileYM/src/job_generic.cpp
+++ b/plugins/FTPFileYM/src/job_generic.cpp
@@ -54,7 +54,7 @@ GenericJob::~GenericJob()
int GenericJob::openFileDialog()
{
- TCHAR temp[MAX_PATH] = L"";
+ wchar_t temp[MAX_PATH] = L"";
mir_sntprintf(temp, L"%s\0*.*\0", TranslateT("All Files (*.*)"));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -85,12 +85,12 @@ int GenericJob::openFolderDialog()
void GenericJob::getFilesFromOpenDialog()
{
- TCHAR stzFile[MAX_PATH];
+ wchar_t stzFile[MAX_PATH];
size_t length = mir_tstrlen(m_tszFilePath);
if (m_tszFilePath[0] && m_tszFilePath[length + 1]) // multiple files
{
- TCHAR *ptr = m_tszFilePath + length + 1;
+ wchar_t *ptr = m_tszFilePath + length + 1;
while (ptr[0]) {
mir_sntprintf(stzFile, L"%s\\%s", m_tszFilePath, ptr);
addFile(stzFile);
@@ -102,9 +102,9 @@ void GenericJob::getFilesFromOpenDialog()
}
}
-int GenericJob::getFilesFromFolder(TCHAR *stzFolder)
+int GenericJob::getFilesFromFolder(wchar_t *stzFolder)
{
- TCHAR stzFile[MAX_PATH], stzDirSave[MAX_PATH];
+ wchar_t stzFile[MAX_PATH], stzDirSave[MAX_PATH];
GetCurrentDirectory(MAX_PATH, stzDirSave);
if (!SetCurrentDirectory(stzFolder)) {
@@ -152,7 +152,7 @@ int GenericJob::getFiles()
int GenericJob::getFiles(void **objects, int objCount, DWORD flags)
{
if (m_mode == FTP_ZIPFOLDER) {
- TCHAR *folder;
+ wchar_t *folder;
if (flags & FUPL_UNICODE)
folder = mir_u2t((wchar_t *)objects[0]);
else
@@ -164,7 +164,7 @@ int GenericJob::getFiles(void **objects, int objCount, DWORD flags)
}
else {
for (int i = 0; i < objCount; i++) {
- TCHAR *fileName;
+ wchar_t *fileName;
if (flags & FUPL_UNICODE)
fileName = mir_u2t((wchar_t *)objects[i]);
else
@@ -178,9 +178,9 @@ int GenericJob::getFiles(void **objects, int objCount, DWORD flags)
return (m_files.size() == 0) ? 0 : 1;
}
-void GenericJob::addFile(TCHAR *fileName)
+void GenericJob::addFile(wchar_t *fileName)
{
- TCHAR *buff = mir_tstrdup(fileName);
+ wchar_t *buff = mir_tstrdup(fileName);
m_files.push_back(buff);
}
@@ -215,7 +215,7 @@ bool GenericJob::isConnecting()
return (m_status == STATUS_CONNECTING || m_status == STATUS_CREATED);
}
-TCHAR *GenericJob::getStatusString()
+wchar_t *GenericJob::getStatusString()
{
switch (m_status) {
case STATUS_CANCELED: return TranslateT("CANCELED");
diff --git a/plugins/FTPFileYM/src/job_generic.h b/plugins/FTPFileYM/src/job_generic.h
index beeb1b606f..ffc370958d 100644
--- a/plugins/FTPFileYM/src/job_generic.h
+++ b/plugins/FTPFileYM/src/job_generic.h
@@ -43,8 +43,8 @@ private:
int openFileDialog();
int openFolderDialog();
void getFilesFromOpenDialog();
- int getFilesFromFolder(TCHAR *stzFolder);
- void addFile(TCHAR *fileName);
+ int getFilesFromFolder(wchar_t *stzFolder);
+ void addFile(wchar_t *fileName);
public:
enum EMode
@@ -69,15 +69,15 @@ public:
MCONTACT m_hContact;
int m_iFtpNum, m_fileID;
ServerList::FTP *m_ftp;
- TCHAR m_tszFilePath[1024];
- TCHAR m_tszFileName[64];
+ wchar_t m_tszFilePath[1024];
+ wchar_t m_tszFileName[64];
char m_szSafeFileName[64];
EMode m_mode;
EStatus m_status;
UploadDialog::Tab *m_tab;
- vector<TCHAR *> m_files;
- TCHAR* operator[] (int i) const { return m_files[i];}
+ vector<wchar_t *> m_files;
+ wchar_t* operator[] (int i) const { return m_files[i];}
GenericJob(MCONTACT hContact, int m_iFtpNum, EMode mode);
GenericJob(GenericJob *job);
@@ -93,7 +93,7 @@ public:
bool isConnecting();
bool isCanceled();
- TCHAR *getStatusString();
+ wchar_t *getStatusString();
virtual void start() = 0;
virtual void pause() = 0;
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp
index 3a6b037d5a..135b06e665 100644
--- a/plugins/FTPFileYM/src/job_packer.cpp
+++ b/plugins/FTPFileYM/src/job_packer.cpp
@@ -35,20 +35,20 @@ PackerJob::PackerJob(MCONTACT hContact, int iFtpNum, EMode mode) :
void PackerJob::getZipFilePath()
{
- TCHAR buff[256], stzFileName[256] = { 0 };
- TCHAR *pch;
+ wchar_t buff[256], stzFileName[256] = { 0 };
+ wchar_t *pch;
if (m_files.size() == 1) {
mir_tstrcpy(stzFileName, Utils::getFileNameFromPath(m_files[0]));
- pch = _tcsrchr(stzFileName, '.');
+ pch = wcsrchr(stzFileName, '.');
if (pch) *pch = 0;
}
else {
mir_tstrcpy(buff, m_files[0]);
- pch = _tcsrchr(buff, '\\');
+ pch = wcsrchr(buff, '\\');
if (pch) {
*pch = 0;
- pch = _tcsrchr(buff, '\\');
+ pch = wcsrchr(buff, '\\');
if (pch) mir_tstrcpy(stzFileName, pch + 1);
}
}
@@ -109,7 +109,7 @@ void PackerJob::pack()
{
struct _stat fileInfo;
for (UINT i = 0; i < m_files.size(); i++) {
- if (_tstat(m_files[i], &fileInfo) == 0)
+ if (_wstat(m_files[i], &fileInfo) == 0)
m_uiFileSize += (UINT64)fileInfo.st_size;
}
@@ -161,7 +161,7 @@ int PackerJob::createZipFile()
FREE(file);
if (err == ZIP_OK) {
- FILE *fin = _tfopen(m_files[i], L"rb");
+ FILE *fin = _wfopen(m_files[i], L"rb");
if (fin) {
do {
if (isCanceled()) {
@@ -209,7 +209,7 @@ Cleanup:
return result;
}
-uLong PackerJob::getFileTime(TCHAR *file, tm_zip*, uLong *dt)
+uLong PackerJob::getFileTime(wchar_t *file, tm_zip*, uLong *dt)
{
FILETIME ftLocal;
HANDLE hFind;
@@ -238,7 +238,7 @@ void PackerJob::updateStats()
double perc = m_uiFileSize ? ((double)m_uiReaded / m_uiFileSize) * 100 : 0;
mir_sntprintf(m_tab->m_stzComplet, TranslateT("%0.1f%% (%d kB/%d kB)"), perc, (int)m_uiReaded / 1024, (int)m_uiFileSize / 1024);
- TCHAR buff[256];
+ wchar_t buff[256];
long s = (m_uiFileSize - m_uiReaded) / (long)(speed * 1024);
int d = (s / 60 / 60 / 24);
int h = (s - d * 60 * 60 * 24) / 60 / 60;
diff --git a/plugins/FTPFileYM/src/job_packer.h b/plugins/FTPFileYM/src/job_packer.h
index 5cd36a0d87..14edcbeda1 100644
--- a/plugins/FTPFileYM/src/job_packer.h
+++ b/plugins/FTPFileYM/src/job_packer.h
@@ -37,7 +37,7 @@ private:
static int iRunningJobCount;
static void waitingThread(void *arg);
- static uLong getFileTime(TCHAR *file, tm_zip *tmzip, uLong *dt);
+ static uLong getFileTime(wchar_t *file, tm_zip *tmzip, uLong *dt);
void pack();
void getZipFilePath();
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp
index f4bb1b2fb3..b6c1e9a20c 100644
--- a/plugins/FTPFileYM/src/job_upload.cpp
+++ b/plugins/FTPFileYM/src/job_upload.cpp
@@ -245,8 +245,8 @@ INT_PTR CALLBACK UploadJob::DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wPa
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- TCHAR buff[256];
- TCHAR *fileName = mir_a2t((char *)lParam);
+ wchar_t buff[256];
+ wchar_t *fileName = mir_a2t((char *)lParam);
mir_sntprintf(buff, TranslateT("File exists - %s"), fileName);
SetWindowText(hwndDlg, buff);
FREE(fileName);
@@ -266,7 +266,7 @@ void UploadJob::upload()
{
refreshTab(true);
- m_fp = _tfopen(m_tszFilePath, L"rb");
+ m_fp = _wfopen(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;
@@ -277,7 +277,7 @@ void UploadJob::upload()
headerList = curl_slist_append(headerList, getChmodString());
struct _stat fileInfo;
- _tstat(m_tszFilePath, &fileInfo);
+ _wstat(m_tszFilePath, &fileInfo);
m_uiFileSize = (UINT64)fileInfo.st_size;
CURL *hCurl = curlInit(getUrlString(), headerList);
@@ -402,7 +402,7 @@ void UploadJob::updateStats()
int m = (s - d * 60 * 60 * 24 - h * 60 * 60) / 60;
s = s - (d * 24 * 60 * 60) - (h * 60 * 60) - (m * 60);
- TCHAR buff[256];
+ wchar_t buff[256];
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);
diff --git a/plugins/FTPFileYM/src/manager.cpp b/plugins/FTPFileYM/src/manager.cpp
index 8d68a8f1c6..d838e77884 100644
--- a/plugins/FTPFileYM/src/manager.cpp
+++ b/plugins/FTPFileYM/src/manager.cpp
@@ -377,7 +377,7 @@ INT_PTR CALLBACK Manager::ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (item) {
if (item->m_tszToolTip[0]) {
- _tcsncpy(tvInfoTip->pszText, item->m_tszToolTip, tvInfoTip->cchTextMax - 1);
+ wcsncpy(tvInfoTip->pszText, item->m_tszToolTip, tvInfoTip->cchTextMax - 1);
tvInfoTip->pszText[tvInfoTip->cchTextMax - 1] = 0;
}
}
diff --git a/plugins/FTPFileYM/src/manager.h b/plugins/FTPFileYM/src/manager.h
index 088ddf0b03..52983d6f5a 100644
--- a/plugins/FTPFileYM/src/manager.h
+++ b/plugins/FTPFileYM/src/manager.h
@@ -49,7 +49,7 @@ public:
public:
HTREEITEM m_handle;
HTREEITEM m_parent;
- TCHAR m_tszToolTip[256];
+ wchar_t m_tszToolTip[256];
int m_fileID;
TreeItem(HTREEITEM _handle, HTREEITEM _parent, int _id);
diff --git a/plugins/FTPFileYM/src/mir_db.cpp b/plugins/FTPFileYM/src/mir_db.cpp
index c09b6dac51..e14e2caccc 100644
--- a/plugins/FTPFileYM/src/mir_db.cpp
+++ b/plugins/FTPFileYM/src/mir_db.cpp
@@ -46,7 +46,7 @@ int DB::setAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id,
return db_set_s(hContact, szModule, formSet, szValue);
}
-int DB::setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue)
+int DB::setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, wchar_t *stzValue)
{
char formSet[256];
mir_snprintf(formSet, szSetting, id);
@@ -94,7 +94,7 @@ int DB::getAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id,
return getAString(hContact, szModule, formSet, buff);
}
-int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff)
+int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, wchar_t *buff)
{
DBVARIANT dbv;
if (!db_get_ts(hContact, szModule, szSetting, &dbv)) {
@@ -107,7 +107,7 @@ int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buf
return 1;
}
-int DB::getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff)
+int DB::getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, wchar_t *buff)
{
char formSet[256];
mir_snprintf(formSet, szSetting, id);
diff --git a/plugins/FTPFileYM/src/mir_db.h b/plugins/FTPFileYM/src/mir_db.h
index f53e084667..750f6c6b8a 100644
--- a/plugins/FTPFileYM/src/mir_db.h
+++ b/plugins/FTPFileYM/src/mir_db.h
@@ -28,7 +28,7 @@ public:
static int setDwordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
static int setAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *szValue);
- static int setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue);
+ static int setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, wchar_t *stzValue);
static int getByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
static int getWordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
@@ -37,8 +37,8 @@ public:
// !!!!!!!!!!!!!!!!!!! dangerous as hell
static int getAString(MCONTACT hContact, char *szModule, char *szSetting, char *buff);
static int getAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *buff);
- static int getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff);
- static int getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff);
+ static int getString(MCONTACT hContact, char *szModule, char *szSetting, wchar_t *buff);
+ static int getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, wchar_t *buff);
static int deleteSettingF(MCONTACT hContact, char *szModule, char *szSetting, int id);
};
diff --git a/plugins/FTPFileYM/src/options.cpp b/plugins/FTPFileYM/src/options.cpp
index dc2942b077..fa0632194b 100644
--- a/plugins/FTPFileYM/src/options.cpp
+++ b/plugins/FTPFileYM/src/options.cpp
@@ -250,15 +250,15 @@ int Options::InitOptions(WPARAM wParam, LPARAM)
odp.position = 100000000;
odp.hInstance = hInst;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.ptszTitle = LPGENT("FTP File");
- odp.ptszGroup = LPGENT("Services");
+ odp.pwszTitle = LPGENW("FTP File");
+ odp.pwszGroup = LPGENW("Services");
- odp.ptszTab = LPGENT("Accounts");
+ odp.pwszTab = LPGENW("Accounts");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FTPFILE);
odp.pfnDlgProc = Options::DlgProcOptsAccounts;
Options_AddPage(wParam, &odp);
- odp.ptszTab = LPGENT("Advanced");
+ odp.pwszTab = LPGENW("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED);
odp.pfnDlgProc = Options::DlgProcOptsAdvanced;
Options_AddPage(wParam, &odp);
diff --git a/plugins/FTPFileYM/src/serverlist.h b/plugins/FTPFileYM/src/serverlist.h
index d542ea6c07..05b2e66724 100644
--- a/plugins/FTPFileYM/src/serverlist.h
+++ b/plugins/FTPFileYM/src/serverlist.h
@@ -40,7 +40,7 @@ public:
};
bool m_bEnabled;
- TCHAR m_stzName[64];
+ wchar_t m_stzName[64];
char m_szServer[256];
char m_szUser[64];
char m_szPass[64];
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp
index d17bb4ba6c..d15a706055 100644
--- a/plugins/FTPFileYM/src/utils.cpp
+++ b/plugins/FTPFileYM/src/utils.cpp
@@ -32,7 +32,7 @@ int Utils::getDeleteTimeMin()
return -1;
}
-int Utils::msgBox(TCHAR *stzMsg, UINT uType)
+int Utils::msgBox(wchar_t *stzMsg, UINT uType)
{
HWND hwnd = (uDlg != NULL) ? uDlg->m_hwnd : 0;
return MessageBox(hwnd, stzMsg, TranslateT("FTP File"), uType);
@@ -58,14 +58,14 @@ HANDLE Utils::getIconHandle(const char *szName)
return IcoLib_GetIconHandle(buff);
}
-TCHAR* Utils::getFileNameFromPath(TCHAR *stzPath)
+wchar_t* Utils::getFileNameFromPath(wchar_t *stzPath)
{
- TCHAR *pch = _tcsrchr(stzPath, '\\');
+ wchar_t *pch = wcsrchr(stzPath, '\\');
if (pch) return pch + 1;
else return L"file.zip";
}
-TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff)
+wchar_t* Utils::getTextFragment(wchar_t *stzText, size_t length, wchar_t *buff)
{
if (mir_tstrlen(stzText) > length) {
mir_tstrcpy(buff, stzText);
@@ -95,7 +95,7 @@ void Utils::copyToClipboard(char *szText)
const char from_chars[] = "àáâãäå¸æçèéêëìíîïðñòóôõö÷øùúûüýþÿÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß !@#$%^&=,{}[];'`";
const char to_chars[] = "abvgdeezziiklmnoprstufhccwwqyqeuaABVGDEEZZIIKLMNOPRSTUFHCCWWQYQEUA_________________";
-char* Utils::makeSafeString(TCHAR *input, char *output)
+char* Utils::makeSafeString(wchar_t *input, char *output)
{
char *buff = mir_t2a(input);
size_t length = mir_strlen(buff);
@@ -155,12 +155,12 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl
INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TCHAR *fileName = (TCHAR *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ wchar_t *fileName = (wchar_t *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- fileName = (TCHAR *)lParam;
+ fileName = (wchar_t *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)fileName);
SetDlgItemText(hwndDlg, IDC_NAME, fileName);
@@ -189,7 +189,7 @@ INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam
return FALSE;
}
-bool Utils::setFileNameDlg(TCHAR *nameBuff)
+bool Utils::setFileNameDlg(wchar_t *nameBuff)
{
if (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DLG_NAME), 0, DlgProcSetFileName, (LPARAM)nameBuff) == IDOK)
return true;
@@ -199,8 +199,8 @@ bool Utils::setFileNameDlg(TCHAR *nameBuff)
bool Utils::setFileNameDlgA(char *nameBuff)
{
- TCHAR buff[64];
- TCHAR *tmp = mir_a2t(nameBuff);
+ wchar_t buff[64];
+ wchar_t *tmp = mir_a2t(nameBuff);
mir_tstrcpy(buff, tmp);
FREE(tmp);
diff --git a/plugins/FTPFileYM/src/utils.h b/plugins/FTPFileYM/src/utils.h
index 7c83869ade..de5fd9d911 100644
--- a/plugins/FTPFileYM/src/utils.h
+++ b/plugins/FTPFileYM/src/utils.h
@@ -27,21 +27,21 @@ private:
static INT_PTR CALLBACK DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
public:
- static int msgBox(TCHAR *szMsg, UINT uType);
+ static int msgBox(wchar_t *szMsg, UINT uType);
static int msgBoxA(char *szMsg, UINT uType);
static int getDeleteTimeMin();
static HICON loadIconEx(const char *szName);
static HANDLE getIconHandle(const char *szName);
- static TCHAR *getFileNameFromPath(TCHAR *stzPath);
- static TCHAR *getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff);
- static char *makeSafeString(TCHAR *input, char *output);
+ static wchar_t *getFileNameFromPath(wchar_t *stzPath);
+ static wchar_t *getTextFragment(wchar_t *stzText, size_t length, wchar_t *buff);
+ static char *makeSafeString(wchar_t *input, char *output);
static void createFileDownloadLink(char *szUrl, char *fileName, char *buff, int buffSize);
static void copyToClipboard(char *szText);
static void curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl_slist *headerList, char *errorBuff);
- static bool setFileNameDlg(TCHAR *nameBuff);
+ static bool setFileNameDlg(wchar_t *nameBuff);
static bool setFileNameDlgA(char *nameBuff);
};