summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp16
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_skinopt.cpp12
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_tbbutton.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp4
12 files changed, 50 insertions, 51 deletions
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index db0fceeede..891ab77fd4 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -668,7 +668,7 @@ static int LocateStorePosition(int Frameid, int maxstored)
char settingname[255];
for (int i = 0; i < maxstored; i++) {
- mir_snprintf(settingname, _countof(settingname), "Name%d", i);
+ mir_snprintf(settingname, "Name%d", i);
DBVARIANT dbv = { 0 };
if (db_get_ts(NULL, CLUIFrameModule, settingname, &dbv))
continue;
@@ -2746,7 +2746,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
if (pos != -1) {
int oldflags;
- mir_sntprintf(TBcapt, _countof(TBcapt), _T("%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d"),
+ mir_sntprintf(TBcapt, _T("%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d"),
g_pfwFrames[pos].name, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
g_pfwFrames[pos].FloatingPos.x, g_pfwFrames[pos].FloatingPos.y,
g_pfwFrames[pos].FloatingSize.x, g_pfwFrames[pos].FloatingSize.y,
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 280a33acbd..12d6a29765 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -525,9 +525,8 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact)
// They are the same -> use the name to keep the case
if (mir_tstrcmpi(name, nick) == 0)
mir_tstrncpy(contact->szText, name, _countof(contact->szText));
- else
- // Append then
- mir_sntprintf(contact->szText, _countof(contact->szText), _T("%s - %s"), name, nick);
+ else // Append then
+ mir_sntprintf(contact->szText, _T("%s - %s"), name, nick);
}
else mir_tstrncpy(contact->szText, name, _countof(contact->szText));
}
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index a465b90bd1..5a1fd0361e 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1129,7 +1129,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (mir_strcmp(contSour->proto, META_PROTO)) {
if (!contSour->isSubcontact) {
MCONTACT hDest = contDest->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be converted to metacontact and '%s' be added to it?"), contDest->szText, contSour->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be converted to metacontact and '%s' be added to it?"), contDest->szText, contSour->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Converting to metacontact"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
MCONTACT handle = CallService(MS_MC_CONVERTTOMETA, hDest, 0);
@@ -1142,7 +1142,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
else {
hcontact = contSour->hContact;
MCONTACT hdest = contDest->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be converted to metacontact and '%s' be added to it (remove it from '%s')?"), contDest->szText, contSour->szText, contSour->subcontacts->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be converted to metacontact and '%s' be added to it (remove it from '%s')?"), contDest->szText, contSour->szText, contSour->subcontacts->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Converting to metacontact (moving)"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
MCONTACT handle = (MCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)hdest, 0);
@@ -1168,7 +1168,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (!contSour->isSubcontact) {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Adding contact to metacontact"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
if (!handle)
@@ -1178,7 +1178,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
}
else if (contSour->subcontacts == contDest) {
MCONTACT hsour = contSour->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be default?"), contSour->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be default?"), contSour->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Set default contact"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1)
db_mc_setDefault(contDest->hContact, hsour, true);
@@ -1186,7 +1186,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
else {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be removed from metacontact '%s' and added to '%s'?"), contSour->szText, contSour->subcontacts->szText, contDest->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be removed from metacontact '%s' and added to '%s'?"), contSour->szText, contSour->subcontacts->szText, contDest->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Changing metacontacts (moving)"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
if (!handle)
@@ -1210,7 +1210,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (!contSour->isSubcontact) {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->subcontacts->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->subcontacts->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->subcontacts->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Changing metacontacts (moving)"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
if (!handle)
@@ -1222,7 +1222,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
else if (contSour->subcontacts != contDest->subcontacts) {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->subcontacts->hContact;
- mir_sntprintf(Wording, _countof(Wording), TranslateT("Do you want contact '%s' to be removed from metacontact '%s' and added to '%s'?"), contSour->szText, contSour->subcontacts->szText, contDest->subcontacts->szText);
+ mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be removed from metacontact '%s' and added to '%s'?"), contSour->szText, contSour->subcontacts->szText, contDest->subcontacts->szText);
int res = MessageBox(hwnd, Wording, TranslateT("Changing metacontacts (moving)"), MB_OKCANCEL | MB_ICONQUESTION);
if (res == 1) {
if (!handle)
@@ -1260,7 +1260,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (shortGroup) {
NeedRename = TRUE;
if (sourceGrName)
- mir_sntprintf(newName, _countof(newName), _T("%s\\%s"), sourceGrName, shortGroup);
+ mir_sntprintf(newName, _T("%s\\%s"), sourceGrName, shortGroup);
else
mir_tstrncpy(newName, shortGroup, _countof(newName));
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index c4102c68a5..e57e8d6a89 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -248,7 +248,7 @@ void* AddTempGroup(HWND hwnd, ClcData *dat, const TCHAR *szName)
_itoa_s(i - 1, buf, 10);
TCHAR b2[255];
- mir_sntprintf(b2, _countof(b2), _T("#%s"), szName);
+ mir_sntprintf(b2, _T("#%s"), szName);
b2[0] = 1 | GROUPF_EXPANDED;
db_set_ws(NULL, "CListGroups", buf, b2);
pcli->pfnGetGroupName(i, &groupFlags);
@@ -718,7 +718,7 @@ int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, Clc
}
if (g_CluiData.bFilterEffective & CLVM_FILTER_GROUPS) {
if (!db_get_ts(hContact, "CList", "Group", &dbv)) {
- mir_sntprintf(szGroupMask, _countof(szGroupMask), _T("%s|"), &dbv.ptszVal[0]);
+ mir_sntprintf(szGroupMask, _T("%s|"), &dbv.ptszVal[0]);
filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0));
mir_free(dbv.ptszVal);
}
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 0229e36828..bad0577a45 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -1015,7 +1015,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
char szUin[20];
- mir_snprintf(szUin, _countof(szUin), "%u", db_get_dw(NULL, "ICQ", "UIN", 0));
+ mir_snprintf(szUin, "%u", db_get_dw(NULL, "ICQ", "UIN", 0));
SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)szUin);
if (!db_get_s(NULL, "ICQ", "Nick", &dbv)) {
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 019e95db1a..c3b0efde3f 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -896,7 +896,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
if (szAccoName) {
// first of all try to find by account name( or empty - global )
- mir_sntprintf(fileFull, _countof(fileFull), _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, szAccoName);
+ mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, szAccoName);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
@@ -904,7 +904,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
// second try to find by protocol name
PROTOACCOUNT *acc = Proto_GetAccount(szAccoName);
if (acc && !acc->bOldProto) {
- mir_sntprintf(fileFull, _countof(fileFull), _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, acc->szProtoName);
+ mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, acc->szProtoName);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
}
@@ -912,7 +912,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
}
// third try global
- mir_sntprintf(fileFull, _countof(fileFull), _T("%s\\Icons\\proto_conn.dll"), tszFolderPath);
+ mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn.dll"), tszFolderPath);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
@@ -938,7 +938,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx)
HICON hIcon;
if (szAccoName) {
- mir_sntprintf(szFullPath, _countof(szFullPath), _T("proto_conn_%S.dll"), szAccoName);
+ mir_sntprintf(szFullPath, _T("proto_conn_%S.dll"), szAccoName);
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
@@ -946,7 +946,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx)
// second try to find by protocol name
PROTOACCOUNT *acc = Proto_GetAccount(szAccoName);
if (acc && !acc->bOldProto) {
- mir_sntprintf(szFullPath, _countof(szFullPath), _T("proto_conn_%S.dll"), acc->szProtoName);
+ mir_sntprintf(szFullPath, _T("proto_conn_%S.dll"), acc->szProtoName);
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
}
@@ -1582,7 +1582,7 @@ LRESULT CLUI::PreProcessWndProc(UINT msg, WPARAM wParam, LPARAM lParam, BOOL& bH
if (msg == uMsgGetProfile && wParam != 0) { // got IPC message
int rc = 0;
char szName[MAX_PATH];
- mir_snprintf(szName, _countof(szName), "Miranda::%u", wParam); // caller will tell us the ID of the map
+ mir_snprintf(szName, "Miranda::%u", wParam); // caller will tell us the ID of the map
HANDLE hMap = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, szName);
if (hMap != NULL) {
void *hView = NULL;
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 2078d05f6f..13fd8e2bcd 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -1480,7 +1480,7 @@ int ske_GetFullFilename(TCHAR *buf, const TCHAR *file, TCHAR *skinfolder, BOOL m
TCHAR b2[MAX_PATH];
if (file[0] != '\\' && file[1] != ':')
- mir_sntprintf(b2, _countof(b2), _T("%s\\%s"), (skinfolder == NULL) ? SkinPlace : ((INT_PTR)skinfolder != -1) ? skinfolder : _T(""), file);
+ mir_sntprintf(b2, _T("%s\\%s"), (skinfolder == NULL) ? SkinPlace : ((INT_PTR)skinfolder != -1) ? skinfolder : _T(""), file);
else
mir_tstrncpy(b2, file, _countof(b2));
@@ -2980,13 +2980,13 @@ static int ske_ValidateSingleFrameImage(FRAMEWND * Frame, BOOL SkipBkgBlitting)
BitBlt(g_pCachedWindow->hImageDC, rLine.left, rLine.top, rLine.right - rLine.left, rLine.bottom - rLine.top, g_pCachedWindow->hBackDC, rLine.left, rLine.top, SRCCOPY);
char req[255];
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Back", Frame->name);
+ mir_snprintf(req, "Main,ID=ScrollBar,Frame=%S,Part=Back", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rLine, &rLine, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Thumb", Frame->name);
+ mir_snprintf(req, "Main,ID=ScrollBar,Frame=%S,Part=Thumb", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rThumb, &rThumb, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar, Frame=%S,Part=UpLineButton", Frame->name);
+ mir_snprintf(req, "Main,ID=ScrollBar, Frame=%S,Part=UpLineButton", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rUpBtn, &rUpBtn, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=DownLineButton", Frame->name);
+ mir_snprintf(req, "Main,ID=ScrollBar,Frame=%S,Part=DownLineButton", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rDnBtn, &rDnBtn, req);
}
@@ -3301,9 +3301,9 @@ static DWORD ske_HexToARGB(char * Hex)
char buf2[11] = { 0 };
mir_snprintf(buf, "%s\n", Hex);
if (buf[1] == 'x' || buf[1] == 'X')
- mir_snprintf(buf2, _countof(buf2), "0x%s\n", buf + 2);
+ mir_snprintf(buf2, "0x%s\n", buf + 2);
else
- mir_snprintf(buf2, _countof(buf2), "0x%s\n", buf);
+ mir_snprintf(buf2, "0x%s\n", buf);
buf2[10] = '\0';
char *st;
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp
index 4e95804f4e..df52146c38 100644
--- a/plugins/Clist_modern/src/modern_skinopt.cpp
+++ b/plugins/Clist_modern/src/modern_skinopt.cpp
@@ -252,7 +252,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
TCHAR prfn[MAX_PATH] = { 0 }, imfn[MAX_PATH] = { 0 }, skinfolder[MAX_PATH] = { 0 };
GetPrivateProfileString(_T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, _countof(imfn), sd->File);
IniParser::GetSkinFolder(sd->File, skinfolder);
- mir_sntprintf(prfn, _countof(prfn), _T("%s\\%s"), skinfolder, imfn);
+ mir_sntprintf(prfn, _T("%s\\%s"), skinfolder, imfn);
PathToAbsoluteT(prfn, imfn);
hPreviewBitmap = ske_LoadGlyphImage(imfn);
@@ -332,7 +332,7 @@ int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder)
struct _tfinddata_t fd = { 0 };
TCHAR mask[MAX_PATH];
long hFile;
- mir_sntprintf(mask, _countof(mask), _T("%s\\*.msf"), Folder);
+ mir_sntprintf(mask, _T("%s\\*.msf"), Folder);
//fd.attrib = _A_SUBDIR;
hFile = _tfindfirst(mask, &fd);
if (hFile != -1)
@@ -342,14 +342,14 @@ int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder)
} while (!_tfindnext(hFile, &fd));
_findclose(hFile);
}
- mir_sntprintf(mask, _countof(mask), _T("%s\\*"), Folder);
+ mir_sntprintf(mask, _T("%s\\*"), Folder);
hFile = _tfindfirst(mask, &fd);
{
do {
if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, _T(".")) == 0 || mir_tstrcmpi(fd.name, _T("..")) == 0))
{//Next level of subfolders
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _countof(path), _T("%s\\%s"), Folder, fd.name);
+ mir_sntprintf(path, _T("%s\\%s"), Folder, fd.name);
SearchSkinFiles(hwndDlg, path);
}
} while (!_tfindnext(hFile, &fd));
@@ -414,7 +414,7 @@ HTREEITEM AddSkinToList(HWND hwndDlg, TCHAR * path, TCHAR* file)
_tcsncpy_s(fullName, TranslateT("Default Skin"), _TRUNCATE);
}
else {
- mir_sntprintf(fullName, _countof(fullName), _T("%s\\%s"), path, file);
+ mir_sntprintf(fullName, _T("%s\\%s"), path, file);
_tcsncpy_s(defskinname, file, _TRUNCATE);
TCHAR *p = _tcsrchr(defskinname, '.'); if (p) *p = 0;
GetPrivateProfileString(_T("Skin_Description_Section"), _T("Name"), defskinname, sd->Name, _countof(sd->Name), fullName);
@@ -522,7 +522,7 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam)
TCHAR skinfolder[MAX_PATH] = { 0 };
GetPrivateProfileString(_T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, _countof(imfn), (LPCTSTR)lParam);
IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder);
- mir_sntprintf(prfn, _countof(prfn), _T("%s\\%s"), skinfolder, imfn);
+ mir_sntprintf(prfn, _T("%s\\%s"), skinfolder, imfn);
PathToAbsoluteT(prfn, imfn);
hPreviewBitmap = ske_LoadGlyphImage(imfn);
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index 8fc3333cff..20d96b08fc 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -770,12 +770,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if (msg == WM_LBUTTONDOWN && bCtrl) {
if (g_CluiData.bFilterEffective != CLVM_FILTER_PROTOS || !bShift) {
ApplyViewMode("");
- mir_snprintf(g_CluiData.protoFilter, _countof(g_CluiData.protoFilter), "%s|", p.szAccountName);
+ mir_snprintf(g_CluiData.protoFilter, "%s|", p.szAccountName);
g_CluiData.bFilterEffective = CLVM_FILTER_PROTOS;
}
else {
char protoF[sizeof(g_CluiData.protoFilter)];
- mir_snprintf(protoF, _countof(protoF), "%s|", p.szAccountName);
+ mir_snprintf(protoF, "%s|", p.szAccountName);
char *pos = strstri(g_CluiData.protoFilter, p.szAccountName);
if (pos) {
// remove filter
@@ -789,7 +789,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
else {
//add filter
- mir_snprintf(g_CluiData.protoFilter, _countof(g_CluiData.protoFilter), "%s%s", g_CluiData.protoFilter, protoF);
+ mir_snprintf(g_CluiData.protoFilter, "%s%s", g_CluiData.protoFilter, protoF);
g_CluiData.bFilterEffective = CLVM_FILTER_PROTOS;
}
}
@@ -809,7 +809,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
continue;
char protoF[sizeof(g_CluiData.protoFilter)];
- mir_snprintf(protoF, _countof(protoF), "%s|", accs[k]->szModuleName);
+ mir_snprintf(protoF, "%s|", accs[k]->szModuleName);
if (strstri(g_CluiData.protoFilter, protoF)) {
if (!first)
mir_strncat(filterName, "; ", _countof(filterName) - mir_strlen(filterName));
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 63ccf96317..6b8c55e12d 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -403,25 +403,25 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
StatusBarProtocolOptions *sbpo = (StatusBarProtocolOptions*)SendMessage(hwndComboBox, CB_GETITEMDATA, i, 0);
char settingBuf[256];
- mir_snprintf(settingBuf, _countof(settingBuf), "SBarAccountIsCustom_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "SBarAccountIsCustom_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->AccountIsCustomized);
- mir_snprintf(settingBuf, _countof(settingBuf), "HideAccount_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "HideAccount_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->HideAccount);
- mir_snprintf(settingBuf, _countof(settingBuf), "SBarShow_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "SBarShow_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->SBarShow);
- mir_snprintf(settingBuf, _countof(settingBuf), "SBarRightClk_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "SBarRightClk_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->SBarRightClk);
- mir_snprintf(settingBuf, _countof(settingBuf), "UseConnectingIcon_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "UseConnectingIcon_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->UseConnectingIcon);
- mir_snprintf(settingBuf, _countof(settingBuf), "ShowUnreadEmails_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "ShowUnreadEmails_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, (BYTE)sbpo->ShowUnreadEmails);
- mir_snprintf(settingBuf, _countof(settingBuf), "ShowXStatus_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "ShowXStatus_%s", sbpo->szName);
db_set_b(NULL, "CLUI", settingBuf, sbpo->ShowXStatus);
- mir_snprintf(settingBuf, _countof(settingBuf), "PaddingLeft_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "PaddingLeft_%s", sbpo->szName);
db_set_dw(NULL, "CLUI", settingBuf, sbpo->PaddingLeft);
- mir_snprintf(settingBuf, _countof(settingBuf), "PaddingRight_%s", sbpo->szName);
+ mir_snprintf(settingBuf, "PaddingRight_%s", sbpo->szName);
db_set_dw(NULL, "CLUI", settingBuf, sbpo->PaddingRight);
}
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp
index 6644f0a846..decbcd621e 100644
--- a/plugins/Clist_modern/src/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/src/modern_tbbutton.cpp
@@ -101,7 +101,7 @@ static void PaintWorker(TBBUTTONDATA *bct, HDC hdcPaint, POINT *pOffset)
if (!g_CluiData.fDisableSkinEngine) {
char szRequest[128];
/* painting */
- mir_snprintf(szRequest, _countof(szRequest), "Button,ID=%s,Hovered=%s,Pressed=%s,Focused=%s",
+ mir_snprintf(szRequest, "Button,ID=%s,Hovered=%s,Pressed=%s,Focused=%s",
bct->szButtonID, // ID
b2str(bct->stateId == PBS_HOT), // Hovered
b2str(bct->stateId == PBS_PRESSED || bct->bIsPushed == TRUE), // Pressed
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index f3d98a0056..121fbf4bef 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -538,7 +538,7 @@ static void UpdateFilters()
for (i = 0; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item);
- mir_snprintf(szMask, _countof(szMask), "%s|", szTemp);
+ mir_snprintf(szMask, "%s|", szTemp);
if (szPF && strstr(szPF, szMask))
ListView_SetCheckState(hwndList, i, TRUE)
else
@@ -561,7 +561,7 @@ static void UpdateFilters()
for (i = 1; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- mir_sntprintf(szMask, _countof(szMask), _T("%s|"), szTemp);
+ mir_sntprintf(szMask, _T("%s|"), szTemp);
if (szGF && _tcsstr(szGF, szMask))
ListView_SetCheckState(hwndList, i, TRUE)
else