summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/browser
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/YAMN/src/browser
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
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
Diffstat (limited to 'plugins/YAMN/src/browser')
-rw-r--r--plugins/YAMN/src/browser/badconnect.cpp12
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp40
2 files changed, 26 insertions, 26 deletions
diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp
index 80816e0704..d6e4fdf2e6 100644
--- a/plugins/YAMN/src/browser/badconnect.cpp
+++ b/plugins/YAMN/src/browser/badconnect.cpp
@@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
DWORD ErrorCode;
char* TitleStrA;
char *Message1A = NULL;
- TCHAR *Message1W = NULL;
+ wchar_t *Message1W = NULL;
POPUPDATAT BadConnectPopup;
ActualAccount = ((struct BadConnectionParam *)lParam)->account;
@@ -125,7 +125,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
if (ActualAccount->Plugin->Fcn != NULL && ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr != NULL) {
Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode);
SetDlgItemText(hDlg, IDC_STATICMSG, Message1W);
- _tcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
+ wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
@@ -133,7 +133,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
{
Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode);
SetDlgItemText(hDlg, IDC_STATICMSG, Message1W);
- _tcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
+ wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
@@ -141,7 +141,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
{
Message1W = TranslateT("Unknown error");
SetDlgItemText(hDlg, IDC_STATICMSG, Message1W);
- _tcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
+ wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE);
if (ShowPopup)
PUAddPopupT(&BadConnectPopup);
}
@@ -185,7 +185,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP
}
return 0;
case WM_CHAR:
- switch ((TCHAR)wParam)
+ switch ((wchar_t)wParam)
{
case 27:
case 13:
@@ -257,7 +257,7 @@ void __cdecl BadConnection(void *Param)
nid.hIcon = g_LoadIconEx(3);
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nid.uCallbackMessage = WM_YAMN_NOTIFYICON;
- mir_sntprintf(nid.szTip, L"%S%s", ActualAccount->Name, TranslateT(" - connection error"));
+ mir_sntprintf(nid.szTip, L"%S%s", ActualAccount->Name, TranslateT(" - connection error"));
Shell_NotifyIcon(NIM_ADD, &nid);
}
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index ccd681a1d5..d768f3e363 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -177,7 +177,7 @@ typedef struct _SAMPLELISTVIEWCOLUMN
int nSortType; // sorting type (STRING = 0, NUMERIC, DATE, DATETIME)
int nSortOrder; // sorting order (ASCENDING = -1, NONE, DESCENDING)
int nPriority; // sort priority (-1 for none, 0, 1, ..., nColumns - 1 maximum)
- TCHAR lpszName[128]; // column name
+ wchar_t lpszName[128]; // column name
} SAMPLELISTVIEWCOLUMN;
// Compare priority
@@ -633,12 +633,12 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D
CallService(MS_KBDNOTIFY_STARTBLINK, (WPARAM)MN->Real.PopupNC + MN->Virtual.PopupNC, NULL);
if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) {
- TCHAR tszMsg[250];
+ wchar_t tszMsg[250];
mir_sntprintf(tszMsg, TranslateT("%s : %d new mail message(s), %d total"), _A2T(ActualAccount->Name), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC);
if (!(nflags & YAMN_ACC_CONTNOEVENT)) {
- CLISTEVENT evt = {};
- evt.flags = CLEF_TCHAR;
+ CLISTEVENT evt = {};
+ evt.flags = CLEF_TCHAR;
evt.hContact = ActualAccount->hContact;
evt.hIcon = g_LoadIconEx(2);
evt.hDbEvent = ActualAccount->hContact;
@@ -1268,7 +1268,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
HWND hListView = GetDlgItem(hDlg, IDC_LISTHEADERS);
mir_subclassWindow(GetDlgItem(hDlg, IDC_SPLITTER), SplitterSubclassProc);
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)MailParam);
- Window_SetIcon_IcoLib(hDlg, g_GetIconHandle(2));
+ Window_SetIcon_IcoLib(hDlg, g_GetIconHandle(2));
ListView_SetUnicodeFormat(hListView, TRUE);
ListView_SetExtendedListViewStyle(hListView, LVS_EX_FULLROWSELECT);
@@ -1437,11 +1437,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (From && Subj)
mir_sntprintf(title, size, L"%s (%s)", Subj, From);
else if (From)
- _tcsncpy_s(title, size, From, _TRUNCATE);
+ wcsncpy_s(title, size, From, _TRUNCATE);
else if (Subj)
- _tcsncpy_s(title, size, Subj, _TRUNCATE);
+ wcsncpy_s(title, size, Subj, _TRUNCATE);
else
- _tcsncpy_s(title, size, L"none", _TRUNCATE);
+ wcsncpy_s(title, size, L"none", _TRUNCATE);
if (Subj) delete[] Subj;
if (From) delete[] From;
SetWindowTextW(hDlg, title);
@@ -1475,7 +1475,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
case WM_DESTROY:
- Window_FreeIcon_IcoLib(hDlg);
+ Window_FreeIcon_IcoLib(hDlg);
{
RECT coord;
if (GetWindowRect(hDlg, &coord)) {
@@ -1557,7 +1557,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (nReturnCmd > 0) {
int courRow = 0;
size_t sizeNeeded = 0;
- TCHAR headname[64] = { 0 }, headvalue[256] = { 0 };
+ wchar_t headname[64] = { 0 }, headvalue[256] = { 0 };
for (courRow = 0; courRow < numRows; courRow++) {
if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue;
ListView_GetItemText(hList, courRow, 0, headname, _countof(headname));
@@ -1568,8 +1568,8 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR
}
if (sizeNeeded && OpenClipboard(hDlg)) {
EmptyClipboard();
- HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1)*sizeof(TCHAR));
- TCHAR *buff = (TCHAR*)GlobalLock(hData);
+ HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1)*sizeof(wchar_t));
+ wchar_t *buff = (wchar_t*)GlobalLock(hData);
int courPos = 0;
for (courRow = 0; courRow < numRows; courRow++) {
if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue;
@@ -1687,7 +1687,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
WindowList_Add(YAMNVar.NewMailAccountWnd, hDlg, (UINT_PTR)ActualAccount);
{
- TCHAR accstatus[512];
+ wchar_t accstatus[512];
GetStatusFcn(ActualAccount, accstatus);
SetDlgItemText(hDlg, IDC_STSTATUS, accstatus);
}
@@ -1706,7 +1706,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
LVCOLUMN ColInfo;
HYAMNMAIL Parser;
- Window_FreeIcon_IcoLib(hDlg);
+ Window_FreeIcon_IcoLib(hDlg);
struct CMailWinUserInfo *mwui = (struct CMailWinUserInfo *)GetWindowLongPtr(hDlg, DWLP_USER);
if (NULL == (ActualAccount = GetWindowAccount(hDlg)))
@@ -1802,7 +1802,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if ((HACCOUNT)wParam != ActualAccount)
break;
- TCHAR accstatus[512];
+ wchar_t accstatus[512];
GetStatusFcn(ActualAccount, accstatus);
SetDlgItemText(hDlg, IDC_STSTATUS, accstatus);
return 1;
@@ -2037,7 +2037,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
WriteDoneFcn(ActualAccount->MessagesAccessSO);
if (Total) {
- TCHAR DeleteMsg[1024];
+ wchar_t DeleteMsg[1024];
mir_sntprintf(DeleteMsg, TranslateT("Do you really want to delete %d selected mails?"), Total);
if (IDOK == MessageBox(hDlg, DeleteMsg, TranslateT("Delete confirmation"), MB_OKCANCEL | MB_ICONWARNING)) {
@@ -2236,7 +2236,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
if (nReturnCmd > 0) {
int courRow = 0;
size_t sizeNeeded = 0;
- TCHAR from[128] = { 0 }, subject[256] = { 0 }, size[16] = { 0 }, date[64] = { 0 };
+ wchar_t from[128] = { 0 }, subject[256] = { 0 }, size[16] = { 0 }, date[64] = { 0 };
for (courRow = 0; courRow < numRows; courRow++) {
if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue;
ListView_GetItemText(hList, courRow, 0, from, _countof(from));
@@ -2247,8 +2247,8 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR
}
if (sizeNeeded && OpenClipboard(hDlg)) {
EmptyClipboard();
- HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1)*sizeof(TCHAR));
- TCHAR *buff = (TCHAR *)GlobalLock(hData);
+ HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE, (sizeNeeded + 1)*sizeof(wchar_t));
+ wchar_t *buff = (wchar_t *)GlobalLock(hData);
int courPos = 0;
for (courRow = 0; courRow < numRows; courRow++) {
if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue;
@@ -2344,7 +2344,7 @@ void __cdecl MailBrowser(void *Param)
WndFound = TRUE;
if ((hMailBrowser == NULL) && ((MyParam.nflags & YAMN_ACC_MSG) || (MyParam.nflags & YAMN_ACC_ICO) || (MyParam.nnflags & YAMN_ACC_MSG))) {
hMailBrowser = CreateDialogParamW(YAMNVar.hInst, MAKEINTRESOURCEW(IDD_DLGVIEWMESSAGES), NULL, DlgProcYAMNMailBrowser, (LPARAM)&MyParam);
- Window_SetIcon_IcoLib(hMailBrowser, g_GetIconHandle(2));
+ Window_SetIcon_IcoLib(hMailBrowser, g_GetIconHandle(2));
MoveWindow(hMailBrowser, PosX, PosY, SizeX, SizeY, TRUE);
}