From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/BasicHistory.cpp | 6 +- plugins/BasicHistory/src/BinaryExport.h | 2 +- plugins/BasicHistory/src/DatExport.h | 2 +- plugins/BasicHistory/src/EventList.cpp | 4 +- plugins/BasicHistory/src/ExportManager.cpp | 14 +-- plugins/BasicHistory/src/HistoryWindow.cpp | 32 +++--- plugins/BasicHistory/src/Options.cpp | 98 +++++++++--------- plugins/BasicHistory/src/Options.h | 4 +- plugins/BasicHistory/src/PlainHtmlExport.cpp | 78 +++++++------- plugins/BasicHistory/src/PlainHtmlExport.h | 2 +- plugins/BasicHistory/src/RichHtmlExport.cpp | 146 +++++++++++++-------------- plugins/BasicHistory/src/RichHtmlExport.h | 2 +- plugins/BasicHistory/src/Scheduler.cpp | 20 ++-- plugins/BasicHistory/src/TxtExport.cpp | 14 +-- plugins/BasicHistory/src/TxtExport.h | 2 +- 15 files changed, 213 insertions(+), 213 deletions(-) (limited to 'plugins/BasicHistory') diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index ade10d4592..512c21ee8c 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -207,12 +207,12 @@ int ModulesLoaded(WPARAM, LPARAM) TCHAR ftpExe[MAX_PATH]; if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, ftpExe))) { - _tcscat_s(ftpExe, _T("\\WinSCP\\WinSCP.exe")); + _tcscat_s(ftpExe, L"\\WinSCP\\WinSCP.exe"); DWORD atr = GetFileAttributes(ftpExe); if (atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY) { #ifdef _WIN64 if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILESX86, NULL, SHGFP_TYPE_CURRENT, ftpExe))) { - _tcscat_s(ftpExe, _T("\\WinSCP\\WinSCP.exe")); + _tcscat_s(ftpExe, L"\\WinSCP\\WinSCP.exe"); atr = GetFileAttributes(ftpExe); if (!(atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY)) Options::instance->ftpExePathDef = ftpExe; @@ -222,7 +222,7 @@ int ModulesLoaded(WPARAM, LPARAM) else Options::instance->ftpExePathDef = ftpExe; } - TCHAR *log = _T("%miranda_logpath%\\BasicHistory\\ftplog.txt"); + TCHAR *log = L"%miranda_logpath%\\BasicHistory\\ftplog.txt"; TCHAR *logAbsolute = Utils_ReplaceVarsT(log); Options::instance->ftpLogPath = logAbsolute; mir_free(logAbsolute); diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 974ac83b7b..94d92c5f1d 100644 --- a/plugins/BasicHistory/src/BinaryExport.h +++ b/plugins/BasicHistory/src/BinaryExport.h @@ -27,7 +27,7 @@ class BinaryExport : public: virtual const TCHAR* GetExt() { - return _T("bin"); + return L"bin"; } virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding); diff --git a/plugins/BasicHistory/src/DatExport.h b/plugins/BasicHistory/src/DatExport.h index 745626d02b..efe071c0ac 100644 --- a/plugins/BasicHistory/src/DatExport.h +++ b/plugins/BasicHistory/src/DatExport.h @@ -27,7 +27,7 @@ class DatExport : public: virtual const TCHAR* GetExt() { - return _T("dat"); + return L"dat"; } virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding); diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 22c9122f11..c2ced6267e 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -366,7 +366,7 @@ void HistoryEventList::AddGroup(const EventIndex& ev) TCHAR eventText[256]; int i; eventText[0] = 0; - TimeZone_PrintTimeStamp(NULL, data.timestamp, _T("d t"), eventText, 64, 0); + TimeZone_PrintTimeStamp(NULL, data.timestamp, L"d t", eventText, 64, 0); std::wstring time = eventText; std::wstring user; if (data.isMe) @@ -600,7 +600,7 @@ void HistoryEventList::AddImporter(MCONTACT hContact, IImport::ImportType type, mir_cslock lck(csEventList); TCHAR buf[32]; - mir_sntprintf(buf, _T("%016llx"), (unsigned long long int)hContact); + mir_sntprintf(buf, L"%016llx", (unsigned long long int)hContact); ImportDiscData data; data.file = m_contactFileDir + buf; data.type = type; diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 35aa7045e6..d783fde17f 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -43,12 +43,12 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) extUpper[0] = std::toupper(ext[0], loc); mir_sntprintf(filter, TranslateT("%s Files (*.%s)"), extUpper, ext); size_t len = mir_tstrlen(filter) + 1; - mir_sntprintf(filter + len, _countof(filter) - len, _T("*.%s"), ext); + mir_sntprintf(filter + len, _countof(filter) - len, L"*.%s", ext); len += mir_tstrlen(filter + len); filter[++len] = 0; TCHAR stzFilePath[1024]; _tcscpy_s(stzFilePath, TranslateT("History")); - _tcscat_s(stzFilePath, _T(".")); + _tcscat_s(stzFilePath, L"."); _tcscat_s(stzFilePath, ext); len = mir_tstrlen(stzFilePath) + 1; stzFilePath[len] = 0; @@ -77,7 +77,7 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) std::wstring ReplaceExt(const std::wstring& file, const TCHAR* ext) { - size_t pos = file.find(_T("")); + size_t pos = file.find(L""); if (pos < file.length()) { std::wstring fileName = file.substr(0, pos); fileName += ext; @@ -312,12 +312,12 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst if (GetEventData(hDbEvent, data)) { lastMe = data.isMe; - TCHAR* formatDate = Options::instance->messagesShowSec ? _T("d s") : _T("d t"); - TCHAR* longFormatDate = Options::instance->messagesShowSec ? _T("d s") : _T("d t"); + TCHAR* formatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; + TCHAR* longFormatDate = Options::instance->messagesShowSec ? L"d s" : L"d t"; if (!Options::instance->messagesShowDate) { if (isFirst) { isFirst = false; - formatDate = Options::instance->messagesShowSec ? _T("s") : _T("t"); + formatDate = Options::instance->messagesShowSec ? L"s" : L"t"; time_t tt = data.timestamp; localtime_s(&lastTime, &tt); } @@ -326,7 +326,7 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst tm t; localtime_s(&t, &tt); if (lastTime.tm_yday == t.tm_yday && lastTime.tm_year == t.tm_year) - formatDate = Options::instance->messagesShowSec ? _T("s") : _T("t"); + formatDate = Options::instance->messagesShowSec ? L"s" : L"t"; } } diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 8cc82337da..ecfe7e8e2b 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1043,7 +1043,7 @@ void HistoryWindow::Initialise() LVCOLUMN col = { 0 }; col.mask = LVCF_WIDTH | LVCF_TEXT; col.cx = 470; - col.pszText = _T(""); + col.pszText = L""; ListView_InsertColumn(listWindow, 0, &col); ListView_SetColumnWidth(listWindow, 0, LVSCW_AUTOSIZE_USEHEADER); ListView_SetExtendedListViewStyleEx(listWindow, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT); @@ -1233,13 +1233,13 @@ void HistoryWindow::AddGroup(bool, const std::wstring &time, const std::wstring if (Options::instance->groupShowName) { if (msg[0] != 0) - _tcscat_s(msg, _T(" ")); + _tcscat_s(msg, L" "); _tcscat_s(msg, user.c_str()); } if (Options::instance->groupShowMessage) { if (msg[0] != 0) - _tcscat_s(msg, _T(" ")); + _tcscat_s(msg, L" "); _tcscat_s(msg, eventText.c_str()); } @@ -1289,7 +1289,7 @@ void SetFontFromOptions(ITextFont *TextFont, int caps, Options::Fonts fontId) void HistoryWindow::SelectEventGroup(int sel) { - SetWindowText(editWindow, _T("")); + SetWindowText(editWindow, L""); currentGroup.clear(); selected = sel; if (sel < 0 || sel >= (int)m_eventList.size()) @@ -1360,11 +1360,11 @@ void HistoryWindow::SelectEventGroup(int sel) ImageDataObject::InsertIcon(RichEditOle, ico, backColor, 16, 16); } - TCHAR* formatDate = Options::instance->messagesShowSec ? (isUser ? _T("d s ") : _T("d s\n")) : (isUser ? _T("d t ") : _T("d t\n")); + TCHAR* formatDate = Options::instance->messagesShowSec ? (isUser ? L"d s " : L"d s\n") : (isUser ? L"d t " : L"d t\n"); if (!Options::instance->messagesShowDate) { if (isFirst) { isFirst = false; - formatDate = Options::instance->messagesShowSec ? (isUser ? _T("s ") : _T("s\n")) : (isUser ? _T("t ") : _T("t\n")); + formatDate = Options::instance->messagesShowSec ? (isUser ? L"s " : L"s\n") : (isUser ? L"t " : L"t\n"); time_t tt = data.timestamp; localtime_s(&lastTime, &tt); } @@ -1373,7 +1373,7 @@ void HistoryWindow::SelectEventGroup(int sel) tm t; localtime_s(&t, &tt); if (lastTime.tm_yday == t.tm_yday && lastTime.tm_year == t.tm_year) - formatDate = Options::instance->messagesShowSec ? (isUser ? _T("s ") : _T("s\n")) : (isUser ? _T("t ") : _T("t\n")); + formatDate = Options::instance->messagesShowSec ? (isUser ? L"s " : L"s\n") : (isUser ? L"t " : L"t\n"); } } @@ -1387,7 +1387,7 @@ void HistoryWindow::SelectEventGroup(int sel) TextFont->Release(); if (isUser) { - mir_sntprintf(str, MAXSELECTSTR, _T("%s\n"), (lastMe) ? m_myName : m_contactName); + mir_sntprintf(str, MAXSELECTSTR, L"%s\n", (lastMe) ? m_myName : m_contactName); *strLen = (unsigned int)mir_tstrlen(str) * sizeof(TCHAR); TextSelection->SetStart(MAXLONG); TextSelection->GetFont(&TextFont); @@ -2031,18 +2031,18 @@ void HistoryWindow::FormatQuote(std::wstring "e, const MessageData &md, cons else quote += m_contactName; TCHAR str[32]; - TimeZone_PrintTimeStamp(NULL, md.timestamp, _T("d t"), str, 32, 0); - quote += _T(", "); + TimeZone_PrintTimeStamp(NULL, md.timestamp, L"d t", str, 32, 0); + quote += L", "; quote += str; - quote += _T("\n"); + quote += L"\n"; int f = 0; do { - int nf = (int)msg.find_first_of(_T("\r\n"), f); + int nf = (int)msg.find_first_of(L"\r\n", f); if (nf >= 0 && nf < (int)msg.length()) { if (nf - f >= 0) { - quote += _T(">"); + quote += L">"; quote += msg.substr(f, nf - f); - quote += _T("\n"); + quote += L"\n"; } f = nf + 1; @@ -2050,9 +2050,9 @@ void HistoryWindow::FormatQuote(std::wstring "e, const MessageData &md, cons ++f; } else if (msg.length() - f > 0) { - quote += _T(">"); + quote += L">"; quote += msg.substr(f, msg.length() - f); - quote += _T("\n"); + quote += L"\n"; f = -1; } else f = -1; diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 8a795f769e..d464b4299c 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -49,27 +49,27 @@ struct TCpTable { TCHAR *cpName; } cpTable[] = { - { CP_UTF8, _T("UTF-8") }, - { 1250, _T("windows-1250") }, - { 1251, _T("windows-1251") }, - { 1252, _T("windows-1252") }, - { 1253, _T("windows-1253") }, - { 1254, _T("windows-1254") }, - { 1255, _T("windows-1255") }, - { 1256, _T("windows-1256") }, - { 1257, _T("windows-1257") }, - { 1258, _T("windows-1258") }, - { 28591, _T("iso-8859-1") }, - { 28592, _T("iso-8859-2") }, - { 28593, _T("iso-8859-3") }, - { 28594, _T("iso-8859-4") }, - { 28595, _T("iso-8859-5") }, - { 28596, _T("iso-8859-6") }, - { 28597, _T("iso-8859-7") }, - { 28598, _T("iso-8859-8") }, - { 28599, _T("iso-8859-9") }, - { 28603, _T("iso-8859-13") }, - { 28605, _T("iso-8859-15") }, + { CP_UTF8, L"UTF-8" }, + { 1250, L"windows-1250" }, + { 1251, L"windows-1251" }, + { 1252, L"windows-1252" }, + { 1253, L"windows-1253" }, + { 1254, L"windows-1254" }, + { 1255, L"windows-1255" }, + { 1256, L"windows-1256" }, + { 1257, L"windows-1257" }, + { 1258, L"windows-1258" }, + { 28591, L"iso-8859-1" }, + { 28592, L"iso-8859-2" }, + { 28593, L"iso-8859-3" }, + { 28594, L"iso-8859-4" }, + { 28595, L"iso-8859-5" }, + { 28596, L"iso-8859-6" }, + { 28597, L"iso-8859-7" }, + { 28598, L"iso-8859-8" }, + { 28599, L"iso-8859-9" }, + { 28603, L"iso-8859-13" }, + { 28605, L"iso-8859-15" }, }; Options::Options() @@ -105,9 +105,9 @@ Options::Options() codepageTxt = CP_UTF8; codepageHtml1 = CP_UTF8; codepageHtml2 = CP_UTF8; - encodingTxt = _T("UTF-8"); - encodingHtml1 = _T("UTF-8"); - encodingHtml2 = _T("UTF-8"); + encodingTxt = L"UTF-8"; + encodingHtml1 = L"UTF-8"; + encodingHtml2 = L"UTF-8"; exportHtml1ShowDate = true; exportHtml2ShowDate = false; exportHtml2UseSmileys = true; @@ -182,14 +182,14 @@ struct HotkeyOptionsList { }; static FontOptionsList g_FontOptionsList[] = { - {LPGENT(">> Outgoing timestamp"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, - {LPGENT("<< Incoming timestamp"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, - {LPGENT(">> Outgoing name"), RGB(100,100,100), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, - {LPGENT("<< Incoming name"), RGB(90,160,90), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, - {LPGENT(">> Outgoing messages"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, - {LPGENT("<< Incoming messages"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, - {LPGENT("Group list"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Group list background"), FIDF_DISABLESTYLES}, - {LPGENT("Find window"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Find window background"), FIDF_DISABLESTYLES}, + {LPGENT(">> Outgoing timestamp"), RGB(0, 0, 0), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, + {LPGENT("<< Incoming timestamp"), RGB(0, 0, 0), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, + {LPGENT(">> Outgoing name"), RGB(100,100,100), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, + {LPGENT("<< Incoming name"), RGB(90,160,90), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, + {LPGENT(">> Outgoing messages"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS}, + {LPGENT("<< Incoming messages"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS}, + {LPGENT("Group list"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Group list background"), FIDF_DISABLESTYLES}, + {LPGENT("Find window"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Find window background"), FIDF_DISABLESTYLES}, }; static ColorOptionsList g_ColorOptionsList[] = { @@ -238,7 +238,7 @@ void Options::Load(void) cid.cbSize = sizeof(ColourIDT); hid.cbSize = sizeof(HOTKEYDESC); strncpy_s(fid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE); - _tcsncpy_s(fid.backgroundGroup, _T("History"), _TRUNCATE); + _tcsncpy_s(fid.backgroundGroup, L"History", _TRUNCATE); _tcsncpy_s(fid.group, LPGENT("History"), _TRUNCATE); for (int i = 0; i < g_fontsSize; ++i) { fid.order = i; @@ -369,19 +369,19 @@ void Options::Load(void) encodingTxt = encodingV.pwszVal; db_free(&encodingV); } - else encodingTxt = _T("UTF-8"); + else encodingTxt = L"UTF-8"; if (!db_get_ws(0, MODULE, "encodingHtml1", &encodingV)) { encodingHtml1 = encodingV.pwszVal; db_free(&encodingV); } - else encodingHtml1 = _T("UTF-8"); + else encodingHtml1 = L"UTF-8"; if (!db_get_ws(0, MODULE, "encodingHtml2", &encodingV)) { encodingHtml2 = encodingV.pwszVal; db_free(&encodingV); } - else encodingHtml2 = _T("UTF-8"); + else encodingHtml2 = L"UTF-8"; exportHtml1ShowDate = db_get_b(0, MODULE, "exportHtml1ShowDate", 1) ? true : false; exportHtml2ShowDate = db_get_b(0, MODULE, "exportHtml2ShowDate", 0) ? true : false; @@ -390,7 +390,7 @@ void Options::Load(void) extCssHtml2 = encodingV.pwszVal; db_free(&encodingV); } - else extCssHtml2 = _T(""); + else extCssHtml2 = L""; if (!db_get_ws(0, MODULE, "ftpLogPath", &encodingV)) { ftpLogPath = encodingV.pwszVal; @@ -722,7 +722,7 @@ void SetEventCB(HWND hwndCB, int eventId) if (selCpIdx == -1) { TCHAR buf[24]; - mir_sntprintf(buf, _T("%d"), eventId); + mir_sntprintf(buf, L"%d", eventId); ComboBox_SetText(hwndCB, buf); } else ComboBox_SetCurSel(hwndCB, selCpIdx); @@ -777,7 +777,7 @@ void ReloadEventLB(HWND hwndLB, const FilterOptions &sel) if (selCpIdx == -1) { TCHAR buf[24]; - mir_sntprintf(buf, _T("%d"), *it); + mir_sntprintf(buf, L"%d", *it); ListBox_AddString(hwndLB, buf); } else ListBox_AddString(hwndLB, TranslateTS(EventNames[selCpIdx].name)); @@ -807,11 +807,11 @@ bool OpenFileDlg(HWND hwndDlg, HWND hwndEdit, const TCHAR* defName, const TCHAR* extUpper[0] = std::toupper(ext[0], loc); mir_sntprintf(filter, TranslateT("%s Files (*.%s)"), extUpper, ext); size_t len = mir_tstrlen(filter) + 1; - mir_sntprintf(filter + len, _countof(filter) - len, _T("*.%s"), ext); + mir_sntprintf(filter + len, _countof(filter) - len, L"*.%s", ext); len += mir_tstrlen(filter + len) + 1; _tcscpy_s(filter + len, 1024 - len, TranslateT("All Files (*.*)")); len += mir_tstrlen(filter + len) + 1; - _tcscpy_s(filter + len, 1024 - len, _T("*.*")); + _tcscpy_s(filter + len, 1024 - len, L"*.*"); len += mir_tstrlen(filter + len) + 1; filter[len] = 0; TCHAR stzFilePath[1024]; @@ -1042,12 +1042,12 @@ INT_PTR CALLBACK Options::DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, break; case IDC_WINSCP_BROWSE: - if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCP), _T("WinSCP.exe"), _T("exe"), TranslateT("Browse WinSCP file"), true)) + if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCP), L"WinSCP.exe", L"exe", TranslateT("Browse WinSCP file"), true)) return TRUE; break; case IDC_WINSCPLOG_BROWSE: - if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCPLOG), _T("ftplog.txt"), _T("txt"), TranslateT("Save WinSCP log file"), false)) + if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCPLOG), L"ftplog.txt", L"txt", TranslateT("Save WinSCP log file"), false)) return TRUE; break; } @@ -1283,7 +1283,7 @@ void InitCodepageCB(HWND hwndCB, unsigned int codepage, const std::wstring& name if (selCpIdx == -1) { TCHAR buf[300]; - mir_sntprintf(buf, _T("%d;%s"), codepage, name.c_str()); + mir_sntprintf(buf, L"%d;%s", codepage, name.c_str()); ComboBox_SetText(hwndCB, buf); } else ComboBox_SetCurSel(hwndCB, selCpIdx); @@ -1298,7 +1298,7 @@ unsigned int GetCodepageCB(HWND hwndCB, bool errorReport, unsigned int, const st TCHAR text[128]; ComboBox_GetText(hwndCB, text, 128); std::wstring str = text; - name = _T(""); + name = L""; size_t pos = str.find_first_of(_T(';')); if (pos < str.length()) { text[pos] = 0; @@ -1362,7 +1362,7 @@ INT_PTR CALLBACK Options::DlgProcOptsExport(HWND hwndDlg, UINT msg, WPARAM wPara EnableWindow(GetDlgItem(hwndDlg, IDC_CSS_BROWSE), en); } else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_CSS_BROWSE) { - if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), _T(""), _T("css"), TranslateT("Browse CSS file"), true)) + if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), L"", L"css", TranslateT("Browse CSS file"), true)) return TRUE; } @@ -1403,7 +1403,7 @@ INT_PTR CALLBACK Options::DlgProcOptsExport(HWND hwndDlg, UINT msg, WPARAM wPara Edit_GetText(GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), buf, MAX_PATH); instance->extCssHtml2 = buf; } - else instance->extCssHtml2 = _T(""); + else instance->extCssHtml2 = L""; instance->codepageTxt = cp1; instance->encodingTxt = newName1; @@ -1701,7 +1701,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, TCHAR sep = _T(':'); if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, timeFormat, 10) > 0) sep = timeFormat[0]; - mir_sntprintf(timeFormat, _T("HH%cmm"), sep); + mir_sntprintf(timeFormat, L"HH%cmm", sep); } SYSTEMTIME st; @@ -1881,7 +1881,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, str = TranslateT("* Use negative values to filter younger events"); else { str = TranslateT("* Use negative values to filter younger events"); - str += _T("\n"); + str += L"\n"; str += TranslateT("** Use to insert date, to insert extension, to insert contact name"); } diff --git a/plugins/BasicHistory/src/Options.h b/plugins/BasicHistory/src/Options.h index 8fa778850e..e74c81ff33 100644 --- a/plugins/BasicHistory/src/Options.h +++ b/plugins/BasicHistory/src/Options.h @@ -118,11 +118,11 @@ struct TaskOptions if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, buf))) { filePath = buf; - filePath += _T("\\"); + filePath += L"\\"; } filePath += TranslateT("History"); - filePath += _T("__."); + filePath += L"__."; lastExport = time(NULL); } }; diff --git a/plugins/BasicHistory/src/PlainHtmlExport.cpp b/plugins/BasicHistory/src/PlainHtmlExport.cpp index b2f4d9b1a8..c98386a056 100644 --- a/plugins/BasicHistory/src/PlainHtmlExport.cpp +++ b/plugins/BasicHistory/src/PlainHtmlExport.cpp @@ -30,69 +30,69 @@ extern std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl); void PlainHtmlExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring& encoding) { - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n\n"); - EXP_FILE << _T("") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]\n"); - EXP_FILE << _T("\n\n

") << TranslateT("History Log") << _T("

\n

"); + EXP_FILE << L"\n"; + EXP_FILE << L"\n\n"; + EXP_FILE << L"" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]\n"; + EXP_FILE << L"\n\n

" << TranslateT("History Log") << L"

\n

"; EXP_FILE << MakeTextHtmled(myName); if (proto1.length() || myId.length()) - EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(myId) << _T(") - "); + EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(myId) << L") - "; else - EXP_FILE << _T(" - "); + EXP_FILE << L" - "; EXP_FILE << MakeTextHtmled(name1); if (proto1.length() || id1.length()) - EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(id1) << _T(")

\n"); + EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")\n"; else - EXP_FILE << _T("\n"); + EXP_FILE << L"\n"; - EXP_FILE << _T("
") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("
\n"); + EXP_FILE << L"
" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"
\n"; } void PlainHtmlExport::WriteFooter() { - EXP_FILE << _T("
\n\n"); + EXP_FILE << L"
\n\n"; } void PlainHtmlExport::WriteGroup(bool, const std::wstring &time, const std::wstring&, const std::wstring&) { TCHAR buf[256]; - EXP_FILE << _T("
\n"); + EXP_FILE << L"
\n"; mir_sntprintf(buf, TranslateT("Conversation started at %s"), time.c_str()); - EXP_FILE << _T("
") << buf << _T("
\n"); - EXP_FILE << _T("
\n"); + EXP_FILE << L"
" << buf << L"
\n"; + EXP_FILE << L"
\n"; } void PlainHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&) { - TCHAR *id = isMe ? _T("out") : _T("inc"); - TCHAR* ev = (isMe ? _T("1") : _T("0")); + TCHAR *id = isMe ? L"out" : L"inc"; + TCHAR* ev = (isMe ? L"1" : L"0"); bool isUrl = false; std::wstring mes = UrlHighlightHtml(MakeTextHtmled(message), isUrl); if (isUrl) - ev = _T("2"); - EXP_FILE << _T("
\n"); - EXP_FILE << _T("
") << MakeTextHtmled(user) << _T(":
\n"); - EXP_FILE << _T("
") << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << _T("
\n"); - EXP_FILE << _T("
\n"); + ev = L"2"; + EXP_FILE << L"
\n"; + EXP_FILE << L"
" << MakeTextHtmled(user) << L":
\n"; + EXP_FILE << L"
" << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << L"
\n"; + EXP_FILE << L"
\n"; EXP_FILE << mes; - EXP_FILE << _T("\n
\n"); - EXP_FILE << _T("
\n"); + EXP_FILE << L"\n
\n"; + EXP_FILE << L"
\n"; } diff --git a/plugins/BasicHistory/src/PlainHtmlExport.h b/plugins/BasicHistory/src/PlainHtmlExport.h index bb1c971ea3..122e82d808 100644 --- a/plugins/BasicHistory/src/PlainHtmlExport.h +++ b/plugins/BasicHistory/src/PlainHtmlExport.h @@ -24,7 +24,7 @@ class PlainHtmlExport : public: virtual const TCHAR* GetExt() { - return _T("html"); + return L"html"; } virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding); diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index 5301e76b9d..5b030b5721 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -32,7 +32,7 @@ extern bool g_SmileyAddAvail; std::wstring MakeTextHtmled(const std::wstring& message, std::queue >* positionMap = NULL) { std::wstring ret; - std::wstring search = _T("&<>\t\r\n"); + std::wstring search = L"&<>\t\r\n"; size_t start = 0; size_t find; size_t currentAdd = 0; @@ -40,19 +40,19 @@ std::wstring MakeTextHtmled(const std::wstring& message, std::queue'): - ret += _T(">"); + ret += L">"; break; case _T('\t'): - ret += _T(" "); + ret += L" "; break; case _T('\n'): - ret += _T("
"); + ret += L"
"; break; } @@ -73,8 +73,8 @@ std::wstring MakeTextHtmled(const std::wstring& message, std::queue\r\n"); - std::wstring search = _T("://"); + std::wstring htmlStop = L"\'\" []<>\r\n"; + std::wstring search = L"://"; size_t start = 0; size_t find; while((find = message.find(search, start)) < message.length()) { @@ -88,8 +88,8 @@ std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl) ret += message.substr(start, (urlStart + 1) - start); std::wstring url = message.substr(urlStart + 1, urlEnd - urlStart - 1); start = urlEnd; - ret += _T("") + url + _T(""); + ret += L"" + url + L""; isUrl = true; } else { @@ -288,116 +288,116 @@ void RichHtmlExport::WriteHeader(const std::wstring &fileName, const std::wstrin folderName = GetName(folder); DeleteDirectory(folder.c_str()); CreateDirectory(folder.c_str(), NULL); - std::wstring css = folder + _T("\\history.css"); + std::wstring css = folder + L"\\history.css"; BOOL cssCopied = FALSE; if (!Options::instance->extCssHtml2.empty()) cssCopied = CopyFile(Options::instance->extCssHtml2.c_str(), css.c_str(), FALSE); if (!cssCopied) ExtractFile(IDR_CSS, css); - ExtractFile(IDR_JS, folder + _T("\\history.js")); + ExtractFile(IDR_JS, folder + L"\\history.js"); HICON ico = LoadIconEx(IDI_PLUSEX); - IcoSave(folder + _T("\\pnode.ico"), ico); + IcoSave(folder + L"\\pnode.ico", ico); IcoLib_ReleaseIcon(ico); ico = LoadIconEx(IDI_MINUSEX); - IcoSave(folder + _T("\\mnode.ico"), ico); + IcoSave(folder + L"\\mnode.ico", ico); IcoLib_ReleaseIcon(ico); ico = LoadIconEx(IDI_INM); - IcoSave(folder + _T("\\event0.ico"), ico); + IcoSave(folder + L"\\event0.ico", ico); IcoLib_ReleaseIcon(ico); ico = LoadIconEx(IDI_OUTM); - IcoSave(folder + _T("\\event1.ico"), ico); + IcoSave(folder + L"\\event1.ico", ico); IcoLib_ReleaseIcon(ico); - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n\n"); - EXP_FILE << _T("") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]\n"); - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n"); - - EXP_FILE << _T("\n"); - EXP_FILE << _T("") << TranslateT("Menu") << _T("\n"); - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n"); - EXP_FILE << _T("\n"); - EXP_FILE << _T("
\n"); - EXP_FILE << _T("\n"); - - EXP_FILE << _T("

") << TranslateT("History Log") << _T("

\n

"); + EXP_FILE << L"\n"; + EXP_FILE << L"\n\n"; + EXP_FILE << L"" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]\n"; + EXP_FILE << L"\n"; + EXP_FILE << L"\n"; + EXP_FILE << L"\n"; + + EXP_FILE << L"\n"; + EXP_FILE << L"" << TranslateT("Menu") << L"\n"; + EXP_FILE << L"\n"; + EXP_FILE << L"\n"; + EXP_FILE << L"\n"; + EXP_FILE << L"
\n"; + EXP_FILE << L"\n"; + + EXP_FILE << L"

" << TranslateT("History Log") << L"

\n

"; EXP_FILE << MakeTextHtmled(myName); if (proto1.length() || myId.length()) - EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(myId) << _T(") - "); + EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(myId) << L") - "; else - EXP_FILE << _T(" - "); + EXP_FILE << L" - "; EXP_FILE << MakeTextHtmled(name1); if (proto1.length() || id1.length()) - EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(id1) << _T(")

\n"); + EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")\n"; else - EXP_FILE << _T("\n"); + EXP_FILE << L"\n"; - EXP_FILE << _T("
") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("
\n"); + EXP_FILE << L"
" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"
\n"; groupId = 0; } void RichHtmlExport::WriteFooter() { if (groupId > 0) - EXP_FILE << _T("\n"); + EXP_FILE << L"\n"; - EXP_FILE << _T("
\n\n"); + EXP_FILE << L"
\n\n"; } void RichHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring&, const std::wstring &eventText) { - TCHAR *id = isMe ? _T("out") : _T("inc"); - TCHAR* ev = (isMe ? _T("1") : _T("0")); + TCHAR *id = isMe ? L"out" : L"inc"; + TCHAR* ev = (isMe ? L"1" : L"0"); if (groupId > 0) - EXP_FILE << _T("\n"); + EXP_FILE << L"\n"; bool isUrl = false; std::wstring mes = ReplaceSmileys(isMe, eventText, isUrl); - EXP_FILE << _T("
\n"); - EXP_FILE << _T(""); - EXP_FILE << _T("\n"); - EXP_FILE << _T("") << time << _T("\n\n") << mes; - EXP_FILE << _T("\n
\n"); - EXP_FILE << _T("
\n"); + EXP_FILE << L"
\n"; + EXP_FILE << L""; + EXP_FILE << L"\n"; + EXP_FILE << L"" << time << L"\n\n" << mes; + EXP_FILE << L"\n
\n"; + EXP_FILE << L"
\n"; ++groupId; } void RichHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&) { - TCHAR *id = isMe ? _T("out") : _T("inc"); - TCHAR* ev = (isMe ? _T("1") : _T("0")); + TCHAR *id = isMe ? L"out" : L"inc"; + TCHAR* ev = (isMe ? L"1" : L"0"); TCHAR* ev1 = ev; bool isUrl = false; std::wstring mes = ReplaceSmileys(isMe, message, isUrl); if (isUrl) - ev = _T("2"); - EXP_FILE << _T("
\n"); - EXP_FILE << _T("
") << _T("
\n"); - EXP_FILE << _T("
") << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << _T("
\n"); - EXP_FILE << _T("
") << MakeTextHtmled(user) << _T("
\n"); - EXP_FILE << _T("
\n"); + ev = L"2"; + EXP_FILE << L"
\n"; + EXP_FILE << L"
" << L"
\n"; + EXP_FILE << L"
" << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << L"
\n"; + EXP_FILE << L"
" << MakeTextHtmled(user) << L"
\n"; + EXP_FILE << L"
\n"; EXP_FILE << mes; - EXP_FILE << _T("\n
\n"); - EXP_FILE << _T("
\n"); + EXP_FILE << L"\n
\n"; + EXP_FILE << L"
\n"; } std::wstring RichHtmlExport::ReplaceSmileys(bool isMe, const std::wstring &msg, bool &isUrl) @@ -466,17 +466,17 @@ std::wstring RichHtmlExport::ReplaceSmileys(bool isMe, const std::wstring &msg, std::wstring smileyName = GetName(spr[i].filepath); if (smileys.find(smileyName) == smileys.end()) { smileys.insert(smileyName); - CopyFile(spr[i].filepath, (folder + _T("\\") + smileyName).c_str(), FALSE); + CopyFile(spr[i].filepath, (folder + L"\\" + smileyName).c_str(), FALSE); } std::wstring smileyText = newMsg.substr(startChar, size); - smileyMsg += _T("\"");"); + smileyMsg += L"\"/>"; } // Get next diff --git a/plugins/BasicHistory/src/RichHtmlExport.h b/plugins/BasicHistory/src/RichHtmlExport.h index e5a43ead25..e1f31fc15c 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.h +++ b/plugins/BasicHistory/src/RichHtmlExport.h @@ -31,7 +31,7 @@ private: public: virtual const TCHAR* GetExt() { - return _T("html"); + return L"html"; } virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding); diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 1dc8a3b79f..2185cb8212 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -176,7 +176,7 @@ bool IsValidTask(TaskOptions& to, std::list* top, std::wstring* err *errDescr = TranslateT("FTP path must contain '/' instead '\\' and start with '/'."); return false; } - if (isImportTask && to.filePath.find(_T("")) < to.filePath.length()) { + if (isImportTask && to.filePath.find(L"") < to.filePath.length()) { if (err != NULL) *err = TranslateT("Path to file"); if (errDescr != NULL) @@ -560,7 +560,7 @@ bool DoTask(TaskOptions& to) std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, std::map& existingContacts, bool replaceContact) { std::wstring str = baseName; - size_t pos = baseName.find(_T("")); + size_t pos = baseName.find(L""); if (replaceContact && pos < baseName.length()) { str = baseName.substr(0, pos); std::wstring baseName1 = contactName; @@ -581,12 +581,12 @@ std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, str += baseName.substr(pos + 9); } - pos = str.find(_T("")); + pos = str.find(L""); if (pos < str.length()) { TCHAR time[256]; SYSTEMTIME st; GetLocalTime(&st); - mir_sntprintf(time, _T("%d-%02d-%02d %02d%02d"), st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute); + mir_sntprintf(time, L"%d-%02d-%02d %02d%02d", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute); std::wstring str1 = str.substr(0, pos); str1 += time; str1 += str.substr(pos + 6); @@ -608,7 +608,7 @@ std::wstring GetDirectoryName(const std::wstring &path) void ListDirectory(const std::wstring &basePath, const std::wstring &path, std::list& files) { WIN32_FIND_DATA findFileData; - HANDLE hFind = FindFirstFile((basePath + path + _T("*")).c_str(), &findFileData); + HANDLE hFind = FindFirstFile((basePath + path + L"*").c_str(), &findFileData); if (hFind == INVALID_HANDLE_VALUE) return; @@ -617,7 +617,7 @@ void ListDirectory(const std::wstring &basePath, const std::wstring &path, std:: if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { std::wstring name = findFileData.cFileName; if (name != L"." && name != L"..") - ListDirectory(basePath, path + findFileData.cFileName + _T("\\"), files); + ListDirectory(basePath, path + findFileData.cFileName + L"\\", files); } else files.push_back(path + findFileData.cFileName); } @@ -1098,7 +1098,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: std::map existingContacts; ListDirectory(dir, L"\\", files); if (files.size() > 0) { - std::wofstream stream((dir + _T("\\script.sc")).c_str()); + std::wofstream stream((dir + L"\\script.sc").c_str()); if (stream.is_open()) { std::wstring ftpDir = GetDirectoryName(filePath); ftpDir = GetFileName(ftpDir, L"", existingContacts, false); @@ -1129,7 +1129,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: DeleteFile(log.c_str()); TCHAR cmdLine[MAX_PATH]; - mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str()); + mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str()); STARTUPINFO startupInfo = { 0 }; startupInfo.cb = sizeof(STARTUPINFO); @@ -1196,7 +1196,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: bool FtpGetFiles(const std::wstring& dir, const std::list& files, const std::wstring& ftpName) { - std::wstring script = dir + _T("\\script.sc"); + std::wstring script = dir + L"\\script.sc"; std::wofstream stream(script.c_str()); if (stream.is_open()) { stream << "option batch continue\noption confirm off\nopen \"" @@ -1220,7 +1220,7 @@ bool FtpGetFiles(const std::wstring& dir, const std::list& files, CreateDirectory(GetDirectoryName(log).c_str(), NULL); DeleteFile(log.c_str()); TCHAR cmdLine[MAX_PATH]; - mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str()); + mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str()); STARTUPINFO startupInfo = { 0 }; PROCESS_INFORMATION processInfo; startupInfo.cb = sizeof(STARTUPINFO); diff --git a/plugins/BasicHistory/src/TxtExport.cpp b/plugins/BasicHistory/src/TxtExport.cpp index 193772dde7..b2f9ddc5c9 100644 --- a/plugins/BasicHistory/src/TxtExport.cpp +++ b/plugins/BasicHistory/src/TxtExport.cpp @@ -27,28 +27,28 @@ TxtExport::~TxtExport() void TxtExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring&) { TCHAR* start = TranslateT("###"); - EXP_FILE << start << "\n" << start << _T(" ") << TranslateT("History Log") << _T("\n"); - EXP_FILE << start << _T(" ") << myName; + EXP_FILE << start << "\n" << start << L" " << TranslateT("History Log") << L"\n"; + EXP_FILE << start << L" " << myName; if (proto1.length() || myId.length()) { - EXP_FILE << _T(" (") << proto1 << _T(": ") << myId << _T(") - "); + EXP_FILE << L" (" << proto1 << L": " << myId << L") - "; } else { - EXP_FILE << _T(" - "); + EXP_FILE << L" - "; } EXP_FILE << name1; if (proto1.length() || id1.length()) { - EXP_FILE << _T(" (") << proto1 << _T(": ") << id1 << _T(")\n"); + EXP_FILE << L" (" << proto1 << L": " << id1 << L")\n"; } else { - EXP_FILE << _T("\n"); + EXP_FILE << L"\n"; } - EXP_FILE << start << _T(" ") << TranslateT("Filter:") << _T(" ") << filterName << _T("\n") << start << _T("\n"); + EXP_FILE << start << L" " << TranslateT("Filter:") << L" " << filterName << L"\n" << start << L"\n"; } void TxtExport::WriteFooter() diff --git a/plugins/BasicHistory/src/TxtExport.h b/plugins/BasicHistory/src/TxtExport.h index bee2718649..3147d9024d 100644 --- a/plugins/BasicHistory/src/TxtExport.h +++ b/plugins/BasicHistory/src/TxtExport.h @@ -25,7 +25,7 @@ class TxtExport : public: virtual const TCHAR* GetExt() { - return _T("txt"); + return L"txt"; } virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding); -- cgit v1.2.3