summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_clc.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index b2c4001665..ed48ac41bc 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -205,7 +205,7 @@ static int clcProceedDragToScroll(HWND hwnd, int Y)
static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_t *text, int prefixOk, BOOL fSearchUp)
{
ClcGroup *group = &dat->list;
- int testlen = (int)mir_tstrlen(text);
+ int testlen = (int)mir_wstrlen(text);
BOOL fReturnAsFound = FALSE;
int nLastFound = -1;
if (index == -1) fReturnAsFound = TRUE;
@@ -229,7 +229,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const wchar_
wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
found = wcsstr(lowered_szText, lowered_search) != NULL;
}
- else found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, cc->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, cc->szText)));
+ else found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, cc->szText, testlen)) || (!prefixOk && !mir_wstrcmpi(text, cc->szText)));
if (found) {
ClcGroup *contactGroup = group;
@@ -1083,7 +1083,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (mir_strcmp(contSour->proto, META_PROTO)) {
if (!contSour->iSubNumber) {
MCONTACT hDest = contDest->hContact;
- mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be converted to metacontact and '%s' be added to it?"), contDest->szText, contSour->szText);
+ mir_snwprintf(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);
@@ -1096,7 +1096,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
else {
hcontact = contSour->hContact;
MCONTACT hdest = contDest->hContact;
- 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);
+ mir_snwprintf(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);
@@ -1122,7 +1122,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (!contSour->iSubNumber) {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->hContact;
- mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->szText);
+ mir_snwprintf(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)
@@ -1132,7 +1132,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
}
else if (contSour->subcontacts == contDest) {
MCONTACT hsour = contSour->hContact;
- mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be default?"), contSour->szText);
+ mir_snwprintf(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);
@@ -1140,7 +1140,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
else {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->hContact;
- 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);
+ mir_snwprintf(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)
@@ -1164,7 +1164,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (!contSour->iSubNumber) {
MCONTACT hcontact = contSour->hContact;
MCONTACT handle = contDest->subcontacts->hContact;
- mir_sntprintf(Wording, TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"), contSour->szText, contDest->subcontacts->szText);
+ mir_snwprintf(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)
@@ -1176,7 +1176,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, 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_snwprintf(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)
@@ -1202,11 +1202,11 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
pcli->pfnGetRowByIndex(dat, dat->iDragItem, &contact, &group);
int i = pcli->pfnGetRowByIndex(dat, dat->iInsertionMark, &destcontact, &destgroup);
if (i != -1 && group->groupId != destgroup->groupId) {
- wchar_t *groupName = mir_tstrdup(Clist_GroupGetName(contact->groupId, 0));
+ wchar_t *groupName = mir_wstrdup(Clist_GroupGetName(contact->groupId, 0));
wchar_t *shortGroup = NULL;
- wchar_t *sourceGrName = mir_tstrdup(Clist_GroupGetName(destgroup->groupId, 0));
+ wchar_t *sourceGrName = mir_wstrdup(Clist_GroupGetName(destgroup->groupId, 0));
if (groupName) {
- int len = (int)mir_tstrlen(groupName);
+ int len = (int)mir_wstrlen(groupName);
do { len--; } while (len >= 0 && groupName[len] != '\\');
if (len >= 0)
shortGroup = groupName + len + 1;
@@ -1216,9 +1216,9 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam,
if (shortGroup) {
NeedRename = TRUE;
if (sourceGrName)
- mir_sntprintf(newName, L"%s\\%s", sourceGrName, shortGroup);
+ mir_snwprintf(newName, L"%s\\%s", sourceGrName, shortGroup);
else
- mir_tstrncpy(newName, shortGroup, _countof(newName));
+ mir_wstrncpy(newName, shortGroup, _countof(newName));
}
mir_free(groupName);
mir_free(sourceGrName);