summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory
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/BasicHistory
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/BasicHistory')
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp6
-rw-r--r--plugins/BasicHistory/src/BinaryExport.h2
-rw-r--r--plugins/BasicHistory/src/DatExport.h2
-rw-r--r--plugins/BasicHistory/src/EventList.cpp4
-rw-r--r--plugins/BasicHistory/src/ExportManager.cpp14
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp32
-rw-r--r--plugins/BasicHistory/src/Options.cpp98
-rw-r--r--plugins/BasicHistory/src/Options.h4
-rw-r--r--plugins/BasicHistory/src/PlainHtmlExport.cpp78
-rw-r--r--plugins/BasicHistory/src/PlainHtmlExport.h2
-rw-r--r--plugins/BasicHistory/src/RichHtmlExport.cpp146
-rw-r--r--plugins/BasicHistory/src/RichHtmlExport.h2
-rw-r--r--plugins/BasicHistory/src/Scheduler.cpp20
-rw-r--r--plugins/BasicHistory/src/TxtExport.cpp14
-rw-r--r--plugins/BasicHistory/src/TxtExport.h2
15 files changed, 213 insertions, 213 deletions
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("<ext>"));
+ size_t pos = file.find(L"<ext>");
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 &quote, 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 &quote, 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 <date> to insert date, <ext> to insert extension, <contact> 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("_<contact>_<date>.<ext>");
+ filePath += L"_<contact>_<date>.<ext>";
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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
- EXP_FILE << _T("<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=") << encoding << _T("\">\n");
- EXP_FILE << _T("<title>") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]</title>\n");
- EXP_FILE << _T("<style type=\"text/css\"><!--\n");
- EXP_FILE << _T("h3 { color: #666666; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 16pt; }\n");
- EXP_FILE << _T("h4 { text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14pt; }\n");
- EXP_FILE << _T("h6 { font-weight: normal; color: #000000; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 8pt; }\n");
- EXP_FILE << _T(".mes { border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px;border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #666666; border-bottom-color: #666666; padding: 4px; color: #000000; font: normal normal normal 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".text { clear: both; }\n");
- EXP_FILE << _T(".nick { float: left; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".date { float: right; clear: right; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".url { color: #0000FF; }\n");
- EXP_FILE << _T(".nick#inc { color: #C83F6B; }\n");
- EXP_FILE << _T(".nick#out { color: #0860BD; }\n");
- EXP_FILE << _T(".date#inc { color: #000000; }\n");
- EXP_FILE << _T(".date#out { color: #000000; }\n");
- EXP_FILE << _T(".mes#event0 { background-color: #DBDBDB; }\n");
- EXP_FILE << _T(".mes#event1 { background-color: #EEEEEE; }\n");
- EXP_FILE << _T(".mes#event2 { background-color: #CCD9F4; }\n");
- EXP_FILE << _T(".mes#session { background-color: #FFFDD7; }\n");
- EXP_FILE << _T("--></style>\n</head><body>\n<h4>") << TranslateT("History Log") << _T("</h4>\n<h3>");
+ EXP_FILE << L"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
+ EXP_FILE << L"<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" << encoding << L"\">\n";
+ EXP_FILE << L"<title>" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]</title>\n";
+ EXP_FILE << L"<style type=\"text/css\"><!--\n";
+ EXP_FILE << L"h3 { color: #666666; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 16pt; }\n";
+ EXP_FILE << L"h4 { text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14pt; }\n";
+ EXP_FILE << L"h6 { font-weight: normal; color: #000000; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 8pt; }\n";
+ EXP_FILE << L".mes { border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px;border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #666666; border-bottom-color: #666666; padding: 4px; color: #000000; font: normal normal normal 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".text { clear: both; }\n";
+ EXP_FILE << L".nick { float: left; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".date { float: right; clear: right; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".url { color: #0000FF; }\n";
+ EXP_FILE << L".nick#inc { color: #C83F6B; }\n";
+ EXP_FILE << L".nick#out { color: #0860BD; }\n";
+ EXP_FILE << L".date#inc { color: #000000; }\n";
+ EXP_FILE << L".date#out { color: #000000; }\n";
+ EXP_FILE << L".mes#event0 { background-color: #DBDBDB; }\n";
+ EXP_FILE << L".mes#event1 { background-color: #EEEEEE; }\n";
+ EXP_FILE << L".mes#event2 { background-color: #CCD9F4; }\n";
+ EXP_FILE << L".mes#session { background-color: #FFFDD7; }\n";
+ EXP_FILE << L"--></style>\n</head><body>\n<h4>" << TranslateT("History Log") << L"</h4>\n<h3>";
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(")</h3>\n");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")</h3>\n";
else
- EXP_FILE << _T("</h3>\n");
+ EXP_FILE << L"</h3>\n";
- EXP_FILE << _T("<h6>") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("</h6>\n");
+ EXP_FILE << L"<h6>" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"</h6>\n";
}
void PlainHtmlExport::WriteFooter()
{
- EXP_FILE << _T("<div class=mes></div>\n</body></html>\n");
+ EXP_FILE << L"<div class=mes></div>\n</body></html>\n";
}
void PlainHtmlExport::WriteGroup(bool, const std::wstring &time, const std::wstring&, const std::wstring&)
{
TCHAR buf[256];
- EXP_FILE << _T("<div class=mes id=session>\n");
+ EXP_FILE << L"<div class=mes id=session>\n";
mir_sntprintf(buf, TranslateT("Conversation started at %s"), time.c_str());
- EXP_FILE << _T("<div class=text>") << buf << _T("</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"<div class=text>" << buf << L"</div>\n";
+ EXP_FILE << L"</div>\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("<div class=mes id=event") << ev << _T(">\n");
- EXP_FILE << _T("<div class=nick id=") << id << _T(">") << MakeTextHtmled(user) << _T(":</div>\n");
- EXP_FILE << _T("<div class=date id=") << id << _T(">") << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << _T("</div>\n");
- EXP_FILE << _T("<div class=text>\n");
+ ev = L"2";
+ EXP_FILE << L"<div class=mes id=event" << ev << L">\n";
+ EXP_FILE << L"<div class=nick id=" << id << L">" << MakeTextHtmled(user) << L":</div>\n";
+ EXP_FILE << L"<div class=date id=" << id << L">" << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << L"</div>\n";
+ EXP_FILE << L"<div class=text>\n";
EXP_FILE << mes;
- EXP_FILE << _T("\n</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"\n</div>\n";
+ EXP_FILE << L"</div>\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<std::pair<size_t, size_t> >* 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<std::pair<si
ret += message.substr(start, find - start);
switch(message[find]) {
case _T('&'):
- ret += _T("&amp;");
+ ret += L"&amp;";
break;
case _T('<'):
- ret += _T("&lt;");
+ ret += L"&lt;";
break;
case _T('>'):
- ret += _T("&gt;");
+ ret += L"&gt;";
break;
case _T('\t'):
- ret += _T(" ");
+ ret += L" ";
break;
case _T('\n'):
- ret += _T("<br>");
+ ret += L"<br>";
break;
}
@@ -73,8 +73,8 @@ std::wstring MakeTextHtmled(const std::wstring& message, std::queue<std::pair<si
std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl)
{
std::wstring ret;
- std::wstring htmlStop = _T("\'\" []<>\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("<a class=url target=_blank href=\"");
- ret += url + _T("\">") + url + _T("</a>");
+ ret += L"<a class=url target=_blank href=\"";
+ ret += url + L"\">" + url + L"</a>";
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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
- EXP_FILE << _T("<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=") << encoding << _T("\">\n");
- EXP_FILE << _T("<title>") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]</title>\n");
- EXP_FILE << _T("<link rel=\"Stylesheet\" href=\"") << folderName << _T("\\history.css\" type=\"text/css\">\n");
- EXP_FILE << _T("<script type=\"text/javascript\" src=\"") << folderName << _T("\\history.js\"></script>\n");
- EXP_FILE << _T("</head><body>\n");
-
- EXP_FILE << _T("<span id=\"menubar\">\n");
- EXP_FILE << _T("<a class=mainmenu onmouseover='this.className=\"mainmenusel\";' href=\"javascript:void(0)\" onClick=\"ShowMenu(1)\" onMouseOut='HideMenu();this.className=\"mainmenu\";'>") << TranslateT("Menu") << _T("</a></span>\n");
- EXP_FILE << _T("<span class=floatmenu id=L1 onmouseover=clearTimeout(timer) onmouseout=HideMenu()>\n");
- EXP_FILE << _T("<table><tr>\n");
- EXP_FILE << _T("<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n");
- EXP_FILE << _T("<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(1)>") << TranslateT("Open all") << _T("</a>\n");
- EXP_FILE << _T("</td></tr><tr>\n");
- EXP_FILE << _T("<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n");
- EXP_FILE << _T("<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(0)>") << TranslateT("Close all") << _T("</a>\n");
- EXP_FILE << _T("</td></tr></table></span>\n");
- EXP_FILE << _T("<script language=\"JavaScript\">\n");
- EXP_FILE << _T("<!--\n");
- EXP_FILE << _T("var menu = document.getElementById(\"menubar\");\n");
- EXP_FILE << _T("if (menu != null)\n");
- EXP_FILE << _T(" menu.style.visibility = \"visible\";\n");
- EXP_FILE << _T("// -->\n");
- EXP_FILE << _T("</script>\n");
-
- EXP_FILE << _T("<h4>") << TranslateT("History Log") << _T("</h4>\n<h3>");
+ EXP_FILE << L"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
+ EXP_FILE << L"<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" << encoding << L"\">\n";
+ EXP_FILE << L"<title>" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]</title>\n";
+ EXP_FILE << L"<link rel=\"Stylesheet\" href=\"" << folderName << L"\\history.css\" type=\"text/css\">\n";
+ EXP_FILE << L"<script type=\"text/javascript\" src=\"" << folderName << L"\\history.js\"></script>\n";
+ EXP_FILE << L"</head><body>\n";
+
+ EXP_FILE << L"<span id=\"menubar\">\n";
+ EXP_FILE << L"<a class=mainmenu onmouseover='this.className=\"mainmenusel\";' href=\"javascript:void(0)\" onClick=\"ShowMenu(1)\" onMouseOut='HideMenu();this.className=\"mainmenu\";'>" << TranslateT("Menu") << L"</a></span>\n";
+ EXP_FILE << L"<span class=floatmenu id=L1 onmouseover=clearTimeout(timer) onmouseout=HideMenu()>\n";
+ EXP_FILE << L"<table><tr>\n";
+ EXP_FILE << L"<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n";
+ EXP_FILE << L"<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(1)>" << TranslateT("Open all") << L"</a>\n";
+ EXP_FILE << L"</td></tr><tr>\n";
+ EXP_FILE << L"<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n";
+ EXP_FILE << L"<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(0)>" << TranslateT("Close all") << L"</a>\n";
+ EXP_FILE << L"</td></tr></table></span>\n";
+ EXP_FILE << L"<script language=\"JavaScript\">\n";
+ EXP_FILE << L"<!--\n";
+ EXP_FILE << L"var menu = document.getElementById(\"menubar\");\n";
+ EXP_FILE << L"if (menu != null)\n";
+ EXP_FILE << L" menu.style.visibility = \"visible\";\n";
+ EXP_FILE << L"// -->\n";
+ EXP_FILE << L"</script>\n";
+
+ EXP_FILE << L"<h4>" << TranslateT("History Log") << L"</h4>\n<h3>";
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(")</h3>\n");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")</h3>\n";
else
- EXP_FILE << _T("</h3>\n");
+ EXP_FILE << L"</h3>\n";
- EXP_FILE << _T("<h6>") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("</h6>\n");
+ EXP_FILE << L"<h6>" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"</h6>\n";
groupId = 0;
}
void RichHtmlExport::WriteFooter()
{
if (groupId > 0)
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"</div>\n";
- EXP_FILE << _T("<div class=mes id=bottom></div>\n</body></html>\n");
+ EXP_FILE << L"<div class=mes id=bottom></div>\n</body></html>\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("</div>\n");
+ EXP_FILE << L"</div>\n";
bool isUrl = false;
std::wstring mes = ReplaceSmileys(isMe, eventText, isUrl);
- EXP_FILE << _T("<div class=mes id=session>\n");
- EXP_FILE << _T("<span class=eventimg id=") << id << _T("><img src=\"") << folderName << _T("\\pnode.ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group") << groupId << _T("', this)\"/>");
- EXP_FILE << _T("<img src=\"") << folderName << _T("\\event") << ev << _T(".ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group") << groupId << _T("', this)\"/></span>\n");
- EXP_FILE << _T("<span class=date id=") << id << _T(">") << time << _T("</span>\n<span class=text>\n") << mes;
- EXP_FILE << _T("</span>\n</div>\n");
- EXP_FILE << _T("<div class=group id=group") << groupId << _T(">\n");
+ EXP_FILE << L"<div class=mes id=session>\n";
+ EXP_FILE << L"<span class=eventimg id=" << id << L"><img src=\"" << folderName << L"\\pnode.ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group" << groupId << L"', this)\"/>";
+ EXP_FILE << L"<img src=\"" << folderName << L"\\event" << ev << L".ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group" << groupId << L"', this)\"/></span>\n";
+ EXP_FILE << L"<span class=date id=" << id << L">" << time << L"</span>\n<span class=text>\n" << mes;
+ EXP_FILE << L"</span>\n</div>\n";
+ EXP_FILE << L"<div class=group id=group" << groupId << 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("<div class=mes id=event") << ev << _T(">\n");
- EXP_FILE << _T("<div class=eventimg id=") << id << _T(">") << _T("<img src=\"") << folderName << _T("\\event") << ev1 << _T(".ico\" class=sessionimage width=\"16\" height=\"16\"/></div>\n");
- EXP_FILE << _T("<div class=date id=") << id << _T(">") << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << _T("</div>\n");
- EXP_FILE << _T("<div class=nick id=") << id << _T(">") << MakeTextHtmled(user) << _T("</div>\n");
- EXP_FILE << _T("<div class=text>\n");
+ ev = L"2";
+ EXP_FILE << L"<div class=mes id=event" << ev << L">\n";
+ EXP_FILE << L"<div class=eventimg id=" << id << L">" << L"<img src=\"" << folderName << L"\\event" << ev1 << L".ico\" class=sessionimage width=\"16\" height=\"16\"/></div>\n";
+ EXP_FILE << L"<div class=date id=" << id << L">" << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << L"</div>\n";
+ EXP_FILE << L"<div class=nick id=" << id << L">" << MakeTextHtmled(user) << L"</div>\n";
+ EXP_FILE << L"<div class=text>\n";
EXP_FILE << mes;
- EXP_FILE << _T("\n</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"\n</div>\n";
+ EXP_FILE << L"</div>\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("<img class=smiley src=\"");
+ smileyMsg += L"<img class=smiley src=\"";
smileyMsg += folderName;
- smileyMsg += _T("\\");
+ smileyMsg += L"\\";
smileyMsg += smileyName;
- smileyMsg += _T("\" alt=\"");
+ smileyMsg += L"\" alt=\"";
smileyMsg += smileyText;
- 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<TaskOptions>* top, std::wstring* err
*errDescr = TranslateT("FTP path must contain '/' instead '\\' and start with '/'.");
return false;
}
- if (isImportTask && to.filePath.find(_T("<date>")) < to.filePath.length()) {
+ if (isImportTask && to.filePath.find(L"<date>") < 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<std::wstring, bool>& existingContacts, bool replaceContact)
{
std::wstring str = baseName;
- size_t pos = baseName.find(_T("<contact>"));
+ size_t pos = baseName.find(L"<contact>");
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("<date>"));
+ pos = str.find(L"<date>");
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<std::wstring>& 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<std::wstring, bool> 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<std::wstring>& 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<std::wstring>& 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);