diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/ContactsPlus | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r-- | plugins/ContactsPlus/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/receive.cpp | 14 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/send.cpp | 4 | ||||
-rw-r--r-- | plugins/ContactsPlus/src/utils.cpp | 14 |
4 files changed, 17 insertions, 17 deletions
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 8852ad0eea..2117b37bb1 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -74,7 +74,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent) {
//add event to the contact list
wchar_t caToolTip[128];
- mir_sntprintf(caToolTip, L"%s %s", TranslateT("Contacts received from"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(caToolTip, L"%s %s", TranslateT("Contacts received from"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
cle.hContact = hContact;
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 0373609632..fe354361d6 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -141,9 +141,9 @@ static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *w wchar_t *caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
char *szProto = GetContactProto(wndData->mhContact);
wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
- replaceStrT(wndData->haUin, caUIN);
+ replaceStrW(wndData->haUin, caUIN);
for (int j = 0; j < wndData->cbReceived; j++)
- if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
+ if (!mir_wstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
return NULL;
}
@@ -220,13 +220,13 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TReceivedItem* pItem = wndData->AddReceivedItem();
if (dbe.flags & DBEF_UTF)
- pItem->mcaNick = mir_utf8decodeT(pcBlob);
+ pItem->mcaNick = mir_utf8decodeW(pcBlob);
else
- pItem->mcaNick = mir_a2t(pcBlob);
+ pItem->mcaNick = mir_a2u(pcBlob);
pcBlob += strsize + 1;
// UIN
strsize = (int)strlennull(pcBlob);
- pItem->mcaUIN = mir_a2t(pcBlob);
+ pItem->mcaUIN = mir_a2u(pcBlob);
pcBlob += strsize + 1;
// add to listview
lvi.iItem = nItem;
@@ -315,7 +315,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara // found checked contact item, add it
wchar_t *caUIN = ListView_GetItemTextEx(hLV, i, 0);
for (int j = 0; j < wndData->cbReceived; j++) // determine item index in packet
- if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) {
+ if (!mir_wstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) {
char *szProto =GetContactProto(wndData->mhContact);
hContact = (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
if (hContact && caGroup) {
@@ -437,7 +437,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara fi.psz = wndData->haUin;
int iLPos = ListView_FindItem(hLV, -1, &fi);
if (iLPos == -1) iLPos = 0;
- if (mir_tstrcmp(psr->nick.w, L"") && psr->nick.w)
+ if (mir_wstrcmp(psr->nick.w, L"") && psr->nick.w)
ListView_SetItemText(hLV, iLPos, 1, psr->nick.w);
ListView_SetItemText(hLV, iLPos, 2, psr->firstName.w);
ListView_SetItemText(hLV, iLPos, 3, psr->lastName.w);
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 7674ed4d57..5031b03ac9 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -411,8 +411,8 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara int i;
for (i = 0; i < ackData->nContacts; i++) {
// prepare data & count size
- maSend[i].mcaNick = mir_utf8encodeT(pcli->pfnGetContactDisplayName(ackData->aContacts[i], 0));
- maSend[i].mcaUIN = mir_utf8encodeT(ptrT(GetContactUID(ackData->aContacts[i])));
+ maSend[i].mcaNick = mir_utf8encodeW(pcli->pfnGetContactDisplayName(ackData->aContacts[i], 0));
+ maSend[i].mcaUIN = mir_utf8encodeW(ptrW(GetContactUID(ackData->aContacts[i])));
dbei.cbBlob += (DWORD)strlennull(maSend[i].mcaUIN) + (DWORD)strlennull((char*)maSend[i].mcaNick) + 2;
}
dbei.pBlob = (PBYTE)_alloca(dbei.cbBlob);
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index f16a559fe2..0cb84a1642 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -69,17 +69,17 @@ wchar_t* GetContactUID(MCONTACT hContact) if (vrUid.type == DBVT_DWORD) {
wchar_t tmp[100];
_itow(vrUid.dVal, tmp, 10);
- return mir_tstrdup(tmp);
+ return mir_wstrdup(tmp);
}
if (vrUid.type == DBVT_ASCIIZ) {
- wchar_t *res = mir_a2t(vrUid.pszVal);
+ wchar_t *res = mir_a2u(vrUid.pszVal);
mir_free(vrUid.pszVal);
return res;
}
if (vrUid.type == DBVT_UTF8) {
- wchar_t *res = mir_utf8decodeT(vrUid.pszVal);
+ wchar_t *res = mir_utf8decodeW(vrUid.pszVal);
mir_free(vrUid.pszVal);
return res;
}
@@ -115,22 +115,22 @@ void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact) void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, wchar_t *pszTitleStart)
{
wchar_t newtitle[512];
- mir_tstrncpy(newtitle, TranslateTS(pszTitleStart), _countof(newtitle));
+ mir_wstrncpy(newtitle, TranslateTS(pszTitleStart), _countof(newtitle));
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto) {
- ptrT uid(GetContactUID(hContact));
+ ptrW uid(GetContactUID(hContact));
wchar_t *contactName = pcli->pfnGetContactDisplayName(hContact, 0);
wchar_t oldTitle[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, _countof(oldTitle));
- if (mir_tstrcmp(uid ? uid : contactName, oldTitle))
+ if (mir_wstrcmp(uid ? uid : contactName, oldTitle))
SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName);
wchar_t *szStatus = pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- mir_sntprintf(newtitle, L"%s %s (%s)", TranslateTS(pszTitleStart), contactName, szStatus);
+ mir_snwprintf(newtitle, L"%s %s (%s)", TranslateTS(pszTitleStart), contactName, szStatus);
}
}
|