summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/HistoryStats/src
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src')
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp10
-rw-r--r--plugins/HistoryStats/src/colbase_words.cpp10
-rw-r--r--plugins/HistoryStats/src/column.cpp12
-rw-r--r--plugins/HistoryStats/src/column.h4
-rw-r--r--plugins/HistoryStats/src/column_chatduration.cpp36
-rw-r--r--plugins/HistoryStats/src/column_events.cpp4
-rw-r--r--plugins/HistoryStats/src/column_group.cpp6
-rw-r--r--plugins/HistoryStats/src/column_inout.cpp12
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.cpp74
-rw-r--r--plugins/HistoryStats/src/column_nick.cpp24
-rw-r--r--plugins/HistoryStats/src/column_protocol.cpp4
-rw-r--r--plugins/HistoryStats/src/column_rank.cpp8
-rw-r--r--plugins/HistoryStats/src/column_split.cpp50
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.cpp32
-rw-r--r--plugins/HistoryStats/src/column_timeline.cpp104
-rw-r--r--plugins/HistoryStats/src/column_wordcount.cpp42
-rw-r--r--plugins/HistoryStats/src/column_words.cpp40
-rw-r--r--plugins/HistoryStats/src/dlgfilterwords.cpp8
-rw-r--r--plugins/HistoryStats/src/dlgoption.cpp4
-rw-r--r--plugins/HistoryStats/src/dlgoption_subcolumns.cpp20
-rw-r--r--plugins/HistoryStats/src/dlgoption_subglobal.cpp8
-rw-r--r--plugins/HistoryStats/src/dlgoption_subinput.cpp12
-rw-r--r--plugins/HistoryStats/src/dlgoption_suboutput.cpp8
-rw-r--r--plugins/HistoryStats/src/iconlib.cpp4
-rw-r--r--plugins/HistoryStats/src/main.cpp30
-rw-r--r--plugins/HistoryStats/src/message.cpp34
-rw-r--r--plugins/HistoryStats/src/mirandacontact.cpp2
-rw-r--r--plugins/HistoryStats/src/optionsctrl.cpp6
-rw-r--r--plugins/HistoryStats/src/optionsctrl.h4
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl.cpp6
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_combo.cpp4
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp42
-rw-r--r--plugins/HistoryStats/src/optionsctrlimpl_edit.cpp2
-rw-r--r--plugins/HistoryStats/src/settings.cpp112
-rw-r--r--plugins/HistoryStats/src/settingsserializer.cpp22
-rw-r--r--plugins/HistoryStats/src/settingstree.cpp34
-rw-r--r--plugins/HistoryStats/src/statistic.cpp88
-rw-r--r--plugins/HistoryStats/src/statistic.h2
-rw-r--r--plugins/HistoryStats/src/utils.cpp164
-rw-r--r--plugins/HistoryStats/src/utils.h10
40 files changed, 549 insertions, 549 deletions
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp
index d9a0151797..76e8b47dbe 100644
--- a/plugins/HistoryStats/src/bandctrlimpl.cpp
+++ b/plugins/HistoryStats/src/bandctrlimpl.cpp
@@ -8,7 +8,7 @@
* BandCtrlImpl
*/
-const TCHAR* BandCtrlImpl::m_ClassName = _T("HistoryStatsBand");
+const TCHAR* BandCtrlImpl::m_ClassName = L"HistoryStatsBand";
const int BandCtrlImpl::m_PollId = 100;
const int BandCtrlImpl::m_PollDelay = 50;
@@ -265,7 +265,7 @@ void BandCtrlImpl::onWMPaint()
HGDIOBJ hOldFont = SelectObject(hDC, m_hFont);
SIZE textSize;
- GetTextExtentPoint32(hDC, _T("X"), 1, &textSize);
+ GetTextExtentPoint32(hDC, L"X", 1, &textSize);
SetBkMode(hDC, TRANSPARENT);
SetTextColor(hDC, GetSysColor(bBandEnabled ? COLOR_BTNTEXT : COLOR_GRAYTEXT));
@@ -461,8 +461,8 @@ int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton)
id.bChecked = bool_(pButton->dwFlags & BCF_CHECKED);
id.bVisible = !(pButton->dwFlags & BCF_HIDDEN);
id.bDropDown = bool_(pButton->dwFlags & BCF_DROPDOWN);
- id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : _T("");
- id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : _T("");
+ id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : L"";
+ id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : L"";
id.uTTId = -1;
id.dwData = (pButton->dwFlags & BCF_DATA) ? pButton->dwData : 0;
id.bEnabled = !(pButton->dwFlags & BCF_DISABLED);
@@ -622,7 +622,7 @@ void BandCtrlImpl::recalcButtonRects()
else if (m_Items[i].uTTId == -1 && m_Items[i].bVisible && !m_Items[i].tooltip.empty()) {
// add a tooltip, if we don't have a tooltip but are now visible
if (!m_hTooltip)
- m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
+ m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
TOOLINFO ti = { sizeof(TOOLINFO), TTF_SUBCLASS, m_hWnd, UINT_PTR(i+1), m_Items[i].rItem, NULL,
const_cast<TCHAR*>(m_Items[i].tooltip.c_str()), // lpszText
diff --git a/plugins/HistoryStats/src/colbase_words.cpp b/plugins/HistoryStats/src/colbase_words.cpp
index 9d771df800..8bb4840924 100644
--- a/plugins/HistoryStats/src/colbase_words.cpp
+++ b/plugins/HistoryStats/src/colbase_words.cpp
@@ -194,7 +194,7 @@ void ColBaseWords::impl_configRead(const SettingsTree& settings)
upto_each_(i, nCount)
{
- m_FilterWords.insert(settings.readStr((con::KeyFilterWords + utils::intToString(i)).c_str(), _T("")));
+ m_FilterWords.insert(settings.readStr((con::KeyFilterWords + utils::intToString(i)).c_str(), L""));
}
}
@@ -224,8 +224,8 @@ void ColBaseWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hSource = Opt.insertRadio (hTemp, NULL, TranslateT("Incoming messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("Outgoing messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("All messages"));
- m_hMinLength = Opt.insertEdit(hGroup, TranslateT("Ignore words shorter than (chars)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hMaxLength = Opt.insertEdit(hGroup, TranslateT("Ignore words longer than (chars, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hMinLength = Opt.insertEdit(hGroup, TranslateT("Ignore words shorter than (chars)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hMaxLength = Opt.insertEdit(hGroup, TranslateT("Ignore words longer than (chars, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
m_hFilterLinks = Opt.insertCheck(hGroup, TranslateT("Filter URLs/e-mail addresses"));
Opt.insertButton(hGroup, TranslateT("Filter words/messages"), TranslateT("Define..."), 0, Settings::biFilterWords);
@@ -249,7 +249,7 @@ void ColBaseWords::impl_configFromUI(OptionsCtrl& Opt)
ext::string ColBaseWords::impl_contactDataGetUID() const
{
- ext::string strUID = ext::str(ext::format(_T("words-|-|-|-|"))
+ ext::string strUID = ext::str(ext::format(L"words-|-|-|-|")
% m_nSource
% m_nMinLength
% m_nMaxLength
@@ -257,7 +257,7 @@ ext::string ColBaseWords::impl_contactDataGetUID() const
citer_each_(ColFilterSet, i, m_FilterWords)
{
- strUID += _T("-");
+ strUID += L"-";
strUID += *i;
}
diff --git a/plugins/HistoryStats/src/column.cpp b/plugins/HistoryStats/src/column.cpp
index 82c95c61ce..1a0d85f2fb 100644
--- a/plugins/HistoryStats/src/column.cpp
+++ b/plugins/HistoryStats/src/column.cpp
@@ -54,7 +54,7 @@ void Column::FactoryList::initList()
ext::string Column::IDProvider::getID()
{
- ext::string s = _T("q");
+ ext::string s = L"q";
int val = m_nNextID++;
while (val > 0) {
@@ -106,15 +106,15 @@ void Column::writeRowspanTD(ext::ostream& tos, const ext::string& innerHTML, int
{
int curRowSpan = (row < numRows) ? 1 : (rowSpan - numRows + 1);
- tos << _T("<td");
+ tos << L"<td";
if (colSpan > 1)
- tos << _T(" colspan=\"") << colSpan << _T("\"");
+ tos << L" colspan=\"" << colSpan << L"\"";
if (curRowSpan > 1)
- tos << _T(" rowspan=\"") << curRowSpan << _T("\"");
+ tos << L" rowspan=\"" << curRowSpan << L"\"";
- tos << _T(">") << innerHTML << _T("</td>") << ext::endl;
+ tos << L">" << innerHTML << L"</td>" << ext::endl;
}
void Column::copyAttrib(const Column* pSource)
@@ -130,7 +130,7 @@ const ext::string Column::getCustomTitle(const ext::string& strShort, const ext:
ext::string strTitle = utils::htmlEscape(m_CustomTitle.empty() ? (m_pSettings->m_TableHeaderVerbose ? strLong : strShort) : m_CustomTitle);
if (m_pSettings->m_HeaderTooltips && (!m_pSettings->m_HeaderTooltipsIfCustom || !m_CustomTitle.empty() || (!m_pSettings->m_TableHeaderVerbose && strShort != strLong)))
- strTitle = _T("<span title=\"") + utils::htmlEscape(strLong) + _T("\">") + strTitle + _T("</span>");
+ strTitle = L"<span title=\"" + utils::htmlEscape(strLong) + L"\">" + strTitle + L"</span>";
return strTitle;
}
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h
index 7d8bd1d0c4..1c1aaca70e 100644
--- a/plugins/HistoryStats/src/column.h
+++ b/plugins/HistoryStats/src/column.h
@@ -137,7 +137,7 @@ protected:
public:
Column()
- : m_bEnabled(true), m_CustomTitle(_T("")),
+ : m_bEnabled(true), m_CustomTitle(L""),
m_nContactDataSlot(-1), m_nContactDataTransformSlot(-1),
m_pStatistic(NULL), m_pSettings(NULL), m_pCharMapper(NULL),
m_bUsePNG(false)
@@ -155,7 +155,7 @@ public:
void setCustomTitle(const ext::string& customTitle) { m_CustomTitle = customTitle; }
const ext::string getCustomTitle() const { return m_CustomTitle; }
const ext::string getCustomTitle(const ext::string& strShort, const ext::string& strLong) const;
- ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + _T(" (") + TranslateTS(getTitle()) + _T(")")); }
+ ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + L" (" + TranslateTS(getTitle()) + L")"); }
void setHelpers(Statistic* pStatistic, Settings* pSettings, Settings::CharMapper* pCharMapper) { m_pStatistic = pStatistic; m_pSettings = pSettings; m_pCharMapper = pCharMapper; }
Statistic* getStatistic() const { return m_pStatistic; }
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp
index 43e96e2e15..4954f693b8 100644
--- a/plugins/HistoryStats/src/column_chatduration.cpp
+++ b/plugins/HistoryStats/src/column_chatduration.cpp
@@ -64,13 +64,13 @@ Column::StyleList ColChatDuration::impl_outputGetAdditionalStyles(IDProvider& id
{
m_CSS = idp.getID();
- l.push_back(StylePair(_T("td.") + m_CSS, _T("vertical-align: middle; padding: 2px 2px 2px 2px;")));
- l.push_back(StylePair(_T("td.") + m_CSS + _T(" div.n"), _T("text-align: center;")));
+ l.push_back(StylePair(L"td." + m_CSS, L"vertical-align: middle; padding: 2px 2px 2px 2px;"));
+ l.push_back(StylePair(L"td." + m_CSS + L" div.n", L"text-align: center;"));
if (!usePNG())
{
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -35px; width: 70px; height: 15px; background-color: ") + utils::colorToHTML(con::ColorBarBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; left: 0px; height: 15px; overflow: hidden; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -35px; width: 70px; height: 15px; background-color: " + utils::colorToHTML(con::ColorBarBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; left: 0px; height: 15px; overflow: hidden; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
}
}
@@ -89,7 +89,7 @@ void ColChatDuration::impl_outputRenderHeader(ext::ostream& tos, int row, int ro
if (row == 1)
{
ext::string szLong = TranslateTS(szVisModeDesc[m_nVisMode]);
- writeRowspanTD(tos, getCustomTitle(TranslateT("Chat duration"), szLong) + (m_bGraph ? _T("<div style=\"width: 70px;\"></div>") : _T("")), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateT("Chat duration"), szLong) + (m_bGraph ? L"<div style=\"width: 70px;\"></div>" : L""), row, 1, rowSpan);
}
}
@@ -137,11 +137,11 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con
// begin output
if (m_bGraph)
{
- tos << _T("<td class=\"") << m_CSS;
+ tos << L"<td class=\"" << m_CSS;
}
else
{
- tos << _T("<td class=\"num");
+ tos << L"<td class=\"num";
}
// read and format data
@@ -176,26 +176,26 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con
{
if (i != m_nVisMode)
{
- strTooltip += ext::str(ext::kformat(TranslateTS(szPrefixes[i])) % _T("#{amount}") * strAll[i]);
+ strTooltip += ext::str(ext::kformat(TranslateTS(szPrefixes[i])) % L"#{amount}" * strAll[i]);
++nSegments;
if (nSegments < 3)
{
- strTooltip += _T(" / ");
+ strTooltip += L" / ";
}
}
}
- tos << _T("\" title=\"") << utils::htmlEscape(strTooltip) << _T("\">");
+ tos << L"\" title=\"" << utils::htmlEscape(strTooltip) << L"\">";
}
else
{
- tos << _T("\">");
+ tos << L"\">";
}
if (m_bGraph)
{
- tos << _T("<div class=\"n\">")
+ tos << L"<div class=\"n\">"
<< utils::htmlEscape(strAll[m_nVisMode]);
if (display == asContact || m_nVisMode != 3)
@@ -226,23 +226,23 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<br/><img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<br/><img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
}
else
{
- tos << _T("</div>")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div style=\"width: ") << barW << _T("px;\"></div>");
+ tos << L"</div>"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div style=\"width: " << barW << L"px;\"></div>";
}
}
- tos << _T("</div>");
+ tos << L"</div>";
}
else
{
tos << utils::htmlEscape(strAll[m_nVisMode]);
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp
index 657606ea1e..5b2c859d8c 100644
--- a/plugins/HistoryStats/src/column_events.cpp
+++ b/plugins/HistoryStats/src/column_events.cpp
@@ -86,7 +86,7 @@ void ColEvents::impl_outputRenderRow(ext::ostream& tos, const Contact& contact,
&Contact::getTotalFiles,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped((contact.*getData[m_nSource])())
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_group.cpp b/plugins/HistoryStats/src/column_group.cpp
index 61db6bd224..740e97d0e1 100644
--- a/plugins/HistoryStats/src/column_group.cpp
+++ b/plugins/HistoryStats/src/column_group.cpp
@@ -20,12 +20,12 @@ void ColGroup::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
ext::string groupName = contact.getGroup();
// replace subgroup separator with something better (really better?)
- utils::replaceAllInPlace(groupName, _T("\\"), _T(" > "));
+ utils::replaceAllInPlace(groupName, L"\\", L" > ");
- tos << _T("<td>") << utils::htmlEscape(groupName) << _T("</td>") << ext::endl;
+ tos << L"<td>" << utils::htmlEscape(groupName) << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td>&nbsp;</td>");
+ tos << L"<td>&nbsp;</td>";
}
}
diff --git a/plugins/HistoryStats/src/column_inout.cpp b/plugins/HistoryStats/src/column_inout.cpp
index 7874e1c1b6..6bdc88909c 100644
--- a/plugins/HistoryStats/src/column_inout.cpp
+++ b/plugins/HistoryStats/src/column_inout.cpp
@@ -112,8 +112,8 @@ void ColInOut::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource])
- % _T("#{unit}") * TranslateTS(szUnitDesc[m_nAbsTime]));
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateTS(szUnitDesc[m_nAbsTime]));
}
writeRowspanTD(tos, getCustomTitle(TranslateTS(szShortDesc[m_nSource / 3]), strTitle), row, 1, rowSpan);
@@ -136,9 +136,9 @@ void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
&Contact::getTotalChats,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped((contact.*getData[m_nSource])())
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
@@ -160,8 +160,8 @@ void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
60.0 * 60.0 * 24.0 * 30.0,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::floatToGrouped((contact.*getData[m_nSource])() * avgFactor[m_nAbsTime], 1)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_inoutgraph.cpp b/plugins/HistoryStats/src/column_inoutgraph.cpp
index 34e696d408..be00a85cb6 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.cpp
+++ b/plugins/HistoryStats/src/column_inoutgraph.cpp
@@ -99,24 +99,24 @@ Column::StyleList ColInOutGraph::impl_outputGetAdditionalStyles(IDProvider& idp)
m_CSS = idp.getID();
- l.push_back(StylePair(_T("td.") + m_CSS, _T("vertical-align: middle; padding: 2px 2px 2px 2px;")));
+ l.push_back(StylePair(L"td." + m_CSS, L"vertical-align: middle; padding: 2px 2px 2px 2px;"));
if (m_bShowSum)
{
- l.push_back(StylePair(_T("td.") + m_CSS + _T(" div.n"), _T("text-align: center;")));
+ l.push_back(StylePair(L"td." + m_CSS + L" div.n", L"text-align: center;"));
}
if (!usePNG())
{
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -50px; width: 100px; height: 15px; background-color: ") + utils::colorToHTML(con::ColorBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; height: 15px; overflow: hidden; font-size: 80%; color: ") + utils::colorToHTML(con::ColorBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.obar"), _T("left: 0px; background-color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.ibar"), _T("right: 0px; background-color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -50px; width: 100px; height: 15px; background-color: " + utils::colorToHTML(con::ColorBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; height: 15px; overflow: hidden; font-size: 80%; color: " + utils::colorToHTML(con::ColorBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.obar", L"left: 0px; background-color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.ibar", L"right: 0px; background-color: " + utils::colorToHTML(con::ColorIn) + L";"));
if (m_bGraphPercent)
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.otext"), _T("left: 2px; width: 48px; text-align: left; z-index: 9;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.itext"), _T("right: 2px; width: 48px; text-align: right; z-index: 9;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.otext", L"left: 2px; width: 48px; text-align: left; z-index: 9;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.itext", L"right: 2px; width: 48px; text-align: right; z-index: 9;"));
}
}
@@ -155,11 +155,11 @@ void ColInOutGraph::impl_outputRenderHeader(ext::ostream& tos, int row, int rowS
else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource])
- % _T("#{unit}") * TranslateTS(szSourceUnit[m_nAbsTime]));
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateTS(szSourceUnit[m_nAbsTime]));
}
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szSourceDesc[m_nSource]), strTitle) + _T("<div style=\"width: 100px;\"></div>"), 1, 2, rowSpan, 2);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szSourceDesc[m_nSource]), strTitle) + L"<div style=\"width: 100px;\"></div>", 1, 2, rowSpan, 2);
}
else if (row == 2)
{
@@ -194,7 +194,7 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
double avgTotal = avgFactor[m_nAbsTime] * (contact.*getAvgTotal[m_nSource])();
// begin output
- tos << _T("<td colspan=\"2\" class=\"") << m_CSS;
+ tos << L"<td colspan=\"2\" class=\"" << m_CSS;
if (m_bDetail)
{
@@ -213,26 +213,26 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
if (m_bDetailPercent)
{
- tos << _T("\" title=\"")
+ tos << L"\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_amount} (#{out_ratio}) / [In] #{in_amount} (#{in_ratio})"))
- % _T("#{out_amount}") * strOut
- % _T("#{out_ratio}") * utils::ratioToPercent(numOut, numTotal)
- % _T("#{in_amount}") * strIn
- % _T("#{in_ratio}") * utils::ratioToPercent(numIn, numTotal)))
- << _T("\">");
+ % L"#{out_amount}" * strOut
+ % L"#{out_ratio}" * utils::ratioToPercent(numOut, numTotal)
+ % L"#{in_amount}" * strIn
+ % L"#{in_ratio}" * utils::ratioToPercent(numIn, numTotal)))
+ << L"\">";
}
else
{
- tos << _T("\" title=\"")
+ tos << L"\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_amount} / [In] #{in_amount}"))
- % _T("#{out_amount}") * strOut
- % _T("#{in_amount}") * strIn))
- << _T("\">");
+ % L"#{out_amount}" * strOut
+ % L"#{in_amount}" * strIn))
+ << L"\">";
}
}
else
{
- tos << _T("\">");
+ tos << L"\">";
}
if (numOut + numIn == 0)
@@ -256,12 +256,12 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
if (usePNG())
{
- tos << _T("<div class=\"n\">");
+ tos << L"<div class=\"n\">";
if (m_bShowSum)
{
tos << (m_bAbsolute ? utils::intToGrouped(numTotal) : utils::floatToGrouped(avgTotal, 1))
- << _T("<br/>");
+ << L"<br/>";
}
// draw graph
@@ -298,7 +298,7 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS,
- _T("Verdana")
+ L"Verdana"
};
HFONT hFont = CreateFontIndirect(&lf);
@@ -317,40 +317,40 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</div>");
+ tos << L"</div>";
}
else
{
if (m_bShowSum)
{
- tos << _T("<div class=\"n\">")
+ tos << L"<div class=\"n\">"
<< (m_bAbsolute ? utils::intToGrouped(numTotal) : utils::floatToGrouped(avgTotal, 1))
- << _T("</div>");
+ << L"</div>";
}
- tos << _T("<div class=\"") << m_CSS << _T("\">");
+ tos << L"<div class=\"" << m_CSS << L"\">";
if (outW != 0)
{
- tos << _T("<div class=\"obar\" style=\"width: ") << outW << _T("px;\"></div>");
+ tos << L"<div class=\"obar\" style=\"width: " << outW << L"px;\"></div>";
}
if (inW != 0)
{
- tos << _T("<div class=\"ibar\" style=\"width: ") << inW << _T("px;\"></div>");
+ tos << L"<div class=\"ibar\" style=\"width: " << inW << L"px;\"></div>";
}
if (m_bGraphPercent)
{
- tos << _T("<div class=\"otext\">") << utils::ratioToPercent(numOut, allNum) << _T("</div>");
- tos << _T("<div class=\"itext\">") << utils::ratioToPercent(numIn, allNum) << _T("</div>");
+ tos << L"<div class=\"otext\">" << utils::ratioToPercent(numOut, allNum) << L"</div>";
+ tos << L"<div class=\"itext\">" << utils::ratioToPercent(numIn, allNum) << L"</div>";
}
- tos << _T("</div>");
+ tos << L"</div>";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_nick.cpp b/plugins/HistoryStats/src/column_nick.cpp
index 95b6c2d23d..4ab72104ec 100644
--- a/plugins/HistoryStats/src/column_nick.cpp
+++ b/plugins/HistoryStats/src/column_nick.cpp
@@ -58,7 +58,7 @@ void ColNick::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) c
void ColNick::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
{
- tos << _T("<td");
+ tos << L"<td";
if (m_bDetail || (m_bContactCount && display != asContact))
{
@@ -76,30 +76,30 @@ void ColNick::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, Di
if (m_bDetail && !(m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("[First] #{first_time} / [Last] #{last_time}"))
- % _T("#{first_time}") * strFirstTime
- % _T("#{last_time}") * strLastTime));
+ % L"#{first_time}" * strFirstTime
+ % L"#{last_time}" * strLastTime));
}
else if (m_bDetail && (m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{count} contacts / [First] #{first_time} / [Last] #{last_time}"))
- % _T("#{count}") * contact.getNumContacts()
- % _T("#{first_time}") * strFirstTime
- % _T("#{last_time}") * strLastTime));
+ % L"#{count}" * contact.getNumContacts()
+ % L"#{first_time}" * strFirstTime
+ % L"#{last_time}" * strLastTime));
}
else // if (!m_bDetail && (m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{count} contacts"))
- % _T("#{count}") * contact.getNumContacts()));
+ % L"#{count}" * contact.getNumContacts()));
}
- tos << _T(" title=\"") << strTooltip << _T("\">");
+ tos << L" title=\"" << strTooltip << L"\">";
}
- else tos << _T(">");
+ else tos << L">";
if (display == asContact)
- tos << utils::htmlEscape(contact.getNick()) << _T("</td>") << ext::endl;
+ tos << utils::htmlEscape(contact.getNick()) << L"</td>" << ext::endl;
else if (display == asOmitted)
- tos << TranslateT("Omitted") << _T("</td>") << ext::endl;
+ tos << TranslateT("Omitted") << L"</td>" << ext::endl;
else
- tos << TranslateT("Totals") << _T("</td>") << ext::endl;
+ tos << TranslateT("Totals") << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_protocol.cpp b/plugins/HistoryStats/src/column_protocol.cpp
index e3a03368f8..ac583492ac 100644
--- a/plugins/HistoryStats/src/column_protocol.cpp
+++ b/plugins/HistoryStats/src/column_protocol.cpp
@@ -14,7 +14,7 @@ void ColProtocol::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa
void ColProtocol::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
{
if (display == asContact)
- tos << _T("<td>") << utils::htmlEscape(contact.getProtocol()) << _T("</td>") << ext::endl;
+ tos << L"<td>" << utils::htmlEscape(contact.getProtocol()) << L"</td>" << ext::endl;
else
- tos << _T("<td>&nbsp;</td>");
+ tos << L"<td>&nbsp;</td>";
}
diff --git a/plugins/HistoryStats/src/column_rank.cpp b/plugins/HistoryStats/src/column_rank.cpp
index 140ae94adc..93f2027961 100644
--- a/plugins/HistoryStats/src/column_rank.cpp
+++ b/plugins/HistoryStats/src/column_rank.cpp
@@ -19,9 +19,9 @@ void ColRank::impl_outputBegin()
void ColRank::impl_outputRenderRow(ext::ostream& tos, const Contact&, DisplayType display)
{
if (display == asContact)
- tos << _T("<td class=\"num\">")
- << utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{rank}.")) % _T("#{rank}") * (m_nNextRank++)))
- << _T("</td>") << ext::endl;
+ tos << L"<td class=\"num\">"
+ << utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{rank}.")) % L"#{rank}" * (m_nNextRank++)))
+ << L"</td>" << ext::endl;
else
- tos << _T("<td>&nbsp;</td>");
+ tos << L"<td>&nbsp;</td>";
}
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp
index 29e2ab4970..0b3be3ca4f 100644
--- a/plugins/HistoryStats/src/column_split.cpp
+++ b/plugins/HistoryStats/src/column_split.cpp
@@ -66,8 +66,8 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
m_hBlockUnit = Opt.insertCombo(hTemp, TranslateT("Bar unit"));
- m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per bar"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Bars per graph"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per bar"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Bars per graph"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
@@ -139,7 +139,7 @@ ext::string ColSplit::impl_contactDataGetUID() const
{
SplitParams params = getParams();
- return ext::str(ext::format(_T("split-|-|-|-|-|"))
+ return ext::str(ext::format(L"split-|-|-|-|-|")
% m_nSource
% m_nSourceType
% params.hours_in_block
@@ -249,13 +249,13 @@ Column::StyleList ColSplit::impl_outputGetAdditionalStyles(IDProvider& idp)
m_CSS = idp.getID();
l.push_back(StylePair(
- _T("div.") + m_CSS,
- ext::str(ext::format(_T("position: relative; left: 50%; margin-left: -|px; width: |px; height: 50px;"))
+ L"div." + m_CSS,
+ ext::str(ext::format(L"position: relative; left: 50%; margin-left: -|px; width: |px; height: 50px;")
% ((5 * params.blocks_in_column - 1) / 2)
% (5 * params.blocks_in_column - 1))));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 4px; height: 50px; overflow: hidden;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div"), _T("position: absolute; left: 0px; width: 4px; height: 50px; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 4px; height: 50px; overflow: hidden;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div", L"position: absolute; left: 0px; width: 4px; height: 50px; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
}
return l;
@@ -285,10 +285,10 @@ void ColSplit::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
{
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % _T("#{data}") * TranslateTS(szSourceDesc[3 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateTS(szSourceDesc[3 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(_T("<div style=\"width: |px;\"></div>")) % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(L"<div style=\"width: |px;\"></div>") % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
}
}
@@ -370,7 +370,7 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
if (usePNG())
{
- tos << _T("<td class=\"img_bottom\">");
+ tos << L"<td class=\"img_bottom\">";
// draw graph
Canvas canvas(5 * params.blocks_in_column - 1, 50);
@@ -400,15 +400,15 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_bottom\">")
- << _T("<div class=\"") << m_CSS << _T("\">") << ext::endl;
+ tos << L"<td class=\"bars_bottom\">"
+ << L"<div class=\"" << m_CSS << L"\">" << ext::endl;
upto_each_(j, params.blocks_in_column)
{
@@ -421,41 +421,41 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
if (params.effective_vis_mode == 0)
{
divTitle = ext::str(ext::kformat(TranslateT("[#{hour}:00-#{hour}:59] #{amount}"))
- % _T("#{hour}") * utils::intToPadded(j, 2)
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{hour}" * utils::intToPadded(j, 2)
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
else if (params.effective_vis_mode == 1)
{
divTitle = ext::str(ext::kformat(TranslateT("[#{day}] #{amount}"))
- % _T("#{day}") * utils::stripPrefix(_T("wday3:"), TranslateTS(szWDayName[j]))
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{day}" * utils::stripPrefix(L"wday3:", TranslateTS(szWDayName[j]))
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
else
{
divTitle = ext::str(ext::kformat(TranslateT("#{amount}"))
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
- tos << _T("<div title=\"") << utils::htmlEscape(divTitle) << _T("\" style=\"left: ") << (5 * j) << _T("px;\">");
+ tos << L"<div title=\"" << utils::htmlEscape(divTitle) << L"\" style=\"left: " << (5 * j) << L"px;\">";
}
else if (part_top != 0)
{
- tos << _T("<div style=\"left: ") << (5 * j) << _T("px;\">");
+ tos << L"<div style=\"left: " << (5 * j) << L"px;\">";
}
if (part_top != 0)
{
int bar_len = (50 * part_top + top - 1) / top;
- tos << _T("<div style=\"top: ") << (50 - bar_len) << _T("px;\"></div>");
+ tos << L"<div style=\"top: " << (50 - bar_len) << L"px;\"></div>";
}
if (m_bDetail || part_top != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp
index e9db4d32fc..17e139ba78 100644
--- a/plugins/HistoryStats/src/column_splittimeline.cpp
+++ b/plugins/HistoryStats/src/column_splittimeline.cpp
@@ -73,21 +73,21 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou
OptionsCtrl::Radio hTempRadio;
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
- m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hGroup, TranslateT("\"Split\" type"));
m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Hours of day"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hHODGroup = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hHODGroup = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), L"", OptionsCtrl::OCF_NUMBER);
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Days of week"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hDOWGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hDOWGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), L"", OptionsCtrl::OCF_NUMBER);
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
m_hBlockUnit = Opt.insertCombo(hTemp, TranslateT("Block unit"));
- m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
- m_hCustomGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hCustomGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), L"", OptionsCtrl::OCF_NUMBER);
m_hTopPerColumn = Opt.insertCheck(hGroup, TranslateT("Calculate maximum per column (not per graph)"));
static const TCHAR* sourceTexts[] = {
@@ -162,7 +162,7 @@ ext::string ColSplitTimeline::impl_contactDataGetUID() const
{
SplitParams params = getParams();
- return ext::str(ext::format(_T("splittimeline-|-|-|"))
+ return ext::str(ext::format(L"splittimeline-|-|-|")
% m_nSource
% params.hours_in_block
% params.alignment);
@@ -275,10 +275,10 @@ void ColSplitTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int r
{
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % _T("#{data}") * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + _T("<div style=\"width: ") + utils::intToString(m_nTimelineWidth) + _T("px;\"></div>"), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
}
@@ -459,7 +459,7 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co
}
}
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -548,10 +548,10 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType)
@@ -559,7 +559,7 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co
SplitParams params = getParams();
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -631,8 +631,8 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp
index e3b6596c06..b6a5dc55c5 100644
--- a/plugins/HistoryStats/src/column_timeline.cpp
+++ b/plugins/HistoryStats/src/column_timeline.cpp
@@ -43,9 +43,9 @@ void ColTimeline::impl_configWrite(SettingsTree& settings) const
void ColTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
{
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
- m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Details for every bar (tooltip)"));
- m_hDays = Opt.insertEdit (hGroup, TranslateT("Number of days to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hDays = Opt.insertEdit (hGroup, TranslateT("Number of days to group"), L"", OptionsCtrl::OCF_NUMBER);
static const TCHAR* sourceTexts[] = {
LPGENT("Characters (incoming)"),
@@ -96,7 +96,7 @@ int ColTimeline::impl_configGetRestrictions(ext::string* pDetails) const
ext::string ColTimeline::impl_contactDataGetUID() const
{
- return ext::str(ext::format(_T("timeline-|")) % m_nSource);
+ return ext::str(ext::format(L"timeline-|") % m_nSource);
}
void ColTimeline::impl_contactDataPrepare(Contact& contact) const
@@ -168,20 +168,20 @@ Column::StyleList ColTimeline::impl_outputGetAdditionalStyles(IDProvider& idp)
{
m_CSS = idp.getID();
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -") + utils::intToString(m_nTimelineWidth / 2) + _T("px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; height: 49px;")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -" + utils::intToString(m_nTimelineWidth / 2) + L"px; width: " + utils::intToString(m_nTimelineWidth) + L"px; height: 49px;"));
if (m_nSourceType != 3)
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div"), _T("position: absolute; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.l"), _T("position: absolute; top: 24px; left: 0px; height: 1px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; background-color: ") + utils::colorToHTML(con::ColorBarLine) + _T("; z-index: 9;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div", L"position: absolute; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.l", L"position: absolute; top: 24px; left: 0px; height: 1px; width: " + utils::intToString(m_nTimelineWidth) + L"px; background-color: " + utils::colorToHTML(con::ColorBarLine) + L"; z-index: 9;"));
}
else
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden; z-index: 9;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div.o"), _T("position: absolute; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div.i"), _T("position: absolute; top: 24px; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.l"), _T("position: absolute; top: 24px; left: 0px; height: 1px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; background-color: ") + utils::colorToHTML(con::ColorIOLine) + _T("; z-index: 8;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden; z-index: 9;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div.o", L"position: absolute; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div.i", L"position: absolute; top: 24px; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorIn) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.l", L"position: absolute; top: 24px; left: 0px; height: 1px; width: " + utils::intToString(m_nTimelineWidth) + L"px; background-color: " + utils::colorToHTML(con::ColorIOLine) + L"; z-index: 8;"));
}
}
@@ -208,9 +208,9 @@ void ColTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("Timeline for #{data}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateT("Timeline"), strTitle) + _T("<div style=\"width: ") + utils::intToString(m_nTimelineWidth) + _T("px;\"></div>"), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateT("Timeline"), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
}
@@ -271,7 +271,7 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact
if (usePNG())
{
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -311,16 +311,16 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_middle\">")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div class=\"l\"></div>") << ext::endl;
+ tos << L"<td class=\"bars_middle\">"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div class=\"l\"></div>" << ext::endl;
for (curDay = m_nFirstDay; curDay <= m_nLastDay; curDay += m_nDays)
{
@@ -342,42 +342,42 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact
{
int rightDay = min(curDay + m_nDays - 1, m_nLastDay);
- tos << _T("<div title=\"");
+ tos << L"<div title=\"";
if (rightDay != curDay)
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{start_date}-#{end_date}] #{amount}"))
- % _T("#{start_date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{end_date}") * utils::timestampToDate(rightDay * 86400)
- % _T("#{amount}") * utils::intToGrouped(part_top)));
+ % L"#{start_date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{end_date}" * utils::timestampToDate(rightDay * 86400)
+ % L"#{amount}" * utils::intToGrouped(part_top)));
}
else
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{date}] #{amount}"))
- % _T("#{date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{amount}") * utils::intToGrouped(part_top)));
+ % L"#{date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{amount}" * utils::intToGrouped(part_top)));
}
- tos << _T("\" style=\"left: ")
- << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"\" style=\"left: "
+ << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
else if (bar_len != 0)
{
- tos << _T("<div style=\"left: ") << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"<div style=\"left: " << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
if (bar_len != 0)
{
- tos << _T("<div style=\"top: ") << (24 - bar_len) << _T("px; height: ") << (1 + 2 * bar_len) << _T("px;\"></div>");
+ tos << L"<div style=\"top: " << (24 - bar_len) << L"px; height: " << (1 + 2 * bar_len) << L"px;\"></div>";
}
if (m_bDetail || bar_len != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
@@ -389,7 +389,7 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact
if (usePNG())
{
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -446,16 +446,16 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact
if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_middle\">")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div class=\"l\"></div>") << ext::endl;
+ tos << L"<td class=\"bars_middle\">"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div class=\"l\"></div>" << ext::endl;
for (curDay = m_nFirstDay; curDay <= m_nLastDay; curDay += m_nDays)
{
@@ -486,47 +486,47 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact
{
int rightDay = min(curDay + m_nDays - 1, m_nLastDay);
- tos << _T("<div title=\"");
+ tos << L"<div title=\"";
if (rightDay != curDay)
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{start_date}-#{end_date}] #{out_amount} (out) / #{in_amount} (in)"))
- % _T("#{start_date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{end_date}") * utils::timestampToDate(rightDay * 86400)
- % _T("#{out_amount}") * utils::intToGrouped(part_out)
- % _T("#{in_amount}") * utils::intToGrouped(part_in)));
+ % L"#{start_date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{end_date}" * utils::timestampToDate(rightDay * 86400)
+ % L"#{out_amount}" * utils::intToGrouped(part_out)
+ % L"#{in_amount}" * utils::intToGrouped(part_in)));
}
else
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{date}] #{out_amount} (out) / #{in_amount} (in)"))
- % _T("#{date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{out_amount}") * utils::intToGrouped(part_out)
- % _T("#{in_amount}") * utils::intToGrouped(part_in)));
+ % L"#{date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{out_amount}" * utils::intToGrouped(part_out)
+ % L"#{in_amount}" * utils::intToGrouped(part_in)));
}
- tos << _T("\" style=\"left: ")
- << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"\" style=\"left: "
+ << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
else if (bar_len != 0)
{
- tos << _T("<div style=\"left: ") << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"<div style=\"left: " << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
if (bar_len < 0)
{
- tos << _T("<div class=\"i\" style=\"height: ") << -bar_len << _T("px;\"></div>");
+ tos << L"<div class=\"i\" style=\"height: " << -bar_len << L"px;\"></div>";
}
else if (bar_len > 0)
{
- tos << _T("<div class=\"o\" style=\"top: ") << (25 - bar_len) << _T("px; height: ") << bar_len << _T("px;\"></div>");
+ tos << L"<div class=\"o\" style=\"top: " << (25 - bar_len) << L"px; height: " << bar_len << L"px;\"></div>";
}
if (m_bDetail || bar_len != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_wordcount.cpp b/plugins/HistoryStats/src/column_wordcount.cpp
index d058b1bbe1..a00d9c510d 100644
--- a/plugins/HistoryStats/src/column_wordcount.cpp
+++ b/plugins/HistoryStats/src/column_wordcount.cpp
@@ -125,8 +125,8 @@ void ColWordCount::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSp
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[m_nVisMode])
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
@@ -142,18 +142,18 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac
{
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped(pWordCount[0])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{distict_words} distinct"))
- % _T("#{distict_words}") * utils::intToGrouped(pWordCount[1])))
- << _T("\">")
+ % L"#{distict_words}" * utils::intToGrouped(pWordCount[1])))
+ << L"\">"
<< utils::intToGrouped(pWordCount[0])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
@@ -162,18 +162,18 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac
{
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped(pWordCount[1])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{words} total"))
- % _T("#{words}") * utils::intToGrouped(pWordCount[0])))
- << _T("\">")
+ % L"#{words}" * utils::intToGrouped(pWordCount[0])))
+ << L"\">"
<< utils::intToGrouped(pWordCount[1])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
@@ -182,19 +182,19 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac
{
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::ratioToString(pWordCount[0], pWordCount[1], 2)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{words} total / #{distict_words} distinct"))
- % _T("#{words}") * utils::intToGrouped(pWordCount[0])
- % _T("#{distict_words}") * utils::intToGrouped(pWordCount[1])))
- << _T("\">")
+ % L"#{words}" * utils::intToGrouped(pWordCount[0])
+ % L"#{distict_words}" * utils::intToGrouped(pWordCount[1])))
+ << L"\">"
<< utils::ratioToString(pWordCount[0], pWordCount[1], 2)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
diff --git a/plugins/HistoryStats/src/column_words.cpp b/plugins/HistoryStats/src/column_words.cpp
index da16922fa9..6de8d42440 100644
--- a/plugins/HistoryStats/src/column_words.cpp
+++ b/plugins/HistoryStats/src/column_words.cpp
@@ -136,8 +136,8 @@ void ColWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Most common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Least common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Longest words"));
- m_hNum = Opt.insertEdit (hGroup, TranslateT("Number of words"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hOffset = Opt.insertEdit (hGroup, TranslateT("Number of words to skip in output"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hNum = Opt.insertEdit (hGroup, TranslateT("Number of words"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hOffset = Opt.insertEdit (hGroup, TranslateT("Number of words to skip in output"), L"", OptionsCtrl::OCF_NUMBER);
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Word count for each word (tooltip)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hDetailInOut = Opt.insertCheck(m_hDetail, TranslateT("Show separate counts for incoming/outgoing"));
m_hInOutColor = Opt.insertCheck(hGroup, TranslateT("Color words according to in/out ratio"));
@@ -207,8 +207,8 @@ Column::StyleList ColWords::impl_outputGetAdditionalStyles(IDProvider&)
if (m_bInOutColor)
{
- l.push_back(StylePair(_T("span.onum"), _T("color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("span.inum"), _T("color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
+ l.push_back(StylePair(L"span.onum", L"color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"span.inum", L"color: " + utils::colorToHTML(con::ColorIn) + L";"));
}
return l;
@@ -231,8 +231,8 @@ void ColWords::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan)
if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[m_nVisMode])
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
@@ -242,7 +242,7 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
{
const WordList* pWords = reinterpret_cast<const WordList*>(contact.getSlot(contactDataTransformSlotGet()));
- tos << _T("<td>");
+ tos << L"<td>";
vector_each_(j, *pWords)
{
@@ -257,21 +257,21 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
else
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_words} / [In] #{in_words}"))
- % _T("#{out_words}") * w.first.out
- % _T("#{in_words}") * w.first.in));
+ % L"#{out_words}" * w.first.out
+ % L"#{in_words}" * w.first.in));
}
if (!m_bInOutColor || m_nSource != 2 || w.first.in == w.first.out)
{
- tos << _T("<span title=\"") << strTooltip << _T("\">")
- << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span title=\"" << strTooltip << L"\">"
+ << utils::htmlEscape(w.second) << L"</span>";
}
else
{
- tos << _T("<span class=\"")
- << ((w.first.out - w.first.in > 0) ? _T("onum") : _T("inum"))
- << _T("\" title=\"") << strTooltip << _T("\">")
- << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span class=\""
+ << ((w.first.out - w.first.in > 0) ? L"onum" : L"inum")
+ << L"\" title=\"" << strTooltip << L"\">"
+ << utils::htmlEscape(w.second) << L"</span>";
}
}
else
@@ -282,17 +282,17 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D
}
else
{
- tos << _T("<span class=\"")
- << ((w.first.out - w.first.in > 0) ? _T("onum") : _T("inum"))
- << _T("\">") << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span class=\""
+ << ((w.first.out - w.first.in > 0) ? L"onum" : L"inum")
+ << L"\">" << utils::htmlEscape(w.second) << L"</span>";
}
}
if (j < pWords->size() - 1)
{
- tos << _T(", ");
+ tos << L", ";
}
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp
index c3e17cfe2e..48d1dfb4da 100644
--- a/plugins/HistoryStats/src/dlgfilterwords.cpp
+++ b/plugins/HistoryStats/src/dlgfilterwords.cpp
@@ -226,7 +226,7 @@ void DlgFilterWords::onSetSelChanging(HANDLE hItem, INT_PTR dwData)
if (GetWindowText(hText, szText, nLen + 1)) {
ext::string strText = szText;
- utils::replaceAllInPlace(strText, _T("\r"), _T(""));
+ utils::replaceAllInPlace(strText, L"\r", L"");
pFilter->clearWords();
ext::string::size_type nPos = strText.find('\n');
@@ -270,7 +270,7 @@ void DlgFilterWords::onSetSelChanged(HANDLE hItem, INT_PTR dwData)
citer_each_(WordSet, i, pFilter->getWords())
{
strWords += *i;
- strWords += _T("\r\n");
+ strWords += L"\r\n";
}
if (!strWords.empty())
@@ -279,8 +279,8 @@ void DlgFilterWords::onSetSelChanged(HANDLE hItem, INT_PTR dwData)
SetDlgItemText(m_hWnd, IDC_WORDS, strWords.c_str());
}
else {
- SetDlgItemText(m_hWnd, IDC_SETNAME, _T(""));
- SetDlgItemText(m_hWnd, IDC_WORDS, _T(""));
+ SetDlgItemText(m_hWnd, IDC_SETNAME, L"");
+ SetDlgItemText(m_hWnd, IDC_WORDS, L"");
}
// (de)activate band controls
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp
index b164d29319..03125b1857 100644
--- a/plugins/HistoryStats/src/dlgoption.cpp
+++ b/plugins/HistoryStats/src/dlgoption.cpp
@@ -246,11 +246,11 @@ void DlgOption::onProblemInfo()
citer_each_(HelpVec, i, help)
{
- msg += _T("\r\n\r\n");
+ msg += L"\r\n\r\n";
msg += i->first;
if (!i->second.empty()) {
- msg += _T("\r\n - ");
+ msg += L"\r\n - ";
msg += i->second;
}
}
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
index e7a7368eda..cf385fe4ad 100644
--- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
@@ -54,7 +54,7 @@ INT_PTR CALLBACK DlgOption::SubColumns::staticAddProc(HWND hDlg, UINT msg, WPARA
int nData = SendMessage(hWndList, LB_GETITEMDATA, nIndex, 0);
SetDlgItemText(hDlg, IDC_DESCRIPTION, Column::getColInfo(nData).m_Description);
}
- else SetDlgItemText(hDlg, IDC_DESCRIPTION, _T(""));
+ else SetDlgItemText(hDlg, IDC_DESCRIPTION, L"");
}
else if (HIWORD(wParam) == LBN_DBLCLK)
SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), NULL);
@@ -415,14 +415,14 @@ void DlgOption::SubColumns::onColSelChanged(HANDLE hItem, INT_PTR)
if (restrictions & Column::crHTMLMask) {
// MEMO: don't distinguish between full/partial since not yet supported
- msg += _T("HTML");
+ msg += L"HTML";
}
if (restrictions & Column::crPNGMask) {
if (restrictions & Column::crHTMLMask)
- msg += _T(", ");
+ msg += L", ";
- msg += ((restrictions & Column::crPNGMask) == Column::crPNGPartial) ? TranslateT("PNG (partial)") : _T("PNG");
+ msg += ((restrictions & Column::crPNGMask) == Column::crPNGPartial) ? TranslateT("PNG (partial)") : L"PNG";
}
tvi.item.pszText = const_cast<TCHAR*>(msg.c_str());
@@ -450,18 +450,18 @@ void DlgOption::SubColumns::onColSelChanged(HANDLE hItem, INT_PTR)
*/
if (!bPNGOutput) {
- msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? _T("HTML") : TranslateT("Nothing (column will be skipped)");
+ msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? L"HTML" : TranslateT("Nothing (column will be skipped)");
}
else if (nPNGMode != Settings::pmPreferHTML) // && bPNGOutput
{
if (restrictions == (Column::crHTMLFull | Column::crPNGPartial))
msg += (nPNGMode == Settings::pmHTMLFallBack) ? TranslateT("HTML as fallback") : TranslateT("PNG, ignoring some settings");
else // !(html-full | png-partial)
- msg += ((restrictions & Column::crPNGMask) == Column::crPNGFull) ? _T("PNG") : _T("HTML");
+ msg += ((restrictions & Column::crPNGMask) == Column::crPNGFull) ? L"PNG" : L"HTML";
}
else // bPNGOutput && nPNGMode == Settings::pmPreferHTML
{
- msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? _T("HTML") : _T("PNG");
+ msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? L"HTML" : L"PNG";
}
tvi.item.pszText = const_cast<TCHAR*>(msg.c_str());
@@ -675,10 +675,10 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
pHelp->push_back(HelpPair());
pHelp->back().first = TranslateTS(pCol->getTitle());
- pHelp->back().first += _T(": ");
+ pHelp->back().first += L": ";
pHelp->back().first += TranslateT("HTML output unsupported.");
- pHelp->back().second = _T("");
+ pHelp->back().second = L"";
}
++nConflicts;
@@ -695,7 +695,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
pHelp->push_back(HelpPair());
pHelp->back().first = TranslateTS(pCol->getTitle());
- pHelp->back().first += _T(": ");
+ pHelp->back().first += L": ";
if (nPNGMode == Settings::pmHTMLFallBack)
pHelp->back().first += TranslateT("Fallback to HTML due to setting.");
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
index 88a3cec5c7..d04db4d390 100644
--- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
@@ -42,9 +42,9 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
ext::string linkLabel = linkURLs.substr(posURLs + 1);
- linkLabel += _T(" [");
+ linkLabel += L" [";
linkLabel += linkTexts.substr(posTexts + 1);
- linkLabel += _T("]");
+ linkLabel += L"]";
SetDlgItemText(hDlg, LinkIDs[nCurLink], linkLabel.c_str());
@@ -97,7 +97,7 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA
TCHAR* szTitle = new TCHAR[nLen + 1];
if (GetWindowText(hLink, szTitle, nLen + 1)) {
- TCHAR* szEndOfURL = (TCHAR*)ext::strfunc::str(szTitle, _T(" ["));
+ TCHAR* szEndOfURL = (TCHAR*)ext::strfunc::str(szTitle, L" [");
if (szEndOfURL) {
*szEndOfURL = '\0';
g_pSettings->openURL(szTitle);
@@ -316,7 +316,7 @@ void DlgOption::SubGlobal::initSupportInfo()
LPGENT(""),
LPGENT(""),
LPGENT(""),
- _T("")
+ L""
},
};
diff --git a/plugins/HistoryStats/src/dlgoption_subinput.cpp b/plugins/HistoryStats/src/dlgoption_subinput.cpp
index 90b9ff8e66..23ec3e4fe2 100644
--- a/plugins/HistoryStats/src/dlgoption_subinput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subinput.cpp
@@ -71,9 +71,9 @@ void DlgOption::SubInput::onWMInitDialog()
OptionsCtrl::Item hTemp, hTemp2;
hTemp = m_Options.insertGroup(NULL, TranslateT("History interpretation"), OptionsCtrl::OCF_ROOTGROUP);
- m_hChatSessionMinDur = m_Options.insertEdit(hTemp, TranslateT("Time a chat session must last to be counted (seconds)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hChatSessionMinDur = m_Options.insertEdit(hTemp, TranslateT("Time a chat session must last to be counted (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hWordDelimiters = m_Options.insertEdit(hTemp, TranslateT("Word delimiting characters"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Contact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hProtocols = m_Options.insertGroup(hTemp, TranslateT("Ignore all contacts with protocol..."));
@@ -92,9 +92,9 @@ void DlgOption::SubInput::onWMInitDialog()
m_Options.insertRadio(hTemp2, m_hMergeMode, TranslateT("Don't merge events"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Message filtering"), OptionsCtrl::OCF_ROOTGROUP);
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Ignore messages..."));
- m_hIgnoreOlder = m_Options.insertEdit(hTemp2, TranslateT("...older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hIgnoreBefore = m_Options.insertDateTime(hTemp2, TranslateT("...before date (none=no limit)"), 0, _T("%Y-%m-%d"), OptionsCtrl::OCF_ALLOWNONE);
- m_hIgnoreAfter = m_Options.insertDateTime(hTemp2, TranslateT("...after date (none=no limit)"), 0, _T("%Y-%m-%d"), OptionsCtrl::OCF_ALLOWNONE);
+ m_hIgnoreOlder = m_Options.insertEdit(hTemp2, TranslateT("...older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreBefore = m_Options.insertDateTime(hTemp2, TranslateT("...before date (none=no limit)"), 0, L"%Y-%m-%d", OptionsCtrl::OCF_ALLOWNONE);
+ m_hIgnoreAfter = m_Options.insertDateTime(hTemp2, TranslateT("...after date (none=no limit)"), 0, L"%Y-%m-%d", OptionsCtrl::OCF_ALLOWNONE);
m_hFilterRawRTF = m_Options.insertCheck(hTemp, TranslateT("Strip raw RTF control sequences from message"));
m_hFilterBBCodes = m_Options.insertCheck(hTemp, TranslateT("Strip BBCode tags from messages"));
diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
index dce580a1f6..866c865dd6 100644
--- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp
+++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp
@@ -108,17 +108,17 @@ void DlgOption::SubOutput::onWMInitDialog()
hTemp2 = m_Options.insertGroup(m_hOmitContacts, TranslateT("Criteria"));
m_hOmitByValue = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that didn't produce a certain amount of data"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hOmitByValueData = m_Options.insertCombo(m_hOmitByValue, TranslateT("Omit if"));
- m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), L"", OptionsCtrl::OCF_NUMBER);
m_hOmitByTime = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that were inactive for some time"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hOmitByRank = m_Options.insertCheck(hTemp2, TranslateT("Omit all contacts not in \"Top n\""), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), _T("10"), OptionsCtrl::OCF_NUMBER);
+ m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), L"10", OptionsCtrl::OCF_NUMBER);
m_hOmittedInTotals = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include omitted contacts in totals"));
m_hOmittedInExtraRow = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include totals of omitted contacts in additional row"));
m_hCalcTotals = m_Options.insertCheck(hTemp, TranslateT("Include totals in statistics"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hTableHeader = m_Options.insertCheck(hTemp, TranslateT("Output header"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS);
- m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), _T("0"), OptionsCtrl::OCF_NUMBER);
+ m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), L"0", OptionsCtrl::OCF_NUMBER);
m_hTableHeaderVerbose = m_Options.insertCheck(m_hTableHeader, TranslateT("Make column titles more verbose"));
m_hHeaderTooltips = m_Options.insertCheck(m_hTableHeader, TranslateT("Show tooltips with detailed information in column titles"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, TranslateT("Only show if a custom title was entered or if titles are not verbose"));
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp
index 5c8ae3df8f..3f105824fa 100644
--- a/plugins/HistoryStats/src/iconlib.cpp
+++ b/plugins/HistoryStats/src/iconlib.cpp
@@ -62,7 +62,7 @@ void IconLib::init()
GetModuleFileNameA(g_hInst, szModule, MAX_PATH);
- m_Section = _T("HistoryStats");
+ m_Section = L"HistoryStats";
m_IconName = "historystats_";
array_each_(i, m_IconInfo)
@@ -70,7 +70,7 @@ void IconLib::init()
ext::string strSection = m_Section;
if (m_IconInfo[i].szSection) {
- strSection += _T("/");
+ strSection += L"/";
strSection += TranslateTS(m_IconInfo[i].szSection);
}
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 4f7a1a09d4..f44efb8a85 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -211,10 +211,10 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam)
// ask user if this is really what he wants
ext::string strConfirm = ext::str(ext::kformat(TranslateT("You're going to copy the complete history of #{source_name} (#{source_proto}) to #{target_name} (#{target_proto}). Afterwards, the target history will contain entries from both histories. There is no way to revert this operation. Be careful! This is a rather big operation and has the potential to damage your database. Be sure to have a backup of this database before performing this operation.\r\n\r\nAre you sure you would like to continue?")))
- % _T("#{source_name}") * mu::clist::getContactDisplayName(g_hHistoryCopyContact)
- % _T("#{source_proto}") * utils::fromA(GetContactProto(g_hHistoryCopyContact))
- % _T("#{target_name}") * mu::clist::getContactDisplayName(hTarget)
- % _T("#{target_proto}") * utils::fromA(GetContactProto(hTarget)));
+ % L"#{source_name}" * mu::clist::getContactDisplayName(g_hHistoryCopyContact)
+ % L"#{source_proto}" * utils::fromA(GetContactProto(g_hHistoryCopyContact))
+ % L"#{target_name}" * mu::clist::getContactDisplayName(hTarget)
+ % L"#{target_proto}" * utils::fromA(GetContactProto(hTarget)));
if (MessageBox(0, strConfirm.c_str(), TranslateT("HistoryStats - Confirm")), MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2) != IDYES)
{
@@ -265,9 +265,9 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam)
// output summary
ext::string strSummary = ext::str(ext::kformat(TranslateT("Successfully read #{success} events of which #{fail_add} couldn't be added to the target history. #{fail} events couldn't be read from the source history.")))
- % _T("#{success}") * dwCountSuccess
- % _T("#{fail}") * dwCountFailRead
- % _T("#{fail_add}") * dwCountFailAdd);
+ % L"#{success}" * dwCountSuccess
+ % L"#{fail}" * dwCountFailRead
+ % L"#{fail_add}" * dwCountFailAdd);
MessageBox(0, strSummary.c_str(), TranslateT("HistoryStats - Information")), MB_ICONINFORMATION);
@@ -412,7 +412,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- OutputDebugString(_T("HistoryStats: MirandaPluginInfoEx() was called.\n"));
+ OutputDebugString(L"HistoryStats: MirandaPluginInfoEx() was called.\n");
// MEMO: (don't) fail, if version is below minimum
return &g_pluginInfoEx;
@@ -431,8 +431,8 @@ extern "C" __declspec(dllexport) int Load()
{
MessageBox(
0,
- _T("Failed to register a required window class. Can't continue loading plugin."),
- _T("HistoryStats - Error"),
+ L"Failed to register a required window class. Can't continue loading plugin.",
+ L"HistoryStats - Error",
MB_OK | MB_ICONERROR);
return 1;
@@ -443,11 +443,11 @@ extern "C" __declspec(dllexport) int Load()
{
MessageBox(
0,
- _T("This version of HistoryStats isn't compatible with your Miranda NG ")
- _T("version. Possibly, your Miranda NG is outdated or you are trying to ")
- _T("use the Unicode version with a non-Unicode Miranda NG.\r\n\r\n")
- _T("Please go to the plugin's homepage and check the requirements."),
- _T("HistoryStats - Error"),
+ L"This version of HistoryStats isn't compatible with your Miranda NG "
+ L"version. Possibly, your Miranda NG is outdated or you are trying to "
+ L"use the Unicode version with a non-Unicode Miranda NG.\r\n\r\n"
+ L"Please go to the plugin's homepage and check the requirements.",
+ L"HistoryStats - Error",
MB_OK | MB_ICONERROR);
return 1;
diff --git a/plugins/HistoryStats/src/message.cpp b/plugins/HistoryStats/src/message.cpp
index f4112637e3..66a928bc8a 100644
--- a/plugins/HistoryStats/src/message.cpp
+++ b/plugins/HistoryStats/src/message.cpp
@@ -36,22 +36,22 @@ void Message::makeRawAvailable()
void Message::stripRawRTF()
{
- if (m_Raw.substr(0, 6) == _T("{\\rtf1"))
+ if (m_Raw.substr(0, 6) == L"{\\rtf1")
m_Raw = RTFFilter::filter(m_Raw);
}
void Message::stripBBCodes()
{
static const TCHAR* szSimpleBBCodes[][2] = {
- { _T("[b]"), _T("[/b]") },
- { _T("[u]"), _T("[/u]") },
- { _T("[i]"), _T("[/i]") },
- { _T("[s]"), _T("[/s]") },
+ { L"[b]", L"[/b]" },
+ { L"[u]", L"[/u]" },
+ { L"[i]", L"[/i]" },
+ { L"[s]", L"[/s]" },
};
static const TCHAR* szParamBBCodes[][2] = {
- { _T("[url="), _T("[/url]") },
- { _T("[color="), _T("[/color]") },
+ { L"[url=", L"[/url]" },
+ { L"[color=", L"[/color]" },
};
// convert raw string to lower case
@@ -120,11 +120,11 @@ void Message::stripBBCodes()
void Message::filterLinks()
{
- static const TCHAR* szSpaces = _T(" \r\r\n");
- static const TCHAR* szPrefixes = _T("([{<:\"'");
- static const TCHAR* szSuffixes = _T(".,:;!?)]}>\"'");
- static const TCHAR* szValidProtocol = _T("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
- static const TCHAR* szValidHost = _T(".-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+ static const TCHAR* szSpaces = L" \r\r\n";
+ static const TCHAR* szPrefixes = L"([{<:\"'";
+ static const TCHAR* szSuffixes = L".,:;!?)]}>\"'";
+ static const TCHAR* szValidProtocol = L"abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ static const TCHAR* szValidHost = L".-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// init with raw text
m_WithoutLinks = getRaw();
@@ -134,7 +134,7 @@ void Message::filterLinks()
// detect: protocol://[user[:password]@]host[/path]
while (true) {
- if ((pos = msg.find(_T("://"), pos + 1)) == ext::string::npos)
+ if ((pos = msg.find(L"://", pos + 1)) == ext::string::npos)
break;
// find start of URL
@@ -187,7 +187,7 @@ void Message::filterLinks()
pos = -1;
while (true) {
- if ((pos = msg.find(_T("www."), pos + 1)) == ext::string::npos)
+ if ((pos = msg.find(L"www.", pos + 1)) == ext::string::npos)
break;
// find end of URL
@@ -214,7 +214,7 @@ void Message::filterLinks()
if (pos_invalid == ext::string::npos || pos_invalid >= pos_slash) {
if (std::count(msg.begin() + pos_at + 1, msg.begin() + pos_slash, '.') >= 1) {
- ext::string link = _T("http://") + msg.substr(pos, pos_last - pos + 1);
+ ext::string link = L"http://" + msg.substr(pos, pos_last - pos + 1);
// remove extracted link from message text
msg.erase(pos, link.length() - 7);
@@ -262,8 +262,8 @@ void Message::filterLinks()
pos = pos_last - (link.length());
// prepend "mailto:" if missing
- if (link.substr(0, 7) != _T("mailto:")) {
- link.insert(0, _T("mailto:"));
+ if (link.substr(0, 7) != L"mailto:") {
+ link.insert(0, L"mailto:");
}
// TODO: put link in list
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp
index 35bce22df6..beb1932627 100644
--- a/plugins/HistoryStats/src/mirandacontact.cpp
+++ b/plugins/HistoryStats/src/mirandacontact.cpp
@@ -118,7 +118,7 @@ void MirandaContact::endRead()
{
#if defined(_DEBUG)
if (m_CIs.size() + m_EIs.size() + m_SpareEIs.size() > 0) {
- ext::string strLog = ext::str(ext::format(_T("Freeing | CIs and |+| EIs...\n")) % m_CIs.size() % m_EIs.size() % m_SpareEIs.size());
+ ext::string strLog = ext::str(ext::format(L"Freeing | CIs and |+| EIs...\n") % m_CIs.size() % m_EIs.size() % m_SpareEIs.size());
OutputDebugString(strLog.c_str());
}
diff --git a/plugins/HistoryStats/src/optionsctrl.cpp b/plugins/HistoryStats/src/optionsctrl.cpp
index 157464195f..2359259bad 100644
--- a/plugins/HistoryStats/src/optionsctrl.cpp
+++ b/plugins/HistoryStats/src/optionsctrl.cpp
@@ -38,7 +38,7 @@ HANDLE OptionsCtrl::insertRadio(HANDLE hParent, HANDLE hSibling, const TCHAR* sz
return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTRADIO, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocr)));
}
-HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit /* = _T("") */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit /* = L"" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCEDIT oce;
oce.dwFlags = dwFlags;
@@ -70,7 +70,7 @@ HANDLE OptionsCtrl::insertButton(HANDLE hParent, const TCHAR* szLabel, const TCH
return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTBUTTON, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocb)));
}
-HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat /* = _T("%Y-%m-%d") */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat /* = L"%Y-%m-%d" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCDATETIME ocdt;
ocdt.dwFlags = dwFlags;
@@ -270,7 +270,7 @@ ext::string OptionsCtrl::getDateTimeStr(HANDLE hDateTime)
bool bNone = false;
DWORD dwTimestamp = getDateTime(hDateTime, &bNone);
- return bNone ? _T("") : utils::formatDate(dwTimestamp);
+ return bNone ? L"" : utils::formatDate(dwTimestamp);
}
void OptionsCtrl::setDateTimeStr(HANDLE hDateTime, const ext::string& strDateTime)
diff --git a/plugins/HistoryStats/src/optionsctrl.h b/plugins/HistoryStats/src/optionsctrl.h
index 29b802bf2f..026a535176 100644
--- a/plugins/HistoryStats/src/optionsctrl.h
+++ b/plugins/HistoryStats/src/optionsctrl.h
@@ -42,10 +42,10 @@ public:
HANDLE insertGroup(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertCheck(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertRadio(HANDLE hParent, HANDLE hSibling, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit = _T(""), DWORD dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit = L"", DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertCombo(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertButton(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szButton, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat = _T("%Y-%m-%d"), DWORD dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat = L"%Y-%m-%d", DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertColor(HANDLE hParent, const TCHAR* szLabel, COLORREF crColor = 0, DWORD dwFlags = 0, INT_PTR dwData = 0);
const TCHAR* getItemLabel(HANDLE hItem);
void setItemLabel(HANDLE hItem, const TCHAR* szLabel);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.cpp b/plugins/HistoryStats/src/optionsctrlimpl.cpp
index 2687e385a7..f4d8e55e5e 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl.cpp
@@ -8,7 +8,7 @@
* OptionsCtrlImpl
*/
-const TCHAR* OptionsCtrlImpl::m_ClassName = _T("HistoryStatsOptions");
+const TCHAR* OptionsCtrlImpl::m_ClassName = L"HistoryStatsOptions";
HIMAGELIST OptionsCtrlImpl::m_hStateIcons = NULL;
int OptionsCtrlImpl::m_nStateIconsRef = 0;
@@ -434,7 +434,7 @@ LRESULT OptionsCtrlImpl::onWMCreate(CREATESTRUCT* pCS)
m_hTree = CreateWindowEx(
WS_EX_CLIENTEDGE,
WC_TREEVIEW,
- _T(""),
+ L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | TVS_HASLINES | TVS_NOHSCROLL | TVS_SHOWSELALWAYS | dwStyle,
0,
0,
@@ -1043,7 +1043,7 @@ void OptionsCtrlImpl::onOCMMoveItem(HTREEITEM& hItem, HTREEITEM hInsertAfter)
TreeView_DeleteItem(m_hTree, hItem);
tvis.item.mask |= TVIF_TEXT;
- tvis.item.pszText = _T("");
+ tvis.item.pszText = L"";
hItem = TreeView_InsertItem(m_hTree, &tvis);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
index d158c40659..436e32aa13 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp
@@ -39,7 +39,7 @@ ext::string OptionsCtrlImpl::Combo::getCombinedText()
{
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
strTemp += m_Items[m_nSelected];
return strTemp;
@@ -86,7 +86,7 @@ void OptionsCtrlImpl::Combo::onSelect()
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST;
if (hTempWnd = CreateWindowEx(
- WS_EX_CLIENTEDGE, WC_COMBOBOX, _T(""), dwStyle,
+ WS_EX_CLIENTEDGE, WC_COMBOBOX, L"", dwStyle,
r.left, r.top, r.right - r.left, (r.bottom - r.top) * 20,
m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccCombo), g_hInst, NULL))
{
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
index 3601a5175f..d55e4c0a38 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp
@@ -23,64 +23,64 @@ ext::string OptionsCtrlImpl::DateTime::getDTFormatString(const ext::string& strF
switch (strFormat[i]) {
case 'a':
- strCode = _T("ddd");
+ strCode = L"ddd";
break;
case 'A':
- strCode = _T("dddd");
+ strCode = L"dddd";
break;
case 'b':
- strCode = _T("MMM");
+ strCode = L"MMM";
break;
case 'B':
- strCode = _T("MMMM");
+ strCode = L"MMMM";
break;
case 'd':
- strCode = bSharp ? _T("d") : _T("dd");
+ strCode = bSharp ? L"d" : L"dd";
break;
case 'H':
- strCode = bSharp ? _T("H") : _T("HH");
+ strCode = bSharp ? L"H" : L"HH";
break;
case 'I':
- strCode = bSharp ? _T("h") : _T("hh");
+ strCode = bSharp ? L"h" : L"hh";
break;
case 'm':
- strCode = bSharp ? _T("M") : _T("MM");
+ strCode = bSharp ? L"M" : L"MM";
break;
case 'M':
- strCode = bSharp ? _T("m") : _T("mm");
+ strCode = bSharp ? L"m" : L"mm";
break;
case 'p':
- strCode = _T("tt"); // MEMO: seems not to work if current locale is 24-hour
+ strCode = L"tt"; // MEMO: seems not to work if current locale is 24-hour
break;
case 'y':
- strCode = _T("yy");
+ strCode = L"yy";
break;
case 'Y':
- strCode = _T("yyyy");
+ strCode = L"yyyy";
break;
case '%':
- strPart += _T("%");
+ strPart += L"%";
break;
}
if (!strCode.empty()) {
if (!strPart.empty()) {
- strOut += _T("'");
+ strOut += L"'";
strOut += strPart;
- strOut += _T("'");
- strPart = _T("");
+ strOut += L"'";
+ strPart = L"";
}
strOut += strCode;
@@ -90,14 +90,14 @@ ext::string OptionsCtrlImpl::DateTime::getDTFormatString(const ext::string& strF
strPart += strFormat[i];
if (strFormat[i] == '\'')
- strPart += _T("'");
+ strPart += L"'";
}
}
if (!strPart.empty()) {
- strOut += _T("'");
+ strOut += L"'";
strOut += strPart;
- strOut += _T("'");
+ strOut += L"'";
}
return strOut;
@@ -170,7 +170,7 @@ ext::string OptionsCtrlImpl::DateTime::getCombinedText()
{
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
if (m_bNone)
strTemp += TranslateT("none");
@@ -219,7 +219,7 @@ void OptionsCtrlImpl::DateTime::onSelect()
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | (m_bAllowNone ? DTS_SHOWNONE : 0);
if (hTempWnd = CreateWindowEx(
- WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, _T(""), dwStyle,
+ WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, L"", dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccDateTime), g_hInst, NULL)) {
// restrict to dates a timestamp can hold (with 1 day less to avoid timezone issues)
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
index 3684f59cc9..ce8a053190 100644
--- a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
+++ b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp
@@ -31,7 +31,7 @@ ext::string OptionsCtrlImpl::Edit::getCombinedText()
{
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
strTemp += m_strEdit;
return strTemp;
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp
index ce15912a01..ebd57958c7 100644
--- a/plugins/HistoryStats/src/settings.cpp
+++ b/plugins/HistoryStats/src/settings.cpp
@@ -13,7 +13,7 @@
Settings::CharMapper::CharMapper(const Settings& settings)
{
- static const TCHAR* defaultWordDelimiters = _T("\n\r\t");
+ static const TCHAR* defaultWordDelimiters = L"\n\r\t";
array_each_(i, m_CharMap)
{
@@ -45,17 +45,17 @@ Settings::Filter::Filter(const ext::string& strID)
struct tm* curTM = localtime(&curTime);
m_strName += utils::intToPadded(1900 + curTM->tm_year, 4);
- m_strName += _T("-");
+ m_strName += L"-";
m_strName += utils::intToPadded(1 + curTM->tm_mon, 2);
- m_strName += _T("-");
+ m_strName += L"-";
m_strName += utils::intToPadded(curTM->tm_mday, 2);
- m_strName += _T(" ");
+ m_strName += L" ";
m_strName += utils::intToPadded(curTM->tm_hour, 2);
- m_strName += _T(":");
+ m_strName += L":";
m_strName += utils::intToPadded(curTM->tm_min, 2);
- m_strName += _T(":");
+ m_strName += L":";
m_strName += utils::intToPadded(curTM->tm_sec, 2);
- m_strName += _T(".");
+ m_strName += L".";
m_strName += utils::intToPadded(GetTickCount() % 1000, 3);
}
@@ -65,7 +65,7 @@ Settings::Filter::Filter(const ext::string& strID)
const TCHAR* Settings::getDefaultWordDelimiters()
{
- return _T(".?!,:;()[]{}<>+-*/=\\_^&\"'~%#@|$");
+ return L".?!,:;()[]{}<>+-*/=\\_^&\"'~%#@|$";
}
const TCHAR* Settings::getDefaultStyleSheet()
@@ -76,29 +76,29 @@ const TCHAR* Settings::getDefaultStyleSheet()
{
// general formats
StyleSheet +=
- _T("h1 { font-family: Verdana, Arial, sans-serif; font-size: 16pt; }\n")
- _T("div, span, td { font-family: Verdana, Arial, sans-serif; font-size: 10pt; }\n")
- _T("span[title], td[title], div[title] { cursor: help; }\n")
- _T("span[title] { border-bottom: 1px dotted; }\n")
- _T("span[title]:hover, td[title]:hover { background-color: #FFFFCF; }\n")
- _T("table { border-collapse: collapse; }\n")
- _T("td { border: 1px solid ") + utils::colorToHTML(con::ColorBorder) + _T("; text-align: left; padding: 2px 4px 2px 4px; }\n")
- _T("div.footer { padding: 12px 0px 8px 0px; }\n");
+ L"h1 { font-family: Verdana, Arial, sans-serif; font-size: 16pt; }\n"
+ L"div, span, td { font-family: Verdana, Arial, sans-serif; font-size: 10pt; }\n"
+ L"span[title], td[title], div[title] { cursor: help; }\n"
+ L"span[title] { border-bottom: 1px dotted; }\n"
+ L"span[title]:hover, td[title]:hover { background-color: #FFFFCF; }\n"
+ L"table { border-collapse: collapse; }\n"
+ L"td { border: 1px solid " + utils::colorToHTML(con::ColorBorder) + L"; text-align: left; padding: 2px 4px 2px 4px; }\n"
+ L"div.footer { padding: 12px 0px 8px 0px; }\n";
// special row formats
StyleSheet +=
- _T("tr.header td { background-color: ") + utils::colorToHTML(con::ColorHeader) + _T("; text-align: center; }\n")
- _T("tr.header td div { height: 1px; overflow: hidden; }\n")
- _T("tr.omitted td { background-color: ") + utils::colorToHTML(con::ColorOmitted) + _T("; }\n")
- _T("tr.totals td { background-color: ") + utils::colorToHTML(con::ColorTotals) + _T("; }\n");
+ L"tr.header td { background-color: " + utils::colorToHTML(con::ColorHeader) + L"; text-align: center; }\n"
+ L"tr.header td div { height: 1px; overflow: hidden; }\n"
+ L"tr.omitted td { background-color: " + utils::colorToHTML(con::ColorOmitted) + L"; }\n"
+ L"tr.totals td { background-color: " + utils::colorToHTML(con::ColorTotals) + L"; }\n";
// special cell formats
StyleSheet +=
- _T("td.num { text-align: right; }\n")
- _T("td.bars_bottom { vertical-align: bottom; padding: 4px 0px 0px 0px; }\n")
- _T("td.bars_middle { vertical-align: middle; padding: 2px 0px 2px 0px; }\n")
- _T("td.img_bottom { vertical-align: bottom; text-align: center; padding: 4px 0px 0px 0px; }\n")
- _T("td.img_middle { vertical-align: middle; text-align: center; padding: 2px 0px 2px 0px; }\n");
+ L"td.num { text-align: right; }\n"
+ L"td.bars_bottom { vertical-align: bottom; padding: 4px 0px 0px 0px; }\n"
+ L"td.bars_middle { vertical-align: middle; padding: 2px 0px 2px 0px; }\n"
+ L"td.img_bottom { vertical-align: bottom; text-align: center; padding: 4px 0px 0px 0px; }\n"
+ L"td.img_middle { vertical-align: middle; text-align: center; padding: 2px 0px 2px 0px; }\n";
}
return StyleSheet.c_str();
@@ -106,52 +106,52 @@ const TCHAR* Settings::getDefaultStyleSheet()
const TCHAR* Settings::getDefaultHideContactMenuProtos()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
const TCHAR* Settings::getDefaultProtosIgnore()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
const TCHAR* Settings::getDefaultColumns()
{
return
- _T("{num:11;}")
- _T("0{enabled:y;guid:rank;}")
- _T("1{enabled:y;guid:nick;}1/data{detail:y;}")
- _T("2{enabled:y;guid:protocol;}")
- _T("3{enabled:y;guid:group;}")
- _T("4{enabled:y;guid:inout;}4/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:0;}")
- _T("5{enabled:y;guid:inout;}5/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:1;}")
- _T("6{enabled:y;guid:inout;}6/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:2;}")
- _T("7{enabled:y;guid:chatduration;}7/data{detail:y;graph:y;vis_mode:3;}")
- _T("8{enabled:y;guid:commonwords;}8/data{detail:y;filter_links:y;filter_words:0;in_out_color:n;max_length:0;min_length:1;num:10;offset:0;source:2;vis_mode:0;}")
- _T("9{enabled:y;guid:wordcount;}9/data{detail:y;filter_links:y;filter_words:0;max_length:0;min_length:1;source:2;vis_mode:0;}")
- _T("10{enabled:y;guid:split;}10/data{block_unit:0;blocks:28;detail:y;graph_align:1;source:0;source_type:2;units_per_block:6;vis_mode:0;}");
+ L"{num:11;}"
+ L"0{enabled:y;guid:rank;}"
+ L"1{enabled:y;guid:nick;}1/data{detail:y;}"
+ L"2{enabled:y;guid:protocol;}"
+ L"3{enabled:y;guid:group;}"
+ L"4{enabled:y;guid:inout;}4/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:0;}"
+ L"5{enabled:y;guid:inout;}5/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:1;}"
+ L"6{enabled:y;guid:inout;}6/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:2;}"
+ L"7{enabled:y;guid:chatduration;}7/data{detail:y;graph:y;vis_mode:3;}"
+ L"8{enabled:y;guid:commonwords;}8/data{detail:y;filter_links:y;filter_words:0;in_out_color:n;max_length:0;min_length:1;num:10;offset:0;source:2;vis_mode:0;}"
+ L"9{enabled:y;guid:wordcount;}9/data{detail:y;filter_links:y;filter_words:0;max_length:0;min_length:1;source:2;vis_mode:0;}"
+ L"10{enabled:y;guid:split;}10/data{block_unit:0;blocks:28;detail:y;graph_align:1;source:0;source_type:2;units_per_block:6;vis_mode:0;}";
}
const TCHAR* Settings::getDefaultSort()
{
return
- _T("0{by:17;asc:n}")
- _T("1{by:-1;asc:y}")
- _T("2{by:-1;asc:y}");
+ L"0{by:17;asc:n}"
+ L"1{by:-1;asc:y}"
+ L"2{by:-1;asc:y}";
}
const TCHAR* Settings::getDefaultOutputFile()
{
- return _T("HistoryStats\\stats.html");
+ return L"HistoryStats\\stats.html";
}
const TCHAR* Settings::getDefaultOutputExtraFolder()
{
- return _T("extra");
+ return L"extra";
}
const TCHAR* Settings::getDefaultFilterWords()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
void Settings::clearColumns()
@@ -172,16 +172,16 @@ Settings::Settings() :
m_GraphicsMode(gmHTML),
m_PNGMode(pmHTMLFallBack),
m_ThreadLowPriority(true),
- m_PathToBrowser(_T("")),
+ m_PathToBrowser(L""),
// input settings
m_ChatSessionMinDur(0),
m_ChatSessionTimeout(900),
m_AverageMinTime(0),
- m_WordDelimiters(_T("")),
+ m_WordDelimiters(L""),
m_IgnoreOld(0),
- m_IgnoreBefore(_T("")),
- m_IgnoreAfter(_T("")),
+ m_IgnoreBefore(L""),
+ m_IgnoreAfter(L""),
m_FilterRawRTF(false),
m_FilterBBCodes(false),
m_MetaContactsMode(mcmBoth),
@@ -211,11 +211,11 @@ Settings::Settings() :
m_TableHeaderVerbose(false),
m_HeaderTooltips(true),
m_HeaderTooltipsIfCustom(true),
- m_OwnNick(_T("")),
+ m_OwnNick(L""),
m_OutputVariables(false),
- m_OutputFile(_T("")),
+ m_OutputFile(L""),
m_OutputExtraToFolder(true),
- m_OutputExtraFolder(_T("")),
+ m_OutputExtraFolder(L""),
m_OverwriteAlways(false),
m_AutoOpenOptions(false),
m_AutoOpenStartup(false),
@@ -511,10 +511,10 @@ ext::string Settings::getOutputPrefix(DWORD timeStarted) const
// append, if still not empty
if (!extraFolder.empty())
- return extraFolder + _T("\\");
+ return extraFolder + L"\\";
}
- return _T("");
+ return L"";
}
bool Settings::isPNGOutputActiveAndAvailable() const
@@ -569,7 +569,7 @@ void Settings::ensureConstraints()
void Settings::openURL(const TCHAR* szURL)
{
if (m_PathToBrowser.empty())
- ShellExecute(NULL, _T("open"), szURL, NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, L"open", szURL, NULL, NULL, SW_SHOWNORMAL);
else
- ShellExecute(NULL, _T("open"), m_PathToBrowser.c_str(), szURL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, L"open", m_PathToBrowser.c_str(), szURL, NULL, SW_SHOWNORMAL);
}
diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp
index 4740994f3b..0610fcf5e8 100644
--- a/plugins/HistoryStats/src/settingsserializer.cpp
+++ b/plugins/HistoryStats/src/settingsserializer.cpp
@@ -101,7 +101,7 @@ void SettingsSerializer::readFromDB()
m_ShowContactMenu = m_DB.readBool(con::SettShowContactMenu, true);
m_ShowContactMenuPseudo = m_DB.readBool(con::SettShowContactMenuPseudo, false);
m_ThreadLowPriority = m_DB.readBool(con::SettThreadLowPriority, true);
- m_PathToBrowser = m_DB.readStr(con::SettPathToBrowser, _T(""));
+ m_PathToBrowser = m_DB.readStr(con::SettPathToBrowser, L"");
m_HideContactMenuProtos.clear();
m_DB.readTree(con::SettHideContactMenuProtos, getDefaultHideContactMenuProtos(), settingsTree);
@@ -110,7 +110,7 @@ void SettingsSerializer::readFromDB()
upto_each_(i, nHideContactMenuProtos)
{
- m_HideContactMenuProtos.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), _T(""))));
+ m_HideContactMenuProtos.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), L"")));
}
// -- input settings --
@@ -126,12 +126,12 @@ void SettingsSerializer::readFromDB()
upto_each_(i, nIgnoreProtos)
{
- m_ProtosIgnore.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), _T(""))));
+ m_ProtosIgnore.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), L"")));
}
m_IgnoreOld = m_DB.readWord(con::SettIgnoreOld, 0);
- m_IgnoreBefore = m_DB.readStr(con::SettIgnoreBefore, _T(""));
- m_IgnoreAfter = m_DB.readStr(con::SettIgnoreAfter, _T(""));
+ m_IgnoreBefore = m_DB.readStr(con::SettIgnoreBefore, L"");
+ m_IgnoreAfter = m_DB.readStr(con::SettIgnoreAfter, L"");
m_FilterRawRTF = m_DB.readBool(con::SettFilterRawRTF, false);
m_FilterBBCodes = m_DB.readBool(con::SettFilterBBCodes, false);
m_MetaContactsMode = m_DB.readByte(con::SettMetaContactsMode, mcmBoth);
@@ -152,11 +152,11 @@ void SettingsSerializer::readFromDB()
settingsTree.setKey(colPrefix.c_str());
- Column* pCol = Column::fromUID(settingsTree.readStr(con::KeyGUID, _T("")));
+ Column* pCol = Column::fromUID(settingsTree.readStr(con::KeyGUID, L""));
if (pCol) {
pCol->setEnabled(settingsTree.readBool(con::KeyEnabled, true));
- pCol->setCustomTitle(settingsTree.readStr(con::KeyTitle, _T("")));
+ pCol->setCustomTitle(settingsTree.readStr(con::KeyTitle, L""));
settingsTree.setKey((colPrefix + con::SuffixData).c_str());
@@ -224,9 +224,9 @@ void SettingsSerializer::readFromDB()
// read filter attributes
settingsTree.setKey(strPrefix.c_str());
- FilterSet::iterator F = m_FilterWords.insert(Filter(settingsTree.readStr(con::KeyID, _T("")))).first;
+ FilterSet::iterator F = m_FilterWords.insert(Filter(settingsTree.readStr(con::KeyID, L""))).first;
Filter* curFilter = (Filter*)&*F;
- curFilter->setName(settingsTree.readStr(con::KeyName, _T("")));
+ curFilter->setName(settingsTree.readStr(con::KeyName, L""));
curFilter->setMode(settingsTree.readIntRanged(con::KeyMode, fwmWordsMatching, fwmFIRST, fwmLAST));
int nNumWords = settingsTree.readInt(con::KeyNumWords, 0);
@@ -237,7 +237,7 @@ void SettingsSerializer::readFromDB()
upto_each_(j, nNumWords)
{
- curFilter->addWord(settingsTree.readStr(utils::intToString(j).c_str(), _T("")));
+ curFilter->addWord(settingsTree.readStr(utils::intToString(j).c_str(), L""));
}
}
}
@@ -481,7 +481,7 @@ void SettingsSerializer::setShowSupportInfo(bool bShow)
ext::string SettingsSerializer::getLastStatisticsFile()
{
- return m_DB.readStr(con::SettLastStatisticsFile, _T(""));
+ return m_DB.readStr(con::SettLastStatisticsFile, L"");
}
void SettingsSerializer::setLastStatisticsFile(const TCHAR* szFileName)
diff --git a/plugins/HistoryStats/src/settingstree.cpp b/plugins/HistoryStats/src/settingstree.cpp
index a13d82ac3c..2e8ab0a0a4 100644
--- a/plugins/HistoryStats/src/settingstree.cpp
+++ b/plugins/HistoryStats/src/settingstree.cpp
@@ -23,7 +23,7 @@ SettingsTree::SettingsTree(const ext::string& config) :
void SettingsTree::clear()
{
m_Keys.clear();
- setKey(_T(""));
+ setKey(L"");
}
void SettingsTree::fromString(const ext::string& config)
@@ -45,13 +45,13 @@ void SettingsTree::fromString(const ext::string& config)
while (i < config.length() && config[i] != '}') {
if (config[i] == ':') {
curSetting = curVal;
- curVal = _T("");
+ curVal = L"";
}
else if (config[i] == ';') {
vals[curSetting] = curVal;
- curSetting = _T("");
- curVal = _T("");
+ curSetting = L"";
+ curVal = L"";
}
else if (config[i] == '\\') {
++i;
@@ -62,24 +62,24 @@ void SettingsTree::fromString(const ext::string& config)
++i;
}
- curKey = _T("");
+ curKey = L"";
}
else curKey += config[i];
++i;
}
- setKey(_T(""));
+ setKey(L"");
}
ext::string SettingsTree::toString() const
{
static const TCHAR* replaces[5][2] = {
- { _T("\\"), _T("\\\\") },
- { _T("{"), _T("\\{") },
- { _T("}"), _T("\\}") },
- { _T(":"), _T("\\:") },
- { _T(";"), _T("\\;") }
+ { L"\\", L"\\\\" },
+ { L"{", L"\\{" },
+ { L"}", L"\\}" },
+ { L":", L"\\:" },
+ { L";", L"\\;" }
};
ext::string data;
@@ -89,12 +89,12 @@ ext::string SettingsTree::toString() const
const ValueMap& vals = i->second;
data += i->first;
- data += _T("{");
+ data += L"{";
citer_each_(ValueMap, j, vals)
{
data += j->first;
- data += _T(":");
+ data += L":";
ext::string tempSecond = j->second;
@@ -104,10 +104,10 @@ ext::string SettingsTree::toString() const
}
data += tempSecond;
- data += _T(";");
+ data += L";";
}
- data += _T("}");
+ data += L"}";
}
return data;
@@ -131,7 +131,7 @@ bool SettingsTree::readBool(const TCHAR* setting, bool errorValue) const
ValueMap::iterator i = m_pCurValues->find(setting);
if (i != m_pCurValues->end()) {
- return (i->second == _T("y"));
+ return (i->second == L"y");
}
}
@@ -175,7 +175,7 @@ void SettingsTree::writeBool(const TCHAR* setting, bool value)
{
makeKeyValid();
- (*m_pCurValues)[setting] = value ? _T("y") : _T("n");
+ (*m_pCurValues)[setting] = value ? L"y" : L"n";
}
void SettingsTree::writeInt(const TCHAR* setting, int value)
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp
index 9bcdaaa201..0f66d31c62 100644
--- a/plugins/HistoryStats/src/statistic.cpp
+++ b/plugins/HistoryStats/src/statistic.cpp
@@ -195,7 +195,7 @@ ext::string Statistic::createFile(const ext::string& desiredName)
if (!m_Settings.m_OverwriteAlways && utils::fileExists(desiredName)) {
TCHAR tempBuf[MAX_PATH];
- UINT nUnique = GetTempFileName(m_TempPath.c_str(), _T("his"), 0, tempBuf);
+ UINT nUnique = GetTempFileName(m_TempPath.c_str(), L"his", 0, tempBuf);
if (nUnique == 0) {
abort();
@@ -213,7 +213,7 @@ ext::string Statistic::createFile(const ext::string& desiredName)
if (!utils::pathExists(desiredPath)) {
if (!utils::createPath(desiredPath)) {
m_ErrorText = ext::str(ext::kformat(TranslateT("HistoryStats couldn't create a required folder (#{folder}).\r\n\r\nPlease check the output filename and additional output folder you have chosen for correctness. Additionally, please check whether the file, folder, and/or disk is writable."))
- % _T("#{folder}") * desiredPath);
+ % L"#{folder}" * desiredPath);
}
}
@@ -228,7 +228,7 @@ bool Statistic::newFile(const TCHAR* fileExt, ext::string& writeFile, ext::strin
writeFile = createFile(m_OutputPath + finalURL);
// convert relative filename to relative URL
- utils::replaceAllInPlace(finalURL, _T("\\"), _T("/"));
+ utils::replaceAllInPlace(finalURL, L"\\", L"/");
return true;
}
@@ -315,11 +315,11 @@ void Statistic::setProgressMax(bool bSub, int max)
SendDlgItemMessage(m_hWndProgress, bSub ? IDC_SUBBAR : IDC_MAINBAR, PBM_SETPOS, (WPARAM)0, (LPARAM)0);
SendDlgItemMessage(m_hWndProgress, bSub ? IDC_SUBBAR : IDC_MAINBAR, PBM_SETRANGE, (WPARAM)0, (LPARAM)MAKELPARAM(0, max));
- SetDlgItemText(m_hWndProgress, bSub ? IDC_SUBPERCENT : IDC_MAINPERCENT, (max > 0) ? _T("0%") : _T(""));
+ SetDlgItemText(m_hWndProgress, bSub ? IDC_SUBPERCENT : IDC_MAINPERCENT, (max > 0) ? L"0%" : L"");
if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -329,7 +329,7 @@ void Statistic::setProgressLabel(bool bSub, const ext::string& label)
if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -345,7 +345,7 @@ void Statistic::stepProgress(bool bSub, int step /* = 1 */)
if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -737,7 +737,7 @@ bool Statistic::stepOmitContacts()
if (shouldTerminate())
return false;
- m_pOmitted = new Contact(this, m_nNextSlot, _T(""), _T(""), _T(""), 0, 0);
+ m_pOmitted = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pOmitted);
// omit depending on some value
@@ -869,7 +869,7 @@ bool Statistic::stepCalcTotals()
if (shouldTerminate())
return false;
- m_pTotals = new Contact(this, m_nNextSlot, _T(""), _T(""), _T(""), 0, 0);
+ m_pTotals = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pTotals);
setProgressMax(true, m_Contacts.size() + 1);
@@ -970,7 +970,7 @@ bool Statistic::stepWriteHTML()
if (!ofs.good()) {
m_ErrorText = ext::str(ext::kformat(TranslateT("HistoryStats couldn't open the output file (#{file}) for write access.\r\n\r\nPlease check the output filename you have chosen for correctness. Additionally, please check whether the file, folder, and/or disk is writable."))
- % _T("#{file}") * m_OutputFile);
+ % L"#{file}" * m_OutputFile);
return false;
}
@@ -995,7 +995,7 @@ bool Statistic::stepWriteHTML()
iter_each_(Column::StyleList, css, cssList)
{
if (additionalCSSSelectors.find(css->first) == additionalCSSSelectors.end()) {
- additionalCSS.push_back(css->first + _T(" { ") + css->second + _T(" }"));
+ additionalCSS.push_back(css->first + L" { " + css->second + L" }");
additionalCSSSelectors.insert(css->first);
}
}
@@ -1004,15 +1004,15 @@ bool Statistic::stepWriteHTML()
additionalCSSSelectors.clear();
- tos << _T("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">") << ext::endl
- << _T("<html xmlns=\"http://www.w3.org/1999/xhtml\">") << ext::endl
- << _T("<head>") << ext::endl
- << _T("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />") << ext::endl
- << _T("<meta name=\"generator\" content=\"HistoryStats " << utils::versionToDotted(m_Settings.m_VersionCurrent) << "\" />") << ext::endl
- << _T("<title>")
- << ext::kformat(TranslateT("Statistics for #{nick} - HistoryStats")) % _T("#{nick}") * utils::htmlEscape(m_Settings.m_OwnNick)
- << _T("</title>") << ext::endl
- << _T("<style type=\"text/css\">") << ext::endl;
+ tos << L"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << ext::endl
+ << L"<html xmlns=\"http://www.w3.org/1999/xhtml\">" << ext::endl
+ << L"<head>" << ext::endl
+ << L"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" << ext::endl
+ << L"<meta name=\"generator\" content=\"HistoryStats " << utils::versionToDotted(m_Settings.m_VersionCurrent) << "\" />" << ext::endl
+ << L"<title>"
+ << ext::kformat(TranslateT("Statistics for #{nick} - HistoryStats")) % L"#{nick}" * utils::htmlEscape(m_Settings.m_OwnNick)
+ << L"</title>" << ext::endl
+ << L"<style type=\"text/css\">" << ext::endl;
tos << m_Settings.getDefaultStyleSheet();
iter_each_(std::vector<ext::string>, css, additionalCSS)
@@ -1020,12 +1020,12 @@ bool Statistic::stepWriteHTML()
tos << *css << ext::endl;
}
- tos << _T("</style>") << ext::endl
- << _T("</head>") << ext::endl
- << _T("<body><h1>")
- << ext::kformat(TranslateT("Statistics for #{nick}")) % _T("#{nick}") * utils::htmlEscape(m_Settings.m_OwnNick)
- << _T("</h1>") << ext::endl;
- tos << _T("<table>") << ext::endl;
+ tos << L"</style>" << ext::endl
+ << L"</head>" << ext::endl
+ << L"<body><h1>"
+ << ext::kformat(TranslateT("Statistics for #{nick}")) % L"#{nick}" * utils::htmlEscape(m_Settings.m_OwnNick)
+ << L"</h1>" << ext::endl;
+ tos << L"<table>" << ext::endl;
additionalCSS.clear();
@@ -1042,14 +1042,14 @@ bool Statistic::stepWriteHTML()
if (m_Settings.m_TableHeader) {
for (int j = 1; j <= headerSize.cy; j++) {
- tos << _T("<tr class=\"header\">") << ext::endl;
+ tos << L"<tr class=\"header\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderHeader(tos, j, headerSize.cy);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
}
}
@@ -1064,7 +1064,7 @@ bool Statistic::stepWriteHTML()
if (!bInterrupted) {
upto_each_(i, countContacts())
{
- tos << _T("<tr>") << ext::endl;
+ tos << L"<tr>" << ext::endl;
const Contact& curContact = getContact(i);
@@ -1075,7 +1075,7 @@ bool Statistic::stepWriteHTML()
(*col)->outputRenderRow(tos, curContact, Column::asContact);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
if (shouldTerminate()) {
bInterrupted = true;
@@ -1090,14 +1090,14 @@ bool Statistic::stepWriteHTML()
if (m_Settings.m_TableHeader && m_Settings.m_TableHeaderRepeat != 0 && ((i + 1) % m_Settings.m_TableHeaderRepeat == 0)) {
for (int j = 1; j <= headerSize.cy; ++j) {
- tos << _T("<tr class=\"header\">") << ext::endl;
+ tos << L"<tr class=\"header\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderHeader(tos, j, headerSize.cy);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
}
}
@@ -1111,14 +1111,14 @@ bool Statistic::stepWriteHTML()
const Contact& omittedContact = getOmitted();
- tos << _T("<tr class=\"omitted\">") << ext::endl;
+ tos << L"<tr class=\"omitted\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderRow(tos, omittedContact, Column::asOmitted);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
// stop if problem creating files/folders
if (!m_ErrorText.empty())
@@ -1139,29 +1139,29 @@ bool Statistic::stepWriteHTML()
const Contact& totalsContact = getTotals();
- tos << _T("<tr class=\"totals\">") << ext::endl;
+ tos << L"<tr class=\"totals\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderRow(tos, totalsContact, Column::asTotal);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
stepProgress(true);
// Finish output.
- tos << _T("</table>") << ext::endl;
+ tos << L"</table>" << ext::endl;
- tos << _T("<div class=\"footer\">")
+ tos << L"<div class=\"footer\">"
<< ext::kformat(TranslateT("Created with #{plugin} #{version} on #{date} at #{time}"))
- % _T("#{plugin}") * _T("<a href=\"http://miranda-ng.org/p/HistoryStats\">HistoryStats</a>")
- % _T("#{version}") * utils::versionToDotted(m_Settings.m_VersionCurrent)
- % _T("#{date}") * utils::htmlEscape(utils::timestampToDate(getTimeStarted()))
- % _T("#{time}") * utils::htmlEscape(utils::timestampToTime(getTimeStarted()))
- << _T("</div>") << ext::endl;
+ % L"#{plugin}" * L"<a href=\"http://miranda-ng.org/p/HistoryStats\">HistoryStats</a>"
+ % L"#{version}" * utils::versionToDotted(m_Settings.m_VersionCurrent)
+ % L"#{date}" * utils::htmlEscape(utils::timestampToDate(getTimeStarted()))
+ % L"#{time}" * utils::htmlEscape(utils::timestampToTime(getTimeStarted()))
+ << L"</div>" << ext::endl;
- tos << _T("</body></html>") << ext::endl;
+ tos << L"</body></html>" << ext::endl;
}
// Inform active columns about ending output.
diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h
index cc9e4e4546..07b502b200 100644
--- a/plugins/HistoryStats/src/statistic.h
+++ b/plugins/HistoryStats/src/statistic.h
@@ -183,7 +183,7 @@ public:
// file management
ext::string createFile(const ext::string& desiredName);
bool newFile(const TCHAR* fileExt, ext::string& writeFile, ext::string& finalURL);
- bool newFilePNG(ext::string& writeFile, ext::string& finalURL) { return newFile(_T(".png"), writeFile, finalURL); }
+ bool newFilePNG(ext::string& writeFile, ext::string& finalURL) { return newFile(L".png", writeFile, finalURL); }
bool newFilePNG(Canvas& canvas, ext::string& finalURL);
};
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp
index 376593db3a..91dedaf163 100644
--- a/plugins/HistoryStats/src/utils.cpp
+++ b/plugins/HistoryStats/src/utils.cpp
@@ -16,14 +16,14 @@ namespace utils
{
TCHAR temp[100] = { 0 };
- return (ext::strfunc::ftime(temp, 100, format, gmtime(&value)) > 0) ? temp : _T("");
+ return (ext::strfunc::ftime(temp, 100, format, gmtime(&value)) > 0) ? temp : L"";
}
ext::string tmStructToString(const tm& value, const TCHAR* format)
{
TCHAR temp[100] = { 0 };
- return (ext::strfunc::ftime(temp, 100, format, &value) > 0) ? temp : _T("");
+ return (ext::strfunc::ftime(temp, 100, format, &value) > 0) ? temp : L"";
}
ext::string durationToString(DWORD value)
@@ -34,9 +34,9 @@ namespace utils
value /= 60;
if (value >= 1440)
- ext::strfunc::sprintf(temp, _T("%dd %02d:%02d"), value / 1440, (value / 60) % 24, value % 60);
+ ext::strfunc::sprintf(temp, L"%dd %02d:%02d", value / 1440, (value / 60) % 24, value % 60);
else
- ext::strfunc::sprintf(temp, _T("%02d:%02d"), value / 60, value % 60);
+ ext::strfunc::sprintf(temp, L"%02d:%02d", value / 60, value % 60);
return temp;
}
@@ -77,7 +77,7 @@ namespace utils
{
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%d"), value);
+ ext::strfunc::sprintf(temp, L"%d", value);
return temp;
}
@@ -86,7 +86,7 @@ namespace utils
{
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%0*d"), len, value);
+ ext::strfunc::sprintf(temp, L"%0*d", len, value);
return temp;
}
@@ -96,7 +96,7 @@ namespace utils
TCHAR temp[100] = { 0 };
const char* grouping = Locale::grouping();
- ext::strfunc::sprintf(temp, _T("%d"), value);
+ ext::strfunc::sprintf(temp, L"%d", value);
if (*grouping == CHAR_MAX || *grouping <= 0)
return temp;
@@ -119,7 +119,7 @@ namespace utils
{
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%.*f"), precision, value);
+ ext::strfunc::sprintf(temp, L"%.*f", precision, value);
return temp;
}
@@ -129,7 +129,7 @@ namespace utils
TCHAR temp[100] = { 0 };
const char* grouping = Locale::grouping();
- ext::strfunc::sprintf(temp, _T("%.*f"), precision, value);
+ ext::strfunc::sprintf(temp, L"%.*f", precision, value);
if (*grouping == CHAR_MAX || *grouping <= 0)
return temp;
@@ -160,7 +160,7 @@ namespace utils
value = 1.0f * numerator / denominator;
}
- ext::strfunc::sprintf(temp, _T("%.0f%%"), 100.0f * value);
+ ext::strfunc::sprintf(temp, L"%.0f%%", 100.0f * value);
return temp;
}
@@ -180,10 +180,10 @@ namespace utils
void htmlEscapeInPlace(ext::string& text)
{
- replaceAllInPlace(text, _T("&"), _T("&amp;"));
- replaceAllInPlace(text, _T("\""), _T("&quot;"));
- replaceAllInPlace(text, _T("<"), _T("&lt;"));
- replaceAllInPlace(text, _T(">"), _T("&gt;"));
+ replaceAllInPlace(text, L"&", L"&amp;");
+ replaceAllInPlace(text, L"\"", L"&quot;");
+ replaceAllInPlace(text, L"<", L"&lt;");
+ replaceAllInPlace(text, L">", L"&gt;");
}
const TCHAR* stripPrefix(const TCHAR* szPrefix, const TCHAR* szText)
@@ -199,7 +199,7 @@ namespace utils
return szText;
}
- ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick /* = _T("") */)
+ ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick /* = L"" */)
{
static const TCHAR* szMonthName[][2] = {
{ LPGENT("month3:Jan"), LPGENT("monthF:January") },
@@ -239,83 +239,83 @@ namespace utils
ext::string strSubst;
// match variable and generate substitution
- if (strVar == _T("h")) {
+ if (strVar == L"h") {
strSubst = intToString(timeTM->tm_hour % 12 + (timeTM->tm_hour % 12 == 0 ? 12 : 0));
}
- else if (strVar == _T("hh")) {
+ else if (strVar == L"hh") {
strSubst = intToPadded(timeTM->tm_hour % 12 + (timeTM->tm_hour % 12 == 0 ? 12 : 0), 2);
}
- else if (strVar == _T("H")) {
+ else if (strVar == L"H") {
strSubst = intToString(timeTM->tm_hour);
}
- else if (strVar == _T("HH")) {
+ else if (strVar == L"HH") {
strSubst = intToPadded(timeTM->tm_hour, 2);
}
- else if (strVar == _T("m")) {
+ else if (strVar == L"m") {
strSubst = intToString(timeTM->tm_min);
}
- else if (strVar == _T("mm")) {
+ else if (strVar == L"mm") {
strSubst = intToPadded(timeTM->tm_min, 2);
}
- else if (strVar == _T("s")) {
+ else if (strVar == L"s") {
strSubst = intToString(timeTM->tm_sec);
}
- else if (strVar == _T("ss")) {
+ else if (strVar == L"ss") {
strSubst = intToPadded(timeTM->tm_sec, 2);
}
- else if (strVar == _T("tt")) {
+ else if (strVar == L"tt") {
strSubst = timeTM->tm_hour / 12 ? TranslateT("pm") : TranslateT("am");
}
- else if (strVar == _T("TT")) {
+ else if (strVar == L"TT") {
strSubst = timeTM->tm_hour / 12 ? TranslateT("PM") : TranslateT("AM");
}
- else if (strVar == _T("yy")) {
+ else if (strVar == L"yy") {
strSubst = intToPadded((timeTM->tm_year + 1900) % 100, 2);
}
- else if (strVar == _T("yyyy")) {
+ else if (strVar == L"yyyy") {
strSubst = intToPadded(timeTM->tm_year + 1900, 4);
}
- else if (strVar == _T("M")) {
+ else if (strVar == L"M") {
strSubst = intToString(timeTM->tm_mon + 1);
}
- else if (strVar == _T("MM")) {
+ else if (strVar == L"MM") {
strSubst = intToPadded(timeTM->tm_mon + 1, 2);
}
- else if (strVar == _T("MMM")) {
- strSubst = stripPrefix(_T("month3:"), TranslateTS(szMonthName[timeTM->tm_mon % 12][0]));
+ else if (strVar == L"MMM") {
+ strSubst = stripPrefix(L"month3:", TranslateTS(szMonthName[timeTM->tm_mon % 12][0]));
}
- else if (strVar == _T("MMMM")) {
- strSubst = stripPrefix(_T("monthF:"), TranslateTS(szMonthName[timeTM->tm_mon % 12][1]));
+ else if (strVar == L"MMMM") {
+ strSubst = stripPrefix(L"monthF:", TranslateTS(szMonthName[timeTM->tm_mon % 12][1]));
}
- else if (strVar == _T("d")) {
+ else if (strVar == L"d") {
strSubst = intToString(timeTM->tm_mday);
}
- else if (strVar == _T("dd")) {
+ else if (strVar == L"dd") {
strSubst = intToPadded(timeTM->tm_mday, 2);
}
- else if (strVar == _T("ww")) {
- strSubst = stripPrefix(_T("wday2:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
+ else if (strVar == L"ww") {
+ strSubst = stripPrefix(L"wday2:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
}
- else if (strVar == _T("www")) {
- strSubst = stripPrefix(_T("wday3:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
+ else if (strVar == L"www") {
+ strSubst = stripPrefix(L"wday3:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
}
- else if (strVar == _T("wwww")) {
- strSubst = stripPrefix(_T("wdayF:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
+ else if (strVar == L"wwww") {
+ strSubst = stripPrefix(L"wdayF:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
}
- else if (strVar == _T("miranda_path")) {
+ else if (strVar == L"miranda_path") {
strSubst = getMirandaPath();
}
- else if (strVar == _T("profile_path")) {
+ else if (strVar == L"profile_path") {
strSubst = getProfilePath();
}
- else if (strVar == _T("profile_name")) {
+ else if (strVar == L"profile_name") {
strSubst = getProfileName();
}
- else if (strVar == _T("nick")) {
+ else if (strVar == L"nick") {
strSubst = szNick;
}
- else if (strVar == _T("")) {
- strSubst = _T("%");
+ else if (strVar == L"") {
+ strSubst = L"%";
}
// perform actual substitution
@@ -381,7 +381,7 @@ namespace utils
int part = 3;
while (!version.empty() && part >= 0) {
- ext::string::size_type dotPos = version.find(_T("."));
+ ext::string::size_type dotPos = version.find(L".");
if (dotPos == ext::string::npos) {
dotPos = version.length();
@@ -401,7 +401,7 @@ namespace utils
ext::strfunc::sprintf(
temp,
- _T("%d.%d.%d.%d"),
+ L"%d.%d.%d.%d",
(version >> 24) & 0xFF,
(version >> 16) & 0xFF,
(version >> 8) & 0xFF,
@@ -617,7 +617,7 @@ namespace utils
bool pathExists(const ext::string& path)
{
WIN32_FIND_DATA wfd;
- HANDLE hFind = FindFirstFile((path + _T(".")).c_str(), &wfd);
+ HANDLE hFind = FindFirstFile((path + L".").c_str(), &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
FindClose(hFind);
@@ -641,7 +641,7 @@ namespace utils
bool isValidFilePart(ext::string filePart)
{
// check for disallowed chars
- if (filePart.find_first_of(_T("<>:\"/\\|?*")) != ext::string::npos)
+ if (filePart.find_first_of(L"<>:\"/\\|?*") != ext::string::npos)
return false;
// check for dots only
@@ -650,29 +650,29 @@ namespace utils
// check for disallowed names
static const TCHAR* disallowedNames[] = {
- _T("clock$"),
- _T("aux"),
- _T("con"),
- _T("nul"),
- _T("prn"),
- _T("com1"),
- _T("com2"),
- _T("com3"),
- _T("com4"),
- _T("com5"),
- _T("com6"),
- _T("com7"),
- _T("com8"),
- _T("com9"),
- _T("lpt1"),
- _T("lpt2"),
- _T("lpt3"),
- _T("lpt4"),
- _T("lpt5"),
- _T("lpt6"),
- _T("lpt7"),
- _T("lpt8"),
- _T("lpt9")
+ L"clock$",
+ L"aux",
+ L"con",
+ L"nul",
+ L"prn",
+ L"com1",
+ L"com2",
+ L"com3",
+ L"com4",
+ L"com5",
+ L"com6",
+ L"com7",
+ L"com8",
+ L"com9",
+ L"lpt1",
+ L"lpt2",
+ L"lpt3",
+ L"lpt4",
+ L"lpt5",
+ L"lpt6",
+ L"lpt7",
+ L"lpt8",
+ L"lpt9"
};
ext::string::size_type pos = filePart.find('.');
@@ -716,7 +716,7 @@ namespace utils
ext::string::size_type pos = fileName.rfind('\\');
if (pos == ext::string::npos) {
- return _T("");
+ return L"";
}
else {
return fileName.substr(0, pos + 1);
@@ -766,7 +766,7 @@ namespace utils
return false;
}
- curPath += _T("\\");
+ curPath += L"\\";
subDirs.pop();
}
@@ -776,7 +776,7 @@ namespace utils
ext::string colorToHTML(COLORREF crColor)
{
- static const TCHAR hexDigits[] = _T("0123456789ABCDEF");
+ static const TCHAR hexDigits[] = L"0123456789ABCDEF";
ext::string htmlColor(7, '#');
@@ -823,7 +823,7 @@ namespace utils
ext::string getGUID()
{
- static const TCHAR hexDigits[] = _T("0123456789ABCDEF");
+ static const TCHAR hexDigits[] = L"0123456789ABCDEF";
GUID guid;
CoCreateGuid(&guid);
@@ -895,7 +895,7 @@ namespace utils
if (strMirandaPath.empty()) {
TCHAR szPath[MAX_PATH] = { 0 };
- PathToAbsoluteT(_T("x"), szPath);
+ PathToAbsoluteT(L"x", szPath);
strMirandaPath = extractPath(szPath);
}
@@ -914,7 +914,7 @@ namespace utils
if (strProfilePath.empty() || strProfilePath[strProfilePath.length() - 1] != '\\')
{
- strProfilePath += _T("\\");
+ strProfilePath += L"\\";
}
}
@@ -986,8 +986,8 @@ RTFFilter::RTFFilter() : m_hRTFConv(NULL), m_RTFConvString(0)
void RTFFilter::init()
{
- if (!(m_Data.m_hRTFConv = LoadLibrary(_T("rtfconv.dll"))))
- if (!(m_Data.m_hRTFConv = LoadLibrary(_T("plugins\\rtfconv.dll"))))
+ if (!(m_Data.m_hRTFConv = LoadLibrary(L"rtfconv.dll")))
+ if (!(m_Data.m_hRTFConv = LoadLibrary(L"plugins\\rtfconv.dll")))
return;
if (!(m_Data.m_RTFConvString = reinterpret_cast<RTFCONVSTRING>(GetProcAddress(m_Data.m_hRTFConv, "RtfconvString")))) {
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h
index 6351f8d97f..834b154ccb 100644
--- a/plugins/HistoryStats/src/utils.h
+++ b/plugins/HistoryStats/src/utils.h
@@ -9,12 +9,12 @@ namespace utils
// time formatting
ext::string timestampToString(time_t value, const TCHAR* format);
ext::string tmStructToString(const tm& value, const TCHAR* format);
- inline ext::string timestampToDateTime(DWORD value) { return timestampToString(value, _T("%c")); }
- inline ext::string timestampToDate(DWORD value) { return timestampToString(value, _T("%x")); }
- inline ext::string timestampToTime(DWORD value) { return timestampToString(value, _T("%X")); }
+ inline ext::string timestampToDateTime(DWORD value) { return timestampToString(value, L"%c"); }
+ inline ext::string timestampToDate(DWORD value) { return timestampToString(value, L"%x"); }
+ inline ext::string timestampToTime(DWORD value) { return timestampToString(value, L"%X"); }
ext::string durationToString(DWORD value);
DWORD parseDate(const ext::string& date);
- inline ext::string formatDate(time_t timeValue) { return timestampToString(timeValue, _T("%Y-%m-%d")); }
+ inline ext::string formatDate(time_t timeValue) { return timestampToString(timeValue, L"%Y-%m-%d"); }
// number formatting
ext::string intToString(int value);
@@ -32,7 +32,7 @@ namespace utils
inline ext::string replaceAll(ext::string text, const TCHAR* find, const TCHAR* replace) { replaceAllInPlace(text, find, replace); return text; }
inline ext::string htmlEscape(ext::string text) { htmlEscapeInPlace(text); return text; }
const TCHAR* stripPrefix(const TCHAR* szPrefix, const TCHAR* szText);
- ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick = _T(""));
+ ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick = L"");
// case conversion
ext::string toLowerCase(const ext::string& text);