summaryrefslogtreecommitdiff
path: root/plugins/Clist_blind
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_blind')
-rw-r--r--plugins/Clist_blind/src/clcpaint.cpp14
-rw-r--r--plugins/Clist_blind/src/contact.cpp2
-rw-r--r--plugins/Clist_blind/src/init.cpp30
3 files changed, 23 insertions, 23 deletions
diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp
index 0c9824e4eb..e70a8e024c 100644
--- a/plugins/Clist_blind/src/clcpaint.cpp
+++ b/plugins/Clist_blind/src/clcpaint.cpp
@@ -304,14 +304,14 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
ChangeToFont(hdcMem, dat, FONTID_OFFLINE, &fontHeight);
else
ChangeToFont(hdcMem, dat, FONTID_CONTACTS, &fontHeight);
- GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_tstrlen(cc->szText), &textSize);
+ GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_wstrlen(cc->szText), &textSize);
width = textSize.cx;
if (cc->type == CLCIT_GROUP) {
szCounts = pcli->pfnGetGroupCountsText(dat, cc);
if (szCounts[0]) {
GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
- GetTextExtentPoint32(hdcMem, szCounts, (int)mir_tstrlen(szCounts), &countsSize);
+ GetTextExtentPoint32(hdcMem, szCounts, (int)mir_wstrlen(szCounts), &countsSize);
width += spaceSize.cx + countsSize.cx;
}
}
@@ -374,7 +374,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
rc.right = rc.left + ((clRect.right - rc.left - textSize.cx) >> 1) - 3;
DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT);
TextOut(hdcMem, rc.right + 3, y + ((dat->rowHeight - fontHeight) >> 1), cc->szText,
- (int)mir_tstrlen(cc->szText));
+ (int)mir_wstrlen(cc->szText));
rc.left = rc.right + 6 + textSize.cx;
rc.right = clRect.right;
DrawEdge(hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT);
@@ -390,7 +390,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
if (rc.right < rc.left + 4)
rc.right = clRect.right + 1;
else
- TextOut(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, (int)mir_tstrlen(szCounts));
+ TextOut(hdcMem, rc.right, rc.top + groupCountsFontTopShift, szCounts, (int)mir_wstrlen(szCounts));
ChangeToFont(hdcMem, dat, FONTID_GROUPS, &fontHeight);
if (selected)
SetTextColor(hdcMem, dat->selTextColour);
@@ -398,12 +398,12 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
SetHotTrackColour(hdcMem, dat);
rc.right--;
ExtTextOut(hdcMem, rc.left, rc.top, ETO_CLIPPED, &rc, cc->szText,
- (int)mir_tstrlen(cc->szText), NULL);
+ (int)mir_wstrlen(cc->szText), NULL);
}
else
TextOut(hdcMem, dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace,
y + ((dat->rowHeight - fontHeight) >> 1), cc->szText,
- (int)mir_tstrlen(cc->szText));
+ (int)mir_wstrlen(cc->szText));
if (dat->exStyle & CLS_EX_LINEWITHGROUPS) {
rc.top = y + (dat->rowHeight >> 1);
rc.bottom = rc.top + 2;
@@ -426,7 +426,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint)
if (cc->type != CLCIT_DIVIDER) {
wchar_t *szText = cc->szText;
RECT rc;
- int qlen = (int)mir_tstrlen(dat->szQuickSearch);
+ int qlen = (int)mir_wstrlen(dat->szQuickSearch);
SetTextColor(hdcMem, dat->quickSearchColour);
rc.left = dat->leftMargin + indent * dat->groupIndent + checkboxWidth + dat->iconXSpace;
rc.top = y + ((dat->rowHeight - fontHeight) >> 1);
diff --git a/plugins/Clist_blind/src/contact.cpp b/plugins/Clist_blind/src/contact.cpp
index 3adbd0c4da..6fa199fdd0 100644
--- a/plugins/Clist_blind/src/contact.cpp
+++ b/plugins/Clist_blind/src/contact.cpp
@@ -90,5 +90,5 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2)
nameb = pcli->pfnGetContactDisplayName(b, 0);
//otherwise just compare names
- return mir_tstrcmpi(namea, nameb);
+ return mir_wstrcmpi(namea, nameb);
}
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 30ccfa6c0c..d1889144f1 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -188,15 +188,15 @@ wchar_t* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* set
else if (dbv.type == DBVT_UTF8)
MultiByteToWideChar(CP_UTF8, 0, dbv.pszVal, -1, out, (int)len);
else if (dbv.type == DBVT_WCHAR)
- mir_tstrncpy(out, dbv.pwszVal, (int)len);
+ mir_wstrncpy(out, dbv.pwszVal, (int)len);
else if (def != NULL)
- mir_tstrncpy(out, def, (int)len);
+ mir_wstrncpy(out, def, (int)len);
db_free(&dbv);
}
else {
if (def != NULL)
- mir_tstrncpy(out, def, (int)len);
+ mir_wstrncpy(out, def, (int)len);
}
return out;
@@ -260,7 +260,7 @@ wchar_t * ParseText(const wchar_t *text,
const wchar_t **variables, size_t variablesSize,
const wchar_t **data, size_t dataSize)
{
- size_t length = mir_tstrlen(text);
+ size_t length = mir_wstrlen(text);
size_t nextPos = 0;
StringHelper ret = { 0 };
size_t i;
@@ -287,10 +287,10 @@ wchar_t * ParseText(const wchar_t *text,
// See if can find it
for (j = 0; j < size; j++) {
- size_t vlen = mir_tstrlen(variables[j]);
+ size_t vlen = mir_wstrlen(variables[j]);
if (wcsnicmp(&text[i], variables[j], vlen) == 0) {
- if (CopyData(&ret, data[j], mir_tstrlen(data[j])))
+ if (CopyData(&ret, data[j], mir_wstrlen(data[j])))
return NULL;
i += vlen - 1;
@@ -423,7 +423,7 @@ wchar_t* GetStatusName(struct ClcContact *item)
// Get status name
status = db_get_w(item->hContact, item->proto, "Status", ID_STATUS_OFFLINE);
- mir_tstrncpy(status_name, pcli->pfnGetStatusModeDescription(status, 0), _countof(status_name));
+ mir_wstrncpy(status_name, pcli->pfnGetStatusModeDescription(status, 0), _countof(status_name));
return status_name;
}
@@ -457,7 +457,7 @@ wchar_t* GetProtoName(struct ClcContact *item)
proto_name[0] = '\0';
if (item->hContact == NULL || item->proto == NULL) {
- mir_tstrncpy(proto_name, TranslateT("Unknown protocol"), _countof(proto_name));
+ mir_wstrncpy(proto_name, TranslateT("Unknown protocol"), _countof(proto_name));
return proto_name;
}
@@ -465,14 +465,14 @@ wchar_t* GetProtoName(struct ClcContact *item)
if (acc == NULL) {
#ifdef UNICODE
CallProtoService(item->proto, PS_GETNAME, sizeof(description), (LPARAM)description);
- mir_sntprintf(proto_name, L"%S", description);
+ mir_snwprintf(proto_name, L"%S", description);
#else
CallProtoService(item->proto, PS_GETNAME, sizeof(proto_name), (LPARAM)proto_name);
#endif
return proto_name;
}
- mir_tstrncpy(proto_name, acc->tszAccountName, _countof(proto_name));
+ mir_wstrncpy(proto_name, acc->tszAccountName, _countof(proto_name));
return proto_name;
}
@@ -539,13 +539,13 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig)
};
if (szCounts[0] != '\0')
- mir_sntprintf(count, L"%s ", szCounts);
+ mir_snwprintf(count, L"%s ", szCounts);
else
count[0] = '\0';
wchar_t *txt = ParseText(template_group, t, _countof(t), v, _countof(v));
if (txt != NULL)
- mir_tstrncpy(text, txt, size);
+ mir_wstrncpy(text, txt, size);
mir_free(txt);
}
break;
@@ -567,17 +567,17 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig)
wchar_t *txt = ParseText(template_contact, t, _countof(t), v, _countof(v));
if (txt != NULL)
- mir_tstrncpy(text, txt, size);
+ mir_wstrncpy(text, txt, size);
mir_free(txt);
}
break;
case CLCIT_DIVIDER:
- mir_sntprintf(text, size, template_divider, item->szText);
+ mir_snwprintf(text, size, template_divider, item->szText);
break;
case CLCIT_INFO:
- mir_sntprintf(text, size, template_info, item->szText);
+ mir_snwprintf(text, size, template_info, item->szText);
break;
}