summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/generic_msghandlers.cpp
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/TabSRMM/src/generic_msghandlers.cpp
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 03317d8d5b..365fe0a812 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -44,13 +44,13 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat)
}
else if (dat) {
wchar_t szFilter[MAX_PATH], szFilename[MAX_PATH];
- mir_sntprintf(szFilter, L"%s%c*.rtf%c%c", TranslateT("Rich Edit file"), 0, 0, 0);
- mir_sntprintf(szFilename, L"%s.rtf", dat->cache->getNick());
+ mir_snwprintf(szFilter, L"%s%c*.rtf%c%c", TranslateT("Rich Edit file"), 0, 0, 0);
+ mir_snwprintf(szFilename, L"%s.rtf", dat->cache->getNick());
Utils::sanitizeFilename(szFilename);
wchar_t szInitialDir[MAX_PATH + 2];
- mir_sntprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs");
+ mir_snwprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs");
CreateDirectoryTreeT(szInitialDir);
OPENFILENAME ofn = { 0 };
@@ -613,7 +613,7 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)&v);
wchar_t tStr[80];
- mir_sntprintf(tStr, L"%s %d.%d.%d.%d [build %d]",
+ mir_snwprintf(tStr, L"%s %d.%d.%d.%d [build %d]",
TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr);
}
@@ -1004,7 +1004,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
if (!PluginConfig.m_bDontUseDefaultKbd) {
wchar_t szBuf[20];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20);
- mir_sntprintf(szKLName, L"0000%s", szBuf);
+ mir_snwprintf(szKLName, L"0000%s", szBuf);
db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName);
}
else {
@@ -1042,7 +1042,7 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat)
wchar_t szBuf[100];
if (dat->bShowTyping) {
SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- mir_sntprintf(szBuf, TranslateT("%s is typing a message..."), dat->cache->getNick());
+ mir_snwprintf(szBuf, TranslateT("%s is typing a message..."), dat->cache->getNick());
}
else if (dat->sbCustom) {
SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)dat->sbCustom->hIcon);
@@ -1053,14 +1053,14 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat)
SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, 0);
if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR)
- mir_sntprintf(szBuf, L"UID: %s", dat->cache->getUIN());
+ mir_snwprintf(szBuf, L"UID: %s", dat->cache->getUIN());
else if (dat->lastMessage) {
wchar_t date[64], time[64];
TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"d", date, _countof(date), 0);
- if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_tstrlen(date) > 6)
- date[mir_tstrlen(date) - 5] = 0;
+ if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_wstrlen(date) > 6)
+ date[mir_wstrlen(date) - 5] = 0;
TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"t", time, _countof(time), 0);
- mir_sntprintf(szBuf, TranslateT("Last received: %s at %s"), date, time);
+ mir_snwprintf(szBuf, TranslateT("Last received: %s at %s"), date, time);
}
else szBuf[0] = 0;
}
@@ -1374,7 +1374,7 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff)
dat->bShowTyping = 2;
dat->nTypeSecs = 86400;
- mir_sntprintf(dat->szStatusBar, TranslateT("%s has entered text."), dat->cache->getNick());
+ mir_snwprintf(dat->szStatusBar, TranslateT("%s has entered text."), dat->cache->getNick());
if (hwndStatus && dat->pContainer->hwndActive == hwndDlg)
SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar);
}
@@ -1399,7 +1399,7 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff)
UpdateStatusBar(dat);
}
else if (dat->nTypeSecs > 0) {
- mir_sntprintf(dat->szStatusBar, TranslateT("%s is typing a message"), dat->cache->getNick());
+ mir_snwprintf(dat->szStatusBar, TranslateT("%s is typing a message"), dat->cache->getNick());
dat->nTypeSecs--;
if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) {
@@ -1592,7 +1592,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM hContact, LPARAM lParam)
dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent;
wchar_t szBuf[100];
- mir_sntprintf(szBuf, TranslateT("Auto scrolling is disabled, %d message(s) queued (press F12 to enable it)"),
+ mir_snwprintf(szBuf, TranslateT("Auto scrolling is disabled, %d message(s) queued (press F12 to enable it)"),
dat->iNextQueuedEvent);
SetDlgItemText(hwndDlg, IDC_LOGFROZENTEXT, szBuf);
RedrawWindow(GetDlgItem(hwndDlg, IDC_LOGFROZENTEXT), NULL, NULL, RDW_INVALIDATE);
@@ -1742,9 +1742,9 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
Utils::DoubleAmpersands(newcontactname, _countof(newcontactname));
- if (mir_tstrlen(newcontactname) != 0) {
+ if (mir_wstrlen(newcontactname) != 0) {
if (PluginConfig.m_bStatusOnTabs)
- mir_sntprintf(newtitle, L"%s (%s)", newcontactname, dat->szStatus);
+ mir_snwprintf(newtitle, L"%s (%s)", newcontactname, dat->szStatus);
else
wcsncpy_s(newtitle, newcontactname, _TRUNCATE);
}
@@ -1756,11 +1756,11 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam)
wchar_t fulluin[256];
if (dat->bIsMeta)
- mir_sntprintf(fulluin,
+ mir_snwprintf(fulluin,
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nRight click for metacontact control\nClick dropdown to add or remove user from your favorites."),
bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
else
- mir_sntprintf(fulluin,
+ mir_snwprintf(fulluin,
TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for user's details\nClick dropdown to change this contact's favorite status."),
bHasName ? dat->cache->getUIN() : TranslateT("No UID"));