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 /src/core/stduserinfo | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stduserinfo')
-rw-r--r-- | src/core/stduserinfo/src/contactinfo.cpp | 18 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 18 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 28 |
3 files changed, 32 insertions, 32 deletions
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index a125be13ef..ca14e50201 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -197,11 +197,11 @@ static int IsOverEmail(HWND hwndDlg, wchar_t* szEmail, int cchEmail) SelectObject(hdc, hEmailFont);
SIZE textSize;
- GetTextExtentPoint32(hdc, szText, (int)mir_tstrlen(szText), &textSize);
+ GetTextExtentPoint32(hdc, szText, (int)mir_wstrlen(szText), &textSize);
ReleaseDC(hwndEmails, hdc);
if (hti.pt.x < rc.left + textSize.cx) {
if (szEmail && cchEmail)
- mir_tstrncpy(szEmail, szText, cchEmail);
+ mir_wstrncpy(szEmail, szText, cchEmail);
return 1;
}
return 0;
@@ -284,7 +284,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
lvi.pszText = idstr2;
- mir_sntprintf(idstr2, L"%d", i + 2);
+ mir_snwprintf(idstr2, L"%d", i + 2);
}
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_EMAILS), lvi.iItem, 1, dbv.ptszVal);
@@ -298,7 +298,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (db_get_ts(hContact, "UserInfo", idstr, &dbv))
break;
lvi.pszText = idstr2;
- mir_sntprintf(idstr2, TranslateT("Custom %d"), i + 1);
+ mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1);
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_EMAILS), lvi.iItem, 1, dbv.ptszVal);
db_free(&dbv);
@@ -332,7 +332,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
if (mir_strlen(dbv.pszVal) > 4 && !mir_strcmp(dbv.pszVal + mir_strlen(dbv.pszVal) - 4, " SMS")) {
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, L"y");
- dbv.ptszVal[mir_tstrlen(dbv.ptszVal) - 4] = '\0';
+ dbv.ptszVal[mir_wstrlen(dbv.ptszVal) - 4] = '\0';
}
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal);
db_free(&dbv);
@@ -359,11 +359,11 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (db_get_ts(hContact, "UserInfo", idstr, &dbv))
break;
lvi.pszText = idstr2;
- mir_sntprintf(idstr2, TranslateT("Custom %d"), i + 1);
+ mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1);
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
- if (mir_tstrlen(dbv.ptszVal) > 4 && !mir_tstrcmp(dbv.ptszVal + mir_tstrlen(dbv.ptszVal) - 4, L" SMS")) {
+ if (mir_wstrlen(dbv.ptszVal) > 4 && !mir_wstrcmp(dbv.ptszVal + mir_wstrlen(dbv.ptszVal) - 4, L" SMS")) {
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, L"y");
- dbv.ptszVal[mir_tstrlen(dbv.ptszVal) - 4] = '\0';
+ dbv.ptszVal[mir_wstrlen(dbv.ptszVal) - 4] = '\0';
}
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal);
db_free(&dbv);
@@ -439,7 +439,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP wchar_t szEmail[256];
if (IsOverEmail(hwndDlg, szEmail, _countof(szEmail))) {
wchar_t szExec[264];
- mir_sntprintf(szExec, L"mailto:%s", szEmail);
+ mir_snwprintf(szExec, L"mailto:%s", szEmail);
ShellExecute(hwndDlg, L"open", szExec, NULL, NULL, SW_SHOW);
break;
}
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 100ea132d8..bd2420bdca 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -255,7 +255,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EMAIL))) {
wchar_t szExec[264], szEmail[256];
GetDlgItemText(hwndDlg, IDC_EMAIL, szEmail, _countof(szEmail));
- mir_sntprintf(szExec, L"mailto:%s", szEmail);
+ mir_snwprintf(szExec, L"mailto:%s", szEmail);
ShellExecute(hwndDlg, L"open", szExec, NULL, NULL, SW_SHOW);
}
break;
@@ -442,11 +442,11 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, lvi.iItem = 0;
for (int i = 0;; i++) {
mir_snprintf(idstr, "Past%d", i);
- ptrT tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
+ ptrW tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
if (tszColText == NULL)
break;
mir_snprintf(idstr, "Past%dText", i);
- ptrT tszText(db_get_tsa(hContact, szProto, idstr));
+ ptrW tszText(db_get_tsa(hContact, szProto, idstr));
if (tszText == NULL)
break;
@@ -459,11 +459,11 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, // affiliation
for (int i = 0;; i++) {
mir_snprintf(idstr, "Affiliation%d", i);
- ptrT tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
+ ptrW tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
if (tszColText == NULL)
break;
mir_snprintf(idstr, "Affiliation%dText", i);
- ptrT tszText(db_get_tsa(hContact, szProto, idstr));
+ ptrW tszText(db_get_tsa(hContact, szProto, idstr));
if (tszText == NULL)
break;
@@ -482,11 +482,11 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, lvi.iItem = 0;
for (int i = 0;; i++) {
mir_snprintf(idstr, "Interest%dCat", i);
- ptrT tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
+ ptrW tszColText(Proto_GetContactInfoSettingStr(proto_service, hContact, szProto, idstr));
if (tszColText == NULL)
break;
mir_snprintf(idstr, "Interest%dText", i);
- ptrT tszText(db_get_tsa(hContact, szProto, idstr));
+ ptrW tszText(db_get_tsa(hContact, szProto, idstr));
if (tszText == NULL)
break;
@@ -543,12 +543,12 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
lf.lfQuality = DEFAULT_QUALITY;
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
- mir_tstrcpy(lf.lfFaceName, L"Courier New");
+ mir_wstrcpy(lf.lfFaceName, L"Courier New");
lf.lfCharSet = DEFAULT_CHARSET;
HFONT hFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
- ptrT szNotes(db_get_tsa(lParam, "UserInfo", "MyNotes"));
+ ptrW szNotes(db_get_tsa(lParam, "UserInfo", "MyNotes"));
if (szNotes != nullptr)
SetDlgItemText(hwndDlg, IDC_MYNOTES, szNotes);
}
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 0de846052e..bcb7e20a39 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -78,18 +78,18 @@ static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2) {
int res;
wchar_t *s1 = getTitle(item1), *s2 = getTitle(item2);
- if (!mir_tstrcmp(s1, TranslateT("Summary"))) return -1;
- if (!mir_tstrcmp(s2, TranslateT("Summary"))) return 1;
- if (res = mir_tstrcmp(s1, s2)) return res;
+ if (!mir_wstrcmp(s1, TranslateT("Summary"))) return -1;
+ if (!mir_wstrcmp(s2, TranslateT("Summary"))) return 1;
+ if (res = mir_wstrcmp(s1, s2)) return res;
s1 = getTab(item1), s2 = getTab(item2);
if (s1 && !s2) return -1;
if (!s1 && s2) return 1;
if (!s1 && !s2) return 0;
- if (s1 && !mir_tstrcmp(s1, TranslateT("General"))) return -1;
- if (s2 && !mir_tstrcmp(s2, TranslateT("General"))) return 1;
- return mir_tstrcmp(s1, s2);
+ if (s1 && !mir_wstrcmp(s1, TranslateT("General"))) return -1;
+ if (s2 && !mir_wstrcmp(s2, TranslateT("General"))) return 1;
+ return mir_wstrcmp(s1, s2);
}
static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM)
@@ -151,8 +151,8 @@ static INT_PTR AddDetailsPage(WPARAM wParam, LPARAM lParam) dst->pwszTab = (!(odp->flags & ODPF_USERINFOTAB) || !odp->pwszTab) ? NULL : mir_wstrdup(odp->pwszTab);
}
else {
- dst->pwszTitle = mir_a2t(odp->pszTitle);
- dst->pwszTab = (!(odp->flags & ODPF_USERINFOTAB) || !odp->pszTab) ? NULL : mir_a2t(odp->pszTab);
+ dst->pwszTitle = mir_a2u(odp->pszTitle);
+ dst->pwszTab = (!(odp->flags & ODPF_USERINFOTAB) || !odp->pszTab) ? NULL : mir_a2u(odp->pszTab);
}
dst->hLangpack = odp->hLangpack;
@@ -180,13 +180,13 @@ static void CreateDetailsTabs(HWND hwndDlg, DetailsData *dat, DetailsPageData *p TabCtrl_DeleteAllItems(hwndTab);
for (int i = 0; i < dat->pageCount; i++) {
DetailsPageData &odp = dat->opd[i];
- if (!odp.ptszTab || mir_tstrcmp(odp.ptszTitle, ppg->ptszTitle))
+ if (!odp.ptszTab || mir_wstrcmp(odp.ptszTitle, ppg->ptszTitle))
continue;
tie.pszText = TranslateTH(odp.hLangpack, odp.ptszTab);
tie.lParam = i;
TabCtrl_InsertItem(hwndTab, pages, &tie);
- if (!mir_tstrcmp(odp.ptszTab, ppg->ptszTab))
+ if (!mir_wstrcmp(odp.ptszTab, ppg->ptszTab))
sel = pages;
pages++;
}
@@ -255,7 +255,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP name = pcli->pfnGetContactDisplayName(dat->hContact, 0);
GetWindowText(hwndDlg, oldTitle, _countof(oldTitle));
- mir_sntprintf(newTitle, oldTitle, name);
+ mir_snwprintf(newTitle, oldTitle, name);
SetWindowText(hwndDlg, newTitle);
//////////////////////////////////////////////////////////////////////
@@ -293,7 +293,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP p.ptszTab = odp[i].pwszTab;
p.hLangpack = odp[i].hLangpack;
- if (i && p.ptszTab && !mir_tstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) {
+ if (i && p.ptszTab && !mir_wstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) {
p.hItem = dat->opd[i - 1].hItem;
continue;
}
@@ -307,7 +307,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP tvis.item.pszText = p.ptszTitle;
else
tvis.item.pszText = TranslateTH(p.hLangpack, p.ptszTitle);
- if (ptszLastTab && !mir_tstrcmp(tvis.item.pszText, ptszLastTab))
+ if (ptszLastTab && !mir_wstrcmp(tvis.item.pszText, ptszLastTab))
dat->currentPage = i;
p.hItem = TreeView_InsertItem(hwndTree, &tvis);
}
@@ -355,7 +355,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_TIMER:
wchar_t str[128];
- mir_sntprintf(str, L"%.*s%s%.*s", dat->updateAnimFrame % 10, L".........", dat->szUpdating, dat->updateAnimFrame % 10, L".........");
+ mir_snwprintf(str, L"%.*s%s%.*s", dat->updateAnimFrame % 10, L".........", dat->szUpdating, dat->updateAnimFrame % 10, L".........");
SetDlgItemText(hwndDlg, IDC_UPDATING, str);
if (++dat->updateAnimFrame == UPDATEANIMFRAMES)
dat->updateAnimFrame = 0;
|