summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/TooltipNotify
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TooltipNotify')
-rw-r--r--plugins/TooltipNotify/src/Tooltip.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp20
-rw-r--r--plugins/TooltipNotify/src/Utils.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp
index 9f9edc03e4..9289c34824 100644
--- a/plugins/TooltipNotify/src/Tooltip.cpp
+++ b/plugins/TooltipNotify/src/Tooltip.cpp
@@ -147,7 +147,7 @@ void CTooltip::Validate()
SIZE Size;
HDC hDC = GetDC(m_hWnd);
SelectObject(hDC, m_hFont);
- GetTextExtentPoint32(hDC, m_szText, (int)mir_tstrlen(m_szText), &Size);
+ GetTextExtentPoint32(hDC, m_szText, (int)mir_wstrlen(m_szText), &Size);
SetWindowPos(m_hWnd, 0, 0, 0, Size.cx+6, Size.cy+4,
SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW);
ReleaseDC(m_hWnd, hDC);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 3bb08f45ad..2d7988e339 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -537,7 +537,7 @@ BOOL CTooltipNotify::OptionsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
case WM_VSCROLL:
case WM_HSCROLL:
wchar_t str[10];
- mir_sntprintf(str, L"%d%%", 100 * SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0) / 255);
+ mir_snwprintf(str, L"%d%%", 100 * SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0) / 255);
SetDlgItemText(hDlg, IDC_TRANSPERC, str);
if (wParam != 0x12345678)
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
@@ -679,7 +679,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
ListView_GetItemText(GetDlgItem(hDlg, IDC_PROTOS), i, 0, szProto, _countof(szProto));
char szMultiByteProto[128];
- long lLen = WideCharToMultiByte(CP_ACP, 0, szProto, (int)mir_tstrlen(szProto),
+ long lLen = WideCharToMultiByte(CP_ACP, 0, szProto, (int)mir_wstrlen(szProto),
szMultiByteProto, sizeof(szMultiByteProto), NULL, NULL);
szMultiByteProto[lLen] = '\0';
@@ -799,23 +799,23 @@ BOOL CTooltipNotify::ContactsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM)
wchar_t* CTooltipNotify::StatusToString(int iStatus, wchar_t *szStatus, int iBufSize)
{
if (iStatus >= ID_STATUS_OFFLINE && iStatus <= ID_STATUS_OUTTOLUNCH)
- mir_tstrncpy(szStatus, pcli->pfnGetStatusModeDescription(iStatus, 0), iBufSize);
+ mir_wstrncpy(szStatus, pcli->pfnGetStatusModeDescription(iStatus, 0), iBufSize);
else {
switch (iStatus) {
case ID_TTNTF_STATUS_TYPING:
- mir_tstrncpy(szStatus, TranslateT("Typing"), iBufSize);
+ mir_wstrncpy(szStatus, TranslateT("Typing"), iBufSize);
break;
case ID_TTNTF_STATUS_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Idle"), iBufSize);
+ mir_wstrncpy(szStatus, TranslateT("Idle"), iBufSize);
break;
case ID_TTNTF_STATUS_NOT_IDLE:
- mir_tstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
+ mir_wstrncpy(szStatus, TranslateT("Not Idle"), iBufSize);
break;
default:
- mir_tstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
+ mir_wstrncpy(szStatus, TranslateT("Unknown"), iBufSize);
break;
}
}
@@ -841,11 +841,11 @@ wchar_t* CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, wchar
long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)mir_strlen(szProto), wszProto, _countof(wszProto));
wszProto[lLen] = '\0';
- mir_sntprintf(szString, iBufSize - 1, szFormatString, wszProto, L": ", szContactName);
+ mir_snwprintf(szString, iBufSize - 1, szFormatString, wszProto, L": ", szContactName);
- TruncateWithDots(szString, iBufSize - 1 - mir_tstrlen(szStatus) - mir_tstrlen(szIs) - 2); // 2 spaces around szIs
- mir_sntprintf(szString + mir_tstrlen(szString), iBufSize - 1 - mir_tstrlen(szString), L" %s %s", szIs, szStatus);
+ TruncateWithDots(szString, iBufSize - 1 - mir_wstrlen(szStatus) - mir_wstrlen(szIs) - 2); // 2 spaces around szIs
+ mir_snwprintf(szString + mir_wstrlen(szString), iBufSize - 1 - mir_wstrlen(szString), L" %s %s", szIs, szStatus);
return szString;
}
diff --git a/plugins/TooltipNotify/src/Utils.cpp b/plugins/TooltipNotify/src/Utils.cpp
index 4d102f9822..9338efebbe 100644
--- a/plugins/TooltipNotify/src/Utils.cpp
+++ b/plugins/TooltipNotify/src/Utils.cpp
@@ -13,7 +13,7 @@ BOOL IsNt50()
void TruncateWithDots(wchar_t* szString, size_t iNewLen)
{
- size_t iOrigLen = mir_tstrlen(szString);
+ size_t iOrigLen = mir_wstrlen(szString);
if (iNewLen < iOrigLen) {
wchar_t* p = szString+iNewLen;
*p = '\0';