summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /src/core/stdmsg
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (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/stdmsg')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp34
-rw-r--r--src/core/stdmsg/src/msglog.cpp20
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp20
-rw-r--r--src/core/stdmsg/src/msgs.cpp4
4 files changed, 39 insertions, 39 deletions
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;