From 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jul 2016 09:20:25 +0000 Subject: less TCHARs: - TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhenWasIt/src/notifiers.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'plugins/WhenWasIt/src/notifiers.cpp') diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 4844dcece1..f7eeb0c150 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -35,12 +35,12 @@ void PopupNotifyNoBirthdays() FillPopupData(pd, -1); pd.lchIcon = GetDTBIcon(-1); - _tcsncpy(pd.lptzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1); - _tcsncpy(pd.lptzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1); + wcsncpy(pd.lptzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1); + wcsncpy(pd.lptzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1); PUAddPopupT(&pd); } -TCHAR *BuildDTBText(int dtb, TCHAR *name, TCHAR *text, int size) +wchar_t *BuildDTBText(int dtb, wchar_t *name, wchar_t *text, int size) { if (dtb > 1) mir_sntprintf(text, size, TranslateT("%s has birthday in %d days."), name, dtb); @@ -52,7 +52,7 @@ TCHAR *BuildDTBText(int dtb, TCHAR *name, TCHAR *text, int size) return text; } -TCHAR *BuildDABText(int dab, TCHAR *name, TCHAR *text, int size) +wchar_t *BuildDABText(int dab, wchar_t *name, wchar_t *text, int size) { if (dab > 1) mir_sntprintf(text, size, TranslateT("%s had birthday %d days ago."), name, dab); @@ -69,9 +69,9 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age) if (commonData.bIgnoreSubcontacts && db_mc_isSub(hContact)) return 0; - TCHAR *name = pcli->pfnGetContactDisplayName(hContact, 0); + wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0); - TCHAR text[1024]; + wchar_t text[1024]; BuildDTBText(dtb, name, text, _countof(text)); int gender = GetContactGender(hContact); @@ -82,12 +82,12 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age) pd.lchIcon = GetDTBIcon(dtb); mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); - TCHAR *sex; + wchar_t *sex; switch (toupper(gender)) { - case _T('M'): + case 'M': sex = TranslateT("He"); break; - case _T('F'): + case 'F': sex = TranslateT("She"); break; default: @@ -113,9 +113,9 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age) if (commonData.bIgnoreSubcontacts && db_mc_isSub(hContact)) return 0; - TCHAR *name = pcli->pfnGetContactDisplayName(hContact, 0); + wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0); - TCHAR text[1024]; + wchar_t text[1024]; BuildDABText(dab, name, text, _countof(text)); int gender = GetContactGender(hContact); @@ -126,12 +126,12 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age) pd.lchIcon = GetDTBIcon(dab); mir_sntprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); - TCHAR *sex; + wchar_t *sex; switch (toupper(gender)) { - case _T('M'): + case 'M': sex = TranslateT("He"); break; - case _T('F'): + case 'F': sex = TranslateT("She"); break; default: @@ -153,9 +153,9 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age) int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age) { - TCHAR *name = pcli->pfnGetContactDisplayName(hContact, 0); + wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0); - TCHAR text[1024]; + wchar_t text[1024]; BuildDTBText(dtb, name, text, _countof(text)); if (!hUpcomingDlg) { hUpcomingDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_UPCOMING), NULL, DlgProcUpcoming); @@ -175,9 +175,9 @@ int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age) int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age) { - TCHAR *name = pcli->pfnGetContactDisplayName(hContact, 0); + wchar_t *name = pcli->pfnGetContactDisplayName(hContact, 0); - TCHAR text[1024]; + wchar_t text[1024]; BuildDABText(dab, name, text, _countof(text)); if (!hUpcomingDlg) { hUpcomingDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_UPCOMING), NULL, DlgProcUpcoming); -- cgit v1.2.3