summaryrefslogtreecommitdiff
path: root/src/core/stdfile
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 /src/core/stdfile
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 'src/core/stdfile')
-rw-r--r--src/core/stdfile/src/file.cpp14
-rw-r--r--src/core/stdfile/src/fileexistsdlg.cpp16
-rw-r--r--src/core/stdfile/src/fileopts.cpp28
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp20
-rw-r--r--src/core/stdfile/src/filesenddlg.cpp6
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp24
6 files changed, 54 insertions, 54 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 2e6409bbfd..a9f28f51d9 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -164,11 +164,11 @@ void GetSensiblyFormattedSize(__int64 size, TCHAR *szOut, int cchOut, int unitsO
*unitsUsed = unitsOverride;
switch (unitsOverride) {
- case UNITS_BYTES: mir_sntprintf(szOut, cchOut, _T("%u%s%s"), (int)size, appendUnits ? _T(" ") : _T(""), appendUnits ? TranslateT("bytes") : _T("")); break;
- case UNITS_KBPOINT1: mir_sntprintf(szOut, cchOut, _T("%.1lf%s"), size / 1024.0, appendUnits ? _T(" KB") : _T("")); break;
- case UNITS_KBPOINT0: mir_sntprintf(szOut, cchOut, _T("%u%s"), (int)(size / 1024), appendUnits ? _T(" KB") : _T("")); break;
- case UNITS_GBPOINT3: mir_sntprintf(szOut, cchOut, _T("%.3f%s"), (size >> 20) / 1024.0, appendUnits ? _T(" GB") : _T("")); break;
- default: mir_sntprintf(szOut, cchOut, _T("%.2lf%s"), size / 1048576.0, appendUnits ? _T(" MB") : _T("")); break;
+ case UNITS_BYTES: mir_sntprintf(szOut, cchOut, L"%u%s%s", (int)size, appendUnits ? L" " : L"", appendUnits ? TranslateT("bytes") : L""); break;
+ case UNITS_KBPOINT1: mir_sntprintf(szOut, cchOut, L"%.1lf%s", size / 1024.0, appendUnits ? L" KB" : L""); break;
+ case UNITS_KBPOINT0: mir_sntprintf(szOut, cchOut, L"%u%s", (int)(size / 1024), appendUnits ? L" KB" : L""); break;
+ case UNITS_GBPOINT3: mir_sntprintf(szOut, cchOut, L"%.3f%s", (size >> 20) / 1024.0, appendUnits ? L" GB" : L""); break;
+ default: mir_sntprintf(szOut, cchOut, L"%.2lf%s", size / 1048576.0, appendUnits ? L" MB" : L""); break;
}
}
@@ -338,7 +338,7 @@ INT_PTR openContRecDir(WPARAM hContact, LPARAM)
{
TCHAR szContRecDir[MAX_PATH];
GetContactReceivedFilesDir(hContact, szContRecDir, _countof(szContRecDir), TRUE);
- ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
+ ShellExecute(0, L"open", szContRecDir, 0, 0, SW_SHOW);
return 0;
}
@@ -346,7 +346,7 @@ INT_PTR openRecDir(WPARAM, LPARAM)
{
TCHAR szContRecDir[MAX_PATH];
GetReceivedFilesDir(szContRecDir, _countof(szContRecDir));
- ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
+ ShellExecute(0, L"open", szContRecDir, 0, 0, SW_SHOW);
return 0;
}
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp
index 14561bde0e..a5243ee528 100644
--- a/src/core/stdfile/src/fileexistsdlg.cpp
+++ b/src/core/stdfile/src/fileexistsdlg.cpp
@@ -151,7 +151,7 @@ void __cdecl LoadIconsAndTypesThread(void* param)
if (pszExtension)
mir_tstrncpy(szExtension, pszExtension + 1, _countof(szExtension));
else {
- pszExtension = _T(".");
+ pszExtension = L".";
szExtension[0] = '\0';
}
CharUpper(szExtension);
@@ -161,15 +161,15 @@ void __cdecl LoadIconsAndTypesThread(void* param)
SetDlgItemText(info->hwndDlg, IDC_NEWTYPE, fileInfo.szTypeName);
SendDlgItemMessage(info->hwndDlg, IDC_EXISTINGICON, STM_SETICON, (WPARAM)fileInfo.hIcon, 0);
szIconFile[0] = '\0';
- if (!mir_tstrcmp(szExtension, _T("EXE")))
- SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("2"), szIconFile, _countof(szIconFile));
+ if (!mir_tstrcmp(szExtension, L"EXE"))
+ SRFile_GetRegValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons", L"2", szIconFile, _countof(szIconFile));
else {
TCHAR szTypeName[MAX_PATH];
if (SRFile_GetRegValue(HKEY_CLASSES_ROOT, pszExtension, NULL, szTypeName, _countof(szTypeName))) {
- mir_tstrcat(szTypeName, _T("\\DefaultIcon"));
+ mir_tstrcat(szTypeName, L"\\DefaultIcon");
if (SRFile_GetRegValue(HKEY_CLASSES_ROOT, szTypeName, NULL, szIconFile, _countof(szIconFile))) {
- if (_tcsstr(szIconFile, _T("%1")))
- SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("0"), szIconFile, _countof(szIconFile));
+ if (_tcsstr(szIconFile, L"%1"))
+ SRFile_GetRegValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons", L"0", szIconFile, _countof(szIconFile));
else szIconFile[0] = '\0';
}
}
@@ -288,9 +288,9 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
ofn.hwndOwner = hwndDlg;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
_tcsncpy(filter, TranslateT("All files"),_countof(filter)-1);
- mir_tstrcat(filter, _T(" (*)"));
+ mir_tstrcat(filter, L" (*)");
pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, L"*");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp
index 7251c276ae..c608f7311a 100644
--- a/src/core/stdfile/src/fileopts.cpp
+++ b/src/core/stdfile/src/fileopts.cpp
@@ -35,16 +35,16 @@ struct virusscannerinfo {
const TCHAR *szExeRegValue;
const TCHAR *szCommandLine;
} virusScanners[] = {
- {_T("Network Associates/McAfee VirusScan"), _T("SOFTWARE\\McAfee\\VirusScan"), _T("Scan32EXE"), _T("\"%s\" %%f /nosplash /comp /autoscan /autoexit /noboot")},
- {_T("Dr Solomon's VirusScan (Network Associates)"), _T("SOFTWARE\\Network Associates\\TVD\\VirusScan\\AVConsol\\General"), _T("szScannerExe"), _T("\"%s\" %%f /uinone /noboot /comp /prompt /autoexit")},
- {_T("Norton AntiVirus"), _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Navw32.exe"), NULL, _T("\"%s\" %%f /b- /m- /s+ /noresults")},
- {_T("Computer Associates/Inoculate IT"), _T("Software\\Antivirus"), _T("ImageFilename"), _T("\"%s\" %%f /display = progress /exit")},
- {_T("Computer Associates eTrust"), _T("SOFTWARE\\ComputerAssociates\\Anti-Virus\\Resident"), _T("VetPath"), _T("\"%s\" %%f /display = progress /exit")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\Components\\101"), _T("EXEName"), _T("\"%s\" /S /Q %%f")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\SetupFolders"), _T("KAV8"), _T("\"%savp.exe\" SCAN %%f")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\SetupFolders"), _T("KAV9"), _T("\"%savp.exe\" SCAN %%f")},
- {_T("AntiVir PersonalEdition Classic"), _T("SOFTWARE\\Avira\\AntiVir PersonalEdition Classic"), _T("Path"), _T("\"%savscan.exe\" /GUIMODE = 2 /PATH = \"%%f\"")},
- {_T("ESET NOD32 Antivirus"), _T("SOFTWARE\\ESET\\ESET Security\\CurrentVersion\\Info"), _T("InstallDir"), _T("\"%secls.exe\" /log-all /aind /no-boots /adware /sfx /unsafe /unwanted /heur /adv-heur /action = clean \"%%f\"")},
+ {L"Network Associates/McAfee VirusScan", L"SOFTWARE\\McAfee\\VirusScan", L"Scan32EXE", L"\"%s\" %%f /nosplash /comp /autoscan /autoexit /noboot"},
+ {L"Dr Solomon's VirusScan (Network Associates)", L"SOFTWARE\\Network Associates\\TVD\\VirusScan\\AVConsol\\General", L"szScannerExe", L"\"%s\" %%f /uinone /noboot /comp /prompt /autoexit"},
+ {L"Norton AntiVirus", L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Navw32.exe", NULL, L"\"%s\" %%f /b- /m- /s+ /noresults"},
+ {L"Computer Associates/Inoculate IT", L"Software\\Antivirus", L"ImageFilename", L"\"%s\" %%f /display = progress /exit"},
+ {L"Computer Associates eTrust", L"SOFTWARE\\ComputerAssociates\\Anti-Virus\\Resident", L"VetPath", L"\"%s\" %%f /display = progress /exit"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\Components\\101", L"EXEName", L"\"%s\" /S /Q %%f"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\SetupFolders", L"KAV8", L"\"%savp.exe\" SCAN %%f"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\SetupFolders", L"KAV9", L"\"%savp.exe\" SCAN %%f"},
+ {L"AntiVir PersonalEdition Classic", L"SOFTWARE\\Avira\\AntiVir PersonalEdition Classic", L"Path", L"\"%savscan.exe\" /GUIMODE = 2 /PATH = \"%%f\""},
+ {L"ESET NOD32 Antivirus", L"SOFTWARE\\ESET\\ESET Security\\CurrentVersion\\Info", L"InstallDir", L"\"%secls.exe\" /log-all /aind /no-boots /adware /sfx /unsafe /unwanted /heur /adv-heur /action = clean \"%%f\""},
};
#define M_UPDATEENABLING (WM_USER+100)
@@ -85,7 +85,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
}
if (SendDlgItemMessageA(hwndDlg, IDC_SCANCMDLINE, CB_GETCOUNT, 0, 0) == 0) {
- int iItem = SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ int iItem = SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_ADDSTRING, 0, (LPARAM)L"");
SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_SETITEMDATA, iItem, (LPARAM)-1);
}
@@ -166,8 +166,8 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
GetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str, _countof(str));
CMString tszFilter;
- tszFilter.AppendFormat(_T("%s (*.exe)%c*.exe%c"), TranslateT("Executable files"), 0, 0);
- tszFilter.AppendFormat(_T("%s (*)%c*%c"), TranslateT("All files"), 0, 0);
+ tszFilter.AppendFormat(L"%s (*.exe)%c*.exe%c", TranslateT("Executable files"), 0, 0);
+ tszFilter.AppendFormat(L"%s (*)%c*%c", TranslateT("All files"), 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (_tcschr(str, ' ') != NULL) {
memmove(str + 1, str, ((_countof(str) - 2) * sizeof(TCHAR)));
str[0] = '"';
- mir_tstrcat(str, _T("\""));
+ mir_tstrcat(str, L"\"");
}
SetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str);
break;
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 637ab19208..3c75d282c0 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -48,7 +48,7 @@ static void GetLowestExistingDirName(const TCHAR *szTestDir, TCHAR *szExistingDi
GetCurrentDirectory(cchExistingDir, szExistingDir);
}
-static const TCHAR InvalidFilenameChars[] = _T("\\/:*?\"<>|");
+static const TCHAR InvalidFilenameChars[] = L"\\/:*?\"<>|";
void RemoveInvalidFilenameChars(TCHAR *tszString)
{
size_t i;
@@ -58,7 +58,7 @@ void RemoveInvalidFilenameChars(TCHAR *tszString)
}
}
-static const TCHAR InvalidPathChars[] = _T("*?\"<>|"); // "\/:" are excluded as they are allowed in file path
+static const TCHAR InvalidPathChars[] = L"*?\"<>|"; // "\/:" are excluded as they are allowed in file path
void RemoveInvalidPathChars(TCHAR *tszString)
{
if (tszString)
@@ -94,7 +94,7 @@ int BrowseForFolder(HWND hwnd, TCHAR *szPath)
LPITEMIDLIST pidlResult = SHBrowseForFolder(&bi);
if (pidlResult) {
SHGetPathFromIDList(pidlResult, szPath);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
CoTaskMemFree(pidlResult);
}
return pidlResult != NULL;
@@ -118,7 +118,7 @@ static void patchDir(TCHAR *str, size_t strSize)
size_t len = mir_tstrlen(str);
if (len + 1 < strSize && str[len - 1] != '\\')
- mir_tstrcpy(str + len, _T("\\"));
+ mir_tstrcpy(str + len, L"\\");
}
void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
@@ -129,17 +129,17 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO
if (tszRecvPath)
_tcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE);
else
- mir_sntprintf(tszTemp, _T("%%mydocuments%%\\%s\\%%userid%%"), TranslateT("My received files"));
+ mir_sntprintf(tszTemp, L"%%mydocuments%%\\%s\\%%userid%%", TranslateT("My received files"));
if (hContact) {
hContact = db_mc_tryMeta(hContact);
REPLACEVARSARRAY rvaVarsToReplace[4];
- rvaVarsToReplace[0].key.t = _T("nick");
+ rvaVarsToReplace[0].key.t = L"nick";
rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0));
- rvaVarsToReplace[1].key.t = _T("userid");
+ rvaVarsToReplace[1].key.t = L"userid";
rvaVarsToReplace[1].value.t = GetContactID(hContact);
- rvaVarsToReplace[2].key.t = _T("proto");
+ rvaVarsToReplace[2].key.t = L"proto";
rvaVarsToReplace[2].value.t = mir_a2t(GetContactProto(hContact));
rvaVarsToReplace[3].key.t = NULL;
rvaVarsToReplace[3].value.t = NULL;
@@ -169,7 +169,7 @@ void GetReceivedFilesDir(TCHAR *szDir, int cchDir)
if (tszRecvPath)
_tcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE);
else
- mir_sntprintf(tszTemp, _T("%%mydocuments%%\\%s\\%%userid%%"), TranslateT("My received files"));
+ mir_sntprintf(tszTemp, L"%%mydocuments%%\\%s\\%%userid%%", TranslateT("My received files"));
patchDir(tszTemp, _countof(tszTemp));
RemoveInvalidPathChars(tszTemp);
@@ -244,7 +244,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
else DestroyWindow(hwndDlg);
TCHAR datetimestr[64];
- TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("t d"), datetimestr, _countof(datetimestr), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, L"t d", datetimestr, _countof(datetimestr), 0);
SetDlgItemText(hwndDlg, IDC_DATE, datetimestr);
ptrT info(Contact_GetInfo(CNF_UNIQUEID, dat->hContact));
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp
index 54c6a9a786..318dcab932 100644
--- a/src/core/stdfile/src/filesenddlg.cpp
+++ b/src/core/stdfile/src/filesenddlg.cpp
@@ -49,7 +49,7 @@ static void SetFileListAndSizeControls(HWND hwndDlg, FileDlgData *dat)
if (i > 1) {
TCHAR szFormat[32];
if (fileCount && dirCount) {
- mir_sntprintf(szFormat, _T("%s, %s"), TranslateTS(fileCount == 1 ? _T("%d file") : _T("%d files")), TranslateTS(dirCount == 1 ? _T("%d directory") : _T("%d directories")));
+ mir_sntprintf(szFormat, L"%s, %s", TranslateTS(fileCount == 1 ? L"%d file" : L"%d files"), TranslateTS(dirCount == 1 ? L"%d directory" : L"%d directories"));
mir_sntprintf(str, szFormat, fileCount, dirCount);
}
else if (fileCount) {
@@ -147,9 +147,9 @@ void __cdecl ChooseFilesThread(void* param)
TCHAR filter[128];
mir_tstrcpy(filter, TranslateT("All files"));
- mir_tstrcat(filter, _T(" (*)"));
+ mir_tstrcat(filter, L" (*)");
TCHAR *pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, L"*");
pfilter = filter + mir_tstrlen(filter) + 1;
pfilter[0] = '\0';
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index e8f4d1212b..036e75068e 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -99,13 +99,13 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info)
if (dbv.ptszVal[0]) {
STARTUPINFO si = { 0 };
si.cb = sizeof(si);
- TCHAR *pszReplace = _tcsstr(dbv.ptszVal, _T("%f"));
+ TCHAR *pszReplace = _tcsstr(dbv.ptszVal, L"%f");
TCHAR szCmdLine[768];
if (pszReplace) {
if (info->szFile[mir_tstrlen(info->szFile) - 1] == '\\')
info->szFile[mir_tstrlen(info->szFile) - 1] = '\0';
*pszReplace = 0;
- mir_sntprintf(szCmdLine, _T("%s\"%s\"%s"), dbv.ptszVal, info->szFile, pszReplace + 2);
+ mir_sntprintf(szCmdLine, L"%s\"%s\"%s", dbv.ptszVal, info->szFile, pszReplace + 2);
} else
_tcsncpy_s(szCmdLine, dbv.ptszVal, _TRUNCATE);
@@ -139,7 +139,7 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE
if (dat->hIcon) DestroyIcon(dat->hIcon); dat->hIcon = NULL;
if (fn && (fts->totalFiles > 1)) {
- mir_sntprintf(msg, _T("%s: %s (%d %s %d)"),
+ mir_sntprintf(msg, L"%s: %s (%d %s %d)",
pcli->pfnGetContactDisplayName(fts->hContact, 0),
fn, fts->currentFileNumber + 1, TranslateT("of"), fts->totalFiles);
@@ -147,7 +147,7 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE
dat->hIcon = shfi.hIcon;
}
else if (fn) {
- mir_sntprintf(msg, _T("%s: %s"), pcli->pfnGetContactDisplayName(fts->hContact, 0), fn);
+ mir_sntprintf(msg, L"%s: %s", pcli->pfnGetContactDisplayName(fts->hContact, 0), fn);
SHGetFileInfo(fn, FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON);
dat->hIcon = shfi.hIcon;
@@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
SendDlgItemMessage(hwndDlg, IDC_CONTACTNAME, WM_SETFONT, (WPARAM)hFont, 0);
SHFILEINFO shfi = { 0 };
- SHGetFileInfo(_T(""), FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON);
+ SHGetFileInfo(L"", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON);
dat->hIconFolder = shfi.hIcon;
}
dat->hIcon = NULL;
@@ -308,7 +308,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
GetSensiblyFormattedSize((dat->bytesRecvedHistory[0] - dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1]) / dat->bytesRecvedHistorySize, szSpeed, _countof(szSpeed), 0, 1, NULL);
if (dat->bytesRecvedHistory[0] == dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1])
- mir_tstrcpy(szTime, _T("??:??:??"));
+ mir_tstrcpy(szTime, L"??:??:??");
else {
li.QuadPart = BIGI(10000000)*(dat->transferStatus.currentFileSize - dat->transferStatus.currentFileProgress)*dat->bytesRecvedHistorySize / (dat->bytesRecvedHistory[0] - dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1]);
ft.dwHighDateTime = li.HighPart; ft.dwLowDateTime = li.LowPart;
@@ -322,7 +322,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &st, NULL, szTime, _countof(szTime));
}
- mir_sntprintf(szDisplay, _T("%s/%s (%s %s)"), szSpeed, TranslateT("sec"), szTime, TranslateT("remaining"));
+ mir_sntprintf(szDisplay, L"%s/%s (%s %s)", szSpeed, TranslateT("sec"), szTime, TranslateT("remaining"));
SetDlgItemText(hwndDlg, IDC_ALLSPEED, szDisplay);
}
break;
@@ -378,7 +378,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
TCHAR *p = _tcsrchr(path, '\\'); if (p) *p = 0;
}
- if (path) ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
+ if (path) ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW);
}
break;
@@ -446,7 +446,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
*p = 0;
}
- if (path) ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
+ if (path) ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW);
}
else if (ret && CheckVirusScanned(hwndDlg, dat, ret))
ShellExecute(NULL, NULL, files[ret - 10], NULL, NULL, SW_SHOW);
@@ -483,7 +483,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
size_t size = (pszExtension - szOriginalFilename) + 21 + mir_tstrlen(pszExtension);
pfr->szFilename = (TCHAR*)mir_alloc(sizeof(TCHAR)*size);
for (int i = 1;; i++) {
- mir_sntprintf((TCHAR*)pfr->szFilename, size, _T("%.*s (%u)%s"), pszExtension - szOriginalFilename, szOriginalFilename, i, pszExtension);
+ mir_sntprintf((TCHAR*)pfr->szFilename, size, L"%.*s (%u)%s", pszExtension - szOriginalFilename, szOriginalFilename, i, pszExtension);
if (_taccess(pfr->szFilename, 0) != 0)
break;
}
@@ -596,14 +596,14 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
const unsigned long nextPos = fts->totalBytes ? (BIGI(100) * fts->totalProgress / fts->totalBytes) : 0;
if (lastPos != nextPos || firstTime) {
SendDlgItemMessage(hwndDlg, IDC_ALLFILESPROGRESS, PBM_SETPOS, nextPos, 0);
- mir_sntprintf(str, _T("%u%%"), nextPos);
+ mir_sntprintf(str, L"%u%%", nextPos);
SetDlgItemText(hwndDlg, IDC_ALLPRECENTS, str);
}
int units;
GetSensiblyFormattedSize(fts->totalBytes, szSizeTotal, _countof(szSizeTotal), 0, 1, &units);
GetSensiblyFormattedSize(fts->totalProgress, szSizeDone, _countof(szSizeDone), units, 0, NULL);
- mir_sntprintf(str, _T("%s/%s"), szSizeDone, szSizeTotal);
+ mir_sntprintf(str, L"%s/%s", szSizeDone, szSizeTotal);
str2[0] = 0;
GetDlgItemText(hwndDlg, IDC_ALLTRANSFERRED, str2, _countof(str2));
if (mir_tstrcmp(str, str2))