diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
commit | 8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch) | |
tree | 94ef8927e12043ed6dcc15e1e640d68a8add520e /src/core | |
parent | 1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff) |
hello, Unix.
phase 1: removing _T()
git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
26 files changed, 165 insertions, 165 deletions
diff --git a/src/core/stdauth/src/authdialogs.cpp b/src/core/stdauth/src/authdialogs.cpp index 9bb745a113..6ce9a9e66f 100644 --- a/src/core/stdauth/src/authdialogs.cpp +++ b/src/core/stdauth/src/authdialogs.cpp @@ -60,17 +60,17 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar TCHAR* nickT = dbei.flags & DBEF_UTF ? Utf8DecodeT(nick) : mir_a2t(nick);
TCHAR* emailT = dbei.flags & DBEF_UTF ? Utf8DecodeT(email) : mir_a2t(email);
- TCHAR name[128] = _T("");
+ TCHAR name[128] = L"";
int off = 0;
if (firstT[0] && lastT[0])
- off = mir_sntprintf(name, _T("%s %s"), firstT, lastT);
+ off = mir_sntprintf(name, L"%s %s", firstT, lastT);
else if (firstT[0])
- off = mir_sntprintf(name, _T("%s"), firstT);
+ off = mir_sntprintf(name, L"%s", firstT);
else if (lastT[0])
- off = mir_sntprintf(name, _T("%s"), lastT);
+ off = mir_sntprintf(name, L"%s", lastT);
if (nickT[0]) {
if (off)
- mir_sntprintf(name + off, _countof(name) - off, _T(" (%s)"), nickT);
+ mir_sntprintf(name + off, _countof(name) - off, L" (%s)", nickT);
else
_tcsncpy_s(name, nickT, _TRUNCATE);
}
@@ -185,17 +185,17 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ptrT emailT(dbei.flags & DBEF_UTF ? Utf8DecodeT(email) : mir_a2t(email));
ptrT reasonT(dbei.flags & DBEF_UTF ? Utf8DecodeT(reason) : mir_a2t(reason));
- TCHAR name[128] = _T("");
+ TCHAR name[128] = L"";
int off = 0;
if (firstT[0] && lastT[0])
- off = mir_sntprintf(name, _T("%s %s"), (TCHAR*)firstT, (TCHAR*)lastT);
+ off = mir_sntprintf(name, L"%s %s", (TCHAR*)firstT, (TCHAR*)lastT);
else if (firstT[0])
- off = mir_sntprintf(name, _T("%s"), (TCHAR*)firstT);
+ off = mir_sntprintf(name, L"%s", (TCHAR*)firstT);
else if (lastT[0])
- off = mir_sntprintf(name, _T("%s"), (TCHAR*)lastT);
+ off = mir_sntprintf(name, L"%s", (TCHAR*)lastT);
if (mir_tstrlen(nickT)) {
if (off)
- mir_sntprintf(name + off, _countof(name) - off, _T(" (%s)"), (TCHAR*)nickT);
+ mir_sntprintf(name + off, _countof(name) - off, L" (%s)", (TCHAR*)nickT);
else
_tcsncpy_s(name, nickT, _TRUNCATE);
}
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp index b57afb57cd..c2460a8a34 100644 --- a/src/core/stdaway/src/sendmsg.cpp +++ b/src/core/stdaway/src/sendmsg.cpp @@ -101,7 +101,7 @@ static TCHAR* GetAwayMessage(int statusMode, char *szProto) continue;
TCHAR substituteStr[128];
- if ( !_tcsnicmp(dbv.ptszVal + i, _T("%time%"), 6)) {
+ if ( !_tcsnicmp(dbv.ptszVal + i, L"%time%", 6)) {
MIRANDA_IDLE_INFO mii = { sizeof(mii) };
CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii);
@@ -117,7 +117,7 @@ static TCHAR* GetAwayMessage(int statusMode, char *szProto) }
else GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, substituteStr, _countof(substituteStr));
}
- else if ( !_tcsnicmp(dbv.ptszVal + i, _T("%date%"), 6))
+ else if ( !_tcsnicmp(dbv.ptszVal + i, L"%date%", 6))
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, substituteStr, _countof(substituteStr));
else continue;
@@ -461,7 +461,7 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam CheckDlgButton(hwndDlg, IDC_USEPREVIOUS, (i < 0 ? 0 : dat->info[i].usePrevious) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_USESPECIFIC, (i < 0 ? 0 : !dat->info[i].usePrevious) ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemText(hwndDlg, IDC_MSG, i < 0 ? _T("") : dat->info[i].msg);
+ SetDlgItemText(hwndDlg, IDC_MSG, i < 0 ? L"" : dat->info[i].msg);
EnableWindow(GetDlgItem(hwndDlg, IDC_NODIALOG), i < 0 ? 0 : !dat->info[i].ignore);
EnableWindow(GetDlgItem(hwndDlg, IDC_USEPREVIOUS), i < 0 ? 0 : !dat->info[i].ignore);
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp index b5ddfdc7d4..1bd3a33c5c 100644 --- a/src/core/stdchat/src/options.cpp +++ b/src/core/stdchat/src/options.cpp @@ -485,7 +485,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_SPIN4, UDM_SETPOS, 0, MAKELONG(db_get_b(NULL, CHAT_MODULE, "NicklistRowDist", 12), 0));
{
TCHAR* pszGroup = NULL;
- InitSetting(&pszGroup, "AddToGroup", _T("Chat rooms"));
+ InitSetting(&pszGroup, "AddToGroup", L"Chat rooms");
SetDlgItemText(hwndDlg, IDC_GROUP, pszGroup);
mir_free(pszGroup);
}
@@ -542,9 +542,9 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPITEMIDLIST idList = SHBrowseForFolder(&bi);
if (idList) {
SHGetPathFromIDList(idList, szDirectory);
- mir_tstrcat(szDirectory, _T("\\"));
+ mir_tstrcat(szDirectory, L"\\");
PathToRelativeT(szDirectory, szTemp);
- SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_tstrlen(szTemp) > 1 ? szTemp : _T("Logs\\"));
+ SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_tstrlen(szTemp) > 1 ? szTemp : L"Logs\\");
CoTaskMemFree(idList);
}
}
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 1068df1ef9..56765958bd 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -51,7 +51,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) DBVARIANT dbv;
if (db_get_ts(NULL, "SRMM", str, &dbv))
- mir_tstrcpy(lf->lfFaceName, _T("Arial"));
+ mir_tstrcpy(lf->lfFaceName, L"Arial");
else {
mir_tstrncpy(lf->lfFaceName, dbv.ptszVal, _countof(lf->lfFaceName));
db_free(&dbv);
@@ -149,7 +149,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO mir_tstrncpy(szTemp, TranslateT("&Message"), _countof(szTemp) - 1);
if (mir_tstrlen(szTemp) > 40)
- mir_tstrcpy(szTemp + 40, _T("..."));
+ mir_tstrcpy(szTemp + 40, L"...");
ModifyMenu(*hMenu, ID_MESS, MF_STRING | MF_BYCOMMAND, ID_MESS, szTemp);
gcmi.Type = MENU_ON_NICKLIST;
}
@@ -202,7 +202,7 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex) void ValidateFilename(TCHAR *filename)
{
TCHAR *p1 = filename;
- TCHAR szForbidden[] = _T("\\/:*?\"<>|");
+ TCHAR szForbidden[] = L"\\/:*?\"<>|";
while (*p1 != '\0') {
if (_tcschr(szForbidden, *p1))
*p1 = '_';
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index eff7d1c9bd..7fdbf8f562 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -30,7 +30,7 @@ struct MESSAGESUBDATA TCHAR szTabSave[20];
};
-static TCHAR szTrimString[] = _T(":;,.!?\'\"><()[]- \r\n");
+static TCHAR szTrimString[] = L":;,.!?\'\"><()[]- \r\n";
static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -524,7 +524,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, ste.codepage = CP_ACP;
SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)lpPrevCmd);
}
- else SetWindowText(hwnd, _T(""));
+ else SetWindowText(hwnd, L"");
GETTEXTLENGTHEX gtl = { 0 };
gtl.flags = GTL_PRECISE;
@@ -548,7 +548,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, ste.codepage = CP_ACP;
SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)lpPrevCmd);
}
- else SetWindowText(hwnd, _T(""));
+ else SetWindowText(hwnd, L"");
GETTEXTLENGTHEX gtl = { 0 };
gtl.flags = GTL_PRECISE;
@@ -619,7 +619,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, break;
case ID_MESSAGE_CLEAR:
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
break;
}
PostMessage(hwnd, WM_KEYUP, 0, 0);
@@ -996,7 +996,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *si }
if (tszBuf[0] == 0)
- mir_sntprintf(tszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(tszBuf, L"%s: %s\r\n%s: %s\r\n%s: %s",
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(si->pStatuses, ui->Status));
@@ -1292,8 +1292,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, (WPARAM)SCF_ALL, (LPARAM)&cf);
// nicklist
- int ih = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFont, FALSE);
- int ih2 = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListHeadingsFont, FALSE);
+ int ih = GetTextPixelSize(L"AQGglo", g_Settings.UserListFont, FALSE);
+ int ih2 = GetTextPixelSize(L"AQGglo", g_Settings.UserListHeadingsFont, FALSE);
int height = db_get_b(NULL, CHAT_MODULE, "NicklistRowDist", 12);
int font = ih > ih2 ? ih : ih2;
@@ -1324,7 +1324,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar si->ptszName, si->nUsersInNicklist);
break;
case GCW_SERVER:
- mir_sntprintf(szTemp, _T("%s: Server"), si->ptszName);
+ mir_sntprintf(szTemp, L"%s: Server", si->ptszName);
break;
}
SetWindowText(hwndDlg, szTemp);
@@ -1353,8 +1353,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar SendMessage(si->hwndStatus, SB_SETTEXT, 0, (LPARAM)ptszDispName);
- SendMessage(si->hwndStatus, SB_SETTEXT, 1, (LPARAM)(si->ptszStatusbarText ? si->ptszStatusbarText : _T("")));
- SendMessage(si->hwndStatus, SB_SETTIPTEXT, 1, (LPARAM)(si->ptszStatusbarText ? si->ptszStatusbarText : _T("")));
+ SendMessage(si->hwndStatus, SB_SETTEXT, 1, (LPARAM)(si->ptszStatusbarText ? si->ptszStatusbarText : L""));
+ SendMessage(si->hwndStatus, SB_SETTIPTEXT, 1, (LPARAM)(si->ptszStatusbarText ? si->ptszStatusbarText : L""));
}
return TRUE;
@@ -1607,7 +1607,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar mir_tstrncpy(szTemp, s1->ptszName, 21);
if (mir_tstrlen(s1->ptszName) > 20)
- mir_tstrncpy(szTemp + 20, _T("..."), 4);
+ mir_tstrncpy(szTemp + 20, L"...", 4);
tci.mask = TCIF_TEXT | TCIF_PARAM;
tci.pszText = szTemp;
@@ -1797,7 +1797,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case GC_ACKMESSAGE:
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
return TRUE;
case WM_CTLCOLORLISTBOX:
@@ -1810,8 +1810,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (mis->CtlType == ODT_MENU)
return Menu_MeasureItem((LPMEASUREITEMSTRUCT)lParam);
- int ih = GetTextPixelSize(_T("AQGgl'"), g_Settings.UserListFont, FALSE);
- int ih2 = GetTextPixelSize(_T("AQGg'"), g_Settings.UserListHeadingsFont, FALSE);
+ int ih = GetTextPixelSize(L"AQGgl'", g_Settings.UserListFont, FALSE);
+ int ih2 = GetTextPixelSize(L"AQGg'", g_Settings.UserListHeadingsFont, FALSE);
int font = ih > ih2 ? ih : ih2;
int height = db_get_b(NULL, CHAT_MODULE, "NicklistRowDist", 12);
@@ -1902,7 +1902,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar return TRUE;
case WINDOW_CLEARLOG:
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
return TRUE;
case SESSION_TERMINATE:
@@ -2221,7 +2221,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar {
SESSION_INFO *s = pci->SM_FindSession(si->ptszID, si->pszModule);
if (s) {
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
pci->LM_RemoveAll(&s->pLog, &s->pLogEnd);
s->iEventCount = 0;
s->LastTime = 0;
@@ -2236,14 +2236,14 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case ID_SEARCH_GOOGLE:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, _T("http://www.google.com/search?q=%s"), pszWord));
+ Utils_OpenUrlT(CMString(FORMAT, L"http://www.google.com/search?q=%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
case ID_SEARCH_WIKIPEDIA:
if (pszWord[0])
- Utils_OpenUrlT(CMString(FORMAT, _T("http://en.wikipedia.org/wiki/%s"), pszWord));
+ Utils_OpenUrlT(CMString(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord));
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
break;
@@ -2331,7 +2331,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar USERINFO *ui = pci->SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, item);
if (ui != NULL) {
static TCHAR ptszBuf[1024];
- mir_sntprintf(ptszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(ptszBuf, L"%s: %s\r\n%s: %s\r\n%s: %s",
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui->Status));
@@ -2359,9 +2359,9 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar size_t dwNameLenMax = (mir_tstrlen(ui->pszUID) + 3);
TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR) * dwNameLenMax);
if (start == 0)
- mir_sntprintf(pszName, dwNameLenMax, _T("%s: "), ui->pszUID);
+ mir_sntprintf(pszName, dwNameLenMax, L"%s: ", ui->pszUID);
else
- mir_sntprintf(pszName, dwNameLenMax, _T("%s "), ui->pszUID);
+ mir_sntprintf(pszName, dwNameLenMax, L"%s ", ui->pszUID);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)pszName);
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
@@ -2391,13 +2391,13 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar CMString ptszText(ptrT(mir_utf8decodeT(pszRtf)));
pci->DoRtfToTags(ptszText, mi->nColorCount, mi->crColors);
ptszText.Trim();
- ptszText.Replace(_T("%"), _T("%%"));
+ ptszText.Replace(L"%", L"%%");
if (mi->bAckMsg) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MESSAGE), FALSE);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETREADONLY, TRUE, 0);
}
- else SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ else SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
@@ -2450,12 +2450,12 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar _tcsncpy_s(szName, (pInfo->ptszModDispName ? pInfo->ptszModDispName : _A2T(si->pszModule)), _TRUNCATE);
ValidateFilename(szName);
- mir_sntprintf(szFolder, _T("%s\\%s"), g_Settings.pszLogDir, szName);
- mir_sntprintf(szName, _T("%s.log"), si->ptszID);
+ mir_sntprintf(szFolder, L"%s\\%s", g_Settings.pszLogDir, szName);
+ mir_sntprintf(szName, L"%s.log", si->ptszID);
ValidateFilename(szName);
- mir_sntprintf(szFile, _T("%s\\%s"), szFolder, szName);
- ShellExecute(hwndDlg, _T("open"), szFile, NULL, NULL, SW_SHOW);
+ mir_sntprintf(szFile, L"%s\\%s", szFolder, szName);
+ ShellExecute(hwndDlg, L"open", szFile, NULL, NULL, SW_SHOW);
}
}
break;
diff --git a/src/core/stdclist/src/clcfonts.cpp b/src/core/stdclist/src/clcfonts.cpp index 316675b312..79150a51f4 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -129,7 +129,7 @@ void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst) HFONT holdfont = (HFONT)SelectObject(hdc, dat->fontInfo[i].hFont);
SIZE fontSize;
- GetTextExtentPoint32(hdc, _T("x"), 1, &fontSize);
+ GetTextExtentPoint32(hdc, L"x", 1, &fontSize);
SelectObject(hdc, holdfont);
dat->fontInfo[i].fontHeight = fontSize.cy;
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 37747c7b2b..ef529785e9 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -129,7 +129,7 @@ static LONG CalcMinRowHeight() HFONT hFont = CreateFontIndirect(&lf);
hFont = (HFONT)SelectObject(hdc, hFont);
SIZE fontSize;
- GetTextExtentPoint32(hdc, _T("x"), 1, &fontSize);
+ GetTextExtentPoint32(hdc, L"x", 1, &fontSize);
if (fontSize.cy > minHeight)
minHeight = fontSize.cy;
hFont = (HFONT)SelectObject(hdc, hFont);
@@ -353,7 +353,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("bmp");
+ ofn.lpstrDefExt = L"bmp";
if (!GetOpenFileName(&ofn))
break;
SetDlgItemText(hwndDlg, IDC_FILENAME, str);
diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index d95d126fbd..3360176522 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -320,7 +320,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (cc->type == CLCIT_GROUP) {
ptszGroupCount = pcli->pfnGetGroupCountsText(dat, cc);
if (*ptszGroupCount) {
- GetTextExtentPoint32(hdcMem, _T(" "), 1, &spaceSize);
+ GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
GetTextExtentPoint32(hdcMem, ptszGroupCount, (int)mir_tstrlen(ptszGroupCount), &countsSize);
width += spaceSize.cx + countsSize.cx;
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp index 82c9eb6ef9..00f163105c 100644 --- a/src/core/stdclist/src/cluiopts.cpp +++ b/src/core/stdclist/src/cluiopts.cpp @@ -195,7 +195,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW | WS_EX_APPWINDOW);
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (hProgMan)
SetParent(pcli->hwndContactList, hProgMan);
}
diff --git a/src/core/stdcrypt/src/utils.cpp b/src/core/stdcrypt/src/utils.cpp index a669540320..04ac8bab4f 100644 --- a/src/core/stdcrypt/src/utils.cpp +++ b/src/core/stdcrypt/src/utils.cpp @@ -27,7 +27,7 @@ bool getRandomBytes(BYTE *buf, size_t bufLen) {
// try to use Intel hardware randomizer first
HCRYPTPROV hProvider = NULL;
- if (::CryptAcquireContext(&hProvider, NULL, _T("Intel Hardware Cryptographic Service Provider"), PROV_INTEL_SEC, 0) ||
+ if (::CryptAcquireContext(&hProvider, NULL, L"Intel Hardware Cryptographic Service Provider", PROV_INTEL_SEC, 0) ||
::CryptAcquireContext(&hProvider, NULL, MS_STRONG_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) ||
::CryptAcquireContext(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
{
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 2e6409bbfd..a9f28f51d9 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -164,11 +164,11 @@ void GetSensiblyFormattedSize(__int64 size, TCHAR *szOut, int cchOut, int unitsO *unitsUsed = unitsOverride;
switch (unitsOverride) {
- case UNITS_BYTES: mir_sntprintf(szOut, cchOut, _T("%u%s%s"), (int)size, appendUnits ? _T(" ") : _T(""), appendUnits ? TranslateT("bytes") : _T("")); break;
- case UNITS_KBPOINT1: mir_sntprintf(szOut, cchOut, _T("%.1lf%s"), size / 1024.0, appendUnits ? _T(" KB") : _T("")); break;
- case UNITS_KBPOINT0: mir_sntprintf(szOut, cchOut, _T("%u%s"), (int)(size / 1024), appendUnits ? _T(" KB") : _T("")); break;
- case UNITS_GBPOINT3: mir_sntprintf(szOut, cchOut, _T("%.3f%s"), (size >> 20) / 1024.0, appendUnits ? _T(" GB") : _T("")); break;
- default: mir_sntprintf(szOut, cchOut, _T("%.2lf%s"), size / 1048576.0, appendUnits ? _T(" MB") : _T("")); break;
+ case UNITS_BYTES: mir_sntprintf(szOut, cchOut, L"%u%s%s", (int)size, appendUnits ? L" " : L"", appendUnits ? TranslateT("bytes") : L""); break;
+ case UNITS_KBPOINT1: mir_sntprintf(szOut, cchOut, L"%.1lf%s", size / 1024.0, appendUnits ? L" KB" : L""); break;
+ case UNITS_KBPOINT0: mir_sntprintf(szOut, cchOut, L"%u%s", (int)(size / 1024), appendUnits ? L" KB" : L""); break;
+ case UNITS_GBPOINT3: mir_sntprintf(szOut, cchOut, L"%.3f%s", (size >> 20) / 1024.0, appendUnits ? L" GB" : L""); break;
+ default: mir_sntprintf(szOut, cchOut, L"%.2lf%s", size / 1048576.0, appendUnits ? L" MB" : L""); break;
}
}
@@ -338,7 +338,7 @@ INT_PTR openContRecDir(WPARAM hContact, LPARAM) {
TCHAR szContRecDir[MAX_PATH];
GetContactReceivedFilesDir(hContact, szContRecDir, _countof(szContRecDir), TRUE);
- ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
+ ShellExecute(0, L"open", szContRecDir, 0, 0, SW_SHOW);
return 0;
}
@@ -346,7 +346,7 @@ INT_PTR openRecDir(WPARAM, LPARAM) {
TCHAR szContRecDir[MAX_PATH];
GetReceivedFilesDir(szContRecDir, _countof(szContRecDir));
- ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
+ ShellExecute(0, L"open", szContRecDir, 0, 0, SW_SHOW);
return 0;
}
diff --git a/src/core/stdfile/src/fileexistsdlg.cpp b/src/core/stdfile/src/fileexistsdlg.cpp index 14561bde0e..a5243ee528 100644 --- a/src/core/stdfile/src/fileexistsdlg.cpp +++ b/src/core/stdfile/src/fileexistsdlg.cpp @@ -151,7 +151,7 @@ void __cdecl LoadIconsAndTypesThread(void* param) if (pszExtension)
mir_tstrncpy(szExtension, pszExtension + 1, _countof(szExtension));
else {
- pszExtension = _T(".");
+ pszExtension = L".";
szExtension[0] = '\0';
}
CharUpper(szExtension);
@@ -161,15 +161,15 @@ void __cdecl LoadIconsAndTypesThread(void* param) SetDlgItemText(info->hwndDlg, IDC_NEWTYPE, fileInfo.szTypeName);
SendDlgItemMessage(info->hwndDlg, IDC_EXISTINGICON, STM_SETICON, (WPARAM)fileInfo.hIcon, 0);
szIconFile[0] = '\0';
- if (!mir_tstrcmp(szExtension, _T("EXE")))
- SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("2"), szIconFile, _countof(szIconFile));
+ if (!mir_tstrcmp(szExtension, L"EXE"))
+ SRFile_GetRegValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons", L"2", szIconFile, _countof(szIconFile));
else {
TCHAR szTypeName[MAX_PATH];
if (SRFile_GetRegValue(HKEY_CLASSES_ROOT, pszExtension, NULL, szTypeName, _countof(szTypeName))) {
- mir_tstrcat(szTypeName, _T("\\DefaultIcon"));
+ mir_tstrcat(szTypeName, L"\\DefaultIcon");
if (SRFile_GetRegValue(HKEY_CLASSES_ROOT, szTypeName, NULL, szIconFile, _countof(szIconFile))) {
- if (_tcsstr(szIconFile, _T("%1")))
- SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("0"), szIconFile, _countof(szIconFile));
+ if (_tcsstr(szIconFile, L"%1"))
+ SRFile_GetRegValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons", L"0", szIconFile, _countof(szIconFile));
else szIconFile[0] = '\0';
}
}
@@ -288,9 +288,9 @@ INT_PTR CALLBACK DlgProcFileExists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.hwndOwner = hwndDlg;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
_tcsncpy(filter, TranslateT("All files"),_countof(filter)-1);
- mir_tstrcat(filter, _T(" (*)"));
+ mir_tstrcat(filter, L" (*)");
pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, L"*");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp index 7251c276ae..c608f7311a 100644 --- a/src/core/stdfile/src/fileopts.cpp +++ b/src/core/stdfile/src/fileopts.cpp @@ -35,16 +35,16 @@ struct virusscannerinfo { const TCHAR *szExeRegValue;
const TCHAR *szCommandLine;
} virusScanners[] = {
- {_T("Network Associates/McAfee VirusScan"), _T("SOFTWARE\\McAfee\\VirusScan"), _T("Scan32EXE"), _T("\"%s\" %%f /nosplash /comp /autoscan /autoexit /noboot")},
- {_T("Dr Solomon's VirusScan (Network Associates)"), _T("SOFTWARE\\Network Associates\\TVD\\VirusScan\\AVConsol\\General"), _T("szScannerExe"), _T("\"%s\" %%f /uinone /noboot /comp /prompt /autoexit")},
- {_T("Norton AntiVirus"), _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Navw32.exe"), NULL, _T("\"%s\" %%f /b- /m- /s+ /noresults")},
- {_T("Computer Associates/Inoculate IT"), _T("Software\\Antivirus"), _T("ImageFilename"), _T("\"%s\" %%f /display = progress /exit")},
- {_T("Computer Associates eTrust"), _T("SOFTWARE\\ComputerAssociates\\Anti-Virus\\Resident"), _T("VetPath"), _T("\"%s\" %%f /display = progress /exit")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\Components\\101"), _T("EXEName"), _T("\"%s\" /S /Q %%f")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\SetupFolders"), _T("KAV8"), _T("\"%savp.exe\" SCAN %%f")},
- {_T("Kaspersky Anti-Virus"), _T("SOFTWARE\\KasperskyLab\\SetupFolders"), _T("KAV9"), _T("\"%savp.exe\" SCAN %%f")},
- {_T("AntiVir PersonalEdition Classic"), _T("SOFTWARE\\Avira\\AntiVir PersonalEdition Classic"), _T("Path"), _T("\"%savscan.exe\" /GUIMODE = 2 /PATH = \"%%f\"")},
- {_T("ESET NOD32 Antivirus"), _T("SOFTWARE\\ESET\\ESET Security\\CurrentVersion\\Info"), _T("InstallDir"), _T("\"%secls.exe\" /log-all /aind /no-boots /adware /sfx /unsafe /unwanted /heur /adv-heur /action = clean \"%%f\"")},
+ {L"Network Associates/McAfee VirusScan", L"SOFTWARE\\McAfee\\VirusScan", L"Scan32EXE", L"\"%s\" %%f /nosplash /comp /autoscan /autoexit /noboot"},
+ {L"Dr Solomon's VirusScan (Network Associates)", L"SOFTWARE\\Network Associates\\TVD\\VirusScan\\AVConsol\\General", L"szScannerExe", L"\"%s\" %%f /uinone /noboot /comp /prompt /autoexit"},
+ {L"Norton AntiVirus", L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Navw32.exe", NULL, L"\"%s\" %%f /b- /m- /s+ /noresults"},
+ {L"Computer Associates/Inoculate IT", L"Software\\Antivirus", L"ImageFilename", L"\"%s\" %%f /display = progress /exit"},
+ {L"Computer Associates eTrust", L"SOFTWARE\\ComputerAssociates\\Anti-Virus\\Resident", L"VetPath", L"\"%s\" %%f /display = progress /exit"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\Components\\101", L"EXEName", L"\"%s\" /S /Q %%f"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\SetupFolders", L"KAV8", L"\"%savp.exe\" SCAN %%f"},
+ {L"Kaspersky Anti-Virus", L"SOFTWARE\\KasperskyLab\\SetupFolders", L"KAV9", L"\"%savp.exe\" SCAN %%f"},
+ {L"AntiVir PersonalEdition Classic", L"SOFTWARE\\Avira\\AntiVir PersonalEdition Classic", L"Path", L"\"%savscan.exe\" /GUIMODE = 2 /PATH = \"%%f\""},
+ {L"ESET NOD32 Antivirus", L"SOFTWARE\\ESET\\ESET Security\\CurrentVersion\\Info", L"InstallDir", L"\"%secls.exe\" /log-all /aind /no-boots /adware /sfx /unsafe /unwanted /heur /adv-heur /action = clean \"%%f\""},
};
#define M_UPDATEENABLING (WM_USER+100)
@@ -85,7 +85,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L }
}
if (SendDlgItemMessageA(hwndDlg, IDC_SCANCMDLINE, CB_GETCOUNT, 0, 0) == 0) {
- int iItem = SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ int iItem = SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_ADDSTRING, 0, (LPARAM)L"");
SendDlgItemMessage(hwndDlg, IDC_SCANCMDLINE, CB_SETITEMDATA, iItem, (LPARAM)-1);
}
@@ -166,8 +166,8 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L GetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str, _countof(str));
CMString tszFilter;
- tszFilter.AppendFormat(_T("%s (*.exe)%c*.exe%c"), TranslateT("Executable files"), 0, 0);
- tszFilter.AppendFormat(_T("%s (*)%c*%c"), TranslateT("All files"), 0, 0);
+ tszFilter.AppendFormat(L"%s (*.exe)%c*.exe%c", TranslateT("Executable files"), 0, 0);
+ tszFilter.AppendFormat(L"%s (*)%c*%c", TranslateT("All files"), 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L if (_tcschr(str, ' ') != NULL) {
memmove(str + 1, str, ((_countof(str) - 2) * sizeof(TCHAR)));
str[0] = '"';
- mir_tstrcat(str, _T("\""));
+ mir_tstrcat(str, L"\"");
}
SetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str);
break;
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 637ab19208..3c75d282c0 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -48,7 +48,7 @@ static void GetLowestExistingDirName(const TCHAR *szTestDir, TCHAR *szExistingDi GetCurrentDirectory(cchExistingDir, szExistingDir);
}
-static const TCHAR InvalidFilenameChars[] = _T("\\/:*?\"<>|");
+static const TCHAR InvalidFilenameChars[] = L"\\/:*?\"<>|";
void RemoveInvalidFilenameChars(TCHAR *tszString)
{
size_t i;
@@ -58,7 +58,7 @@ void RemoveInvalidFilenameChars(TCHAR *tszString) }
}
-static const TCHAR InvalidPathChars[] = _T("*?\"<>|"); // "\/:" are excluded as they are allowed in file path
+static const TCHAR InvalidPathChars[] = L"*?\"<>|"; // "\/:" are excluded as they are allowed in file path
void RemoveInvalidPathChars(TCHAR *tszString)
{
if (tszString)
@@ -94,7 +94,7 @@ int BrowseForFolder(HWND hwnd, TCHAR *szPath) LPITEMIDLIST pidlResult = SHBrowseForFolder(&bi);
if (pidlResult) {
SHGetPathFromIDList(pidlResult, szPath);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
CoTaskMemFree(pidlResult);
}
return pidlResult != NULL;
@@ -118,7 +118,7 @@ static void patchDir(TCHAR *str, size_t strSize) size_t len = mir_tstrlen(str);
if (len + 1 < strSize && str[len - 1] != '\\')
- mir_tstrcpy(str + len, _T("\\"));
+ mir_tstrcpy(str + len, L"\\");
}
void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
@@ -129,17 +129,17 @@ void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOO if (tszRecvPath)
_tcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE);
else
- mir_sntprintf(tszTemp, _T("%%mydocuments%%\\%s\\%%userid%%"), TranslateT("My received files"));
+ mir_sntprintf(tszTemp, L"%%mydocuments%%\\%s\\%%userid%%", TranslateT("My received files"));
if (hContact) {
hContact = db_mc_tryMeta(hContact);
REPLACEVARSARRAY rvaVarsToReplace[4];
- rvaVarsToReplace[0].key.t = _T("nick");
+ rvaVarsToReplace[0].key.t = L"nick";
rvaVarsToReplace[0].value.t = mir_tstrdup((TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0));
- rvaVarsToReplace[1].key.t = _T("userid");
+ rvaVarsToReplace[1].key.t = L"userid";
rvaVarsToReplace[1].value.t = GetContactID(hContact);
- rvaVarsToReplace[2].key.t = _T("proto");
+ rvaVarsToReplace[2].key.t = L"proto";
rvaVarsToReplace[2].value.t = mir_a2t(GetContactProto(hContact));
rvaVarsToReplace[3].key.t = NULL;
rvaVarsToReplace[3].value.t = NULL;
@@ -169,7 +169,7 @@ void GetReceivedFilesDir(TCHAR *szDir, int cchDir) if (tszRecvPath)
_tcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE);
else
- mir_sntprintf(tszTemp, _T("%%mydocuments%%\\%s\\%%userid%%"), TranslateT("My received files"));
+ mir_sntprintf(tszTemp, L"%%mydocuments%%\\%s\\%%userid%%", TranslateT("My received files"));
patchDir(tszTemp, _countof(tszTemp));
RemoveInvalidPathChars(tszTemp);
@@ -244,7 +244,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l else DestroyWindow(hwndDlg);
TCHAR datetimestr[64];
- TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("t d"), datetimestr, _countof(datetimestr), 0);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, L"t d", datetimestr, _countof(datetimestr), 0);
SetDlgItemText(hwndDlg, IDC_DATE, datetimestr);
ptrT info(Contact_GetInfo(CNF_UNIQUEID, dat->hContact));
diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp index 54c6a9a786..318dcab932 100644 --- a/src/core/stdfile/src/filesenddlg.cpp +++ b/src/core/stdfile/src/filesenddlg.cpp @@ -49,7 +49,7 @@ static void SetFileListAndSizeControls(HWND hwndDlg, FileDlgData *dat) if (i > 1) {
TCHAR szFormat[32];
if (fileCount && dirCount) {
- mir_sntprintf(szFormat, _T("%s, %s"), TranslateTS(fileCount == 1 ? _T("%d file") : _T("%d files")), TranslateTS(dirCount == 1 ? _T("%d directory") : _T("%d directories")));
+ mir_sntprintf(szFormat, L"%s, %s", TranslateTS(fileCount == 1 ? L"%d file" : L"%d files"), TranslateTS(dirCount == 1 ? L"%d directory" : L"%d directories"));
mir_sntprintf(str, szFormat, fileCount, dirCount);
}
else if (fileCount) {
@@ -147,9 +147,9 @@ void __cdecl ChooseFilesThread(void* param) TCHAR filter[128];
mir_tstrcpy(filter, TranslateT("All files"));
- mir_tstrcat(filter, _T(" (*)"));
+ mir_tstrcat(filter, L" (*)");
TCHAR *pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, L"*");
pfilter = filter + mir_tstrlen(filter) + 1;
pfilter[0] = '\0';
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index e8f4d1212b..036e75068e 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -99,13 +99,13 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info) if (dbv.ptszVal[0]) { STARTUPINFO si = { 0 }; si.cb = sizeof(si); - TCHAR *pszReplace = _tcsstr(dbv.ptszVal, _T("%f")); + TCHAR *pszReplace = _tcsstr(dbv.ptszVal, L"%f"); TCHAR szCmdLine[768]; if (pszReplace) { if (info->szFile[mir_tstrlen(info->szFile) - 1] == '\\') info->szFile[mir_tstrlen(info->szFile) - 1] = '\0'; *pszReplace = 0; - mir_sntprintf(szCmdLine, _T("%s\"%s\"%s"), dbv.ptszVal, info->szFile, pszReplace + 2); + mir_sntprintf(szCmdLine, L"%s\"%s\"%s", dbv.ptszVal, info->szFile, pszReplace + 2); } else _tcsncpy_s(szCmdLine, dbv.ptszVal, _TRUNCATE); @@ -139,7 +139,7 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE if (dat->hIcon) DestroyIcon(dat->hIcon); dat->hIcon = NULL; if (fn && (fts->totalFiles > 1)) { - mir_sntprintf(msg, _T("%s: %s (%d %s %d)"), + mir_sntprintf(msg, L"%s: %s (%d %s %d)", pcli->pfnGetContactDisplayName(fts->hContact, 0), fn, fts->currentFileNumber + 1, TranslateT("of"), fts->totalFiles); @@ -147,7 +147,7 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE dat->hIcon = shfi.hIcon; } else if (fn) { - mir_sntprintf(msg, _T("%s: %s"), pcli->pfnGetContactDisplayName(fts->hContact, 0), fn); + mir_sntprintf(msg, L"%s: %s", pcli->pfnGetContactDisplayName(fts->hContact, 0), fn); SHGetFileInfo(fn, FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON); dat->hIcon = shfi.hIcon; @@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(hwndDlg, IDC_CONTACTNAME, WM_SETFONT, (WPARAM)hFont, 0); SHFILEINFO shfi = { 0 }; - SHGetFileInfo(_T(""), FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON); + SHGetFileInfo(L"", FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES | SHGFI_ICON | SHGFI_SMALLICON); dat->hIconFolder = shfi.hIcon; } dat->hIcon = NULL; @@ -308,7 +308,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR GetSensiblyFormattedSize((dat->bytesRecvedHistory[0] - dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1]) / dat->bytesRecvedHistorySize, szSpeed, _countof(szSpeed), 0, 1, NULL); if (dat->bytesRecvedHistory[0] == dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1]) - mir_tstrcpy(szTime, _T("??:??:??")); + mir_tstrcpy(szTime, L"??:??:??"); else { li.QuadPart = BIGI(10000000)*(dat->transferStatus.currentFileSize - dat->transferStatus.currentFileProgress)*dat->bytesRecvedHistorySize / (dat->bytesRecvedHistory[0] - dat->bytesRecvedHistory[dat->bytesRecvedHistorySize - 1]); ft.dwHighDateTime = li.HighPart; ft.dwLowDateTime = li.LowPart; @@ -322,7 +322,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &st, NULL, szTime, _countof(szTime)); } - mir_sntprintf(szDisplay, _T("%s/%s (%s %s)"), szSpeed, TranslateT("sec"), szTime, TranslateT("remaining")); + mir_sntprintf(szDisplay, L"%s/%s (%s %s)", szSpeed, TranslateT("sec"), szTime, TranslateT("remaining")); SetDlgItemText(hwndDlg, IDC_ALLSPEED, szDisplay); } break; @@ -378,7 +378,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR TCHAR *p = _tcsrchr(path, '\\'); if (p) *p = 0; } - if (path) ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW); + if (path) ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW); } break; @@ -446,7 +446,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR *p = 0; } - if (path) ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW); + if (path) ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW); } else if (ret && CheckVirusScanned(hwndDlg, dat, ret)) ShellExecute(NULL, NULL, files[ret - 10], NULL, NULL, SW_SHOW); @@ -483,7 +483,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR size_t size = (pszExtension - szOriginalFilename) + 21 + mir_tstrlen(pszExtension); pfr->szFilename = (TCHAR*)mir_alloc(sizeof(TCHAR)*size); for (int i = 1;; i++) { - mir_sntprintf((TCHAR*)pfr->szFilename, size, _T("%.*s (%u)%s"), pszExtension - szOriginalFilename, szOriginalFilename, i, pszExtension); + mir_sntprintf((TCHAR*)pfr->szFilename, size, L"%.*s (%u)%s", pszExtension - szOriginalFilename, szOriginalFilename, i, pszExtension); if (_taccess(pfr->szFilename, 0) != 0) break; } @@ -596,14 +596,14 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR const unsigned long nextPos = fts->totalBytes ? (BIGI(100) * fts->totalProgress / fts->totalBytes) : 0; if (lastPos != nextPos || firstTime) { SendDlgItemMessage(hwndDlg, IDC_ALLFILESPROGRESS, PBM_SETPOS, nextPos, 0); - mir_sntprintf(str, _T("%u%%"), nextPos); + mir_sntprintf(str, L"%u%%", nextPos); SetDlgItemText(hwndDlg, IDC_ALLPRECENTS, str); } int units; GetSensiblyFormattedSize(fts->totalBytes, szSizeTotal, _countof(szSizeTotal), 0, 1, &units); GetSensiblyFormattedSize(fts->totalProgress, szSizeDone, _countof(szSizeDone), units, 0, NULL); - mir_sntprintf(str, _T("%s/%s"), szSizeDone, szSizeTotal); + mir_sntprintf(str, L"%s/%s", szSizeDone, szSizeTotal); str2[0] = 0; GetDlgItemText(hwndDlg, IDC_ALLTRANSFERRED, str2, _countof(str2)); if (mir_tstrcmp(str, str2)) diff --git a/src/core/stdhelp/src/about.cpp b/src/core/stdhelp/src/about.cpp index d7f21012bf..7ef45cf054 100644 --- a/src/core/stdhelp/src/about.cpp +++ b/src/core/stdhelp/src/about.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-#define STR_VERSION_FORMAT _T("Miranda NG\nv%S")
+#define STR_VERSION_FORMAT L"Miranda NG\nv%S"
INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -42,7 +42,7 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar verInfoSize = GetFileVersionInfoSize(filename, &unused);
pVerInfo = mir_alloc(verInfoSize);
GetFileVersionInfo(filename, 0, verInfoSize, pVerInfo);
- VerQueryValue(pVerInfo, _T("\\StringFileInfo\\000004b0\\LegalCopyright"), (LPVOID*)&productCopyright, &blockSize);
+ VerQueryValue(pVerInfo, L"\\StringFileInfo\\000004b0\\LegalCopyright", (LPVOID*)&productCopyright, &blockSize);
SetDlgItemText(hwndDlg, IDC_DEVS, productCopyright);
mir_free(pVerInfo);
}
@@ -56,7 +56,7 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar }
ShowWindow(GetDlgItem(hwndDlg, IDC_CREDITSFILE), SW_HIDE);
{
- HRSRC hResInfo = FindResource(hInst, MAKEINTRESOURCE(IDR_CREDITS), _T("TEXT"));
+ HRSRC hResInfo = FindResource(hInst, MAKEINTRESOURCE(IDR_CREDITS), L"TEXT");
DWORD ResSize = SizeofResource(hInst, hResInfo);
HGLOBAL hRes = LoadResource(hInst, hResInfo);
char* pszMsg = (char*)LockResource(hRes);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index ce327aad3a..26e30e224b 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -96,12 +96,12 @@ static void AddToFileList(TCHAR ***pppFiles, int *totalCount, const TCHAR* szFil if (GetFileAttributes(szFilename) & FILE_ATTRIBUTE_DIRECTORY) {
WIN32_FIND_DATA fd;
TCHAR szPath[MAX_PATH];
- mir_sntprintf(szPath, _T("%s\\*"), szFilename);
+ mir_sntprintf(szPath, L"%s\\*", szFilename);
HANDLE hFind = FindFirstFile(szPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T(".."))) continue;
- mir_sntprintf(szPath, _T("%s\\%s"), szFilename, fd.cFileName);
+ if (!mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L"..")) continue;
+ mir_sntprintf(szPath, L"%s\\%s", szFilename, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
}
while (FindNextFile(hFind, &fd));
@@ -122,7 +122,7 @@ static void UpdateReadChars(HWND hwndDlg, HWND hwndStatus) TCHAR buf[32];
int len = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE));
- mir_sntprintf(buf, _T("%d"), len);
+ mir_sntprintf(buf, L"%d", len);
SendMessage(hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
}
}
@@ -136,7 +136,7 @@ static void ShowTime(SrmmWindowData *dat) TCHAR buf[32];
unsigned i = (g_dat.flags & SMF_SHOWREADCHAR) ? 2 : 1;
- TimeZone_PrintDateTime(dat->hTimeZone, _T("t"), buf, _countof(buf), 0);
+ TimeZone_PrintDateTime(dat->hTimeZone, L"t", buf, _countof(buf), 0);
SendMessage(dat->hwndStatus, SB_SETTEXT, i, (LPARAM)buf);
dat->wMinute = st.wMinute;
}
@@ -413,7 +413,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar break;
case IDM_CLEAR:
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
break;
}
DestroyMenu(hMenu);
@@ -936,12 +936,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (dat->lastMessage) {
TCHAR date[64], time[64], fmt[128];
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, _countof(date), 0);
- TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, _countof(time), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"d", date, _countof(date), 0);
+ TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"t", time, _countof(time), 0);
mir_sntprintf(fmt, TranslateT("Last message received on %s at %s."), date, time);
SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)fmt);
}
- else SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)_T(""));
+ else SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)L"");
SendMessage(dat->hwndStatus, SB_SETICON, 0, (LPARAM)NULL);
break;
@@ -988,7 +988,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l pf2.wEffects = PFE_RTLPARA;
pf2.dwMask = PFM_RTLPARA;
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
pf2.wEffects = 0;
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
@@ -1012,9 +1012,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l TCHAR *szStatus = pcli->pfnGetStatusModeDescription(dat->szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(dat->hContact, dat->szProto, "Status", ID_STATUS_OFFLINE), 0);
if (statusIcon)
- mir_sntprintf(newtitle, _T("%s - %s"), contactName, TranslateT("Message session"));
+ mir_sntprintf(newtitle, L"%s - %s", contactName, TranslateT("Message session"));
else
- mir_sntprintf(newtitle, _T("%s (%s): %s"), contactName, szStatus, TranslateT("Message session"));
+ mir_sntprintf(newtitle, L"%s (%s): %s", contactName, szStatus, TranslateT("Message session"));
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)wParam;
if (!cws || (!mir_strcmp(cws->szModule, dat->szProto) && !mir_strcmp(cws->szSetting, "Status"))) {
@@ -1357,7 +1357,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
if (g_dat.flags & SMF_AUTOCLOSE)
DestroyWindow(hwndDlg);
@@ -1483,7 +1483,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SendMessage(((NMHDR *)lParam)->hwndFrom, EM_EXSETSEL, 0, (LPARAM)& all);
break;
case IDM_CLEAR:
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
dat->hDbEventFirst = NULL;
break;
}
@@ -1526,7 +1526,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTRANGE, 0, (LPARAM)& tr);
if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) {
memmove(tr.lpstrText + 7, tr.lpstrText, (tr.chrg.cpMax - tr.chrg.cpMin + 1) * sizeof(TCHAR));
- memcpy(tr.lpstrText, _T("mailto:"), 7 * sizeof(TCHAR));
+ memcpy(tr.lpstrText, L"mailto:", 7 * sizeof(TCHAR));
}
if (((ENLINK *)lParam)->msg == WM_RBUTTONDOWN) {
@@ -1540,7 +1540,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL)) {
case IDM_OPENLINK:
- ShellExecute(NULL, _T("open"), tr.lpstrText, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"open", tr.lpstrText, NULL, NULL, SW_SHOW);
break;
case IDM_COPYLINK:
@@ -1560,7 +1560,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l return TRUE;
}
- ShellExecute(NULL, _T("open"), tr.lpstrText, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"open", tr.lpstrText, NULL, NULL, SW_SHOW);
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
break;
}
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 38e583c2ca..c40c4eb27f 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -50,7 +50,7 @@ struct LogStreamData static int logPixelSY;
static char szSep2[40], szSep2_RTL[50];
-static const TCHAR *bbcodes[] = { _T("[b]"), _T("[i]"), _T("[u]"), _T("[s]"), _T("[/b]"), _T("[/i]"), _T("[/u]"), _T("[/s]") };
+static const TCHAR *bbcodes[] = { L"[b]", L"[i]", L"[u]", L"[s]", L"[/b]", L"[/i]", L"[/u]", L"[/s]" };
static const char *bbcodefmt[] = { "\\b ", "\\i ", "\\ul ", "\\strike ", "\\b0 ", "\\i0 ", "\\ul0 ", "\\strike0 " };
static void AppendPlainUnicode(CMStringA &buf, const TCHAR *str)
@@ -99,12 +99,12 @@ static void AppendToBufferWithRTF(CMStringA &buf, const TCHAR *line) }
}
if (!found) {
- if (!_tcsnicmp(line, _T("[url"), 4)) {
+ if (!_tcsnicmp(line, L"[url", 4)) {
const TCHAR* tag = _tcschr(line + 4, ']');
if (tag) {
const TCHAR *tagu = (line[4] == '=') ? line + 5 : tag + 1;
- const TCHAR *tage = _tcsstr(tag, _T("[/url]"));
- if (!tage) tage = _tcsstr(tag, _T("[/URL]"));
+ const TCHAR *tage = _tcsstr(tag, L"[/url]");
+ if (!tage) tage = _tcsstr(tag, L"[/URL]");
if (tage) {
*(TCHAR*)tag = 0;
*(TCHAR*)tage = 0;
@@ -118,14 +118,14 @@ static void AppendToBufferWithRTF(CMStringA &buf, const TCHAR *line) }
}
}
- else if (!_tcsnicmp(line, _T("[color="), 7)) {
+ else if (!_tcsnicmp(line, L"[color=", 7)) {
const TCHAR* tag = _tcschr(line + 7, ']');
if (tag) {
line = tag;
found = 1;
}
}
- else if (!_tcsnicmp(line, _T("[/color]"), 8)) {
+ else if (!_tcsnicmp(line, L"[/color]", 8)) {
line += 7;
found = 1;
}
@@ -258,9 +258,9 @@ static char* CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT TCHAR str[64];
if (g_dat.flags & SMF_SHOWSECS)
- szFormat = g_dat.flags & SMF_SHOWDATE ? _T("d s") : _T("s");
+ szFormat = g_dat.flags & SMF_SHOWDATE ? L"d s" : L"s";
else
- szFormat = g_dat.flags & SMF_SHOWDATE ? _T("d t") : _T("t");
+ szFormat = g_dat.flags & SMF_SHOWDATE ? L"d t" : L"t";
TimeZone_PrintTimeStamp(NULL, dbei.timestamp, szFormat, str, _countof(str), 0);
@@ -297,13 +297,13 @@ static char* CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT szName = NEWTSTR_ALLOCA(p);
mir_free(p);
}
- else szName = _T("");
+ else szName = L"";
}
else szName = pcli->pfnGetContactDisplayName(hContact, 0);
buffer.AppendFormat(" %s ", SetToStyle(MSGFONTID_NOTICE));
AppendToBufferWithRTF(buffer, szName);
- AppendToBufferWithRTF(buffer, _T(" "));
+ AppendToBufferWithRTF(buffer, L" ");
msg = DbGetEventTextT(&dbei, CP_ACP);
if (msg) {
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 5797b2a9c7..b14d0ec51b 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -34,16 +34,16 @@ struct FontOptionsList }
static const fontOptionsList[] =
{
- { LPGENT("Outgoing messages"), RGB(106, 106, 106), _T("Arial"), 0, -12},
- { LPGENT("Incoming messages"), RGB(0, 0, 0), _T("Arial"), 0, -12},
- { LPGENT("Outgoing name"), RGB(89, 89, 89), _T("Arial"), DBFONTF_BOLD, -12},
- { LPGENT("Outgoing time"), RGB(0, 0, 0), _T("Terminal"), DBFONTF_BOLD, -9},
- { LPGENT("Outgoing colon"), RGB(89, 89, 89), _T("Arial"), 0, -11},
- { LPGENT("Incoming name"), RGB(215, 0, 0), _T("Arial"), DBFONTF_BOLD, -12},
- { LPGENT("Incoming time"), RGB(0, 0, 0), _T("Terminal"), DBFONTF_BOLD, -9},
- { LPGENT("Incoming colon"), RGB(215, 0, 0), _T("Arial"), 0, -11},
- { LPGENT("Message area"), RGB(0, 0, 0), _T("Arial"), 0, -12},
- { LPGENT("Other events"), RGB(90, 90, 160), _T("Arial"), 0, -12},
+ { LPGENT("Outgoing messages"), RGB(106, 106, 106), L"Arial", 0, -12},
+ { LPGENT("Incoming messages"), RGB(0, 0, 0), L"Arial", 0, -12},
+ { LPGENT("Outgoing name"), RGB(89, 89, 89), L"Arial", DBFONTF_BOLD, -12},
+ { LPGENT("Outgoing time"), RGB(0, 0, 0), L"Terminal", DBFONTF_BOLD, -9},
+ { LPGENT("Outgoing colon"), RGB(89, 89, 89), L"Arial", 0, -11},
+ { LPGENT("Incoming name"), RGB(215, 0, 0), L"Arial", DBFONTF_BOLD, -12},
+ { LPGENT("Incoming time"), RGB(0, 0, 0), L"Terminal", DBFONTF_BOLD, -9},
+ { LPGENT("Incoming colon"), RGB(215, 0, 0), L"Arial", 0, -11},
+ { LPGENT("Message area"), RGB(0, 0, 0), L"Arial", 0, -12},
+ { LPGENT("Other events"), RGB(90, 90, 160), L"Arial", 0, -12},
};
static BYTE MsgDlgGetFontDefaultCharset(const TCHAR*)
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index aeeaceb504..7c9952c0ee 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -379,7 +379,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) return 1;
SendMessage(dat->hwndStatus, SB_SETICON, 0, (LPARAM)(st == NULL ? 0 : st->hIcon));
- SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)(st == NULL ? _T("") : st->tszText));
+ SendMessage(dat->hwndStatus, SB_SETTEXT, 0, (LPARAM)(st == NULL ? L"" : st->tszText));
return 0;
}
@@ -406,7 +406,7 @@ static TCHAR tszError[] = LPGENT("Miranda could not load the built-in message mo int LoadSendRecvMessageModule(void)
{
- if ((hMsftEdit = LoadLibrary(_T("Msftedit.dll"))) == NULL) {
+ if ((hMsftEdit = LoadLibrary(L"Msftedit.dll")) == NULL) {
if (IDYES != MessageBox(0, TranslateTS(tszError), TranslateT("Information"), MB_YESNO | MB_ICONINFORMATION))
return 1;
return 0;
diff --git a/src/core/stdssl/src/netlibssl.cpp b/src/core/stdssl/src/netlibssl.cpp index eee3541d06..d59c92c0ec 100644 --- a/src/core/stdssl/src/netlibssl.cpp +++ b/src/core/stdssl/src/netlibssl.cpp @@ -80,7 +80,7 @@ static void ReportSslError(SECURITY_STATUS scRet, int line, bool = false) }
TCHAR szMsgBuf2[512];
- mir_sntprintf(szMsgBuf2, _T("SSL connection failure (%x %u): %s"), scRet, line, szMsgBuf);
+ mir_sntprintf(szMsgBuf2, L"SSL connection failure (%x %u): %s", scRet, line, szMsgBuf);
char* szMsg = Utf8EncodeT(szMsgBuf2);
Netlib_Logf(NULL, szMsg);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index f1e6b26602..6b4815309f 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -55,7 +55,7 @@ static void GetUrlDescription(DBEVENTINFO *dbei, TCHAR* buf, int cbBuf) buf[ len ] = 0;
if (len < cbBuf-3)
- mir_tstrcat(buf, _T("\r\n"));
+ mir_tstrcat(buf, L"\r\n");
}
static void GetFileDescription(DBEVENTINFO *dbei, TCHAR* buf, int cbBuf)
@@ -68,7 +68,7 @@ static void GetFileDescription(DBEVENTINFO *dbei, TCHAR* buf, int cbBuf) buf[ len ] = 0;
if (len < cbBuf-3)
- mir_tstrcat(buf, _T("\r\n"));
+ mir_tstrcat(buf, L"\r\n");
}
static void GetObjectDescription(DBEVENTINFO *dbei, TCHAR* str, int cbStr)
@@ -164,8 +164,8 @@ static void FillHistoryThread(void* param) TCHAR str[200], eventText[256], strdatetime[64];
GetObjectSummary(&dbei, str, _countof(str));
if (str[0]) {
- TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, _countof(strdatetime), 0);
- mir_sntprintf(eventText, _T("%s: %s"), strdatetime, str);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, L"d t", strdatetime, _countof(strdatetime), 0);
+ mir_sntprintf(eventText, L"%s: %s", strdatetime, str);
i = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)eventText);
SendMessage(hwndList, LB_SETITEMDATA, i, (LPARAM)hDbEvent);
}
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index 53d2fcfd67..1fc523b3ea 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -284,7 +284,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
lvi.pszText = idstr2;
- mir_sntprintf(idstr2, _T("%d"), i + 2);
+ mir_sntprintf(idstr2, L"%d", i + 2);
}
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_EMAILS), lvi.iItem, 1, dbv.ptszVal);
@@ -331,7 +331,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.pszText = TranslateT("Mobile");
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, _T("y"));
+ ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, L"y");
dbv.ptszVal[mir_tstrlen(dbv.ptszVal) - 4] = '\0';
}
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal);
@@ -361,8 +361,8 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.pszText = idstr2;
mir_sntprintf(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, _T(" SMS"))) {
- ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y"));
+ if (mir_tstrlen(dbv.ptszVal) > 4 && !mir_tstrcmp(dbv.ptszVal + mir_tstrlen(dbv.ptszVal) - 4, L" SMS")) {
+ ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, L"y");
dbv.ptszVal[mir_tstrlen(dbv.ptszVal) - 4] = '\0';
}
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal);
@@ -439,8 +439,8 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR szEmail[256];
if (IsOverEmail(hwndDlg, szEmail, _countof(szEmail))) {
TCHAR szExec[264];
- mir_sntprintf(szExec, _T("mailto:%s"), szEmail);
- ShellExecute(hwndDlg, _T("open"), szExec, NULL, NULL, SW_SHOW);
+ mir_sntprintf(szExec, L"mailto:%s", szEmail);
+ ShellExecute(hwndDlg, L"open", szExec, NULL, NULL, SW_SHOW);
break;
}
if (nm->iSubItem < 2)
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 558469bae1..4b93ab8cd1 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -255,8 +255,8 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EMAIL))) {
TCHAR szExec[264], szEmail[256];
GetDlgItemText(hwndDlg, IDC_EMAIL, szEmail, _countof(szEmail));
- mir_sntprintf(szExec, _T("mailto:%s"), szEmail);
- ShellExecute(hwndDlg, _T("open"), szExec, NULL, NULL, SW_SHOW);
+ mir_sntprintf(szExec, L"mailto:%s", szEmail);
+ ShellExecute(hwndDlg, L"open", szExec, NULL, NULL, SW_SHOW);
}
break;
}
@@ -283,7 +283,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
TCHAR szTime[80];
- if (printDateTimeByContact(hContact, _T("s"), szTime, _countof(szTime), TZF_KNOWNONLY)) {
+ if (printDateTimeByContact(hContact, L"s", szTime, _countof(szTime), TZF_KNOWNONLY)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_LOCALTIME), FALSE);
SetDlgItemText(hwndDlg, IDC_LOCALTIME, TranslateT("<not specified>"));
}
@@ -543,7 +543,7 @@ 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, _T("Courier New"));
+ mir_tstrcpy(lf.lfFaceName, L"Courier New");
lf.lfCharSet = DEFAULT_CHARSET;
HFONT hFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 97948126df..9e3d50ddda 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -318,7 +318,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP TCITEM tci;
tci.mask = TCIF_TEXT | TCIF_IMAGE;
tci.iImage = -1;
- tci.pszText = _T("X");
+ tci.pszText = L"X";
TabCtrl_InsertItem(hwndTab, 0, &tci);
GetWindowRect(hwndTab, &dat->rcDisplayTab);
@@ -355,7 +355,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_TIMER:
TCHAR str[128];
- mir_sntprintf(str, _T("%.*s%s%.*s"), dat->updateAnimFrame % 10, _T("........."), dat->szUpdating, dat->updateAnimFrame % 10, _T("........."));
+ mir_sntprintf(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;
|