summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-19 20:08:21 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-19 20:08:21 +0000
commite12cc9f9eb3fcd0e3a0de3de82527a7d9cbc9cc1 (patch)
treebb15ed1aae45e3f92841d98ffa3229c2fbac9914 /plugins/HistoryStats/src
parent524aabc23effc3b60cf5b5c891bf66ceb6954ef7 (diff)
- fixes #820 (Crash because HistoryStats);
- code cleaning; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@11535 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats/src')
-rw-r--r--plugins/HistoryStats/src/bandctrl.cpp6
-rw-r--r--plugins/HistoryStats/src/bandctrldefs.h4
-rw-r--r--plugins/HistoryStats/src/bandctrlimpl.cpp100
-rw-r--r--plugins/HistoryStats/src/column.h2
-rw-r--r--plugins/HistoryStats/src/column_chatduration.h4
-rw-r--r--plugins/HistoryStats/src/column_events.h4
-rw-r--r--plugins/HistoryStats/src/column_group.h4
-rw-r--r--plugins/HistoryStats/src/column_inout.h4
-rw-r--r--plugins/HistoryStats/src/column_inoutgraph.h4
-rw-r--r--plugins/HistoryStats/src/column_nick.h4
-rw-r--r--plugins/HistoryStats/src/column_protocol.h4
-rw-r--r--plugins/HistoryStats/src/column_rank.h4
-rw-r--r--plugins/HistoryStats/src/column_split.h4
-rw-r--r--plugins/HistoryStats/src/column_splittimeline.h4
-rw-r--r--plugins/HistoryStats/src/column_timeline.h4
-rw-r--r--plugins/HistoryStats/src/column_wordcount.h4
-rw-r--r--plugins/HistoryStats/src/column_words.h4
-rw-r--r--plugins/HistoryStats/src/dlgoption.cpp2
-rw-r--r--plugins/HistoryStats/src/dlgoption_subcolumns.cpp12
19 files changed, 70 insertions, 108 deletions
diff --git a/plugins/HistoryStats/src/bandctrl.cpp b/plugins/HistoryStats/src/bandctrl.cpp
index a377717efb..d1b6c00a7f 100644
--- a/plugins/HistoryStats/src/bandctrl.cpp
+++ b/plugins/HistoryStats/src/bandctrl.cpp
@@ -10,15 +10,15 @@ void BandCtrl::setLayout(int nLayout)
SendMessage(m_hBandWnd, BCM_SETLAYOUT, nLayout, 0);
}
-HANDLE BandCtrl::addButton(DWORD dwFlags, HICON hIcon, INT_PTR dwData, const TCHAR* szTooltip /* = NULL */, const TCHAR* szText /* = NULL */)
+HANDLE BandCtrl::addButton(DWORD dwFlags, HICON hIcon, INT_PTR dwData, const TCHAR *szTooltip, const TCHAR *szText)
{
BCBUTTON bcb;
bcb.dwFlags = dwFlags | BCF_ICON | BCF_DATA | (szTooltip ? BCF_TOOLTIP : 0) | (szText ? BCF_TEXT : 0);
bcb.hIcon = hIcon;
bcb.dwData = dwData;
- bcb.szTooltip = const_cast<TCHAR*>(szTooltip);
- bcb.szText = const_cast<TCHAR*>(szText);
+ bcb.m_szTooltip = szTooltip;
+ bcb.m_szText = szText;
return reinterpret_cast<HANDLE>(SendMessage(m_hBandWnd, BCM_ADDBUTTON, 0, reinterpret_cast<LPARAM>(&bcb)));
}
diff --git a/plugins/HistoryStats/src/bandctrldefs.h b/plugins/HistoryStats/src/bandctrldefs.h
index 61af8d5f86..99ccabbfe8 100644
--- a/plugins/HistoryStats/src/bandctrldefs.h
+++ b/plugins/HistoryStats/src/bandctrldefs.h
@@ -44,8 +44,8 @@ public:
struct BCBUTTON {
DWORD dwFlags;
HICON hIcon;
- TCHAR* szText;
- TCHAR* szTooltip;
+ const TCHAR *m_szText;
+ const TCHAR *m_szTooltip;
INT_PTR dwData;
};
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp
index dee262eeff..6f6fbe038c 100644
--- a/plugins/HistoryStats/src/bandctrlimpl.cpp
+++ b/plugins/HistoryStats/src/bandctrlimpl.cpp
@@ -14,7 +14,7 @@ const int BandCtrlImpl::m_PollDelay = 50;
LRESULT CALLBACK BandCtrlImpl::staticWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- BandCtrlImpl* pCtrl = reinterpret_cast<BandCtrlImpl*>(GetWindowLongPtr(hWnd, 0));
+ BandCtrlImpl *pCtrl = reinterpret_cast<BandCtrlImpl*>(GetWindowLongPtr(hWnd, 0));
switch (msg) {
case WM_NCCREATE:
@@ -175,9 +175,8 @@ bool BandCtrlImpl::registerClass()
NULL // hIconSm
};
- if (!RegisterClassEx(&wcx)) {
+ if (!RegisterClassEx(&wcx))
return false;
- }
return true;
}
@@ -187,11 +186,11 @@ void BandCtrlImpl::unregisterClass()
UnregisterClass(m_ClassName, g_hInst);
}
-BandCtrlImpl::BandCtrlImpl(HWND hWnd, int nOwnId)
-: m_hWnd(hWnd), m_nOwnId(nOwnId), m_hFont(NULL),
-m_hTheme(NULL), m_hImageList(NULL), m_hImageListD(NULL), m_hTooltip(NULL),
-m_nCurHot(-1), m_nCurFocused(-1), m_nCurPressed(-1), m_bCurPressedDD(false),
-m_nLayout(0), m_nDDWidth(12), m_hDDIcon(NULL)
+BandCtrlImpl::BandCtrlImpl(HWND hWnd, int nOwnId) :
+ m_hWnd(hWnd), m_nOwnId(nOwnId), m_hFont(NULL),
+ m_hTheme(NULL), m_hImageList(NULL), m_hImageListD(NULL), m_hTooltip(NULL),
+ m_nCurHot(-1), m_nCurFocused(-1), m_nCurPressed(-1), m_bCurPressedDD(false),
+ m_nLayout(0), m_nDDWidth(12), m_hDDIcon(NULL)
{
m_IconSize.cx = m_IconSize.cy;
m_hDDIcon = reinterpret_cast<HICON>(LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DROPDOWN), IMAGE_ICON, OS::smIconCX(), OS::smIconCY(), 0));
@@ -231,24 +230,18 @@ void BandCtrlImpl::onWMPaint()
{
// start painting
PAINTSTRUCT ps;
- HDC hRealDC;
-
- if (!(hRealDC = BeginPaint(m_hWnd, &ps))) {
+ HDC hRealDC = BeginPaint(m_hWnd, &ps);
+ if (hRealDC == NULL)
return;
- }
// get rect for painting
RECT rOut;
-
GetClientRect(m_hWnd, &rOut);
// setup memory DC for bufferd drawing
- HDC hDC;
- HBITMAP hMemBitmap, hOldBitmap;
-
- hDC = CreateCompatibleDC(hRealDC);
- hMemBitmap = CreateCompatibleBitmap(hRealDC, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top);
- hOldBitmap = reinterpret_cast<HBITMAP>(SelectObject(hDC, hMemBitmap));
+ HDC hDC = CreateCompatibleDC(hRealDC);
+ HBITMAP hMemBitmap = CreateCompatibleBitmap(hRealDC, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top);
+ HBITMAP hOldBitmap = reinterpret_cast<HBITMAP>(SelectObject(hDC, hMemBitmap));
SetWindowOrgEx(hDC, ps.rcPaint.left, ps.rcPaint.top, NULL);
// fill background
@@ -297,7 +290,7 @@ void BandCtrlImpl::onWMPaint()
void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnabled)
{
- const ItemData& item = m_Items[nItem];
+ const ItemData &item = m_Items[nItem];
bool bFocused = (nItem == m_nCurFocused);
bool bHot = (nItem == m_nCurHot);
@@ -329,13 +322,11 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
UINT state = 0;
- if (bEnabled) {
+ if (bEnabled)
state = bPressed ? (m_bCurPressedDD ? DFCS_FLAT | DFCS_PUSHED : DFCS_FLAT) : (bHot ? DFCS_FLAT : (item.bChecked ? DFCS_FLAT | DFCS_CHECKED : 0));
- }
- if (state != 0) {
+ if (state != 0)
DrawFrameControl(hDC, &rDropDown, DFC_BUTTON, DFCS_BUTTONPUSH | state);
- }
int x = rDropDown.left + (rDropDown.right - rDropDown.left - OS::smIconCX()) / 2;
int y = rDropDown.top + (rDropDown.bottom - rDropDown.top - OS::smIconCY()) / 2;
@@ -348,18 +339,16 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
int state = TS_DISABLED;
int part = item.bDropDown ? TP_SPLITBUTTON : TP_BUTTON;
- if (bEnabled) {
+ if (bEnabled)
state = bPressed ? (!m_bCurPressedDD ? TS_PRESSED : TS_HOT) : (item.bChecked ? (bHot ? TS_HOTCHECKED : TS_CHECKED) : (bHot ? TS_HOT : TS_NORMAL));
- }
DrawThemeBackground(m_hTheme, hDC, part, state, &rItem, NULL);
}
else {
UINT state = 0;
- if (bEnabled) {
+ if (bEnabled)
state = bPressed ? (!m_bCurPressedDD ? DFCS_FLAT | DFCS_PUSHED : DFCS_FLAT) : (bHot ? DFCS_FLAT : (item.bChecked ? DFCS_FLAT | DFCS_CHECKED : 0));
- }
if (state != 0) {
DrawFrameControl(hDC, &rItem, DFC_BUTTON, DFCS_BUTTONPUSH | state);
@@ -384,27 +373,12 @@ void BandCtrlImpl::drawButton(HDC hDC, int nItem, int textHeight, bool bBandEnab
++y;
}
- if (bEnabled) {
- ImageList_Draw(
- m_hImageList,
- item.nIcon,
- hDC,
- x,
- y,
- ILD_NORMAL);
- }
- else if (item.nIconD != -1) {
- ImageList_Draw(
- m_hImageListD,
- item.nIconD,
- hDC,
- x,
- y,
- ILD_NORMAL);
- }
+ if (bEnabled)
+ ImageList_Draw(m_hImageList, item.nIcon, hDC, x, y, ILD_NORMAL);
+ else if (item.nIconD != -1)
+ ImageList_Draw(m_hImageListD, item.nIconD, hDC, x, y, ILD_NORMAL);
else {
HICON hIcon = ImageList_GetIcon(m_hImageList, item.nIcon, 0);
-
DrawState(hDC, NULL, NULL, reinterpret_cast<LPARAM>(hIcon), 0, x, y, m_IconSize.cx, m_IconSize.cy, DST_ICON | DSS_DISABLED);
DestroyIcon(hIcon);
}
@@ -440,12 +414,10 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon)
HICON hIconDisabled = NULL;
ICONINFO ii;
- if (!GetIconInfo(hIcon, &ii)) {
+ if (!GetIconInfo(hIcon, &ii))
return NULL;
- }
BITMAP bmp;
-
if (GetObject(ii.hbmColor, sizeof(bmp), &bmp) && bmp.bmBitsPixel == 32) {
int nSize = bmp.bmHeight * bmp.bmWidthBytes;
BYTE* pBits = new BYTE[nSize];
@@ -478,20 +450,19 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon)
return hIconDisabled;
}
-int BandCtrlImpl::onBCMAddButton(BCBUTTON* pButton)
+int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton)
{
assert(pButton);
m_Items.push_back(ItemData());
- ItemData& id = m_Items.back();
-
+ ItemData &id = m_Items.back();
id.bRight = bool_(pButton->dwFlags & BCF_RIGHT);
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) ? pButton->szText : _T("");
- id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? pButton->szTooltip : _T("");
+ id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : _T("");
+ id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : _T("");
id.uTTId = -1;
id.dwData = (pButton->dwFlags & BCF_DATA) ? pButton->dwData : 0;
id.bEnabled = !(pButton->dwFlags & BCF_DISABLED);
@@ -550,8 +521,7 @@ void BandCtrlImpl::onBCMCheckButton(int nItem, bool bCheck)
{
assert(nItem >= 0 && nItem < m_Items.size());
- ItemData& id = m_Items[nItem];
-
+ ItemData &id = m_Items[nItem];
if (bCheck != id.bChecked) {
id.bChecked = bCheck;
InvalidateRect(m_hWnd, &id.rItem, TRUE);
@@ -562,8 +532,7 @@ void BandCtrlImpl::onBCMShowButton(int nItem, bool bShow)
{
assert(nItem >= 0 && nItem < m_Items.size());
- ItemData& id = m_Items[nItem];
-
+ ItemData &id = m_Items[nItem];
if (bShow != id.bVisible) {
id.bVisible = bShow;
recalcButtonRects();
@@ -583,7 +552,7 @@ void BandCtrlImpl::onBCMEnableButton(int nItem, bool bEnable)
{
assert(nItem >= 0 && nItem < m_Items.size());
- ItemData& id = m_Items[nItem];
+ ItemData &id = m_Items[nItem];
if (bEnable != id.bEnabled) {
id.bEnabled = bEnable;
@@ -655,13 +624,7 @@ void BandCtrlImpl::recalcButtonRects()
if (!m_hTooltip)
m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
- TOOLINFO ti = {
- sizeof(TOOLINFO), // cbSize
- TTF_SUBCLASS, // uFlags
- m_hWnd, // hwnd
- i + 1, // uId
- m_Items[i].rItem, // rect
- NULL, // hInstance
+ TOOLINFO ti = { sizeof(TOOLINFO), TTF_SUBCLASS, m_hWnd, i + 1, m_Items[i].rItem, NULL,
const_cast<TCHAR*>(m_Items[i].tooltip.c_str()), // lpszText
};
@@ -673,9 +636,8 @@ void BandCtrlImpl::recalcButtonRects()
int BandCtrlImpl::getNextButton(int nItem)
{
- if (nItem < 0 || nItem >= m_Items.size()) {
+ if (nItem < 0 || nItem >= m_Items.size())
nItem = -1;
- }
int nNext = nItem;
int nLastLeft = -1;
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h
index 4f29e71a2f..cc44972325 100644
--- a/plugins/HistoryStats/src/column.h
+++ b/plugins/HistoryStats/src/column.h
@@ -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() ? getTitle() : (m_CustomTitle + _T(" (") + getTitle() + _T(")")); }
+ ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + _T(" (") + TranslateTS(getTitle()) + _T(")")); }
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.h b/plugins/HistoryStats/src/column_chatduration.h
index e2ddfd9e7e..dad5d98ab0 100644
--- a/plugins/HistoryStats/src/column_chatduration.h
+++ b/plugins/HistoryStats/src/column_chatduration.h
@@ -28,8 +28,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColChatDuration; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Chat duration"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the amount of time you have chatted with the given contact."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Chat duration"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the amount of time you have chatted with the given contact."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_events.h b/plugins/HistoryStats/src/column_events.h
index 571f078e68..8ca4af81e4 100644
--- a/plugins/HistoryStats/src/column_events.h
+++ b/plugins/HistoryStats/src/column_events.h
@@ -20,8 +20,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColEvents; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Events"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding event counts for incoming, outgoing or total number of files or URLs."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Events"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding event counts for incoming, outgoing or total number of files or URLs."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_group.h b/plugins/HistoryStats/src/column_group.h
index 033f5d5fb4..60aef1e071 100644
--- a/plugins/HistoryStats/src/column_group.h
+++ b/plugins/HistoryStats/src/column_group.h
@@ -12,8 +12,8 @@ class ColGroup
{
protected:
virtual const TCHAR* impl_getUID() const { return con::ColGroup; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Group"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the contact list's group name the contact is in."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Group"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the contact list's group name the contact is in."); }
virtual int impl_getFeatures() const { return 0; }
virtual int impl_configGetRestrictions(ext::string* pDetails) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
diff --git a/plugins/HistoryStats/src/column_inout.h b/plugins/HistoryStats/src/column_inout.h
index fd2955299a..5a65598f7d 100644
--- a/plugins/HistoryStats/src/column_inout.h
+++ b/plugins/HistoryStats/src/column_inout.h
@@ -24,8 +24,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColInOut; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("In/out"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding counts for incoming, outgoing or total characters, messages or chats. This column can display absolute and average values."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("In/out"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding counts for incoming, outgoing or total characters, messages or chats. This column can display absolute and average values."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_inoutgraph.h b/plugins/HistoryStats/src/column_inoutgraph.h
index b2f7ac1bc6..673c1f4174 100644
--- a/plugins/HistoryStats/src/column_inoutgraph.h
+++ b/plugins/HistoryStats/src/column_inoutgraph.h
@@ -36,8 +36,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColInOutGraph; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("In/out graph"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding in/out bar graphs for characters, messages or chats."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("In/out graph"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding in/out bar graphs for characters, messages or chats."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_nick.h b/plugins/HistoryStats/src/column_nick.h
index 6eca7f3f7e..e7558a68ec 100644
--- a/plugins/HistoryStats/src/column_nick.h
+++ b/plugins/HistoryStats/src/column_nick.h
@@ -22,8 +22,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColNick; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Nick"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the contact's nick and first/last message time if selected."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Nick"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the contact's nick and first/last message time if selected."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_protocol.h b/plugins/HistoryStats/src/column_protocol.h
index cc6050c728..b74d5a1772 100644
--- a/plugins/HistoryStats/src/column_protocol.h
+++ b/plugins/HistoryStats/src/column_protocol.h
@@ -12,8 +12,8 @@ class ColProtocol
{
protected:
virtual const TCHAR* impl_getUID() const { return con::ColProtocol; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Protocol"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the contact's protocol."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Protocol"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the contact's protocol."); }
virtual int impl_getFeatures() const { return 0; }
virtual int impl_configGetRestrictions(ext::string* pDetails) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
diff --git a/plugins/HistoryStats/src/column_rank.h b/plugins/HistoryStats/src/column_rank.h
index e1522fcf20..43f1b4af36 100644
--- a/plugins/HistoryStats/src/column_rank.h
+++ b/plugins/HistoryStats/src/column_rank.h
@@ -15,8 +15,8 @@ private:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColRank; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Rank"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the contact's placing according to your sorting criteria."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Rank"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the contact's placing according to your sorting criteria."); }
virtual int impl_getFeatures() const { return 0; }
virtual int impl_configGetRestrictions(ext::string* pDetails) const { return crHTMLFull; }
virtual void impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const;
diff --git a/plugins/HistoryStats/src/column_split.h b/plugins/HistoryStats/src/column_split.h
index 31613aee34..06159d1615 100644
--- a/plugins/HistoryStats/src/column_split.h
+++ b/plugins/HistoryStats/src/column_split.h
@@ -50,8 +50,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColSplit; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("\"Split\""); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding a graphical overview of your chatting amount split by day of week or by hour of day. Different chatting amount measures are available."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("\"Split\""); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding a graphical overview of your chatting amount split by day of week or by hour of day. Different chatting amount measures are available."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig | cfAcquiresData; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_splittimeline.h b/plugins/HistoryStats/src/column_splittimeline.h
index 2afba779fe..664e6f603e 100644
--- a/plugins/HistoryStats/src/column_splittimeline.h
+++ b/plugins/HistoryStats/src/column_splittimeline.h
@@ -77,8 +77,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColSplitTimeline; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("\"Split\" timeline"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding a graphical overview of your chatting behavior (out, in, total, in/out ratio) from the first to the last day of your history. The information is spread along x- and y-axis and the values are encoded as color values. Different chatting behavior measures are available."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("\"Split\" timeline"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding a graphical overview of your chatting behavior (out, in, total, in/out ratio) from the first to the last day of your history. The information is spread along x- and y-axis and the values are encoded as color values. Different chatting behavior measures are available."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig | cfAcquiresData; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_timeline.h b/plugins/HistoryStats/src/column_timeline.h
index 1c3125305a..3e8125fd68 100644
--- a/plugins/HistoryStats/src/column_timeline.h
+++ b/plugins/HistoryStats/src/column_timeline.h
@@ -53,8 +53,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColTimeline; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Timeline"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding a graphical overview of your chatting behavior (out, in, total, in/out ratio) from the first to the last day of your history on a daily basis. Multiple days can be grouped. Different chatting behavior measures are available."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Timeline"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding a graphical overview of your chatting behavior (out, in, total, in/out ratio) from the first to the last day of your history on a daily basis. Multiple days can be grouped. Different chatting behavior measures are available."); }
virtual void impl_copyConfig(const Column* pSource);
virtual int impl_getFeatures() const { return cfHasConfig | cfAcquiresData; }
virtual void impl_configRead(const SettingsTree& settings);
diff --git a/plugins/HistoryStats/src/column_wordcount.h b/plugins/HistoryStats/src/column_wordcount.h
index ebbea04c36..6277bc6cbb 100644
--- a/plugins/HistoryStats/src/column_wordcount.h
+++ b/plugins/HistoryStats/src/column_wordcount.h
@@ -22,8 +22,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColWordCount; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Word count"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding the number of (distinct) words used by you, by your contact, or by both of you."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Word count"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding the number of (distinct) words used by you, by your contact, or by both of you."); }
virtual void impl_copyConfig(const Column* pSource);
virtual void impl_configRead(const SettingsTree& settings);
virtual void impl_configWrite(SettingsTree& settings) const;
diff --git a/plugins/HistoryStats/src/column_words.h b/plugins/HistoryStats/src/column_words.h
index 31406c07ad..0ec4c4fbc4 100644
--- a/plugins/HistoryStats/src/column_words.h
+++ b/plugins/HistoryStats/src/column_words.h
@@ -65,8 +65,8 @@ public:
protected:
virtual const TCHAR* impl_getUID() const { return con::ColWords; }
- virtual const TCHAR* impl_getTitle() const { return TranslateT("Words"); }
- virtual const TCHAR* impl_getDescription() const { return TranslateT("Column holding a list of a specified number of most/least common words or longest words used by you, by your contact, or by both of you."); }
+ virtual const TCHAR* impl_getTitle() const { return LPGENT("Words"); }
+ virtual const TCHAR* impl_getDescription() const { return LPGENT("Column holding a list of a specified number of most/least common words or longest words used by you, by your contact, or by both of you."); }
virtual void impl_copyConfig(const Column* pSource);
virtual void impl_configRead(const SettingsTree& settings);
virtual void impl_configWrite(SettingsTree& settings) const;
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp
index 2bfbf7e019..68e93fe56e 100644
--- a/plugins/HistoryStats/src/dlgoption.cpp
+++ b/plugins/HistoryStats/src/dlgoption.cpp
@@ -117,7 +117,7 @@ void DlgOption::onWMInitDialog()
dwFlags |= pageBand[i].bVisible ? 0 : BandCtrl::BCF_HIDDEN;
dwFlags |= pageBand[i].bDropDown ? BandCtrl::BCF_DROPDOWN : 0;
- HANDLE hButton = m_Band.addButton(dwFlags, hIcon, i, TranslateTS(pageBand[i].szTooltip), TranslateTS(pageBand[i].szText));
+ HANDLE hButton = m_Band.addButton(dwFlags, hIcon, i, pageBand[i].szTooltip, pageBand[i].szText);
DestroyIcon(hIcon);
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
index a11e1e0f52..aef8ca4771 100644
--- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp
@@ -23,8 +23,8 @@ INT_PTR CALLBACK DlgOption::SubColumns::staticAddProc(HWND hDlg, UINT msg, WPARA
upto_each_(i, Column::countColInfo())
{
- int nIndex = SendMessage(hWndList, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(Column::getColInfo(i).m_Title));
- SendMessage(hWndList, LB_SETITEMDATA, nIndex, static_cast<LPARAM>(i));
+ int nIndex = SendMessage(hWndList, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TranslateTS(Column::getColInfo(i).m_Title)));
+ SendMessage(hWndList, LB_SETITEMDATA, nIndex, i);
}
if (Column::countColInfo() > 0) {
@@ -332,7 +332,7 @@ void DlgOption::SubColumns::addCol(int nCol)
getParent()->getLocalSettings().addCol(pCol);
- OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, pCol->getTitle(), 0, reinterpret_cast<INT_PTR>(pCol));
+ OptionsCtrl::Check hColCheck = m_Columns.insertCheck(NULL, TranslateTS(pCol->getTitle()), 0, reinterpret_cast<INT_PTR>(pCol));
m_Columns.checkItem(hColCheck, pCol->isEnabled());
@@ -546,7 +546,7 @@ void DlgOption::SubColumns::onBandDropDown(HANDLE hButton, INT_PTR dwData)
upto_each_(i, Column::countColInfo())
{
- AppendMenu(hPopup, MF_STRING, i + 1, Column::getColInfo(i).m_Title);
+ AppendMenu(hPopup, MF_STRING, i + 1, TranslateTS(Column::getColInfo(i).m_Title));
}
int nCol = -1 + TrackPopupMenu(
@@ -679,7 +679,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
if (pHelp) {
pHelp->push_back(HelpPair());
- pHelp->back().first = pCol->getTitle();
+ pHelp->back().first = TranslateTS(pCol->getTitle());
pHelp->back().first += _T(": ");
pHelp->back().first += TranslateT("HTML output unsupported.");
@@ -699,7 +699,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp)
if (pHelp) {
pHelp->push_back(HelpPair());
- pHelp->back().first = pCol->getTitle();
+ pHelp->back().first = TranslateTS(pCol->getTitle());
pHelp->back().first += _T(": ");
if (nPNGMode == Settings::pmHTMLFallBack)