diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
commit | c370af60855db957c5b200914bf0bde743845528 (patch) | |
tree | 0bd2ef127097c9e937c2650e8b202c3f09453323 /plugins/TabSRMM/src/generic_msghandlers.cpp | |
parent | 7f082bd5d4865c30b313661b7a02f048b4b137be (diff) |
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index adcc0acbe8..8e7ad1bcdd 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -45,12 +45,12 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat) else if (dat) { TCHAR szFilter[MAX_PATH], szFilename[MAX_PATH]; mir_sntprintf(szFilter, _T("%s%c*.rtf%c%c"), TranslateT("Rich Edit file"), 0, 0, 0); - mir_sntprintf(szFilename, _countof(szFilename), _T("%s.rtf"), dat->cache->getNick()); + mir_sntprintf(szFilename, _T("%s.rtf"), dat->cache->getNick()); Utils::sanitizeFilename(szFilename); TCHAR szInitialDir[MAX_PATH + 2]; - mir_sntprintf(szInitialDir, _countof(szInitialDir), _T("%s%s\\"), M.getDataPath(), _T("\\Saved message logs")); + mir_sntprintf(szInitialDir, _T("%s%s\\"), M.getDataPath(), _T("\\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); TCHAR tStr[80]; - mir_sntprintf(tStr, _countof(tStr), _T("%s %d.%d.%d.%d [build %d]"), + mir_sntprintf(tStr, _T("%s %d.%d.%d.%d [build %d]"), TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]); SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr); } @@ -1002,7 +1002,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat) if (!PluginConfig.m_bDontUseDefaultKbd) { TCHAR szBuf[20]; GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20); - mir_sntprintf(szKLName, _countof(szKLName), _T("0000%s"), szBuf); + mir_sntprintf(szKLName, _T("0000%s"), szBuf); db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName); } else { @@ -1040,7 +1040,7 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat) TCHAR szBuf[100]; if (dat->bShowTyping) { SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); - mir_sntprintf(szBuf, _countof(szBuf), TranslateT("%s is typing a message..."), dat->cache->getNick()); + mir_sntprintf(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); @@ -1051,14 +1051,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, _countof(szBuf), _T("UID: %s"), dat->cache->getUIN()); + mir_sntprintf(szBuf, _T("UID: %s"), dat->cache->getUIN()); else if (dat->lastMessage) { TCHAR date[64], time[64]; TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, _countof(date), 0); if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_tstrlen(date) > 6) date[mir_tstrlen(date) - 5] = 0; TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, _countof(time), 0); - mir_sntprintf(szBuf, _countof(szBuf), TranslateT("Last received: %s at %s"), date, time); + mir_sntprintf(szBuf, TranslateT("Last received: %s at %s"), date, time); } else szBuf[0] = 0; } @@ -1378,7 +1378,7 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff) dat->bShowTyping = 2; dat->nTypeSecs = 86400; - mir_sntprintf(dat->szStatusBar, _countof(dat->szStatusBar), TranslateT("%s has entered text."), dat->cache->getNick()); + mir_sntprintf(dat->szStatusBar, TranslateT("%s has entered text."), dat->cache->getNick()); if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) SendMessage(hwndStatus, SB_SETTEXT, 0, (LPARAM)dat->szStatusBar); } @@ -1403,7 +1403,7 @@ void TSAPI DM_Typing(TWindowData *dat, bool fForceOff) UpdateStatusBar(dat); } else if (dat->nTypeSecs > 0) { - mir_sntprintf(dat->szStatusBar, _countof(dat->szStatusBar), TranslateT("%s is typing a message"), dat->cache->getNick()); + mir_sntprintf(dat->szStatusBar, TranslateT("%s is typing a message"), dat->cache->getNick()); dat->nTypeSecs--; if (hwndStatus && dat->pContainer->hwndActive == hwndDlg) { @@ -1596,7 +1596,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM hContact, LPARAM lParam) dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent; TCHAR szBuf[100]; - mir_sntprintf(szBuf, _countof(szBuf), TranslateT("Auto scrolling is disabled, %d message(s) queued (press F12 to enable it)"), + mir_sntprintf(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); @@ -1748,7 +1748,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) if (mir_tstrlen(newcontactname) != 0) { if (PluginConfig.m_bStatusOnTabs) - mir_sntprintf(newtitle, _countof(newtitle), _T("%s (%s)"), newcontactname, dat->szStatus); + mir_sntprintf(newtitle, _T("%s (%s)"), newcontactname, dat->szStatus); else _tcsncpy_s(newtitle, newcontactname, _TRUNCATE); } @@ -1760,13 +1760,13 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) TCHAR fulluin[256]; if (dat->bIsMeta) - mir_sntprintf(fulluin, _countof(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")); + mir_sntprintf(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, _countof(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")); + mir_sntprintf(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")); SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR); } |