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 /plugins/NewXstatusNotify/src | |
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 'plugins/NewXstatusNotify/src')
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 8 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 44 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/options.cpp | 12 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/popup.cpp | 4 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 8 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/xstatus.cpp | 18 |
6 files changed, 47 insertions, 47 deletions
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 01a12dcdde..d43a0677fb 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -71,16 +71,16 @@ TCHAR *SelectSound(HWND hwndDlg, TCHAR *buff, size_t bufflen) ofn.hwndOwner = GetParent(hwndDlg);
ofn.hInstance = hInst;
TCHAR filter[MAX_PATH];
- if (GetModuleHandle(_T("bass_interface.dll")))
- mir_sntprintf(filter, _T("%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%s (*.*)%c*%c"), TranslateT("Sound files"), 0, 0, TranslateT("All files"), 0, 0);
+ if (GetModuleHandle(L"bass_interface.dll"))
+ mir_sntprintf(filter, L"%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%s (*.*)%c*%c", TranslateT("Sound files"), 0, 0, TranslateT("All files"), 0, 0);
else
- mir_sntprintf(filter, _T("%s (*.wav)%c*.wav%c%s (*.*)%c*%c"), TranslateT("Wave files"), 0, 0, TranslateT("All files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*.wav)%c*.wav%c%s (*.*)%c*%c", TranslateT("Wave files"), 0, 0, TranslateT("All files"), 0, 0);
ofn.lpstrFilter = filter;
ofn.lpstrFile = buff;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER | OFN_NOCHANGEDIR;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn))
return buff;
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 22edad41c0..fbf5aac0a4 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -249,7 +249,7 @@ TCHAR* GetStr(STATUSMSGINFO *n, const TCHAR *tmplt) if (res.GetLength() > 2044) {
res.Truncate(2044);
- res.Append(_T("..."));
+ res.Append(L"...");
}
return mir_tstrndup(res, res.GetLength());
@@ -305,7 +305,7 @@ void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, TCHAR *stz if (opt.ShowPreviousStatus) {
TCHAR buff[MAX_STATUSTEXT];
mir_sntprintf(buff, TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(oldStatus)].lpzStandardText);
- mir_tstrcat(mir_tstrcat(stzStatusText, _T(" ")), buff);
+ mir_tstrcat(mir_tstrcat(stzStatusText, L" "), buff);
}
}
@@ -455,8 +455,8 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus) if (opt.LogToFile) {
TCHAR stzDate[MAX_STATUSTEXT], stzTime[MAX_STATUSTEXT], stzText[MAX_TEXT_LEN];
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), stzTime, _countof(stzTime));
- GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("dd/MM/yyyy"), stzDate, _countof(stzDate));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", stzTime, _countof(stzTime));
+ GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, L"dd/MM/yyyy", stzDate, _countof(stzDate));
mir_sntprintf(stzText, TranslateT("%s, %s. %s changed status to %s (was %s)\r\n"),
stzDate, stzTime, pcli->pfnGetContactDisplayName(hContact, 0), StatusList[Index(newStatus)].lpzStandardText,
StatusList[Index(oldStatus)].lpzStandardText);
@@ -629,11 +629,11 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) //don't show popup when mradio connecting and disconnecting
if (_stricmp(szProto, "mRadio") == 0 && !cws->value.type == DBVT_DELETED) {
TCHAR buf[MAX_PATH];
- mir_sntprintf(buf, _T(" (%s)"), TranslateT("connecting"));
+ mir_sntprintf(buf, L" (%s)", TranslateT("connecting"));
T2Utf pszUtf(buf);
- mir_sntprintf(buf, _T(" (%s)"), TranslateT("aborting"));
+ mir_sntprintf(buf, L" (%s)", TranslateT("aborting"));
T2Utf pszUtf2(buf);
- mir_sntprintf(buf, _T(" (%s)"), TranslateT("playing"));
+ mir_sntprintf(buf, L" (%s)", TranslateT("playing"));
T2Utf pszUtf3(buf);
if (_stricmp(cws->value.pszVal, pszUtf) == 0 || _stricmp(cws->value.pszVal, pszUtf2) == 0 || _stricmp(cws->value.pszVal, pszUtf3) == 0)
goto skip_notify;
@@ -686,7 +686,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) copyText = mir_tstrdup(smi.newstatusmsg);
_tcsncpy(buff, smi.newstatusmsg, opt.PSMsgLen);
buff[opt.PSMsgLen] = 0;
- mir_tstrcat(buff, _T("..."));
+ mir_tstrcat(buff, L"...");
replaceStrT(smi.newstatusmsg, buff);
}
@@ -749,8 +749,8 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) if (opt.SMsgLogToFile && db_get_b(hContact, MODULE, "EnableSMsgLogging", 1)) {
TCHAR stzDate[MAX_STATUSTEXT], stzTime[MAX_STATUSTEXT], stzText[MAX_TEXT_LEN];
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), stzTime, _countof(stzTime));
- GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("dd/MM/yyyy"), stzDate, _countof(stzDate));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", stzTime, _countof(stzTime));
+ GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, L"dd/MM/yyyy", stzDate, _countof(stzDate));
TCHAR *str;
if (smi.compare == COMPARE_DEL)
@@ -758,7 +758,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) else
str = GetStr(&smi, templates.LogSMsgChanged);
- mir_sntprintf(stzText, _T("%s, %s. %s %s\r\n"), stzDate, stzTime, pcli->pfnGetContactDisplayName(hContact, 0), str);
+ mir_sntprintf(stzText, L"%s, %s. %s %s\r\n", stzDate, stzTime, pcli->pfnGetContactDisplayName(hContact, 0), str);
LogToFile(stzText);
mir_free(str);
@@ -856,7 +856,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Online"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOnline", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Online"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("global.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"global.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40072bg", COLOR_BG_AVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40072tx", COLOR_TX_DEFAULT);
@@ -868,7 +868,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Offline"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOffline", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Offline"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("offline.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"offline.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40071bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40071tx", COLOR_TX_DEFAULT);
@@ -880,7 +880,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Invisible"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserInvisible", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Invisible"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("invisible.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"invisible.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40078bg", COLOR_BG_AVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40078tx", COLOR_TX_DEFAULT);
@@ -892,7 +892,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Free for chat"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserFreeForChat", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Free for chat"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("free4chat.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"free4chat.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40077bg", COLOR_BG_AVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40077tx", COLOR_TX_DEFAULT);
@@ -904,7 +904,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Away"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserAway", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Away"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("away.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"away.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40073bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40073tx", COLOR_TX_DEFAULT);
@@ -916,7 +916,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Not available"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserNA", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Not available"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("na.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"na.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40075bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40075tx", COLOR_TX_DEFAULT);
@@ -928,7 +928,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Occupied"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOccupied", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Occupied"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("occupied.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"occupied.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40076bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40076tx", COLOR_TX_DEFAULT);
@@ -940,7 +940,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Do not disturb"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserDND", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Do not disturb"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("dnd.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"dnd.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40074bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40074tx", COLOR_TX_DEFAULT);
@@ -952,7 +952,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("Out to lunch"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOutToLunch", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: Out to lunch"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("lunch.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"lunch.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40080bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40080tx", COLOR_TX_DEFAULT);
@@ -964,7 +964,7 @@ void InitStatusList() mir_tstrncpy(StatusList[index].lpzStandardText, TranslateT("On the phone"), MAX_STANDARDTEXT);
mir_strncpy(StatusList[index].lpzSkinSoundName, "UserOnThePhone", MAX_SKINSOUNDNAME);
mir_tstrncpy(StatusList[index].lpzSkinSoundDesc, LPGENT("User: On the phone"), MAX_SKINSOUNDDESC);
- mir_tstrncpy(StatusList[index].lpzSkinSoundFile, _T("phone.wav"), MAX_PATH);
+ mir_tstrncpy(StatusList[index].lpzSkinSoundFile, L"phone.wav", MAX_PATH);
StatusList[index].colorBack = db_get_dw(NULL, MODULE, "40079bg", COLOR_BG_NAVAILDEFAULT);
StatusList[index].colorText = db_get_dw(NULL, MODULE, "40079tx", COLOR_TX_DEFAULT);
@@ -1125,7 +1125,7 @@ int ModulesLoaded(WPARAM, LPARAM) HookEvent(ME_MSG_WINDOWEVENT, OnWindowEvent);
HookEvent(ME_TTB_MODULELOADED, InitTopToolbar);
- SecretWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T("ConnectionTimerWindow"), 0,
+ SecretWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", L"ConnectionTimerWindow", 0,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP,
NULL, hInst, NULL);
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index d97a4993bb..f981556d39 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -78,7 +78,7 @@ void LoadOptions() opt.BlinkIcon = db_get_b(0, MODULE, "BlinkIcon", 0);
opt.BlinkIcon_Status = db_get_b(0, MODULE, "BlinkIcon_Status", 0);
opt.BlinkIcon_ForMsgs = db_get_b(0, MODULE, "BlinkIcon_ForMsgs", 0);
- DBGetStringDefault(0, MODULE, "LogFilePath", opt.LogFilePath, MAX_PATH, _T(""));
+ DBGetStringDefault(0, MODULE, "LogFilePath", opt.LogFilePath, MAX_PATH, L"");
// IDD_AUTODISABLE
opt.OnlyGlobalChanges = db_get_b(0, MODULE, "OnlyGlobalChanges", 0);
opt.DisablePopupGlobally = db_get_b(0, MODULE, "DisablePopupGlobally", 0);
@@ -256,12 +256,12 @@ INT_PTR CALLBACK DlgProcGeneralOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ofn.nMaxFile = MAX_PATH;
ofn.hwndOwner = hwndDlg;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*.*)%c*.*%c%s (*.log)%c*.log%c%s (*.txt)%c*.txt%c"), TranslateT("All Files"), 0, 0, TranslateT("Log"), 0, 0, TranslateT("Text"), 0, 0);
+ mir_sntprintf(filter, L"%s (*.*)%c*.*%c%s (*.log)%c*.log%c%s (*.txt)%c*.txt%c", TranslateT("All Files"), 0, 0, TranslateT("Log"), 0, 0, TranslateT("Text"), 0, 0);
ofn.lpstrFilter = filter;
ofn.nFilterIndex = 2;
ofn.lpstrInitialDir = buff;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
- ofn.lpstrDefExt = _T("log");
+ ofn.lpstrDefExt = L"log";
if (GetSaveFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_LOGFILE, buff);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -381,7 +381,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
TCHAR str[MAX_SECONDLINE] = { 0 };
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++) {
- _tcsncpy(str, _T(""), _countof(str));
+ _tcsncpy(str, L"", _countof(str));
if (opt.ShowStatus) {
if (opt.UseAlternativeText == 1)
@@ -392,14 +392,14 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (opt.ShowPreviousStatus) {
TCHAR buff[MAX_STATUSTEXT];
mir_sntprintf(buff, TranslateTS(STRING_SHOWPREVIOUSSTATUS), StatusList[Index(i)].lpzStandardText);
- mir_tstrcat(str, _T(" "));
+ mir_tstrcat(str, L" ");
mir_tstrcat(str, buff);
}
}
if (opt.ReadAwayMsg) {
if (str[0])
- mir_tstrcat(str, _T("\n"));
+ mir_tstrcat(str, L"\n");
mir_tstrcat(str, TranslateT("This is status message"));
}
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index f305ee1bd8..c4aad62f4f 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -32,7 +32,7 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const TCHAR if (opt.ShowGroup) {
ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup)
- buf.AppendFormat(_T(" (%s)"), tszGroup);
+ buf.AppendFormat(L" (%s)", tszGroup);
}
_tcsncpy_s(ppd.lptzContactName, buf, _TRUNCATE);
@@ -85,7 +85,7 @@ static int AwayMsgHook(WPARAM, LPARAM lParam, LPARAM pObj) TCHAR stzText[1024];
if (pstzLast)
- mir_sntprintf(stzText, _T("%s\n%s"), pstzLast, tszStatus);
+ mir_sntprintf(stzText, L"%s\n%s", pstzLast, tszStatus);
else
_tcsncpy(stzText, tszStatus, _countof(stzText));
SendMessage(pdp->hWnd, WM_SETREDRAW, FALSE, 0);
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index d850fb8d08..3a72826c56 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -56,7 +56,7 @@ int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSe void ShowLog(TCHAR *file)
{
- INT_PTR res = (INT_PTR)ShellExecute(NULL, _T("open"), file, NULL, NULL, SW_SHOW);
+ INT_PTR res = (INT_PTR)ShellExecute(NULL, L"open", file, NULL, NULL, SW_SHOW);
if (res <= 32) // error
MessageBox(0, TranslateT("Can't open the log file!"), TranslateT("NewXstatusNotify"), MB_OK | MB_ICONERROR);
}
@@ -85,7 +85,7 @@ BOOL StatusHasAwayMessage(char *szProto, int status) void LogToFile(TCHAR *stzText)
{
- FILE *fp = _tfopen(opt.LogFilePath, _T("a+b, ccs=UTF-8"));
+ FILE *fp = _tfopen(opt.LogFilePath, L"a+b, ccs=UTF-8");
if (fp) {
fprintf(fp, T2Utf(stzText));
fclose(fp);
@@ -98,7 +98,7 @@ void AddCR(CMString &str, const TCHAR *stzText) return;
CMString res(stzText);
- res.Replace(_T("\n"), _T("\r\n"));
- res.Replace(_T("\r\r\n"), _T("\r\n"));
+ res.Replace(L"\n", L"\r\n");
+ res.Replace(L"\r\r\n", L"\r\n");
str.Append(res);
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 55696fc3c4..13c6e07f8d 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -154,7 +154,7 @@ CMString ReplaceVars(XSTATUSCHANGE *xsc, const TCHAR *tmplt) if (res.GetLength() > 2044) {
res.Truncate(2044);
- res.Append(_T("..."));
+ res.Append(L"...");
}
return res;
@@ -194,11 +194,11 @@ void ShowXStatusPopup(XSTATUSCHANGE *xsc) copyText = mir_tstrdup(xsc->stzText);
_tcsncpy(buff, xsc->stzText, opt.PXMsgLen);
buff[opt.PXMsgLen] = 0;
- mir_tstrcat(buff, _T("..."));
+ mir_tstrcat(buff, L"...");
replaceStrT(xsc->stzText, buff);
}
- TCHAR *Template = _T("");
+ TCHAR *Template = L"";
switch (xsc->action) {
case NOTIFY_NEW_XSTATUS:
Template = templates.PopupXstatusChanged; break;
@@ -273,7 +273,7 @@ void LogChangeToDB(XSTATUSCHANGE *xsc) if (xsc == NULL || (opt.XLogToDB_WinOpen && !CheckMsgWnd(xsc->hContact)))
return;
- TCHAR *Template = _T("");
+ TCHAR *Template = L"";
switch (xsc->action) {
case NOTIFY_NEW_XSTATUS:
Template = templates.LogXstatusChanged; break;
@@ -289,7 +289,7 @@ void LogChangeToDB(XSTATUSCHANGE *xsc) TCHAR stzLastLog[2 * MAX_TEXT_LEN];
CMString stzLogText(ReplaceVars(xsc, Template));
- DBGetStringDefault(xsc->hContact, MODULE, DB_LASTLOG, stzLastLog, _countof(stzLastLog), _T(""));
+ DBGetStringDefault(xsc->hContact, MODULE, DB_LASTLOG, stzLastLog, _countof(stzLastLog), L"");
if (opt.XLogToDB) {
db_set_ws(xsc->hContact, MODULE, DB_LASTLOG, stzLogText);
@@ -322,10 +322,10 @@ void LogChangeToFile(XSTATUSCHANGE *xsc) TCHAR stzDate[32], stzTime[32], stzText[MAX_TEXT_LEN];
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), stzTime, _countof(stzTime));
- GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("dd/MM/yyyy"), stzDate, _countof(stzDate));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", stzTime, _countof(stzTime));
+ GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, L"dd/MM/yyyy", stzDate, _countof(stzDate));
- TCHAR *Template = _T("");
+ TCHAR *Template = L"";
switch (xsc->action) {
case NOTIFY_NEW_XSTATUS:
Template = templates.LogXstatusChanged; break;
@@ -337,7 +337,7 @@ void LogChangeToFile(XSTATUSCHANGE *xsc) Template = templates.LogXMsgRemoved; break;
}
- mir_sntprintf(stzText, _T("%s, %s. %s %s\r\n"), stzDate, stzTime,
+ mir_sntprintf(stzText, L"%s, %s. %s %s\r\n", stzDate, stzTime,
pcli->pfnGetContactDisplayName(xsc->hContact, 0), ReplaceVars(xsc, Template).GetString());
LogToFile(stzText);
|