diff options
1022 files changed, 14139 insertions, 14139 deletions
diff --git a/include/m_button.h b/include/m_button.h index 0ba3afd602..ba75f72aee 100644 --- a/include/m_button.h +++ b/include/m_button.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_BUTTON_H__
#define M_BUTTON_H__ 1
-#define MIRANDABUTTONCLASS _T("MButtonClass") // Class of the control
+#define MIRANDABUTTONCLASS L"MButtonClass" // Class of the control
// Sets whether a dropdown arrow is used
// wParam = TRUE/FALSE turns arrow on or off
diff --git a/include/m_descbutton.h b/include/m_descbutton.h index dc28bc1bc2..3f11bcd866 100644 --- a/include/m_descbutton.h +++ b/include/m_descbutton.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_DESCBUTTON_H__
#define M_DESCBUTTON_H__ 1
-#define MIRANDADESCBUTTONCLASS _T("MirandaDescButtonClass")
+#define MIRANDADESCBUTTONCLASS L"MirandaDescButtonClass"
#define MDBCF_SHAREDICON 0x01
#define MDBCF_UNICODE 0x02
diff --git a/include/m_gui.h b/include/m_gui.h index 0d9b709332..c0e22e0026 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -661,7 +661,7 @@ protected: __inline BYTE GetDataType() { return m_dbLink ? m_dbLink->GetDataType() : DBVT_DELETED; }
__inline DWORD LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; }
__inline void SaveInt(DWORD value) { if (m_dbLink) m_dbLink->SaveInt(value); }
- __inline const TCHAR *LoadText() { return m_dbLink ? m_dbLink->LoadText() : _T(""); }
+ __inline const TCHAR *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; }
__inline void SaveText(TCHAR *value) { if (m_dbLink) m_dbLink->SaveText(value); }
};
diff --git a/include/m_iconheader.h b/include/m_iconheader.h index 3db6c24dce..715ce3408b 100644 --- a/include/m_iconheader.h +++ b/include/m_iconheader.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_ICONHEADER_H__
#define M_ICONHEADER_H__ 1
-#define MIRANDAICOTABCLASS _T("MirandaIcoTabClass")
+#define MIRANDAICOTABCLASS L"MirandaIcoTabClass"
#define MITCF_SHAREDICON 0x01
#define MITCF_UNICODE 0x02
diff --git a/include/m_utils.h b/include/m_utils.h index cbe392f025..c7eef10006 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -169,7 +169,7 @@ EXTERN_C MIR_CORE_DLL(int) WindowList_BroadcastAsync(MWindowList hList, UINT mes /***************************** Hyperlink windows ********************************/
//there aren't any services here, because you don't need them.
-#define WNDCLASS_HYPERLINK _T("Hyperlink")
+#define WNDCLASS_HYPERLINK L"Hyperlink"
//the control will obey the SS_LEFT (0), SS_CENTER (1), and SS_RIGHT (2) styles
//the control will send STN_CLICKED via WM_COMMAND when the link itself is clicked
diff --git a/libs/zlib/src/ioapi.c b/libs/zlib/src/ioapi.c index e6ddc5cd2d..de9151aae5 100644 --- a/libs/zlib/src/ioapi.c +++ b/libs/zlib/src/ioapi.c @@ -94,13 +94,13 @@ static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const TCHAR* filename, in FILE* file = NULL; const TCHAR* mode_fopen = NULL; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ) - mode_fopen = _T("rb"); + mode_fopen = L"rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - mode_fopen = _T("r+b"); + mode_fopen = L"r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mode_fopen = _T("wb"); + mode_fopen = L"wb"; if ((filename != NULL) && (mode_fopen != NULL)) file = _tfopen(filename, mode_fopen); @@ -112,13 +112,13 @@ static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void* filename, i FILE* file = NULL; const TCHAR* mode_fopen = NULL; if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ) - mode_fopen = _T("rb"); + mode_fopen = L"rb"; else if (mode & ZLIB_FILEFUNC_MODE_EXISTING) - mode_fopen = _T("r+b"); + mode_fopen = L"r+b"; else if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mode_fopen = _T("wb"); + mode_fopen = L"wb"; if ((filename != NULL) && (mode_fopen != NULL)) file = _tfopen((const TCHAR*)filename, mode_fopen); diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index 57f78e88a3..5c0d9fcef4 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -150,7 +150,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace) // Default value
if (cacn.hash[0] == '\0')
- mir_sntprintf(cacn.hash, _T("AVS-HASH-%x"), GetFileHash(cacn.filename));
+ mir_sntprintf(cacn.hash, L"AVS-HASH-%x", GetFileHash(cacn.filename));
NotifyEventHooks(hEventContactAvatarChanged, hContact, (LPARAM)&cacn);
}
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 64475acfba..8a9bc4170a 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -323,14 +323,14 @@ void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bm static int ModulesLoaded(WPARAM, LPARAM)
{
TCHAR szEventName[100];
- mir_sntprintf(szEventName, _T("avs_loaderthread_%d"), GetCurrentThreadId());
+ mir_sntprintf(szEventName, L"avs_loaderthread_%d", GetCurrentThreadId());
hLoaderEvent = CreateEvent(NULL, TRUE, FALSE, szEventName);
SetThreadPriority(mir_forkthread(PicLoader, 0), THREAD_PRIORITY_IDLE);
// Folders plugin support
- hMyAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("My Avatars"), MIRANDA_USERDATAT _T("\\Avatars"));
- hGlobalAvatarFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("My Global Avatar Cache"), MIRANDA_USERDATAT _T("\\Avatars"));
+ hMyAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("My Avatars"), MIRANDA_USERDATAT L"\\Avatars");
+ hGlobalAvatarFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("My Global Avatar Cache"), MIRANDA_USERDATAT L"\\Avatars");
g_AvatarHistoryAvail = ServiceExists(MS_AVATARHISTORY_ENABLED);
@@ -381,7 +381,7 @@ static int LoadAvatarModule() InitServices();
InitPolls();
- _tcsncpy_s(g_szDataPath, _countof(g_szDataPath), VARST(_T("%miranda_userdata%\\")), _TRUNCATE);
+ _tcsncpy_s(g_szDataPath, _countof(g_szDataPath), VARST(L"%miranda_userdata%\\"), _TRUNCATE);
_tcslwr(g_szDataPath);
return 0;
}
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index eb9778aa5e..2a438acebe 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -110,9 +110,9 @@ static void SetProtoPic(char *szProto) ofn.nMaxFile = MAX_PATH; ofn.nMaxFileTitle = MAX_PATH; ofn.Flags = OFN_HIDEREADONLY; - ofn.lpstrInitialDir = _T("."); + ofn.lpstrInitialDir = L"."; *FileName = '\0'; - ofn.lpstrDefExt = _T(""); + ofn.lpstrDefExt = L""; if (!GetOpenFileName(&ofn)) return; @@ -388,7 +388,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar if (!db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) { if (!PathIsAbsoluteT(VARST(dbv.ptszVal))) { TCHAR szFinalPath[MAX_PATH]; - mir_sntprintf(szFinalPath, _T("%%miranda_path%%\\%s"), dbv.ptszVal); + mir_sntprintf(szFinalPath, L"%%miranda_path%%\\%s", dbv.ptszVal); SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, szFinalPath); } else SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, dbv.ptszVal); @@ -397,7 +397,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar db_free(&dbv); } else { - SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, _T("")); + SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, L""); InvalidateRect(GetDlgItem(hwndDlg, IDC_PROTOPIC), NULL, TRUE); } } @@ -1073,7 +1073,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP case IDC_DELETE: if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_PER_PROTO)) { if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), TranslateT("Global avatar"), MB_YESNO) == IDYES) - avSetMyAvatar(NULL, _T("")); + avSetMyAvatar(NULL, L""); } else { char *proto = GetSelectedProtocol(hwndDlg); @@ -1084,7 +1084,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP CallProtoService(proto, PS_GETNAME, _countof(description), (LPARAM)description); TCHAR *descr = mir_a2t(description); if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), descr, MB_YESNO) == IDYES) - avSetMyAvatar(proto, _T("")); + avSetMyAvatar(proto, L""); mir_free(descr); } break; diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 50f6134e31..058f377e99 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -98,7 +98,7 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case WM_NOTIFY:
if (data->setView) {
HWND hwndParent = GetParent(hwnd);
- HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL);
+ HWND hwndLv = FindWindowEx(hwndParent, NULL, L"SHELLDLL_DefView", NULL);
if (hwndLv != NULL) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
data->setView = FALSE;
@@ -138,9 +138,9 @@ static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath) ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_ENABLETEMPLATE | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
- ofn.lpstrInitialDir = _T(".");
+ ofn.lpstrInitialDir = L".";
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
ofn.hInstance = g_hInst;
ofn.lpTemplateName = MAKEINTRESOURCE(IDD_OPENSUBCLASS);
ofn.lpfnHook = OpenFileSubclass;
@@ -255,25 +255,25 @@ static int InternalRemoveMyAvatar(char *protocol) static void FilterGetStrings(CMString &filter, BOOL xml, BOOL swf)
{
- filter.AppendFormat(_T("%s (*.bmp;*.jpg;*.gif;*.png"), TranslateT("All files"));
- if (swf) filter.Append(_T(";*.swf"));
- if (xml) filter.Append(_T(";*.xml"));
+ filter.AppendFormat(L"%s (*.bmp;*.jpg;*.gif;*.png", TranslateT("All files"));
+ if (swf) filter.Append(L";*.swf");
+ if (xml) filter.Append(L";*.xml");
- filter.AppendFormat(_T(")%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG"), 0);
- if (swf) filter.Append(_T(";*.SWF"));
- if (xml) filter.Append(_T(";*.XML"));
+ filter.AppendFormat(L")%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG", 0);
+ if (swf) filter.Append(L";*.SWF");
+ if (xml) filter.Append(L";*.XML");
filter.AppendChar(0);
- filter.AppendFormat(_T("%s (*.bmp;*.rle)%c*.BMP;*.RLE%c"), TranslateT("Windows bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c"), TranslateT("JPEG bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.gif)%c*.GIF%c"), TranslateT("GIF bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.png)%c*.PNG%c"), TranslateT("PNG bitmaps"), 0, 0);
+ filter.AppendFormat(L"%s (*.bmp;*.rle)%c*.BMP;*.RLE%c", TranslateT("Windows bitmaps"), 0, 0);
+ filter.AppendFormat(L"%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c", TranslateT("JPEG bitmaps"), 0, 0);
+ filter.AppendFormat(L"%s (*.gif)%c*.GIF%c", TranslateT("GIF bitmaps"), 0, 0);
+ filter.AppendFormat(L"%s (*.png)%c*.PNG%c", TranslateT("PNG bitmaps"), 0, 0);
if (swf)
- filter.AppendFormat(_T("%s (*.swf)%c*.SWF%c"), TranslateT("Flash animations"), 0, 0);
+ filter.AppendFormat(L"%s (*.swf)%c*.SWF%c", TranslateT("Flash animations"), 0, 0);
if (xml)
- filter.AppendFormat(_T("%s (*.xml)%c*.XML%c"), TranslateT("XML files"), 0, 0);
+ filter.AppendFormat(L"%s (*.xml)%c*.XML%c", TranslateT("XML files"), 0, 0);
filter.AppendChar(0);
}
@@ -310,7 +310,7 @@ static UINT_PTR CALLBACK SetMyAvatarHookProc(HWND hwnd, UINT msg, WPARAM, LPARAM data = (SetMyAvatarHookData *)ofn->lCustData;
if (data->thumbnail) {
HWND hwndParent = GetParent(hwnd);
- HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL);
+ HWND hwndLv = FindWindowEx(hwndParent, NULL, L"SHELLDLL_DefView", NULL);
if (hwndLv != NULL) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
data->thumbnail = FALSE;
@@ -347,7 +347,7 @@ void SaveImage(SaveProtocolData &d, char *protocol, int format) if (!Proto_IsAvatarFormatSupported(protocol, format))
return;
- mir_sntprintf(d.image_file_name, _T("%s%s"), d.temp_file, ProtoGetAvatarExtension(format));
+ mir_sntprintf(d.image_file_name, L"%s%s", d.temp_file, ProtoGetAvatarExtension(format));
if (BmpFilterSaveBitmap(d.hBmpProto, d.image_file_name, format == PA_FORMAT_JPEG ? JPEG_QUALITYSUPERB : 0))
return;
@@ -437,7 +437,7 @@ static int SetProtoMyAvatar(char *protocol, HBITMAP hBmp, TCHAR *originalFilenam if (d.temp_file[0] == '\0') {
d.temp_file[0] = '\0';
if (GetTempPath(MAX_PATH, d.temp_file) == 0
- || GetTempFileName(d.temp_file, _T("mir_av_"), 0, d.temp_file) == 0) {
+ || GetTempFileName(d.temp_file, L"mir_av_", 0, d.temp_file) == 0) {
DeleteObject(d.hBmpProto);
return -1;
}
@@ -549,14 +549,14 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo // Copy avatar file to store as global one
TCHAR globalFile[1024];
BOOL saved = TRUE;
- if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, _countof(globalFile), _T(""))) {
- mir_sntprintf(globalFile, _T("%s%s"), g_szDataPath, _T("GlobalAvatar"));
+ if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, _countof(globalFile), L"")) {
+ mir_sntprintf(globalFile, L"%s%s", g_szDataPath, L"GlobalAvatar");
CreateDirectory(globalFile, NULL);
}
TCHAR *ext = _tcsrchr(szFinalName, _T('.')); // Can't be NULL here
if (format == PA_FORMAT_XML || format == PA_FORMAT_SWF) {
- mir_sntprintf(globalFile, _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
@@ -574,12 +574,12 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo // Check if need to resize
if (hBmpTmp == hBmp || hBmpTmp == NULL) {
// Use original image
- mir_sntprintf(globalFile, _T("%s\\my_global_avatar%s"), globalFile, ext);
+ mir_sntprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
// Save as PNG
- mir_sntprintf(globalFile, _T("%s\\my_global_avatar.png"), globalFile);
+ mir_sntprintf(globalFile, L"%s\\my_global_avatar.png", globalFile);
if (BmpFilterSaveBitmap(hBmpTmp, globalFile, 0))
saved = FALSE;
@@ -665,7 +665,7 @@ INT_PTR avSetMyAvatar(char* protocol, TCHAR* tszPath) FilterGetStrings(filter, allAcceptXML, allAcceptSWF);
TCHAR inipath[1024];
- FoldersGetCustomPathT(hMyAvatarsFolder, inipath, _countof(inipath), _T("."));
+ FoldersGetCustomPathT(hMyAvatarsFolder, inipath, _countof(inipath), L".");
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -680,7 +680,7 @@ INT_PTR avSetMyAvatar(char* protocol, TCHAR* tszPath) ofn.lCustData = (LPARAM)&data;
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
ofn.hInstance = g_hInst;
TCHAR title[256];
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index d64914d12f..85a990612d 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -56,13 +56,13 @@ void AddContactDlgOpts(HWND hdlg, const char* szProto, BOOL bAuthOptsOnly = FALS if (bAuthOptsOnly)
return;
- SetDlgItemText(hdlg, IDC_AUTHREQ, (flags & PF4_NOCUSTOMAUTH) ? _T("") : TranslateT("Please authorize my request and add me to your contact list."));
+ SetDlgItemText(hdlg, IDC_AUTHREQ, (flags & PF4_NOCUSTOMAUTH) ? L"" : TranslateT("Please authorize my request and add me to your contact list."));
char* szUniqueId = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0);
if (szUniqueId) {
size_t cbLen = mir_strlen(szUniqueId) + 2;
TCHAR* pszUniqueId = (TCHAR*)mir_alloc(cbLen * sizeof(TCHAR));
- mir_sntprintf(pszUniqueId, cbLen, _T("%S:"), szUniqueId);
+ mir_sntprintf(pszUniqueId, cbLen, L"%S:", szUniqueId);
SetDlgItemText(hdlg, IDC_IDLABEL, pszUniqueId);
mir_free(pszUniqueId);
}
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 3a17aaf2c3..facf4c926a 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -11,8 +11,8 @@ There is no warranty. #include "alarms.h"
-#define SERVICENAME _T("mp")
-#define COMMANDPREFIX _T("/") SERVICENAME
+#define SERVICENAME L"mp"
+#define COMMANDPREFIX L"/" SERVICENAME
#define WMP_PAUSE 32808
#define WMP_NEXT 0x497B
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 0cf9561998..941f69cb2c 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -97,7 +97,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar switch(msg) {
case WM_CREATE:
- hwnd_list = CreateWindow(_T("LISTBOX"), _T(""),
+ hwnd_list = CreateWindow(L"LISTBOX", L"",
(WS_VISIBLE | WS_CHILD | LBS_NOINTEGRALHEIGHT | LBS_STANDARD | LBS_NOTIFY | LBS_OWNERDRAWFIXED) & ~LBS_SORT
& ~WS_BORDER, 0, 0, 0, 0, hwnd, NULL, hInst,0);
return FALSE;
@@ -155,7 +155,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar len--;
_tcsncpy(titlebuff, alarm.szTitle, len);
titlebuff[len] = 0;
- mir_tstrcat(titlebuff, _T("..."));
+ mir_tstrcat(titlebuff, L"...");
GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
}
TextOut(dis->hDC,dis->rcItem.left + 16 + 4,(dis->rcItem.top + dis->rcItem.bottom - textSize.cy)>>1,titlebuff,(int)mir_tstrlen(titlebuff));
@@ -496,11 +496,11 @@ int CreateFrame() wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
wndclass.hbrBackground = 0;
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T("AlarmsFrame");
+ wndclass.lpszClassName = L"AlarmsFrame";
RegisterClass(&wndclass);
if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- hwnd_plugin = CreateWindow(_T("AlarmsFrame"), TranslateT("Alarms"),
+ hwnd_plugin = CreateWindow(L"AlarmsFrame", TranslateT("Alarms"),
WS_CHILD | WS_CLIPCHILDREN,
0,0,10,10, pcli->hwndContactList, NULL,hInst,NULL);
@@ -523,15 +523,15 @@ int CreateFrame() wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
wndclass.hbrBackground = 0; //(HBRUSH)(COLOR_3DFACE+1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T("AlarmsFrameContainer");
+ wndclass.lpszClassName = L"AlarmsFrameContainer";
RegisterClass(&wndclass);
- hwnd_frame = CreateWindowEx(WS_EX_TOOLWINDOW, _T("AlarmsFrameContainer"), TranslateT("Alarms"),
+ hwnd_frame = CreateWindowEx(WS_EX_TOOLWINDOW, L"AlarmsFrameContainer", TranslateT("Alarms"),
(WS_POPUPWINDOW | WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN) & ~WS_VISIBLE,
0,0,200,100, pcli->hwndContactList, NULL,hInst,NULL);
//0,0,200,100, GetDesktopWindow(), NULL,hInst,NULL);
- hwnd_plugin = CreateWindow(_T("AlarmsFrame"), TranslateT("Alarms"),
+ hwnd_plugin = CreateWindow(L"AlarmsFrame", TranslateT("Alarms"),
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE,
0,0,10,10, hwnd_frame, NULL,hInst,NULL);
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index def0c416ff..59d85c22be 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -268,7 +268,7 @@ static TCHAR* GetAssocTypeDesc(const ASSOCDATA *assoc) {
static TCHAR szDesc[32];
if (assoc->pszFileExt == NULL)
- mir_sntprintf(szDesc, _T("%hs:"), assoc->pszClassName);
+ mir_sntprintf(szDesc, L"%hs:", assoc->pszClassName);
else
mir_sntprintf(szDesc, TranslateT("%hs files"), assoc->pszFileExt);
return szDesc;
@@ -745,7 +745,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara // autostart
TCHAR *pszRunCmd = MakeRunCommand(TRUE, TRUE);
if (pszRunCmd != NULL) {
- CheckDlgButton(hwndDlg, IDC_AUTOSTART, IsRegRunEntry(_T("MirandaNG"), pszRunCmd) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSTART, IsRegRunEntry(L"MirandaNG", pszRunCmd) ? BST_CHECKED : BST_UNCHECKED);
mir_free(pszRunCmd);
}
}
@@ -896,7 +896,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara fRegFailed = FALSE;
if (pszRunCmd != NULL) {
fEnabled = IsDlgButtonChecked(hwndDlg, IDC_AUTOSTART);
- if (fEnabled ? !AddRegRunEntry(_T("MirandaNG"), pszRunCmd) : !RemoveRegRunEntry(_T("MirandaNG"), pszRunCmd)) {
+ if (fEnabled ? !AddRegRunEntry(L"MirandaNG", pszRunCmd) : !RemoveRegRunEntry(L"MirandaNG", pszRunCmd)) {
char *pszErr;
pszErr = GetWinErrorDescription(GetLastError());
ShowInfoMessage(NIIF_ERROR, Translate("Autostart error"), Translate("There was an error writing to the registry to modify the autostart list.\n\nReason: %s"), (pszErr != NULL) ? pszErr : Translate("Unknown"));
diff --git a/plugins/AssocMgr/src/dde.cpp b/plugins/AssocMgr/src/dde.cpp index 990f6992bd..35fd6a9e28 100644 --- a/plugins/AssocMgr/src/dde.cpp +++ b/plugins/AssocMgr/src/dde.cpp @@ -64,7 +64,7 @@ static void __stdcall UrlActionAsync(void *param) /************************* Conversation ***************************/
#define DDEMESSAGETIMEOUT 30000
-#define WNDCLASS_DDEMSGWINDOW _T("MirandaDdeMsgWindow")
+#define WNDCLASS_DDEMSGWINDOW L"MirandaDdeMsgWindow"
// returned pointer points into a substring of ppszString
// returns an empty string if the string does not have enough arguments
@@ -115,9 +115,9 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd, UINT msg, WPARAM wParam, LPA if (pszArg != NULL) {
/* we are inside miranda here, we make it async so the shell does
* not timeout regardless what the plugins try to do. */
- if (!mir_tstrcmpi(pszAction, _T("file")))
+ if (!mir_tstrcmpi(pszAction, L"file"))
CallFunctionAsync(FileActionAsync, mir_tstrdup(pszArg));
- else if (!mir_tstrcmpi(pszAction, _T("url")))
+ else if (!mir_tstrcmpi(pszAction, L"url"))
CallFunctionAsync(UrlActionAsync, mir_tstrdup(pszArg));
}
GlobalUnlock(hCommand);
@@ -170,7 +170,7 @@ static HANDLE StartupMainProcess(TCHAR *pszDatabasePath) p = _tcsrchr(szPath, _T('\\'));
if (p != NULL) { *p = 0; p = _tcsrchr(szPath, _T('\\')); }
if (p == NULL) return NULL;
- mir_tstrcpy(++p, _T("miranda32.exe"));
+ mir_tstrcpy(++p, L"miranda32.exe");
/* inherit startup data from RunDll32 process */
STARTUPINFO si;
diff --git a/plugins/AssocMgr/src/dde.h b/plugins/AssocMgr/src/dde.h index 9ca8a340ae..b9fa35043c 100644 --- a/plugins/AssocMgr/src/dde.h +++ b/plugins/AssocMgr/src/dde.h @@ -20,10 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Conversation */
-#define DDEAPP _T("Miranda")
-#define DDETOPIC _T("OpenAssoc")
-#define DDEURLCMD _T("url,\"%l\"")
-#define DDEFILECMD _T("file,\"%1\"")
+#define DDEAPP L"Miranda"
+#define DDETOPIC L"OpenAssoc"
+#define DDEURLCMD L"url,\"%l\""
+#define DDEFILECMD L"file,\"%1\""
/* Misc */
void InitDde(void);
diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp index 51ac863238..516a933cec 100644 --- a/plugins/AssocMgr/src/main.cpp +++ b/plugins/AssocMgr/src/main.cpp @@ -95,9 +95,9 @@ extern "C" __declspec(dllexport) int Load(void) InitDde();
/* installation */
- InstallFile(_T("AssocMgr-Readme.txt"),_T("Docs\\"));
- InstallFile(_T("AssocMgr-License.txt"),_T("Docs\\"));
- InstallFile(_T("AssocMgr-SDK.zip"),_T("Docs\\"));
+ InstallFile(L"AssocMgr-Readme.txt",L"Docs\\");
+ InstallFile(L"AssocMgr-License.txt",L"Docs\\");
+ InstallFile(L"AssocMgr-SDK.zip",L"Docs\\");
hHookModulesLoaded=HookEvent(ME_SYSTEM_MODULESLOADED,AssocMgrModulesLoaded);
return 0;
}
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index 55eed01b2f..6822fdbddc 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -133,17 +133,17 @@ TCHAR *MakeRunCommand(BOOL fMirExe,BOOL fFixedDbProfile) if (p)
*p = 0;
}
- else mir_tstrcpy(szDbFile, _T("%1")); /* buffer safe */
+ else mir_tstrcpy(szDbFile, L"%1"); /* buffer safe */
if ( !GetModuleFileName(fMirExe ? NULL : hInst, szExe, _countof(szExe)))
return NULL;
if (fMirExe)
/* run command for miranda32.exe */
- pszFmt = _T("\"%s\" \"/profile:%s\"");
+ pszFmt = L"\"%s\" \"/profile:%s\"";
else {
/* run command for rundll32.exe calling WaitForDDE */
- pszFmt = _T("rundll32.exe %s,WaitForDDE \"/profile:%s\"");
+ pszFmt = L"rundll32.exe %s,WaitForDDE \"/profile:%s\"";
/* ensure the command line is not too long */
GetShortPathName(szExe, szExe, _countof(szExe));
/* surround by quotes if failed */
@@ -176,9 +176,9 @@ static BOOL IsValidRunCommand(const TCHAR *pszRunCmd) if (pargs!=NULL) *pargs=0;
pexe=buf;
}
- if (SearchPath(NULL,pexe,_T(".exe"),_countof(szFullExe),szFullExe,&pszFilePart)) {
+ if (SearchPath(NULL,pexe,L".exe",_countof(szFullExe),szFullExe,&pszFilePart)) {
if (pszFilePart!=NULL)
- if (!mir_tstrcmpi(pszFilePart,_T("rundll32.exe")) || !mir_tstrcmpi(pszFilePart,_T("rundll.exe"))) {
+ if (!mir_tstrcmpi(pszFilePart,L"rundll32.exe") || !mir_tstrcmpi(pszFilePart,L"rundll.exe")) {
/* split into dll path and arguments */
if (pargs[0]==_T('\"')) {
++pargs;
@@ -188,7 +188,7 @@ static BOOL IsValidRunCommand(const TCHAR *pszRunCmd) pexe=_tcschr(pargs,_T(','));
if (pexe!=NULL) *pexe=0;
}
- return SearchPath(NULL,pargs,_T(".dll"),0,NULL,NULL)!=0;
+ return SearchPath(NULL,pargs,L".dll",0,NULL,NULL)!=0;
}
return TRUE;
}
@@ -203,7 +203,7 @@ TCHAR *MakeIconLocation(HMODULE hModule,WORD nIconResID) if ((cch=GetModuleFileName(hModule,szModule,_countof(szModule))) != 0) {
pszIconLoc=(TCHAR*)mir_alloc((cch+=8)*sizeof(TCHAR));
if (pszIconLoc!=NULL)
- mir_sntprintf(pszIconLoc, cch, _T("%s,%i"), szModule, -(int)nIconResID); /* id may be 0, buffer safe */
+ mir_sntprintf(pszIconLoc, cch, L"%s,%i", szModule, -(int)nIconResID); /* id may be 0, buffer safe */
}
return pszIconLoc;
}
@@ -592,7 +592,7 @@ BOOL AddRegClass(const char *pszClassName,const TCHAR *pszTypeDescription,const return FALSE;
}
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_CREATE_SUB_KEY,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT; /* might be write protected by security settings */
/* class */
@@ -600,67 +600,67 @@ BOOL AddRegClass(const char *pszClassName,const TCHAR *pszTypeDescription,const /* backup class if shared */
if (fUrlProto) BackupRegTree(hRootKey,pszClassName,"bak_");
/* type description */
- if (fUrlProto) SetRegStrPrefixValue(hClassKey,_T("URL:"),pszTypeDescription);
+ if (fUrlProto) SetRegStrPrefixValue(hClassKey,L"URL:",pszTypeDescription);
else RegSetValueEx(hClassKey,NULL,0,REG_SZ,(BYTE*)pszTypeDescription,(int)(mir_tstrlen(pszTypeDescription)+1)*sizeof(TCHAR));
/* default icon */
- if (pszIconLoc!=NULL) SetRegSubKeyStrDefValue(hClassKey,_T("DefaultIcon"),pszIconLoc);
+ if (pszIconLoc!=NULL) SetRegSubKeyStrDefValue(hClassKey,L"DefaultIcon",pszIconLoc);
/* url protocol */
- if (!fUrlProto) RegDeleteValue(hClassKey,_T("URL Protocol"));
- else RegSetValueEx(hClassKey,_T("URL Protocol"),0,REG_SZ,NULL,0);
+ if (!fUrlProto) RegDeleteValue(hClassKey,L"URL Protocol");
+ else RegSetValueEx(hClassKey,L"URL Protocol",0,REG_SZ,NULL,0);
/* moniker clsid */
- RegDeleteKey(hClassKey,_T("CLSID"));
+ RegDeleteKey(hClassKey,L"CLSID");
/* edit flags */
{ DWORD dwFlags=0,dwSize=sizeof(dwFlags);
- RegQueryValueEx(hClassKey,_T("EditFlags"),NULL,NULL,(BYTE*)&dwFlags,&dwSize);
+ RegQueryValueEx(hClassKey,L"EditFlags",NULL,NULL,(BYTE*)&dwFlags,&dwSize);
if (fBrowserAutoOpen) dwFlags=(dwFlags&~FTA_AlwaysUnsafe)|FTA_OpenIsSafe;
if (!fUrlProto) dwFlags|=FTA_HasExtension;
else dwFlags=(dwFlags&~FTA_HasExtension)|FTA_Show; /* show classes without extension */
- RegSetValueEx(hClassKey,_T("EditFlags"),0,REG_DWORD,(BYTE*)&dwFlags,sizeof(dwFlags));
+ RegSetValueEx(hClassKey,L"EditFlags",0,REG_DWORD,(BYTE*)&dwFlags,sizeof(dwFlags));
}
if (fIsShortcut) {
RegSetValueExA(hClassKey,"IsShortcut",0,REG_SZ,NULL,0);
RegSetValueExA(hClassKey,"NeverShowExt",0,REG_SZ,NULL,0);
}
/* shell */
- if ((res=RegCreateKeyEx(hClassKey,_T("shell"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hShellKey,NULL))==ERROR_SUCCESS) {
+ if ((res=RegCreateKeyEx(hClassKey,L"shell",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hShellKey,NULL))==ERROR_SUCCESS) {
/* default verb (when empty "open" is used) */
- RegSetValueEx(hShellKey,NULL,0,REG_SZ,(BYTE*)_T("open"),5*sizeof(TCHAR));
+ RegSetValueEx(hShellKey,NULL,0,REG_SZ,(BYTE*)L"open",5*sizeof(TCHAR));
/* verb */
- if ((res=RegCreateKeyEx(hShellKey,_T("open"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY|DELETE,NULL,&hVerbKey,NULL))==ERROR_SUCCESS) {
+ if ((res=RegCreateKeyEx(hShellKey,L"open",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY|DELETE,NULL,&hVerbKey,NULL))==ERROR_SUCCESS) {
/* verb description */
if (pszVerbDesc==NULL) RegDeleteValue(hVerbKey,NULL);
else RegSetValueEx(hVerbKey,NULL,0,REG_SZ,(BYTE*)pszVerbDesc,(int)(mir_tstrlen(pszVerbDesc)+1)*sizeof(TCHAR));
/* friendly appname (mui string) */
- RegSetValueEx(hVerbKey,_T("FriendlyAppName"),0,REG_SZ,(BYTE*)pszAppName,(int)(mir_tstrlen(pszAppName)+1)*sizeof(TCHAR));
+ RegSetValueEx(hVerbKey,L"FriendlyAppName",0,REG_SZ,(BYTE*)pszAppName,(int)(mir_tstrlen(pszAppName)+1)*sizeof(TCHAR));
/* command */
- SetRegSubKeyStrDefValue(hVerbKey,_T("command"),pszRunCmd);
+ SetRegSubKeyStrDefValue(hVerbKey,L"command",pszRunCmd);
/* ddeexec */
if (pszDdeCmd!=NULL) {
- if (!RegCreateKeyEx(hVerbKey,_T("ddeexec"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY|DELETE,NULL,&hDdeKey,NULL)) {
+ if (!RegCreateKeyEx(hVerbKey,L"ddeexec",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY|DELETE,NULL,&hDdeKey,NULL)) {
/* command */
RegSetValueEx(hDdeKey,NULL,0,REG_SZ,(BYTE*)pszDdeCmd,(int)(mir_tstrlen(pszDdeCmd)+1)*sizeof(TCHAR));
/* application */
- SetRegSubKeyStrDefValue(hDdeKey,_T("application"),pszDdeApp);
+ SetRegSubKeyStrDefValue(hDdeKey,L"application",pszDdeApp);
/* topic */
- SetRegSubKeyStrDefValue(hDdeKey,_T("topic"),pszDdeTopic);
+ SetRegSubKeyStrDefValue(hDdeKey,L"topic",pszDdeTopic);
/* ifexec */
- RegDeleteKey(hDdeKey,_T("ifexec"));
+ RegDeleteKey(hDdeKey,L"ifexec");
RegCloseKey(hDdeKey);
}
} else {
- if (!RegOpenKeyEx(hVerbKey,_T("ddeexec"),0,DELETE,&hDdeKey)) {
+ if (!RegOpenKeyEx(hVerbKey,L"ddeexec",0,DELETE,&hDdeKey)) {
/* application */
- RegDeleteKey(hDdeKey,_T("application"));
+ RegDeleteKey(hDdeKey,L"application");
/* topic */
- RegDeleteKey(hDdeKey,_T("topic"));
+ RegDeleteKey(hDdeKey,L"topic");
/* ifexec */
- RegDeleteKey(hDdeKey,_T("ifexec"));
+ RegDeleteKey(hDdeKey,L"ifexec");
RegCloseKey(hDdeKey);
}
- RegDeleteKey(hVerbKey,_T("ddeexec"));
+ RegDeleteKey(hVerbKey,L"ddeexec");
}
/* drop target (WinXP+) */
- RegDeleteKey(hVerbKey,_T("DropTarget"));
+ RegDeleteKey(hVerbKey,L"DropTarget");
RegCloseKey(hVerbKey);
}
RegCloseKey(hShellKey);
@@ -682,7 +682,7 @@ BOOL RemoveRegClass(const char *pszClassName) TCHAR *ptszClassName,*ptszPrevRunCmd;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,DELETE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* class name */
@@ -698,11 +698,11 @@ BOOL RemoveRegClass(const char *pszClassName) /* class */
if (!RegOpenKeyExA(hRootKey,pszClassName,0,KEY_QUERY_VALUE,&hClassKey)) {
/* shell */
- if (!RegOpenKeyEx(hClassKey,_T("shell"),0,KEY_QUERY_VALUE,&hShellKey)) {
+ if (!RegOpenKeyEx(hClassKey,L"shell",0,KEY_QUERY_VALUE,&hShellKey)) {
/* verb */
- if (!RegOpenKeyEx(hShellKey,_T("open"),0,KEY_QUERY_VALUE,&hVerbKey)) {
+ if (!RegOpenKeyEx(hShellKey,L"open",0,KEY_QUERY_VALUE,&hVerbKey)) {
/* command */
- ptszPrevRunCmd=GetRegStrValue(hVerbKey,_T("command"));
+ ptszPrevRunCmd=GetRegStrValue(hVerbKey,L"command");
if (ptszPrevRunCmd!=NULL && !IsValidRunCommand(ptszPrevRunCmd))
res=DeleteRegSubTree(hRootKey,ptszClassName); /* backup outdated, remove all */
mir_free(ptszPrevRunCmd); /* does NULL check */
@@ -738,11 +738,11 @@ BOOL IsRegClass(const char *pszClassName,const TCHAR *pszRunCmd) /* class */
if (!RegOpenKeyExA(HKEY_CLASSES_ROOT,pszClassName,0,KEY_QUERY_VALUE,&hClassKey)) {
/* shell */
- if (!RegOpenKeyEx(hClassKey,_T("shell"),0,KEY_QUERY_VALUE,&hShellKey)) {
+ if (!RegOpenKeyEx(hClassKey,L"shell",0,KEY_QUERY_VALUE,&hShellKey)) {
/* verb */
- if (!RegOpenKeyEx(hShellKey,_T("open"),0,KEY_QUERY_VALUE,&hVerbKey)) {
+ if (!RegOpenKeyEx(hShellKey,L"open",0,KEY_QUERY_VALUE,&hVerbKey)) {
/* command */
- if (!RegOpenKeyEx(hVerbKey,_T("command"),0,KEY_QUERY_VALUE,&hCmdKey)) {
+ if (!RegOpenKeyEx(hVerbKey,L"command",0,KEY_QUERY_VALUE,&hCmdKey)) {
/* it is enough to check if the command is right */
fSuccess=IsRegStrValue(hCmdKey,NULL,pszRunCmd);
RegCloseKey(hCmdKey);
@@ -772,7 +772,7 @@ HICON LoadRegClassSmallIcon(const char *pszClassName) /* class */
if (!RegOpenKeyExA(HKEY_CLASSES_ROOT,pszClassName,0,KEY_QUERY_VALUE,&hClassKey)) {
/* default icon */
- if (!RegOpenKeyEx(hClassKey,_T("DefaultIcon"),0,KEY_QUERY_VALUE,&hIconKey)) {
+ if (!RegOpenKeyEx(hClassKey,L"DefaultIcon",0,KEY_QUERY_VALUE,&hIconKey)) {
/* extract icon */
pszIconLoc=GetRegStrValue(hIconKey,NULL);
if (pszIconLoc!=NULL) {
@@ -812,7 +812,7 @@ BOOL AddRegFileExt(const char *pszFileExt,const char *pszClassName,const char *p return FALSE;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_CREATE_SUB_KEY,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_CREATE_SUB_KEY,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* file ext */
@@ -820,11 +820,11 @@ BOOL AddRegFileExt(const char *pszFileExt,const char *pszClassName,const char *p /* backup previous app */
BackupRegTree(hRootKey,pszFileExt,"bak_");
/* remove any no-open flag */
- RegDeleteValue(hExtKey,_T("NoOpen"));
+ RegDeleteValue(hExtKey,L"NoOpen");
/* open with progids */
TCHAR *pszPrevClass=GetRegStrValue(hExtKey,NULL);
if (pszPrevClass!=NULL && !IsRegStrValueA(hExtKey,NULL,pszClassName))
- if (!RegCreateKeyEx(hExtKey,_T("OpenWithProgids"),0,NULL,0,KEY_SET_VALUE,NULL,&hOpenWithKey,NULL)) {
+ if (!RegCreateKeyEx(hExtKey,L"OpenWithProgids",0,NULL,0,KEY_SET_VALUE,NULL,&hOpenWithKey,NULL)) {
/* previous class (backup) */
RegSetValueEx(hOpenWithKey,pszPrevClass,0,REG_NONE,NULL,0);
RegCloseKey(hOpenWithKey);
@@ -835,7 +835,7 @@ BOOL AddRegFileExt(const char *pszFileExt,const char *pszClassName,const char *p /* mime type e.g. "application/x-icq" */
if (pszMimeType!=NULL) RegSetValueExA(hExtKey, "Content Type", 0, REG_SZ, (BYTE*)pszMimeType, (int)mir_strlen(pszMimeType)+1);
/* perceived type e.g. text (WinXP+) */
- if (fIsText) RegSetValueEx(hExtKey,_T("PerceivedType"),0,REG_SZ,(BYTE*)_T("text"),5*sizeof(TCHAR));
+ if (fIsText) RegSetValueEx(hExtKey,L"PerceivedType",0,REG_SZ,(BYTE*)L"text",5*sizeof(TCHAR));
RegCloseKey(hExtKey);
}
@@ -852,7 +852,7 @@ void RemoveRegFileExt(const char *pszFileExt,const char *pszClassName) BOOL fRestored=FALSE;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,DELETE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,DELETE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* file ext */
@@ -873,13 +873,13 @@ void RemoveRegFileExt(const char *pszFileExt,const char *pszClassName) if (pszPrevClassName==NULL) RegDeleteValue(hExtKey,NULL);
/* open with progids (remove if empty) */
nOpenWithCount=0;
- if (!RegOpenKeyEx(hExtKey,_T("OpenWithProgids"),0,KEY_SET_VALUE|KEY_QUERY_VALUE,&hSubKey)) {
+ if (!RegOpenKeyEx(hExtKey,L"OpenWithProgids",0,KEY_SET_VALUE|KEY_QUERY_VALUE,&hSubKey)) {
/* remove current class (if set by another app) */
RegDeleteValueA(hSubKey,pszClassName);
RegQueryInfoKey(hSubKey,NULL,NULL,NULL,NULL,NULL,NULL,NULL,&nOpenWithCount,NULL,NULL,NULL);
RegCloseKey(hSubKey);
}
- if (!nOpenWithCount) RegDeleteKey(hExtKey,_T("OpenWithProgids")); /* delete if no values */
+ if (!nOpenWithCount) RegDeleteKey(hExtKey,L"OpenWithProgids"); /* delete if no values */
RegCloseKey(hExtKey);
} else DeleteRegTreeBackup(pszFileExt,"bak_");
if (!fRestored) RegDeleteKeyA(hRootKey,pszFileExt); /* try to remove it all */
@@ -928,11 +928,11 @@ BOOL AddRegMimeType(const char *pszMimeType,const char *pszFileExt) return FALSE;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
- if (!RegOpenKeyEx(hRootKey,_T("MIME\\Database\\Content Type"),0,KEY_CREATE_SUB_KEY,&hDbKey)) {
+ if (!RegOpenKeyEx(hRootKey,L"MIME\\Database\\Content Type",0,KEY_CREATE_SUB_KEY,&hDbKey)) {
/* mime type */
if (!RegCreateKeyExA(hDbKey,pszMimeType,0,NULL,0,KEY_QUERY_VALUE|KEY_SET_VALUE,NULL,&hTypeKey,NULL)) {
/* file ext */
@@ -954,15 +954,15 @@ void RemoveRegMimeType(const char *pszMimeType,const char *pszFileExt) BOOL fDelete=TRUE;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
- if (!RegOpenKeyEx(hRootKey,_T("MIME\\Database\\Content Type"),0,DELETE,&hDbKey)) {
+ if (!RegOpenKeyEx(hRootKey,L"MIME\\Database\\Content Type",0,DELETE,&hDbKey)) {
/* mime type */
if (!RegOpenKeyExA(hDbKey,pszMimeType,0,KEY_QUERY_VALUE,&hTypeKey)) {
/* file ext */
- fDelete=IsRegStrValueA(hTypeKey,_T("Extension"),pszFileExt);
+ fDelete=IsRegStrValueA(hTypeKey,L"Extension",pszFileExt);
RegCloseKey(hTypeKey);
}
if (fDelete) RegDeleteKeyA(hDbKey,pszMimeType);
@@ -985,39 +985,39 @@ void AddRegOpenWith(const TCHAR *pszAppFileName,BOOL fAllowOpenWith,const TCHAR HKEY hRootKey,hAppsKey,hExeKey,hShellKey,hVerbKey,hDdeKey;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* database */
- if (!RegCreateKeyEx(hRootKey,_T("Applications"),0,NULL,0,KEY_CREATE_SUB_KEY,NULL,&hAppsKey,NULL)) {
+ if (!RegCreateKeyEx(hRootKey,L"Applications",0,NULL,0,KEY_CREATE_SUB_KEY,NULL,&hAppsKey,NULL)) {
/* filename */
if (!RegCreateKeyEx(hAppsKey,pszAppFileName,0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hExeKey,NULL)) {
/* appname */
RegSetValueEx(hExeKey,NULL,0,REG_SZ,(BYTE*)pszAppName,(int)(mir_tstrlen(pszAppName)+1)*sizeof(TCHAR));
/* no open-with flag */
- if (fAllowOpenWith) RegDeleteValue(hExeKey,_T("NoOpenWith"));
- else RegSetValueEx(hExeKey,_T("NoOpenWith"),0,REG_SZ,NULL,0);
+ if (fAllowOpenWith) RegDeleteValue(hExeKey,L"NoOpenWith");
+ else RegSetValueEx(hExeKey,L"NoOpenWith",0,REG_SZ,NULL,0);
/* default icon */
- if (pszIconLoc!=NULL) SetRegSubKeyStrDefValue(hExeKey,_T("DefaultIcon"),pszIconLoc);
+ if (pszIconLoc!=NULL) SetRegSubKeyStrDefValue(hExeKey,L"DefaultIcon",pszIconLoc);
/* shell */
- if (!RegCreateKeyEx(hExeKey,_T("shell"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hShellKey,NULL)) {
+ if (!RegCreateKeyEx(hExeKey,L"shell",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hShellKey,NULL)) {
/* default verb (when empty "open" is used) */
- RegSetValueEx(hShellKey,NULL,0,REG_SZ,(BYTE*)_T("open"),5*sizeof(TCHAR));
+ RegSetValueEx(hShellKey,NULL,0,REG_SZ,(BYTE*)L"open",5*sizeof(TCHAR));
/* verb */
- if (!RegCreateKeyEx(hShellKey,_T("open"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hVerbKey,NULL)) {
+ if (!RegCreateKeyEx(hShellKey,L"open",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hVerbKey,NULL)) {
/* friendly appname (mui string) */
- RegSetValueEx(hVerbKey,_T("FriendlyAppName"),0,REG_SZ,(BYTE*)pszAppName,(int)(mir_tstrlen(pszAppName)+1)*sizeof(TCHAR));
+ RegSetValueEx(hVerbKey,L"FriendlyAppName",0,REG_SZ,(BYTE*)pszAppName,(int)(mir_tstrlen(pszAppName)+1)*sizeof(TCHAR));
/* command */
- SetRegSubKeyStrDefValue(hVerbKey,_T("command"),pszRunCmd);
+ SetRegSubKeyStrDefValue(hVerbKey,L"command",pszRunCmd);
/* ddeexec */
if (pszDdeCmd!=NULL)
- if (!RegCreateKeyEx(hVerbKey,_T("ddeexec"),0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hDdeKey,NULL)) {
+ if (!RegCreateKeyEx(hVerbKey,L"ddeexec",0,NULL,0,KEY_SET_VALUE|KEY_CREATE_SUB_KEY,NULL,&hDdeKey,NULL)) {
/* command */
RegSetValueEx(hDdeKey,NULL,0,REG_SZ,(BYTE*)pszDdeCmd,(int)(mir_tstrlen(pszDdeCmd)+1)*sizeof(TCHAR));
/* application */
- SetRegSubKeyStrDefValue(hDdeKey,_T("application"),pszDdeApp);
+ SetRegSubKeyStrDefValue(hDdeKey,L"application",pszDdeApp);
/* topic */
- SetRegSubKeyStrDefValue(hDdeKey,_T("topic"),pszDdeTopic);
+ SetRegSubKeyStrDefValue(hDdeKey,L"topic",pszDdeTopic);
RegCloseKey(hDdeKey);
}
RegCloseKey(hVerbKey);
@@ -1038,38 +1038,38 @@ void RemoveRegOpenWith(const TCHAR *pszAppFileName) HKEY hRootKey,hAppsKey,hExeKey,hShellKey,hVerbKey,hDdeKey;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
- if (!RegOpenKeyEx(hRootKey,_T("Applications"),0,DELETE,&hAppsKey)) {
+ if (!RegOpenKeyEx(hRootKey,L"Applications",0,DELETE,&hAppsKey)) {
/* filename */
if (!RegOpenKeyEx(hAppsKey,pszAppFileName,0,DELETE,&hExeKey)) {
/* default icon */
- RegDeleteKey(hExeKey,_T("DefaultIcon"));
+ RegDeleteKey(hExeKey,L"DefaultIcon");
/* shell */
- if (!RegOpenKeyEx(hExeKey,_T("shell"),0,DELETE,&hShellKey)) {
+ if (!RegOpenKeyEx(hExeKey,L"shell",0,DELETE,&hShellKey)) {
/* verb */
- if (!RegOpenKeyEx(hShellKey,_T("open"),0,DELETE,&hVerbKey)) {
+ if (!RegOpenKeyEx(hShellKey,L"open",0,DELETE,&hVerbKey)) {
/* command */
- RegDeleteKey(hVerbKey,_T("command"));
+ RegDeleteKey(hVerbKey,L"command");
/* ddeexec */
- if (!RegOpenKeyEx(hVerbKey,_T("ddeexec"),0,DELETE,&hDdeKey)) {
+ if (!RegOpenKeyEx(hVerbKey,L"ddeexec",0,DELETE,&hDdeKey)) {
/* application */
- RegDeleteKey(hDdeKey,_T("application"));
+ RegDeleteKey(hDdeKey,L"application");
/* topic */
- RegDeleteKey(hDdeKey,_T("topic"));
+ RegDeleteKey(hDdeKey,L"topic");
RegCloseKey(hDdeKey);
}
- RegDeleteKey(hVerbKey,_T("ddeexec"));
+ RegDeleteKey(hVerbKey,L"ddeexec");
RegCloseKey(hVerbKey);
}
- RegDeleteKey(hShellKey,_T("open"));
+ RegDeleteKey(hShellKey,L"open");
RegCloseKey(hShellKey);
}
- RegDeleteKey(hExeKey,_T("shell"));
+ RegDeleteKey(hExeKey,L"shell");
/* supported types */
- RegDeleteKey(hExeKey,_T("SupportedTypes"));
+ RegDeleteKey(hExeKey,L"SupportedTypes");
RegCloseKey(hExeKey);
}
RegDeleteKey(hAppsKey,pszAppFileName);
@@ -1089,15 +1089,15 @@ void AddRegOpenWithExtEntry(const TCHAR *pszAppFileName,const char *pszFileExt,c HKEY hRootKey,hAppsKey,hExeKey,hTypesKey;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
- if (!RegOpenKeyEx(hRootKey,_T("Applications"),0,KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,&hAppsKey)) {
+ if (!RegOpenKeyEx(hRootKey,L"Applications",0,KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS,&hAppsKey)) {
/* filename */
if (!RegOpenKeyEx(hAppsKey,pszAppFileName,0,KEY_CREATE_SUB_KEY,&hExeKey)) {
/* supported types */
- if (!RegCreateKeyEx(hExeKey,_T("SupportedTypes"),0,NULL,0,KEY_SET_VALUE,NULL,&hTypesKey,NULL)) {
+ if (!RegCreateKeyEx(hExeKey,L"SupportedTypes",0,NULL,0,KEY_SET_VALUE,NULL,&hTypesKey,NULL)) {
TCHAR *ptszFileExt;
ptszFileExt=a2t(pszFileExt);
if (ptszFileExt!=NULL)
@@ -1119,15 +1119,15 @@ void RemoveRegOpenWithExtEntry(const TCHAR *pszAppFileName,const char *pszFileEx HKEY hRootKey,hAppsKey,hExeKey,hTypesKey;
/* try to open interactive user's classes key */
- if (RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Classes"),0,KEY_QUERY_VALUE,&hRootKey))
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Classes",0,KEY_QUERY_VALUE,&hRootKey))
hRootKey=HKEY_CLASSES_ROOT;
/* applications */
- if (!RegOpenKeyEx(hRootKey,_T("Applications"),0,KEY_QUERY_VALUE,&hAppsKey)) {
+ if (!RegOpenKeyEx(hRootKey,L"Applications",0,KEY_QUERY_VALUE,&hAppsKey)) {
/* filename */
if (!RegOpenKeyEx(hAppsKey,pszAppFileName,0,KEY_QUERY_VALUE,&hExeKey)) {
/* supported types */
- if (!RegOpenKeyEx(hExeKey,_T("SupportedTypes"),0,KEY_SET_VALUE,&hTypesKey)) {
+ if (!RegOpenKeyEx(hExeKey,L"SupportedTypes",0,KEY_SET_VALUE,&hTypesKey)) {
RegDeleteValueA(hTypesKey,pszFileExt);
RegCloseKey(hTypesKey);
}
@@ -1152,7 +1152,7 @@ BOOL AddRegRunEntry(const TCHAR *pszAppName,const TCHAR *pszRunCmd) HKEY hRunKey;
/* run */
- if (!RegCreateKeyEx(HKEY_CURRENT_USER,_T("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),0,NULL,0,KEY_SET_VALUE,NULL,&hRunKey,NULL)) {
+ if (!RegCreateKeyEx(HKEY_CURRENT_USER,L"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,NULL,0,KEY_SET_VALUE,NULL,&hRunKey,NULL)) {
/* appname */
fSuccess=!RegSetValueEx(hRunKey,pszAppName,0,REG_SZ,(BYTE*)pszRunCmd,(int)(mir_tstrlen(pszRunCmd)+1)*sizeof(TCHAR));
RegCloseKey(hRunKey);
@@ -1165,7 +1165,7 @@ BOOL RemoveRegRunEntry(const TCHAR *pszAppName,const TCHAR *pszRunCmd) HKEY hRunKey;
/* run */
- LONG res = RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),0,KEY_QUERY_VALUE|KEY_SET_VALUE,&hRunKey);
+ LONG res = RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_QUERY_VALUE|KEY_SET_VALUE,&hRunKey);
if (!res) {
/* appname */
if (IsRegStrValue(hRunKey,pszAppName,pszRunCmd))
@@ -1185,7 +1185,7 @@ BOOL IsRegRunEntry(const TCHAR *pszAppName,const TCHAR *pszRunCmd) HKEY hRunKey;
/* Run */
- if (!RegOpenKeyEx(HKEY_CURRENT_USER,_T("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),0,KEY_QUERY_VALUE,&hRunKey)) {
+ if (!RegOpenKeyEx(HKEY_CURRENT_USER,L"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_QUERY_VALUE,&hRunKey)) {
/* appname */
fState=IsRegStrValue(hRunKey,pszAppName,pszRunCmd);
RegCloseKey(hRunKey);
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp index fc8b9df999..0980a3cd2d 100644 --- a/plugins/AssocMgr/src/test.cpp +++ b/plugins/AssocMgr/src/test.cpp @@ -331,7 +331,7 @@ static int IcqOpenFile(WPARAM wParam, LPARAM lParam) LastName=
*/
if (pszFile == NULL) return 1; /* sanity check */
- fp = _tfopen(pszFile, _T("rt"));
+ fp = _tfopen(pszFile, L"rt");
if (fp == NULL) return 1; /* open failed */
info.type = 0;
while (!feof(fp)) {
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index 97e50e4a1e..8d0a3109eb 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -33,7 +33,7 @@ void GetProfilePath(TCHAR *res, size_t resLen) TCHAR *p = _tcsrchr(dbname, '.');
if (p) *p = 0;
- mir_sntprintf(res, resLen, _T("\"%s\" \"/profile:%s\""), exename, dbname);
+ mir_sntprintf(res, resLen, L"\"%s\" \"/profile:%s\"", exename, dbname);
}
static void SetAutorun(BOOL autorun)
@@ -45,13 +45,13 @@ static void SetAutorun(BOOL autorun) if ( RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, NULL, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,NULL,&hKey,&dw) == ERROR_SUCCESS) {
TCHAR result[MAX_PATH];
GetProfilePath(result, _countof(result));
- RegSetValueEx(hKey, _T("MirandaNG"), 0, REG_SZ, (BYTE*)result, sizeof(TCHAR)*(DWORD)mir_tstrlen(result));
+ RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (BYTE*)result, sizeof(TCHAR)*(DWORD)mir_tstrlen(result));
RegCloseKey(hKey);
}
break;
case FALSE:
if ( RegOpenKey(ROOT_KEY, SUB_KEY, &hKey) == ERROR_SUCCESS) {
- RegDeleteValue(hKey, _T("MirandaNG"));
+ RegDeleteValue(hKey, L"MirandaNG");
RegCloseKey(hKey);
}
break;
@@ -66,7 +66,7 @@ static BOOL CmpCurrentAndRegistry() TCHAR result[MAX_PATH], dbpath[MAX_PATH];
DWORD dwBufLen = MAX_PATH;
- if ( RegQueryValueEx(hKey, _T("MirandaNG"), NULL, NULL, (LPBYTE)dbpath, &dwBufLen) != ERROR_SUCCESS)
+ if ( RegQueryValueEx(hKey, L"MirandaNG", NULL, NULL, (LPBYTE)dbpath, &dwBufLen) != ERROR_SUCCESS)
return FALSE;
GetProfilePath(result, _countof(result));
diff --git a/plugins/AutoRun/src/stdafx.h b/plugins/AutoRun/src/stdafx.h index 830c60b4f9..bdf5ae2607 100644 --- a/plugins/AutoRun/src/stdafx.h +++ b/plugins/AutoRun/src/stdafx.h @@ -9,5 +9,5 @@ #include "resource.h"
#include "version.h"
-#define SUB_KEY _T("Software\\Microsoft\\Windows\\CurrentVersion\\Run")
+#define SUB_KEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Run"
#define ModuleName LPGEN("Autorun")
diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index ba4ccd1107..7ca145d875 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -31,13 +31,13 @@ static BOOL WinNT_PerfStatsSwitch(TCHAR *pszServiceName, BOOL fDisable) DWORD dwData, dwDataSize;
BOOL fSwitched = FALSE;
/* Win2000+ */
- if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Services"), 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyServices)) {
+ if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Services", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyServices)) {
if (!RegOpenKeyEx(hKeyServices, pszServiceName, 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyService)) {
- if (!RegOpenKeyEx(hKeyService, _T("Performance"), 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyPerf)) {
+ if (!RegOpenKeyEx(hKeyService, L"Performance", 0, KEY_QUERY_VALUE | KEY_SET_VALUE, &hKeyPerf)) {
dwDataSize = sizeof(DWORD);
- if (!RegQueryValueEx(hKeyPerf, _T("Disable Performance Counters"), NULL, NULL, (BYTE*)&dwData, &dwDataSize))
+ if (!RegQueryValueEx(hKeyPerf, L"Disable Performance Counters", NULL, NULL, (BYTE*)&dwData, &dwDataSize))
if ((dwData != 0) != fDisable)
- fSwitched = !RegSetValueEx(hKeyPerf, _T("Disable Performance Counters"), 0, REG_DWORD, (BYTE*)&fDisable, dwDataSize);
+ fSwitched = !RegSetValueEx(hKeyPerf, L"Disable Performance Counters", 0, REG_DWORD, (BYTE*)&fDisable, dwDataSize);
RegCloseKey(hKeyPerf);
}
RegCloseKey(hKeyService);
@@ -95,7 +95,7 @@ static void WinNT_PollThread(void *vparam) dwCounterId = 6; /* '% processor time' counter */
pwszInstanceName = L"_Total"; /* '_Total' instance */
_itot_s(dwObjectId, wszValueName, 10);
- fSwitched = WinNT_PerfStatsSwitch(_T("PerfOS"), FALSE);
+ fSwitched = WinNT_PerfStatsSwitch(L"PerfOS", FALSE);
/* poll */
for (;;) {
@@ -171,7 +171,7 @@ static void WinNT_PollThread(void *vparam) if (pPerfData)
mir_free(pPerfData);
if (fSwitched)
- WinNT_PerfStatsSwitch(_T("PerfOS"), TRUE);
+ WinNT_PerfStatsSwitch(L"PerfOS", TRUE);
/* return error for PollCpuUsage() if never succeeded */
if (param->hFirstEvent != NULL)
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index 7477c0c990..0f76cb66fa 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -73,7 +73,7 @@ static LRESULT CALLBACK ProgressBarSubclassProc(HWND hwndProgress, UINT msg, WPA /************************* Window Class *******************************/
-#define COUNTDOWNFRAME_CLASS _T("AutoShutdownCountdown")
+#define COUNTDOWNFRAME_CLASS L"AutoShutdownCountdown"
/* Data */
struct CountdownFrameWndData
@@ -124,17 +124,17 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP case WM_CREATE: /* create childs */
{
CREATESTRUCT *params = (CREATESTRUCT*)lParam;
- dat->hwndIcon = CreateWindowEx(WS_EX_NOPARENTNOTIFY, _T("Static"), NULL, WS_CHILD | WS_VISIBLE | SS_ICON | SS_CENTERIMAGE | SS_NOTIFY,
+ dat->hwndIcon = CreateWindowEx(WS_EX_NOPARENTNOTIFY, L"Static", NULL, WS_CHILD | WS_VISIBLE | SS_ICON | SS_CENTERIMAGE | SS_NOTIFY,
3, 0, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), hwndFrame, NULL, params->hInstance, NULL);
dat->hwndProgress = CreateWindowEx(WS_EX_NOPARENTNOTIFY, PROGRESS_CLASS, (dat->fTimeFlags&SDWTF_ST_TIME) ? TranslateT("Shutdown at:") : TranslateT("Time left:"),
WS_CHILD | WS_VISIBLE | PBS_SMOOTH, GetSystemMetrics(SM_CXICON) + 5, 5, 90, (GetSystemMetrics(SM_CXICON) / 2) - 5, hwndFrame, NULL, params->hInstance, NULL);
if (dat->hwndProgress == NULL) return -1; /* creation failed, calls WM_DESTROY */
SendMessage(dat->hwndProgress, PBM_SETSTEP, 1, 0);
mir_subclassWindow(dat->hwndProgress, ProgressBarSubclassProc);
- dat->hwndDesc = CreateWindowEx(WS_EX_NOPARENTNOTIFY, _T("Static"), (dat->fTimeFlags&SDWTF_ST_TIME) ? TranslateT("Shutdown at:") : TranslateT("Time left:"),
+ dat->hwndDesc = CreateWindowEx(WS_EX_NOPARENTNOTIFY, L"Static", (dat->fTimeFlags&SDWTF_ST_TIME) ? TranslateT("Shutdown at:") : TranslateT("Time left:"),
WS_CHILD | WS_VISIBLE | SS_LEFTNOWORDWRAP | SS_NOTIFY, GetSystemMetrics(SM_CXICON) + 5, (GetSystemMetrics(SM_CXICON) / 2), 75,
(GetSystemMetrics(SM_CXICON) / 2), hwndFrame, NULL, params->hInstance, NULL);
- dat->hwndTime = CreateWindowEx(WS_EX_NOPARENTNOTIFY, _T("Static"), NULL, WS_CHILD | WS_VISIBLE | SS_RIGHT | SS_NOTIFY | SS_ENDELLIPSIS,
+ dat->hwndTime = CreateWindowEx(WS_EX_NOPARENTNOTIFY, L"Static", NULL, WS_CHILD | WS_VISIBLE | SS_RIGHT | SS_NOTIFY | SS_ENDELLIPSIS,
(GetSystemMetrics(SM_CXICON) + 80), (GetSystemMetrics(SM_CXICON) / 2), 35, (GetSystemMetrics(SM_CXICON) / 2), hwndFrame, NULL, params->hInstance, NULL);
if (dat->hwndTime == NULL)
return -1; /* creation failed, calls WM_DESTROY */
@@ -223,9 +223,9 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP case M_REFRESH_COLORS:
COLORREF clrBar;
- if (FontService_GetColor(_T("Automatic shutdown"), _T("Progress bar"), &clrBar))
+ if (FontService_GetColor(L"Automatic shutdown", L"Progress bar", &clrBar))
clrBar = GetDefaultColor(FRAMEELEMENT_BAR);
- if (FontService_GetColor(_T("Automatic shutdown"), _T("Background"), &dat->clrBackground))
+ if (FontService_GetColor(L"Automatic shutdown", L"Background", &dat->clrBackground))
dat->clrBackground = GetDefaultColor(FRAMEELEMENT_BKGRND);
if (dat->hbrBackground != NULL) DeleteObject(dat->hbrBackground);
dat->hbrBackground = CreateSolidBrush(dat->clrBackground);
@@ -240,7 +240,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP case M_REFRESH_FONTS:
{
LOGFONT lf;
- if (!FontService_GetFont(_T("Automatic shutdown"), _T("Countdown on frame"), &dat->clrText, &lf)) {
+ if (!FontService_GetFont(L"Automatic shutdown", L"Countdown on frame", &dat->clrText, &lf)) {
if (dat->hFont != NULL) DeleteObject(dat->hFont);
dat->hFont = CreateFontIndirect(&lf);
}
@@ -468,7 +468,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame, UINT msg, WPARAM wParam, LP if (dat->fTimeFlags&SDWTF_ST_TIME)
GetFormatedDateTime(szTime, _countof(szTime), dat->settingLastTime, FALSE);
else GetFormatedCountdown(szTime, _countof(szTime), dat->countdown);
- mir_sntprintf(ttdi->szText, _T("%s %s"), (dat->fTimeFlags&SDWTF_ST_TIME) ? TranslateT("Shutdown at:") : TranslateT("Time left:"), szTime);
+ mir_sntprintf(ttdi->szText, L"%s %s", (dat->fTimeFlags&SDWTF_ST_TIME) ? TranslateT("Shutdown at:") : TranslateT("Time left:"), szTime);
ttdi->lpszText = ttdi->szText;
}
return 0;
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 33ade1ff2d..7a6dafb468 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -87,9 +87,9 @@ static BOOL IsShutdownTypeEnabled(BYTE shutdownType) DWORD dwSetting, dwSize;
/* NoLogOff is BINARY on Win9x/ME and DWORD on Win2000+ */
bReturn = TRUE;
- if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
+ if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
dwSize = sizeof(dwSetting);
- if (RegQueryValueEx(hKey, _T("NoLogOff"), 0, NULL, (LPBYTE)&dwSetting, &dwSize) == ERROR_SUCCESS)
+ if (RegQueryValueEx(hKey, L"NoLogOff", 0, NULL, (LPBYTE)&dwSetting, &dwSize) == ERROR_SUCCESS)
if (dwSetting) bReturn = FALSE;
RegCloseKey(hKey);
}
@@ -101,9 +101,9 @@ static BOOL IsShutdownTypeEnabled(BYTE shutdownType) DWORD dwSize, dwSetting;
/* DisableLockWorkstation is DWORD on Win2000+ */
bReturn = TRUE;
- if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
+ if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
dwSize = sizeof(dwSetting);
- if (!RegQueryValueEx(hKey, _T("DisableLockWorkstation"), 0, NULL, (LPBYTE)&dwSetting, &dwSize))
+ if (!RegQueryValueEx(hKey, L"DisableLockWorkstation", 0, NULL, (LPBYTE)&dwSetting, &dwSize))
if (dwSetting)
bReturn = FALSE;
RegCloseKey(hKey);
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index 73aed0d860..4433831a03 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -49,7 +49,7 @@ char* u2a(const WCHAR *pszUnicode) void TrimString(TCHAR *pszStr)
{
- TCHAR *psz, szChars[] = _T(" \r\n\t");
+ TCHAR *psz, szChars[] = L" \r\n\t";
for (int i = 0; i < _countof(szChars); ++i) {
/* trim end */
psz = &pszStr[mir_tstrlen(pszStr) - 1];
@@ -199,7 +199,7 @@ BOOL GetFormatedDateTime(TCHAR *pszOut, int nSize, time_t timestamp, BOOL fShowD return FALSE;
if (!GetDateFormat(locale, DATE_SHORTDATE, &st, NULL, szDate, _countof(szDate)))
return FALSE;
- mir_sntprintf(pszOut, nSize, _T("%s %s"), szTime, szDate);
+ mir_sntprintf(pszOut, nSize, L"%s %s", szTime, szDate);
return TRUE;
}
}
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index dc9d874f4e..481fea0fac 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -320,7 +320,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l TCHAR avfolder[MAX_PATH];
MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
GetContactFolder(avfolder, hContact);
- ShellExecute(NULL, db_get_b(NULL, MODULE_NAME, "OpenFolderMethod", 0) ? _T("explore") : _T("open"), avfolder, NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, db_get_b(NULL, MODULE_NAME, "OpenFolderMethod", 0) ? L"explore" : L"open", avfolder, NULL, NULL, SW_SHOWNORMAL);
return TRUE;
}
break;
@@ -374,7 +374,7 @@ int FillAvatarListFromFiles(HWND list, MCONTACT hContact) WIN32_FIND_DATA finddata;
GetContactFolder(dir, hContact);
- mir_sntprintf(path, _T("%s\\*.*"), dir);
+ mir_sntprintf(path, L"%s\\*.*", dir);
HANDLE hFind = FindFirstFile(path, &finddata);
if (hFind == INVALID_HANDLE_VALUE)
@@ -384,7 +384,7 @@ int FillAvatarListFromFiles(HWND list, MCONTACT hContact) {
if (finddata.cFileName[0] != '.')
{
- mir_sntprintf(path, _T("%s\\%s"), dir, finddata.cFileName);
+ mir_sntprintf(path, L"%s\\%s", dir, finddata.cFileName);
max_pos = AddFileToList(path,finddata.cFileName,finddata.cFileName,list);
}
}
@@ -401,7 +401,7 @@ int FillAvatarListFromFolder(HWND list, MCONTACT hContact) WIN32_FIND_DATA finddata;
GetContactFolder(dir, hContact);
- mir_sntprintf(path, _T("%s\\*.lnk"), dir);
+ mir_sntprintf(path, L"%s\\*.lnk", dir);
HANDLE hFind = FindFirstFile(path, &finddata);
if (hFind == INVALID_HANDLE_VALUE)
@@ -412,7 +412,7 @@ int FillAvatarListFromFolder(HWND list, MCONTACT hContact) if (finddata.cFileName[0] != '.')
{
TCHAR lnk[MAX_PATH];
- mir_sntprintf(lnk, _T("%s\\%s"), dir, finddata.cFileName);
+ mir_sntprintf(lnk, L"%s\\%s", dir, finddata.cFileName);
if (ResolveShortcut(lnk, path))
max_pos = AddFileToList(path,lnk,finddata.cFileName,list);
}
@@ -436,7 +436,7 @@ int FillAvatarListFromDB(HWND list, MCONTACT hContact) // Get time
TCHAR date[64];
- TimeZone_ToStringT(dbei.timestamp, _T("d s"), date, _countof(date));
+ TimeZone_ToStringT(dbei.timestamp, L"d s", date, _countof(date));
// Get file in disk
TCHAR path[MAX_PATH];
@@ -569,7 +569,7 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact) }
else
{
- ofn.lpstrInitialDir = _T(".");
+ ofn.lpstrInitialDir = L".";
}
if (GetSaveFileName(&ofn))
{
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index e12e54d4f2..3f833d86f0 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -120,7 +120,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) CONTACTAVATARCHANGEDNOTIFICATION* avatar = (CONTACTAVATARCHANGEDNOTIFICATION*)lParam;
if (avatar == NULL) {
- if (!ret || !mir_tstrcmp(dbvOldHash.ptszVal, _T("-"))) {
+ if (!ret || !mir_tstrcmp(dbvOldHash.ptszVal, L"-")) {
//avoid duplicate "removed avatar" notifications
//do not notify on an empty profile
ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Removed avatar, no avatar before... skipping"));
@@ -130,7 +130,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) SkinPlaySound("avatar_removed");
// Is a flash avatar or avs could not load it
- db_set_ts(hContact, MODULE_NAME, "AvatarHash", _T("-"));
+ db_set_ts(hContact, MODULE_NAME, "AvatarHash", L"-");
if (ContactEnabled(hContact, "AvatarPopups", AVH_DEF_AVPOPUPS) && opts.popup_show_removed)
ShowPopup(hContact, NULL, opts.popup_removed);
@@ -145,7 +145,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) SkinPlaySound("avatar_changed");
db_set_ts(hContact, "AvatarHistory", "AvatarHash", avatar->hash);
- TCHAR history_filename[MAX_PATH] = _T("");
+ TCHAR history_filename[MAX_PATH] = L"";
if (ContactEnabled(hContact, "LogToDisk", AVH_DEF_LOGTODISK)) {
if (!opts.log_store_as_hash) {
@@ -158,7 +158,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) MCONTACT hMetaContact = db_mc_getMeta(hContact);
if (hMetaContact && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) {
- TCHAR filename[MAX_PATH] = _T("");
+ TCHAR filename[MAX_PATH] = L"";
GetOldStyleAvatarName(filename, hMetaContact);
if (CopyImageFile(avatar->filename, filename))
@@ -188,7 +188,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) GetProtocolFolder(history_filename, proto);
mir_sntprintf(history_filename,
- _T("%s\\%s"), history_filename, hash);
+ L"%s\\%s", history_filename, hash);
if (CopyImageFile(avatar->filename, history_filename))
ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), history_filename);
@@ -236,10 +236,10 @@ static int PreShutdown(WPARAM, LPARAM) static int ModulesLoaded(WPARAM, LPARAM)
{
- mir_sntprintf(basedir, _T("%s\\Avatars History"), profilePath);
+ mir_sntprintf(basedir, L"%s\\Avatars History", profilePath);
hFolder = FoldersRegisterCustomPathT( LPGEN("Avatars"), LPGEN("Avatar History"),
- PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\Avatars History"));
+ PROFILE_PATHT L"\\" CURRENT_PROFILET L"\\Avatars History");
InitPopups();
@@ -344,7 +344,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_AVATARHISTORY_GET_CACHED_AVATAR, GetCachedAvatar);
if (CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath) != 0)
- mir_tstrcpy(profilePath, _T(".")); // Failed, use current dir
+ mir_tstrcpy(profilePath, L"."); // Failed, use current dir
SkinAddNewSoundExT("avatar_changed",LPGENT("Avatar History"),LPGENT("Contact changed avatar"));
SkinAddNewSoundExT("avatar_removed",LPGENT("Avatar History"),LPGENT("Contact removed avatar"));
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index fad3e5ad56..b0ad399afb 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -41,7 +41,7 @@ static LRESULT CALLBACK DumbPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, void InitPopups()
{
// window needed for popup commands
- hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MODULE_NAME) _T("_PopupWindow"),
+ hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MODULE_NAME) L"_PopupWindow",
0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP,
NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
@@ -57,7 +57,7 @@ void DeInitPopups() // Show an error popup
void ShowErrPopup(const TCHAR *description, const TCHAR *title)
{
- ShowPopupEx(NULL, title == NULL ? _T(MODULE_NAME) _T(" Error") : title, description,
+ ShowPopupEx(NULL, title == NULL ? _T(MODULE_NAME) L" Error" : title, description,
NULL, POPUP_TYPE_ERROR, NULL);
}
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 39b4db8534..c062534c32 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -79,12 +79,12 @@ void ConvertToFilename(TCHAR *str, size_t size) TCHAR* GetExtension(TCHAR *file)
{
- if (file == NULL) return _T("");
+ if (file == NULL) return L"";
TCHAR *ext = _tcsrchr(file, _T('.'));
if (ext != NULL)
ext++;
else
- ext = _T("");
+ ext = L"";
return ext;
}
@@ -104,7 +104,7 @@ TCHAR* GetProtocolFolder(TCHAR *fn, char *proto) if (proto == NULL)
proto = Translate("Unknown Protocol");
- mir_sntprintf(fn, MAX_PATH, _T("%s\\%S"), fn, proto);
+ mir_sntprintf(fn, MAX_PATH, L"%s\\%S", fn, proto);
CreateDirectoryTreeT(fn);
return fn;
}
@@ -118,13 +118,13 @@ TCHAR* GetContactFolder(TCHAR *fn, MCONTACT hContact) ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact, proto));
_tcsncpy_s(uin, (id == NULL) ? TranslateT("Unknown UIN") : id, _TRUNCATE);
ConvertToFilename(uin, MAX_PATH); //added so that weather id's like "yw/CI0000" work
- mir_sntprintf(fn, MAX_PATH, _T("%s\\%s"), fn, uin);
+ mir_sntprintf(fn, MAX_PATH, L"%s\\%s", fn, uin);
CreateDirectoryTreeT(fn);
#ifdef DBGPOPUPS
TCHAR log[1024];
- mir_sntprintf(log, _T("Path: %s\nProto: %S\nUIN: %s"), fn, proto, uin);
- ShowPopup(hContact, _T("AVH Debug: GetContactFolder"), log);
+ mir_sntprintf(log, L"Path: %s\nProto: %S\nUIN: %s", fn, proto, uin);
+ ShowPopup(hContact, L"AVH Debug: GetContactFolder", log);
#endif
return fn;
@@ -137,7 +137,7 @@ TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact) SYSTEMTIME curtime;
GetLocalTime(&curtime);
mir_sntprintf(fn, MAX_PATH,
- _T("%s\\%04d-%02d-%02d %02dh%02dm%02ds"), fn,
+ L"%s\\%04d-%02d-%02d %02dh%02dm%02ds", fn,
curtime.wYear, curtime.wMonth, curtime.wDay,
curtime.wHour, curtime.wMinute, curtime.wSecond);
ShowDebugPopup(hContact,TranslateT("AVH Debug: GetOldStyleAvatarName"),fn);
@@ -146,11 +146,11 @@ TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact) void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename)
{
- TCHAR shortcut[MAX_PATH] = _T("");
+ TCHAR shortcut[MAX_PATH] = L"";
GetOldStyleAvatarName(shortcut, hContact);
- mir_sntprintf(shortcut, _T("%s.%s.lnk"), shortcut,
+ mir_sntprintf(shortcut, L"%s.%s.lnk", shortcut,
GetExtension(history_filename));
if (!CreateShortcut(history_filename, shortcut))
@@ -166,21 +166,21 @@ void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename) BOOL CopyImageFile(TCHAR *old_file, TCHAR *new_file)
{
TCHAR *ext = GetExtension(old_file);
- mir_sntprintf(new_file, MAX_PATH, _T("%s.%s"), new_file, ext);
+ mir_sntprintf(new_file, MAX_PATH, L"%s.%s", new_file, ext);
return !CopyFile(old_file, new_file, TRUE);
}
TCHAR * GetCachedAvatar(char *proto, TCHAR *hash)
{
TCHAR *ret = NULL;
- TCHAR file[1024] = _T("");
- TCHAR search[1024] = _T("");
+ TCHAR file[1024] = L"";
+ TCHAR search[1024] = L"";
if (opts.log_keep_same_folder)
GetHistoryFolder(file);
else
GetProtocolFolder(file, proto);
- mir_sntprintf(search, _T("%s\\%s.*"), file, hash);
+ mir_sntprintf(search, L"%s\\%s.*", file, hash);
WIN32_FIND_DATA finddata;
HANDLE hFind = FindFirstFile(search, &finddata);
@@ -191,13 +191,13 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash) {
size_t len = mir_tstrlen(finddata.cFileName);
if (len > 4
- && (!mir_tstrcmpi(&finddata.cFileName[len-4], _T(".png"))
- || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".bmp"))
- || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".gif"))
- || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".jpg"))
- || !mir_tstrcmpi(&finddata.cFileName[len-5], _T(".jpeg"))))
+ && (!mir_tstrcmpi(&finddata.cFileName[len-4], L".png")
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], L".bmp")
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], L".gif")
+ || !mir_tstrcmpi(&finddata.cFileName[len-4], L".jpg")
+ || !mir_tstrcmpi(&finddata.cFileName[len-5], L".jpeg")))
{
- mir_sntprintf(file, _T("%s\\%s"), file, finddata.cFileName);
+ mir_sntprintf(file, L"%s\\%s", file, finddata.cFileName);
ret = mir_tstrdup(file);
break;
}
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 58113605e4..442c1cfe36 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -156,11 +156,11 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara systime.wYear = 2000;
systime.wMonth = 1;
systime.wDay = 1;
- SendDlgItemMessage(hwndDlg, IDC_TIME1, DTM_SETFORMAT, 0, (LPARAM)_T("HH:mm"));
+ SendDlgItemMessage(hwndDlg, IDC_TIME1, DTM_SETFORMAT, 0, (LPARAM)L"HH:mm");
SendDlgItemMessage(hwndDlg, IDC_TIME1, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&systime);
systime.wHour = HIBYTE(TimeWrd2);
systime.wMinute = LOBYTE(TimeWrd2);
- SendDlgItemMessage(hwndDlg, IDC_TIME2, DTM_SETFORMAT, 0, (LPARAM)_T("HH:mm"));
+ SendDlgItemMessage(hwndDlg, IDC_TIME2, DTM_SETFORMAT, 0, (LPARAM)L"HH:mm");
SendDlgItemMessage(hwndDlg, IDC_TIME2, DTM_SETSYSTEMTIME, GDT_VALID, (LPARAM)&systime);
}
@@ -358,14 +358,14 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR switch (msg) {
case WM_CREATE:
- hwndMute = CreateWindow(MIRANDABUTTONCLASS, _T(""), WS_CHILD | WS_VISIBLE, 1, 1, 16, 16, hwnd,
+ hwndMute = CreateWindow(MIRANDABUTTONCLASS, L"", WS_CHILD | WS_VISIBLE, 1, 1, 16, 16, hwnd,
0, (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
SendMessage(hwndMute, BUTTONSETASFLATBTN, 1, 0);
SendMessage(hwndMute, BUTTONSETCUSTOMPAINT, 0, (LPARAM)&fnPainter);
EnableFrameIcon(db_get_b(NULL, "Skin", "UseSound", 0) != 0);
- hwndSlider = CreateWindow(TRACKBAR_CLASS, _T(""), WS_CHILD | WS_VISIBLE | TBS_NOTICKS | TBS_TOOLTIPS, 21, 1, 100, 20,
+ hwndSlider = CreateWindow(TRACKBAR_CLASS, L"", WS_CHILD | WS_VISIBLE | TBS_NOTICKS | TBS_TOOLTIPS, 21, 1, 100, 20,
hwnd, (HMENU)0, (HINSTANCE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE), NULL);
SendMessage(hwndSlider, TBM_SETRANGE, FALSE, MAKELONG(SLIDER_MIN, SLIDER_MAX));
SendMessage(hwndSlider, TBM_SETPOS, TRUE, Volume);
@@ -448,10 +448,10 @@ void CreateFrame() wndclass.lpfnWndProc = FrameWindowProc;
wndclass.hInstance = hInst;
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.lpszClassName = _T("BassInterfaceFrame");
+ wndclass.lpszClassName = L"BassInterfaceFrame";
RegisterClass(&wndclass);
- hwnd_plugin = CreateWindow(_T("BassInterfaceFrame"), TranslateT("Bass Interface"),
+ hwnd_plugin = CreateWindow(L"BassInterfaceFrame", TranslateT("Bass Interface"),
WS_CHILD | WS_CLIPCHILDREN, 0, 0, 10, 10, pcli->hwndContactList, NULL, hInst, NULL);
CLISTFrame Frame = { sizeof(CLISTFrame) };
@@ -525,8 +525,8 @@ void LoadBassLibrary(const TCHAR *ptszPath) int OnFoldersChanged(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, _T(""));
- mir_tstrcat(CurrBassPath, _T("\\bass.dll"));
+ FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, L"");
+ mir_tstrcat(CurrBassPath, L"\\bass.dll");
if (hBass != NULL) {
BASS_Free();
@@ -542,14 +542,14 @@ int OnFoldersChanged(WPARAM, LPARAM) int OnModulesLoaded(WPARAM, LPARAM)
{
- if (hBASSFolder = FoldersRegisterCustomPathT(LPGEN("Bass Interface"), LPGEN("Bass library"), PLUGINS_PATHT _T("\\Bass"))) {
- FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, _T(""));
- mir_tstrcat(CurrBassPath, _T("\\bass.dll"));
+ if (hBASSFolder = FoldersRegisterCustomPathT(LPGEN("Bass Interface"), LPGEN("Bass library"), PLUGINS_PATHT L"\\Bass")) {
+ FoldersGetCustomPathT(hBASSFolder, CurrBassPath, MAX_PATH, L"");
+ mir_tstrcat(CurrBassPath, L"\\bass.dll");
}
else {
DBVARIANT dbv;
if (db_get_ts(NULL, ModuleName, OPT_BASSPATH, &dbv)) {
- mir_tstrncpy(CurrBassPath, VARST(_T("Plugins\\Bass\\bass.dll")), _countof(CurrBassPath));
+ mir_tstrncpy(CurrBassPath, VARST(L"Plugins\\Bass\\bass.dll"), _countof(CurrBassPath));
db_set_ts(NULL, ModuleName, OPT_BASSPATH, CurrBassPath);
}
else {
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index ade10d4592..512c21ee8c 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -207,12 +207,12 @@ int ModulesLoaded(WPARAM, LPARAM) TCHAR ftpExe[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL, SHGFP_TYPE_CURRENT, ftpExe))) {
- _tcscat_s(ftpExe, _T("\\WinSCP\\WinSCP.exe"));
+ _tcscat_s(ftpExe, L"\\WinSCP\\WinSCP.exe");
DWORD atr = GetFileAttributes(ftpExe);
if (atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY) {
#ifdef _WIN64
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILESX86, NULL, SHGFP_TYPE_CURRENT, ftpExe))) {
- _tcscat_s(ftpExe, _T("\\WinSCP\\WinSCP.exe"));
+ _tcscat_s(ftpExe, L"\\WinSCP\\WinSCP.exe");
atr = GetFileAttributes(ftpExe);
if (!(atr == INVALID_FILE_ATTRIBUTES || atr & FILE_ATTRIBUTE_DIRECTORY))
Options::instance->ftpExePathDef = ftpExe;
@@ -222,7 +222,7 @@ int ModulesLoaded(WPARAM, LPARAM) else Options::instance->ftpExePathDef = ftpExe;
}
- TCHAR *log = _T("%miranda_logpath%\\BasicHistory\\ftplog.txt");
+ TCHAR *log = L"%miranda_logpath%\\BasicHistory\\ftplog.txt";
TCHAR *logAbsolute = Utils_ReplaceVarsT(log);
Options::instance->ftpLogPath = logAbsolute;
mir_free(logAbsolute);
diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 974ac83b7b..94d92c5f1d 100644 --- a/plugins/BasicHistory/src/BinaryExport.h +++ b/plugins/BasicHistory/src/BinaryExport.h @@ -27,7 +27,7 @@ class BinaryExport : public:
virtual const TCHAR* GetExt()
{
- return _T("bin");
+ return L"bin";
}
virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding);
diff --git a/plugins/BasicHistory/src/DatExport.h b/plugins/BasicHistory/src/DatExport.h index 745626d02b..efe071c0ac 100644 --- a/plugins/BasicHistory/src/DatExport.h +++ b/plugins/BasicHistory/src/DatExport.h @@ -27,7 +27,7 @@ class DatExport : public:
virtual const TCHAR* GetExt()
{
- return _T("dat");
+ return L"dat";
}
virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 22c9122f11..c2ced6267e 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -366,7 +366,7 @@ void HistoryEventList::AddGroup(const EventIndex& ev) TCHAR eventText[256];
int i;
eventText[0] = 0;
- TimeZone_PrintTimeStamp(NULL, data.timestamp, _T("d t"), eventText, 64, 0);
+ TimeZone_PrintTimeStamp(NULL, data.timestamp, L"d t", eventText, 64, 0);
std::wstring time = eventText;
std::wstring user;
if (data.isMe)
@@ -600,7 +600,7 @@ void HistoryEventList::AddImporter(MCONTACT hContact, IImport::ImportType type, mir_cslock lck(csEventList);
TCHAR buf[32];
- mir_sntprintf(buf, _T("%016llx"), (unsigned long long int)hContact);
+ mir_sntprintf(buf, L"%016llx", (unsigned long long int)hContact);
ImportDiscData data;
data.file = m_contactFileDir + buf;
data.type = type;
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 35aa7045e6..d783fde17f 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -43,12 +43,12 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) extUpper[0] = std::toupper(ext[0], loc);
mir_sntprintf(filter, TranslateT("%s Files (*.%s)"), extUpper, ext);
size_t len = mir_tstrlen(filter) + 1;
- mir_sntprintf(filter + len, _countof(filter) - len, _T("*.%s"), ext);
+ mir_sntprintf(filter + len, _countof(filter) - len, L"*.%s", ext);
len += mir_tstrlen(filter + len);
filter[++len] = 0;
TCHAR stzFilePath[1024];
_tcscpy_s(stzFilePath, TranslateT("History"));
- _tcscat_s(stzFilePath, _T("."));
+ _tcscat_s(stzFilePath, L".");
_tcscat_s(stzFilePath, ext);
len = mir_tstrlen(stzFilePath) + 1;
stzFilePath[len] = 0;
@@ -77,7 +77,7 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) std::wstring ReplaceExt(const std::wstring& file, const TCHAR* ext)
{
- size_t pos = file.find(_T("<ext>"));
+ size_t pos = file.find(L"<ext>");
if (pos < file.length()) {
std::wstring fileName = file.substr(0, pos);
fileName += ext;
@@ -312,12 +312,12 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst if (GetEventData(hDbEvent, data)) {
lastMe = data.isMe;
- TCHAR* formatDate = Options::instance->messagesShowSec ? _T("d s") : _T("d t");
- TCHAR* longFormatDate = Options::instance->messagesShowSec ? _T("d s") : _T("d t");
+ TCHAR* formatDate = Options::instance->messagesShowSec ? L"d s" : L"d t";
+ TCHAR* longFormatDate = Options::instance->messagesShowSec ? L"d s" : L"d t";
if (!Options::instance->messagesShowDate) {
if (isFirst) {
isFirst = false;
- formatDate = Options::instance->messagesShowSec ? _T("s") : _T("t");
+ formatDate = Options::instance->messagesShowSec ? L"s" : L"t";
time_t tt = data.timestamp;
localtime_s(&lastTime, &tt);
}
@@ -326,7 +326,7 @@ void ExportManager::AddGroup(bool isMe, const std::wstring &time, const std::wst tm t;
localtime_s(&t, &tt);
if (lastTime.tm_yday == t.tm_yday && lastTime.tm_year == t.tm_year)
- formatDate = Options::instance->messagesShowSec ? _T("s") : _T("t");
+ formatDate = Options::instance->messagesShowSec ? L"s" : L"t";
}
}
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 8cc82337da..ecfe7e8e2b 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1043,7 +1043,7 @@ void HistoryWindow::Initialise() LVCOLUMN col = { 0 };
col.mask = LVCF_WIDTH | LVCF_TEXT;
col.cx = 470;
- col.pszText = _T("");
+ col.pszText = L"";
ListView_InsertColumn(listWindow, 0, &col);
ListView_SetColumnWidth(listWindow, 0, LVSCW_AUTOSIZE_USEHEADER);
ListView_SetExtendedListViewStyleEx(listWindow, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
@@ -1233,13 +1233,13 @@ void HistoryWindow::AddGroup(bool, const std::wstring &time, const std::wstring if (Options::instance->groupShowName) {
if (msg[0] != 0)
- _tcscat_s(msg, _T(" "));
+ _tcscat_s(msg, L" ");
_tcscat_s(msg, user.c_str());
}
if (Options::instance->groupShowMessage) {
if (msg[0] != 0)
- _tcscat_s(msg, _T(" "));
+ _tcscat_s(msg, L" ");
_tcscat_s(msg, eventText.c_str());
}
@@ -1289,7 +1289,7 @@ void SetFontFromOptions(ITextFont *TextFont, int caps, Options::Fonts fontId) void HistoryWindow::SelectEventGroup(int sel)
{
- SetWindowText(editWindow, _T(""));
+ SetWindowText(editWindow, L"");
currentGroup.clear();
selected = sel;
if (sel < 0 || sel >= (int)m_eventList.size())
@@ -1360,11 +1360,11 @@ void HistoryWindow::SelectEventGroup(int sel) ImageDataObject::InsertIcon(RichEditOle, ico, backColor, 16, 16);
}
- TCHAR* formatDate = Options::instance->messagesShowSec ? (isUser ? _T("d s ") : _T("d s\n")) : (isUser ? _T("d t ") : _T("d t\n"));
+ TCHAR* formatDate = Options::instance->messagesShowSec ? (isUser ? L"d s " : L"d s\n") : (isUser ? L"d t " : L"d t\n");
if (!Options::instance->messagesShowDate) {
if (isFirst) {
isFirst = false;
- formatDate = Options::instance->messagesShowSec ? (isUser ? _T("s ") : _T("s\n")) : (isUser ? _T("t ") : _T("t\n"));
+ formatDate = Options::instance->messagesShowSec ? (isUser ? L"s " : L"s\n") : (isUser ? L"t " : L"t\n");
time_t tt = data.timestamp;
localtime_s(&lastTime, &tt);
}
@@ -1373,7 +1373,7 @@ void HistoryWindow::SelectEventGroup(int sel) tm t;
localtime_s(&t, &tt);
if (lastTime.tm_yday == t.tm_yday && lastTime.tm_year == t.tm_year)
- formatDate = Options::instance->messagesShowSec ? (isUser ? _T("s ") : _T("s\n")) : (isUser ? _T("t ") : _T("t\n"));
+ formatDate = Options::instance->messagesShowSec ? (isUser ? L"s " : L"s\n") : (isUser ? L"t " : L"t\n");
}
}
@@ -1387,7 +1387,7 @@ void HistoryWindow::SelectEventGroup(int sel) TextFont->Release();
if (isUser) {
- mir_sntprintf(str, MAXSELECTSTR, _T("%s\n"), (lastMe) ? m_myName : m_contactName);
+ mir_sntprintf(str, MAXSELECTSTR, L"%s\n", (lastMe) ? m_myName : m_contactName);
*strLen = (unsigned int)mir_tstrlen(str) * sizeof(TCHAR);
TextSelection->SetStart(MAXLONG);
TextSelection->GetFont(&TextFont);
@@ -2031,18 +2031,18 @@ void HistoryWindow::FormatQuote(std::wstring "e, const MessageData &md, cons else
quote += m_contactName;
TCHAR str[32];
- TimeZone_PrintTimeStamp(NULL, md.timestamp, _T("d t"), str, 32, 0);
- quote += _T(", ");
+ TimeZone_PrintTimeStamp(NULL, md.timestamp, L"d t", str, 32, 0);
+ quote += L", ";
quote += str;
- quote += _T("\n");
+ quote += L"\n";
int f = 0;
do {
- int nf = (int)msg.find_first_of(_T("\r\n"), f);
+ int nf = (int)msg.find_first_of(L"\r\n", f);
if (nf >= 0 && nf < (int)msg.length()) {
if (nf - f >= 0) {
- quote += _T(">");
+ quote += L">";
quote += msg.substr(f, nf - f);
- quote += _T("\n");
+ quote += L"\n";
}
f = nf + 1;
@@ -2050,9 +2050,9 @@ void HistoryWindow::FormatQuote(std::wstring "e, const MessageData &md, cons ++f;
}
else if (msg.length() - f > 0) {
- quote += _T(">");
+ quote += L">";
quote += msg.substr(f, msg.length() - f);
- quote += _T("\n");
+ quote += L"\n";
f = -1;
}
else f = -1;
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 8a795f769e..d464b4299c 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -49,27 +49,27 @@ struct TCpTable { TCHAR *cpName;
}
cpTable[] = {
- { CP_UTF8, _T("UTF-8") },
- { 1250, _T("windows-1250") },
- { 1251, _T("windows-1251") },
- { 1252, _T("windows-1252") },
- { 1253, _T("windows-1253") },
- { 1254, _T("windows-1254") },
- { 1255, _T("windows-1255") },
- { 1256, _T("windows-1256") },
- { 1257, _T("windows-1257") },
- { 1258, _T("windows-1258") },
- { 28591, _T("iso-8859-1") },
- { 28592, _T("iso-8859-2") },
- { 28593, _T("iso-8859-3") },
- { 28594, _T("iso-8859-4") },
- { 28595, _T("iso-8859-5") },
- { 28596, _T("iso-8859-6") },
- { 28597, _T("iso-8859-7") },
- { 28598, _T("iso-8859-8") },
- { 28599, _T("iso-8859-9") },
- { 28603, _T("iso-8859-13") },
- { 28605, _T("iso-8859-15") },
+ { CP_UTF8, L"UTF-8" },
+ { 1250, L"windows-1250" },
+ { 1251, L"windows-1251" },
+ { 1252, L"windows-1252" },
+ { 1253, L"windows-1253" },
+ { 1254, L"windows-1254" },
+ { 1255, L"windows-1255" },
+ { 1256, L"windows-1256" },
+ { 1257, L"windows-1257" },
+ { 1258, L"windows-1258" },
+ { 28591, L"iso-8859-1" },
+ { 28592, L"iso-8859-2" },
+ { 28593, L"iso-8859-3" },
+ { 28594, L"iso-8859-4" },
+ { 28595, L"iso-8859-5" },
+ { 28596, L"iso-8859-6" },
+ { 28597, L"iso-8859-7" },
+ { 28598, L"iso-8859-8" },
+ { 28599, L"iso-8859-9" },
+ { 28603, L"iso-8859-13" },
+ { 28605, L"iso-8859-15" },
};
Options::Options()
@@ -105,9 +105,9 @@ Options::Options() codepageTxt = CP_UTF8;
codepageHtml1 = CP_UTF8;
codepageHtml2 = CP_UTF8;
- encodingTxt = _T("UTF-8");
- encodingHtml1 = _T("UTF-8");
- encodingHtml2 = _T("UTF-8");
+ encodingTxt = L"UTF-8";
+ encodingHtml1 = L"UTF-8";
+ encodingHtml2 = L"UTF-8";
exportHtml1ShowDate = true;
exportHtml2ShowDate = false;
exportHtml2UseSmileys = true;
@@ -182,14 +182,14 @@ struct HotkeyOptionsList { };
static FontOptionsList g_FontOptionsList[] = {
- {LPGENT(">> Outgoing timestamp"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
- {LPGENT("<< Incoming timestamp"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
- {LPGENT(">> Outgoing name"), RGB(100,100,100), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
- {LPGENT("<< Incoming name"), RGB(90,160,90), _T("MS Shell Dlg 2"), DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
- {LPGENT(">> Outgoing messages"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
- {LPGENT("<< Incoming messages"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
- {LPGENT("Group list"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Group list background"), FIDF_DISABLESTYLES},
- {LPGENT("Find window"), RGB(0, 0, 0), _T("MS Shell Dlg 2"), 0, -11, LPGENT("Find window background"), FIDF_DISABLESTYLES},
+ {LPGENT(">> Outgoing timestamp"), RGB(0, 0, 0), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
+ {LPGENT("<< Incoming timestamp"), RGB(0, 0, 0), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
+ {LPGENT(">> Outgoing name"), RGB(100,100,100), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
+ {LPGENT("<< Incoming name"), RGB(90,160,90), L"MS Shell Dlg 2", DBFONTF_BOLD, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
+ {LPGENT(">> Outgoing messages"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Outgoing background"), FIDF_ALLOWEFFECTS},
+ {LPGENT("<< Incoming messages"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Incoming background"), FIDF_ALLOWEFFECTS},
+ {LPGENT("Group list"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Group list background"), FIDF_DISABLESTYLES},
+ {LPGENT("Find window"), RGB(0, 0, 0), L"MS Shell Dlg 2", 0, -11, LPGENT("Find window background"), FIDF_DISABLESTYLES},
};
static ColorOptionsList g_ColorOptionsList[] = {
@@ -238,7 +238,7 @@ void Options::Load(void) cid.cbSize = sizeof(ColourIDT);
hid.cbSize = sizeof(HOTKEYDESC);
strncpy_s(fid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE);
- _tcsncpy_s(fid.backgroundGroup, _T("History"), _TRUNCATE);
+ _tcsncpy_s(fid.backgroundGroup, L"History", _TRUNCATE);
_tcsncpy_s(fid.group, LPGENT("History"), _TRUNCATE);
for (int i = 0; i < g_fontsSize; ++i) {
fid.order = i;
@@ -369,19 +369,19 @@ void Options::Load(void) encodingTxt = encodingV.pwszVal;
db_free(&encodingV);
}
- else encodingTxt = _T("UTF-8");
+ else encodingTxt = L"UTF-8";
if (!db_get_ws(0, MODULE, "encodingHtml1", &encodingV)) {
encodingHtml1 = encodingV.pwszVal;
db_free(&encodingV);
}
- else encodingHtml1 = _T("UTF-8");
+ else encodingHtml1 = L"UTF-8";
if (!db_get_ws(0, MODULE, "encodingHtml2", &encodingV)) {
encodingHtml2 = encodingV.pwszVal;
db_free(&encodingV);
}
- else encodingHtml2 = _T("UTF-8");
+ else encodingHtml2 = L"UTF-8";
exportHtml1ShowDate = db_get_b(0, MODULE, "exportHtml1ShowDate", 1) ? true : false;
exportHtml2ShowDate = db_get_b(0, MODULE, "exportHtml2ShowDate", 0) ? true : false;
@@ -390,7 +390,7 @@ void Options::Load(void) extCssHtml2 = encodingV.pwszVal;
db_free(&encodingV);
}
- else extCssHtml2 = _T("");
+ else extCssHtml2 = L"";
if (!db_get_ws(0, MODULE, "ftpLogPath", &encodingV)) {
ftpLogPath = encodingV.pwszVal;
@@ -722,7 +722,7 @@ void SetEventCB(HWND hwndCB, int eventId) if (selCpIdx == -1) {
TCHAR buf[24];
- mir_sntprintf(buf, _T("%d"), eventId);
+ mir_sntprintf(buf, L"%d", eventId);
ComboBox_SetText(hwndCB, buf);
}
else ComboBox_SetCurSel(hwndCB, selCpIdx);
@@ -777,7 +777,7 @@ void ReloadEventLB(HWND hwndLB, const FilterOptions &sel) if (selCpIdx == -1) {
TCHAR buf[24];
- mir_sntprintf(buf, _T("%d"), *it);
+ mir_sntprintf(buf, L"%d", *it);
ListBox_AddString(hwndLB, buf);
}
else ListBox_AddString(hwndLB, TranslateTS(EventNames[selCpIdx].name));
@@ -807,11 +807,11 @@ bool OpenFileDlg(HWND hwndDlg, HWND hwndEdit, const TCHAR* defName, const TCHAR* extUpper[0] = std::toupper(ext[0], loc);
mir_sntprintf(filter, TranslateT("%s Files (*.%s)"), extUpper, ext);
size_t len = mir_tstrlen(filter) + 1;
- mir_sntprintf(filter + len, _countof(filter) - len, _T("*.%s"), ext);
+ mir_sntprintf(filter + len, _countof(filter) - len, L"*.%s", ext);
len += mir_tstrlen(filter + len) + 1;
_tcscpy_s(filter + len, 1024 - len, TranslateT("All Files (*.*)"));
len += mir_tstrlen(filter + len) + 1;
- _tcscpy_s(filter + len, 1024 - len, _T("*.*"));
+ _tcscpy_s(filter + len, 1024 - len, L"*.*");
len += mir_tstrlen(filter + len) + 1;
filter[len] = 0;
TCHAR stzFilePath[1024];
@@ -1042,12 +1042,12 @@ INT_PTR CALLBACK Options::DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_WINSCP_BROWSE:
- if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCP), _T("WinSCP.exe"), _T("exe"), TranslateT("Browse WinSCP file"), true))
+ if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCP), L"WinSCP.exe", L"exe", TranslateT("Browse WinSCP file"), true))
return TRUE;
break;
case IDC_WINSCPLOG_BROWSE:
- if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCPLOG), _T("ftplog.txt"), _T("txt"), TranslateT("Save WinSCP log file"), false))
+ if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_WINSCPLOG), L"ftplog.txt", L"txt", TranslateT("Save WinSCP log file"), false))
return TRUE;
break;
}
@@ -1283,7 +1283,7 @@ void InitCodepageCB(HWND hwndCB, unsigned int codepage, const std::wstring& name if (selCpIdx == -1) {
TCHAR buf[300];
- mir_sntprintf(buf, _T("%d;%s"), codepage, name.c_str());
+ mir_sntprintf(buf, L"%d;%s", codepage, name.c_str());
ComboBox_SetText(hwndCB, buf);
}
else ComboBox_SetCurSel(hwndCB, selCpIdx);
@@ -1298,7 +1298,7 @@ unsigned int GetCodepageCB(HWND hwndCB, bool errorReport, unsigned int, const st TCHAR text[128];
ComboBox_GetText(hwndCB, text, 128);
std::wstring str = text;
- name = _T("");
+ name = L"";
size_t pos = str.find_first_of(_T(';'));
if (pos < str.length()) {
text[pos] = 0;
@@ -1362,7 +1362,7 @@ INT_PTR CALLBACK Options::DlgProcOptsExport(HWND hwndDlg, UINT msg, WPARAM wPara EnableWindow(GetDlgItem(hwndDlg, IDC_CSS_BROWSE), en);
}
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_CSS_BROWSE) {
- if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), _T(""), _T("css"), TranslateT("Browse CSS file"), true))
+ if (!OpenFileDlg(hwndDlg, GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), L"", L"css", TranslateT("Browse CSS file"), true))
return TRUE;
}
@@ -1403,7 +1403,7 @@ INT_PTR CALLBACK Options::DlgProcOptsExport(HWND hwndDlg, UINT msg, WPARAM wPara Edit_GetText(GetDlgItem(hwndDlg, IDC_HTML2EXTCSSFILE), buf, MAX_PATH);
instance->extCssHtml2 = buf;
}
- else instance->extCssHtml2 = _T("");
+ else instance->extCssHtml2 = L"";
instance->codepageTxt = cp1;
instance->encodingTxt = newName1;
@@ -1701,7 +1701,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, TCHAR sep = _T(':');
if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, timeFormat, 10) > 0)
sep = timeFormat[0];
- mir_sntprintf(timeFormat, _T("HH%cmm"), sep);
+ mir_sntprintf(timeFormat, L"HH%cmm", sep);
}
SYSTEMTIME st;
@@ -1881,7 +1881,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, str = TranslateT("* Use negative values to filter younger events");
else {
str = TranslateT("* Use negative values to filter younger events");
- str += _T("\n");
+ str += L"\n";
str += TranslateT("** Use <date> to insert date, <ext> to insert extension, <contact> to insert contact name");
}
diff --git a/plugins/BasicHistory/src/Options.h b/plugins/BasicHistory/src/Options.h index 8fa778850e..e74c81ff33 100644 --- a/plugins/BasicHistory/src/Options.h +++ b/plugins/BasicHistory/src/Options.h @@ -118,11 +118,11 @@ struct TaskOptions if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, buf)))
{
filePath = buf;
- filePath += _T("\\");
+ filePath += L"\\";
}
filePath += TranslateT("History");
- filePath += _T("_<contact>_<date>.<ext>");
+ filePath += L"_<contact>_<date>.<ext>";
lastExport = time(NULL);
}
};
diff --git a/plugins/BasicHistory/src/PlainHtmlExport.cpp b/plugins/BasicHistory/src/PlainHtmlExport.cpp index b2f4d9b1a8..c98386a056 100644 --- a/plugins/BasicHistory/src/PlainHtmlExport.cpp +++ b/plugins/BasicHistory/src/PlainHtmlExport.cpp @@ -30,69 +30,69 @@ extern std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl); void PlainHtmlExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring& encoding)
{
- EXP_FILE << _T("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
- EXP_FILE << _T("<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=") << encoding << _T("\">\n");
- EXP_FILE << _T("<title>") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]</title>\n");
- EXP_FILE << _T("<style type=\"text/css\"><!--\n");
- EXP_FILE << _T("h3 { color: #666666; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 16pt; }\n");
- EXP_FILE << _T("h4 { text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14pt; }\n");
- EXP_FILE << _T("h6 { font-weight: normal; color: #000000; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 8pt; }\n");
- EXP_FILE << _T(".mes { border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px;border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #666666; border-bottom-color: #666666; padding: 4px; color: #000000; font: normal normal normal 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".text { clear: both; }\n");
- EXP_FILE << _T(".nick { float: left; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".date { float: right; clear: right; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n");
- EXP_FILE << _T(".url { color: #0000FF; }\n");
- EXP_FILE << _T(".nick#inc { color: #C83F6B; }\n");
- EXP_FILE << _T(".nick#out { color: #0860BD; }\n");
- EXP_FILE << _T(".date#inc { color: #000000; }\n");
- EXP_FILE << _T(".date#out { color: #000000; }\n");
- EXP_FILE << _T(".mes#event0 { background-color: #DBDBDB; }\n");
- EXP_FILE << _T(".mes#event1 { background-color: #EEEEEE; }\n");
- EXP_FILE << _T(".mes#event2 { background-color: #CCD9F4; }\n");
- EXP_FILE << _T(".mes#session { background-color: #FFFDD7; }\n");
- EXP_FILE << _T("--></style>\n</head><body>\n<h4>") << TranslateT("History Log") << _T("</h4>\n<h3>");
+ EXP_FILE << L"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
+ EXP_FILE << L"<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" << encoding << L"\">\n";
+ EXP_FILE << L"<title>" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]</title>\n";
+ EXP_FILE << L"<style type=\"text/css\"><!--\n";
+ EXP_FILE << L"h3 { color: #666666; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 16pt; }\n";
+ EXP_FILE << L"h4 { text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14pt; }\n";
+ EXP_FILE << L"h6 { font-weight: normal; color: #000000; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 8pt; }\n";
+ EXP_FILE << L".mes { border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px;border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #666666; border-bottom-color: #666666; padding: 4px; color: #000000; font: normal normal normal 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".text { clear: both; }\n";
+ EXP_FILE << L".nick { float: left; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".date { float: right; clear: right; font: normal normal bold 8pt normal Tahoma, Tahoma, Verdana, Arial, sans-serif; text-decoration: none; }\n";
+ EXP_FILE << L".url { color: #0000FF; }\n";
+ EXP_FILE << L".nick#inc { color: #C83F6B; }\n";
+ EXP_FILE << L".nick#out { color: #0860BD; }\n";
+ EXP_FILE << L".date#inc { color: #000000; }\n";
+ EXP_FILE << L".date#out { color: #000000; }\n";
+ EXP_FILE << L".mes#event0 { background-color: #DBDBDB; }\n";
+ EXP_FILE << L".mes#event1 { background-color: #EEEEEE; }\n";
+ EXP_FILE << L".mes#event2 { background-color: #CCD9F4; }\n";
+ EXP_FILE << L".mes#session { background-color: #FFFDD7; }\n";
+ EXP_FILE << L"--></style>\n</head><body>\n<h4>" << TranslateT("History Log") << L"</h4>\n<h3>";
EXP_FILE << MakeTextHtmled(myName);
if (proto1.length() || myId.length())
- EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(myId) << _T(") - ");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(myId) << L") - ";
else
- EXP_FILE << _T(" - ");
+ EXP_FILE << L" - ";
EXP_FILE << MakeTextHtmled(name1);
if (proto1.length() || id1.length())
- EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(id1) << _T(")</h3>\n");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")</h3>\n";
else
- EXP_FILE << _T("</h3>\n");
+ EXP_FILE << L"</h3>\n";
- EXP_FILE << _T("<h6>") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("</h6>\n");
+ EXP_FILE << L"<h6>" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"</h6>\n";
}
void PlainHtmlExport::WriteFooter()
{
- EXP_FILE << _T("<div class=mes></div>\n</body></html>\n");
+ EXP_FILE << L"<div class=mes></div>\n</body></html>\n";
}
void PlainHtmlExport::WriteGroup(bool, const std::wstring &time, const std::wstring&, const std::wstring&)
{
TCHAR buf[256];
- EXP_FILE << _T("<div class=mes id=session>\n");
+ EXP_FILE << L"<div class=mes id=session>\n";
mir_sntprintf(buf, TranslateT("Conversation started at %s"), time.c_str());
- EXP_FILE << _T("<div class=text>") << buf << _T("</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"<div class=text>" << buf << L"</div>\n";
+ EXP_FILE << L"</div>\n";
}
void PlainHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&)
{
- TCHAR *id = isMe ? _T("out") : _T("inc");
- TCHAR* ev = (isMe ? _T("1") : _T("0"));
+ TCHAR *id = isMe ? L"out" : L"inc";
+ TCHAR* ev = (isMe ? L"1" : L"0");
bool isUrl = false;
std::wstring mes = UrlHighlightHtml(MakeTextHtmled(message), isUrl);
if (isUrl)
- ev = _T("2");
- EXP_FILE << _T("<div class=mes id=event") << ev << _T(">\n");
- EXP_FILE << _T("<div class=nick id=") << id << _T(">") << MakeTextHtmled(user) << _T(":</div>\n");
- EXP_FILE << _T("<div class=date id=") << id << _T(">") << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << _T("</div>\n");
- EXP_FILE << _T("<div class=text>\n");
+ ev = L"2";
+ EXP_FILE << L"<div class=mes id=event" << ev << L">\n";
+ EXP_FILE << L"<div class=nick id=" << id << L">" << MakeTextHtmled(user) << L":</div>\n";
+ EXP_FILE << L"<div class=date id=" << id << L">" << (Options::instance->exportHtml1ShowDate ? longDate : shortDate) << L"</div>\n";
+ EXP_FILE << L"<div class=text>\n";
EXP_FILE << mes;
- EXP_FILE << _T("\n</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"\n</div>\n";
+ EXP_FILE << L"</div>\n";
}
diff --git a/plugins/BasicHistory/src/PlainHtmlExport.h b/plugins/BasicHistory/src/PlainHtmlExport.h index bb1c971ea3..122e82d808 100644 --- a/plugins/BasicHistory/src/PlainHtmlExport.h +++ b/plugins/BasicHistory/src/PlainHtmlExport.h @@ -24,7 +24,7 @@ class PlainHtmlExport : public:
virtual const TCHAR* GetExt()
{
- return _T("html");
+ return L"html";
}
virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding);
diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index 5301e76b9d..5b030b5721 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -32,7 +32,7 @@ extern bool g_SmileyAddAvail; std::wstring MakeTextHtmled(const std::wstring& message, std::queue<std::pair<size_t, size_t> >* positionMap = NULL)
{
std::wstring ret;
- std::wstring search = _T("&<>\t\r\n");
+ std::wstring search = L"&<>\t\r\n";
size_t start = 0;
size_t find;
size_t currentAdd = 0;
@@ -40,19 +40,19 @@ std::wstring MakeTextHtmled(const std::wstring& message, std::queue<std::pair<si ret += message.substr(start, find - start);
switch(message[find]) {
case _T('&'):
- ret += _T("&");
+ ret += L"&";
break;
case _T('<'):
- ret += _T("<");
+ ret += L"<";
break;
case _T('>'):
- ret += _T(">");
+ ret += L">";
break;
case _T('\t'):
- ret += _T(" ");
+ ret += L" ";
break;
case _T('\n'):
- ret += _T("<br>");
+ ret += L"<br>";
break;
}
@@ -73,8 +73,8 @@ std::wstring MakeTextHtmled(const std::wstring& message, std::queue<std::pair<si std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl)
{
std::wstring ret;
- std::wstring htmlStop = _T("\'\" []<>\r\n");
- std::wstring search = _T("://");
+ std::wstring htmlStop = L"\'\" []<>\r\n";
+ std::wstring search = L"://";
size_t start = 0;
size_t find;
while((find = message.find(search, start)) < message.length()) {
@@ -88,8 +88,8 @@ std::wstring UrlHighlightHtml(const std::wstring& message, bool& isUrl) ret += message.substr(start, (urlStart + 1) - start);
std::wstring url = message.substr(urlStart + 1, urlEnd - urlStart - 1);
start = urlEnd;
- ret += _T("<a class=url target=_blank href=\"");
- ret += url + _T("\">") + url + _T("</a>");
+ ret += L"<a class=url target=_blank href=\"";
+ ret += url + L"\">" + url + L"</a>";
isUrl = true;
}
else {
@@ -288,116 +288,116 @@ void RichHtmlExport::WriteHeader(const std::wstring &fileName, const std::wstrin folderName = GetName(folder);
DeleteDirectory(folder.c_str());
CreateDirectory(folder.c_str(), NULL);
- std::wstring css = folder + _T("\\history.css");
+ std::wstring css = folder + L"\\history.css";
BOOL cssCopied = FALSE;
if (!Options::instance->extCssHtml2.empty())
cssCopied = CopyFile(Options::instance->extCssHtml2.c_str(), css.c_str(), FALSE);
if (!cssCopied)
ExtractFile(IDR_CSS, css);
- ExtractFile(IDR_JS, folder + _T("\\history.js"));
+ ExtractFile(IDR_JS, folder + L"\\history.js");
HICON ico = LoadIconEx(IDI_PLUSEX);
- IcoSave(folder + _T("\\pnode.ico"), ico);
+ IcoSave(folder + L"\\pnode.ico", ico);
IcoLib_ReleaseIcon(ico);
ico = LoadIconEx(IDI_MINUSEX);
- IcoSave(folder + _T("\\mnode.ico"), ico);
+ IcoSave(folder + L"\\mnode.ico", ico);
IcoLib_ReleaseIcon(ico);
ico = LoadIconEx(IDI_INM);
- IcoSave(folder + _T("\\event0.ico"), ico);
+ IcoSave(folder + L"\\event0.ico", ico);
IcoLib_ReleaseIcon(ico);
ico = LoadIconEx(IDI_OUTM);
- IcoSave(folder + _T("\\event1.ico"), ico);
+ IcoSave(folder + L"\\event1.ico", ico);
IcoLib_ReleaseIcon(ico);
- EXP_FILE << _T("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
- EXP_FILE << _T("<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=") << encoding << _T("\">\n");
- EXP_FILE << _T("<title>") << TranslateT("History Log") << _T(" [") << MakeTextHtmled(myName) << _T("] - [") << MakeTextHtmled(name1) << _T("]</title>\n");
- EXP_FILE << _T("<link rel=\"Stylesheet\" href=\"") << folderName << _T("\\history.css\" type=\"text/css\">\n");
- EXP_FILE << _T("<script type=\"text/javascript\" src=\"") << folderName << _T("\\history.js\"></script>\n");
- EXP_FILE << _T("</head><body>\n");
-
- EXP_FILE << _T("<span id=\"menubar\">\n");
- EXP_FILE << _T("<a class=mainmenu onmouseover='this.className=\"mainmenusel\";' href=\"javascript:void(0)\" onClick=\"ShowMenu(1)\" onMouseOut='HideMenu();this.className=\"mainmenu\";'>") << TranslateT("Menu") << _T("</a></span>\n");
- EXP_FILE << _T("<span class=floatmenu id=L1 onmouseover=clearTimeout(timer) onmouseout=HideMenu()>\n");
- EXP_FILE << _T("<table><tr>\n");
- EXP_FILE << _T("<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n");
- EXP_FILE << _T("<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(1)>") << TranslateT("Open all") << _T("</a>\n");
- EXP_FILE << _T("</td></tr><tr>\n");
- EXP_FILE << _T("<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n");
- EXP_FILE << _T("<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(0)>") << TranslateT("Close all") << _T("</a>\n");
- EXP_FILE << _T("</td></tr></table></span>\n");
- EXP_FILE << _T("<script language=\"JavaScript\">\n");
- EXP_FILE << _T("<!--\n");
- EXP_FILE << _T("var menu = document.getElementById(\"menubar\");\n");
- EXP_FILE << _T("if (menu != null)\n");
- EXP_FILE << _T(" menu.style.visibility = \"visible\";\n");
- EXP_FILE << _T("// -->\n");
- EXP_FILE << _T("</script>\n");
-
- EXP_FILE << _T("<h4>") << TranslateT("History Log") << _T("</h4>\n<h3>");
+ EXP_FILE << L"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
+ EXP_FILE << L"<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" << encoding << L"\">\n";
+ EXP_FILE << L"<title>" << TranslateT("History Log") << L" [" << MakeTextHtmled(myName) << L"] - [" << MakeTextHtmled(name1) << L"]</title>\n";
+ EXP_FILE << L"<link rel=\"Stylesheet\" href=\"" << folderName << L"\\history.css\" type=\"text/css\">\n";
+ EXP_FILE << L"<script type=\"text/javascript\" src=\"" << folderName << L"\\history.js\"></script>\n";
+ EXP_FILE << L"</head><body>\n";
+
+ EXP_FILE << L"<span id=\"menubar\">\n";
+ EXP_FILE << L"<a class=mainmenu onmouseover='this.className=\"mainmenusel\";' href=\"javascript:void(0)\" onClick=\"ShowMenu(1)\" onMouseOut='HideMenu();this.className=\"mainmenu\";'>" << TranslateT("Menu") << L"</a></span>\n";
+ EXP_FILE << L"<span class=floatmenu id=L1 onmouseover=clearTimeout(timer) onmouseout=HideMenu()>\n";
+ EXP_FILE << L"<table><tr>\n";
+ EXP_FILE << L"<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n";
+ EXP_FILE << L"<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(1)>" << TranslateT("Open all") << L"</a>\n";
+ EXP_FILE << L"</td></tr><tr>\n";
+ EXP_FILE << L"<td class=menuitemunsel onmouseover='this.className=\"menuitemsel\"' onmouseout='this.className=\"menuitemunsel\"'>\n";
+ EXP_FILE << L"<a class=menuitem onmouseover=ShowMenu(1) href=\"javascript:void(0)\" onclick=OpenAll(0)>" << TranslateT("Close all") << L"</a>\n";
+ EXP_FILE << L"</td></tr></table></span>\n";
+ EXP_FILE << L"<script language=\"JavaScript\">\n";
+ EXP_FILE << L"<!--\n";
+ EXP_FILE << L"var menu = document.getElementById(\"menubar\");\n";
+ EXP_FILE << L"if (menu != null)\n";
+ EXP_FILE << L" menu.style.visibility = \"visible\";\n";
+ EXP_FILE << L"// -->\n";
+ EXP_FILE << L"</script>\n";
+
+ EXP_FILE << L"<h4>" << TranslateT("History Log") << L"</h4>\n<h3>";
EXP_FILE << MakeTextHtmled(myName);
if (proto1.length() || myId.length())
- EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(myId) << _T(") - ");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(myId) << L") - ";
else
- EXP_FILE << _T(" - ");
+ EXP_FILE << L" - ";
EXP_FILE << MakeTextHtmled(name1);
if (proto1.length() || id1.length())
- EXP_FILE << _T(" (") << MakeTextHtmled(proto1) << _T(": ") << MakeTextHtmled(id1) << _T(")</h3>\n");
+ EXP_FILE << L" (" << MakeTextHtmled(proto1) << L": " << MakeTextHtmled(id1) << L")</h3>\n";
else
- EXP_FILE << _T("</h3>\n");
+ EXP_FILE << L"</h3>\n";
- EXP_FILE << _T("<h6>") << TranslateT("Filter:") << _T(" ") << MakeTextHtmled(filterName) << _T("</h6>\n");
+ EXP_FILE << L"<h6>" << TranslateT("Filter:") << L" " << MakeTextHtmled(filterName) << L"</h6>\n";
groupId = 0;
}
void RichHtmlExport::WriteFooter()
{
if (groupId > 0)
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"</div>\n";
- EXP_FILE << _T("<div class=mes id=bottom></div>\n</body></html>\n");
+ EXP_FILE << L"<div class=mes id=bottom></div>\n</body></html>\n";
}
void RichHtmlExport::WriteGroup(bool isMe, const std::wstring &time, const std::wstring&, const std::wstring &eventText)
{
- TCHAR *id = isMe ? _T("out") : _T("inc");
- TCHAR* ev = (isMe ? _T("1") : _T("0"));
+ TCHAR *id = isMe ? L"out" : L"inc";
+ TCHAR* ev = (isMe ? L"1" : L"0");
if (groupId > 0)
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"</div>\n";
bool isUrl = false;
std::wstring mes = ReplaceSmileys(isMe, eventText, isUrl);
- EXP_FILE << _T("<div class=mes id=session>\n");
- EXP_FILE << _T("<span class=eventimg id=") << id << _T("><img src=\"") << folderName << _T("\\pnode.ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group") << groupId << _T("', this)\"/>");
- EXP_FILE << _T("<img src=\"") << folderName << _T("\\event") << ev << _T(".ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group") << groupId << _T("', this)\"/></span>\n");
- EXP_FILE << _T("<span class=date id=") << id << _T(">") << time << _T("</span>\n<span class=text>\n") << mes;
- EXP_FILE << _T("</span>\n</div>\n");
- EXP_FILE << _T("<div class=group id=group") << groupId << _T(">\n");
+ EXP_FILE << L"<div class=mes id=session>\n";
+ EXP_FILE << L"<span class=eventimg id=" << id << L"><img src=\"" << folderName << L"\\pnode.ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group" << groupId << L"', this)\"/>";
+ EXP_FILE << L"<img src=\"" << folderName << L"\\event" << ev << L".ico\" class=sessionimage width=\"16\" height=\"16\" onclick=\"toggleFolder('group" << groupId << L"', this)\"/></span>\n";
+ EXP_FILE << L"<span class=date id=" << id << L">" << time << L"</span>\n<span class=text>\n" << mes;
+ EXP_FILE << L"</span>\n</div>\n";
+ EXP_FILE << L"<div class=group id=group" << groupId << L">\n";
++groupId;
}
void RichHtmlExport::WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO&)
{
- TCHAR *id = isMe ? _T("out") : _T("inc");
- TCHAR* ev = (isMe ? _T("1") : _T("0"));
+ TCHAR *id = isMe ? L"out" : L"inc";
+ TCHAR* ev = (isMe ? L"1" : L"0");
TCHAR* ev1 = ev;
bool isUrl = false;
std::wstring mes = ReplaceSmileys(isMe, message, isUrl);
if (isUrl)
- ev = _T("2");
- EXP_FILE << _T("<div class=mes id=event") << ev << _T(">\n");
- EXP_FILE << _T("<div class=eventimg id=") << id << _T(">") << _T("<img src=\"") << folderName << _T("\\event") << ev1 << _T(".ico\" class=sessionimage width=\"16\" height=\"16\"/></div>\n");
- EXP_FILE << _T("<div class=date id=") << id << _T(">") << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << _T("</div>\n");
- EXP_FILE << _T("<div class=nick id=") << id << _T(">") << MakeTextHtmled(user) << _T("</div>\n");
- EXP_FILE << _T("<div class=text>\n");
+ ev = L"2";
+ EXP_FILE << L"<div class=mes id=event" << ev << L">\n";
+ EXP_FILE << L"<div class=eventimg id=" << id << L">" << L"<img src=\"" << folderName << L"\\event" << ev1 << L".ico\" class=sessionimage width=\"16\" height=\"16\"/></div>\n";
+ EXP_FILE << L"<div class=date id=" << id << L">" << (Options::instance->exportHtml2ShowDate ? longDate : shortDate) << L"</div>\n";
+ EXP_FILE << L"<div class=nick id=" << id << L">" << MakeTextHtmled(user) << L"</div>\n";
+ EXP_FILE << L"<div class=text>\n";
EXP_FILE << mes;
- EXP_FILE << _T("\n</div>\n");
- EXP_FILE << _T("</div>\n");
+ EXP_FILE << L"\n</div>\n";
+ EXP_FILE << L"</div>\n";
}
std::wstring RichHtmlExport::ReplaceSmileys(bool isMe, const std::wstring &msg, bool &isUrl)
@@ -466,17 +466,17 @@ std::wstring RichHtmlExport::ReplaceSmileys(bool isMe, const std::wstring &msg, std::wstring smileyName = GetName(spr[i].filepath);
if (smileys.find(smileyName) == smileys.end()) {
smileys.insert(smileyName);
- CopyFile(spr[i].filepath, (folder + _T("\\") + smileyName).c_str(), FALSE);
+ CopyFile(spr[i].filepath, (folder + L"\\" + smileyName).c_str(), FALSE);
}
std::wstring smileyText = newMsg.substr(startChar, size);
- smileyMsg += _T("<img class=smiley src=\"");
+ smileyMsg += L"<img class=smiley src=\"";
smileyMsg += folderName;
- smileyMsg += _T("\\");
+ smileyMsg += L"\\";
smileyMsg += smileyName;
- smileyMsg += _T("\" alt=\"");
+ smileyMsg += L"\" alt=\"";
smileyMsg += smileyText;
- smileyMsg += _T("\"/>");
+ smileyMsg += L"\"/>";
}
// Get next
diff --git a/plugins/BasicHistory/src/RichHtmlExport.h b/plugins/BasicHistory/src/RichHtmlExport.h index e5a43ead25..e1f31fc15c 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.h +++ b/plugins/BasicHistory/src/RichHtmlExport.h @@ -31,7 +31,7 @@ private: public:
virtual const TCHAR* GetExt()
{
- return _T("html");
+ return L"html";
}
virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding);
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 1dc8a3b79f..2185cb8212 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -176,7 +176,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top, std::wstring* err *errDescr = TranslateT("FTP path must contain '/' instead '\\' and start with '/'.");
return false;
}
- if (isImportTask && to.filePath.find(_T("<date>")) < to.filePath.length()) {
+ if (isImportTask && to.filePath.find(L"<date>") < to.filePath.length()) {
if (err != NULL)
*err = TranslateT("Path to file");
if (errDescr != NULL)
@@ -560,7 +560,7 @@ bool DoTask(TaskOptions& to) std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, std::map<std::wstring, bool>& existingContacts, bool replaceContact)
{
std::wstring str = baseName;
- size_t pos = baseName.find(_T("<contact>"));
+ size_t pos = baseName.find(L"<contact>");
if (replaceContact && pos < baseName.length()) {
str = baseName.substr(0, pos);
std::wstring baseName1 = contactName;
@@ -581,12 +581,12 @@ std::wstring GetFileName(const std::wstring &baseName, std::wstring contactName, str += baseName.substr(pos + 9);
}
- pos = str.find(_T("<date>"));
+ pos = str.find(L"<date>");
if (pos < str.length()) {
TCHAR time[256];
SYSTEMTIME st;
GetLocalTime(&st);
- mir_sntprintf(time, _T("%d-%02d-%02d %02d%02d"), st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute);
+ mir_sntprintf(time, L"%d-%02d-%02d %02d%02d", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute);
std::wstring str1 = str.substr(0, pos);
str1 += time;
str1 += str.substr(pos + 6);
@@ -608,7 +608,7 @@ std::wstring GetDirectoryName(const std::wstring &path) void ListDirectory(const std::wstring &basePath, const std::wstring &path, std::list<std::wstring>& files)
{
WIN32_FIND_DATA findFileData;
- HANDLE hFind = FindFirstFile((basePath + path + _T("*")).c_str(), &findFileData);
+ HANDLE hFind = FindFirstFile((basePath + path + L"*").c_str(), &findFileData);
if (hFind == INVALID_HANDLE_VALUE)
return;
@@ -617,7 +617,7 @@ void ListDirectory(const std::wstring &basePath, const std::wstring &path, std:: if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
std::wstring name = findFileData.cFileName;
if (name != L"." && name != L"..")
- ListDirectory(basePath, path + findFileData.cFileName + _T("\\"), files);
+ ListDirectory(basePath, path + findFileData.cFileName + L"\\", files);
}
else files.push_back(path + findFileData.cFileName);
}
@@ -1098,7 +1098,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: std::map<std::wstring, bool> existingContacts;
ListDirectory(dir, L"\\", files);
if (files.size() > 0) {
- std::wofstream stream((dir + _T("\\script.sc")).c_str());
+ std::wofstream stream((dir + L"\\script.sc").c_str());
if (stream.is_open()) {
std::wstring ftpDir = GetDirectoryName(filePath);
ftpDir = GetFileName(ftpDir, L"", existingContacts, false);
@@ -1129,7 +1129,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: DeleteFile(log.c_str());
TCHAR cmdLine[MAX_PATH];
- mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str());
+ mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str());
STARTUPINFO startupInfo = { 0 };
startupInfo.cb = sizeof(STARTUPINFO);
@@ -1196,7 +1196,7 @@ bool FtpFiles(const std::wstring& dir, const std::wstring& filePath, const std:: bool FtpGetFiles(const std::wstring& dir, const std::list<std::wstring>& files, const std::wstring& ftpName)
{
- std::wstring script = dir + _T("\\script.sc");
+ std::wstring script = dir + L"\\script.sc";
std::wofstream stream(script.c_str());
if (stream.is_open()) {
stream << "option batch continue\noption confirm off\nopen \""
@@ -1220,7 +1220,7 @@ bool FtpGetFiles(const std::wstring& dir, const std::list<std::wstring>& files, CreateDirectory(GetDirectoryName(log).c_str(), NULL);
DeleteFile(log.c_str());
TCHAR cmdLine[MAX_PATH];
- mir_sntprintf(cmdLine, _T("\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc"), Options::instance->ftpExePath.c_str(), log.c_str());
+ mir_sntprintf(cmdLine, L"\"%s\" /nointeractiveinput /log=\"%s\" /script=script.sc", Options::instance->ftpExePath.c_str(), log.c_str());
STARTUPINFO startupInfo = { 0 };
PROCESS_INFORMATION processInfo;
startupInfo.cb = sizeof(STARTUPINFO);
diff --git a/plugins/BasicHistory/src/TxtExport.cpp b/plugins/BasicHistory/src/TxtExport.cpp index 193772dde7..b2f9ddc5c9 100644 --- a/plugins/BasicHistory/src/TxtExport.cpp +++ b/plugins/BasicHistory/src/TxtExport.cpp @@ -27,28 +27,28 @@ TxtExport::~TxtExport() void TxtExport::WriteHeader(const std::wstring&, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string&, const std::wstring&)
{
TCHAR* start = TranslateT("###");
- EXP_FILE << start << "\n" << start << _T(" ") << TranslateT("History Log") << _T("\n");
- EXP_FILE << start << _T(" ") << myName;
+ EXP_FILE << start << "\n" << start << L" " << TranslateT("History Log") << L"\n";
+ EXP_FILE << start << L" " << myName;
if (proto1.length() || myId.length())
{
- EXP_FILE << _T(" (") << proto1 << _T(": ") << myId << _T(") - ");
+ EXP_FILE << L" (" << proto1 << L": " << myId << L") - ";
}
else
{
- EXP_FILE << _T(" - ");
+ EXP_FILE << L" - ";
}
EXP_FILE << name1;
if (proto1.length() || id1.length())
{
- EXP_FILE << _T(" (") << proto1 << _T(": ") << id1 << _T(")\n");
+ EXP_FILE << L" (" << proto1 << L": " << id1 << L")\n";
}
else
{
- EXP_FILE << _T("\n");
+ EXP_FILE << L"\n";
}
- EXP_FILE << start << _T(" ") << TranslateT("Filter:") << _T(" ") << filterName << _T("\n") << start << _T("\n");
+ EXP_FILE << start << L" " << TranslateT("Filter:") << L" " << filterName << L"\n" << start << L"\n";
}
void TxtExport::WriteFooter()
diff --git a/plugins/BasicHistory/src/TxtExport.h b/plugins/BasicHistory/src/TxtExport.h index bee2718649..3147d9024d 100644 --- a/plugins/BasicHistory/src/TxtExport.h +++ b/plugins/BasicHistory/src/TxtExport.h @@ -25,7 +25,7 @@ class TxtExport : public:
virtual const TCHAR* GetExt()
{
- return _T("txt");
+ return L"txt";
}
virtual void WriteHeader(const std::wstring &fileName, const std::wstring &filterName, const std::wstring &myName, const std::wstring &myId, const std::wstring &name1, const std::wstring &proto1, const std::wstring &id1, const std::string& baseProto1, const std::wstring& encoding);
diff --git a/plugins/Boltun/src/Engine/Mind.cpp b/plugins/Boltun/src/Engine/Mind.cpp index 8181bcec2a..f9a46df967 100644 --- a/plugins/Boltun/src/Engine/Mind.cpp +++ b/plugins/Boltun/src/Engine/Mind.cpp @@ -209,25 +209,25 @@ void Mind::Load(tstring filename) ++c;
count -= 2;
c[count] = '\0';
- if (mir_tstrcmp(c, _T("QUESTION")) == 0) {
+ if (mir_tstrcmp(c, L"QUESTION") == 0) {
toLowerStr(c);
data->question.insert(s1);
}
- else if (mir_tstrcmp(c, _T("IGNORED")) == 0) {
+ else if (mir_tstrcmp(c, L"IGNORED") == 0) {
toLowerStr(c);
data->special.insert(s1);
}
- else if (mir_tstrcmp(c, _T("ESCAPE")) == 0) {
+ else if (mir_tstrcmp(c, L"ESCAPE") == 0) {
data->escape.push_back(s1);
}
- else if (mir_tstrcmp(c, _T("FAILURE")) == 0) {
+ else if (mir_tstrcmp(c, L"FAILURE") == 0) {
data->failure.push_back(s1);
}
- else if (mir_tstrcmp(c, _T("REPEAT")) == 0) {
+ else if (mir_tstrcmp(c, L"REPEAT") == 0) {
data->repeats.push_back(s1);
}
else {
- if (mir_tstrcmp(c, _T("INITIAL")) != 0)
+ if (mir_tstrcmp(c, L"INITIAL") != 0)
throw error;
data->initial.push_back(s1);
}
@@ -298,47 +298,47 @@ void Mind::Save(tstring filename) const file << (*it).second << _T('\r') << endl;
}
for (multimap<WordsList, tstring>::iterator it = data->keywords.begin(); it != data->keywords.end(); ++it) {
- file << _T(" (") << (tstring)(*it).first << _T(")") << _T('\r') << endl;
+ file << L" (" << (tstring)(*it).first << L")" << _T('\r') << endl;
file << (*it).second << _T('\r') << endl;
}
for (multimap<WordsList, tstring>::iterator it = data->qkeywords.begin(); it != data->qkeywords.end(); ++it) {
- file << _T(" (") << (tstring)(*it).first << _T(")") << _T('\r') << endl;
+ file << L" (" << (tstring)(*it).first << L")" << _T('\r') << endl;
file << (*it).second << _T('\r') << endl;
}
for (multimap<WordsList, tstring>::iterator it = data->specialEscapes.begin(); it != data->specialEscapes.end(); ++it) {
- file << _T(" {") << (tstring)(*it).first << _T("}") << _T('\r') << endl;
+ file << L" {" << (tstring)(*it).first << L"}" << _T('\r') << endl;
file << (*it).second << _T('\r') << endl;
}
for (multimap<WordsList, tstring>::iterator it = data->qspecialEscapes.begin(); it != data->qspecialEscapes.end(); ++it) {
- file << _T(" {") << (tstring)(*it).first << _T("}") << _T('\r') << endl;
+ file << L" {" << (tstring)(*it).first << L"}" << _T('\r') << endl;
file << (*it).second << _T('\r') << endl;
}
for (string_mmap::iterator it = data->widelyUsed.begin(); it != data->widelyUsed.end(); ++it) {
- file << _T(" [") << (*it).first << _T("]") << _T('\r') << endl;
+ file << L" [" << (*it).first << L"]" << _T('\r') << endl;
file << (*it).second << _T('\r') << endl;
}
for (set<tstring>::iterator it = data->question.begin(); it != data->question.end(); ++it) {
- file << _T(" <QUESTION>") << _T('\r') << endl;
+ file << L" <QUESTION>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (set<tstring>::iterator it = data->special.begin(); it != data->special.end(); ++it) {
- file << _T(" <IGNORED>") << _T('\r') << endl;
+ file << L" <IGNORED>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (string_vec::iterator it = data->escape.begin(); it != data->escape.end(); ++it) {
- file << _T(" <ESCAPE>") << _T('\r') << endl;
+ file << L" <ESCAPE>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (string_vec::iterator it = data->initial.begin(); it != data->initial.end(); ++it) {
- file << _T(" <INITIAL>") << _T('\r') << endl;
+ file << L" <INITIAL>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (string_vec::iterator it = data->failure.begin(); it != data->failure.end(); ++it) {
- file << _T(" <FAILURE>") << _T('\r') << endl;
+ file << L" <FAILURE>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (string_vec::iterator it = data->repeats.begin(); it != data->repeats.end(); ++it) {
- file << _T(" <REPEAT>") << _T('\r') << endl;
+ file << L" <REPEAT>" << _T('\r') << endl;
file << (*it) << _T('\r') << endl;
}
for (map<tstring, vector<tstring>>::const_iterator it = data->raliases.begin(); it != data->raliases.end(); ++it) {
@@ -351,7 +351,7 @@ void Mind::Save(tstring filename) const s = *it1;
}
else {
- s += _T(" ") + *it1;
+ s += L" " + *it1;
}
}
file << _T('@') << (*it).first << _T('\r') << endl;
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index 59cf0512b1..c5cc859bb3 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -94,7 +94,7 @@ tstring TalkBot::GetInitMessage(MCONTACT contact) tstring TalkBot::ReplaceAliases(const tstring &message)
{
- const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—\1");
+ const TCHAR dividers[] = L" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—\1";
tstring sentence = message;
tstring result;
map<size_t, tstring> sm;
@@ -107,7 +107,7 @@ tstring TalkBot::ReplaceAliases(const tstring &message) tstring item = sentence.substr(i, j);
if (mind.GetData()->smiles.find(item) != mind.GetData()->smiles.end()) {
sm[i] = item;
- sentence.replace(i, j, _T("\1"));
+ sentence.replace(i, j, L"\1");
break;
}
}
@@ -163,7 +163,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact if (FindExact(contactData, incomingMessage, mind.GetData()->study, res)) //study
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(LOOKSLIKE, _T("(study_all) ") + res));
+ mm.insert(make_pair(LOOKSLIKE, L"(study_all) " + res));
#else
mm.insert(make_pair(LOOKSLIKE, res));
#endif
@@ -173,12 +173,12 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact vector<tstring> sentences;
SplitSectences(incomingMessage, sentences);
ValueChooser<> ch(sentences, true); //Using random order of sentences.
- while ((res = ch.GetString()) != _T("")) {
+ while ((res = ch.GetString()) != L"") {
//Part 4
if (FindExact(contactData, res, mind.GetData()->widelyUsed, res)) //widelyUsed
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(BEST, _T("(widelyused_sent) ") + res));
+ mm.insert(make_pair(BEST, L"(widelyused_sent) " + res));
#else
mm.insert(make_pair(BEST, res));
#endif
@@ -189,7 +189,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact if (FindExact(contactData, res, mind.GetData()->study, res)) //study
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(LOOKSLIKE, _T("(study_sent) ") + res));
+ mm.insert(make_pair(LOOKSLIKE, L"(study_sent) " + res));
#else
mm.insert(make_pair(LOOKSLIKE, res));
#endif
@@ -201,21 +201,21 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact bool isQuestion;
SplitAndSortWords(res, keywords, otherwords, isQuestion);
//Part 7, 8
- res = _T("");
+ res = L"";
FindByKeywords(contactData, keywords, res/*, ures*/, isQuestion); //keywords
- if (res != _T("")) {
+ if (res != L"") {
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(LOOKSLIKE, _T("(keywords) ") + res));
+ mm.insert(make_pair(LOOKSLIKE, L"(keywords) " + res));
#else
mm.insert(make_pair(LOOKSLIKE, res));
#endif
if (maxValue > LOOKSLIKE)
maxValue = LOOKSLIKE;
}
- /* if (ures != _T(""))
+ /* if (ures != L"")
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(LOOKSLIKE2, _T("(keywords_unstrict) ")+ures));
+ mm.insert(make_pair(LOOKSLIKE2, L"(keywords_unstrict) "+ures));
#else
mm.insert(make_pair(LOOKSLIKE2, ures));
#endif
@@ -226,7 +226,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact if (FindByOthers(contactData, otherwords, res, isQuestion)) //specialEscapes
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(BAD, _T("(otherwords) ") + res));
+ mm.insert(make_pair(BAD, L"(otherwords) " + res));
#else
mm.insert(make_pair(BAD, res));
#endif
@@ -239,7 +239,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact if (FindAny(contactData->escape, res)) //escape
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(FAIL, _T("(escape) ") + res));
+ mm.insert(make_pair(FAIL, L"(escape) " + res));
#else
mm.insert(make_pair(FAIL, res));
#endif
@@ -250,7 +250,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact if (!understandAlways && FindAny(contactData->failure, res)) //failure
{
#ifdef DEBUG_PREFIXES
- mm.insert(make_pair(FAIL, _T("(failure) ") + res));
+ mm.insert(make_pair(FAIL, L"(failure) " + res));
#else
mm.insert(make_pair(FAIL, res));
#endif
@@ -277,16 +277,16 @@ TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, const vector<tstring>& v = mind.GetData()->repeats;
tstring res = v[rand() % v.size()];
#ifdef DEBUG_PREFIXES
- info = new MessageInfo(incomingMessage, _T("(repeat_norm) ") + res);
+ info = new MessageInfo(incomingMessage, L"(repeat_norm) " + res);
#else
info = new MessageInfo(incomingMessage, res);
#endif
}
else
#ifdef DEBUG_PREFIXES
- info = new MessageInfo(incomingMessage, _T("(repeat_silence)"));
+ info = new MessageInfo(incomingMessage, L"(repeat_silence)");
#else
- info = new MessageInfo(incomingMessage, _T(""));
+ info = new MessageInfo(incomingMessage, L"");
#endif
if (saveChoice)
RecordAnswer(contactData, *info);
@@ -301,7 +301,7 @@ TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, if (!res.empty()) {
UpdateStartChar(res);
#ifdef DEBUG_PREFIXES
- MessageInfo *info = new MessageInfo(incomingMessage, _T("(widelyused_all) ") + res);
+ MessageInfo *info = new MessageInfo(incomingMessage, L"(widelyused_all) " + res);
#else
MessageInfo *info = new MessageInfo(incomingMessage, res);
#endif
@@ -317,7 +317,7 @@ TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, if (!res.empty()) {
UpdateStartChar(res);
#ifdef DEBUG_PREFIXES
- MessageInfo *info = new MessageInfo(incomingMessage, _T("(widelyused_all) ") + res);
+ MessageInfo *info = new MessageInfo(incomingMessage, L"(widelyused_all) " + res);
#else
MessageInfo *info = new MessageInfo(incomingMessage, res);
#endif
@@ -383,7 +383,7 @@ bool TalkBot::FindAny(ValueChooser<> &ch, tstring& res) void TalkBot::SplitSectences(const tstring &incomingMessage, vector<tstring>& vec)
{
//FIXME: (THINK ABOUT IT:-))these chars not always mark the end of sentence.
- const TCHAR symbols[] = _T(".?!");
+ const TCHAR symbols[] = L".?!";
int it = 0, len = (int)incomingMessage.length();
while (it != len) {
while (it != len && _istspace(incomingMessage[it]))
@@ -410,11 +410,11 @@ tstring LevelToStr(TalkBot::Level target) {
tstring lev;
switch (target) {
- case TalkBot::BEST: lev = _T("BEST(0)"); break;
- case TalkBot::LOOKSLIKE: lev = _T("LOOKSLIKE(1)"); break;
- case TalkBot::BAD: lev = _T("BAD(2)"); break;
- case TalkBot::FAIL: lev = _T("FAIL(3)"); break;
- case TalkBot::NOTHING: lev = _T("NOTHING(4)"); break;
+ case TalkBot::BEST: lev = L"BEST(0)"; break;
+ case TalkBot::LOOKSLIKE: lev = L"LOOKSLIKE(1)"; break;
+ case TalkBot::BAD: lev = L"BAD(2)"; break;
+ case TalkBot::FAIL: lev = L"FAIL(3)"; break;
+ case TalkBot::NOTHING: lev = L"NOTHING(4)"; break;
}
return lev;
}
@@ -423,13 +423,13 @@ tstring LevelToStr(TalkBot::Level target) tstring TalkBot::ChooseResult(ContactData *contactData, Level maxValue, const multimap<Level, tstring> &mm)
{
#ifdef DEBUG_SHOW_VARIANTS
- AddBotMessage(_T(">>Availabe:"));
+ AddBotMessage(L">>Availabe:");
for (multimap<Level, tstring>::iterator it = mm.begin(); it != mm.end(); it++)
- AddBotMessage(LevelToStr((*it).first) + _T(": ") + (*it).second);
- AddBotMessage(_T(">>Result:"));
+ AddBotMessage(LevelToStr((*it).first) + L": " + (*it).second);
+ AddBotMessage(L">>Result:");
#endif
if (maxValue == NOTHING)
- return _T("");
+ return L"";
Level target = maxValue;
typedef multimap<Level, tstring>::const_iterator lt_cit;
pair<lt_cit, lt_cit> range = mm.equal_range(target);
@@ -437,7 +437,7 @@ tstring TalkBot::ChooseResult(ContactData *contactData, Level maxValue, const mu contactData->chooser.AddChoice((*it).second);
#ifdef DEBUG_SHOW_LEVEL
tstring lev = LevelToStr(target);
- return lev + _T(": ") + contactData->chooser.Choose();
+ return lev + L": " + contactData->chooser.Choose();
#else
return contactData->chooser.Choose();
#endif
@@ -454,7 +454,7 @@ void TalkBot::FindByKeywords(ContactData *contactData, const vector<tstring> &ke float prio;
if ((*it).first.MatchesAll(keywords/*, strict*/, prio))
#ifdef DEBUG_SHOW_SOLUTION_REASON
- contactData->chooser.AddChoice((tstring)(*it).first + _T(": - ") + (*it).second, prio);
+ contactData->chooser.AddChoice((tstring)(*it).first + L": - " + (*it).second, prio);
#else
contactData->chooser.AddChoice((*it).second, prio);
#endif
@@ -471,7 +471,7 @@ bool TalkBot::FindByOthers(ContactData *contactData, const vector<tstring> &othe it != specs.end(); ++it)
if ((*it).first.MatchesAny(otherwords)) {
#ifdef DEBUG_SHOW_SOLUTION_REASON
- contactData->chooser.AddChoice((tstring)(*it).first + _T(": - ") + (*it).second);
+ contactData->chooser.AddChoice((tstring)(*it).first + L": - " + (*it).second);
#else
contactData->chooser.AddChoice((*it).second);
#endif
@@ -490,7 +490,7 @@ const Mind& TalkBot::GetMind() const void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords,
vector<tstring>& otherwords, bool& isQuestion)
{
- const TCHAR dividers[] = _T(" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—");
+ const TCHAR dividers[] = L" \t\n\r,./?\\|;:'\"~!#^&*()_-+=[{]}—";
int len = (int)sentence.length();
vector<tstring> words;
map<size_t, tstring> sm;
@@ -504,7 +504,7 @@ void TalkBot::SplitAndSortWords(tstring sentence, vector<tstring>& keywords, if (mind.GetData()->smiles.find(item)
!= mind.GetData()->smiles.end()) {
sm[i] = item;
- sentence.replace(i, j, _T(" "));
+ sentence.replace(i, j, L" ");
break;
}
}
diff --git a/plugins/Boltun/src/Engine/UnrecentChooser.cpp b/plugins/Boltun/src/Engine/UnrecentChooser.cpp index 3775c7a2e5..b0b5e1460e 100644 --- a/plugins/Boltun/src/Engine/UnrecentChooser.cpp +++ b/plugins/Boltun/src/Engine/UnrecentChooser.cpp @@ -60,7 +60,7 @@ tstring UnRecentChooser::Choose() }
else
if (minimum == -1)
- res = _T("");
+ res = L"";
else
{
float minprio = maxOldPrio / 1.5F;
diff --git a/plugins/Boltun/src/Engine/ValueChooser.h b/plugins/Boltun/src/Engine/ValueChooser.h index 0018ac8ff2..f82ceecbea 100644 --- a/plugins/Boltun/src/Engine/ValueChooser.h +++ b/plugins/Boltun/src/Engine/ValueChooser.h @@ -66,7 +66,7 @@ public: {
Reset();
if (notifyOnReset)
- return _T("");
+ return L"";
}
int result;
while (numbers[result = rand() % data.size()])
diff --git a/plugins/Boltun/src/Engine/WordsList.cpp b/plugins/Boltun/src/Engine/WordsList.cpp index 6593d28b3e..b111cc3414 100644 --- a/plugins/Boltun/src/Engine/WordsList.cpp +++ b/plugins/Boltun/src/Engine/WordsList.cpp @@ -31,7 +31,7 @@ WordsList::operator tstring() const {
tstring res;
//if (unstrict)
- // res = _T("~");
+ // res = L"~";
set<tstring>::const_iterator it = words.begin();
if (!words.empty())
while (true)
@@ -39,11 +39,11 @@ WordsList::operator tstring() const res += *it;
++it;
if (it != words.end())
- res += _T(" ");
+ res += L" ";
else
break;
}
- res += isQuestion ? _T("?") : _T(".");
+ res += isQuestion ? L"?" : L".";
return res;
}
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 23f15ef080..8fb65dd806 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -48,7 +48,7 @@ PLUGININFOEX pluginInfo = { static HGENMENU hMenuItemAutoChat, hMenuItemNotToChat, hMenuItemStartChatting;
-#define MIND_DIALOG_FILTER _T("%s (*.mindw)\1*.mindw\1%s (*.*)\1*.*\1")
+#define MIND_DIALOG_FILTER L"%s (*.mindw)\1*.mindw\1%s (*.*)\1*.*\1"
#ifdef DEBUG_LOAD_TIME
#include <intrin.h>
@@ -116,7 +116,7 @@ static bool LoadMind(const TCHAR* filename, int &line) //exit(0);
#endif
SetCursor(oldCur);
- HRSRC hRes = FindResource(hInst, MAKEINTRESOURCE(IDR_SMILES), _T("SMILES"));
+ HRSRC hRes = FindResource(hInst, MAKEINTRESOURCE(IDR_SMILES), L"SMILES");
if (!hRes) {
delete mind;
return false;
diff --git a/plugins/Boltun/src/stdafx.h b/plugins/Boltun/src/stdafx.h index 635d36b2d0..77b9614042 100644 --- a/plugins/Boltun/src/stdafx.h +++ b/plugins/Boltun/src/stdafx.h @@ -65,7 +65,7 @@ #define BOLTUN_GROUP LPGEN("Message sessions")
//Filename depends on UNICODE
-#define DEFAULT_MIND_FILE _T("boltun.mindw")
+#define DEFAULT_MIND_FILE L"boltun.mindw"
//===============================================
// These are strings for translation:
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 1f5acb3b7f..6a8600b4d1 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam else if (mir_strcmp(password, g_password)) {
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Password is not correct!\nPlease, enter correct password."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
- SetDlgItemText(hDlg, IDC_EDIT1, _T(""));
+ SetDlgItemText(hDlg, IDC_EDIT1, L"");
break;
}
else EndDialog(hDlg, IDOK);
@@ -174,12 +174,12 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM) TCHAR szTemp[32];
GetClassName(hWnd, szTemp, 32);
- if (mir_tstrcmp(szTemp, _T("MirandaThumbsWnd")) == 0) // hide floating contacts
+ if (mir_tstrcmp(szTemp, L"MirandaThumbsWnd") == 0) // hide floating contacts
{
CallService("FloatingContacts/MainHideAllThumbs", 0, 0);
g_bOldSetting |= OLD_FLTCONT;
}
- else if (mir_tstrcmp(szTemp, _T("PopupWnd2")) == 0 || mir_tstrcmp(szTemp, _T("YAPPWinClass")) == 0) // destroy opened popups
+ else if (mir_tstrcmp(szTemp, L"PopupWnd2") == 0 || mir_tstrcmp(szTemp, L"YAPPWinClass") == 0) // destroy opened popups
PUDeletePopup(hWnd);
else
{
@@ -258,7 +258,7 @@ static void CreateTrayIcon(bool create) db_free(&dbVar);
}
else
- _tcsncpy_s(nim.szTip, _T("Miranda NG"), _TRUNCATE);
+ _tcsncpy_s(nim.szTip, L"Miranda NG", _TRUNCATE);
nim.cbSize = sizeof(nim);
nim.hWnd = g_hListenWindow;
@@ -398,7 +398,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara TCHAR szTemp[32];
GetClassName(pCurWnd->hWnd, szTemp, 32);
- if (IsWindow(pCurWnd->hWnd) && mir_tstrcmp(szTemp, _T("SysShadow")) != 0) // precaution
+ if (IsWindow(pCurWnd->hWnd) && mir_tstrcmp(szTemp, L"SysShadow") != 0) // precaution
ShowWindow(pCurWnd->hWnd, SW_SHOW);
delete pCurWnd; // bye-bye
@@ -474,7 +474,7 @@ static TCHAR *HokeyVkToName(WORD vkKey) case VK_PAUSE:
case VK_CANCEL:
case VK_CAPITAL:
- return _T("");
+ return L"";
case VK_DIVIDE:
case VK_INSERT:
@@ -503,11 +503,11 @@ static TCHAR *GetBossKeyText(void) BYTE shift = HIBYTE(wHotKey);
static TCHAR buf[128] = { 0 };
- mir_sntprintf(buf, _T("%s%s%s%s%s"),
- (shift & HOTKEYF_CONTROL) ? _T("Ctrl + ") : _T(""),
- (shift & HOTKEYF_SHIFT) ? _T("Shift + ") : _T(""),
- (shift & HOTKEYF_ALT) ? _T("Alt + ") : _T(""),
- (shift & HOTKEYF_EXT) ? _T("Win + ") : _T(""),
+ mir_sntprintf(buf, L"%s%s%s%s%s",
+ (shift & HOTKEYF_CONTROL) ? L"Ctrl + " : L"",
+ (shift & HOTKEYF_SHIFT) ? L"Shift + " : L"",
+ (shift & HOTKEYF_ALT) ? L"Alt + " : L"",
+ (shift & HOTKEYF_EXT) ? L"Win + " : L"",
HokeyVkToName(key));
return buf;
@@ -522,7 +522,7 @@ static int GenMenuInit(WPARAM, LPARAM) // Modify menu item text before to show t {
if (g_hMenuItem) {
TCHAR buf[128];
- mir_sntprintf(buf, _T("%s [%s]"), TranslateT("Hide"), GetBossKeyText());
+ mir_sntprintf(buf, L"%s [%s]", TranslateT("Hide"), GetBossKeyText());
Menu_ModifyItem(g_hMenuItem, buf);
}
return 0;
@@ -655,7 +655,7 @@ int MirandaLoaded(WPARAM, LPARAM) if (IsWinVerVistaPlus())
{
- hDwmApi = LoadLibrary(_T("dwmapi.dll"));
+ hDwmApi = LoadLibrary(L"dwmapi.dll");
if (hDwmApi)
dwmIsCompositionEnabled = (PFNDwmIsCompositionEnabled)GetProcAddress(hDwmApi, "DwmIsCompositionEnabled");
}
@@ -670,7 +670,7 @@ int MirandaLoaded(WPARAM, LPARAM) tr.memType = TR_MEM_OWNER;
tr.flags = TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC;
- tr.tszTokenString = _T("bosskeyname");
+ tr.tszTokenString = L"bosskeyname";
tr.parseFunctionT = VariablesBossKey;
tr.szHelpText = LPGEN("BossKey") "\t" LPGEN("get the BossKey name");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
diff --git a/plugins/BossKeyPlus/src/stdafx.h b/plugins/BossKeyPlus/src/stdafx.h index dfdf4679d0..067b56a694 100644 --- a/plugins/BossKeyPlus/src/stdafx.h +++ b/plugins/BossKeyPlus/src/stdafx.h @@ -22,7 +22,7 @@ #define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_DEPRECATE
-#define BOSSKEY_LISTEN_INFO _T("MY6BossKey_Param")
+#define BOSSKEY_LISTEN_INFO L"MY6BossKey_Param"
#include <windows.h>
#include <shellapi.h>
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 4d892a16f8..0b5bbc73e8 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -286,7 +286,7 @@ void ReturnNotify(MCONTACT hContact, TCHAR *message) TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
- mir_sntprintf(tmpMsg, _T("%s %s"), nick, message);
+ mir_sntprintf(tmpMsg, L"%s %s", nick, message);
cle.ptszTooltip = tmpMsg;
pcli->pfnAddEvent(&cle);
}
@@ -323,7 +323,7 @@ void GoneNotify(MCONTACT hContact, TCHAR *message) TCHAR* nick = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tmpMsg[512];
- mir_sntprintf(tmpMsg, _T("%s %s"), nick, message);
+ mir_sntprintf(tmpMsg, L"%s %s", nick, message);
cle.ptszTooltip = tmpMsg;
cle.flags = CLEF_TCHAR;
pcli->pfnAddEvent(&cle);
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index ed61fd3362..107eae10f4 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -461,7 +461,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar if (tmpTime == -1)
SetDlgItemText(hdlg, IDC_EDIT_LASTSEEN, TranslateT("not detected"));
else {
- _tcsftime(tmpBuf, 50, _T("%#x, %#X"), gmtime(&tmpTime));
+ _tcsftime(tmpBuf, 50, L"%#x, %#X", gmtime(&tmpTime));
SetDlgItemText(hdlg, IDC_EDIT_LASTSEEN, tmpBuf);
}
@@ -469,7 +469,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar if (tmpTime == -1)
SetDlgItemText(hdlg, IDC_EDIT_LASTINPUT, TranslateT("not found"));
else {
- _tcsftime(tmpBuf, 50, _T("%#x, %#X"), gmtime(&tmpTime));
+ _tcsftime(tmpBuf, 50, L"%#x, %#X", gmtime(&tmpTime));
SetDlgItemText(hdlg, IDC_EDIT_LASTINPUT, tmpBuf);
}
@@ -481,7 +481,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar if (isContactGoneFor((MCONTACT)lparam, options.iAbsencePeriod2))
SetDlgItemText(hdlg, IDC_EDIT_WILLNOTICE, TranslateT("This contact has been absent for an extended period of time."));
else
- SetDlgItemText(hdlg, IDC_EDIT_WILLNOTICE, _T(""));
+ SetDlgItemText(hdlg, IDC_EDIT_WILLNOTICE, L"");
CheckDlgButton(hdlg, IDC_CHECK_MISSYOU, db_get_b((MCONTACT)lparam, MODULE_NAME, "MissYou", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hdlg, IDC_CHECK_NOTIFYALWAYS, db_get_b((MCONTACT)lparam, MODULE_NAME, "MissYouNotifyAlways", 0) ? BST_CHECKED : BST_UNCHECKED);
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 84d4dd90ac..becca80478 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -4,7 +4,7 @@ void populateSettingsList(HWND hwnd2List) {
SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Send If My Status Is..."));
SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Send If They Change Status to..."));
- SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)_T("----------------------------"));
+ SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)L"----------------------------");
SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Reuse Pounce"));
SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Give Up delay"));
SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Confirmation Window"));
@@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB) char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
TCHAR name[300];
- mir_sntprintf(name, _T("%s (%s)"), pcli->pfnGetContactDisplayName(hContact, 0), _A2T(szProto));
+ mir_sntprintf(name, L"%s (%s)", pcli->pfnGetContactDisplayName(hContact, 0), _A2T(szProto));
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
@@ -102,7 +102,7 @@ INT_PTR CALLBACK StatusModesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l |(IsDlgButtonChecked(hwnd, IDC_CHECK9)<<8)
|(IsDlgButtonChecked(hwnd, IDC_CHECK10)<<9);
- if (!mir_tstrcmp(type, _T("Any"))) {
+ if (!mir_tstrcmp(type, L"Any")) {
if (LOWORD(wParam) == IDOK)
db_set_w(wi->hContact, modname, "SendIfMyStatusIsFLAG", flag);
wi->SendIfMy = 0;
@@ -285,7 +285,7 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM if (length>1) {
TCHAR *text = (TCHAR*)mir_alloc(length*sizeof(TCHAR));
if (!text) {
- msg(TranslateT("Couldn't allocate enough memory"), _T(""));
+ msg(TranslateT("Couldn't allocate enough memory"), L"");
break;
}
GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
@@ -308,7 +308,7 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM case IDC_DELETE:
deletePounce(wi->hContact);
- SetDlgItemText(hwnd, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwnd, IDC_MESSAGE, L"");
SetDlgItemText(hwnd, GRP_MSG, TranslateT("The Message (0 Characters)"));
break;
@@ -411,7 +411,7 @@ INT_PTR CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, if (length > 1) {
TCHAR *text = (TCHAR*)mir_alloc(length*sizeof(TCHAR));
if (!text) {
- msg(TranslateT("Couldn't allocate enough memory"), _T(""));
+ msg(TranslateT("Couldn't allocate enough memory"), L"");
break;
}
GetDlgItemText(hwnd, IDC_MESSAGE, text, length);
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 2203a20d8d..3d15dc36be 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -83,7 +83,7 @@ int MsgAck(WPARAM, LPARAM lParam) db_set_b(ack->hContact, modname, "Reuse", (BYTE)(reuse-1));
else {
db_set_b(ack->hContact,modname, "Reuse", 0);
- db_set_ws(ack->hContact, modname, "PounceMsg", _T(""));
+ db_set_ws(ack->hContact, modname, "PounceMsg", L"");
}
}
WindowList_Remove(hWindowList,(HWND)ack->hProcess);
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 6063ce4306..19ea7e1558 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -192,8 +192,8 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) if (code == IDC_CANCEL) { statusToSet = 0; - ics.ptszName = _T(""); - ics.ptszMessage = _T(""); + ics.ptszName = L""; + ics.ptszMessage = L""; } else if (code == IDOK && item != NULL) { statusToSet = item->m_iIcon + 1; diff --git a/plugins/CSList/src/stdafx.h b/plugins/CSList/src/stdafx.h index b06d7dcd74..ddea917d2f 100644 --- a/plugins/CSList/src/stdafx.h +++ b/plugins/CSList/src/stdafx.h @@ -110,8 +110,8 @@ struct StatusItem // list item structure StatusItem()
{
m_iIcon = 0;
- mir_tstrcpy(m_tszTitle, _T(""));
- mir_tstrcpy(m_tszMessage, _T(""));
+ mir_tstrcpy(m_tszTitle, L"");
+ mir_tstrcpy(m_tszMessage, L"");
m_bFavourite = FALSE;
}
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 29ce01d5f1..35584b5d04 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -95,7 +95,7 @@ int OnIconsChanged(WPARAM, LPARAM) int ModulesLoaded(WPARAM, LPARAM)
{
- LPCTSTR ptszEmptySting = _T("");
+ LPCTSTR ptszEmptySting = L"";
// Çàïîëíÿåì êîíôèãóðàöèîííûå ñòðîêè èç áàçû. Åñëè èõ òàì íåò - ãåíåðèðóåì.
for (int i = 0; i < bLayNum; i++) {
diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index d97174c591..7aeb901eeb 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -25,10 +25,10 @@ PLUGININFOEX pluginInfoEx = { {0xc5ef53a8, 0x80d4, 0x4ce9, {0xb3, 0x41, 0xec, 0x90, 0xd3, 0xec, 0x91, 0x56}}
};
-LPCTSTR ptszKeybEng = _T("`1234567890- = \\qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+|QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?");
+LPCTSTR ptszKeybEng = L"`1234567890- = \\qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+|QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?";
HKL hklEng = (HKL)0x04090409;
-LPCTSTR ptszSeparators = _T(" \t\n\r");
+LPCTSTR ptszSeparators = L" \t\n\r";
HANDLE hOptionsInitialize;
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index a7dc262382..b6f9310819 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -355,7 +355,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, POPUPDATAT_V2 pdtData = { 0 };
pdtData.cbSize = sizeof(pdtData);
_tcsncpy(pdtData.lptzContactName, TranslateT(ModuleName), MAX_CONTACTNAME);
- _tcsncpy(pdtData.lptzText, _T("Ghbdtn? rfr ltkf&"), MAX_SECONDLINE);
+ _tcsncpy(pdtData.lptzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE);
switch(poOptionsTemp.bColourType) {
case PPC_POPUP:
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 85295e4ad7..d66dd38e70 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -260,7 +260,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) i = GetClassName(hTextWnd, ptszTemp, 255);
ptszTemp[i] = 0;
- if (_tcsstr(CharUpper(ptszTemp), _T("RICHEDIT")) != NULL) {
+ if (_tcsstr(CharUpper(ptszTemp), L"RICHEDIT") != NULL) {
WindowType = WTYPE_RichEdit;
SendMessage(hTextWnd, EM_EXGETSEL, 0, (LPARAM)&crSelection);
}
@@ -417,10 +417,10 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) for (i = 0; i < bLayNum; i++)
if (hklLayouts[i] != hklCurLay) {
if (mir_tstrlen(ptszMBox) != 0)
- mir_tstrcat(ptszMBox, _T("\n\n"));
+ mir_tstrcat(ptszMBox, L"\n\n");
ptrT ptszTemp(GetShortNameOfLayout(hklLayouts[i]));
mir_tstrcat(ptszMBox, ptszTemp);
- mir_tstrcat(ptszMBox, _T(":\n"));
+ mir_tstrcat(ptszMBox, L":\n");
ptrT ptszOutText(ChangeTextLayout(ptszInText, hklCurLay, hklLayouts[i], FALSE));
mir_tstrcat(ptszMBox, ptszOutText);
}
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index b405abede2..dfd08a712c 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -70,7 +70,7 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam) // wParam = hContact
{
POINT pt;
- HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
+ HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MOD_NAME)L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
HMENU hMenu = Menu_BuildContactMenu(wParam);
GetCursorPos(&pt);
@@ -189,7 +189,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) SHOWPOPUP_DATA sd = {0};
char *szProto = GetContactProto(hContact);
if (g_PreviewOptPage)
- sd.MirVer = _T("Miranda NG ICQ 0.93.5.3007");
+ sd.MirVer = L"Miranda NG ICQ 0.93.5.3007";
else {
if (!hContact) // exit if hContact == NULL and it's not a popup preview
return 0;
@@ -198,11 +198,11 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (!strcmp(szProto, META_PROTO)) // workaround for metacontacts
return 0;
- sd.MirVer = db_get_s(hContact, szProto, DB_MIRVER, _T(""));
+ sd.MirVer = db_get_s(hContact, szProto, DB_MIRVER, L"");
if (sd.MirVer.IsEmpty())
return 0;
}
- sd.OldMirVer = db_get_s(hContact, MOD_NAME, DB_OLDMIRVER, _T(""));
+ sd.OldMirVer = db_get_s(hContact, MOD_NAME, DB_OLDMIRVER, L"");
db_set_ts(hContact, MOD_NAME, DB_OLDMIRVER, sd.MirVer); // we have to write it here, because we modify sd.OldMirVer and sd.MirVer to conform our settings later
if (sd.OldMirVer.IsEmpty()) // looks like it's the right way to do
return 0;
@@ -359,9 +359,9 @@ extern "C" int __declspec(dllexport) Load(void) if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) {
TCString Str;
- Str = db_get_s(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, _T(""));
+ Str = db_get_s(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, L"");
if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
- db_set_ts(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(_T("/Miranda[0-9A-F]{8}/"), _T("/[0-9A-F]{8}(\\W|$)/")));
+ db_set_ts(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(L"/Miranda[0-9A-F]{8}/", L"/[0-9A-F]{8}(\\W|$)/"));
db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 1);
}
diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h index 29f1b72d0d..d490677750 100644 --- a/plugins/ClientChangeNotify/src/Misc.h +++ b/plugins/ClientChangeNotify/src/Misc.h @@ -20,7 +20,7 @@ #include "stdafx.h"
extern BOOL bPopupExists;
-__inline void ShowMsg(TCHAR *FirstLine, TCHAR *SecondLine = _T(""), bool IsErrorMsg = false, int Timeout = 0)
+__inline void ShowMsg(TCHAR *FirstLine, TCHAR *SecondLine = L"", bool IsErrorMsg = false, int Timeout = 0)
{
if (bPopupExists)
{
@@ -40,7 +40,7 @@ __inline void ShowMsg(TCHAR *FirstLine, TCHAR *SecondLine = _T(""), bool IsError __inline void ShowLog(TCString &LogFilePath)
{
- INT_PTR Result = (INT_PTR)ShellExecute(NULL, _T("open"), LogFilePath, NULL, NULL, SW_SHOW);
+ INT_PTR Result = (INT_PTR)ShellExecute(NULL, L"open", LogFilePath, NULL, NULL, SW_SHOW);
if (Result <= 32) // Error
{
TCHAR szError[64];
@@ -52,10 +52,10 @@ __inline void ShowLog(TCString &LogFilePath) __inline void RecompileRegexps(TCString IgnoreSubstrings)
{
FreePcreCompileData();
- TCHAR *p = _tcstok(IgnoreSubstrings, _T(";"));
+ TCHAR *p = _tcstok(IgnoreSubstrings, L";");
while (p)
{
CompileRegexp(p, p[0] != '/');
- p = _tcstok(NULL, _T(";"));
+ p = _tcstok(NULL, L";");
}
}
diff --git a/plugins/ClientChangeNotify/src/OptDlg.cpp b/plugins/ClientChangeNotify/src/OptDlg.cpp index 1570f05678..4aefc4c519 100644 --- a/plugins/ClientChangeNotify/src/OptDlg.cpp +++ b/plugins/ClientChangeNotify/src/OptDlg.cpp @@ -197,6 +197,6 @@ void InitOptions() g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_DEFAULT, IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_INFINITE, IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_IGNORESTRINGS, IDC_POPUPOPTDLG_POPUPNOTIFY));
- g_PopupOptPage.Items.AddElem(new COptItem_Edit(IDC_POPUPOPTDLG_IGNORESTRINGS, DB_IGNORESUBSTRINGS, IGNORESTRINGS_MAX_LEN, _T("gmail;skype;/Miranda[0-9A-F]{8}/"), IDC_POPUPOPTDLG_POPUPNOTIFY));
+ g_PopupOptPage.Items.AddElem(new COptItem_Edit(IDC_POPUPOPTDLG_IGNORESTRINGS, DB_IGNORESUBSTRINGS, IGNORESTRINGS_MAX_LEN, L"gmail;skype;/Miranda[0-9A-F]{8}/", IDC_POPUPOPTDLG_POPUPNOTIFY));
g_PopupOptPage.Items.AddElem(new COptItem_Generic(IDC_POPUPOPTDLG_STATIC_REGEXP, IDC_POPUPOPTDLG_POPUPNOTIFY));
}
diff --git a/plugins/ClientChangeNotify/src/Options.cpp b/plugins/ClientChangeNotify/src/Options.cpp index c6209078f9..aea2556676 100644 --- a/plugins/ClientChangeNotify/src/Options.cpp +++ b/plugins/ClientChangeNotify/src/Options.cpp @@ -283,7 +283,7 @@ int TreeReadEnum(const char *szSetting, LPARAM lParam) pItem.ParentID = ParentID;
pItem.Flags = Flags;
pItem.hItem = NULL;
- pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T(""));
+ pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L"");
pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == NULL) ? NULL :
db_get_s(NULL, pData->sModule,
*pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (TCHAR*)NULL);
@@ -660,7 +660,7 @@ int ListReadEnum(const char *szSetting, LPARAM lParam) int Len = pData->sDBSettingPrefix.GetLen() + pData->ListCtrl->sDBSetting.GetLen() + _countof(LISTITEM_DBSTR_TEXT) - 1;
if (!strncmp(szSetting, pData->sDBSettingPrefix + pData->ListCtrl->sDBSetting + LISTITEM_DBSTR_TEXT, Len) && isdigit(szSetting[Len])) {
int ID = atol(szSetting + Len);
- pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T(""));
+ pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L"");
}
return 0;
}
diff --git a/plugins/ClientChangeNotify/src/Options.h b/plugins/ClientChangeNotify/src/Options.h index 4e4481da8b..b22a0b902b 100644 --- a/plugins/ClientChangeNotify/src/Options.h +++ b/plugins/ClientChangeNotify/src/Options.h @@ -406,7 +406,7 @@ public: {
if (TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL) {
_ASSERT(!RootItems.GetSize()); // there can't be any root items when the tree is a plain list
- this->RootItems.AddElem(CTreeRootItem(_T(""), 0, TIF_EXPANDED)); // TODO??
+ this->RootItems.AddElem(CTreeRootItem(L"", 0, TIF_EXPANDED)); // TODO??
this->RootItems[0].hItem = TVI_ROOT;
}
}
diff --git a/plugins/ClientChangeNotify/src/pcre.cpp b/plugins/ClientChangeNotify/src/pcre.cpp index a57c0587c5..259e9facdb 100644 --- a/plugins/ClientChangeNotify/src/pcre.cpp +++ b/plugins/ClientChangeNotify/src/pcre.cpp @@ -58,7 +58,7 @@ void FreePcreCompileData() TCString CompileRegexp(TCString Regexp, int bAddAsUsualSubstring, int ID)
{
- TCString Result(_T(""));
+ TCString Result(L"");
sPcreCompileData s = {0};
int NewID = PcreCompileData.AddElem(s);
PcreCompileData[NewID].ID = ID;
@@ -126,7 +126,7 @@ TCString CompileRegexp(TCString Regexp, int bAddAsUsualSubstring, int ID) PcreCompileData[NewID].pExtra = pcre16_study(PcreCompileData[NewID].pPcre, 0, &Err);
}
else {
- // Result += LogMessage(TranslateT("Syntax error in regexp\n%s\nat offset %d: %s."), (TCHAR*)Regexp, ErrOffs, (TCHAR*)ANSI2TCHAR(Err)) + _T("\n\n");
+ // Result += LogMessage(TranslateT("Syntax error in regexp\n%s\nat offset %d: %s."), (TCHAR*)Regexp, ErrOffs, (TCHAR*)ANSI2TCHAR(Err)) + L"\n\n";
PcreCompileData[NewID].Pattern = Regexp;
}
}
diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index d05040bc0c..2371b69626 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -309,7 +309,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) if (cc->type == CLCIT_GROUP) {
szCounts = pcli->pfnGetGroupCountsText(dat, cc);
if (szCounts[0]) {
- GetTextExtentPoint32(hdcMem, _T(" "), 1, &spaceSize);
+ GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
GetTextExtentPoint32(hdcMem, szCounts, (int)mir_tstrlen(szCounts), &countsSize);
width += spaceSize.cx + countsSize.cx;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index cc4dba1b31..2bc79bdbed 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -274,7 +274,7 @@ TCHAR * ParseText(const TCHAR *text, return NULL;
if (text[i + 1] == _T('%')) {
- if (CopyData(&ret, _T("%"), 1))
+ if (CopyData(&ret, L"%", 1))
return NULL;
i++;
@@ -338,7 +338,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L dat = new ClcData();
SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat);
- dat->hwnd_list = CreateWindow(_T("LISTBOX"), _T(""),
+ dat->hwnd_list = CreateWindow(L"LISTBOX", L"",
(WS_VISIBLE | WS_CHILD | LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | LBS_WANTKEYBOARDINPUT | WS_VSCROLL),
0, 0, 0, 0, hwnd, NULL, g_hInst, 0);
dat->need_rebuild = FALSE;
@@ -528,9 +528,9 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) {
TCHAR *szCounts = pcli->pfnGetGroupCountsText(dat, item);
const TCHAR *t[] = {
- _T("%name%"),
- _T("%count%"),
- _T("%mode%")
+ L"%name%",
+ L"%count%",
+ L"%mode%"
};
const TCHAR *v[] = {
item->szText,
@@ -539,7 +539,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) };
if (szCounts[0] != '\0')
- mir_sntprintf(count, _T("%s "), szCounts);
+ mir_sntprintf(count, L"%s ", szCounts);
else
count[0] = _T('\0');
@@ -553,10 +553,10 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) case CLCIT_CONTACT:
{
const TCHAR *t[] = {
- _T("%name%"),
- _T("%status%"),
- _T("%protocol%"),
- _T("%status_message%")
+ L"%name%",
+ L"%status%",
+ L"%protocol%",
+ L"%status_message%"
};
const TCHAR *v[] = {
item->szText,
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp index 5dafc9d4fd..94b4ad3170 100644 --- a/plugins/Clist_modern/src/cluiframes.cpp +++ b/plugins/Clist_modern/src/cluiframes.cpp @@ -139,7 +139,7 @@ int SetAlpha(BYTE Alpha) if (!(l & WS_EX_LAYERED)) {
HWND parent = NULL;
if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (IsWindow(hProgMan))
parent = hProgMan;
}
@@ -1608,7 +1608,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM) SetWindowPos(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
{
TOOLINFO ti = { sizeof(ti) };
- ti.lpszText = _T("");
+ ti.lpszText = L"";
ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
ti.uId = (UINT_PTR)g_pfwFrames[g_nFramesCount].TitleBar.hwnd;
@@ -2655,7 +2655,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam hmenu = CreatePopupMenu();
// Frames[Frameid].TitleBar.hmenu = hmenu;
AppendMenu(hmenu, MF_STRING | MF_DISABLED | MF_GRAYED, 15, g_pfwFrames[framepos].name);
- AppendMenu(hmenu, MF_SEPARATOR, 16, _T(""));
+ AppendMenu(hmenu, MF_SEPARATOR, 16, L"");
AppendMenu(hmenu, g_pfwFrames[framepos].Locked ? (MF_STRING | MF_CHECKED) : MF_STRING, frame_menu_lock, TranslateT("Lock frame"));
AppendMenu(hmenu, g_pfwFrames[framepos].visible ? (MF_STRING | MF_CHECKED) : MF_STRING, frame_menu_visible, TranslateT("Visible"));
AppendMenu(hmenu, g_pfwFrames[framepos].TitleBar.ShowTitleBar ? (MF_STRING | MF_CHECKED) : MF_STRING, frame_menu_showtitlebar, TranslateT("Show title bar"));
@@ -2735,7 +2735,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam if (pos != -1) {
int oldflags;
- mir_sntprintf(TBcapt, _T("%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d"),
+ mir_sntprintf(TBcapt, L"%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d",
g_pfwFrames[pos].name, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
g_pfwFrames[pos].FloatingPos.x, g_pfwFrames[pos].FloatingPos.y,
g_pfwFrames[pos].FloatingSize.x, g_pfwFrames[pos].FloatingSize.y,
@@ -3065,10 +3065,10 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP static HWND CreateSubContainerWindow(HWND parent, int x, int y, int width, int height)
{
- HWND hwnd = CreateWindowEx(WS_EX_LAYERED, CLUIFrameSubContainerClassName, _T("SubContainerWindow"), WS_POPUP | (!g_CluiData.fLayered ? WS_BORDER : 0), x, y, width, height, parent, 0, g_hInst, 0);
+ HWND hwnd = CreateWindowEx(WS_EX_LAYERED, CLUIFrameSubContainerClassName, L"SubContainerWindow", WS_POPUP | (!g_CluiData.fLayered ? WS_BORDER : 0), x, y, width, height, parent, 0, g_hInst, 0);
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_BORDER));
if (g_CluiData.fOnDesktop) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (IsWindow(hProgMan))
SetParent(hwnd, hProgMan);
}
@@ -3218,7 +3218,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP static HWND CreateContainerWindow(HWND parent, int x, int y, int width, int height)
{
- return CreateWindow(_T("FramesContainer"), _T("FramesContainer"), WS_POPUP | WS_THICKFRAME, x, y, width, height, parent, 0, g_hInst, 0);
+ return CreateWindow(L"FramesContainer", L"FramesContainer", WS_POPUP | WS_THICKFRAME, x, y, width, height, parent, 0, g_hInst, 0);
}
static int _us_DoSetFrameFloat(WPARAM wParam, LPARAM lParam)
@@ -3365,7 +3365,7 @@ int LoadCLUIFramesModule(void) cntclass.lpfnWndProc = CLUIFrameContainerWndProc;
cntclass.hInstance = g_hInst;
cntclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- cntclass.lpszClassName = _T("FramesContainer");
+ cntclass.lpszClassName = L"FramesContainer";
RegisterClass(&cntclass);
//end container helper
@@ -3416,7 +3416,7 @@ int LoadCLUIFramesModule(void) CreateCluiFramesServices();
- hWndExplorerToolBar = FindWindowEx(0, 0, _T("Shell_TrayWnd"), NULL);
+ hWndExplorerToolBar = FindWindowEx(0, 0, L"Shell_TrayWnd", NULL);
OnFrameTitleBarBackgroundChange(0, 0);
_fCluiFramesModuleNotStarted = FALSE;
return 0;
diff --git a/plugins/Clist_modern/src/cluiframes.h b/plugins/Clist_modern/src/cluiframes.h index 09af1b44f2..155fdba991 100644 --- a/plugins/Clist_modern/src/cluiframes.h +++ b/plugins/Clist_modern/src/cluiframes.h @@ -128,8 +128,8 @@ struct FRAMEWND #define OFFSET_PROTOPOS 200
#define OFFSET_VISIBLE 400
-#define CLUIFrameSubContainerClassName _T("CLUIFrameSubContainer")
-#define CLUIFrameTitleBarClassName _T("CLUIFrameTitleBar")
+#define CLUIFrameSubContainerClassName L"CLUIFrameSubContainer"
+#define CLUIFrameTitleBarClassName L"CLUIFrameTitleBar"
#define CLUIFrameModule "CLUIFrames"
#endif
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index fe7a2fd8e6..60358a3851 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -32,7 +32,7 @@ void GDIPlus_ExtractAnimatedGIF(TCHAR *szName, int width, int height, HBITMAP &p BOOL GDIPlus_IsAnimatedGif(TCHAR *szName);
/* Next is module */
-#define ANIAVAWINDOWCLASS _T("MirandaModernAniAvatar")
+#define ANIAVAWINDOWCLASS L"MirandaModernAniAvatar"
#define aacheck if (!s_bModuleStarted) return
#define AAO_HAS_BORDER 0x01
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 8e7965316d..326722ab11 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -394,7 +394,7 @@ LBL_Status: ptrT tszXStatusMsg(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); if (tszXStatusMsg != NULL && tszXStatusMsg[0] != 0) { TCHAR *tmp = NEWTSTR_ALLOCA(text); - mir_sntprintf(text, text_size, _T("%s: %s"), tmp, tszXStatusMsg); + mir_sntprintf(text, text_size, L"%s: %s", tmp, tszXStatusMsg); CopySkipUnprintableChars(text, text, text_size - 1); } } @@ -416,7 +416,7 @@ LBL_Status: ptrT tszXStatusName(db_get_tsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); if (tszXStatusName != NULL && tszXStatusName[0] != 0) { TCHAR *tmp = NEWTSTR_ALLOCA(text); - mir_sntprintf(text, text_size, _T("%s: %s"), tszXStatusName, tmp); + mir_sntprintf(text, text_size, L"%s: %s", tszXStatusName, tmp); CopySkipUnprintableChars(text, text, text_size - 1); } } @@ -457,7 +457,7 @@ LBL_Status: if (pdnce->hTimeZone) { // Get pdnce time text[0] = 0; - TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), text, text_size, 0); + TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", text, text_size, 0); } return TEXT_CONTACT_TIME; } @@ -486,7 +486,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) if (mir_tstrcmpi(name, nick) == 0) mir_tstrncpy(contact->szText, name, _countof(contact->szText)); else // Append then - mir_sntprintf(contact->szText, _T("%s - %s"), name, nick); + mir_sntprintf(contact->szText, L"%s - %s", name, nick); } else mir_tstrncpy(contact->szText, name, _countof(contact->szText)); } @@ -570,21 +570,21 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size) *cp = 0; //remove bbcodes: [b] [i] [u] <b> <i> <u> - RemoveTag(to, _T("[b]")); RemoveTag(to, _T("[/b]")); - RemoveTag(to, _T("[u]")); RemoveTag(to, _T("[/u]")); - RemoveTag(to, _T("[i]")); RemoveTag(to, _T("[/i]")); + RemoveTag(to, L"[b]"); RemoveTag(to, L"[/b]"); + RemoveTag(to, L"[u]"); RemoveTag(to, L"[/u]"); + RemoveTag(to, L"[i]"); RemoveTag(to, L"[/i]"); - RemoveTag(to, _T("<b>")); RemoveTag(to, _T("</b>")); - RemoveTag(to, _T("<u>")); RemoveTag(to, _T("</u>")); - RemoveTag(to, _T("<i>")); RemoveTag(to, _T("</i>")); + RemoveTag(to, L"<b>"); RemoveTag(to, L"</b>"); + RemoveTag(to, L"<u>"); RemoveTag(to, L"</u>"); + RemoveTag(to, L"<i>"); RemoveTag(to, L"</i>"); - RemoveTag(to, _T("[B]")); RemoveTag(to, _T("[/b]")); - RemoveTag(to, _T("[U]")); RemoveTag(to, _T("[/u]")); - RemoveTag(to, _T("[I]")); RemoveTag(to, _T("[/i]")); + RemoveTag(to, L"[B]"); RemoveTag(to, L"[/b]"); + RemoveTag(to, L"[U]"); RemoveTag(to, L"[/u]"); + RemoveTag(to, L"[I]"); RemoveTag(to, L"[/i]"); - RemoveTag(to, _T("<B>")); RemoveTag(to, _T("</B>")); - RemoveTag(to, _T("<U>")); RemoveTag(to, _T("</U>")); - RemoveTag(to, _T("<I>")); RemoveTag(to, _T("</I>")); + RemoveTag(to, L"<B>"); RemoveTag(to, L"</B>"); + RemoveTag(to, L"<U>"); RemoveTag(to, L"</U>"); + RemoveTag(to, L"<I>"); RemoveTag(to, L"</I>"); return i; } @@ -669,7 +669,7 @@ void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact) else height_clip = width_clip * ace->bmHeight / ace->bmWidth; - if (wildcmpit(contact->avatar_data->szFilename, _T("*.gif"))) { + if (wildcmpit(contact->avatar_data->szFilename, L"*.gif")) { if (old_pos == AVATAR_POS_ANIMATED) AniAva_RemoveAvatar(contact->hContact); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 5113cd4013..ebc88e2976 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1216,7 +1216,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (shortGroup) {
NeedRename = TRUE;
if (sourceGrName)
- mir_sntprintf(newName, _T("%s\\%s"), sourceGrName, shortGroup);
+ mir_sntprintf(newName, L"%s\\%s", sourceGrName, shortGroup);
else
mir_tstrncpy(newName, shortGroup, _countof(newName));
}
@@ -1558,7 +1558,7 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) HookEvent(ME_MODERNOPT_INITIALIZE, ModernSkinOptInit);
HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
- hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Modern contact list"), MIRANDA_PATHT _T("\\") _T(DEFAULT_SKIN_FOLDER));
+ hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Modern contact list"), MIRANDA_PATHT L"\\" _T(DEFAULT_SKIN_FOLDER));
FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
// Get icons
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 889effd163..03259dd5a0 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -436,7 +436,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
TCHAR szGroupMask[256];
- mir_sntprintf(szGroupMask, _T("%s|"), tszGroup);
+ mir_sntprintf(szGroupMask, L"%s|", tszGroup);
filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0));
}
else if (g_CluiData.filterFlags & CLVM_INCLUDED_UNGROUPED)
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 6a42da09a6..5c98b322f1 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -52,16 +52,16 @@ struct FontOptionsList { char size;
};
-#define CLCGROUP LPGENT("Contact list") _T("/") LPGENT("Contact names")
-#define CLCLINESGROUP LPGENT("Contact list") _T("/") LPGENT("Row items")
-#define CLCFRAMESGROUP LPGENT("Contact list") _T("/") LPGENT("Frame texts")
-#define CLCCOLOURSGROUP LPGENT("Contact list") _T("/") LPGENT("Special colors")
+#define CLCGROUP LPGENT("Contact list") L"/" LPGENT("Contact names")
+#define CLCLINESGROUP LPGENT("Contact list") L"/" LPGENT("Row items")
+#define CLCFRAMESGROUP LPGENT("Contact list") L"/" LPGENT("Frame texts")
+#define CLCCOLOURSGROUP LPGENT("Contact list") L"/" LPGENT("Special colors")
#define DEFAULT_COLOUR RGB(0, 0, 0)
#define DEFAULT_GREYCOLOUR RGB(128, 128, 128)
#define DEFAULT_BACKCOLOUR RGB(255, 255, 255)
-#define DEFAULT_FAMILY _T("Arial")
+#define DEFAULT_FAMILY L"Arial"
#define DEFAULT_EFFECT { 0, 0x00000000, 0x00000000 }
#define DEFAULT_SIZE -11
@@ -1159,7 +1159,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP g_mutex_bChangingMode = TRUE;
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (IsWindow(hProgMan)) {
SetParent(pcli->hwndContactList, hProgMan);
Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
@@ -1380,7 +1380,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;
@@ -1786,7 +1786,7 @@ int ModernOptInit(WPARAM wParam, LPARAM) obj.iSection = MODERNOPT_PAGE_CLIST;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
obj.iBoldControls = iBoldControls;
- obj.lptzSubsection = _T("Fonts");
+ obj.lptzSubsection = L"Fonts";
obj.lpzClassicGroup = NULL;
obj.lpzClassicPage = "Contact list";
obj.lpzHelpUrl = "http://wiki.miranda-ng.org/";
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 8f31531595..deebf09991 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -426,12 +426,12 @@ void CLCPaint::_DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, TCHA i = 0;
// Get real height of the line
- row_height = ske_DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat);
+ row_height = ske_DrawText(hdcMem, L"A", 1, &tmp_rc, DT_CALCRECT | uTextFormat);
// Just draw ellipsis
if (free_rc->right <= free_rc->left) {
if (gl_TrimText)
- ske_DrawText(hdcMem, _T("..."), 3, free_rc, uTextFormat & ~DT_END_ELLIPSIS);
+ ske_DrawText(hdcMem, L"...", 3, free_rc, uTextFormat & ~DT_END_ELLIPSIS);
}
else {
// Draw text and smileys
@@ -486,7 +486,7 @@ void CLCPaint::_DrawTextSmiley(HDC hdcMem, RECT *free_rc, SIZE * text_size, TCHA fac_width, fac_height, 0, NULL, DI_NORMAL | ((factor < 1) ? 128 : 0)); //TO DO enchance drawing quality
}
else {
- ske_DrawText(hdcMem, _T("..."), 3, &text_rc, uTextFormat);
+ ske_DrawText(hdcMem, L"...", 3, &text_rc, uTextFormat);
}
pos_x += fac_width;
@@ -786,7 +786,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (szCounts && mir_tstrlen(szCounts) > 0) {
// calc width and height
ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS, NULL);
- ske_DrawText(hdcMem, _T(" "), 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
+ ske_DrawText(hdcMem, L" ", 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
count_size.cx = count_rc.right - count_rc.left;
space_width = count_size.cx;
count_rc.right = 0;
@@ -863,7 +863,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R SIZE counts_size = { 0 };
// Get widths
counts_rc = fr_rc;
- DrawText(hdcMem, _T(" "), 1, &space_rc, DT_CALCRECT | DT_NOPREFIX);
+ DrawText(hdcMem, L" ", 1, &space_rc, DT_CALCRECT | DT_NOPREFIX);
space_size.cx = space_rc.right - space_rc.left;
space_size.cy = min(space_rc.bottom - space_rc.top, fr_rc.bottom - fr_rc.top);
@@ -1007,7 +1007,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (szCounts && mir_tstrlen(szCounts) > 0) {
// calc width and height
ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS, NULL);
- ske_DrawText(hdcMem, _T(" "), 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
+ ske_DrawText(hdcMem, L" ", 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
count_size.cx = count_rc.right - count_rc.left;
space_width = count_size.cx;
count_rc.right = 0;
@@ -1080,10 +1080,10 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (dat->secondLine.show && dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = _T("");
+ TCHAR buf[70] = L"";
mir_free_and_nil(pdnce->szSecondLineText);
- TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
+ TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
pdnce->szSecondLineText = mir_tstrdup(buf);
}
@@ -1108,10 +1108,10 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (dat->thirdLine.show && dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = _T("");
+ TCHAR buf[70] = L"";
mir_free(pdnce->szThirdLineText);
- TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
+ TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
pdnce->szThirdLineText = mir_tstrdup(buf);
}
@@ -1392,7 +1392,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R case TC_TIME:
TCHAR szResult[80];
- if (!TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), szResult, _countof(szResult), 0)) {
+ if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL);
ske_DrawText(hdcMem, szResult, (int)mir_tstrlen(szResult), &p_rect, DT_NOPREFIX | DT_SINGLELINE | (dat->text_rtl ? DT_RTLREADING : 0));
@@ -2105,7 +2105,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (Drawing->type == CLCIT_CONTACT && dat->contact_time_show && pdnce->hTimeZone) {
TCHAR szResult[80];
- if (!TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), szResult, _countof(szResult), 0)) {
+ if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL);
@@ -2206,7 +2206,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT free_height = free_row_rc.bottom - free_row_rc.top;
// Get widths
- ske_DrawText(hdcMem, _T(" "), 1, &space_rc, DT_CALCRECT | DT_NOPREFIX);
+ ske_DrawText(hdcMem, L" ", 1, &space_rc, DT_CALCRECT | DT_NOPREFIX);
SIZE space_size;
space_size.cx = space_rc.right - space_rc.left;
@@ -2265,8 +2265,8 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (dat->secondLine.show) {
if (dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = _T("");
- TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
+ TCHAR buf[70] = L"";
+ TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
replaceStrT(pdnce->szSecondLineText, buf);
}
@@ -2298,8 +2298,8 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (dat->thirdLine.show) {
if (dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
- TCHAR buf[70] = _T("");
- TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
+ TCHAR buf[70] = L"";
+ TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
replaceStrT(pdnce->szThirdLineText, buf);
}
if (pdnce->szThirdLineText != NULL && pdnce->szThirdLineText[0] && free_height > dat->thirdLine.top_space) {
@@ -2723,7 +2723,7 @@ void CLCPaint::_DrawContactTime(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R if (!pdnce)
return;
- if (!TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), szResult, _countof(szResult), 0)) {
+ if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
// Select font
ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, NULL);
ske_DrawText(hdcMem, szResult, (int)mir_tstrlen(szResult), prcItem, DT_NOPREFIX | DT_SINGLELINE);
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 51d242579d..d65e2f32bc 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -281,9 +281,9 @@ void cliBeginRenameSelection(HWND hwnd, ClcData *dat) if (dat->text_rtl)
a |= EN_ALIGN_RTL_EC;
if (contact->type == CLCIT_GROUP)
- dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, NULL, g_hInst, NULL);
+ dat->hwndRenameEdit = CreateWindow(L"EDIT", contact->szText, WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, NULL, g_hInst, NULL);
else
- dat->hwndRenameEdit = CreateWindow(_T("EDIT"), pcli->pfnGetContactDisplayName(contact->hContact, 0), WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, NULL, g_hInst, NULL);
+ dat->hwndRenameEdit = CreateWindow(L"EDIT", pcli->pfnGetContactDisplayName(contact->hContact, 0), WS_POPUP | WS_BORDER | ES_AUTOHSCROLL | a, x, y, w, h, hwnd, NULL, g_hInst, NULL);
SetWindowLongPtr(dat->hwndRenameEdit, GWL_STYLE, GetWindowLongPtr(dat->hwndRenameEdit, GWL_STYLE)&(~WS_CAPTION) | WS_BORDER);
SetWindowLongPtr(dat->hwndRenameEdit, GWLP_USERDATA, (LONG_PTR)dat);
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 8bb268aae1..0c05a92028 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -119,7 +119,7 @@ CListEvent* cli_AddEvent(CLISTEVENT *cle) TCHAR szwProto[64];
MultiByteToWideChar(CP_ACP, 0, szProto, -1, szwProto, 64);
szwProto[63] = 0;
- mir_sntprintf(szBuffer, _T("%s: %s (%s)"), szwProto, szName, szStatus);
+ mir_sntprintf(szBuffer, L"%s: %s (%s)", szwProto, szName, szStatus);
szBuffer[127] = 0;
AppendMenu(g_CluiData.hMenuNotify, MF_BYCOMMAND | MF_STRING, g_CluiData.wNextMenuID, szBuffer);
mii.hbmpItem = HBMMENU_CALLBACK;
@@ -488,7 +488,7 @@ int EventArea_Create(HWND hCluiWnd) ehhEventAreaBackgroundSettingsChanged(0, 0);
WNDCLASS wndclass = { 0 };
- TCHAR pluginname[] = _T("EventArea");
+ TCHAR pluginname[] = L"EventArea";
int h = GetSystemMetrics(SM_CYSMICON) + 2;
if (GetClassInfo(g_hInst, pluginname, &wndclass) == 0) {
wndclass.style = 0;
@@ -513,7 +513,7 @@ int EventArea_Create(HWND hCluiWnd) Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
Frame.height = h;
- Frame.tname = _T("EventArea"); //do not translate
+ Frame.tname = L"EventArea"; //do not translate
Frame.TBtname = TranslateT("Event area");
hNotifyFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
CallService(MS_SKINENG_REGISTERPAINTSUB, (WPARAM)Frame.hWnd, (LPARAM)EventArea_PaintCallbackProc); //$$$$$ register sub for frame
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 1eef9fc23e..92dde8c3c1 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -88,7 +88,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) if (!bContactRate)
tszName = FAVMENUROOTNAME;
else
- tszName.Format(_T("%s (%s)"), TranslateTS(FAVMENUROOTNAME), TranslateTS(rates[bContactRate]));
+ tszName.Format(L"%s (%s)", TranslateTS(FAVMENUROOTNAME), TranslateTS(rates[bContactRate]));
Menu_ModifyItem(hFavoriteContactMenu, tszName);
for (int i = 0; i < _countof(rates); i++)
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 37723a8279..0a92bb92cc 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -306,7 +306,7 @@ HRESULT CLUI::LoadDllsRuntime() g_CluiData.fLayered = (g_CluiData.fLayered*db_get_b(NULL, "ModernData", "EnableLayering", g_CluiData.fLayered)) && !db_get_b(NULL, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT);
if (IsWinVerVistaPlus()) {
- m_hDwmapiDll = LoadLibrary(_T("dwmapi.dll"));
+ m_hDwmapiDll = LoadLibrary(L"dwmapi.dll");
if (m_hDwmapiDll)
g_proc_DWMEnableBlurBehindWindow = (HRESULT(WINAPI *)(HWND, DWM_BLURBEHIND *))GetProcAddress(m_hDwmapiDll, "DwmEnableBlurBehindWindow");
}
@@ -348,7 +348,7 @@ HRESULT CLUI::RegisterAvatarMenu() HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
{
- pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), _T(""),
+ pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), L"",
WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST
| (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
| (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0)
@@ -712,7 +712,7 @@ void CLUI_ChangeWindowMode() // 6 - Pin to desktop mode
if (db_get_b(NULL, "CList", "OnDesktop", SETTING_ONDESKTOP_DEFAULT)) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (IsWindow(hProgMan)) {
SetParent(pcli->hwndContactList, hProgMan);
Sync(CLUIFrames_SetParentForContainers, (HWND)hProgMan);
@@ -893,7 +893,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) if (szAccoName) {
// first of all try to find by account name( or empty - global )
- mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, szAccoName);
+ mir_sntprintf(fileFull, L"%s\\Icons\\proto_conn_%S.dll", tszFolderPath, szAccoName);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
@@ -901,7 +901,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) // second try to find by protocol name
PROTOACCOUNT *acc = Proto_GetAccount(szAccoName);
if (acc && !acc->bOldProto) {
- mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn_%S.dll"), tszFolderPath, acc->szProtoName);
+ mir_sntprintf(fileFull, L"%s\\Icons\\proto_conn_%S.dll", tszFolderPath, acc->szProtoName);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
}
@@ -909,7 +909,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) }
// third try global
- mir_sntprintf(fileFull, _T("%s\\Icons\\proto_conn.dll"), tszFolderPath);
+ mir_sntprintf(fileFull, L"%s\\Icons\\proto_conn.dll", tszFolderPath);
if (count = ExtractIconEx(fileFull, -1, NULL, NULL, 1))
return count;
@@ -919,7 +919,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) static HICON CLUI_LoadIconFromExternalFile(TCHAR *filename, int i)
{
TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH];
- mir_sntprintf(szPath, _T("Icons\\%s"), filename);
+ mir_sntprintf(szPath, L"Icons\\%s", filename);
PathToAbsoluteT(szPath, szFullPath);
if (_taccess(szPath, 0))
return NULL;
@@ -935,7 +935,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx) HICON hIcon;
if (szAccoName) {
- mir_sntprintf(szFullPath, _T("proto_conn_%S.dll"), szAccoName);
+ mir_sntprintf(szFullPath, L"proto_conn_%S.dll", szAccoName);
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
@@ -943,7 +943,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx) // second try to find by protocol name
PROTOACCOUNT *acc = Proto_GetAccount(szAccoName);
if (acc && !acc->bOldProto) {
- mir_sntprintf(szFullPath, _T("proto_conn_%S.dll"), acc->szProtoName);
+ mir_sntprintf(szFullPath, L"proto_conn_%S.dll", acc->szProtoName);
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
}
@@ -951,7 +951,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int idx) }
// third try global
- mir_tstrncpy(szFullPath, _T("proto_conn.dll"), _countof(szFullPath));
+ mir_tstrncpy(szFullPath, L"proto_conn.dll", _countof(szFullPath));
if (hIcon = CLUI_LoadIconFromExternalFile(szFullPath, idx))
return hIcon;
@@ -1500,7 +1500,7 @@ BOOL cliInvalidateRect(HWND hWnd, CONST RECT* lpRect, BOOL bErase) static BOOL FileExists(TCHAR * tszFilename)
{
- FILE * f = _tfopen(tszFilename, _T("r"));
+ FILE * f = _tfopen(tszFilename, L"r");
if (f == NULL) return FALSE;
fclose(f);
return TRUE;
@@ -1897,7 +1897,7 @@ LRESULT CLUI::OnCreate(UINT, WPARAM, LPARAM) mii.dwItemData = MENU_MINIMIZE;
SetMenuItemInfo(GetMenu(m_hWnd), 2, TRUE, &mii);
- uMsgGetProfile = RegisterWindowMessage(_T("Miranda::GetProfile")); // don't localise
+ uMsgGetProfile = RegisterWindowMessage(L"Miranda::GetProfile"); // don't localise
bTransparentFocus = 1;
return FALSE;
}
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 816294ea61..33c21ce24c 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -71,7 +71,7 @@ DWORD CompareContacts2_getLMTime(MCONTACT hContact) }
#define SAFESTRING(a) a?a:""
-#define SAFETSTRING(a) a?a:_T("")
+#define SAFETSTRING(a) a?a:L""
int GetProtoIndex(char * szName)
{
diff --git a/plugins/Clist_modern/src/modern_effectenum.h b/plugins/Clist_modern/src/modern_effectenum.h index b15c4a1f11..28f30beaf8 100644 --- a/plugins/Clist_modern/src/modern_effectenum.h +++ b/plugins/Clist_modern/src/modern_effectenum.h @@ -25,13 +25,13 @@ TCHAR * ModernEffectNames[] = TCHAR * _ModernEffectNames[] =
#endif
{
- _T("Shadow at left"),
- _T("Shadow at right"),
- _T("Outline"),
- _T("Outline smooth"),
- _T("Smooth bump"),
- _T("Contour thin"),
- _T("Contour heavy"),
+ L"Shadow at left",
+ L"Shadow at right",
+ L"Outline",
+ L"Outline smooth",
+ L"Smooth bump",
+ L"Contour thin",
+ L"Contour heavy",
};
#ifdef _EFFECTENUM_FULL_H
diff --git a/plugins/Clist_modern/src/modern_newrowopts.cpp b/plugins/Clist_modern/src/modern_newrowopts.cpp index 159698e21a..1597927b16 100644 --- a/plugins/Clist_modern/src/modern_newrowopts.cpp +++ b/plugins/Clist_modern/src/modern_newrowopts.cpp @@ -171,7 +171,7 @@ BOOL CALLBACK DlgProcItemNewRowOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPara TRACE("*********** Nodes DUMP 2 ***********\n");
TraceTreeLevel(RootNode);
//CheckDlgButton(hwndDlg, IDC_HIDE_ICON_ON_AVATAR, db_get_b(NULL,"CList","IconHideOnAvatar",SETTING_HIDEICONONAVATAR_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
- MessageBox(hwndDlg, _T("Init NewRow Dialog"), _T("Notify"), MB_OK);
+ MessageBox(hwndDlg, L"Init NewRow Dialog", L"Notify", MB_OK);
break;
}
case WM_NOTIFY:
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index b3b7f48f2f..fbe18a6583 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -113,7 +113,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) RECT count_rc = { 0 };
// calc width and height
g_clcPainter.ChangeToFont(hdc, dat, contact->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS, NULL);
- ske_DrawText(hdc, _T(" "), 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
+ ske_DrawText(hdc, L" ", 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
size.cx += count_rc.right - count_rc.left;
count_rc.right = 0;
count_rc.left = 0;
@@ -241,7 +241,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) if (item == -1) {
TCHAR szResult[80];
- if (!TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), szResult, _countof(szResult), 0)) {
+ if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
SIZE text_size = { 0 };
RECT rc = { 0 };
// Select font
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index 097d889042..902812a8de 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -29,10 +29,10 @@ static char* rowOptTmplStr; static ROWCELL* rowOptTmplRoot;
static ROWCELL* rowOptTA[100];
TCHAR *types[] = {
- _T("none"), _T("text1"), _T("text2"), _T("text3"), _T("status"),
- _T("avatar"), _T("extra"), _T("extra1"), _T("extra2"), _T("extra3"),
- _T("extra4"), _T("extra5"), _T("extra6"), _T("extra7"), _T("extra8"),
- _T("extra9"), _T("time"), _T("space"), _T("fspace")
+ L"none", L"text1", L"text2", L"text3", L"status",
+ L"avatar", L"extra", L"extra1", L"extra2", L"extra3",
+ L"extra4", L"extra5", L"extra6", L"extra7", L"extra8",
+ L"extra9", L"time", L"space", L"fspace"
};
RECT da = { 205, 58, 440, 130 }; // Draw area
@@ -136,10 +136,10 @@ void rowOptGenerateTreeView(pROWCELL cell, HTREEITEM node, HWND hwnd) switch (cell->cont) {
case TC_ROW:
- tvis.item.pszText = _T("Line");
+ tvis.item.pszText = L"Line";
break;
case TC_COL:
- tvis.item.pszText = _T("Column");
+ tvis.item.pszText = L"Column";
}
tvis.item.iImage = cell->child ? 1 : 2;
@@ -171,7 +171,7 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti) rowAddCell(rowOptTmplRoot, TC_ROW);
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_ROOT;
- tvis.item.pszText = _T("Line");
+ tvis.item.pszText = L"Line";
tvis.item.lParam = (LPARAM)rowOptTmplRoot;
cell = rowOptTmplRoot;
}
@@ -183,9 +183,9 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti) cell = (pROWCELL)tviparent.lParam;
if (cell->cont == TC_ROW)
- tvis.item.pszText = _T("Column");
+ tvis.item.pszText = L"Column";
else
- tvis.item.pszText = _T("Line");
+ tvis.item.pszText = L"Line";
if (cell->child) {
cell = cell->child;
@@ -362,14 +362,14 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
SendDlgItemMessage(hwndDlg, IDC_CONTTYPE, CB_SETCURSEL, 0, 0);
- TCHAR *h_alignment[] = { _T("left"), _T("hCenter"), _T("right") };
+ TCHAR *h_alignment[] = { L"left", L"hCenter", L"right" };
for (i = 0; i < _countof(h_alignment); i++) {
item = SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(h_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETITEMDATA, item, 0);
}
SendDlgItemMessage(hwndDlg, IDC_HALIGN, CB_SETCURSEL, 0, 0);
- TCHAR *v_alignment[] = { _T("top"), _T("vCenter"), _T("bottom") };
+ TCHAR *v_alignment[] = { L"top", L"vCenter", L"bottom" };
for (i = 0; i < _countof(v_alignment); i++) {
item = SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_ADDSTRING, 0, (LPARAM)TranslateTS(v_alignment[i]));
SendDlgItemMessage(hwndDlg, IDC_VALIGN, CB_SETITEMDATA, item, 0);
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index e6c9db1ace..e6c325481e 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -126,7 +126,7 @@ IniParser::IniParser(TCHAR * tcsFileName, BYTE flags) : _Flags(flags) return; } - _hFile = _tfopen(tcsFileName, _T("r")); + _hFile = _tfopen(tcsFileName, L"r"); if (_hFile != NULL) { _eType = IT_FILE; _isValid = true; @@ -215,9 +215,9 @@ int IniParser::GetSkinFolder(IN const TCHAR * szFileName, OUT TCHAR * pszFolderN while (b3 > custom_folder && *b3 != _T('\\')) { b3--; } *b3 = _T('\0'); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("SkinFolder"), _T(""), cus, _countof(custom_folder), szFileName); + GetPrivateProfileString(L"Skin_Description_Section", L"SkinFolder", L"", cus, _countof(custom_folder), szFileName); if (cus[0] != 0) - mir_sntprintf(pszFolderName, MAX_PATH, _T("%s\\%s"), custom_folder, cus); + mir_sntprintf(pszFolderName, MAX_PATH, L"%s\\%s", custom_folder, cus); mir_free(szBuff); PathToRelativeT(pszFolderName, pszFolderName); @@ -1471,11 +1471,11 @@ int ske_GetFullFilename(TCHAR *buf, const TCHAR *file, TCHAR *skinfolder, BOOL m { TCHAR *SkinPlace = db_get_tsa(NULL, SKIN, "SkinFolder"); if (SkinPlace == NULL) - SkinPlace = mir_tstrdup(_T("\\Skin\\default")); + SkinPlace = mir_tstrdup(L"\\Skin\\default"); TCHAR b2[MAX_PATH]; if (file[0] != '\\' && file[1] != ':') - mir_sntprintf(b2, _T("%s\\%s"), (skinfolder == NULL) ? SkinPlace : ((INT_PTR)skinfolder != -1) ? skinfolder : _T(""), file); + mir_sntprintf(b2, L"%s\\%s", (skinfolder == NULL) ? SkinPlace : ((INT_PTR)skinfolder != -1) ? skinfolder : L"", file); else mir_tstrncpy(b2, file, _countof(b2)); @@ -1564,9 +1564,9 @@ static HBITMAP ske_LoadGlyphImage_TGA(const TCHAR *szFilename) BOOL err = FALSE; tga_header_t header; if (!szFilename) return NULL; - if (!wildcmpit(szFilename, _T("*\\*%.tga"))) { + if (!wildcmpit(szFilename, L"*\\*%.tga")) { //Loading TGA image from file - FILE *fp = _tfopen(szFilename, _T("rb")); + FILE *fp = _tfopen(szFilename, L"rb"); if (!fp) { TRACEVAR("error: couldn't open \"%s\"!\n", szFilename); return NULL; @@ -1631,7 +1631,7 @@ static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName) HBITMAP hBitmap; bool f = false; - if (!mir_tstrcmpi(ext, _T(".tga"))) { + if (!mir_tstrcmpi(ext, L".tga")) { hBitmap = ske_LoadGlyphImage_TGA(tszFileName); f = true; } @@ -1663,7 +1663,7 @@ static HBITMAP ske_LoadGlyphImageByDecoders(const TCHAR *tszFileName) static HBITMAP ske_skinLoadGlyphImage(const TCHAR *tszFileName) { - if (!wildcmpit(tszFileName, _T("*.tga"))) + if (!wildcmpit(tszFileName, L"*.tga")) return GDIPlus_LoadGlyphImage(tszFileName); return ske_LoadGlyphImageByDecoders(tszFileName); @@ -1918,7 +1918,7 @@ static int ske_GetSkinFromDB(char *, SKINOBJECTSLIST *Skin) if (Skin->szSkinPlace && _tcschr(Skin->szSkinPlace, '%')) bOnlyObjects = TRUE; mir_free(Skin->szSkinPlace); - Skin->szSkinPlace = mir_tstrdup(_T("%Default%")); + Skin->szSkinPlace = mir_tstrdup(L"%Default%"); ske_LoadSkinFromResource(bOnlyObjects); } @@ -2275,7 +2275,7 @@ static int ske_AlphaTextOut(HDC hDC, LPCTSTR lpString, int nCount, RECT *lpRect, lpWorkString = (TCHAR*)mir_alloc((visibleCharCount + 4) * sizeof(TCHAR)); memcpy((void*)lpWorkString, lpString, visibleCharCount * sizeof(TCHAR)); - memcpy((void*)(lpWorkString + visibleCharCount), _T("..."), 4 * sizeof(TCHAR)); // 3 + 1 + memcpy((void*)(lpWorkString + visibleCharCount), L"...", 4 * sizeof(TCHAR)); // 3 + 1 nCount = visibleCharCount + 3; } @@ -3311,8 +3311,8 @@ static TCHAR *ske_ReAppend(TCHAR *lfirst, TCHAR * lsecond, int len) TCHAR* ske_ReplaceVar(TCHAR *var) { - if (!var) return mir_tstrdup(_T("")); - if (!mir_tstrcmpi(var, _T("Profile"))) { + if (!var) return mir_tstrdup(L""); + if (!mir_tstrcmpi(var, L"Profile")) { char buf[MAX_PATH] = { 0 }; CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)buf); @@ -3324,7 +3324,7 @@ TCHAR* ske_ReplaceVar(TCHAR *var) } mir_free(var); - return mir_tstrdup(_T("")); + return mir_tstrdup(L""); } TCHAR *ske_ParseText(TCHAR *stzText) @@ -3355,7 +3355,7 @@ TCHAR *ske_ParseText(TCHAR *stzText) result = ske_ReAppend(result, var, 0); mir_free(var); } - else result = ske_ReAppend(result, _T("%"), 0); + else result = ske_ReAppend(result, L"%", 0); curpos++; stpos = curpos; diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 3c116d4b84..3be1b39192 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -70,7 +70,7 @@ int ModernSkinOptInit(WPARAM wParam, LPARAM) obj.hInstance = g_hInst; obj.iSection = MODERNOPT_PAGE_SKINS; obj.iType = MODERNOPT_TYPE_SELECTORPAGE; - obj.lptzSubsection = _T("Contact list"); + obj.lptzSubsection = L"Contact list"; obj.lpzThemeExtension = ".msf"; obj.lpzThemeModuleName = "ModernSkinSel"; CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj); @@ -119,10 +119,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TCHAR Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; if (!_tcschr(sd->File, _T('%'))) { - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Author"), TranslateT("( unknown )"), Author, _countof(Author), sd->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("URL"), _T(""), URL, _countof(URL), sd->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Contact"), _T(""), Contact, _countof(Contact), sd->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Description"), _T(""), Description, _countof(Description), sd->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Author", TranslateT("( unknown )"), Author, _countof(Author), sd->File); + GetPrivateProfileString(L"Skin_Description_Section", L"URL", L"", URL, _countof(URL), sd->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Contact", L"", Contact, _countof(Contact), sd->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Description", L"", Description, _countof(Description), sd->File); mir_sntprintf(text, TranslateT("%s\n\n%s\n\nAuthor(s):\t %s\nContact:\t %s\nWeb:\t %s\n\nFile:\t %s"), sd->Name, Description, Author, Contact, URL, sd->File); } @@ -131,8 +131,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateT("reVista for Modern v0.5"), TranslateT("This is second default Modern Contact list skin in Vista Aero style"), TranslateT("Angeli-Ka (graphics), FYR (template)"), - _T("JID: fyr@jabber.ru"), - _T("fyr.mirandaim.ru"), + L"JID: fyr@jabber.ru", + L"fyr.mirandaim.ru", TranslateT("Inside library")); } MessageBox(hwndDlg, text, TranslateT("Skin information"), MB_OK | MB_ICONINFORMATION); @@ -259,9 +259,9 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SetDlgItemText(hwndDlg, IDC_EDIT_SKIN_FILENAME, buf); TCHAR prfn[MAX_PATH] = { 0 }, imfn[MAX_PATH] = { 0 }, skinfolder[MAX_PATH] = { 0 }; - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, _countof(imfn), sd->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), sd->File); IniParser::GetSkinFolder(sd->File, skinfolder); - mir_sntprintf(prfn, _T("%s\\%s"), skinfolder, imfn); + mir_sntprintf(prfn, L"%s\\%s", skinfolder, imfn); PathToAbsoluteT(prfn, imfn); hPreviewBitmap = ske_LoadGlyphImage(imfn); @@ -284,10 +284,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TCHAR Author[255], URL[MAX_PATH], Contact[255], Description[400], text[2000]; if (sd2->File && !_tcschr(sd2->File, _T('%'))) { - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Author"), TranslateT("( unknown )"), Author, _countof(Author), sd2->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("URL"), _T(""), URL, _countof(URL), sd2->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Contact"), _T(""), Contact, _countof(Contact), sd2->File); - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Description"), _T(""), Description, _countof(Description), sd2->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Author", TranslateT("( unknown )"), Author, _countof(Author), sd2->File); + GetPrivateProfileString(L"Skin_Description_Section", L"URL", L"", URL, _countof(URL), sd2->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Contact", L"", Contact, _countof(Contact), sd2->File); + GetPrivateProfileString(L"Skin_Description_Section", L"Description", L"", Description, _countof(Description), sd2->File); mir_sntprintf(text, TranslateT("Preview is not available\n\n%s\n----------------------\n\n%s\n\nAUTHOR(S):\n%s\n\nCONTACT:\n%s\n\nHOMEPAGE:\n%s"), sd2->Name, Description, Author, Contact, URL); } @@ -296,8 +296,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateT("reVista for Modern v0.5"), TranslateT("This is second default Modern Contact list skin in Vista Aero style"), TranslateT("graphics by Angeli-Ka\ntemplate by FYR"), - _T("JID: fyr@jabber.ru"), - _T("fyr.mirandaim.ru")); + L"JID: fyr@jabber.ru", + L"fyr.mirandaim.ru"); } ShowWindow(GetDlgItem(hwndDlg, IDC_PREVIEW), SW_HIDE); ShowWindow(GetDlgItem(hwndDlg, IDC_STATIC_INFO), SW_SHOW); @@ -330,7 +330,7 @@ int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder) struct _tfinddata_t fd = { 0 }; TCHAR mask[MAX_PATH]; long hFile; - mir_sntprintf(mask, _T("%s\\*.msf"), Folder); + mir_sntprintf(mask, L"%s\\*.msf", Folder); //fd.attrib = _A_SUBDIR; hFile = _tfindfirst(mask, &fd); if (hFile != -1) { @@ -339,13 +339,13 @@ int SearchSkinFiles(HWND hwndDlg, TCHAR * Folder) } while (!_tfindnext(hFile, &fd)); _findclose(hFile); } - mir_sntprintf(mask, _T("%s\\*"), Folder); + mir_sntprintf(mask, L"%s\\*", Folder); hFile = _tfindfirst(mask, &fd); { do { - if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, _T(".")) == 0 || mir_tstrcmpi(fd.name, _T("..")) == 0)) {//Next level of subfolders + if (fd.attrib&_A_SUBDIR && !(mir_tstrcmpi(fd.name, L".") == 0 || mir_tstrcmpi(fd.name, L"..") == 0)) {//Next level of subfolders TCHAR path[MAX_PATH]; - mir_sntprintf(path, _T("%s\\%s"), Folder, fd.name); + mir_sntprintf(path, L"%s\\%s", Folder, fd.name); SearchSkinFiles(hwndDlg, path); } } while (!_tfindnext(hFile, &fd)); @@ -361,7 +361,7 @@ HTREEITEM FillAvailableSkinList(HWND hwndDlg) int attrib; TreeView_DeleteAllItems(GetDlgItem(hwndDlg, IDC_TREE1)); - AddSkinToList(hwndDlg, TranslateT("Default Skin"), _T("%Default Skin%")); + AddSkinToList(hwndDlg, TranslateT("Default Skin"), L"%Default Skin%"); attrib = GetFileAttributes(SkinsFolder); if (attrib != INVALID_FILE_ATTRIBUTES && (attrib & FILE_ATTRIBUTE_DIRECTORY)) SearchSkinFiles(hwndDlg, SkinsFolder); @@ -403,15 +403,15 @@ HTREEITEM AddSkinToList(HWND hwndDlg, TCHAR * path, TCHAR* file) return 0; if (!file || _tcschr(file, _T('%'))) { - mir_sntprintf(sd->File, _T("%%Default Skin%%")); + mir_sntprintf(sd->File, L"%%Default Skin%%"); mir_sntprintf(sd->Name, TranslateT("%Default Skin%")); _tcsncpy_s(fullName, TranslateT("Default Skin"), _TRUNCATE); } else { - mir_sntprintf(fullName, _T("%s\\%s"), path, file); + mir_sntprintf(fullName, L"%s\\%s", path, file); _tcsncpy_s(defskinname, file, _TRUNCATE); TCHAR *p = _tcsrchr(defskinname, '.'); if (p) *p = 0; - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Name"), defskinname, sd->Name, _countof(sd->Name), fullName); + GetPrivateProfileString(L"Skin_Description_Section", L"Name", defskinname, sd->Name, _countof(sd->Name), fullName); _tcsncpy_s(sd->File, fullName, _TRUNCATE); } return AddItemToTree(GetDlgItem(hwndDlg, IDC_TREE1), sd->Name, sd); @@ -522,9 +522,9 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) TCHAR prfn[MAX_PATH] = { 0 }; TCHAR imfn[MAX_PATH] = { 0 }; TCHAR skinfolder[MAX_PATH] = { 0 }; - GetPrivateProfileString(_T("Skin_Description_Section"), _T("Preview"), _T(""), imfn, _countof(imfn), (LPCTSTR)lParam); + GetPrivateProfileString(L"Skin_Description_Section", L"Preview", L"", imfn, _countof(imfn), (LPCTSTR)lParam); IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder); - mir_sntprintf(prfn, _T("%s\\%s"), skinfolder, imfn); + mir_sntprintf(prfn, L"%s\\%s", skinfolder, imfn); PathToAbsoluteT(prfn, imfn); hPreviewBitmap = ske_LoadGlyphImage(imfn); diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 4eca4f67b4..ade67318a6 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -241,7 +241,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) int nEmails = (int)CallProtoService(szProto, PS_GETUNREADEMAILCOUNT, 0, 0);
if (nEmails > 0) {
TCHAR str[40];
- mir_sntprintf(str, _T("[%d]"), nEmails);
+ mir_sntprintf(str, L"[%d]", nEmails);
p->szProtoEMailCount = mir_tstrdup(str);
}
}
@@ -815,7 +815,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa }
}
- SaveViewMode(filterName, _T(""), g_CluiData.protoFilter, 0, -1, 0, 0, 0, 0);
+ SaveViewMode(filterName, L"", g_CluiData.protoFilter, 0, -1, 0, 0, 0, 0);
ApplyViewMode(filterName);
}
@@ -861,7 +861,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa return DefWindowProc(hwnd, msg, wParam, lParam);
}
-TCHAR pluginname[] = _T("ModernStatusBar");
+TCHAR pluginname[] = L"ModernStatusBar";
HWND StatusBar_Create(HWND parent)
{
@@ -887,7 +887,7 @@ HWND StatusBar_Create(HWND parent) if (db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT))
Frame.Flags |= F_VISIBLE;
Frame.height = h;
- Frame.tname = _T("Status bar");
+ Frame.tname = L"Status bar";
Frame.TBtname = TranslateT("Status bar");
hFramehModernStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
CallService(MS_SKINENG_REGISTERPAINTSUB, (WPARAM)Frame.hWnd, (LPARAM)NewStatusPaintCallbackProc); //$$$$$ register sub for frame
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 52c2b1fcc5..051ec14f57 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -69,13 +69,13 @@ void Modern_InitButtons() char buf[255];
if (i != 0) {
mir_snprintf(buf, "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_dn");
- tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, _T("icons\\toolbar_icons.dll"), BTNS[i].icoDefIdx, g_hInst, BTNS[i].defResource);
+ tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, L"icons\\toolbar_icons.dll", BTNS[i].icoDefIdx, g_hInst, BTNS[i].defResource);
}
else tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, NULL, 0, NULL, SKINICON_OTHER_MAINMENU);
if (BTNS[i].pszTooltipDn) {
mir_snprintf(buf, "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_up");
- tbb.hIconHandleDn = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipDn, _T("icons\\toolbar_icons.dll"), BTNS[i].icoDefIdx + 1, g_hInst, BTNS[i].defResource2);
+ tbb.hIconHandleDn = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipDn, L"icons\\toolbar_icons.dll", BTNS[i].icoDefIdx + 1, g_hInst, BTNS[i].defResource2);
}
else tbb.hIconHandleDn = NULL;
}
@@ -279,7 +279,7 @@ void CustomizeToolbar(HWND hwnd) ModernToolbarCtrl* pMTBInfo = (ModernToolbarCtrl*)GetWindowLongPtr(hwnd, 0);
CLISTFrame Frame = { sizeof(Frame) };
- Frame.tname = _T("Toolbar");
+ Frame.tname = L"Toolbar";
Frame.hWnd = hwnd;
Frame.align = alTop;
Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR | F_NO_SUBCONTAINER;
diff --git a/plugins/Clist_modern/src/modern_utils.cpp b/plugins/Clist_modern/src/modern_utils.cpp index 03152cbf9a..469836c255 100644 --- a/plugins/Clist_modern/src/modern_utils.cpp +++ b/plugins/Clist_modern/src/modern_utils.cpp @@ -42,7 +42,7 @@ void TRACE_ERROR() return;
}
#ifdef _DEBUG
- MessageBox(NULL, (LPCTSTR)lpMsgBuf, _T("Error"), MB_OK | MB_ICONINFORMATION);
+ MessageBox(NULL, (LPCTSTR)lpMsgBuf, L"Error", MB_OK | MB_ICONINFORMATION);
DebugBreak();
#endif
LocalFree(lpMsgBuf);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 0afc589a10..7124d3f4b4 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -372,7 +372,7 @@ void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szPr void SaveState()
{
- TCHAR newGroupFilter[2048] = _T("|");
+ TCHAR newGroupFilter[2048] = L"|";
char newProtoFilter[2048] = "|";
DWORD statusMask = 0;
DWORD operators = 0;
@@ -414,7 +414,7 @@ void SaveState() item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
mir_tstrncat(newGroupFilter, szTemp, _countof(newGroupFilter) - mir_tstrlen(newGroupFilter));
- mir_tstrncat(newGroupFilter, _T("|"), _countof(newGroupFilter) - mir_tstrlen(newGroupFilter));
+ mir_tstrncat(newGroupFilter, L"|", _countof(newGroupFilter) - mir_tstrlen(newGroupFilter));
newGroupFilter[2047] = 0;
}
}
@@ -561,7 +561,7 @@ static void UpdateFilters() for (i = 1; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- mir_sntprintf(szMask, _T("%s|"), szTemp);
+ mir_sntprintf(szMask, L"%s|", szTemp);
if (szGF && _tcsstr(szGF, szMask))
ListView_SetCheckState(hwndList, i, TRUE)
else
@@ -783,14 +783,14 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP int iNewItem = SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_INSERTSTRING, -1, (LPARAM)szBuf);
if (iNewItem != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, (WPARAM)iNewItem, 0);
- SaveViewMode(szUTF8Buf, _T(""), "", 0, -1, 0, 0, 0, 0);
+ SaveViewMode(szUTF8Buf, L"", "", 0, -1, 0, 0, 0, 0);
clvm_curItem = iNewItem;
UpdateStickies();
SendDlgItemMessage(hwndDlg, IDC_PROTOGROUPOP, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_GROUPSTATUSOP, CB_SETCURSEL, 0, 0);
}
}
- SetDlgItemText(hwndDlg, IDC_NEWVIEMODE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_NEWVIEMODE, L"");
}
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDVIEWMODE), FALSE);
UpdateFilters();
@@ -923,7 +923,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_CREATE:
{
RECT rcMargins = { 12, 0, 2, 0 };
- hwndSelector = CreateWindow(MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndSelector = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_SELECTMODE, g_hInst, NULL);
MakeButtonSkinned(hwndSelector);
SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_TCHAR);
@@ -935,7 +935,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(hwndSelector, BUTTONSETSENDONDOWN, 0, (LPARAM)1);
//SendMessage(hwndSelector, BM_SETASMENUACTION, 1, 0);
- HWND hwndButton = CreateWindow(MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ HWND hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_CONFIGUREMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_TCHAR);
@@ -943,7 +943,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
- hwndButton = CreateWindow(MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindow(MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_RESETMODES, g_hInst, NULL);
MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_TCHAR);
@@ -1193,18 +1193,18 @@ void CreateViewModeFrame() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_3DFACE);
wndclass.lpszMenuName = 0;
- wndclass.lpszClassName = _T("CLVMFrameWindow");
+ wndclass.lpszClassName = L"CLVMFrameWindow";
RegisterClass(&wndclass);
CLISTFrame frame = { 0 };
frame.cbSize = sizeof(frame);
- frame.tname = _T("View modes");
+ frame.tname = L"View modes";
frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 18;
frame.TBtname = TranslateT("View modes");
frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
frame.align = alBottom;
- frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
+ frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", _T(CLVM_MODULE), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
diff --git a/plugins/Clist_ng/CLUIFrames/cluiframes.cpp b/plugins/Clist_ng/CLUIFrames/cluiframes.cpp index 222bbbf176..353c08669d 100644 --- a/plugins/Clist_ng/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_ng/CLUIFrames/cluiframes.cpp @@ -1133,7 +1133,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam, LPARAM lParam) lockfrm(); pos = id2pos((INT_PTR)wParam); - if (pos >= 0 && !lstrcmp(Frames[pos].name, _T("My Contacts"))) + if (pos >= 0 && !lstrcmp(Frames[pos].name, L"My Contacts")) Frames[pos].visible = 1; else { if (pos >= 0 && (int)pos < nFramescount) @@ -2627,7 +2627,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA } hmenu = CreatePopupMenu(); AppendMenu(hmenu, MF_STRING | MF_DISABLED | MF_GRAYED, 15, Frames[framepos].name); - AppendMenu(hmenu, MF_SEPARATOR, 16, _T("")); + AppendMenu(hmenu, MF_SEPARATOR, 16, L""); if (Frames[framepos].Locked) AppendMenu(hmenu, MF_STRING | MF_CHECKED, frame_menu_lock, TranslateT("Lock Frame")); @@ -3266,7 +3266,7 @@ wchar_t g_ptszEventName[100]; static int CLUIFrameOnModulesLoad(WPARAM, LPARAM) { - mir_sntprintf(g_ptszEventName, _countof(g_ptszEventName), _T("mf_update_evt_%d"), GetCurrentThreadId()); + mir_sntprintf(g_ptszEventName, _countof(g_ptszEventName), L"mf_update_evt_%d", GetCurrentThreadId()); g_hEventThread = CreateEvent(NULL, TRUE, FALSE, g_ptszEventName); hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL); SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE); @@ -3396,7 +3396,7 @@ void RegisterCLUIFrameClasses() cntclass.hCursor = LoadCursor(NULL, IDC_ARROW); cntclass.hbrBackground = NULL; cntclass.lpszMenuName = NULL; - cntclass.lpszClassName = _T("FramesContainer"); + cntclass.lpszClassName = L"FramesContainer"; RegisterClass(&cntclass); } diff --git a/plugins/Clist_ng/CLUIFrames/cluiframes.h b/plugins/Clist_ng/CLUIFrames/cluiframes.h index c56b471ab3..587f6b4736 100644 --- a/plugins/Clist_ng/CLUIFrames/cluiframes.h +++ b/plugins/Clist_ng/CLUIFrames/cluiframes.h @@ -121,7 +121,7 @@ struct FRAMEWND #define OFFSET_PROTOPOS 200
#define OFFSET_VISIBLE 400
-#define CLUIFrameTitleBarClassName _T("CLUIFrameTitleBar")
+#define CLUIFrameTitleBarClassName L"CLUIFrameTitleBar"
#define CLUIFrameModule "CLUIFrames"
class CLUIFrames {
diff --git a/plugins/Clist_ng/SRC/CLCButton.cpp b/plugins/Clist_ng/SRC/CLCButton.cpp index e470b58e19..341c638388 100644 --- a/plugins/Clist_ng/SRC/CLCButton.cpp +++ b/plugins/Clist_ng/SRC/CLCButton.cpp @@ -586,7 +586,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if(!(char*) wParam)
break;
if(!hwndToolTips) {
- hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL);
+ hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL);
SetWindowPos(hwndToolTips, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
ZeroMemory(&ti, sizeof(ti));
diff --git a/plugins/Clist_ng/SRC/clcitems.cpp b/plugins/Clist_ng/SRC/clcitems.cpp index 99aadd11c7..e9cd5ae901 100644 --- a/plugins/Clist_ng/SRC/clcitems.cpp +++ b/plugins/Clist_ng/SRC/clcitems.cpp @@ -511,7 +511,7 @@ int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, str }
if(cfg::dat.bFilterEffective & CLVM_FILTER_GROUPS) {
if(!cfg::getTString(hContact, "CList", "Group", &dbv)) {
- _sntprintf(szGroupMask, safe_sizeof(szGroupMask), _T("%s|"), &dbv.ptszVal[1]);
+ _sntprintf(szGroupMask, safe_sizeof(szGroupMask), L"%s|", &dbv.ptszVal[1]);
filterResult = (cfg::dat.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0));
mir_free(dbv.ptszVal);
}
diff --git a/plugins/Clist_ng/SRC/clcopts.cpp b/plugins/Clist_ng/SRC/clcopts.cpp index 2c4e81ae39..283c87bd0c 100644 --- a/plugins/Clist_ng/SRC/clcopts.cpp +++ b/plugins/Clist_ng/SRC/clcopts.cpp @@ -756,17 +756,17 @@ INT_PTR CALLBACK cfg::DlgProcDspAdvanced(HWND hwndDlg, UINT msg, WPARAM wParam, }
ORDERTREEDATA OrderTreeData[] = {
- {EXTRA_ICON_RES0, _T("Reserved, unused"), 9, TRUE, 0},
- {EXTRA_ICON_EMAIL, _T("E-mail"), 0, TRUE, 0},
- {EXTRA_ICON_RES1, _T("Reserved #1"), 7, TRUE, 0},
- {EXTRA_ICON_SMS, _T("Telephone"), 2, TRUE, 0},
- {EXTRA_ICON_ADV1, _T("Advanced #1 (X-Status)"), 3, TRUE, 0},
- {EXTRA_ICON_ADV2, _T("Advanced #2"), 4, TRUE, 0},
- {EXTRA_ICON_WEB, _T("Homepage"), 1, TRUE, 0},
- {EXTRA_ICON_CLIENT, _T("Client (fingerprint required)"), 10, TRUE, 0},
- {EXTRA_ICON_RES2, _T("Reserved #2"), 8, TRUE, 0},
- {EXTRA_ICON_ADV3, _T("Advanced #3"), 5, TRUE, 0},
- {EXTRA_ICON_ADV4, _T("Advanced #4"), 6, TRUE, 0},
+ {EXTRA_ICON_RES0, L"Reserved, unused", 9, TRUE, 0},
+ {EXTRA_ICON_EMAIL, L"E-mail", 0, TRUE, 0},
+ {EXTRA_ICON_RES1, L"Reserved #1", 7, TRUE, 0},
+ {EXTRA_ICON_SMS, L"Telephone", 2, TRUE, 0},
+ {EXTRA_ICON_ADV1, L"Advanced #1 (X-Status)", 3, TRUE, 0},
+ {EXTRA_ICON_ADV2, L"Advanced #2", 4, TRUE, 0},
+ {EXTRA_ICON_WEB, L"Homepage", 1, TRUE, 0},
+ {EXTRA_ICON_CLIENT, L"Client (fingerprint required)", 10, TRUE, 0},
+ {EXTRA_ICON_RES2, L"Reserved #2", 8, TRUE, 0},
+ {EXTRA_ICON_ADV3, L"Advanced #3", 5, TRUE, 0},
+ {EXTRA_ICON_ADV4, L"Advanced #4", 6, TRUE, 0},
};
static int dragging = 0;
diff --git a/plugins/Clist_ng/SRC/clcpaint.cpp b/plugins/Clist_ng/SRC/clcpaint.cpp index 3b7afc0ee4..b71c58a213 100644 --- a/plugins/Clist_ng/SRC/clcpaint.cpp +++ b/plugins/Clist_ng/SRC/clcpaint.cpp @@ -954,7 +954,7 @@ text: RECT rc = rcContent; COLORREF oldColor = 0; - if (TimeZone_PrintDateTime(cEntry->hTimeZone, _T("t"), szResult, _countof(szResult), 0))
+ if (TimeZone_PrintDateTime(cEntry->hTimeZone, L"t", szResult, _countof(szResult), 0))
goto nodisplay;
oldColor = Gfx::getTextColor(); diff --git a/plugins/Clist_ng/SRC/clcutils.cpp b/plugins/Clist_ng/SRC/clcutils.cpp index 440832a7e1..549caed102 100644 --- a/plugins/Clist_ng/SRC/clcutils.cpp +++ b/plugins/Clist_ng/SRC/clcutils.cpp @@ -529,7 +529,7 @@ void CLC::BeginRenameSelection(HWND hwnd, ClcData *dat) for (i = 0; i <= FONTID_LAST; i++)
if (h < dat->fontInfo[i].fontHeight + 2) h = dat->fontInfo[i].fontHeight + 2;
}
- dat->hwndRenameEdit = CreateWindowEx(0, _T("RichEdit20W"), contact->szText, WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOHSCROLL, x, y, clRect.right - x, h, hwnd, NULL, g_hInst, NULL);
+ dat->hwndRenameEdit = CreateWindowEx(0, L"RichEdit20W", contact->szText, WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOHSCROLL, x, y, clRect.right - x, h, hwnd, NULL, g_hInst, NULL);
{
if((contact->type == CLCIT_CONTACT && cfg::eCache[contact->extraCacheEntry].dwCFlags & ECF_RTLNICK) || (contact->type == CLCIT_GROUP && contact->isRtl)) {
PARAFORMAT2 pf2;
@@ -537,12 +537,12 @@ void CLC::BeginRenameSelection(HWND hwnd, ClcData *dat) pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
pf2.wEffects = PFE_RTLPARA;
- SetWindowText(dat->hwndRenameEdit, _T(""));
+ SetWindowText(dat->hwndRenameEdit, L"");
SendMessage(dat->hwndRenameEdit, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SetWindowText(dat->hwndRenameEdit, contact->szText);
}
}
- //dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, x, y, clRect.right - x, dat->rowHeight, hwnd, NULL, g_hInst, NULL);
+ //dat->hwndRenameEdit = CreateWindow(L"EDIT", contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, x, y, clRect.right - x, dat->rowHeight, hwnd, NULL, g_hInst, NULL);
OldRenameEditWndProc = (WNDPROC) SetWindowLongPtr(dat->hwndRenameEdit, GWLP_WNDPROC, (LONG_PTR) RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM) (contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
@@ -567,7 +567,7 @@ void CLC::LoadClcOptions(HWND hwnd, ClcData *dat, BOOL first) 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/plugins/Clist_ng/SRC/clistmenus.cpp b/plugins/Clist_ng/SRC/clistmenus.cpp index 6b3f0ea92e..9b1014e77d 100644 --- a/plugins/Clist_ng/SRC/clistmenus.cpp +++ b/plugins/Clist_ng/SRC/clistmenus.cpp @@ -103,7 +103,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, dwMask);
SendMessage(hWnd, WM_USER + 120, 0, 0);
TranslateDialogDefault(hWnd);
- hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
+ hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
@@ -111,7 +111,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA SetWindowText(hwndAdd, TranslateT("Add permanently"));
EnableWindow(hwndAdd, cfg::getByte(hContact, "CList", "NotOnList", 0));
- hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
+ hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
diff --git a/plugins/Clist_ng/SRC/clui.cpp b/plugins/Clist_ng/SRC/clui.cpp index a5a9409c7a..f23c9e7c73 100644 --- a/plugins/Clist_ng/SRC/clui.cpp +++ b/plugins/Clist_ng/SRC/clui.cpp @@ -235,7 +235,7 @@ int CLUI::createCLC(HWND parent) {
CLISTFrame frame = {0};
frame.cbSize = sizeof(frame);
- frame.tname = _T("EventArea");
+ frame.tname = L"EventArea";
frame.TBtname = TranslateT("Event Area");
frame.hIcon = 0;
frame.height = 20;
@@ -260,7 +260,7 @@ int CLUI::createCLC(HWND parent) Frame.align = alClient;
Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
- Frame.tname = _T("My Contacts");
+ Frame.tname = L"My Contacts";
Frame.TBtname = TranslateT("My Contacts");
Frame.height = 200;
hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM) & Frame, (LPARAM)0);
@@ -326,13 +326,13 @@ static void CacheClientIcons() static void InitIcoLib()
{
- Icon_RegisterT(g_hInst, LPGENT("Contact list") _T("/") LPGENT("Default"), myIcons, _countof(myIcons));
+ Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Default"), myIcons, _countof(myIcons));
for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
char szBuffer[128];
mir_snprintf(szBuffer, _countof(szBuffer), "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), 0), szBuffer, i };
- Icon_RegisterT(g_hInst, LPGENT("Contact list") _T("/") LPGENT("Overlay icons"), &icon, 1);
+ Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Overlay icons"), &icon, 1);
}
PROTOACCOUNT **accs = NULL;
@@ -345,7 +345,7 @@ static void InitIcoLib() TCHAR szDescr[128];
mir_sntprintf(szDescr, _countof(szDescr), TranslateT("%s connecting"), accs[k]->tszAccountName);
IconItemT icon = { szDescr, "conn", IDI_PROTOCONNECTING };
- Icon_RegisterT(g_hInst, LPGENT("Contact list") _T("/") LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName);
+ Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName);
}
}
@@ -469,7 +469,7 @@ void CreateButtonBar(HWND hWnd) if (top_buttons[i].id != IDC_TBGLOBALSTATUS && top_buttons[i].id != IDC_TBMENU)
continue;
- top_buttons[i].hwnd = CreateWindowEx(0, _T("CLCButtonClass"), _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU) top_buttons[i].id, g_hInst, NULL);
+ top_buttons[i].hwnd = CreateWindowEx(0, L"CLCButtonClass", L"", BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU) top_buttons[i].id, g_hInst, NULL);
hIcon = top_buttons[i].hIcon = IcoLib_GetIcon(top_buttons[i].szIcoLibIcon);
if (top_buttons[i].szIcoLibAltIcon)
@@ -1466,7 +1466,7 @@ skipbg: SendMessage(item->hWnd, BM_SETCHECK, 0, 0);
}
if (!contactOK)
- MessageBox(0, _T("The requested action requires a valid contact selection. Please select a contact from the contact list and repeat"), _T("Parameter mismatch"), MB_OK);
+ MessageBox(0, L"The requested action requires a valid contact selection. Please select a contact from the contact list and repeat", L"Parameter mismatch", MB_OK);
if (serviceFailure) {
char szError[512];
@@ -1773,7 +1773,7 @@ buttons_done: else szName[0] = 0;
if (lstrlen(szName) < sizeof(szName) - 1)
- lstrcat(szName, _T(" "));
+ lstrcat(szName, L" ");
GetTextExtentPoint32(dis->hDC, szName, lstrlen(szName), &textSize);
dis->rcItem.left += x;
Gfx::renderText(dis->hDC, (HANDLE)dis->CtlID, szName, &dis->rcItem, DT_VCENTER | DT_SINGLELINE, 0);
diff --git a/plugins/Clist_ng/SRC/cluiservices.cpp b/plugins/Clist_ng/SRC/cluiservices.cpp index 088b0db00e..8f12e35e7e 100644 --- a/plugins/Clist_ng/SRC/cluiservices.cpp +++ b/plugins/Clist_ng/SRC/cluiservices.cpp @@ -149,7 +149,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) lstrcpyn( szName, pa->tszAccountName, _countof(szName));
szName[ _countof(szName)-1 ] = 0;
if (( showOpts & 4 ) && lstrlen(szName) < sizeof(szName)-1 )
- lstrcat( szName, _T(" "));
+ lstrcat( szName, L" ");
GetTextExtentPoint32( hdc, szName, lstrlen(szName), &textSize );
x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
diff --git a/plugins/Clist_ng/SRC/config.cpp b/plugins/Clist_ng/SRC/config.cpp index 4674f398c5..8816643f09 100644 --- a/plugins/Clist_ng/SRC/config.cpp +++ b/plugins/Clist_ng/SRC/config.cpp @@ -352,10 +352,10 @@ void cfg::FS_RegisterFonts() }
TSkinDescription cfg::my_default_skin[] = {
- IDR_SKIN_BASE, _T("base.cng"),
- IDR_SKIN_BACK, _T("back.png"),
- IDR_SKIN_BACKAERO, _T("AeroBack.png"),
- IDR_SKIN_GLYPHS, _T("glyphs.png"),
+ IDR_SKIN_BASE, L"base.cng",
+ IDR_SKIN_BACK, L"back.png",
+ IDR_SKIN_BACKAERO, L"AeroBack.png",
+ IDR_SKIN_GLYPHS, L"glyphs.png",
};
/**
@@ -619,8 +619,8 @@ void CRTException::display() const wchar_t* tszMsg = mir_a2t(what());
wchar_t tszBoxMsg[500];
- mir_sntprintf(tszBoxMsg, 500, _T("%s\n\n(%s)"), tszMsg, m_szParam);
- ::MessageBox(0, tszBoxMsg, _T("ClistNG runtime error"), MB_OK | MB_ICONERROR);
+ mir_sntprintf(tszBoxMsg, 500, L"%s\n\n(%s)", tszMsg, m_szParam);
+ ::MessageBox(0, tszBoxMsg, L"ClistNG runtime error", MB_OK | MB_ICONERROR);
mir_free(tszMsg);
}
diff --git a/plugins/Clist_ng/SRC/extBackg.cpp b/plugins/Clist_ng/SRC/extBackg.cpp index cdfdc00ebd..62ced87242 100644 --- a/plugins/Clist_ng/SRC/extBackg.cpp +++ b/plugins/Clist_ng/SRC/extBackg.cpp @@ -367,7 +367,7 @@ static int ScanSkinDir(const wchar_t* tszFolder, HWND hwndCombobox) LRESULT lr;
TCHAR szBuf[255];
- mir_sntprintf(tszFinalName, MAX_PATH, _T("%s%s"), tszFolder, fd.cFileName);
+ mir_sntprintf(tszFinalName, MAX_PATH, L"%s%s", tszFolder, fd.cFileName);
GetPrivateProfileStringW(L"SkinInfo", L"Name", L"None", szBuf, 500, tszFinalName);
if(!wcscmp(szBuf, L"None")) {
@@ -414,7 +414,7 @@ static int RescanSkins(HWND hwndCombobox) while (h != INVALID_HANDLE_VALUE) {
if(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && fd.cFileName[0] != '.') {
TCHAR tszSubDir[MAX_PATH];
- mir_sntprintf(tszSubDir, MAX_PATH, _T("%s%s\\"), tszSkinRoot, fd.cFileName);
+ mir_sntprintf(tszSubDir, MAX_PATH, L"%s%s\\", tszSkinRoot, fd.cFileName);
ScanSkinDir(tszSubDir, hwndCombobox);
}
if(FindNextFile(h, &fd) == 0)
diff --git a/plugins/Clist_ng/SRC/skin.cpp b/plugins/Clist_ng/SRC/skin.cpp index 4137b30c87..5c3974f967 100644 --- a/plugins/Clist_ng/SRC/skin.cpp +++ b/plugins/Clist_ng/SRC/skin.cpp @@ -1071,7 +1071,7 @@ void SkinLoader::readButtonItem(const char *itemName, const char *file) newItem->nextItem = 0;
curItem->nextItem = newItem;
}
- newItem->hWnd = CreateWindowEx(0, _T("CLCButtonClass"), _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 5, 5, pcli->hwndContactList, (HMENU)newItem->uId, g_hInst, NULL);
+ newItem->hWnd = CreateWindowEx(0, L"CLCButtonClass", L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 5, 5, pcli->hwndContactList, (HMENU)newItem->uId, g_hInst, NULL);
SendMessage(newItem->hWnd, BM_SETBTNITEM, 0, (LPARAM)newItem);
SendMessage(newItem->hWnd, BUTTONSETASFLATBTN, 0, 0);
diff --git a/plugins/Clist_ng/SRC/statusfloater.cpp b/plugins/Clist_ng/SRC/statusfloater.cpp index 0d2353710a..02e4e366f9 100644 --- a/plugins/Clist_ng/SRC/statusfloater.cpp +++ b/plugins/Clist_ng/SRC/statusfloater.cpp @@ -713,19 +713,19 @@ void SFL_RegisterWindowClass() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH) (COLOR_3DFACE);
wndclass.lpszMenuName = 0;
- wndclass.lpszClassName = _T("StatusFloaterClass");
+ wndclass.lpszClassName = L"StatusFloaterClass";
RegisterClass(&wndclass);
wndclass.style = CS_DBLCLKS;
- wndclass.lpszClassName = _T("ContactFloaterClass");
+ wndclass.lpszClassName = L"ContactFloaterClass";
wndclass.lpfnWndProc = ContactFloaterClassProc;
RegisterClass(&wndclass);
}
void SFL_UnregisterWindowClass()
{
- UnregisterClass(_T("StatusFloaterClass"), g_hInst);
- UnregisterClass(_T("ContactFloaterClass"), g_hInst);
+ UnregisterClass(L"StatusFloaterClass", g_hInst);
+ UnregisterClass(L"ContactFloaterClass", g_hInst);
}
void SFL_Destroy()
@@ -737,7 +737,7 @@ void SFL_Destroy() static HICON sfl_hIcon = (HICON)-1;
static int sfl_iIcon = -1;
-static wchar_t sfl_statustext[100] = _T("");
+static wchar_t sfl_statustext[100] = L"";
void SFL_Update(HICON hIcon, int iIcon, HIMAGELIST hIml, const wchar_t *szText, BOOL refresh)
{
@@ -887,7 +887,7 @@ void SFL_SetSize() void SFL_Create()
{
if(g_hwndSFL == 0 && cfg::dat.bUseFloater & CLUI_USE_FLOATER)
- g_hwndSFL = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED, _T("StatusFloaterClass"), _T("sfl"), WS_VISIBLE, 0, 0, 0, 0, 0, 0, g_hInst, 0);
+ g_hwndSFL = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED, L"StatusFloaterClass", L"sfl", WS_VISIBLE, 0, 0, 0, 0, 0, 0, g_hInst, 0);
else
return;
@@ -943,7 +943,7 @@ void FLT_Create(int iEntry) if(centry->floater == NULL)
return;
FLT_AddToList(centry->floater);
- centry->floater->hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED, _T("ContactFloaterClass"), _T("sfl"), WS_VISIBLE, 0, 0, 0, 0, 0, 0, g_hInst, (LPVOID)iEntry);
+ centry->floater->hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED, L"ContactFloaterClass", L"sfl", WS_VISIBLE, 0, 0, 0, 0, 0, 0, g_hInst, (LPVOID)iEntry);
centry->floater->hContact = centry->hContact;
}
else if(centry->floater != NULL) {
diff --git a/plugins/Clist_ng/SRC/utils.cpp b/plugins/Clist_ng/SRC/utils.cpp index 99c33d9bcc..81a53458e5 100644 --- a/plugins/Clist_ng/SRC/utils.cpp +++ b/plugins/Clist_ng/SRC/utils.cpp @@ -33,7 +33,7 @@ #include <commonheaders.h>
-#define RTF_DEFAULT_HEADER _T("{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u")
+#define RTF_DEFAULT_HEADER L"{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u"
wchar_t* WarningDlg::m_warnings[WarningDlg::WARN_LAST] = {
LPGENT("Notes|release notes"),
@@ -68,7 +68,7 @@ void Utils::extractResource(const HMODULE h, const UINT uID, const wchar_t* tszN HANDLE hFile;
char *pData = (char *)LockResource(hResource);
DWORD dwSize = SizeofResource(g_hInst, hRes), written = 0;
- mir_sntprintf(szFilename, MAX_PATH, _T("%s%s"), tszPath, tszFilename);
+ mir_sntprintf(szFilename, MAX_PATH, L"%s%s", tszPath, tszFilename);
if(!fForceOverwrite) {
if(PathFileExistsW(szFilename))
return;
diff --git a/plugins/Clist_ng/SRC/viewmodes.cpp b/plugins/Clist_ng/SRC/viewmodes.cpp index 34142bb736..3c9509ce07 100644 --- a/plugins/Clist_ng/SRC/viewmodes.cpp +++ b/plugins/Clist_ng/SRC/viewmodes.cpp @@ -352,7 +352,7 @@ void SaveViewMode(const char *name, const wchar_t *szGroupFilter, const char *sz void SaveState()
{
- wchar_t newGroupFilter[2048] = _T("|");
+ wchar_t newGroupFilter[2048] = L"|";
char newProtoFilter[2048] = "|";
int i, iLen;
HWND hwndList;
@@ -400,7 +400,7 @@ void SaveState() item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
_tcsncat(newGroupFilter, szTemp, 2048);
- _tcsncat(newGroupFilter, _T("|"), 2048);
+ _tcsncat(newGroupFilter, L"|", 2048);
newGroupFilter[2047] = 0;
}
}
@@ -546,7 +546,7 @@ void UpdateFilters() for(i = 1; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- _sntprintf(szMask, 256, _T("%s|"), szTemp);
+ _sntprintf(szMask, 256, L"%s|", szTemp);
if(dbv_gf.ptszVal && _tcsstr(dbv_gf.ptszVal, szMask))
ListView_SetCheckState(hwndList, i, TRUE)
else
@@ -639,7 +639,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETEXTRACOLUMNS, ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE, 0);
cii.cbSize = sizeof(cii);
cii.hParentGroup = 0;
- cii.pszText = _T("*** All contacts ***");
+ cii.pszText = L"*** All contacts ***";
hInfoItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
if(SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, 0, 0) != LB_ERR) {
@@ -745,7 +745,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP int iNewItem = SendDlgItemMessageA(hwndDlg, IDC_VIEWMODES, LB_INSERTSTRING, -1, (LPARAM)szBuf);
if(iNewItem != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, (WPARAM)iNewItem, 0);
- SaveViewMode(szBuf, _T(""), "", -1, -1, 0, 0, 0, 0);
+ SaveViewMode(szBuf, L"", "", -1, -1, 0, 0, 0, 0);
clvm_curItem = iNewItem;
UpdateStickies();
SendDlgItemMessage(hwndDlg, IDC_PROTOGROUPOP, CB_SETCURSEL, 0, 0);
@@ -901,14 +901,14 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
HWND hwndButton;
- hwndSelector = CreateWindowEx(0, _T("CLCButtonClass"), _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndSelector = CreateWindowEx(0, L"CLCButtonClass", L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_SELECTMODE, g_hInst, NULL);
SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), 0);
SendMessage(hwndSelector, BM_SETASMENUACTION, 1, 0);
- hwndButton = CreateWindowEx(0, _T("CLCButtonClass"), _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindowEx(0, L"CLCButtonClass", L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_CONFIGUREMODES, g_hInst, NULL);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), 0);
- hwndButton = CreateWindowEx(0, _T("CLCButtonClass"), _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindowEx(0, L"CLCButtonClass", L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_RESETMODES, g_hInst, NULL);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), 0);
SendMessage(hwnd, WM_USER + 100, 0, 0);
@@ -1082,19 +1082,19 @@ void CreateViewModeFrame() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH) (COLOR_3DFACE);
wndclass.lpszMenuName = 0;
- wndclass.lpszClassName = _T("CLVMFrameWindow");
+ wndclass.lpszClassName = L"CLVMFrameWindow";
RegisterClass(&wndclass);
ZeroMemory(&frame, sizeof(frame));
frame.cbSize = sizeof(frame);
- frame.tname = _T("View modes");
+ frame.tname = L"View modes";
frame.TBtname = TranslateT("View Modes");
frame.hIcon = 0;
frame.height = 22;
frame.Flags=F_VISIBLE|F_SHOWTBTIP|F_NOBORDER|F_TCHAR;
frame.align = alBottom;
- frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T("CLVM"), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU) 0, g_hInst, NULL);
+ frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", L"CLVM", WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU) 0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&frame,(LPARAM)0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
diff --git a/plugins/Clist_ng/coolsb/coolsblib.cpp b/plugins/Clist_ng/coolsb/coolsblib.cpp index e5da7f7605..5368a42eac 100644 --- a/plugins/Clist_ng/coolsb/coolsblib.cpp +++ b/plugins/Clist_ng/coolsb/coolsblib.cpp @@ -34,7 +34,7 @@ #include "userdefs.h"
#include "coolsb_internal.h"
-static wchar_t szPropStr[] = _T("CoolSBSubclassPtr");
+static wchar_t szPropStr[] = L"CoolSBSubclassPtr";
LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -249,7 +249,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) ice.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&ice);
- sw->hwndToolTip = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TOOLWINDOW, TOOLTIPS_CLASS, _T(""),
+ sw->hwndToolTip = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TOOLWINDOW, TOOLTIPS_CLASS, L"",
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
diff --git a/plugins/Clist_ng/skineditor/skinedit.cpp b/plugins/Clist_ng/skineditor/skinedit.cpp index c883f63c87..0641be1f8c 100644 --- a/plugins/Clist_ng/skineditor/skinedit.cpp +++ b/plugins/Clist_ng/skineditor/skinedit.cpp @@ -674,7 +674,7 @@ static BOOL CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SendMessage(hwndDlg, WM_USER + 101, 0, 0);
psd->hMenuItems = CreatePopupMenu();
- AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, _T("Copy from"));
+ AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, L"Copy from");
AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL);
{
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index a015a15740..b6ebeb7cb3 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -410,7 +410,7 @@ int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
TCHAR szGroupMask[256];
- mir_sntprintf(szGroupMask, _T("%s|"), tszGroup);
+ mir_sntprintf(szGroupMask, L"%s|", tszGroup);
int bHasGroup = _tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0;
filterResult = (cfg::dat.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | bHasGroup) : (filterResult & bHasGroup);
}
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 5a0f2bfb95..f20f3bb4e6 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -756,7 +756,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/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index d54a4a6bcc..dd985a65fe 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -505,7 +505,7 @@ set_bg_l: int width = textSize.cx;
szCounts = pcli->pfnGetGroupCountsText(dat, contact);
if (szCounts[0]) {
- GetTextExtentPoint32(hdcMem, _T(" "), 1, &spaceSize);
+ GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
GetTextExtentPoint32(hdcMem, szCounts, (int)mir_tstrlen(szCounts), &countsSize);
width += spaceSize.cx + countsSize.cx;
@@ -1104,7 +1104,7 @@ bgskipped: int fHeight = 0;
TCHAR szResult[80];
- if (TimeZone_PrintDateTime(cEntry->hTimeZone, _T("t"), szResult, _countof(szResult), 0))
+ if (TimeZone_PrintDateTime(cEntry->hTimeZone, L"t", szResult, _countof(szResult), 0))
goto nodisplay;
COLORREF oldColor = GetTextColor(hdcMem);
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 401918407b..626d421ae6 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -92,7 +92,7 @@ size_t MY_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut) return dwSrcLen;
}
if (pSrc[0] == '.')
- return (mir_sntprintf(pOut, MAX_PATH, _T("%s\\%s"), cfg::dat.tszProfilePath, pSrc));
+ return (mir_sntprintf(pOut, MAX_PATH, L"%s\\%s", cfg::dat.tszProfilePath, pSrc));
return 0;
}
@@ -170,7 +170,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac TCHAR *szCounts;
szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
- GetTextExtentPoint32(hdc, _T(" "), 1, &textSize);
+ GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
GetTextExtentPoint32(hdc, szCounts, (int)mir_tstrlen(szCounts), &textSize);
@@ -311,7 +311,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c TCHAR *szCounts;
szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
- GetTextExtentPoint32(hdc, _T(" "), 1, &textSize);
+ GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
GetTextExtentPoint32(hdc, szCounts, (int)mir_tstrlen(szCounts), &textSize);
@@ -536,7 +536,7 @@ void BeginRenameSelection(HWND hwnd, struct ClcData *dat) if (h < dat->fontInfo[i].fontHeight + 2) h = dat->fontInfo[i].fontHeight + 2;
}
- dat->hwndRenameEdit = CreateWindowEx(0, _T("RICHEDIT50W"), contact->szText, WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOHSCROLL, x, y, clRect.right - x, h, hwnd, NULL, g_hInst, NULL);
+ dat->hwndRenameEdit = CreateWindowEx(0, L"RICHEDIT50W", contact->szText, WS_CHILD | WS_BORDER | ES_MULTILINE | ES_AUTOHSCROLL, x, y, clRect.right - x, h, hwnd, NULL, g_hInst, NULL);
{
if ((contact->type == CLCIT_CONTACT && contact->pExtra->dwCFlags & ECF_RTLNICK) || (contact->type == CLCIT_GROUP && contact->isRtl)) {
PARAFORMAT2 pf2;
@@ -544,13 +544,13 @@ void BeginRenameSelection(HWND hwnd, struct ClcData *dat) pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
pf2.wEffects = PFE_RTLPARA;
- SetWindowText(dat->hwndRenameEdit, _T(""));
+ SetWindowText(dat->hwndRenameEdit, L"");
SendMessage(dat->hwndRenameEdit, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SetWindowText(dat->hwndRenameEdit, contact->szText);
}
}
- //dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, x, y, clRect.right - x, dat->rowHeight, hwnd, NULL, g_hInst, NULL);
+ //dat->hwndRenameEdit = CreateWindow(L"EDIT", contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, x, y, clRect.right - x, dat->rowHeight, hwnd, NULL, g_hInst, NULL);
mir_subclassWindow(dat->hwndRenameEdit, RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM)(contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
@@ -575,7 +575,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/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index 506aa0ad49..34ec1b17dd 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -264,7 +264,7 @@ CListEvent* AddEvent(CLISTEVENT *cle) TCHAR szwProto[64];
MultiByteToWideChar(CP_ACP, 0, szProto, -1, szwProto, 64);
szwProto[63] = 0;
- mir_sntprintf(szBuffer, _T("%s: %s (%s)"), szwProto, szName, szStatus);
+ mir_sntprintf(szBuffer, L"%s: %s (%s)", szwProto, szName, szStatus);
szBuffer[127] = 0;
AppendMenu(cfg::dat.hMenuNotify, MF_BYCOMMAND | MF_STRING, cfg::dat.wNextMenuID, szBuffer);
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index a36112488e..7e74dbd6b2 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -67,14 +67,14 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA SendMessage(hWnd, WM_USER + 100, hContact, dwMask);
SendMessage(hWnd, WM_USER + 120, 0, 0);
TranslateDialogDefault(hWnd);
- hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
+ hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
CustomizeButton(hwndAdd, false, true, false);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT));
SetWindowText(hwndAdd, TranslateT("Add permanently"));
EnableWindow(hwndAdd, db_get_b(hContact, "CList", "NotOnList", 0));
- hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
+ hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
CustomizeButton(hwndAdd, false, true, false);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE));
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 978601ef01..8041d1dda3 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -160,7 +160,7 @@ static int FS_FontsChanged(WPARAM, LPARAM) // last frame of all. static HWND PreCreateCLC(HWND parent) { - pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), _T(""), + pcli->hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), L"", WS_CHILD | CLS_CONTACTLIST | (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0) | (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0) @@ -181,7 +181,7 @@ static int CreateCLC() { CLISTFrame frame = { 0 }; frame.cbSize = sizeof(frame); - frame.tname = _T("EventArea"); + frame.tname = L"EventArea"; frame.TBtname = TranslateT("Event area"); frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME); frame.height = 20; @@ -201,7 +201,7 @@ static int CreateCLC() Frame.align = alClient; Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME); Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_TCHAR; - Frame.tname = _T("My contacts"); + Frame.tname = L"My contacts"; Frame.TBtname = TranslateT("My contacts"); Frame.height = 200; hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); @@ -256,7 +256,7 @@ static void InitIcoLib() char szBuffer[128]; mir_snprintf(szBuffer, "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE)); IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), 0), szBuffer, i }; - Icon_RegisterT(g_hInst, LPGENT("Contact list") _T("/") LPGENT("Overlay icons"), &icon, 1); + Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Overlay icons"), &icon, 1); } PROTOACCOUNT **accs = NULL; @@ -269,7 +269,7 @@ static void InitIcoLib() TCHAR szDescr[128]; mir_sntprintf(szDescr, TranslateT("%s connecting"), accs[k]->tszAccountName); IconItemT icon = { szDescr, "conn", IDI_PROTOCONNECTING }; - Icon_RegisterT(g_hInst, LPGENT("Contact list") _T("/") LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName); + Icon_RegisterT(g_hInst, LPGENT("Contact list") L"/" LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName); } } @@ -281,14 +281,14 @@ static int IcoLibChanged(WPARAM, LPARAM) void CreateButtonBar(HWND hWnd) { - hTbMenu = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBMENU, g_hInst, NULL); + hTbMenu = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBMENU, g_hInst, NULL); CustomizeButton(hTbMenu, false, false, false); SetWindowText(hTbMenu, TranslateT("Menu")); SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MAINMENU)); SendMessage(hTbMenu, BUTTONSETSENDONDOWN, TRUE, 0); SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Open main menu"), 0); - hTbGlobalStatus = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBGLOBALSTATUS, g_hInst, NULL); + hTbGlobalStatus = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBGLOBALSTATUS, g_hInst, NULL); CustomizeButton(hTbGlobalStatus, false, false, false); SetWindowText(hTbGlobalStatus, TranslateT("Offline")); SendMessage(hTbGlobalStatus, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_STATUS_OFFLINE)); @@ -1716,7 +1716,7 @@ buttons_done: szName[0] = 0; if (mir_tstrlen(szName) < sizeof(szName) - 1) - mir_tstrcat(szName, _T(" ")); + mir_tstrcat(szName, L" "); GetTextExtentPoint32(dis->hDC, szName, (int)mir_tstrlen(szName), &textSize); TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szName, (int)mir_tstrlen(szName)); x += textSize.cx; @@ -1827,7 +1827,7 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar { TCHAR str[64]; DWORD v = pluginInfo.version; - mir_sntprintf(str, _T("%s %d.%d.%d.%d"), TranslateT("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v))); + mir_sntprintf(str, L"%s %d.%d.%d.%d", TranslateT("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v))); SetDlgItemText(hwndDlg, IDC_VERSION, str); } { @@ -1924,7 +1924,7 @@ void LoadCLUIModule(void) wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)COLOR_3DFACE; wndclass.lpszMenuName = 0; - wndclass.lpszClassName = _T("EventAreaClass"); + wndclass.lpszClassName = L"EventAreaClass"; RegisterClass(&wndclass); oldhideoffline = db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT); diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp index 97f1884ad4..2a5fe5eca6 100644 --- a/plugins/Clist_nicer/src/cluiframes.cpp +++ b/plugins/Clist_nicer/src/cluiframes.cpp @@ -1014,7 +1014,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM frameId, LPARAM) { mir_cslock lck(csFrameHook); pos = id2pos(frameId); - if (pos >= 0 && !mir_tstrcmp(Frames[pos].name, _T("My contacts"))) + if (pos >= 0 && !mir_tstrcmp(Frames[pos].name, L"My contacts")) Frames[pos].visible = 1; else { if (pos >= 0 && (int)pos < nFramescount) @@ -2318,7 +2318,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA hmenu = CreatePopupMenu(); AppendMenu(hmenu, MF_STRING | MF_DISABLED | MF_GRAYED, 15, Frames[framepos].name); - AppendMenu(hmenu, MF_SEPARATOR, 16, _T("")); + AppendMenu(hmenu, MF_SEPARATOR, 16, L""); if (Frames[framepos].Locked) AppendMenu(hmenu, MF_STRING | MF_CHECKED, frame_menu_lock, TranslateT("Lock frame")); @@ -2896,7 +2896,7 @@ TCHAR g_ptszEventName[100]; static int CLUIFrameOnModulesLoad(WPARAM, LPARAM) { - mir_sntprintf(g_ptszEventName, _T("mf_update_evt_%d"), GetCurrentThreadId()); + mir_sntprintf(g_ptszEventName, L"mf_update_evt_%d", GetCurrentThreadId()); g_hEventThread = CreateEvent(NULL, TRUE, FALSE, g_ptszEventName); hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL); SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE); @@ -2952,7 +2952,7 @@ int LoadCLUIFramesModule(void) cntclass.lpfnWndProc = CLUIFrameContainerWndProc; cntclass.hInstance = g_hInst; cntclass.hCursor = LoadCursor(NULL, IDC_ARROW); - cntclass.lpszClassName = _T("FramesContainer"); + cntclass.lpszClassName = L"FramesContainer"; RegisterClass(&cntclass); // create root menu diff --git a/plugins/Clist_nicer/src/cluiframes.h b/plugins/Clist_nicer/src/cluiframes.h index 4fef8cec0f..3f3d79687a 100644 --- a/plugins/Clist_nicer/src/cluiframes.h +++ b/plugins/Clist_nicer/src/cluiframes.h @@ -121,7 +121,7 @@ struct FRAMEWND #define OFFSET_PROTOPOS 200
#define OFFSET_VISIBLE 400
-#define CLUIFrameTitleBarClassName _T("CLUIFrameTitleBar")
+#define CLUIFrameTitleBarClassName L"CLUIFrameTitleBar"
#define CLUIFrameModule "CLUIFrames"
#endif
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index f5257b8f0f..9a80fdd757 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -134,7 +134,7 @@ void CluiProtocolStatusChanged(int, const char*) mir_tstrncpy(szName, pa->tszAccountName, _countof(szName));
szName[_countof(szName) - 1] = 0;
if ((showOpts & 4) && mir_tstrlen(szName) < sizeof(szName) - 1)
- mir_tstrcat(szName, _T(" "));
+ mir_tstrcat(szName, L" ");
GetTextExtentPoint32(hdc, szName, (int)mir_tstrlen(szName), &textSize);
x += textSize.cx + GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp index 6347ce8874..4195d5fe63 100644 --- a/plugins/Clist_nicer/src/config.cpp +++ b/plugins/Clist_nicer/src/config.cpp @@ -42,7 +42,7 @@ EXCEPTION_RECORD API::exRecord = { 0 }; CONTEXT API::exCtx = { 0 };
LRESULT API::exLastResult = 0;
char API::exSzFile[MAX_PATH] = "";
-TCHAR API::exReason[256] = _T("");
+TCHAR API::exReason[256] = L"";
int API::exLine = 0;
bool API::exAllowContinue = false;
HMODULE API::hDwm = 0;
@@ -99,7 +99,7 @@ void API::onInit() sysConfig.isSevenPlus = (IsWinVer7Plus() ? true : false);
if (sysConfig.isVistaPlus) {
- if ((hDwm = Utils::loadSystemLibrary(_T("\\dwmapi.dll")), true) != 0) {
+ if ((hDwm = Utils::loadSystemLibrary(L"\\dwmapi.dll"), true) != 0) {
pfnDwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled_t)GetProcAddress(hDwm, "DwmIsCompositionEnabled");
pfnDwmExtendFrameIntoClientArea = (pfnDwmExtendFrameIntoClientArea_t)GetProcAddress(hDwm, "DwmExtendFrameIntoClientArea");
}
@@ -202,7 +202,7 @@ int API::Ex_ShowDialog(EXCEPTION_POINTERS *ep, const char *szFile, int line, TCH memcpy(&exCtx, ep->ContextRecord, sizeof(CONTEXT));
mir_snprintf(exSzFile, "%s%s", szName, szExt);
- mir_sntprintf(exReason, _T("An application error has occured: %s"), szReason);
+ mir_sntprintf(exReason, L"An application error has occured: %s", szReason);
exLine = line;
exLastResult = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_EXCEPTION), 0, Ex_DlgProc, 0);
exAllowContinue = fAllowContinue;
@@ -268,7 +268,7 @@ void CRTException::display() const TCHAR *tszMsg = mir_a2t(what());
TCHAR tszBoxMsg[500];
- mir_sntprintf(tszBoxMsg, _T("%s\n\n(%s)"), tszMsg, m_szParam);
- ::MessageBox(0, tszBoxMsg, _T("Clist_nicer runtime error"), MB_OK | MB_ICONERROR);
+ mir_sntprintf(tszBoxMsg, L"%s\n\n(%s)", tszMsg, m_szParam);
+ ::MessageBox(0, tszBoxMsg, L"Clist_nicer runtime error", MB_OK | MB_ICONERROR);
mir_free(tszMsg);
}
diff --git a/plugins/Clist_nicer/src/coolsblib.cpp b/plugins/Clist_nicer/src/coolsblib.cpp index bf4e14421d..3dc6705d9a 100644 --- a/plugins/Clist_nicer/src/coolsblib.cpp +++ b/plugins/Clist_nicer/src/coolsblib.cpp @@ -31,7 +31,7 @@ #include "userdefs.h"
#include "coolsb_internal.h"
-static TCHAR szPropStr[] = _T("CoolSBSubclassPtr");
+static TCHAR szPropStr[] = L"CoolSBSubclassPtr";
LRESULT CALLBACK CoolSBWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -234,7 +234,7 @@ BOOL WINAPI InitializeCoolSB(HWND hwnd) ice.dwICC = ICC_BAR_CLASSES;
InitCommonControlsEx(&ice);
- sw->hwndToolTip = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TOOLWINDOW, TOOLTIPS_CLASS, _T(""),
+ sw->hwndToolTip = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TOOLWINDOW, TOOLTIPS_CLASS, L"",
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 70e9cfedaf..325330056c 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1152,7 +1152,7 @@ static void BTN_ReadItem(char *itemName, char *file) newItem->nextItem = 0;
curItem->nextItem = newItem;
}
- newItem->hWnd = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 5, 5, pcli->hwndContactList, (HMENU)newItem->uId, g_hInst, NULL);
+ newItem->hWnd = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 5, 5, pcli->hwndContactList, (HMENU)newItem->uId, g_hInst, NULL);
CustomizeButton(newItem->hWnd, false, false, true);
SendMessage(newItem->hWnd, BUTTONSETBTNITEM, 0, (LPARAM)newItem);
if (newItem->dwFlags & BUTTON_ISTOGGLE)
@@ -1501,7 +1501,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_free(&dbv);
}
else
- SetDlgItemText(hwndDlg, IDC_SKINFILENAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_SKINFILENAME, L"");
return TRUE;
}
case WM_COMMAND:
@@ -1524,17 +1524,17 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_SELECTSKINFILE:
{
OPENFILENAME ofn = { 0 };
- TCHAR str[MAX_PATH] = _T("*.clist"), final_path[MAX_PATH];
+ TCHAR str[MAX_PATH] = L"*.clist", final_path[MAX_PATH];
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
- ofn.lpstrFilter = _T("*.clist\0");
+ ofn.lpstrFilter = L"*.clist\0";
ofn.lpstrFile = str;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_DONTADDTORECENT;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (!GetOpenFileName(&ofn))
break;
MY_pathToRelative(str, final_path);
diff --git a/plugins/Clist_nicer/src/statusbar.cpp b/plugins/Clist_nicer/src/statusbar.cpp index 91ea967a2f..8f127b3bd0 100644 --- a/plugins/Clist_nicer/src/statusbar.cpp +++ b/plugins/Clist_nicer/src/statusbar.cpp @@ -160,8 +160,8 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM BYTE isLocked = db_get_b(NULL, PD->RealName, "LockMainStatus", 0);
TCHAR szTipText[256];
- mir_sntprintf(szTipText, _T("<b>%s</b>: %s%s"),
- PD->RealName, pcli->pfnGetStatusModeDescription(wStatus, 0), isLocked ? _T(" (LOCKED)") : _T(""));
+ mir_sntprintf(szTipText, L"<b>%s</b>: %s%s",
+ PD->RealName, pcli->pfnGetStatusModeDescription(wStatus, 0), isLocked ? L" (LOCKED)" : L"");
CLCINFOTIP ti = { sizeof(ti) };
ti.isTreeFocused = (GetFocus() == pcli->hwndContactList);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index f13f1f6eb7..c684d6dc0c 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -320,7 +320,7 @@ void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szPr // saves the state of the filter definitions for the current item
void SaveState()
{
- CMString newGroupFilter(_T("|"));
+ CMString newGroupFilter(L"|");
CMStringA newProtoFilter("|");
DWORD statusMask = 0;
DWORD operators = 0;
@@ -493,7 +493,7 @@ void UpdateFilters() for (int i = 1; i < ListView_GetItemCount(hwndList); i++) {
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- mir_sntprintf(szMask, _T("%s|"), szTemp);
+ mir_sntprintf(szMask, L"%s|", szTemp);
if (dbv_gf.ptszVal && _tcsstr(dbv_gf.ptszVal, szMask)) {
ListView_SetCheckState(hwndList, i, TRUE);
}
@@ -687,7 +687,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP int iNewItem = SendDlgItemMessageA(hwndDlg, IDC_VIEWMODES, LB_INSERTSTRING, -1, (LPARAM)szBuf);
if (iNewItem != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, (WPARAM)iNewItem, 0);
- SaveViewMode(szBuf, _T(""), "", -1, -1, 0, 0, 0, 0);
+ SaveViewMode(szBuf, L"", "", -1, -1, 0, 0, 0, 0);
sttClvm_curItem = iNewItem;
UpdateStickies();
SendDlgItemMessage(hwndDlg, IDC_PROTOGROUPOP, CB_SETCURSEL, 0, 0);
@@ -825,18 +825,18 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
switch (msg) {
case WM_CREATE:
- hwndSelector = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndSelector = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_SELECTMODE, g_hInst, NULL);
CustomizeButton(hwndSelector, false, false, false);
SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), BATF_UNICODE);
SendMessage(hwndSelector, BUTTONSETSENDONDOWN, TRUE, 0);
{
- HWND hwndButton = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ HWND hwndButton = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_CONFIGUREMODES, g_hInst, NULL);
CustomizeButton(hwndButton, false, false, false);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), BATF_UNICODE);
- hwndButton = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindowEx(0, MIRANDABUTTONCLASS, L"", BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU)IDC_RESETMODES, g_hInst, NULL);
CustomizeButton(hwndButton, false, false, false);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), BATF_UNICODE);
@@ -1010,18 +1010,18 @@ void CreateViewModeFrame() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE);
wndclass.lpszMenuName = 0;
- wndclass.lpszClassName = _T("CLVMFrameWindow");
+ wndclass.lpszClassName = L"CLVMFrameWindow";
RegisterClass(&wndclass);
memset(&frame, 0, sizeof(frame));
frame.cbSize = sizeof(frame);
- frame.tname = _T("View modes");
+ frame.tname = L"View modes";
frame.TBtname = TranslateT("View modes");
frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 22;
frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
frame.align = alBottom;
- frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T("CLVM"), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
+ frame.hWnd = CreateWindowEx(0, L"CLVMFrameWindow", L"CLVM", WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU)0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 4708b7da38..81bb0a8c75 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -39,7 +39,7 @@ struct CONNECTION *connExceptionsTmp = NULL; struct CONNECTION *connCurrentEditModal = NULL;
int currentStatus = ID_STATUS_OFFLINE, diffstat = 0;
BOOL bOptionsOpen = FALSE;
-TCHAR *tcpStates[] = { _T("CLOSED"), _T("LISTEN"), _T("SYN_SENT"), _T("SYN_RCVD"), _T("ESTAB"), _T("FIN_WAIT1"), _T("FIN_WAIT2"), _T("CLOSE_WAIT"), _T("CLOSING"), _T("LAST_ACK"), _T("TIME_WAIT"), _T("DELETE_TCB") };
+TCHAR *tcpStates[] = { L"CLOSED", L"LISTEN", L"SYN_SENT", L"SYN_RCVD", L"ESTAB", L"FIN_WAIT1", L"FIN_WAIT2", L"CLOSE_WAIT", L"CLOSING", L"LAST_ACK", L"TIME_WAIT", L"DELETE_TCB" };
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
@@ -80,7 +80,7 @@ BOOL strrep(TCHAR *src, TCHAR *needle, TCHAR *newstring) _tcsncpy_s(tail, src + pos, _TRUNCATE);
begining[pos] = 0;
- pos = mir_sntprintf(src, mir_tstrlen(src), _T("%s%s%s"), begining, newstring, tail);
+ pos = mir_sntprintf(src, mir_tstrlen(src), L"%s%s%s", begining, newstring, tail);
return TRUE;
}
@@ -194,16 +194,16 @@ void fillExceptionsListView(HWND hwndDlg) ListView_InsertItem(hwndList, &lvI);
lvI.iSubItem = 1;
if (tmp->intIntPort == -1)
- mir_sntprintf(tmpAddress, _T("%s:*"), tmp->strIntIp);
+ mir_sntprintf(tmpAddress, L"%s:*", tmp->strIntIp);
else
- mir_sntprintf(tmpAddress, _T("%s:%d"), tmp->strIntIp, tmp->intIntPort);
+ mir_sntprintf(tmpAddress, L"%s:%d", tmp->strIntIp, tmp->intIntPort);
lvI.pszText = tmpAddress;
ListView_SetItem(hwndList, &lvI);
lvI.iSubItem = 2;
if (tmp->intExtPort == -1)
- mir_sntprintf(tmpAddress, _T("%s:*"), tmp->strExtIp);
+ mir_sntprintf(tmpAddress, L"%s:*", tmp->strExtIp);
else
- mir_sntprintf(tmpAddress, _T("%s:%d"), tmp->strExtIp, tmp->intExtPort);
+ mir_sntprintf(tmpAddress, L"%s:%d", tmp->strExtIp, tmp->intExtPort);
lvI.pszText = tmpAddress;
ListView_SetItem(hwndList, &lvI);
lvI.iSubItem = 3;
@@ -228,12 +228,12 @@ static INT_PTR CALLBACK FilterEditProc(HWND hWnd, UINT message, WPARAM wParam, L SetDlgItemText(hWnd, ID_TXT_REMOTE_IP, conn->strExtIp);
if (conn->intIntPort == -1)
- SetDlgItemText(hWnd, ID_TXT_LOCAL_PORT, _T("*"));
+ SetDlgItemText(hWnd, ID_TXT_LOCAL_PORT, L"*");
else
SetDlgItemInt(hWnd, ID_TXT_LOCAL_PORT, conn->intIntPort, FALSE);
if (conn->intExtPort == -1)
- SetDlgItemText(hWnd, ID_TXT_REMOTE_PORT, _T("*"));
+ SetDlgItemText(hWnd, ID_TXT_REMOTE_PORT, L"*");
else
SetDlgItemInt(hWnd, ID_TXT_REMOTE_PORT, conn->intExtPort, FALSE);
@@ -298,9 +298,9 @@ INT_PTR CALLBACK DlgProcConnectionNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wPar bOptionsOpen = TRUE;
TranslateDialogDefault(hwndDlg);//translate miranda function
#ifdef _WIN64
- mir_sntprintf(buff, _T("%d.%d.%d.%d/64"), HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOWORD(pluginInfo.version)));
+ mir_sntprintf(buff, L"%d.%d.%d.%d/64", HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOWORD(pluginInfo.version)));
#else
- mir_sntprintf(buff, _T("%d.%d.%d.%d/32"), HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOWORD(pluginInfo.version)));
+ mir_sntprintf(buff, L"%d.%d.%d.%d/32", HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOWORD(pluginInfo.version)));
#endif
SetDlgItemText(hwndDlg, IDC_VERSION, buff);
LoadSettings();
@@ -680,12 +680,12 @@ static unsigned __stdcall checkthread(void *) {
#ifdef _DEBUG
- _OutputDebugString(_T("check thread started"));
+ _OutputDebugString(L"check thread started");
#endif
while (1) {
struct CONNECTION* conn = NULL, *connOld = first, *cur = NULL;
#ifdef _DEBUG
- _OutputDebugString(_T("checking connections table..."));
+ _OutputDebugString(L"checking connections table...");
#endif
if (WAIT_OBJECT_0 == WaitForSingleObject(killCheckThreadEvent, 100)) {
hConnectionCheckThread = NULL;
@@ -699,8 +699,8 @@ static unsigned __stdcall checkthread(void *) #ifdef _DEBUG
TCHAR msg[1024];
- mir_sntprintf(msg, _T("%s:%d\n%s:%d"), cur->strIntIp, cur->intIntPort, cur->strExtIp, cur->intExtPort);
- _OutputDebugString(_T("New connection: %s"), msg);
+ mir_sntprintf(msg, L"%s:%d\n%s:%d", cur->strIntIp, cur->intIntPort, cur->strExtIp, cur->intExtPort);
+ _OutputDebugString(L"New connection: %s", msg);
#endif
pid2name(cur->Pid, cur->PName, _countof(cur->PName));
if (WAIT_OBJECT_0 == WaitForSingleObject(hExceptionsMutex, 100)) {
@@ -779,11 +779,11 @@ void showMsg(TCHAR *pName, DWORD pid, TCHAR *intIp, TCHAR *extIp, int intPort, i if (settingResolveIp) {
TCHAR hostName[128];
getDnsName(extIp, hostName, _countof(hostName));
- mir_sntprintf(ppd.lptzText, _T("%s:%d\n%s:%d"), hostName, extPort, intIp, intPort);
+ mir_sntprintf(ppd.lptzText, L"%s:%d\n%s:%d", hostName, extPort, intIp, intPort);
}
- else mir_sntprintf(ppd.lptzText, _T("%s:%d\n%s:%d"), extIp, extPort, intIp, intPort);
+ else mir_sntprintf(ppd.lptzText, L"%s:%d\n%s:%d", extIp, extPort, intIp, intPort);
- mir_sntprintf(ppd.lptzContactName, _T("%s (%s)"), pName, tcpStates[state - 1]);
+ mir_sntprintf(ppd.lptzContactName, L"%s (%s)", pName, tcpStates[state - 1]);
if (settingSetColours) {
ppd.colorBack = settingBgColor;
@@ -813,14 +813,14 @@ static int modulesloaded(WPARAM, LPARAM) {
#ifdef _DEBUG
- _OutputDebugString(_T("Modules loaded, lets start TN..."));
+ _OutputDebugString(L"Modules loaded, lets start TN...");
#endif
// hConnectionCheckThread = (HANDLE)mir_forkthreadex(checkthread, 0, 0, ConnectionCheckThreadId);
//#ifdef _DEBUG
// _OutputDebugString("started check thread %d",hConnectionCheckThread);
//#endif
- killCheckThreadEvent = CreateEvent(NULL, FALSE, FALSE, _T("killCheckThreadEvent"));
+ killCheckThreadEvent = CreateEvent(NULL, FALSE, FALSE, L"killCheckThreadEvent");
hFilterOptionsThread = startFilterThread();
//updaterRegister();
@@ -848,13 +848,13 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) extern "C" int __declspec(dllexport) Load(void)
{
#ifdef _DEBUG
- _OutputDebugString(_T("Entering Load dll"));
+ _OutputDebugString(L"Entering Load dll");
#endif
mir_getLP(&pluginInfo);
mir_getCLI();
- hExceptionsMutex = CreateMutex(NULL, FALSE, _T("ExceptionsMutex"));
+ hExceptionsMutex = CreateMutex(NULL, FALSE, L"ExceptionsMutex");
LoadSettings();
connExceptions = LoadSettingsConnections();
@@ -899,7 +899,7 @@ extern "C" int __declspec(dllexport) Unload(void) if (hExceptionsMutex) CloseHandle(hExceptionsMutex);
#ifdef _DEBUG
- _OutputDebugString(_T("Unloaded"));
+ _OutputDebugString(L"Unloaded");
#endif
return 0;
}
diff --git a/plugins/ConnectionNotify/src/filter.cpp b/plugins/ConnectionNotify/src/filter.cpp index 3c99603852..e3843d12e3 100644 --- a/plugins/ConnectionNotify/src/filter.cpp +++ b/plugins/ConnectionNotify/src/filter.cpp @@ -74,7 +74,7 @@ static INT_PTR CALLBACK ConnectionFilterEditProc(HWND hWnd, UINT message, WPARAM TCHAR tmpPort[6];
if (bOptionsOpen)
{
- MessageBox(hWnd, TranslateT("First close options window"), _T("ConnectionNotify"), MB_OK | MB_ICONSTOP);
+ MessageBox(hWnd, TranslateT("First close options window"), L"ConnectionNotify", MB_OK | MB_ICONSTOP);
break;
}
if (WAIT_OBJECT_0 == WaitForSingleObject(hExceptionsMutex, 100))
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 4b45c4b4d9..808decafdc 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -379,16 +379,16 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP lvi.iItem = 0x7fffffff;
- str = _tcstok(str, _T("\n"));
+ str = _tcstok(str, L"\n");
if (gIcons && str != NULL) {
lvi.mask = LVIF_TEXT | LVIF_IMAGE;
- if (_tcsstr(str, _T("Data received"))) {
+ if (_tcsstr(str, L"Data received")) {
if (gSeparator) ListView_InsertItem(dat->hList, &lvi);
lvi.iImage = IMG_IN;
}
- else if (_tcsstr(str, _T("Data sent"))) {
+ else if (_tcsstr(str, L"Data sent")) {
if (gSeparator) ListView_InsertItem(dat->hList, &lvi);
lvi.iImage = IMG_OUT;
}
@@ -423,7 +423,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP last = ListView_InsertItem(dat->hList, &lvi);
- str = _tcstok(NULL, _T("\n"));
+ str = _tcstok(NULL, L"\n");
if (str) dat->newline = 1;
lvi.iImage = IMG_EMPTY;
@@ -545,7 +545,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP if (!Openfile(szFile, ListView_GetSelectedCount(dat->hList))) break;
- FILE *fp = _tfopen(szFile, _T("wt"));
+ FILE *fp = _tfopen(szFile, L"wt");
if (fp) {
int idx = 0;
TCHAR szText[128];
@@ -555,7 +555,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LP while ((idx = ListView_GetNextItem(dat->hList, idx, flags)) > 0) {
ListView_GetItemText(dat->hList, idx, 0, szText, _countof(szText));
- _ftprintf(fp, _T("%s\n"), szText);
+ _ftprintf(fp, L"%s\n", szText);
}
fclose(fp);
}
@@ -621,7 +621,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg, UINT message, WPARAM wParam CallService(MS_DB_GETPROFILEPATHT, (WPARAM)_countof(path), (LPARAM)path);
- mir_sntprintf(title, _T("%s - %s\\%s"), TranslateT("Miranda Console"), path, name);
+ mir_sntprintf(title, L"%s - %s\\%s", TranslateT("Miranda Console"), path, name);
SetWindowText(hwndDlg, title);
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcons[0]);
@@ -1131,7 +1131,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) fid.deffontsettings.colour = RGB(0, 0, 0);
fid.deffontsettings.size = 10;
fid.deffontsettings.style = 0;
- mir_tstrncpy(fid.deffontsettings.szFace, _T("Courier"), _countof(fid.deffontsettings.szFace));
+ mir_tstrncpy(fid.deffontsettings.szFace, L"Courier", _countof(fid.deffontsettings.szFace));
FontRegisterT(&fid);
HookEvent(ME_FONT_RELOAD, OnFontChange);
@@ -1266,7 +1266,7 @@ TCHAR *addstring(TCHAR *str, TCHAR *add) { static int Openfile(TCHAR *outputFile, int selection)
{
- TCHAR filename[MAX_PATH + 2] = _T("");
+ TCHAR filename[MAX_PATH + 2] = L"";
TCHAR *title;
TCHAR *filter, *tmp, *tmp1, *tmp2;
@@ -1274,9 +1274,9 @@ static int Openfile(TCHAR *outputFile, int selection) tmp2 = TranslateT("All Files");
filter = tmp = (TCHAR*)_alloca((mir_tstrlen(tmp1) + mir_tstrlen(tmp2) + 11)*sizeof(TCHAR));
tmp = addstring(tmp, tmp1);
- tmp = addstring(tmp, _T("*.TXT"));
+ tmp = addstring(tmp, L"*.TXT");
tmp = addstring(tmp, tmp2);
- tmp = addstring(tmp, _T("*"));
+ tmp = addstring(tmp, L"*");
*tmp = 0;
if (selection)
@@ -1292,7 +1292,7 @@ static int Openfile(TCHAR *outputFile, int selection) ofn.Flags = OFN_HIDEREADONLY | OFN_SHAREAWARE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
ofn.lpstrTitle = title;
ofn.nMaxFile = MAX_PATH;
- ofn.lpstrDefExt = _T("txt");
+ ofn.lpstrDefExt = L"txt";
if (!GetSaveFileName(&ofn))
return 0;
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 895b03daaf..109bb50043 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -74,7 +74,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent) {
//add event to the contact list
TCHAR caToolTip[128];
- mir_sntprintf(caToolTip, _T("%s %s"), TranslateT("Contacts received from"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(caToolTip, L"%s %s", TranslateT("Contacts received from"), pcli->pfnGetContactDisplayName(hContact, 0));
CLISTEVENT cle = {};
cle.hContact = hContact;
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index a04891ad58..0a008a12da 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -437,7 +437,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara fi.psz = wndData->haUin;
int iLPos = ListView_FindItem(hLV, -1, &fi);
if (iLPos == -1) iLPos = 0;
- if (mir_tstrcmp(psr->nick.t, _T("")) && psr->nick.t)
+ if (mir_tstrcmp(psr->nick.t, L"") && psr->nick.t)
ListView_SetItemText(hLV, iLPos, 1, psr->nick.t);
ListView_SetItemText(hLV, iLPos, 2, psr->firstName.t);
ListView_SetItemText(hLV, iLPos, 3, psr->lastName.t);
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index 9a5750f90a..5ba7efea54 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -130,7 +130,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart) SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
- mir_sntprintf(newtitle, _T("%s %s (%s)"), TranslateTS(pszTitleStart), contactName, szStatus);
+ mir_sntprintf(newtitle, L"%s %s (%s)", TranslateTS(pszTitleStart), contactName, szStatus);
}
}
diff --git a/plugins/ContextHelp/src/datastore.cpp b/plugins/ContextHelp/src/datastore.cpp index 40df51eb08..a35ec9b9b3 100644 --- a/plugins/ContextHelp/src/datastore.cpp +++ b/plugins/ContextHelp/src/datastore.cpp @@ -139,7 +139,7 @@ static void LoaderThread(void *arg) p = _tcsrchr(szDir, _T('\\'));
if (p)
*p = _T('\0');
- mir_sntprintf(szSearch, _T("%s\\helppack_*.txt"), szDir);
+ mir_sntprintf(szSearch, L"%s\\helppack_*.txt", szDir);
hFind = FindFirstFile(szSearch, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -148,7 +148,7 @@ static void LoaderThread(void *arg) continue;
if (lstrlen(wfd.cFileName) < 4 || wfd.cFileName[lstrlen(wfd.cFileName) - 4] != _T('.'))
continue;
- mir_sntprintf(szSearch, _T("%s\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szSearch, L"%s\\%s", szDir, wfd.cFileName);
success = 1;
break;
} while (FindNextFile(hFind, &wfd));
@@ -161,7 +161,7 @@ static void LoaderThread(void *arg) return;
}
- fp = _tfopen(szSearch, _T("rt"));
+ fp = _tfopen(szSearch, L"rt");
if (fp == NULL) {
if (!Miranda_Terminated() && IsWindow(hwndHelpDlg))
PostMessage(hwndHelpDlg, M_HELPLOADFAILED, 0, (LPARAM)dtsp->hwndCtl);
diff --git a/plugins/ContextHelp/src/dlgboxsubclass.cpp b/plugins/ContextHelp/src/dlgboxsubclass.cpp index 32d9c2f3cd..310170e989 100644 --- a/plugins/ContextHelp/src/dlgboxsubclass.cpp +++ b/plugins/ContextHelp/src/dlgboxsubclass.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SC_CONTEXTHELP_SEPARATOR SC_SEPARATOR+1
#define SC_CONTEXTHELP_DIALOG SC_CONTEXTHELP+1
-#define PROP_CONTEXTSTATE _T("HelpPlugin_ContextState")
+#define PROP_CONTEXTSTATE L"HelpPlugin_ContextState"
#define PROPF_MENUFORCED 0x01 // always show help context menu for ctl (override default)
#define PROPF_MENUDISABLED 0x02 // never show help context menu for ctl
#define PROPF_AUTOTIPFORCED 0x04 // always show autotip for ctl (override default)
@@ -345,7 +345,7 @@ static LRESULT CALLBACK DialogBoxSubclassProc(HWND hwndDlg, UINT msg, WPARAM wPa EnumChildWindows(hwndDlg, RemovePropForAllChildsEnumProc, (LPARAM)PROP_CONTEXTSTATE);
{
TCHAR text[64];
- mir_sntprintf(text, _countof(text), _T("unhooked window 0x%X for context help\n"), hwndDlg);
+ mir_sntprintf(text, _countof(text), L"unhooked window 0x%X for context help\n", hwndDlg);
OutputDebugString(text);
}
SetWindowLongPtr(hwndDlg, GWLP_WNDPROC, (LONG_PTR)pfnWndProc);
@@ -410,7 +410,7 @@ static LRESULT CALLBACK HelpSendMessageHookProc(int code, WPARAM wParam, LPARAM }
{
TCHAR text[64];
- mir_sntprintf(text, _countof(text), _T("hooked window 0x%X for context help\n"), msg->hwnd);
+ mir_sntprintf(text, _countof(text), L"hooked window 0x%X for context help\n", msg->hwnd);
OutputDebugString(text);
}
break;
diff --git a/plugins/ContextHelp/src/helpdlg.cpp b/plugins/ContextHelp/src/helpdlg.cpp index 38ee716452..2eb698f28a 100644 --- a/plugins/ContextHelp/src/helpdlg.cpp +++ b/plugins/ContextHelp/src/helpdlg.cpp @@ -445,7 +445,7 @@ INT_PTR CALLBACK HelpDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else
exStyle &= ~(WS_EX_RTLREADING | WS_EX_RIGHT);
}
- mir_sntprintf(buf, sizeof(buf) - 4, _T("%s"), szTitle);
+ mir_sntprintf(buf, sizeof(buf) - 4, L"%s", szTitle);
if (hdc != NULL && hwndCtlText != NULL) {
SendMessage(hwndCtlText, EM_GETRECT, 0, (LPARAM)&rc);
hFontPrev = (HFONT)SelectObject(hdc, (HFONT)SendMessage(hwndCtlText, WM_GETFONT, 0, 0)); // look at !!
diff --git a/plugins/ContextHelp/src/helppack.cpp b/plugins/ContextHelp/src/helppack.cpp index 71f6e50de0..0c1e97e8b2 100644 --- a/plugins/ContextHelp/src/helppack.cpp +++ b/plugins/ContextHelp/src/helppack.cpp @@ -174,7 +174,7 @@ static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *ps */
if (!GetPackPath(szFileName, _countof(szFileName), fEnabledPacks, pack->szFileName))
return FALSE;
- FILE *fp = _tfopen(szFileName, _T("rt"));
+ FILE *fp = _tfopen(szFileName, L"rt");
if (fp == NULL)
return FALSE;
fgets(line, sizeof(line), fp);
@@ -269,7 +269,7 @@ BOOL GetPackPath(TCHAR *pszPath, int nSize, BOOL fEnabledPacks, const TCHAR *psz if (!fEnabledPacks) {
if (nSize<(lstrlen(pszPath) + 10))
return FALSE;
- lstrcat(pszPath, _T("Languages\\"));
+ lstrcat(pszPath, L"Languages\\");
}
/* file name */
if (pszFile != NULL) {
@@ -430,7 +430,7 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL *pszFile = _T('\0');
/* move wrongly placed packs from 'Plugins' to 'Language' */
- mir_sntprintf(szFrom, _T("%s\\Plugins\\%s"), szDir, pszFilePattern);
+ mir_sntprintf(szFrom, L"%s\\Plugins\\%s", szDir, pszFilePattern);
WIN32_FIND_DATA wfd;
HANDLE hFind = FindFirstFile(szFrom, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -446,7 +446,7 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL /* move file */
if (GetPackPath(szDest, _countof(szDest), FALSE, wfd.cFileName)) {
- mir_sntprintf(szFrom, _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szFrom, L"%s\\Plugins\\%s", szDir, wfd.cFileName);
if (!MoveFile(szFrom, szDest) && GetLastError() == ERROR_ALREADY_EXISTS) {
DeleteFile(szDest);
MoveFile(szFrom, szDest);
diff --git a/plugins/ContextHelp/src/main.cpp b/plugins/ContextHelp/src/main.cpp index 28887b15e0..a5bd86455e 100644 --- a/plugins/ContextHelp/src/main.cpp +++ b/plugins/ContextHelp/src/main.cpp @@ -96,7 +96,7 @@ extern "C" __declspec(dllexport) int Load(void) if (!InitCommonControlsEx(&icc))
return 1;
- hMsftEdit = LoadLibrary(_T("riched20.dll"));
+ hMsftEdit = LoadLibrary(L"riched20.dll");
if (hMsftEdit == NULL) {
if (IDYES != MessageBoxEx(NULL,
TranslateT("The Context help plugin can not be loaded, Msftedit.dll is missing. If you are using WINE, please make sure you have Msftedit.dll installed. Press 'Yes' to continue loading Miranda."),
diff --git a/plugins/ContextHelp/src/options.cpp b/plugins/ContextHelp/src/options.cpp index 507dcabf01..c1aabb64aa 100644 --- a/plugins/ContextHelp/src/options.cpp +++ b/plugins/ContextHelp/src/options.cpp @@ -174,7 +174,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac if (p != NULL)
*p = _T('\0');
TCHAR szSearch[MAX_PATH];
- mir_sntprintf(szSearch, _T("%s\\Plugins\\*.dll"), szDir);
+ mir_sntprintf(szSearch, L"%s\\Plugins\\*.dll", szDir);
WIN32_FIND_DATA wfd;
HANDLE hFind = FindFirstFile(szSearch, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -198,7 +198,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac continue;
/* friendly name of the plugin */
- mir_sntprintf(szSearch, _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szSearch, L"%s\\Plugins\\%s", szDir, wfd.cFileName);
HMODULE hModule = GetModuleHandle(szSearch);
BOOL fNeedsFree = (hModule == NULL);
if (hModule == NULL) {
@@ -217,7 +217,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac CleanupPluginName(buf);
TCHAR buf2[128];
- mir_sntprintf(buf2, _T("%hs (%s)"), buf, CharLower(wfd.cFileName));
+ mir_sntprintf(buf2, L"%hs (%s)", buf, CharLower(wfd.cFileName));
SendMessage(hwndListBox, LB_ADDSTRING, 0, (LPARAM)buf2);
}
}
@@ -271,7 +271,7 @@ static void DisplayPackInfo(HWND hwndDlg, const HELPPACK_INFO *pack) TCHAR *pszIncompat;
pszIncompat = TranslateT("(incompatible)");
szLocaleName[_countof(szLocaleName) - lstrlen(pszIncompat) - 1] = 0;
- lstrcat(lstrcat(szLocaleName, _T(" ")), pszIncompat); /* buffer safe */
+ lstrcat(lstrcat(szLocaleName, L" "), pszIncompat); /* buffer safe */
}
SetDlgItemText(hwndDlg, IDC_LANGLOCALE, szLocaleName);
}
@@ -343,7 +343,7 @@ static void DeletePackFile(HWND hwndDlg, HWND hwndList, int iItem, HELPPACK_INFO lvi.mask = LVIF_PARAM;
lvi.iSubItem = 0;
if (ListView_GetItem(hwndList, &lvi))
- EnablePack((HELPPACK_INFO*)lvi.lParam, _T("helppack_*.txt"));
+ EnablePack((HELPPACK_INFO*)lvi.lParam, L"helppack_*.txt");
}
else
DisplayPackInfo(hwndDlg, NULL);
@@ -429,7 +429,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
if (ServiceExists(MS_FLAGS_LOADFLAGICON))
ListView_SetImageList(hwndList, ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR24, 8, 8), LVSIL_SMALL);
- CorrectPacks(_T("helppack_*.txt"), _T("helppack_english.txt"), FALSE);
+ CorrectPacks(L"helppack_*.txt", L"helppack_english.txt", FALSE);
SendMessage(hwndDlg, M_RELOADLIST, 0, 0);
SendMessage(hwndDlg, M_SHOWFILECOL, 0, 1);
return TRUE;
@@ -443,7 +443,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP HIMAGELIST himl = ListView_GetImageList(hwndList, LVSIL_SMALL);
ImageList_RemoveAll(himl);
/* enum all packs */
- EnumPacks(InsertPackItemEnumProc, _T("helppack_*.txt"), "Miranda Help Pack Version 1", (WPARAM)hwndList, (LPARAM)himl);
+ EnumPacks(InsertPackItemEnumProc, L"helppack_*.txt", "Miranda Help Pack Version 1", (WPARAM)hwndList, (LPARAM)himl);
/* nothing installed */
if (!ListView_GetItemCount(hwndList))
DisplayPackInfo(hwndDlg, NULL);
@@ -636,7 +636,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (lvi.iItem = 0; ListView_GetItem(hwndList, &lvi); ++lvi.iItem) {
HELPPACK_INFO *pack = (HELPPACK_INFO*)lvi.lParam;
if (lvi.state&INDEXTOSTATEIMAGEMASK(2)) {
- EnablePack(pack, _T("helppack_*.txt"));
+ EnablePack(pack, L"helppack_*.txt");
pack->flags |= HPF_ENABLED;
}
else
@@ -757,7 +757,7 @@ static int HelpOptInit(WPARAM wParam, LPARAM) Options_AddPage(wParam, &odp);
#ifdef EDITOR
- odp.ptszTab = _T("Help editor"); /* autotranslated */
+ odp.ptszTab = L"Help editor"; /* autotranslated */
#else
odp.ptszTab = LPGENT("Advanced"); /* autotranslated */
#endif
@@ -776,7 +776,7 @@ void InitOptions(void) hwndLangOpt = NULL;
hHookOptInit = HookEvent(ME_OPT_INITIALISE, HelpOptInit);
- CorrectPacks(_T("helppack_*.txt"), _T("helppack_english.txt"), FALSE);
+ CorrectPacks(L"helppack_*.txt", L"helppack_english.txt", FALSE);
}
void UninitOptions(void)
diff --git a/plugins/ContextHelp/src/utils.cpp b/plugins/ContextHelp/src/utils.cpp index aac6e70a22..5532d39db5 100644 --- a/plugins/ContextHelp/src/utils.cpp +++ b/plugins/ContextHelp/src/utils.cpp @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef EDITOR
extern const TCHAR *szControlTypeNames[] = {
- _T("Unknown"), _T("Dialog Box"), _T("Button"), _T("Check Box"), _T("Radio Button"),
- _T("Text"), _T("Image"), _T("Edit Box"), _T("Group Box"), _T("Combo Box"),
- _T("List Box"), _T("Spin Edit Box"), _T("Progress Bar"), _T("Slider"), _T("List View"),
- _T("Tree View"), _T("Date/Time Picker"), _T("IP Address"), _T("Status Bar"), _T("Hyperlink"),
- _T("Contact List"), _T("Scroll Bar"), _T("Animation"), _T("Hotkey"), _T("Tabs"),
- _T("Colour Picker"), _T("Tool Bar"), _T("Combo Edit Box"), _T("Size Grip") };
+ L"Unknown", L"Dialog Box", L"Button", L"Check Box", L"Radio Button",
+ L"Text", L"Image", L"Edit Box", L"Group Box", L"Combo Box",
+ L"List Box", L"Spin Edit Box", L"Progress Bar", L"Slider", L"List View",
+ L"Tree View", L"Date/Time Picker", L"IP Address", L"Status Bar", L"Hyperlink",
+ L"Contact List", L"Scroll Bar", L"Animation", L"Hotkey", L"Tabs",
+ L"Colour Picker", L"Tool Bar", L"Combo Edit Box", L"Size Grip" };
#endif
int GetControlType(HWND hwndCtl)
@@ -41,10 +41,10 @@ int GetControlType(HWND hwndCtl) return CTLTYPE_DIALOG;
if (!GetClassName(hwndCtl, szClassName, _countof(szClassName)))
return CTLTYPE_UNKNOWN;
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return CTLTYPE_DIALOG;
- else if (!lstrcmpi(szClassName, _T("Static"))) {
- if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("ComboBox")) || !lstrcmpi(szClassName, WC_COMBOBOXEX))
+ else if (!lstrcmpi(szClassName, L"Static")) {
+ if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"ComboBox") || !lstrcmpi(szClassName, WC_COMBOBOXEX))
return CTLTYPE_COMBO;
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
switch (style&SS_TYPEMASK) {
@@ -67,7 +67,7 @@ int GetControlType(HWND hwndCtl) }
else if (GetClassLong(hwndCtl, GCW_ATOM) == 32772) // WinNT/2000/XP: icon titles
return CTLTYPE_IMAGE; // class="#32772"
- else if (!lstrcmpi(szClassName, _T("Button"))) {
+ else if (!lstrcmpi(szClassName, L"Button")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
switch (style & 0x24) {
case BS_CHECKBOX:
@@ -89,25 +89,25 @@ int GetControlType(HWND hwndCtl) }
else if (!lstrcmpi(szClassName, MIRANDABUTTONCLASS))
return CTLTYPE_BUTTON;
- else if (!lstrcmpi(szClassName, _T("Edit"))) {
- if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("ComboBox")))
+ else if (!lstrcmpi(szClassName, L"Edit")) {
+ if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"ComboBox"))
return CTLTYPE_COMBO;
if (GetClassName(GetWindow(hwndCtl, GW_HWNDNEXT), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, UPDOWN_CLASS))
if ((HWND)SendMessage(GetWindow(hwndCtl, GW_HWNDNEXT), UDM_GETBUDDY, 0, 0) == hwndCtl)
return CTLTYPE_SPINEDIT;
return CTLTYPE_EDIT;
}
- else if (!_tcsnicmp(szClassName, _T("RichEdit"), 8))
+ else if (!_tcsnicmp(szClassName, L"RichEdit", 8))
return CTLTYPE_EDIT; // RICHEDIT,RichEdit20A,RichEdit20W,RichEdit50W and future versions
- else if (!lstrcmpi(szClassName, _T("ListBox"))) {
+ else if (!lstrcmpi(szClassName, L"ListBox")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
if (style&LBS_COMBOBOX)
return CTLTYPE_COMBO;
return CTLTYPE_LIST;
}
- else if (!lstrcmpi(szClassName, _T("ComboLBox")) || !lstrcmpi(szClassName, _T("ComboBox")) || !lstrcmpi(szClassName, WC_COMBOBOXEX))
+ else if (!lstrcmpi(szClassName, L"ComboLBox") || !lstrcmpi(szClassName, L"ComboBox") || !lstrcmpi(szClassName, WC_COMBOBOXEX))
return CTLTYPE_COMBO;
- else if (!lstrcmpi(szClassName, _T("ScrollBar"))) {
+ else if (!lstrcmpi(szClassName, L"ScrollBar")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
if (style&SBS_SIZEBOX)
return CTLTYPE_SIZEGRIP;
@@ -116,7 +116,7 @@ int GetControlType(HWND hwndCtl) else if (!lstrcmpi(szClassName, WC_PAGESCROLLER))
return CTLTYPE_SCROLL;
else if (!lstrcmpi(szClassName, UPDOWN_CLASS)) {
- if (GetClassName((HWND)SendMessage(hwndCtl, UDM_GETBUDDY, 0, 0), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("Edit")))
+ if (GetClassName((HWND)SendMessage(hwndCtl, UDM_GETBUDDY, 0, 0), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"Edit"))
return CTLTYPE_SPINEDIT;
return CTLTYPE_SCROLL;
}
@@ -136,7 +136,7 @@ int GetControlType(HWND hwndCtl) return CTLTYPE_STATUSBAR;
else if (!lstrcmpi(szClassName, (LPCWSTR)CLISTCONTROL_CLASS))
return CTLTYPE_CLC; // look at !! casting
- else if (!lstrcmpi(szClassName, WNDCLASS_HYPERLINK) || !lstrcmpi(szClassName, _T("SysLink")))
+ else if (!lstrcmpi(szClassName, WNDCLASS_HYPERLINK) || !lstrcmpi(szClassName, L"SysLink"))
return CTLTYPE_HYPERLINK;
else if (!lstrcmpi(szClassName, ANIMATE_CLASS))
return CTLTYPE_ANIMATION;
@@ -170,7 +170,7 @@ HWND GetControlDialog(HWND hwndCtl) if (GetClassLong(hwndCtl, GCW_ATOM) == 32770)
return hwndCtl;
if (GetClassName(hwndCtl, szClassName, _countof(szClassName)))
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return hwndCtl;
hwndCtl = GetParent(hwndCtl);
}
@@ -273,7 +273,7 @@ static BOOL CALLBACK CreateCtlIdEnumProc(HWND hwnd, LPARAM lParam) if (GetClassLong(hwnd, GCW_ATOM) == 32770) // class="#32770"
return TRUE;
if (GetClassName(hwnd, szClassName, _countof(szClassName)))
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return TRUE;
if (GetWindowLongPtr(hwnd, GWL_ID) <= 0 || GetWindowLongPtr(hwnd, GWL_ID) == 0xFFFF)
ccid->id--;
@@ -304,7 +304,7 @@ int GetControlID(HWND hwndCtl) hwndCtl = hwndBuddy;
}
}
- else if (GetClassLong(hwndCtl, GCW_ATOM) == 32770 || !lstrcmpi(szClassName, _T("MDIClient")))
+ else if (GetClassLong(hwndCtl, GCW_ATOM) == 32770 || !lstrcmpi(szClassName, L"MDIClient"))
return 0; // ensure this is always unset
}
ccid.id = GetWindowLongPtr(hwndCtl, GWL_ID);
diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index d39f6beecd..261f91aaa2 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -73,7 +73,7 @@ static BOOL EnsureRecordCacheLoaded(BYTE **pdata,DWORD *pcount) mir_cslock lck(csRecordCache);
if (dataRecords == NULL) {
/* load record data list from resources */
- hrsrc=FindResource(hInst,MAKEINTRESOURCE(IDR_IPTOCOUNTRY),_T("BIN"));
+ hrsrc=FindResource(hInst,MAKEINTRESOURCE(IDR_IPTOCOUNTRY),L"BIN");
cb=SizeofResource(hInst,hrsrc);
dataRecords=(BYTE*)LockResource(LoadResource(hInst,hrsrc));
if (cb<=sizeof(DWORD) || dataRecords == NULL)
@@ -289,9 +289,9 @@ static void BinConvThread(void *unused) if (MessageBox(NULL,_T("Looking for 'ip-to-country.csv' in current directory.\n"
"It will be converted into 'ip-to-country.bin'.\n"
"See debug output for more details.\n"
- "This process may take very long."),_T("Bin Converter"),MB_OKCANCEL|MB_ICONINFORMATION|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL) == IDOK) {
+ "This process may take very long."),L"Bin Converter",MB_OKCANCEL|MB_ICONINFORMATION|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL) == IDOK) {
EnumIpDataLines("ip-to-country.csv","ip-to-country.bin");
- MessageBox(NULL,_T("Done!\n'ip-to-country.bin' has been created in current directory."),_T("Bin Converter"),MB_OK|MB_ICONINFORMATION|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL);
+ MessageBox(NULL,L"Done!\n'ip-to-country.bin' has been created in current directory.",L"Bin Converter",MB_OK|MB_ICONINFORMATION|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL);
}
}
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 73aa9edb38..1d6692ca26 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -159,7 +159,7 @@ INT_PTR CopyLinkToClipboard(WPARAM, LPARAM) ptrT tmp(db_get_wsa(NULL, PluginName, "Username"));
if (tmp != NULL) {
TCHAR buffer[MAX_PATH];
- mir_sntprintf(buffer, _T("http://vi.miranda-ng.org/detail/%s"), tmp);
+ mir_sntprintf(buffer, L"http://vi.miranda-ng.org/detail/%s", tmp);
int bufLen = (sizeof(buffer) + 1) * sizeof(TCHAR);
HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, bufLen);
@@ -245,7 +245,7 @@ static int ModulesLoaded(WPARAM, LPARAM) crs_a2t(vertxt, temp);
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
- replaceStrT(profpath, _T("%miranda_userdata%"));
+ replaceStrT(profpath, L"%miranda_userdata%");
// Removed because it isn't available on Load()
// hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
@@ -355,7 +355,7 @@ static int PreShutdown(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
- hMsftedit = LoadLibrary(_T("Msftedit.dll"));
+ hMsftedit = LoadLibrary(L"Msftedit.dll");
if (hMsftedit == NULL)
return 1;
@@ -365,8 +365,8 @@ extern "C" int __declspec(dllexport) Load(void) mir_getLP(&pluginInfoEx);
- profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat"));
- profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+ profname = Utils_ReplaceVarsT(L"%miranda_profilename%.dat");
+ profpath = Utils_ReplaceVarsT(L"%miranda_userdata%");
if (catchcrashes && !needrestart)
mir_sntprintf(CrashLogFolder, TEXT("%s\\CrashLog"), profpath);
_tcsncpy_s(VersionInfoFolder, profpath, _TRUNCATE);
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 44b5a8b1f4..0ea80781bd 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -211,7 +211,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) timebuf, "<unknown>", TEXT(""));
GetLinkedModulesInfo(path, ubuffer);
- ubuffer.Append(_T("\r\n"));
+ ubuffer.Append(L"\r\n");
++ucount;
}
@@ -234,7 +234,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) VS_FIXEDFILEINFO* fi;
void* pVerInfo = mir_alloc(verInfoSize);
GetFileVersionInfo(path, 0, verInfoSize, pVerInfo);
- VerQueryValue(pVerInfo, _T("\\"), (LPVOID*)&fi, &blockSize);
+ VerQueryValue(pVerInfo, L"\\", (LPVOID*)&fi, &blockSize);
v1 = HIWORD(fi->dwProductVersionMS), v2 = LOWORD(fi->dwProductVersionMS),
v3 = HIWORD(fi->dwProductVersionLS), v4 = LOWORD(fi->dwProductVersionLS);
mir_free(pVerInfo);
@@ -346,7 +346,7 @@ static void GetProtocolStrings(CMString& buffer) for (i = 0; i < protoCountMy; i++)
buffer.AppendFormat(TEXT("%-24s %d - Enabled %d - Disabled %sLoaded\r\n"),
(TCHAR*)_A2T(protoListMy[i]), protos[i].countse,
- protos[i].countsd, protos[i].nloaded ? _T("Not ") : _T(""));
+ protos[i].countsd, protos[i].nloaded ? L"Not " : L"");
}
@@ -445,34 +445,34 @@ static void GetIconStrings(CMString& buffer) void PrintVersionInfo(CMString& buffer, unsigned flags)
{
GetProcessorString(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
GetFreeMemoryString(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
TCHAR tszOsVer[200];
GetOSDisplayString(tszOsVer, _countof(tszOsVer));
buffer.Append(tszOsVer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
GetInternetExplorerVersion(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
GetAdminString(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
GetLanguageString(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
TCHAR *profpathfull = Utils_ReplaceVarsT(profpath);
if (flags & VI_FLAG_PRNVAR) {
GetFreeDiskString(profpathfull, buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
}
buffer.AppendFormat(TEXT("\r\nMiranda NG Version: %s"), vertxt);
GetWow64String(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
TCHAR path[MAX_PATH], mirtime[30];
GetModuleFileName(NULL, path, MAX_PATH);
@@ -503,7 +503,7 @@ void PrintVersionInfo(CMString& buffer, unsigned flags) mir_free(profpathfull);
GetLanguagePackString(buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
// buffer.AppendFormat(TEXT("Nightly: %s\r\n"), _tcsstr(vertxt, TEXT("alpha")) ? TEXT("Yes") : TEXT("No"));
// buffer.AppendFormat(TEXT("Unicode: %s\r\n"), _tcsstr(vertxt, TEXT("Unicode")) ? TEXT("Yes") : TEXT("No"));
@@ -585,7 +585,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA int crashpos = buffer.GetLength();
ReadableExceptionInfo(exc_ptr->ExceptionRecord, buffer);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
const HANDLE hProcess = GetCurrentProcess();
@@ -668,7 +668,7 @@ void CreateCrashReport(HANDLE hDumpFile, PEXCEPTION_POINTERS exc_ptr, const TCHA buffer.AppendFormat(formatd, (void*)frame.AddrPC.Offset, moduleName, (void*)Module.BaseOfImage,lineFileName, Line.LineNumber, name);
}
SymCleanup(hProcess);
- buffer.Append(_T("\r\n"));
+ buffer.Append(L"\r\n");
PrintVersionInfo(buffer, VI_FLAG_PRNDLL);
diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index 0544d4a43f..879e3a2834 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -37,9 +37,9 @@ void CDb3Mmap::Map() if (m_hMap) {
m_pDbCache = (PBYTE)MapViewOfFile(m_hMap, dwAccess, 0, 0, 0);
if (!m_pDbCache)
- DatabaseCorruption(_T("%s (MapViewOfFile failed. Code: %d)"));
+ DatabaseCorruption(L"%s (MapViewOfFile failed. Code: %d)");
}
- else DatabaseCorruption(_T("%s (CreateFileMapping failed. Code: %d)"));
+ else DatabaseCorruption(L"%s (CreateFileMapping failed. Code: %d)");
}
void CDb3Mmap::ReMap(DWORD needed)
@@ -51,7 +51,7 @@ void CDb3Mmap::ReMap(DWORD needed) if (needed > 0) {
if (needed > m_ChunkSize) {
if (needed + m_dwFileSize > m_dbHeader.ofsFileEnd + m_ChunkSize)
- DatabaseCorruption(_T("%s (Too large increment)"));
+ DatabaseCorruption(L"%s (Too large increment)");
else {
DWORD x = m_dbHeader.ofsFileEnd / m_ChunkSize;
m_dwFileSize = (x + 1)*m_ChunkSize;
diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index 0c50f72609..8662142d0d 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -76,8 +76,8 @@ int CDb3Mmap::CheckDbHeaders(bool bInteractive) if (p) *p = 0;
HKEY hPathSetting;
- if (!RegCreateKey(HKEY_CURRENT_USER, _T("Software\\Miranda NG"), &hPathSetting)) {
- RegSetValue(hPathSetting, _T("InstallPath"), REG_SZ, tszCurPath, sizeof(tszCurPath));
+ if (!RegCreateKey(HKEY_CURRENT_USER, L"Software\\Miranda NG", &hPathSetting)) {
+ RegSetValue(hPathSetting, L"InstallPath", REG_SZ, tszCurPath, sizeof(tszCurPath));
RegCloseKey(hPathSetting);
}
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 3d714021a5..995d681a69 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -30,11 +30,11 @@ void CDb3Mmap::AddToList(char *name, DWORD ofs) mn->ofs = ofs;
if (m_lMods.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Name not unique)"));
+ DatabaseCorruption(L"%s (Module Name not unique)");
m_lMods.insert(mn);
if (m_lOfs.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Offset not unique)"));
+ DatabaseCorruption(L"%s (Module Offset not unique)");
m_lOfs.insert(mn);
}
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index 8f941bb1db..ad2b9130aa 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -105,7 +105,7 @@ static DATABASELINK dblink = {
sizeof(DATABASELINK),
"dbx_mmap",
- _T("dbx mmap driver"),
+ L"dbx mmap driver",
makeDatabase,
grokHeader,
LoadDatabase,
diff --git a/plugins/DbChecker/src/progress.cpp b/plugins/DbChecker/src/progress.cpp index ff6a5d7202..7d6edd8d75 100644 --- a/plugins/DbChecker/src/progress.cpp +++ b/plugins/DbChecker/src/progress.cpp @@ -90,7 +90,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM hdc = GetDC(NULL);
hFont = (HFONT)SendMessage(hdlg, WM_GETFONT, 0, 0);
hoFont = (HFONT)SelectObject(hdc, hFont);
- GetTextExtentPoint32(hdc, _T("x"), 1, &s);
+ GetTextExtentPoint32(hdc, L"x", 1, &s);
SelectObject(hdc, hoFont);
ReleaseDC(NULL, hdc);
fontHeight = s.cy;
diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 3b597e387a..1f44e9913d 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -78,8 +78,8 @@ void GetProfileDirectory(TCHAR* szMirandaDir, TCHAR* szPath, int cbPath) TCHAR szProfileDir[MAX_PATH], szExpandedProfileDir[MAX_PATH], szMirandaBootIni[MAX_PATH];
mir_tstrcpy(szMirandaBootIni, szMirandaDir);
- mir_tstrcat(szMirandaBootIni, _T("\\mirandaboot.ini"));
- GetPrivateProfileString(_T("Database"), _T("ProfileDir"), _T("./Profiles"), szProfileDir, _countof(szProfileDir), szMirandaBootIni);
+ mir_tstrcat(szMirandaBootIni, L"\\mirandaboot.ini");
+ GetPrivateProfileString(L"Database", L"ProfileDir", L"./Profiles", szProfileDir, _countof(szProfileDir), szMirandaBootIni);
ExpandEnvironmentStrings(szProfileDir, szExpandedProfileDir, _countof(szExpandedProfileDir));
_tchdir(szMirandaDir);
if (!_tfullpath(szPath, szExpandedProfileDir, cbPath))
@@ -114,10 +114,10 @@ static int AddDatabaseToList(HWND hwndList, const TCHAR* filename, TCHAR* dir) pName++;
TCHAR szName[MAX_PATH];
- mir_sntprintf(szName, _T("%s%s"), dir, pName);
+ mir_sntprintf(szName, L"%s%s", dir, pName);
TCHAR *pDot = _tcsrchr(szName, '.');
- if (pDot != NULL && !mir_tstrcmpi(pDot, _T(".dat")))
+ if (pDot != NULL && !mir_tstrcmpi(pDot, L".dat"))
*pDot = 0;
lvi.iItem = 0;
@@ -129,7 +129,7 @@ static int AddDatabaseToList(HWND hwndList, const TCHAR* filename, TCHAR* dir) int iNewItem = ListView_InsertItem(hwndList, &lvi);
TCHAR szSize[20];
- mir_sntprintf(szSize, _T("%.2lf MB"), totalSize / 1048576.0);
+ mir_sntprintf(szSize, L"%.2lf MB", totalSize / 1048576.0);
ListView_SetItemText(hwndList, iNewItem, 1, szSize);
return iNewItem;
}
@@ -141,15 +141,15 @@ void FindAdd(HWND hdlg, TCHAR *szProfileDir, TCHAR *szPrefix) TCHAR szSearchPath[MAX_PATH], szFilename[MAX_PATH];
mir_tstrcpy(szSearchPath, szProfileDir);
- mir_tstrcat(szSearchPath, _T("\\*.*"));
+ mir_tstrcat(szSearchPath, L"\\*.*");
hFind = FindFirstFile(szSearchPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L".."))
continue;
- mir_sntprintf(szFilename, _T("%s\\%s\\%s.dat"), szProfileDir, fd.cFileName, fd.cFileName);
+ mir_sntprintf(szFilename, L"%s\\%s\\%s.dat", szProfileDir, fd.cFileName, fd.cFileName);
if (_taccess(szFilename, 0) == 0)
AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), szFilename, szPrefix);
} while (FindNextFile(hFind, &fd));
@@ -204,30 +204,30 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM DWORD cbData = _countof(szMirandaPath);
mir_tstrcpy(szMirandaProfiles, szMirandaPath);
- mir_tstrcat(szMirandaProfiles, _T("\\Profiles"));
+ mir_tstrcat(szMirandaProfiles, L"\\Profiles");
GetProfileDirectory(szMirandaPath, szProfileDir, _countof(szProfileDir));
// search in profile dir (using ini file)
if (mir_tstrcmpi(szProfileDir, szMirandaProfiles))
- FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
+ FindAdd(hdlg, szProfileDir, L"[ini]\\");
- FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
+ FindAdd(hdlg, szMirandaProfiles, L"[prf]\\");
// search in current dir (as DBTOOL)
- FindAdd(hdlg, szMirandaPath, _T("[.]\\"));
+ FindAdd(hdlg, szMirandaPath, L"[.]\\");
// search in profile dir (using registry path + ini file)
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
- if (RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (PBYTE)szMirandaPath, &cbData) == ERROR_SUCCESS) {
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
+ if (RegQueryValueEx(hKey, L"Path", NULL, NULL, (PBYTE)szMirandaPath, &cbData) == ERROR_SUCCESS) {
if (mir_tstrcmp(szProfileDir, szMirandaPath)) {
GetProfileDirectory(szMirandaPath, szProfileDir, _countof(szProfileDir));
- FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
+ FindAdd(hdlg, szProfileDir, L"[reg]\\");
}
}
RegCloseKey(hKey);
}
// select
if (opts.filename[0])
- i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), opts.filename, _T(""));
+ i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), opts.filename, L"");
if (i == -1)
i = 0;
ListView_SetItemState(GetDlgItem(hdlg, IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED);
@@ -261,15 +261,15 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM OPENFILENAME ofn = { 0 };
TCHAR str[MAX_PATH];
- // _T("Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0");
+ // L"Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0";
TCHAR *filter, *tmp, *tmp1, *tmp2;
tmp1 = TranslateT("Miranda Databases (*.dat)");
tmp2 = TranslateT("All Files");
filter = tmp = (TCHAR*)_alloca((mir_tstrlen(tmp1) + mir_tstrlen(tmp2) + 11)*sizeof(TCHAR));
tmp = addstring(tmp, tmp1);
- tmp = addstring(tmp, _T("*.DAT"));
+ tmp = addstring(tmp, L"*.DAT");
tmp = addstring(tmp, tmp2);
- tmp = addstring(tmp, _T("*"));
+ tmp = addstring(tmp, L"*");
*tmp = 0;
GetDlgItemText(hdlg, IDC_FILE, str, _countof(str));
@@ -277,13 +277,13 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM ofn.hwndOwner = hdlg;
ofn.hInstance = NULL;
ofn.lpstrFilter = filter;
- ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrDefExt = L"dat";
ofn.lpstrFile = str;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
if (GetOpenFileName(&ofn)) {
- int i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), str, _T(""));
+ int i = AddDatabaseToList(GetDlgItem(hdlg, IDC_DBLIST), str, L"");
if (i == -1)
i = 0;
ListView_SetItemState(GetDlgItem(hdlg, IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED);
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 26e42a773b..ec10e43f29 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -3,7 +3,7 @@ TCHAR *GetFilter()
{
static TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.ini%c%s%c*.*%c"), TranslateT("INI Files"), 0, 0, TranslateT("All Files"), 0, 0);
+ mir_sntprintf(filter, L"%s%c*.ini%c%s%c*.*%c", TranslateT("INI Files"), 0, 0, TranslateT("All Files"), 0, 0);
return filter;
}
@@ -38,7 +38,7 @@ int Openfile(TCHAR *outputFile, const char *module, int maxlen) ofn.Flags = OFN_HIDEREADONLY | OFN_SHAREAWARE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
ofn.lpstrTitle = TranslateT("Export to file");
ofn.nMaxFile = maxlen;
- ofn.lpstrDefExt = _T("ini");
+ ofn.lpstrDefExt = L"ini";
if (!GetSaveFileName(&ofn))
return 0;
@@ -151,7 +151,7 @@ void exportDB(MCONTACT hContact, const char *module) TCHAR fileName[MAX_PATH];
if (Openfile(fileName, (hContact == INVALID_CONTACT_ID) ? NULL : module, MAX_PATH)) {
- FILE *file = _tfopen(fileName, _T("wt"));
+ FILE *file = _tfopen(fileName, L"wt");
if (!file) {
msg(TranslateT("Couldn't open file for writing"));
return;
@@ -492,7 +492,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) DWORD offset = 0;
- mir_tstrcpy(szFileNames, _T(""));
+ mir_tstrcpy(szFileNames, L"");
if (!FilePath)
offset = Openfile2Import(szFileNames, _countof(szFileNames));
@@ -503,11 +503,11 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, const char *FilePath) }
int index = 0;
- if (mir_tstrcmp(szFileNames, _T(""))) {
+ if (mir_tstrcmp(szFileNames, L"")) {
if ((DWORD)mir_tstrlen(szFileNames) < offset) {
index += offset;
mir_tstrncpy(szPath, szFileNames, offset);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
}
while (szFileNames[index]) {
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index f4d3390108..b914c6a216 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -268,16 +268,16 @@ int WriteBlobFromString(MCONTACT hContact, const char *szModule, const char *szS TCHAR *DBVType(BYTE type)
{
switch (type) {
- case DBVT_BYTE: return _T("BYTE");
- case DBVT_WORD: return _T("WORD");
- case DBVT_DWORD: return _T("DWORD");
- case DBVT_ASCIIZ: return _T("STRING");
+ case DBVT_BYTE: return L"BYTE";
+ case DBVT_WORD: return L"WORD";
+ case DBVT_DWORD: return L"DWORD";
+ case DBVT_ASCIIZ: return L"STRING";
case DBVT_WCHAR:
- case DBVT_UTF8: return _T("UNICODE");
- case DBVT_BLOB: return _T("BLOB");
- case DBVT_DELETED: return _T("DELETED");
+ case DBVT_UTF8: return L"UNICODE";
+ case DBVT_BLOB: return L"BLOB";
+ case DBVT_DELETED: return L"DELETED";
}
- return _T("");
+ return L"";
}
DWORD getNumericValue(DBVARIANT *dbv)
@@ -474,7 +474,7 @@ int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxle int len = (int)mir_tstrlen(name);
if (len + 2 < _countof(name)) {
if (len)
- mir_tstrncat(name, _T(" "), _countof(name));
+ mir_tstrncat(name, L" ", _countof(name));
len++;
GetValue(hContact, szProto, "LastName", &name[len], _countof(name) - len);
}
@@ -491,15 +491,15 @@ int GetContactName(MCONTACT hContact, const char *proto, TCHAR *value, int maxle if (szProto && szProto[0]) {
if (g_Order)
- mir_sntprintf(value, maxlen, _T("(%s) %s"), _A2T(szProto), name);
+ mir_sntprintf(value, maxlen, L"(%s) %s", _A2T(szProto), name);
else
- mir_sntprintf(value, maxlen, _T("%s (%s)"), name, _A2T(szProto));
+ mir_sntprintf(value, maxlen, L"%s (%s)", name, _A2T(szProto));
}
else mir_tstrncpy(value, name, maxlen);
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (!Proto_IsAccountEnabled(pa)) {
- mir_tstrncat(value, _T(" "), maxlen);
+ mir_tstrncat(value, L" ", maxlen);
mir_tstrncat(value, TranslateT("[UNLOADED]"), maxlen);
}
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index dfc9ac6998..cea9dc8bf1 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -131,7 +131,7 @@ void doItems(ModuleSettingLL* modlist, int count) continue;
// Caption
- mir_sntprintf(percent, _T("%s %d%%"), title, (int)(100 * i / count));
+ mir_sntprintf(percent, L"%s %d%%", title, (int)(100 * i / count));
SetWindowText(hwnd, percent);
for (ModSetLinkLinkItem *module = modlist->first; module && hwnd2mainWindow; module = module->next) {
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index a5777080a1..863cfc8869 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -82,7 +82,7 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i case DBVT_BYTE:
case DBVT_WORD:
case DBVT_DWORD:
- if (val != 0 || !mir_tstrcmp(value, _T("0")))
+ if (val != 0 || !mir_tstrcmp(value, L"0"))
res = setNumericValue(hContact, module, setting, val, toType);
break;
@@ -194,15 +194,15 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident lvi.mask = LVIF_IMAGE;
lvi.iItem = index;
- ListView_SetItemText(hwnd2List, index, 4, resident ? _T("[R]") : _T(""));
+ ListView_SetItemText(hwnd2List, index, 4, resident ? L"[R]" : L"");
if (g_db && g_db->IsSettingEncrypted(info.module, setting)) {
lvi.iImage = IMAGE_UNICODE;
ListView_SetItem(hwnd2List, &lvi);
ListView_SetItemTextA(hwnd2List, index, 0, setting);
ListView_SetItemText(hwnd2List, index, 1, TranslateT("*** encrypted ***"));
- ListView_SetItemText(hwnd2List, index, 2, _T("UNICODE"));
- ListView_SetItemText(hwnd2List, index, 3, _T(""));
+ ListView_SetItemText(hwnd2List, index, 2, L"UNICODE");
+ ListView_SetItemText(hwnd2List, index, 3, L"");
return;
}
@@ -216,7 +216,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ListView_SetItemTextA(hwnd2List, index, 1, ptrA(StringFromBlob(dbv->pbVal, dbv->cpbVal)));
- mir_sntprintf(data, _T("0x%04X (%u)"), dbv->cpbVal, dbv->cpbVal);
+ mir_sntprintf(data, L"0x%04X (%u)", dbv->cpbVal, dbv->cpbVal);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -224,30 +224,30 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident lvi.iImage = IMAGE_BYTE;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%02X (%u)"), dbv->bVal, dbv->bVal);
+ mir_sntprintf(data, L"0x%02X (%u)", dbv->bVal, dbv->bVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0001 (1)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0001 (1)");
break;
case DBVT_WORD:
lvi.iImage = IMAGE_WORD;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%04X (%u)"), dbv->wVal, dbv->wVal);
+ mir_sntprintf(data, L"0x%04X (%u)", dbv->wVal, dbv->wVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0002 (2)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0002 (2)");
break;
case DBVT_DWORD:
lvi.iImage = IMAGE_DWORD;
ListView_SetItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%08X (%u)"), dbv->dVal, dbv->dVal);
+ mir_sntprintf(data, L"0x%08X (%u)", dbv->dVal, dbv->dVal);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0004 (4)"));
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0004 (4)");
break;
case DBVT_ASCIIZ:
@@ -257,7 +257,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ListView_SetItemTextA(hwnd2List, index, 1, dbv->pszVal);
length = (int)mir_strlen(dbv->pszVal) + 1;
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -268,7 +268,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident length = (int)mir_wstrlen(dbv->pwszVal) + 1;
ListView_SetItemText(hwnd2List, index, 1, dbv->pwszVal);
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -281,7 +281,7 @@ void updateListItem(int index, const char *setting, DBVARIANT *dbv, int resident ptrT tszText(mir_utf8decodeT(dbv->pszVal));
ListView_SetItemText(hwnd2List, index, 1, tszText);
}
- mir_sntprintf(data, _T("0x%04X (%u)"), length, length);
+ mir_sntprintf(data, L"0x%04X (%u)", length, length);
ListView_SetItemText(hwnd2List, index, 3, data);
break;
@@ -306,18 +306,18 @@ void addListHandle(MCONTACT hContact) int index = ListView_InsertItem(hwnd2List, &lvi);
- mir_sntprintf(data, _T("0x%08X (%ld)"), hContact, hContact);
+ mir_sntprintf(data, L"0x%08X (%ld)", hContact, hContact);
ListView_SetItemText(hwnd2List, index, 1, data);
- ListView_SetItemText(hwnd2List, index, 2, _T("HANDLE"));
- ListView_SetItemText(hwnd2List, index, 3, _T("0x0004 (4)"));
+ ListView_SetItemText(hwnd2List, index, 2, L"HANDLE");
+ ListView_SetItemText(hwnd2List, index, 3, L"0x0004 (4)");
if (db_mc_isEnabled()) {
if (db_mc_isSub(hContact)) {
- ListView_SetItemText(hwnd2List, index, 4, _T("[S]"));
+ ListView_SetItemText(hwnd2List, index, 4, L"[S]");
}
else
if (db_mc_isMeta(hContact)) {
- ListView_SetItemText(hwnd2List, index, 4, _T("[M]"));
+ ListView_SetItemText(hwnd2List, index, 4, L"[M]");
}
}
}
@@ -636,7 +636,7 @@ void EditLabel(int item, int subitem) info.subitem = subitem;
if (!subitem)
- info.hwnd2Edit = CreateWindow(_T("EDIT"), _A2T(setting), WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", _A2T(setting), WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
else {
TCHAR *str = NULL, value[16] = { 0 };
@@ -645,13 +645,13 @@ void EditLabel(int item, int subitem) str = mir_a2t(dbv.pszVal);
break;
case DBVT_BYTE:
- mir_sntprintf(value, (g_Hex & HEX_BYTE) ? _T("0x%02X") : _T("%u"), dbv.bVal);
+ mir_sntprintf(value, (g_Hex & HEX_BYTE) ? L"0x%02X" : L"%u", dbv.bVal);
break;
case DBVT_WORD:
- mir_sntprintf(value, (g_Hex & HEX_WORD) ? _T("0x%04X") : _T("%u"), dbv.wVal);
+ mir_sntprintf(value, (g_Hex & HEX_WORD) ? L"0x%04X" : L"%u", dbv.wVal);
break;
case DBVT_DWORD:
- mir_sntprintf(value, (g_Hex & HEX_DWORD) ? _T("0x%08X") : _T("%u"), dbv.dVal);
+ mir_sntprintf(value, (g_Hex & HEX_DWORD) ? L"0x%08X" : L"%u", dbv.dVal);
break;
case DBVT_WCHAR:
str = mir_u2t(dbv.pwszVal);
@@ -670,11 +670,11 @@ void EditLabel(int item, int subitem) GetClientRect(hwnd2List, &rclist);
if (rc.top + height > rclist.bottom && rclist.bottom - rclist.top > height)
rc.top = rc.bottom - height;
- info.hwnd2Edit = CreateWindow(_T("EDIT"), str, WS_BORDER | WS_VISIBLE | WS_CHILD | WS_VSCROLL | ES_MULTILINE | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, height, hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", str, WS_BORDER | WS_VISIBLE | WS_CHILD | WS_VSCROLL | ES_MULTILINE | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, height, hwnd2List, 0, hInst, 0);
mir_free(str);
}
else if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD)
- info.hwnd2Edit = CreateWindow(_T("EDIT"), value, WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
+ info.hwnd2Edit = CreateWindow(L"EDIT", value, WS_BORDER | WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL, rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), hwnd2List, 0, hInst, 0);
}
db_free(&dbv);
diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp index 876ac8262b..b712386a5b 100644 --- a/plugins/DbEditorPP/src/settingsdlg.cpp +++ b/plugins/DbEditorPP/src/settingsdlg.cpp @@ -166,13 +166,13 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l GetDlgItemText(hwnd, IDC_SETTINGVALUE, setting, settingLength + 1);
if (LOWORD(wParam) == CHK_DECIMAL && IsDlgButtonChecked(hwnd, CHK_DECIMAL))
{
- _stscanf(setting, _T("%X"), &tmp);
- mir_sntprintf(text, _T("%u"), tmp);
+ _stscanf(setting, L"%X", &tmp);
+ mir_sntprintf(text, L"%u", tmp);
}
else
{
- _stscanf(setting, _T("%u"), &tmp);
- mir_sntprintf(text, _T("%X"), tmp);
+ _stscanf(setting, L"%u", &tmp);
+ mir_sntprintf(text, L"%X", tmp);
}
SetDlgItemText(hwnd, IDC_SETTINGVALUE, text);
mir_free(setting);
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index 982eb423f1..a5ca3e7c0e 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -131,16 +131,16 @@ void addwatchtolist(HWND hwnd, struct DBsetting *lParam) break;
}
case DBVT_BYTE:
- mir_sntprintf(data, _T("0x%02X (%s)"), dbv->bVal, _ultot(dbv->bVal, tmp, 10));
+ mir_sntprintf(data, L"0x%02X (%s)", dbv->bVal, _ultot(dbv->bVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_WORD:
- mir_sntprintf(data, _T("0x%04X (%s)"), dbv->wVal, _ultot(dbv->wVal, tmp, 10));
+ mir_sntprintf(data, L"0x%04X (%s)", dbv->wVal, _ultot(dbv->wVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
case DBVT_DWORD:
- mir_sntprintf(data, _T("0x%08X (%s)"), dbv->dVal, _ultot(dbv->dVal, tmp, 10));
+ mir_sntprintf(data, L"0x%08X (%s)", dbv->dVal, _ultot(dbv->dVal, tmp, 10));
ListView_SetItemText(hwnd, index, 3, data);
break;
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index ba8c06e591..53a2dad93a 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -11,7 +11,7 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
TCHAR* ptszPath = (TCHAR*)PUGetPluginData(hWnd);
if (ptszPath != 0)
- ShellExecute(0, _T("open"), ptszPath, NULL, NULL, SW_SHOW);
+ ShellExecute(0, L"open", ptszPath, NULL, NULL, SW_SHOW);
PUDeletePopup(hWnd);
break;
@@ -149,7 +149,7 @@ int RotateBackups(TCHAR *backupfolder, TCHAR *dbname) if (options.num_backups == 0)
return 0; /* Roration disabled. */
- mir_sntprintf(backupfolderTmp, _T("%s\\%s*"), backupfolder, dbname);
+ mir_sntprintf(backupfolderTmp, L"%s\\%s*", backupfolder, dbname);
hFind = FindFirstFile(backupfolderTmp, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return 0;
@@ -169,7 +169,7 @@ int RotateBackups(TCHAR *backupfolder, TCHAR *dbname) if (i > 0)
qsort(bf, i, sizeof(backupFile), Comp); /* Sort the list of found files by date in descending order. */
for (; i >= options.num_backups; i --) {
- mir_sntprintf(backupfolderTmp, _T("%s\\%s"), backupfolder, bf[(i - 1)].Name);
+ mir_sntprintf(backupfolderTmp, L"%s\\%s", backupfolder, bf[(i - 1)].Name);
DeleteFile(backupfolderTmp);
}
err_out:
@@ -205,12 +205,12 @@ int Backup(TCHAR *backup_filename) GetLocalTime(&st);
GetComputerName(buffer, &size);
- mir_sntprintf(dest_file, _T("%s\\%s_%02d.%02d.%02d@%02d-%02d-%02d_%s.%s"), backupfolder, dbname, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, buffer, bZip ? _T("zip") : _T("dat"));
+ mir_sntprintf(dest_file, L"%s\\%s_%02d.%02d.%02d@%02d-%02d-%02d_%s.%s", backupfolder, dbname, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, buffer, bZip ? L"zip" : L"dat");
mir_free(backupfolder);
}
else {
_tcsncpy_s(dest_file, backup_filename, _TRUNCATE);
- if (!mir_tstrcmp(_tcsrchr(backup_filename, _T('.')), _T(".zip")))
+ if (!mir_tstrcmp(_tcsrchr(backup_filename, _T('.')), L".zip"))
bZip = true;
}
if (!options.disable_popups)
@@ -221,7 +221,7 @@ int Backup(TCHAR *backup_filename) SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, TranslateT("Copying database file..."));
- mir_sntprintf(source_file, _T("%s\\%s"), profilePath, dbname);
+ mir_sntprintf(source_file, L"%s\\%s", profilePath, dbname);
TCHAR *pathtmp = Utils_ReplaceVarsT(source_file);
BOOL res = 0;
if (bZip)
@@ -247,7 +247,7 @@ int Backup(TCHAR *backup_filename) if (options.use_dropbox)
{
- DropboxUploadInfo ui = { dest_file, _T("Backups") };
+ DropboxUploadInfo ui = { dest_file, L"Backups" };
if (CallService(MS_DROPBOX_UPLOAD, NULL, (LPARAM)&ui))
ShowPopup(TranslateT("Uploading to Dropbox failed"), TranslateT("Error"), nullptr);
}
@@ -263,7 +263,7 @@ int Backup(TCHAR *backup_filename) ;
//_tcsncpy_s(dest_file, backup_filename, _TRUNCATE);
mir_tstrncpy(puText, dest_file, (i + 2));
- mir_tstrcat(puText, _T("\n"));
+ mir_tstrcat(puText, L"\n");
mir_tstrcat(puText, (dest_file + i + 1));
}
else
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 9fcb46970a..ea26811a07 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -38,7 +38,7 @@ static INT_PTR DBSaveAs(WPARAM, LPARAM) OPENFILENAME ofn = { 0 };
CallService(MS_DB_GETPROFILENAMET, _countof(fname_buff), (LPARAM)fname_buff);
- mir_sntprintf(tszFilter, _T("%s (*.dat)%c*.dat%c%s (*.zip)%c*.zip%c%s (*.*)%c*%c"),
+ mir_sntprintf(tszFilter, L"%s (*.dat)%c*.dat%c%s (*.zip)%c*.zip%c%s (*.*)%c*%c",
TranslateT("Miranda NG databases"), 0, 0,
TranslateT("Compressed Miranda NG databases"), 0, 0,
TranslateT("All files"), 0, 0);
@@ -49,7 +49,7 @@ static INT_PTR DBSaveAs(WPARAM, LPARAM) ofn.Flags = OFN_NOREADONLYRETURN | OFN_OVERWRITEPROMPT;
ofn.lpstrFilter = tszFilter;
ofn.nFilterIndex = 1;
- ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrDefExt = L"dat";
if (GetSaveFileName(&ofn))
BackupStart(fname_buff);
@@ -81,7 +81,7 @@ static int ModulesLoad(WPARAM, LPARAM) mi.position = 500100001;
Menu_AddMainMenuItem(&mi);
- profilePath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+ profilePath = Utils_ReplaceVarsT(L"%miranda_userdata%");
if (hFolder = FoldersRegisterCustomPathT(LPGEN("Database backups"), LPGEN("Backup folder"), DIR SUB_DIR)) {
HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersGetBackupPath);
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index ecb594101e..7c7aacf482 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -48,12 +48,12 @@ int LoadOptions(void) if (mir_tstrlen(tmp) >= 2 && tmp[1] == ':')
_tcsncpy_s(options.folder, dbv.ptszVal, _TRUNCATE);
else
- mir_sntprintf(options.folder, _T("%s\\%s"), profilePath, dbv.ptszVal);
+ mir_sntprintf(options.folder, L"%s\\%s", profilePath, dbv.ptszVal);
db_free(&dbv);
mir_free(tmp);
}
- else mir_sntprintf(options.folder, _T("%s%s"), DIR, SUB_DIR);
+ else mir_sntprintf(options.folder, L"%s%s", DIR, SUB_DIR);
}
options.num_backups = db_get_w(0, "AutoBackups", "NumBackups", 3);
@@ -77,7 +77,7 @@ int SaveOptions(void) db_set_w(0, "AutoBackups", "Period", (WORD)options.period);
db_set_b(0, "AutoBackups", "PeriodType", (BYTE)options.period_type);
- mir_sntprintf(prof_dir, _T("%s\\"), profilePath);
+ mir_sntprintf(prof_dir, L"%s\\", profilePath);
size_t prof_len = mir_tstrlen(prof_dir);
size_t opt_len = mir_tstrlen(options.folder);
@@ -90,7 +90,7 @@ int SaveOptions(void) TCHAR *tmp = Utils_ReplaceVarsT(options.folder);
if (mir_tstrlen(tmp) < 2 || tmp[1] != ':') {
_tcsncpy_s(prof_dir, options.folder, _TRUNCATE);
- mir_sntprintf(options.folder, _T("%s\\%s"), profilePath, prof_dir);
+ mir_sntprintf(options.folder, L"%s\\%s", profilePath, prof_dir);
}
mir_free(tmp);
db_set_w(0, "AutoBackups", "NumBackups", options.num_backups);
@@ -195,16 +195,16 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
else {
TCHAR tszTooltipText[4096];
- mir_sntprintf(tszTooltipText, _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
- _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
- _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
- _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
- _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
- _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
- _T("%username%"), TranslateT("username for currently logged-on Windows user"),
- _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
- _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
- _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)")
+ mir_sntprintf(tszTooltipText, L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
+ L"%miranda_path%", TranslateT("path to Miranda root folder"),
+ L"%miranda_profilesdir%", TranslateT("path to folder containing Miranda profiles"),
+ L"%miranda_profilename%", TranslateT("name of current Miranda profile (filename, without extension)"),
+ L"%miranda_userdata%", TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
+ L"%appdata%", TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ L"%username%", TranslateT("username for currently logged-on Windows user"),
+ L"%mydocuments%", TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ L"%desktop%", TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ L"%xxxxxxx%", TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)")
);
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_ED_FOLDER), tszTooltipText, TranslateT("Variables"));
}
@@ -362,7 +362,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (mir_tstrlen(tmp) >= 2 && tmp[1] == ':')
_tcsncpy_s(backupfolder, tmp, _TRUNCATE);
else
- mir_sntprintf(backupfolder, _T("%s\\%s"), profilePath, tmp);
+ mir_sntprintf(backupfolder, L"%s\\%s", profilePath, tmp);
mir_free(tmp);
int err = CreateDirectoryTreeT(backupfolder);
diff --git a/plugins/Dbx_kv/src/dbmodulechain.cpp b/plugins/Dbx_kv/src/dbmodulechain.cpp index d5d757b2c7..7aeadf8e2c 100644 --- a/plugins/Dbx_kv/src/dbmodulechain.cpp +++ b/plugins/Dbx_kv/src/dbmodulechain.cpp @@ -30,11 +30,11 @@ void CDbxKV::AddToList(char *name, DWORD ofs) mn->ofs = ofs;
if (m_lMods.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Name not unique)"));
+ DatabaseCorruption(L"%s (Module Name not unique)");
m_lMods.insert(mn);
if (m_lOfs.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Offset not unique)"));
+ DatabaseCorruption(L"%s (Module Offset not unique)");
m_lOfs.insert(mn);
}
diff --git a/plugins/Dbx_kv/src/init.cpp b/plugins/Dbx_kv/src/init.cpp index 954526bc62..005707e0ed 100644 --- a/plugins/Dbx_kv/src/init.cpp +++ b/plugins/Dbx_kv/src/init.cpp @@ -117,7 +117,7 @@ static DATABASELINK dblink = {
sizeof(DATABASELINK),
"dbx_kv",
- _T("Hamsterdb database driver"),
+ L"Hamsterdb database driver",
makeDatabase,
grokHeader,
LoadDatabase,
diff --git a/plugins/Dbx_kyoto/src/dbintf.cpp b/plugins/Dbx_kyoto/src/dbintf.cpp index ea51b273b0..95fd42998c 100644 --- a/plugins/Dbx_kyoto/src/dbintf.cpp +++ b/plugins/Dbx_kyoto/src/dbintf.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
-#define DBHEADER_SIGNATURE _T("KyotoCabinet")
+#define DBHEADER_SIGNATURE L"KyotoCabinet"
#define CMP_UINT32(A,B) if(A!=B) return (A<B)?-1:1;
@@ -158,16 +158,16 @@ int CDbxKyoto::Load(bool bSkipInit) if (_taccess(m_tszProfileName, 0) == 0) {
TCHAR buf[100];
- if (0 == GetPrivateProfileString(_T("Database"), _T("Signature"), _T(""), buf, SIZEOF(buf), m_tszProfileName))
+ if (0 == GetPrivateProfileString(L"Database", L"Signature", L"", buf, SIZEOF(buf), m_tszProfileName))
return EGROKPRF_CANTREAD;
if (_tcscmp(buf, DBHEADER_SIGNATURE))
return EGROKPRF_DAMAGED;
- m_dwVersion = GetPrivateProfileInt(_T("Database"), _T("Version"), 1, m_tszProfileName);
+ m_dwVersion = GetPrivateProfileInt(L"Database", L"Version", 1, m_tszProfileName);
}
else {
- WritePrivateProfileString(_T("Database"), _T("Version"), _T("1"), m_tszProfileName);
- WritePrivateProfileString(_T("Database"), _T("Signature"), DBHEADER_SIGNATURE, m_tszProfileName);
+ WritePrivateProfileString(L"Database", L"Version", L"1", m_tszProfileName);
+ WritePrivateProfileString(L"Database", L"Signature", DBHEADER_SIGNATURE, m_tszProfileName);
DWORD keyVal = 0;
DBContact dbc = { DBCONTACT_SIGNATURE, 0, 0, 0 };
@@ -202,8 +202,8 @@ int CDbxKyoto::Load(bool bSkipInit) int CDbxKyoto::Create(void)
{
- WritePrivateProfileString(_T("Database"), _T("Version"), _T("1"), m_tszProfileName);
- WritePrivateProfileString(_T("Database"), _T("Signature"), DBHEADER_SIGNATURE, m_tszProfileName);
+ WritePrivateProfileString(L"Database", L"Version", L"1", m_tszProfileName);
+ WritePrivateProfileString(L"Database", L"Signature", DBHEADER_SIGNATURE, m_tszProfileName);
return 0;
}
@@ -213,7 +213,7 @@ int CDbxKyoto::Check(void) return EGROKPRF_CANTREAD;
TCHAR buf[100];
- if (0 == GetPrivateProfileString(_T("Database"), _T("Signature"), _T(""), buf, SIZEOF(buf), m_tszProfileName))
+ if (0 == GetPrivateProfileString(L"Database", L"Signature", L"", buf, SIZEOF(buf), m_tszProfileName))
return EGROKPRF_UNKHEADER;
if (_tcscmp(buf, DBHEADER_SIGNATURE))
return EGROKPRF_UNKHEADER;
diff --git a/plugins/Dbx_kyoto/src/dbmodulechain.cpp b/plugins/Dbx_kyoto/src/dbmodulechain.cpp index ae0cd9e318..bd2e0fdc80 100644 --- a/plugins/Dbx_kyoto/src/dbmodulechain.cpp +++ b/plugins/Dbx_kyoto/src/dbmodulechain.cpp @@ -30,11 +30,11 @@ void CDbxKyoto::AddToList(char *name, DWORD ofs) mn->ofs = ofs;
if (m_lMods.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Name not unique)"));
+ DatabaseCorruption(L"%s (Module Name not unique)");
m_lMods.insert(mn);
if (m_lOfs.getIndex(mn) != -1)
- DatabaseCorruption(_T("%s (Module Offset not unique)"));
+ DatabaseCorruption(L"%s (Module Offset not unique)");
m_lOfs.insert(mn);
}
diff --git a/plugins/Dbx_kyoto/src/init.cpp b/plugins/Dbx_kyoto/src/init.cpp index 02bd455228..96b1776e82 100644 --- a/plugins/Dbx_kyoto/src/init.cpp +++ b/plugins/Dbx_kyoto/src/init.cpp @@ -99,7 +99,7 @@ static DATABASELINK dblink = {
sizeof(DATABASELINK),
"dbx_kyoto",
- _T("KyotoCabinet database driver"),
+ L"KyotoCabinet database driver",
makeDatabase,
grokHeader,
LoadDatabase,
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index 35f49aac12..2ff199717e 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -171,7 +171,7 @@ BYTE bDefHeader[] = { 0xDE, 0xC0, 0xEF, 0xBE }; int CDbxMdb::Check(void)
{
- FILE *pFile = _tfopen(m_tszProfileName, _T("rb"));
+ FILE *pFile = _tfopen(m_tszProfileName, L"rb");
if (pFile == nullptr)
return EGROKPRF_CANTREAD;
diff --git a/plugins/Dbx_mdb/src/init.cpp b/plugins/Dbx_mdb/src/init.cpp index 18941a73d9..a066fb215d 100644 --- a/plugins/Dbx_mdb/src/init.cpp +++ b/plugins/Dbx_mdb/src/init.cpp @@ -99,7 +99,7 @@ static DATABASELINK dblink = {
sizeof(DATABASELINK),
"dbx_lmdb",
- _T("LMDB database driver"),
+ L"LMDB database driver",
makeDatabase,
grokHeader,
LoadDatabase,
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index 6d6100568f..dbe8602112 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -47,7 +47,7 @@ INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam) const TCHAR *description = (TCHAR*)pccsd->wParam;
if (description && description[0])
- ftp->AppendFormatData(_T("%s\r\n"), (TCHAR*)pccsd->wParam);
+ ftp->AppendFormatData(L"%s\r\n", (TCHAR*)pccsd->wParam);
TCHAR **paths = (TCHAR**)pccsd->lParam;
ftp->SetWorkingDirectory(paths[0]);
diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index be83616567..c41bcdf290 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -102,7 +102,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) PreparePath(folderName, path);
instance->CreateFolder(path);
instance->CreateDownloadUrl(path, url);
- ftp->AppendFormatData(_T("%s\r\n"), ptrT(mir_utf8decodeT(url)));
+ ftp->AppendFormatData(L"%s\r\n", ptrT(mir_utf8decodeT(url)));
}
ftp->FirstFile();
@@ -142,7 +142,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) const TCHAR *serverFolder = ftp->GetServerFolder();
if (serverFolder) {
TCHAR serverPath[MAX_PATH] = { 0 };
- mir_sntprintf(serverPath, _T("%s\\%s"), serverFolder, fileName);
+ mir_sntprintf(serverPath, L"%s\\%s", serverFolder, fileName);
PreparePath(serverPath, path);
}
else
@@ -154,7 +154,7 @@ UINT CDropbox::UploadToDropbox(void *owner, void *arg) if (!_tcschr(fileName, L'\\')) {
char url[MAX_PATH];
instance->CreateDownloadUrl(path, url);
- ftp->AppendFormatData(_T("%s\r\n"), ptrT(mir_utf8decodeT(url)));
+ ftp->AppendFormatData(L"%s\r\n", ptrT(mir_utf8decodeT(url)));
}
} while (ftp->NextFile());
}
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h index 2d9156bcae..0800903627 100644 --- a/plugins/Dropbox/src/file_transfer.h +++ b/plugins/Dropbox/src/file_transfer.h @@ -153,7 +153,7 @@ public: void OpenCurrentFile()
{
- hFile = _tfopen(GetCurrentFilePath(), _T("rb"));
+ hFile = _tfopen(GetCurrentFilePath(), L"rb");
if (!hFile)
throw DropboxException("Unable to open file");
_fseeki64(hFile, 0, SEEK_END);
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 5d2c21c5db..43a87b679a 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -249,7 +249,7 @@ HRESULT CallOpenEntry( LPMDB lpMDB, LPADRBOOK lpAB, LPMAPICONTAINER lpContainer, if (lpMDB)
{
- //Log(_T("CallOpenEntry: Calling OpenEntry on MDB with ulFlags = 0x%X\n"),ulFlags);
+ //Log(L"CallOpenEntry: Calling OpenEntry on MDB with ulFlags = 0x%X\n",ulFlags);
lpMDB->OpenEntry(
cbEntryID,
lpEntryID,
@@ -279,7 +279,7 @@ HRESULT CallOpenEntry( LPMDB lpMDB, LPADRBOOK lpAB, LPMAPICONTAINER lpContainer, if (lpAB && !lpUnk)
{
hRes = S_OK;
- //Log(_T("CallOpenEntry: Calling OpenEntry on AB with ulFlags = 0x%X\n"),ulFlags);
+ //Log(L"CallOpenEntry: Calling OpenEntry on AB with ulFlags = 0x%X\n",ulFlags);
(lpAB->OpenEntry(
cbEntryID,
lpEntryID,
@@ -310,7 +310,7 @@ HRESULT CallOpenEntry( LPMDB lpMDB, LPADRBOOK lpAB, LPMAPICONTAINER lpContainer, if (lpContainer && !lpUnk)
{
hRes = S_OK;
- //Log(_T("CallOpenEntry: Calling OpenEntry on Container with ulFlags = 0x%X\n"),ulFlags);
+ //Log(L"CallOpenEntry: Calling OpenEntry on Container with ulFlags = 0x%X\n",ulFlags);
(lpContainer->OpenEntry(
cbEntryID,
lpEntryID,
@@ -341,7 +341,7 @@ HRESULT CallOpenEntry( LPMDB lpMDB, LPADRBOOK lpAB, LPMAPICONTAINER lpContainer, if (lpMAPISession && !lpUnk)
{
hRes = S_OK;
- //Log(_T("CallOpenEntry: Calling OpenEntry on Session with ulFlags = 0x%X\n"),ulFlags);
+ //Log(L"CallOpenEntry: Calling OpenEntry on Session with ulFlags = 0x%X\n",ulFlags);
(lpMAPISession->OpenEntry(
cbEntryID,
lpEntryID,
@@ -371,7 +371,7 @@ HRESULT CallOpenEntry( LPMDB lpMDB, LPADRBOOK lpAB, LPMAPICONTAINER lpContainer, if (lpUnk)
{
- //Log(_T("OnOpenEntryID: Got object (0x%08X) of type 0x%08X = %s\n"),lpUnk,ulObjType,ObjectTypeToString(ulObjType));
+ //Log(L"OnOpenEntryID: Got object (0x%08X) of type 0x%08X = %s\n",lpUnk,ulObjType,ObjectTypeToString(ulObjType));
*lppUnk = lpUnk;
}
if (ulObjTypeRet) *ulObjTypeRet = ulObjType;
@@ -449,7 +449,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass hr = MAPILogonEx( 0, (LPTSTR)mir_t2a(szPIDandName), (LPTSTR)mir_t2a(m_szPassword), dwFlags, &m_lpMAPISession );
if (FAILED(hr)) {
- //Log( _T("MAPI Logon failed: 0x%08X"), hr );
+ //Log( L"MAPI Logon failed: 0x%08X", hr );
return hr;
}
@@ -490,7 +490,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass if (NULL == pDefMsgStore )
return hr;
- hRes = pDefMsgStore->GetReceiveFolder( _T("IPM"), NULL, &cbInboxEID, &lpInboxEID, NULL);
+ hRes = pDefMsgStore->GetReceiveFolder( L"IPM", NULL, &cbInboxEID, &lpInboxEID, NULL);
m_lpMDB = pDefMsgStore;
if (cbInboxEID && lpInboxEID) {
hRes = CallOpenEntry( pDefMsgStore, NULL, NULL, NULL, cbInboxEID, lpInboxEID, MAPI_BEST_ACCESS, NULL, (LPUNKNOWN*)&m_lpInbox);
@@ -565,7 +565,7 @@ HRESULT CMirandaExchange::CreateProfile( LPTSTR szProfileName ) nSize = mir_tstrlen(m_szUsername);
szUniqName = (TCHAR*)mir_alloc(sizeof(TCHAR) * (nSize + 4));
if (szUniqName != NULL) {
- memcpy(szUniqName, _T("="), sizeof(TCHAR));
+ memcpy(szUniqName, L"=", sizeof(TCHAR));
memcpy((szUniqName + 1), m_szUsername, (sizeof(TCHAR) * (nSize + 1)));
// Set values for PR_PROFILE_UNRESOLVED_NAME and PR_PROFILE_UNRESOLVED_SERVER
SPropValue spval[2];
@@ -847,7 +847,7 @@ HRESULT CMirandaExchange::OpenTheMessage( LPTSTR ) DWORD dwType = REG_SZ;
if ( RegOpenKeyEx(HKEY_CLASSES_ROOT,
- _T("mailto\\shell\\open\\command"),
+ L"mailto\\shell\\open\\command",
0,
KEY_ALL_ACCESS | KEY_EXECUTE | KEY_QUERY_VALUE ,
&hTheKey) == ERROR_SUCCESS
@@ -863,12 +863,12 @@ HRESULT CMirandaExchange::OpenTheMessage( LPTSTR ) else
{
- TCHAR* szTheEnd = _tcsstr( szRegValue,_T(".EXE") );
+ TCHAR* szTheEnd = _tcsstr( szRegValue,L".EXE" );
if ( NULL != szTheEnd )
{
szRegValue[ mir_tstrlen(szRegValue) - mir_tstrlen(szTheEnd) +5 ] = _T('\0');
- mir_tstrcat( szRegValue, _T(" /recycle") );
+ mir_tstrcat( szRegValue, L" /recycle" );
STARTUPINFO si;
PROCESS_INFORMATION pi;
diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp index 0839e0a5d2..a134dafa10 100644 --- a/plugins/Exchange/src/dlg_handlers.cpp +++ b/plugins/Exchange/src/dlg_handlers.cpp @@ -41,13 +41,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara int bCheck = db_get_b(NULL, ModuleName, "Check", 1);
TCHAR buffer[4096];
- GetStringFromDatabase("Username", _T(""), buffer, _countof(buffer));
+ GetStringFromDatabase("Username", L"", buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_USER_EDIT, buffer);
- GetStringFromDatabase("Password", _T(""), buffer, _countof(buffer));
+ GetStringFromDatabase("Password", L"", buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_PASSWORD_EDIT, buffer);
- GetStringFromDatabase("Server", _T(""), buffer, _countof(buffer));
+ GetStringFromDatabase("Server", L"", buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_SERVER_EDIT, buffer);
SetDlgItemInt(hWnd, IDC_PORT_EDIT, db_get_dw(NULL, ModuleName, "Port", EXCHANGE_PORT), FALSE);
@@ -226,8 +226,8 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam LVITEM item = { 0 };
TEmailHeader email = { 0 };
email.cbSize = sizeof(TEmailHeader);
- TCHAR sender[1024] = _T("");
- TCHAR subject[1024] = _T("");
+ TCHAR sender[1024] = L"";
+ TCHAR subject[1024] = L"";
//char buffer[4096];
email.cSender = sizeof(sender);
email.cSubject = sizeof(subject);
diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp index a4e80c6c7e..496d8969eb 100644 --- a/plugins/Exchange/src/emails.cpp +++ b/plugins/Exchange/src/emails.cpp @@ -61,11 +61,11 @@ int CExchangeServer::Connect(int bForceConnect) TCHAR password[1024]; //i know
TCHAR server[1024];
- GetStringFromDatabase("Username", _T(""), user, _countof(user));
+ GetStringFromDatabase("Username", L"", user, _countof(user));
_tcsncpy_s(user, VARST(user), _TRUNCATE);
- GetStringFromDatabase("Password", _T(""), password, _countof(password));
- GetStringFromDatabase("Server", _T(""), server, _countof(server));
+ GetStringFromDatabase("Password", L"", password, _countof(password));
+ GetStringFromDatabase("Server", L"", server, _countof(server));
int port = db_get_dw(NULL, ModuleName, "Port", EXCHANGE_PORT);
if (mir_tstrlen(server) > 0) //only connect if there's a server to connect to
@@ -153,7 +153,7 @@ int CExchangeServer::IsServerAvailable() return 0; //server is not available
TCHAR szServer[1024];
- GetStringFromDatabase("Server", _T(""), szServer, sizeof(szServer));
+ GetStringFromDatabase("Server", L"", szServer, sizeof(szServer));
sockaddr_in addrServer;
InitSocketAddr(&addrServer, mir_t2a(szServer));
int res = connect(sServer, (sockaddr *) &addrServer, sizeof(addrServer));
@@ -209,10 +209,10 @@ int CExchangeServer::GetEmailHeader(int iUnreadEmail, TEmailHeader *emailInfo) TCHAR* szSubject = m_HeadersKeeper[iUnreadEmail]->m_szSubject;
if (NULL == szSender)
- szSender = _T("");
+ szSender = L"";
if (NULL == szSubject)
- szSubject = _T("");
+ szSubject = L"";
emailInfo->szSender = szSender;
emailInfo->szSubject = szSubject;
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 97589f181f..c1b297f164 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -95,16 +95,16 @@ char *BinToHex(int size, PBYTE data) void HexToBin(TCHAR *inData, ULONG &size, LPBYTE &outData)
{
TCHAR buffer[32] = { 0 };
- _tcsncpy(buffer, _T("0x"), _countof(_T("0x")));
+ _tcsncpy(buffer, L"0x", _countof(L"0x"));
_tcsncpy(buffer + 2, inData, HEX_SIZE);
- _stscanf(buffer, _T("%x"), &size);
+ _stscanf(buffer, L"%x", &size);
outData = (unsigned char*)new char[size * 2];
TCHAR *tmp = inData + HEX_SIZE;
buffer[4] = '\0'; //mark the end of the string
for (UINT i = 0; i < size; i++) {
_tcsncpy(buffer + 2, &tmp[i * 2], 2);
- _stscanf(buffer, _T("%hhx"), &outData[i]);
+ _stscanf(buffer, L"%hhx", &outData[i]);
}
}
@@ -224,7 +224,7 @@ void _popupUtil(TCHAR* szMsg) {
POPUPDATAT ppd = { 0 };
ppd.lchIcon = hiMailIcon;
- _tcsncpy(ppd.lptzContactName, _T("Exchange notifier"), MAX_CONTACTNAME - 1);
+ _tcsncpy(ppd.lptzContactName, L"Exchange notifier", MAX_CONTACTNAME - 1);
_tcsncpy(ppd.lptzText, szMsg, MAX_SECONDLINE - 1);
PUAddPopupT(&ppd); //show a popup to tell the user what we're doing.
}
diff --git a/plugins/ExternalAPI/m_NewAwaySys.h b/plugins/ExternalAPI/m_NewAwaySys.h index 1a81ec66ff..6b4e0553c7 100644 --- a/plugins/ExternalAPI/m_NewAwaySys.h +++ b/plugins/ExternalAPI/m_NewAwaySys.h @@ -111,7 +111,7 @@ typedef struct { /* An example:
NAS_ISWINFO iswi = {0}; // for C you may use ZeroMemory() instead
iswi.cbSize = sizeof(iswi);
- iswi.tszMsg = _T("New global status message.");
+ iswi.tszMsg = L"New global status message.";
iswi.Flags = ISWF_TCHAR;
CallService(MS_NAS_INVOKESTATUSWINDOW, (WPARAM)&iswi, 0);
*/
diff --git a/plugins/ExternalAPI/m_folders.h b/plugins/ExternalAPI/m_folders.h index 076247480d..b0db2df31f 100644 --- a/plugins/ExternalAPI/m_folders.h +++ b/plugins/ExternalAPI/m_folders.h @@ -49,21 +49,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MIRANDA_USERDATAT MIRANDA_USERDATA
#endif
-#define FOLDER_AVATARS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\avatars")
-#define FOLDER_VCARDS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\vcards")
-#define FOLDER_LOGS PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\logs")
-#define FOLDER_RECEIVED_FILES PROFILE_PATHT _T("\\") CURRENT_PROFILET _T("\\received files")
-#define FOLDER_DOCS MIRANDA_PATHT _T("\\") _T("docs")
-#define FOLDER_CONFIG PLUGINS_PATHT _T("\\") _T("config")
-#define FOLDER_SCRIPTS MIRANDA_PATHT _T("\\") _T("scripts")
-#define FOLDER_UPDATES MIRANDA_PATHT _T("\\") _T("updates")
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATHT _T("\\") _T("customize")
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE _T("\\sounds")
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE _T("\\icons")
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE _T("\\smileys")
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE _T("\\skins")
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE _T("\\themes")
+#define FOLDER_AVATARS PROFILE_PATHT L"\\" CURRENT_PROFILET L"\\avatars"
+#define FOLDER_VCARDS PROFILE_PATHT L"\\" CURRENT_PROFILET L"\\vcards"
+#define FOLDER_LOGS PROFILE_PATHT L"\\" CURRENT_PROFILET L"\\logs"
+#define FOLDER_RECEIVED_FILES PROFILE_PATHT L"\\" CURRENT_PROFILET L"\\received files"
+#define FOLDER_DOCS MIRANDA_PATHT L"\\" L"docs"
+#define FOLDER_CONFIG PLUGINS_PATHT L"\\" L"config"
+#define FOLDER_SCRIPTS MIRANDA_PATHT L"\\" L"scripts"
+#define FOLDER_UPDATES MIRANDA_PATHT L"\\" L"updates"
+
+#define FOLDER_CUSTOMIZE MIRANDA_PATHT L"\\" L"customize"
+#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE L"\\sounds"
+#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE L"\\icons"
+#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE L"\\smileys"
+#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE L"\\skins"
+#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE L"\\themes"
#define TO_WIDE(x) L ## x
diff --git a/plugins/ExternalAPI/m_listeningto.h b/plugins/ExternalAPI/m_listeningto.h index cc0b2990d2..841d73cd36 100644 --- a/plugins/ExternalAPI/m_listeningto.h +++ b/plugins/ExternalAPI/m_listeningto.h @@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. // To be used by other plugins to send listening info to miranda
-#define MIRANDA_WINDOWCLASS _T("Miranda.ListeningTo")
+#define MIRANDA_WINDOWCLASS L"Miranda.ListeningTo"
#define MIRANDA_DW_PROTECTION 0x8754
#define LISTENINGTO_ANSI 1
diff --git a/plugins/ExternalAPI/m_userinfoex.h b/plugins/ExternalAPI/m_userinfoex.h index 2957c62a6f..f208b1fe22 100644 --- a/plugins/ExternalAPI/m_userinfoex.h +++ b/plugins/ExternalAPI/m_userinfoex.h @@ -275,7 +275,7 @@ lParam = not used /* UserInfo/MsgBox v0.1.0.4+
Slightly modified version of MButtonClass, to draw both text and icon in a button control
*/
-#define UINFOBUTTONCLASS _T("UInfoButtonClass")
+#define UINFOBUTTONCLASS L"UInfoButtonClass"
/*************************************************************
* contact info module
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index c638329261..d80bb06e9b 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -517,14 +517,14 @@ __inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) { hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, _countof(tszClass));
- if (!mir_tstrcmp(tszClass, _T("Button"))) {
+ if (!mir_tstrcmp(tszClass, L"Button")) {
if (hIcon != NULL) {
SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON);
SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
}
else {
SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON);
- SetDlgItemText(hwndDlg, uIDButton, _T("V"));
+ SetDlgItemText(hwndDlg, uIDButton, L"V");
}
}
else if (!mir_tstrcmp(tszClass, MIRANDABUTTONCLASS)) {
@@ -541,7 +541,7 @@ __inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) { SendMessage(GetDlgItem(hwndDlg, uIDButton), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
SendDlgItemMessage(hwndDlg, uIDButton, BUTTONSETASFLATBTN, 0, 0);
}
- else SetDlgItemText(hwndDlg, uIDButton, _T("V"));
+ else SetDlgItemText(hwndDlg, uIDButton, L"V");
}
else res = -1;
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp index 3e6fc46699..1706832239 100644 --- a/plugins/FTPFileYM/src/dialog.cpp +++ b/plugins/FTPFileYM/src/dialog.cpp @@ -131,7 +131,7 @@ void UploadDialog::Tab::select() void UploadDialog::Tab::labelCompleted()
{
TCHAR buff[64], buff2[256];
- mir_sntprintf(buff2, _T("* %s"), Utils::getTextFragment(m_job->m_tszFileName, 20, buff));
+ mir_sntprintf(buff2, L"* %s", Utils::getTextFragment(m_job->m_tszFileName, 20, buff));
TCITEM tab = { 0 };
tab.mask = TCIF_TEXT;
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index f3cab81cd3..92dabed7d9 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -54,8 +54,8 @@ GenericJob::~GenericJob() int GenericJob::openFileDialog()
{
- TCHAR temp[MAX_PATH] = _T("");
- mir_sntprintf(temp, _T("%s\0*.*\0"), TranslateT("All Files (*.*)"));
+ TCHAR temp[MAX_PATH] = L"";
+ mir_sntprintf(temp, L"%s\0*.*\0", TranslateT("All Files (*.*)"));
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
@@ -92,7 +92,7 @@ void GenericJob::getFilesFromOpenDialog() {
TCHAR *ptr = m_tszFilePath + length + 1;
while (ptr[0]) {
- mir_sntprintf(stzFile, _T("%s\\%s"), m_tszFilePath, ptr);
+ mir_sntprintf(stzFile, L"%s\\%s", m_tszFilePath, ptr);
addFile(stzFile);
ptr += mir_tstrlen(ptr) + 1;
}
@@ -113,10 +113,10 @@ int GenericJob::getFilesFromFolder(TCHAR *stzFolder) }
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.*", &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- mir_sntprintf(stzFile, _T("%s\\%s"), stzFolder, ffd.cFileName);
+ mir_sntprintf(stzFile, L"%s\\%s", stzFolder, ffd.cFileName);
addFile(stzFile);
}
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp index 7d98a18fbd..3a6b037d5a 100644 --- a/plugins/FTPFileYM/src/job_packer.cpp +++ b/plugins/FTPFileYM/src/job_packer.cpp @@ -54,11 +54,11 @@ void PackerJob::getZipFilePath() }
if (stzFileName[0] == '\0')
- mir_tstrcpy(stzFileName, _T("archive"));
+ mir_tstrcpy(stzFileName, L"archive");
GetTempPath(_countof(buff), buff);
- mir_sntprintf(m_tszFilePath, _T("%s%s.zip"), buff, stzFileName);
+ mir_sntprintf(m_tszFilePath, L"%s%s.zip", buff, stzFileName);
mir_tstrcpy(m_tszFileName, Utils::getFileNameFromPath(m_tszFilePath));
if (opt.bSetZipName)
@@ -161,7 +161,7 @@ int PackerJob::createZipFile() FREE(file);
if (err == ZIP_OK) {
- FILE *fin = _tfopen(m_files[i], _T("rb"));
+ FILE *fin = _tfopen(m_files[i], L"rb");
if (fin) {
do {
if (isCanceled()) {
@@ -245,8 +245,8 @@ void PackerJob::updateStats() int m = (s - d * 60 * 60 * 24 - h * 60 * 60) / 60;
s = s - (d * 24 * 60 * 60) - (h * 60 * 60) - (m * 60);
- if (d > 0) mir_sntprintf(buff, _T("%dd %02d:%02d:%02d"), d, h, m, s);
- else mir_sntprintf(buff, _T("%02d:%02d:%02d"), h, m, s);
+ if (d > 0) mir_sntprintf(buff, L"%dd %02d:%02d:%02d", d, h, m, s);
+ else mir_sntprintf(buff, L"%02d:%02d:%02d", h, m, s);
mir_sntprintf(m_tab->m_stzRemain, TranslateT("%s (%d kB/%d kB)"), buff, (m_uiFileSize - m_uiReaded) / 1024, m_uiFileSize / 1024);
refreshTab(false);
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index cc21b299cc..f4bb1b2fb3 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -266,7 +266,7 @@ void UploadJob::upload() {
refreshTab(true);
- m_fp = _tfopen(m_tszFilePath, _T("rb"));
+ m_fp = _tfopen(m_tszFilePath, L"rb");
if (m_fp == NULL) {
Utils::msgBox(TranslateT("Error occurred when opening local file.\nAborting file upload..."), MB_OK | MB_ICONERROR);
return;
@@ -391,10 +391,10 @@ void UploadJob::updateStats() m_avgSpeed /= _countof(m_lastSpeed) + 1;
m_lastSpeed[0] = speed;
- mir_sntprintf(m_tab->m_stzSpeed, _T("%0.1f kB/s"), m_avgSpeed);
+ mir_sntprintf(m_tab->m_stzSpeed, L"%0.1f kB/s", m_avgSpeed);
double perc = m_uiFileSize ? ((double)m_uiTotalSent / m_uiFileSize) * 100 : 0;
- mir_sntprintf(m_tab->m_stzComplet, _T("%0.1f%% (%d kB/%d kB)"), perc, (int)m_uiTotalSent / 1024, (int)m_uiFileSize / 1024);
+ mir_sntprintf(m_tab->m_stzComplet, L"%0.1f%% (%d kB/%d kB)", perc, (int)m_uiTotalSent / 1024, (int)m_uiFileSize / 1024);
long s = (m_uiFileSize - m_uiTotalSent) / (long)(m_avgSpeed * 1024);
int d = (s / 60 / 60 / 24);
@@ -403,9 +403,9 @@ void UploadJob::updateStats() s = s - (d * 24 * 60 * 60) - (h * 60 * 60) - (m * 60);
TCHAR buff[256];
- if (d > 0) mir_sntprintf(buff, _T("%dd %02d:%02d:%02d"), d, h, m, s);
- else mir_sntprintf(buff, _T("%02d:%02d:%02d"), h, m, s);
- mir_sntprintf(m_tab->m_stzRemain, _T("%s (%d kB/%d kB)"), buff, (m_uiFileSize - m_uiTotalSent) / 1024, m_uiFileSize / 1024);
+ if (d > 0) mir_sntprintf(buff, L"%dd %02d:%02d:%02d", d, h, m, s);
+ else mir_sntprintf(buff, L"%02d:%02d:%02d", h, m, s);
+ mir_sntprintf(m_tab->m_stzRemain, L"%s (%d kB/%d kB)", buff, (m_uiFileSize - m_uiTotalSent) / 1024, m_uiFileSize / 1024);
refreshTab(false);
}
@@ -449,9 +449,9 @@ void UploadJob::refreshTab(bool bTabChanged) }
if (isCompleted()) {
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_SPEED, _T(""));
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_COMPLETED, _T(""));
- SetDlgItemText(uDlg->m_hwnd, IDC_UP_REMAIN, _T(""));
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_SPEED, L"");
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_COMPLETED, L"");
+ SetDlgItemText(uDlg->m_hwnd, IDC_UP_REMAIN, L"");
SetDlgItemTextA(uDlg->m_hwnd, IDC_ED_URL, m_szFileLink);
SendDlgItemMessage(uDlg->m_hwnd, IDC_PB_UPLOAD, PBM_SETRANGE32, 0, (LPARAM)100);
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index 896445784c..d17bb4ba6c 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -62,7 +62,7 @@ TCHAR* Utils::getFileNameFromPath(TCHAR *stzPath) {
TCHAR *pch = _tcsrchr(stzPath, '\\');
if (pch) return pch + 1;
- else return _T("file.zip");
+ else return L"file.zip";
}
TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff)
@@ -70,7 +70,7 @@ TCHAR* Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff) if (mir_tstrlen(stzText) > length) {
mir_tstrcpy(buff, stzText);
buff[length - 1] = 0;
- mir_tstrcat(buff, _T("..."));
+ mir_tstrcat(buff, L"...");
return buff;
}
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp index e625d9089b..ab04a6ac71 100644 --- a/plugins/FavContacts/src/http_api.cpp +++ b/plugins/FavContacts/src/http_api.cpp @@ -87,7 +87,7 @@ public: Send("', ");
Send(status);
Send(", '");
- SendQuoted(avatar ? avatar->szFilename : _T(""));
+ SendQuoted(avatar ? avatar->szFilename : L"");
Send("');\r\n");
}
Send("} catch(e) {}\r\n");
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index e9c2bd5287..6110ad45ba 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -540,10 +540,10 @@ void InitMenu() wcl.hInstance = g_hInst;
wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
- wcl.lpszClassName = _T("FavContactsMenuHostWnd");
+ wcl.lpszClassName = L"FavContactsMenuHostWnd";
RegisterClassEx(&wcl);
- g_hwndMenuHost = CreateWindow(_T("FavContactsMenuHostWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInst, NULL);
+ g_hwndMenuHost = CreateWindow(L"FavContactsMenuHostWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInst, NULL);
SetWindowPos(g_hwndMenuHost, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
}
diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp index a660faf5b7..7a2658b6bc 100644 --- a/plugins/FavContacts/src/services.cpp +++ b/plugins/FavContacts/src/services.cpp @@ -177,7 +177,7 @@ int ProcessModulesLoaded(WPARAM, LPARAM) fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.size = -11;
- mir_tstrcpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, L"MS Shell Dlg");
fontid.deffontsettings.style = 0;
mir_tstrcpy(fontid.backgroundName, LPGENT("Background"));
diff --git a/plugins/FingerprintNG/src/finger_groups.h b/plugins/FingerprintNG/src/finger_groups.h index 1df6b7f92c..89314cd237 100644 --- a/plugins/FingerprintNG/src/finger_groups.h +++ b/plugins/FingerprintNG/src/finger_groups.h @@ -1,126 +1,126 @@ case MIRANDA_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMiranda", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Miranda clients");
+ return LPGENT("Client icons") L"/" LPGENT("Miranda clients");
break;
case MIRANDA_VERSION_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMirandaVersion", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Miranda clients");
+ return LPGENT("Client icons") L"/" LPGENT("Miranda clients");
break;
case MIRANDA_PACKS_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMirandaPacks", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Miranda clients") _T("/") LPGENT("Pack overlays");
+ return LPGENT("Client icons") L"/" LPGENT("Miranda clients") L"/" LPGENT("Pack overlays");
break;
case MULTI_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMulti", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Multi-proto clients");
+ return LPGENT("Client icons") L"/" LPGENT("Multi-proto clients");
break;
case AIM_CASE:
if (db_get_b(NULL, MODULENAME, "GroupAIM", 1))
- return LPGENT("Client icons") _T("/") LPGENT("AIM clients");
+ return LPGENT("Client icons") L"/" LPGENT("AIM clients");
break;
case GG_CASE:
if (db_get_b(NULL, MODULENAME, "GroupGG", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Gadu-Gadu clients");
+ return LPGENT("Client icons") L"/" LPGENT("Gadu-Gadu clients");
break;
case ICQ_CASE:
if (db_get_b(NULL, MODULENAME, "GroupICQ", 1))
- return LPGENT("Client icons") _T("/") LPGENT("ICQ clients");
+ return LPGENT("Client icons") L"/" LPGENT("ICQ clients");
break;
case IRC_CASE:
if (db_get_b(NULL, MODULENAME, "GroupIRC", 1))
- return LPGENT("Client icons") _T("/") LPGENT("IRC clients");
+ return LPGENT("Client icons") L"/" LPGENT("IRC clients");
break;
case JABBER_CASE:
if (db_get_b(NULL, MODULENAME, "GroupJabber", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Jabber clients");
+ return LPGENT("Client icons") L"/" LPGENT("Jabber clients");
break;
case MRA_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMRA", 1))
- return LPGENT("Client icons") _T("/") LPGENT("MRA clients");
+ return LPGENT("Client icons") L"/" LPGENT("MRA clients");
break;
case MSN_CASE:
if (db_get_b(NULL, MODULENAME, "GroupMSN", 1))
- return LPGENT("Client icons") _T("/") LPGENT("MSN clients");
+ return LPGENT("Client icons") L"/" LPGENT("MSN clients");
break;
case QQ_CASE:
if (db_get_b(NULL, MODULENAME, "GroupQQ", 1))
- return LPGENT("Client icons") _T("/") LPGENT("QQ clients");
+ return LPGENT("Client icons") L"/" LPGENT("QQ clients");
break;
case RSS_CASE:
if (db_get_b(NULL, MODULENAME, "GroupRSS", 1))
- return LPGENT("Client icons") _T("/") LPGENT("RSS clients");
+ return LPGENT("Client icons") L"/" LPGENT("RSS clients");
break;
case TLEN_CASE:
if (db_get_b(NULL, MODULENAME, "GroupTlen", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Tlen clients");
+ return LPGENT("Client icons") L"/" LPGENT("Tlen clients");
break;
case WEATHER_CASE:
if (db_get_b(NULL, MODULENAME, "GroupWeather", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Weather clients");
+ return LPGENT("Client icons") L"/" LPGENT("Weather clients");
break;
case YAHOO_CASE:
if (db_get_b(NULL, MODULENAME, "GroupYahoo", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Yahoo clients");
+ return LPGENT("Client icons") L"/" LPGENT("Yahoo clients");
break;
case FACEBOOK_CASE:
if (db_get_b(NULL, MODULENAME, "GroupFacebook", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Facebook clients");
+ return LPGENT("Client icons") L"/" LPGENT("Facebook clients");
break;
case VK_CASE:
if (db_get_b(NULL, MODULENAME, "GroupVK", 1))
- return LPGENT("Client icons") _T("/") LPGENT("VKontakte clients");
+ return LPGENT("Client icons") L"/" LPGENT("VKontakte clients");
break;
case OTHER_PROTOS_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOtherProtos", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Other protocols");
+ return LPGENT("Client icons") L"/" LPGENT("Other protocols");
break;
case OTHERS_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOthers", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Other icons");
+ return LPGENT("Client icons") L"/" LPGENT("Other icons");
break;
case OVERLAYS_RESOURCE_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOverlaysResource", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Overlays") _T("/") LPGENT("Resource");
+ return LPGENT("Client icons") L"/" LPGENT("Overlays") L"/" LPGENT("Resource");
break;
case OVERLAYS_PLATFORM_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOverlaysPlatform", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Overlays") _T("/") LPGENT("Platform");
+ return LPGENT("Client icons") L"/" LPGENT("Overlays") L"/" LPGENT("Platform");
break;
case OVERLAYS_UNICODE_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOverlaysUnicode", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Overlays") _T("/") LPGENT("Platform");
+ return LPGENT("Client icons") L"/" LPGENT("Overlays") L"/" LPGENT("Platform");
break;
case OVERLAYS_SECURITY_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOverlaysSecurity", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Overlays") _T("/") LPGENT("Security");
+ return LPGENT("Client icons") L"/" LPGENT("Overlays") L"/" LPGENT("Security");
break;
case OVERLAYS_PROTO_CASE:
if (db_get_b(NULL, MODULENAME, "GroupOverlaysProtos", 1))
- return LPGENT("Client icons") _T("/") LPGENT("Overlays") _T("/") LPGENT("Protocol");
+ return LPGENT("Client icons") L"/" LPGENT("Overlays") L"/" LPGENT("Protocol");
break;
default:
diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp index 294eca533d..a7e8f7ad37 100644 --- a/plugins/FingerprintNG/src/masks.cpp +++ b/plugins/FingerprintNG/src/masks.cpp @@ -46,590 +46,590 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * In order to get "Unknown" client, last mask should be "?*".
*/
-#define NIGHTLY_CORE_VERSION _T("|*Miranda*NG*") _T(MIRANDA_VERSION_CORE_STRING) _T("*")
+#define NIGHTLY_CORE_VERSION L"|*Miranda*NG*" _T(MIRANDA_VERSION_CORE_STRING) L"*"
KN_FP_MASK def_kn_fp_mask[] =
-{// {"Client_IconName", _T("|^*Mask*|*names*"), _T("Icon caption"), IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
+{// {"Client_IconName", L"|^*Mask*|*names*", L"Icon caption", IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
//#########################################################################################################################################################################
//################################# MIRANDA ###########################################################################################################################
//#########################################################################################################################################################################
- { "client_Miranda_NG", _T("|*nightly.miranda.im*") NIGHTLY_CORE_VERSION, _T("Miranda NG"), IDI_MIRANDA_NG, MIRANDA_CASE },
+ { "client_Miranda_NG", L"|*nightly.miranda.im*" NIGHTLY_CORE_VERSION, L"Miranda NG", IDI_MIRANDA_NG, MIRANDA_CASE },
- { "client_Miranda_NG_stbl", _T("|Miranda*NG*"), LPGENT("Miranda NG stable"), IDI_MIRANDA_NG_STABLE, MIRANDA_CASE },
+ { "client_Miranda_NG_stbl", L"|Miranda*NG*", LPGENT("Miranda NG stable"), IDI_MIRANDA_NG_STABLE, MIRANDA_CASE },
- { "client_Miranda_010xx", _T("Miranda*IM*0.10.*"), _T("Miranda IM v0.10.x.x"), IDI_MIRANDA_010X, MIRANDA_CASE },
- { "client_Miranda_09XX", _T("|*Miranda*IM*0.9*")
- _T("|*miranda-im.org/caps#*0.9*"), _T("Miranda IM v0.9.x.x"), IDI_MIRANDA_09XX, MIRANDA_CASE },
- { "client_Miranda_08XX", _T("|^Miranda*0.7*Jabb*")
- _T("|*Miranda*0.8*")
- _T("|*miranda-im.org/caps#*0.8*"), _T("Miranda IM v0.8.x.x"), IDI_MIRANDA_08XX, MIRANDA_CASE },
- { "client_Miranda_07XX", _T("|*Miranda*0.7*")
- _T("|*miranda-im.org/caps#*0.7*"), _T("Miranda IM v0.7.x.x"), IDI_MIRANDA_07XX, MIRANDA_CASE },
- { "client_Miranda_06XX", _T("*Miranda*0.6*"), _T("Miranda IM v0.6.x.x"), IDI_MIRANDA_06XX, MIRANDA_CASE },
- { "client_Miranda_05XX", _T("*Miranda*0.5*"), _T("Miranda IM v0.5.x.x"), IDI_MIRANDA_05XX, MIRANDA_CASE },
- { "client_Miranda_04XX", _T("*Miranda*0.4*"), _T("Miranda IM v0.4.x.x"), IDI_MIRANDA_04XX, MIRANDA_CASE },
+ { "client_Miranda_010xx", L"Miranda*IM*0.10.*", L"Miranda IM v0.10.x.x", IDI_MIRANDA_010X, MIRANDA_CASE },
+ { "client_Miranda_09XX", L"|*Miranda*IM*0.9*"
+ L"|*miranda-im.org/caps#*0.9*", L"Miranda IM v0.9.x.x", IDI_MIRANDA_09XX, MIRANDA_CASE },
+ { "client_Miranda_08XX", L"|^Miranda*0.7*Jabb*"
+ L"|*Miranda*0.8*"
+ L"|*miranda-im.org/caps#*0.8*", L"Miranda IM v0.8.x.x", IDI_MIRANDA_08XX, MIRANDA_CASE },
+ { "client_Miranda_07XX", L"|*Miranda*0.7*"
+ L"|*miranda-im.org/caps#*0.7*", L"Miranda IM v0.7.x.x", IDI_MIRANDA_07XX, MIRANDA_CASE },
+ { "client_Miranda_06XX", L"*Miranda*0.6*", L"Miranda IM v0.6.x.x", IDI_MIRANDA_06XX, MIRANDA_CASE },
+ { "client_Miranda_05XX", L"*Miranda*0.5*", L"Miranda IM v0.5.x.x", IDI_MIRANDA_05XX, MIRANDA_CASE },
+ { "client_Miranda_04XX", L"*Miranda*0.4*", L"Miranda IM v0.4.x.x", IDI_MIRANDA_04XX, MIRANDA_CASE },
- { "client_Miranda_old", _T("*Miranda*0.?*"), LPGENT("Miranda IM (old versions)"), IDI_MIRANDA_OLD, MIRANDA_CASE },
+ { "client_Miranda_old", L"*Miranda*0.?*", LPGENT("Miranda IM (old versions)"), IDI_MIRANDA_OLD, MIRANDA_CASE },
- { "client_Miranda_unknown", _T("*Miranda*"), LPGENT("Miranda (unknown)"), IDI_MIRANDA_UNKNOWN, MIRANDA_CASE },
+ { "client_Miranda_unknown", L"*Miranda*", LPGENT("Miranda (unknown)"), IDI_MIRANDA_UNKNOWN, MIRANDA_CASE },
//#########################################################################################################################################################################
//################################# MULTI-PROTOCOL ####################################################################################################################
//#########################################################################################################################################################################
- { "client_1&1", _T("|*Pocket*Web*|*1&1*|*1*?nd*1"), _T("1&1"), IDI_1UND1, MULTI_CASE, TRUE },
- { "client_Asia", _T("*Asia*"), _T("Asia"), IDI_ASIA, MULTI_CASE, TRUE },
- { "client_Adium", _T("|*Adium*")
- _T("|*VUFD6HcFmUT2NxJkBGCiKlZnS3M=*") // Gabble client?
- _T("|*DdnydQG7RGhP9E3k9Sf+b+bF0zo=*"), _T("Adium"), IDI_ADIUM, MULTI_CASE, TRUE },
- { "client_AgileMessenger", _T("*Agile Messenger*"), _T("Agile Messenger"), IDI_AGILE, MULTI_CASE, TRUE },
-
- { "client_Appolo", _T("*Appolo*"), _T("Appolo IM"), IDI_APPOLO, MULTI_CASE, TRUE },
- { "client_Ayttm", _T("*Ayttm*"), _T("Ayttm"), IDI_AYTTM, MULTI_CASE, TRUE },
- { "client_BayanICQ", _T("|*Bayan*ICQ*|*barobin*"), _T("BayanICQ"), IDI_BAYANICQ, MULTI_CASE, TRUE },
- { "client_Beejive", _T("*Beejive*"), _T("BeejiveIM"), IDI_BEEJIVE, MULTI_CASE, TRUE },
- { "client_Bimoid", _T("*Bimoid*"), _T("Bimoid"), IDI_BIMOID, MULTI_CASE, TRUE },
- { "client_BitlBee", _T("*BitlBee*"), _T("BitlBee"), IDI_BITLBEE, MULTI_CASE, TRUE },
- { "client_BlackBerry", _T("|*Berry*|*ICS?\?\?\?\?\?\?\?"), _T("BlackBerry"), IDI_BLACKBERRY, MULTI_CASE, TRUE },
- { "client_Buddycloud", _T("*Buddycloud*"), _T("Buddycloud"), IDI_BUDDYCLOUD, MULTI_CASE, TRUE },
- { "client_Carrier", _T("*Carrier*"), _T("Carrier client"), IDI_CARRIER, MULTI_CASE, TRUE },
- { "client_Causerie", _T("*Causerie*"), _T("Causerie"), IDI_CAUSERIE, MULTI_CASE, TRUE },
- { "client_CenterIM", _T("*CenterIM*"), _T("CenterIM"), IDI_CENTERIM, MULTI_CASE, TRUE },
- { "client_ChatSecure", _T("*ChatSecure*"), _T("ChatSecure"), IDI_CHATSECURE, MULTI_CASE, TRUE },
- { "client_Citron", _T("*Citron*"), _T("Citron"), IDI_CITRON, MULTI_CASE, TRUE },
- { "client_climm", _T("*climm*"), _T("climm"), IDI_CLIMM, MULTI_CASE, TRUE },
- { "client_Digsby", _T("*Digsby*"), _T("Digsby"), IDI_DIGSBY, MULTI_CASE, TRUE },
- { "client_EKG2", _T("*EKG*2*"), _T("EKG2"), IDI_EKG2, MULTI_CASE, TRUE },
- { "client_EasyMessage", _T("Easy*Message*"), _T("Easy Message"), IDI_EASYMESSAGE, MULTI_CASE, TRUE },
- { "client_Empathy", _T("*Empathy*"), _T("Empathy"), IDI_EMPATHY, MULTI_CASE, TRUE },
- { "client_Eyeball", _T("*Eyeball*"), _T("Eyeball Chat"), IDI_EYEBALL_CHAT, MULTI_CASE, TRUE },
- { "client_eBuddy", _T("|*eBuddy*|*eMessenger*"), _T("eBuddy Messenger"), IDI_EBUDDY, MULTI_CASE, TRUE },
- { "client_eM_Client", _T("*eM*Client*"), _T("eM Client"), IDI_EM_CLIENT, MULTI_CASE, TRUE },
- { "client_eQo", _T("*eQo*"), _T("eQo"), IDI_EQO, MULTI_CASE, TRUE },
- { "client_emesene", _T("*emesene*"), _T("emesene"), IDI_EMESENE, MULTI_CASE, TRUE },
- { "client_Fama", _T("*Fama*"), _T("Fama IM"), IDI_FAMAIM, MULTI_CASE, TRUE },
- { "client_Fring", _T("*fring*"), _T("Fring"), IDI_FRING, MULTI_CASE, TRUE },
- { "client_GMX", _T("*GMX*"), _T("GMX MultiMessenger"), IDI_GMX, MULTI_CASE, TRUE },
- { "client_Gaim", _T("*gaim*"), _T("Gaim (libgaim)"), IDI_GAIM, MULTI_CASE, TRUE },
- { "client_Galaxium", _T("*Galaxium*"), _T("Galaxium"), IDI_GALAXIUM, MULTI_CASE, TRUE },
- { "client_GnuGadu", _T("Gnu Gadu*"), _T("GNU Gadu"), IDI_GNUGADU, MULTI_CASE, TRUE },
- { "client_IM2", _T("*IM2*"), _T("IM2"), IDI_IM2, MULTI_CASE, TRUE },
- { "client_IMPlus", _T("|IM+*|IMPLUS*|*IM plus*|@mobile")
- _T("|*+umBU9yx9Cu+R8jvPWIZ3vWD59M=*"), _T("IM+"), IDI_IMPLUS, MULTI_CASE, TRUE },
- { "client_IMVU", _T("*IMVU*"), _T("IMVU"), IDI_IMVU, MULTI_CASE, TRUE },
- { "client_IMadering", _T("*IMadering*"), _T("IMadering"), IDI_IMADERING, MULTI_CASE, TRUE },
- { "client_imoIM", _T("|*imo.im*|*sleekxmpp.com*"), _T("imo.im"), IDI_IMOIM, MULTI_CASE, TRUE },
- { "client_Inlux", _T("*Inlux*"), _T("Inlux Messenger"), IDI_INLUX, MULTI_CASE, TRUE },
- { "client_Instantbird", _T("*Instantbird*"), _T("Instantbird"), IDI_INSTANTBIRD, MULTI_CASE, TRUE },
- { "client_iCall", _T("*iCall*"), _T("iCall"), IDI_ICALL, MULTI_CASE, TRUE },
- { "client_iChat", _T("|*iChat*|**imagent*|*iMessages*"), _T("iChat"), IDI_ICHAT, MULTI_CASE, TRUE },
- { "client_irssi", _T("*irssi*"), _T("irssi"), IDI_IRSSI, MULTI_CASE, TRUE },
- { "client_JBother", _T("*JBother*"), _T("JBother"), IDI_JBOTHER, MULTI_CASE, TRUE },
- { "client_JBuddy", _T("*JBuddy*"), _T("JBuddy Messenger"), IDI_JBUDDY, MULTI_CASE, TRUE },
- { "client_Jabbear", _T("*Jabbear*"), _T("Jabbear"), IDI_JABBEAR, MULTI_CASE, TRUE },
- { "client_Jabbin", _T("*Jabbin*"), _T("Jabbin"), IDI_JABBIN, MULTI_CASE, TRUE },
- { "client_Jasmine_IM", _T("|Jasmine*IM*|*jasmineicq.ru/caps*"), _T("Jasmine IM"), IDI_JASMINEIM, MULTI_CASE, TRUE },
-
- { "client_Jimm_Aspro", _T("*Jimm*Aspro*"), _T("Jimm Aspro"), IDI_JIMM_ASPRO, MULTI_CASE, TRUE },
- { "client_Jimmy", _T("*Jimmy*"), _T("JimmyIM"), IDI_JIMMY, MULTI_CASE, TRUE },
-
- { "client_KMess", _T("*KMess*"), _T("KMess"), IDI_KMESS, MULTI_CASE, TRUE },
- { "client_KoolIM", _T("*Kool*"), _T("KoolIM"), IDI_KOOLIM, MULTI_CASE, TRUE },
- { "client_Kopete", _T("*Kopete*"), _T("Kopete"), IDI_KOPETE, MULTI_CASE, TRUE },
- { "client_LeechCraft", _T("|*LeechCraft*")
- _T("|*aNjQWbtza2QtXemMfBS2bwNOtcQ=*"), _T("LeechCraft"), IDI_LEECHCRAFT, MULTI_CASE, TRUE },
- { "client_MDC", _T("*MDC*"), _T("MDC"), IDI_MDC, MULTI_CASE, TRUE },
- { "client_Meebo", _T("Meebo*"), _T("Meebo"), IDI_MEEBO, MULTI_CASE, TRUE },
- { "client_Meetro", _T("Meetro*"), _T("Meetro"), IDI_MEETRO, MULTI_CASE, TRUE },
- { "client_mChat", _T("|mChat*|gsICQ*|*mchat.mgslab.com*"), _T("mChat"), IDI_MCHAT, MULTI_CASE, TRUE },
- { "client_Nimbuzz", _T("*Nimbuzz*"), _T("Nimbuzz"), IDI_NIMBUZZ, MULTI_CASE, TRUE },
- { "client_Palringo", _T("*Palringo*"), _T("Palringo"), IDI_PALRINGO, MULTI_CASE, TRUE },
-
- { "client_Pigeon", _T("*PIGEON*"), _T("PIGEON!"), IDI_PIGEON, MULTI_CASE, TRUE },
- { "client_PlayXpert", _T("*PlayXpert*"), _T("PlayXpert"), IDI_PLAYXPERT, MULTI_CASE, TRUE },
- { "client_Prelude", _T("*Prelude*"), _T("Prelude"), IDI_PRELUDE, MULTI_CASE, TRUE },
- { "client_Proteus", _T("*Proteus*"), _T("Proteus"), IDI_PROTEUS, MULTI_CASE, TRUE },
-
- { "client_QIP_Android", _T("QIP *Android*"), _T("QIP Mobile Android"), IDI_QIP_ANDROID, MULTI_CASE, TRUE },
- { "client_QIP_iOS", _T("|QIP*iOS*|QIP*iphone*|QIP*apple*"), _T("QIP Mobile iOS"), IDI_QIP_IOS, MULTI_CASE, TRUE },
- { "client_QIP_Symbian", _T("*QIP*Symbian*"), _T("QIP Mobile Symbian"), IDI_QIP_SYMBIAN, MULTI_CASE, TRUE },
- { "client_QIP_Java", _T("*QIP*Java*"), _T("QIP Mobile Java"), IDI_QIP_JAVA, MULTI_CASE, TRUE },
- { "client_QIP_PDA", _T("|QIP *PDA*|*pda.qip.ru*|*QIP Mobile*"), _T("QIP Mobile"), IDI_QIP_PDA, MULTI_CASE, TRUE },
- { "client_QIP_2012", _T("|QIP 2012*|http://qip.ru/caps*"), _T("QIP 2012"), IDI_QIP_2012, MULTI_CASE, TRUE },
- { "client_QIP_2010", _T("|QIP 2010*|http://2010.qip.ru*"), _T("QIP 2010"), IDI_QIP_2010, MULTI_CASE, TRUE },
- { "client_QIP_Infium", _T("|QIP Infium*|http://*qip*"), _T("QIP Infium"), IDI_QIP_INFIUM, MULTI_CASE, TRUE },
-
- { "client_qutIM", _T("*qutIM*"), _T("qutIM"), IDI_QUTIM, MULTI_CASE },
- { "client_mqutIM", _T("*mqutIM*"), _T("mqutIM"), IDI_MQUTIM, MULTI_CASE },
-
- { "client_Qnext", _T("Qnext*"), _T("Qnext"), IDI_QNEXT, MULTI_CASE, TRUE },
-
- { "client_SAPO", _T("*SAPO*"), _T("SAPO Messenger"), IDI_SAPO, MULTI_CASE, TRUE },
- { "client_SIM", _T("|^*Simp*|*SIM*"), _T("SIM"), IDI_SIM, MULTI_CASE, TRUE },
- { "client_Salut_a_Toi", _T("*Salut*Toi*"), _T("Salut a Toi"), IDI_SALUT_A_TOI, MULTI_CASE, TRUE },
- { "client_Shaim", _T("*Shaim*"), _T("Shaim"), IDI_SHAIM, MULTI_CASE, TRUE },
- { "client_SieJC", _T("|SieJC*|Nat*ICQ*|Siemens*Client*"), _T("Siemens ICQ / Jabber client"), IDI_SIEJC, MULTI_CASE, TRUE },
- { "client_Slick", _T("Slick*"), _T("Slick"), IDI_SLICK, MULTI_CASE, TRUE },
- { "client_SrevIM", _T("*Srev*IM*"), _T("SrevIM"), IDI_SREVIM, MULTI_CASE, TRUE },
-
- { "client_Tril_Android", _T("*Trillian*Android*"), _T("Trillian Android"), IDI_TRILLIAN_ANDROID, MULTI_CASE, TRUE },
- { "client_Tril_Astra", _T("Trillian*Astra*"), _T("Trillian Astra"), IDI_TRILLIAN_ASTRA, MULTI_CASE, TRUE },
- { "client_Trillian_Pro", _T("Trillian*Pro*"), _T("Trillian Pro"), IDI_TRILLIAN_PRO, MULTI_CASE, TRUE },
- { "client_Trillian", _T("*Trillian**"), _T("Trillian"), IDI_TRILLIAN, MULTI_CASE, TRUE },
-
- { "client_Tuukle_Chat", _T("*Tuukle*Chat*|*IM*Gate*"), _T("Tuukle Chat"), IDI_TUUKLE_CHAT, MULTI_CASE, TRUE },
- { "client_vBuzzer", _T("*vBuzzer*"), _T("vBuzzer"), IDI_VBUZZER, MULTI_CASE, TRUE },
- { "client_Virtus", _T("*Virtus*"), _T("Virtus"), IDI_VIRTUS, MULTI_CASE, TRUE },
- { "client_uIM", _T("*uIM*"), _T("uIM"), IDI_UIM, MULTI_CASE, TRUE },
- { "client_uTalk", _T("*uTalk*"), _T("uTalk"), IDI_UTALK, MULTI_CASE, TRUE },
- { "client_WeeChat", _T("*WeeChat*"), _T("WeeChat"), IDI_WEECHAT, MULTI_CASE, TRUE },
- { "client_Wippien", _T("*Wippien*"), _T("Wippien"), IDI_WIPPIEN, MULTI_CASE, TRUE },
-
- { "client_WindowsPhone", _T("*Windows*Phone*"), _T("Windows Phone"), IDI_WINDOWS_PHONE, MULTI_CASE, TRUE },
-
- { "client_YamiGo", _T("YamiGo*"), _T("YamiGo"), IDI_YAMIGO, MULTI_CASE, TRUE },
- { "client_Yeigo", _T("*Yeigo*"), _T("Yeigo"), IDI_YEIGO, MULTI_CASE, TRUE },
- { "client_Yoono", _T("*Yoono*"), _T("Yoono"), IDI_YOONO, MULTI_CASE, TRUE },
+ { "client_1&1", L"|*Pocket*Web*|*1&1*|*1*?nd*1", L"1&1", IDI_1UND1, MULTI_CASE, TRUE },
+ { "client_Asia", L"*Asia*", L"Asia", IDI_ASIA, MULTI_CASE, TRUE },
+ { "client_Adium", L"|*Adium*"
+ L"|*VUFD6HcFmUT2NxJkBGCiKlZnS3M=*" // Gabble client?
+ L"|*DdnydQG7RGhP9E3k9Sf+b+bF0zo=*", L"Adium", IDI_ADIUM, MULTI_CASE, TRUE },
+ { "client_AgileMessenger", L"*Agile Messenger*", L"Agile Messenger", IDI_AGILE, MULTI_CASE, TRUE },
+
+ { "client_Appolo", L"*Appolo*", L"Appolo IM", IDI_APPOLO, MULTI_CASE, TRUE },
+ { "client_Ayttm", L"*Ayttm*", L"Ayttm", IDI_AYTTM, MULTI_CASE, TRUE },
+ { "client_BayanICQ", L"|*Bayan*ICQ*|*barobin*", L"BayanICQ", IDI_BAYANICQ, MULTI_CASE, TRUE },
+ { "client_Beejive", L"*Beejive*", L"BeejiveIM", IDI_BEEJIVE, MULTI_CASE, TRUE },
+ { "client_Bimoid", L"*Bimoid*", L"Bimoid", IDI_BIMOID, MULTI_CASE, TRUE },
+ { "client_BitlBee", L"*BitlBee*", L"BitlBee", IDI_BITLBEE, MULTI_CASE, TRUE },
+ { "client_BlackBerry", L"|*Berry*|*ICS?\?\?\?\?\?\?\?", L"BlackBerry", IDI_BLACKBERRY, MULTI_CASE, TRUE },
+ { "client_Buddycloud", L"*Buddycloud*", L"Buddycloud", IDI_BUDDYCLOUD, MULTI_CASE, TRUE },
+ { "client_Carrier", L"*Carrier*", L"Carrier client", IDI_CARRIER, MULTI_CASE, TRUE },
+ { "client_Causerie", L"*Causerie*", L"Causerie", IDI_CAUSERIE, MULTI_CASE, TRUE },
+ { "client_CenterIM", L"*CenterIM*", L"CenterIM", IDI_CENTERIM, MULTI_CASE, TRUE },
+ { "client_ChatSecure", L"*ChatSecure*", L"ChatSecure", IDI_CHATSECURE, MULTI_CASE, TRUE },
+ { "client_Citron", L"*Citron*", L"Citron", IDI_CITRON, MULTI_CASE, TRUE },
+ { "client_climm", L"*climm*", L"climm", IDI_CLIMM, MULTI_CASE, TRUE },
+ { "client_Digsby", L"*Digsby*", L"Digsby", IDI_DIGSBY, MULTI_CASE, TRUE },
+ { "client_EKG2", L"*EKG*2*", L"EKG2", IDI_EKG2, MULTI_CASE, TRUE },
+ { "client_EasyMessage", L"Easy*Message*", L"Easy Message", IDI_EASYMESSAGE, MULTI_CASE, TRUE },
+ { "client_Empathy", L"*Empathy*", L"Empathy", IDI_EMPATHY, MULTI_CASE, TRUE },
+ { "client_Eyeball", L"*Eyeball*", L"Eyeball Chat", IDI_EYEBALL_CHAT, MULTI_CASE, TRUE },
+ { "client_eBuddy", L"|*eBuddy*|*eMessenger*", L"eBuddy Messenger", IDI_EBUDDY, MULTI_CASE, TRUE },
+ { "client_eM_Client", L"*eM*Client*", L"eM Client", IDI_EM_CLIENT, MULTI_CASE, TRUE },
+ { "client_eQo", L"*eQo*", L"eQo", IDI_EQO, MULTI_CASE, TRUE },
+ { "client_emesene", L"*emesene*", L"emesene", IDI_EMESENE, MULTI_CASE, TRUE },
+ { "client_Fama", L"*Fama*", L"Fama IM", IDI_FAMAIM, MULTI_CASE, TRUE },
+ { "client_Fring", L"*fring*", L"Fring", IDI_FRING, MULTI_CASE, TRUE },
+ { "client_GMX", L"*GMX*", L"GMX MultiMessenger", IDI_GMX, MULTI_CASE, TRUE },
+ { "client_Gaim", L"*gaim*", L"Gaim (libgaim)", IDI_GAIM, MULTI_CASE, TRUE },
+ { "client_Galaxium", L"*Galaxium*", L"Galaxium", IDI_GALAXIUM, MULTI_CASE, TRUE },
+ { "client_GnuGadu", L"Gnu Gadu*", L"GNU Gadu", IDI_GNUGADU, MULTI_CASE, TRUE },
+ { "client_IM2", L"*IM2*", L"IM2", IDI_IM2, MULTI_CASE, TRUE },
+ { "client_IMPlus", L"|IM+*|IMPLUS*|*IM plus*|@mobile"
+ L"|*+umBU9yx9Cu+R8jvPWIZ3vWD59M=*", L"IM+", IDI_IMPLUS, MULTI_CASE, TRUE },
+ { "client_IMVU", L"*IMVU*", L"IMVU", IDI_IMVU, MULTI_CASE, TRUE },
+ { "client_IMadering", L"*IMadering*", L"IMadering", IDI_IMADERING, MULTI_CASE, TRUE },
+ { "client_imoIM", L"|*imo.im*|*sleekxmpp.com*", L"imo.im", IDI_IMOIM, MULTI_CASE, TRUE },
+ { "client_Inlux", L"*Inlux*", L"Inlux Messenger", IDI_INLUX, MULTI_CASE, TRUE },
+ { "client_Instantbird", L"*Instantbird*", L"Instantbird", IDI_INSTANTBIRD, MULTI_CASE, TRUE },
+ { "client_iCall", L"*iCall*", L"iCall", IDI_ICALL, MULTI_CASE, TRUE },
+ { "client_iChat", L"|*iChat*|**imagent*|*iMessages*", L"iChat", IDI_ICHAT, MULTI_CASE, TRUE },
+ { "client_irssi", L"*irssi*", L"irssi", IDI_IRSSI, MULTI_CASE, TRUE },
+ { "client_JBother", L"*JBother*", L"JBother", IDI_JBOTHER, MULTI_CASE, TRUE },
+ { "client_JBuddy", L"*JBuddy*", L"JBuddy Messenger", IDI_JBUDDY, MULTI_CASE, TRUE },
+ { "client_Jabbear", L"*Jabbear*", L"Jabbear", IDI_JABBEAR, MULTI_CASE, TRUE },
+ { "client_Jabbin", L"*Jabbin*", L"Jabbin", IDI_JABBIN, MULTI_CASE, TRUE },
+ { "client_Jasmine_IM", L"|Jasmine*IM*|*jasmineicq.ru/caps*", L"Jasmine IM", IDI_JASMINEIM, MULTI_CASE, TRUE },
+
+ { "client_Jimm_Aspro", L"*Jimm*Aspro*", L"Jimm Aspro", IDI_JIMM_ASPRO, MULTI_CASE, TRUE },
+ { "client_Jimmy", L"*Jimmy*", L"JimmyIM", IDI_JIMMY, MULTI_CASE, TRUE },
+
+ { "client_KMess", L"*KMess*", L"KMess", IDI_KMESS, MULTI_CASE, TRUE },
+ { "client_KoolIM", L"*Kool*", L"KoolIM", IDI_KOOLIM, MULTI_CASE, TRUE },
+ { "client_Kopete", L"*Kopete*", L"Kopete", IDI_KOPETE, MULTI_CASE, TRUE },
+ { "client_LeechCraft", L"|*LeechCraft*"
+ L"|*aNjQWbtza2QtXemMfBS2bwNOtcQ=*", L"LeechCraft", IDI_LEECHCRAFT, MULTI_CASE, TRUE },
+ { "client_MDC", L"*MDC*", L"MDC", IDI_MDC, MULTI_CASE, TRUE },
+ { "client_Meebo", L"Meebo*", L"Meebo", IDI_MEEBO, MULTI_CASE, TRUE },
+ { "client_Meetro", L"Meetro*", L"Meetro", IDI_MEETRO, MULTI_CASE, TRUE },
+ { "client_mChat", L"|mChat*|gsICQ*|*mchat.mgslab.com*", L"mChat", IDI_MCHAT, MULTI_CASE, TRUE },
+ { "client_Nimbuzz", L"*Nimbuzz*", L"Nimbuzz", IDI_NIMBUZZ, MULTI_CASE, TRUE },
+ { "client_Palringo", L"*Palringo*", L"Palringo", IDI_PALRINGO, MULTI_CASE, TRUE },
+
+ { "client_Pigeon", L"*PIGEON*", L"PIGEON!", IDI_PIGEON, MULTI_CASE, TRUE },
+ { "client_PlayXpert", L"*PlayXpert*", L"PlayXpert", IDI_PLAYXPERT, MULTI_CASE, TRUE },
+ { "client_Prelude", L"*Prelude*", L"Prelude", IDI_PRELUDE, MULTI_CASE, TRUE },
+ { "client_Proteus", L"*Proteus*", L"Proteus", IDI_PROTEUS, MULTI_CASE, TRUE },
+
+ { "client_QIP_Android", L"QIP *Android*", L"QIP Mobile Android", IDI_QIP_ANDROID, MULTI_CASE, TRUE },
+ { "client_QIP_iOS", L"|QIP*iOS*|QIP*iphone*|QIP*apple*", L"QIP Mobile iOS", IDI_QIP_IOS, MULTI_CASE, TRUE },
+ { "client_QIP_Symbian", L"*QIP*Symbian*", L"QIP Mobile Symbian", IDI_QIP_SYMBIAN, MULTI_CASE, TRUE },
+ { "client_QIP_Java", L"*QIP*Java*", L"QIP Mobile Java", IDI_QIP_JAVA, MULTI_CASE, TRUE },
+ { "client_QIP_PDA", L"|QIP *PDA*|*pda.qip.ru*|*QIP Mobile*", L"QIP Mobile", IDI_QIP_PDA, MULTI_CASE, TRUE },
+ { "client_QIP_2012", L"|QIP 2012*|http://qip.ru/caps*", L"QIP 2012", IDI_QIP_2012, MULTI_CASE, TRUE },
+ { "client_QIP_2010", L"|QIP 2010*|http://2010.qip.ru*", L"QIP 2010", IDI_QIP_2010, MULTI_CASE, TRUE },
+ { "client_QIP_Infium", L"|QIP Infium*|http://*qip*", L"QIP Infium", IDI_QIP_INFIUM, MULTI_CASE, TRUE },
+
+ { "client_qutIM", L"*qutIM*", L"qutIM", IDI_QUTIM, MULTI_CASE },
+ { "client_mqutIM", L"*mqutIM*", L"mqutIM", IDI_MQUTIM, MULTI_CASE },
+
+ { "client_Qnext", L"Qnext*", L"Qnext", IDI_QNEXT, MULTI_CASE, TRUE },
+
+ { "client_SAPO", L"*SAPO*", L"SAPO Messenger", IDI_SAPO, MULTI_CASE, TRUE },
+ { "client_SIM", L"|^*Simp*|*SIM*", L"SIM", IDI_SIM, MULTI_CASE, TRUE },
+ { "client_Salut_a_Toi", L"*Salut*Toi*", L"Salut a Toi", IDI_SALUT_A_TOI, MULTI_CASE, TRUE },
+ { "client_Shaim", L"*Shaim*", L"Shaim", IDI_SHAIM, MULTI_CASE, TRUE },
+ { "client_SieJC", L"|SieJC*|Nat*ICQ*|Siemens*Client*", L"Siemens ICQ / Jabber client", IDI_SIEJC, MULTI_CASE, TRUE },
+ { "client_Slick", L"Slick*", L"Slick", IDI_SLICK, MULTI_CASE, TRUE },
+ { "client_SrevIM", L"*Srev*IM*", L"SrevIM", IDI_SREVIM, MULTI_CASE, TRUE },
+
+ { "client_Tril_Android", L"*Trillian*Android*", L"Trillian Android", IDI_TRILLIAN_ANDROID, MULTI_CASE, TRUE },
+ { "client_Tril_Astra", L"Trillian*Astra*", L"Trillian Astra", IDI_TRILLIAN_ASTRA, MULTI_CASE, TRUE },
+ { "client_Trillian_Pro", L"Trillian*Pro*", L"Trillian Pro", IDI_TRILLIAN_PRO, MULTI_CASE, TRUE },
+ { "client_Trillian", L"*Trillian**", L"Trillian", IDI_TRILLIAN, MULTI_CASE, TRUE },
+
+ { "client_Tuukle_Chat", L"*Tuukle*Chat*|*IM*Gate*", L"Tuukle Chat", IDI_TUUKLE_CHAT, MULTI_CASE, TRUE },
+ { "client_vBuzzer", L"*vBuzzer*", L"vBuzzer", IDI_VBUZZER, MULTI_CASE, TRUE },
+ { "client_Virtus", L"*Virtus*", L"Virtus", IDI_VIRTUS, MULTI_CASE, TRUE },
+ { "client_uIM", L"*uIM*", L"uIM", IDI_UIM, MULTI_CASE, TRUE },
+ { "client_uTalk", L"*uTalk*", L"uTalk", IDI_UTALK, MULTI_CASE, TRUE },
+ { "client_WeeChat", L"*WeeChat*", L"WeeChat", IDI_WEECHAT, MULTI_CASE, TRUE },
+ { "client_Wippien", L"*Wippien*", L"Wippien", IDI_WIPPIEN, MULTI_CASE, TRUE },
+
+ { "client_WindowsPhone", L"*Windows*Phone*", L"Windows Phone", IDI_WINDOWS_PHONE, MULTI_CASE, TRUE },
+
+ { "client_YamiGo", L"YamiGo*", L"YamiGo", IDI_YAMIGO, MULTI_CASE, TRUE },
+ { "client_Yeigo", L"*Yeigo*", L"Yeigo", IDI_YEIGO, MULTI_CASE, TRUE },
+ { "client_Yoono", L"*Yoono*", L"Yoono", IDI_YOONO, MULTI_CASE, TRUE },
//#########################################################################################################################################################################
//################################# ICQ ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_D[i]Chat", _T("D[i]Chat*"), _T("D[i]Chat"), IDI_DICHAT, ICQ_CASE, TRUE },
- { "client_GnomeICU", _T("GnomeICU*"), _T("GnomeICU"), IDI_GNOMEICU, ICQ_CASE, TRUE },
- { "client_Icy_Juice", _T("*Icy*Juice*"), _T("Icy Juice"), IDI_ICY_JUICE, ICQ_CASE, TRUE },
- { "client_Jimm", _T("|*Jimm*|mobicq*"), _T("Jimm"), IDI_JIMM, ICQ_CASE, TRUE },
- { "client_Licq", _T("Licq*"), _T("Licq"), IDI_LICQ, ICQ_CASE, TRUE },
- { "client_LocID", _T("LocID*"), _T("LocID"), IDI_LOCID, ICQ_CASE, TRUE },
- { "client_QIP_2005", _T("QIP*2005*"), _T("QIP 2005"), IDI_QIP_2005, ICQ_CASE, TRUE },
- { "client_R&Q", _T("|R&Q*|&RQ*"), _T("R&Q"), IDI_RANDQ, ICQ_CASE, TRUE },
- { "client_SmartICQ", _T("Smart*ICQ*"), _T("SmartICQ"), IDI_SMARTICQ, ICQ_CASE, TRUE },
- { "client_StrICQ", _T("StrICQ*"), _T("StrICQ"), IDI_STRICQ, ICQ_CASE, TRUE },
+ { "client_D[i]Chat", L"D[i]Chat*", L"D[i]Chat", IDI_DICHAT, ICQ_CASE, TRUE },
+ { "client_GnomeICU", L"GnomeICU*", L"GnomeICU", IDI_GNOMEICU, ICQ_CASE, TRUE },
+ { "client_Icy_Juice", L"*Icy*Juice*", L"Icy Juice", IDI_ICY_JUICE, ICQ_CASE, TRUE },
+ { "client_Jimm", L"|*Jimm*|mobicq*", L"Jimm", IDI_JIMM, ICQ_CASE, TRUE },
+ { "client_Licq", L"Licq*", L"Licq", IDI_LICQ, ICQ_CASE, TRUE },
+ { "client_LocID", L"LocID*", L"LocID", IDI_LOCID, ICQ_CASE, TRUE },
+ { "client_QIP_2005", L"QIP*2005*", L"QIP 2005", IDI_QIP_2005, ICQ_CASE, TRUE },
+ { "client_R&Q", L"|R&Q*|&RQ*", L"R&Q", IDI_RANDQ, ICQ_CASE, TRUE },
+ { "client_SmartICQ", L"Smart*ICQ*", L"SmartICQ", IDI_SMARTICQ, ICQ_CASE, TRUE },
+ { "client_StrICQ", L"StrICQ*", L"StrICQ", IDI_STRICQ, ICQ_CASE, TRUE },
- { "client_spam", _T("*spam*"), LPGENT("spam client"), IDI_SPAM, ICQ_CASE, TRUE },
- { "client_libicq2k", _T("libicq*"), _T("LibICQ/JIT"), IDI_LIBICQ2000, ICQ_CASE, TRUE },
- { "client_TICQClient", _T("*TICQ*Client*"), _T("TICQClient (Delphi lib)"), IDI_TICQ, ICQ_CASE, TRUE },
+ { "client_spam", L"*spam*", LPGENT("spam client"), IDI_SPAM, ICQ_CASE, TRUE },
+ { "client_libicq2k", L"libicq*", L"LibICQ/JIT", IDI_LIBICQ2000, ICQ_CASE, TRUE },
+ { "client_TICQClient", L"*TICQ*Client*", L"TICQClient (Delphi lib)", IDI_TICQ, ICQ_CASE, TRUE },
- { "client_ICQ_all", _T("|ICQ?|ICQ?.?|ICQ *|ICQ2*|ICQ"), _T("ICQ client"), IDI_ICQ, ICQ_CASE },
+ { "client_ICQ_all", L"|ICQ?|ICQ?.?|ICQ *|ICQ2*|ICQ", L"ICQ client", IDI_ICQ, ICQ_CASE },
//#########################################################################################################################################################################
//################################# JABBER ############################################################################################################################
//#########################################################################################################################################################################
- { "client_Akeni", _T("*Akeni*"), _T("Akeni"), IDI_AKENI, JABBER_CASE, TRUE },
- { "client_Ambrosia", _T("*Ambrosia*"), _T("Ambrosia XMPP Server"), IDI_AMBROSIA, JABBER_CASE, TRUE },
- { "client_AnothRSSBot", _T("|*Anothrbot*|*Anothr Rss Bot*"), _T("Anothr Rss Bot"), IDI_ANOTHRSSBOT, JABBER_CASE, TRUE },
- { "client_Aqq", _T("|*aqq.eu*|aqq*"), _T("Aqq"), IDI_AQQ, JABBER_CASE, TRUE },
- { "client_BarnOwl", _T("*Barn*Owl*"), _T("BarnOwl"), IDI_BARNOWL, JABBER_CASE, TRUE },
- { "client_Beem", _T("*Beem*"), _T("Beem"), IDI_BEEM, JABBER_CASE, TRUE },
- { "client_BellSouth", _T("*BellSouth*"), _T("BellSouth"), IDI_BELLSOUTH, JABBER_CASE, TRUE },
- { "client_BitWise", _T("*BitWise*"), _T("BitWise"), IDI_BITWISE, JABBER_CASE, TRUE },
- { "client_Bombus", _T("*Bombus*"), _T("Bombus"), IDI_BOMBUS, JABBER_CASE, TRUE },
- { "client_BombusMod", _T("|*Bombus*mod*|*bombusmod*"), _T("BombusMod"), IDI_BOMBUS_MOD, JABBER_CASE, TRUE },
- { "client_BombusNG", _T("*Bombus*NG*"), _T("Bombus NG"), IDI_BOMBUS_NG, JABBER_CASE, TRUE },
- { "client_BombusQD", _T("|*Bombusmod-qd*|*bombus*qd*"), _T("Bombus QD"), IDI_BOMBUS_QD, JABBER_CASE, TRUE },
- { "client_Bowline", _T("*Bow*line*"), _T("Bowline"), IDI_BOWLINE, JABBER_CASE, TRUE },
- { "client_BuddySpace", _T("Buddy*Space*"), _T("BuddySpace"), IDI_BUDDYSPACE, JABBER_CASE, TRUE },
- { "client_CJC", _T("*CJC*"), _T("CJC"), IDI_CJC, JABBER_CASE, TRUE },
- { "client_CRoom", _T("*CRoom*"), _T("CRoom"), IDI_CROOM, JABBER_CASE, TRUE },
- { "client_Candy", _T("*Candy*"), _T("Candy"), IDI_CANDY, JABBER_CASE, TRUE },
- { "client_Chatopus", _T("*Chatopus*"), _T("Chatopus"), IDI_CHATOPUS, JABBER_CASE, TRUE },
- { "client_Chikka", _T("*Chikka*"), _T("Chikka"), IDI_CHIKKA, JABBER_CASE, TRUE },
- { "client_ChitChat", _T("*Chit*Chat*"), _T("ChitChat"), IDI_CHITCHAT, JABBER_CASE, TRUE },
- { "client_Claros_Chat", _T("*Claros*"), _T("Claros Chat"), IDI_CLAROS_CHAT, JABBER_CASE, TRUE },
- { "client_Coccinella", _T("*Coccinella*"), _T("Coccinella"), IDI_COCCINELLA, JABBER_CASE, TRUE },
- { "client_Colibry", _T("Colibry*"), _T("Colibry"), IDI_COLIBRY, JABBER_CASE, TRUE },
- { "client_Colloquy", _T("Colloquy*"), _T("Colloquy"), IDI_COLLOQUY, JABBER_CASE, TRUE },
- { "client_CommuniGate", _T("*CommuniGate*"), _T("CommuniGate Pro"), IDI_COMMUNIGATE, JABBER_CASE, TRUE },
- { "client_Conference", _T("Conference*"), _T("Conference Bot (GMail)"), IDI_CONFERENCE, JABBER_CASE, TRUE },
- { "client_Conversations", _T("*http://conversations.im*"), _T("Conversations"), IDI_CONVERSATIONS, JABBER_CASE, TRUE },
- { "client_Crosstalk", _T("*Cross*talk*"), _T("Crosstalk"), IDI_CROSSTALK, JABBER_CASE, TRUE },
- { "client_Cudumar", _T("*Cudumar*"), _T("Cudumar"), IDI_CUDUMAR, JABBER_CASE, TRUE },
- { "client_CyclopsChat", _T("*Cyclops*"), _T("Cyclops Chat"), IDI_CYCLOPS_CHAT, JABBER_CASE, TRUE },
- { "client_Desyr", _T("*Desyr*"), _T("Desyr Messenger"), IDI_DESYR, JABBER_CASE, TRUE },
- { "client_EMess", _T("*EMess*"), _T("EMess"), IDI_EMESS, JABBER_CASE, TRUE },
- { "client_Elmer_Bot", _T("*Elmer*"), _T("Elmer Bot"), IDI_ELMER, JABBER_CASE, TRUE },
- { "client_Emacs", _T("|*Jabber.el*|*Emacs*"), _T("Emacs (Jabber.el)"), IDI_EMACS, JABBER_CASE, TRUE },
- { "client_Exodus", _T("*Exodus*"), _T("Exodus"), IDI_EXODUS, JABBER_CASE, TRUE },
-
- { "client_GCN", _T("*GCN*"), _T("GCN"), IDI_GCN, JABBER_CASE, TRUE },
- { "client_GMail", _T("|*gmail.*|GMail*"), _T("GoogleMail"), IDI_GMAIL, JABBER_CASE, TRUE },
- { "client_GOIM", _T("*GOIM*"), _T("GOIM"), IDI_GOIM, JABBER_CASE, TRUE },
- { "client_GTalk", _T("|*Talk.v*|*Google*Talk*")_T("|*Gtalk*"), _T("GoogleTalk"), IDI_GTALK, JABBER_CASE, TRUE },
- { "client_GTalk_Gadget", _T("|^messaging-*|*Talk*Gadget*"), _T("GTalk Gadget"), IDI_GTALK_GADGET, JABBER_CASE, TRUE },
- { "client_Gabber", _T("*Gabber*"), _T("Gabber"), IDI_GABBER, JABBER_CASE, TRUE },
- { "client_Gajim", _T("*Gajim*"), _T("Gajim"), IDI_GAJIM, JABBER_CASE, TRUE },
- { "client_Gibberbot", _T("*Gibber*"), _T("Gibberbot"), IDI_GIBBERBOT, JABBER_CASE, TRUE },
- { "client_Glu", _T("|glu*|*glu.net*"), _T("Glu"), IDI_GLU, JABBER_CASE, TRUE },
- { "client_Gnome", _T("*Gnome*"), _T("Gnome"), IDI_GNOME, JABBER_CASE, TRUE },
- { "client_GoTalkMobile", _T("*Go*Talk*Mobile*"), _T("GoTalkMobile"), IDI_GOTALKMOBILE, JABBER_CASE, TRUE },
- { "client_Gossip", _T("*Gossip*"), _T("Gossip"), IDI_GOSSIP, JABBER_CASE, TRUE },
- { "client_GreenThumb", _T("gReeNtHumB*"), _T("GreenThumb"), IDI_GREENTHUMB, JABBER_CASE, TRUE },
- { "client_Gush", _T("*Gush*"), _T("Gush"), IDI_GUSH, JABBER_CASE, TRUE },
- { "client_IMCom", _T("*IMCom*"), _T("IMCom"), IDI_IMCOM, JABBER_CASE, TRUE },
- { "client_IM_Friendly", _T("*IM*Friendly*"), _T("IM Friendly!"), IDI_IM_FRIENDLY, JABBER_CASE, TRUE },
- { "client_Imified", _T("*someresource*"), _T("Imified"), IDI_IMIFIED, JABBER_CASE, TRUE },
- { "client_Importal", _T("*Importal*"), _T("Importal"), IDI_IMPORTAL, JABBER_CASE, TRUE },
- { "client_InstanT", _T("*Instan-t*"), _T("Instan-t"), IDI_INSTANT, JABBER_CASE, TRUE },
- { "client_Interaction", _T("*Interaction*"), _T("Interaction"), IDI_INTERACTION, JABBER_CASE, TRUE },
- { "client_iruka", _T("*Iruka*"), _T("Iruka"), IDI_IRUKA, JABBER_CASE, TRUE },
- { "client_J2J_Transport", _T("*J2J*Transport*"), _T("J2J Transport"), IDI_J2J_TRANSPORT, JABBER_CASE, TRUE },
- { "client_Jamm", _T("*Jamm*"), _T("Jamm"), IDI_JAMM, JABBER_CASE, TRUE },
- { "client_JClaim", _T("*JClaim*"), _T("JClaim"), IDI_JCLAIM, JABBER_CASE, TRUE },
- { "client_JMC", _T("JMC*"), _T("JMC (Jabber Mix Client)"), IDI_JMC, JABBER_CASE, TRUE },
- { "client_JWChat", _T("*JWChat*"), _T("JWChat"), IDI_JWCHAT, JABBER_CASE, TRUE },
- { "client_JWGC", _T("|*JWGC*|Jabber *Gram*"), _T("Jabber WindowGram Client"), IDI_JWGC, JABBER_CASE, TRUE },
- { "client_Jabba", _T("*Jabba*"), _T("Jabba"), IDI_JABBA, JABBER_CASE, TRUE },
-
- { "client_JabberApplet", _T("Jabber*Applet*"), _T("JabberApplet"), IDI_JABBER_APPLET, JABBER_CASE, TRUE },
- { "client_JabberBeOS", _T("Jabber*BeOS*"), _T("Jabber (BeOS)"), IDI_JABBER_BEOS, JABBER_CASE, TRUE },
- { "client_JabberFoX", _T("*fox*"), _T("JabberFoX"), IDI_JABBERFOX, JABBER_CASE, TRUE },
- { "client_JabberMSNGR", _T("Jabber Messenger*"), _T("Jabber Messenger"), IDI_JABBER_MESSENGER, JABBER_CASE, TRUE },
- { "client_JabberNaut", _T("*Jabber*Naut*"), _T("JabberNaut"), IDI_JABBERNAUT, JABBER_CASE, TRUE },
- { "client_JabberZilla", _T("*Zilla*"), _T("JabberZilla"), IDI_JABBERZILLA, JABBER_CASE, TRUE },
- { "client_Jabber_Net", _T("|*Jabber*Net*|*cursive.net*|*csharp*"), _T("Jabber-Net"), IDI_JABBER_NET, JABBER_CASE, TRUE },
- { "client_Jabberwocky", _T("Jabberwocky*"), _T("Jabberwocky (Amiga)"), IDI_JABBERWOCKY, JABBER_CASE, TRUE },
- { "client_Jabbroid", _T("*Jabbroid*"), _T("Jabbroid"), IDI_JABBROID, JABBER_CASE, TRUE },
- { "client_Jajc", _T("|*Jajc*|Just Another Jabber Client"), _T("JAJC"), IDI_JAJC, JABBER_CASE, TRUE },
- { "client_Jeti", _T("*Jeti*"), _T("Jeti"), IDI_JETI, JABBER_CASE, TRUE },
- { "client_Jitsi", _T("*Jitsi*"), _T("Jitsi"), IDI_JITSI, JABBER_CASE, TRUE },
- { "client_Joost", _T("*Joost*"), _T("Joost"), IDI_JOOST, JABBER_CASE, TRUE },
- { "client_Kadu", _T("*Kadu*"), _T("Kadu"), IDI_KADU, JABBER_CASE, TRUE },
- { "client_Konnekt", _T("Konnekt*"), _T("Konnekt"), IDI_KONNEKT, JABBER_CASE, TRUE },
- { "client_LLuna", _T("LLuna*"), _T("LLuna"), IDI_LLUNA, JABBER_CASE, TRUE },
- { "client_Lamp", _T("*Lamp*IM*"), _T("Lamp IM"), IDI_LAMP_IM, JABBER_CASE, TRUE },
- { "client_Lampiro", _T("*Lampiro*"), _T("Lampiro"), IDI_LAMPIRO, JABBER_CASE, TRUE },
- { "client_Landell", _T("*Landell*"), _T("Landell"), IDI_LANDELL, JABBER_CASE, TRUE },
- { "client_Leaf", _T("*Leaf*"), _T("Leaf Messenger"), IDI_LEAF, JABBER_CASE, TRUE },
- { "client_LinQ", _T("*LinQ*"), _T("LinQ"), IDI_LINQ, JABBER_CASE, TRUE },
- { "client_M8Jabber", _T("*M8Jabber*"), _T("M8Jabber"), IDI_M8JABBER, JABBER_CASE, TRUE },
- { "client_MCabber", _T("*mcabber*"), _T("MCabber"), IDI_MCABBER, JABBER_CASE, TRUE },
- { "client_MGTalk", _T("|*MGTalk*|*Mobile?\?\?\?\?\?\?\?"), _T("MGTalk"), IDI_MGTALK, JABBER_CASE, TRUE },
- { "client_MUCkl", _T("*MUCkl*"), _T("MUCkl"), IDI_MUCKL, JABBER_CASE, TRUE },
- { "client_Mango", _T("*Mango*"), _T("Mango"), IDI_MANGO, JABBER_CASE, TRUE },
- { "client_Mercury", _T("*Mercury*"), _T("Mercury Messenger"), IDI_MERCURY_MESSENGER, JABBER_CASE, TRUE },
- { "client_Monal", _T("*Monal*"), _T("Monal"), IDI_MONAL, JABBER_CASE, TRUE },
- { "client_MozillaChat", _T("*Mozilla*Chat*"), _T("MozillaChat"), IDI_MOZILLACHAT, JABBER_CASE, TRUE },
- { "client_Neos", _T("Neos*"), _T("Neos"), IDI_NEOS, JABBER_CASE, TRUE },
- { "client_Nitro", _T("Nitro*"), _T("Nitro"), IDI_NITRO, JABBER_CASE, TRUE },
- { "client_Nostromo", _T("*USCSS*Nostromo*"), _T("USCSS Nostromo"), IDI_NOSTROMO, JABBER_CASE, TRUE },
- { "client_OM", _T("OM*"), _T("OM aka Online Messenger"), IDI_OM, JABBER_CASE, TRUE },
- { "client_OctroTalk", _T("*Octro*"), _T("OctroTalk"), IDI_OCTROTALK, JABBER_CASE, TRUE },
- { "client_OneTeam", _T("*OneTeam*"), _T("OneTeam"), IDI_ONETEAM, JABBER_CASE, TRUE },
- { "client_Openfire", _T("*Openfire*"), _T("Openfire"), IDI_OPENFIRE, JABBER_CASE, TRUE },
- { "client_Fire", _T("Fire*"), _T("Fire"), IDI_FIRE, JABBER_CASE, TRUE },
- { "client_Paltalk", _T("*Paltalk*"), _T("Paltalk"), IDI_PALTALK, JABBER_CASE, TRUE },
- { "client_Pandion", _T("|*Pandion*|*Пандион*"), _T("Pandion"), IDI_PANDION, JABBER_CASE, TRUE },
- { "client_Papla", _T("*Papla*"), _T("Papla"), IDI_PAPLA, JABBER_CASE, TRUE },
- { "client_Poezio", _T("*Poezio*"), _T("Poezio"), IDI_POEZIO, JABBER_CASE, TRUE },
- { "client_Prosody", _T("*Prosody*"), _T("Prosody"), IDI_PROSODY, JABBER_CASE, TRUE },
-
- { "client_Psi_plus", _T("|*PSI+*|*psi-dev.googlecode*"), _T("PSI+"), IDI_PSIPLUS, JABBER_CASE, TRUE },
- { "client_Psi", _T("*Psi*"), _T("PSI"), IDI_PSI, JABBER_CASE, TRUE },
-
- { "client_Psto", _T("*Psto*"), _T("Psto.net"), IDI_PSTO, JABBER_CASE, TRUE },
- { "client_Psyc", _T("*Psyc*"), _T("Psyc"), IDI_PSYC, JABBER_CASE, TRUE },
- { "client_Pygeon", _T("*Pygeon*"), _T("Pygeon"), IDI_PYGEON, JABBER_CASE, TRUE },
-
- { "client_QTJim", _T("*QTJim*"), _T("QTJim"), IDI_QTJIM, JABBER_CASE, TRUE },
- { "client_QuteCom", _T("*Qute*Com*"), _T("QuteCom"), IDI_QUTECOM, JABBER_CASE, TRUE },
- { "client_RenRen", _T("|*WTalkProxy0_0*|*talk.xiaonei.com*"), _T("RenRen"), IDI_RENREN, JABBER_CASE, TRUE },
- { "client_SBot", _T("*SBot*"), _T("SBot"), IDI_SBOT, JABBER_CASE, TRUE },
- { "client_SMTP_Transport", _T("*smtp*transport*"), _T("SMTP Transport"), IDI_SMTP_TRANSPORT, JABBER_CASE, TRUE },
- { "client_SamePlace", _T("*SamePlace*"), _T("SamePlace"), IDI_SAMEPLACE, JABBER_CASE, TRUE },
- { "client_Sky_Messager", _T("Sky*Mess*"), _T("Sky Messager"), IDI_SKYMESSAGER, JABBER_CASE, TRUE },
- { "client_Sky_Messager", _T("*Sky*Messager*"), _T("Sky Messager"), IDI_SKYMESSAGER, JABBER_CASE, TRUE },
-
- { "client_xabber", _T("|*xabber*")
- _T("|*GyIX*"), _T("xabber"), IDI_XABBER, JABBER_CASE, TRUE },
- { "client_Gabble", _T("*Gabble*"), _T("Gabble"), IDI_GABBLE, JABBER_CASE, TRUE },
- { "client_Smack", _T("|*igniterealtime.*smack*|*smack*"), _T("Smack"), IDI_SMACK, JABBER_CASE, TRUE },
-
- { "client_SoapBox", _T("*SoapBox*"), _T("SoapBox"), IDI_SOAPBOX, JABBER_CASE, TRUE },
- { "client_Spark", _T("*Spark*"), _T("Spark"), IDI_SPARK, JABBER_CASE, TRUE },
- { "client_Speakall", _T("*Speak*all*"), _T("Speakall"), IDI_SPEAKALL, JABBER_CASE, TRUE },
- { "client_Speeqe", _T("*Speeqe*"), _T("Speeqe"), IDI_SPEEQE, JABBER_CASE, TRUE },
- { "client_Spik", _T("*Spik*"), _T("Spik"), IDI_SPIK, JABBER_CASE, TRUE },
- { "client_Swift", _T("*Swift*"), _T("Swift"), IDI_SWIFT, JABBER_CASE, TRUE },
- { "client_SworIM", _T("*Swor*IM*"), _T("SworIM"), IDI_SWORIM, JABBER_CASE, TRUE },
- { "client_Synapse", _T("*Synapse*"), _T("Synapse"), IDI_SYNAPSE, JABBER_CASE, TRUE },
- { "client_Talkdroid", _T("*Talkdroid*"), _T("Talkdroid"), IDI_TALKDROID, JABBER_CASE, TRUE },
- { "client_Talkonaut", _T("*Talkonaut*"), _T("Talkonaut"), IDI_TALKONAUT, JABBER_CASE, TRUE },
- { "client_Tapioca", _T("*Tapioca*"), _T("Tapioca"), IDI_TAPIOCA, JABBER_CASE, TRUE },
- { "client_Teabot", _T("|*teabot*|*teabot.org/bot*"), _T("Teabot"), IDI_TEABOT, JABBER_CASE, TRUE },
- { "client_Telepathy", _T("*Telepathy*"), _T("Telepathy"), IDI_TELEPATHY, JABBER_CASE, TRUE },
- { "client_The_Bee", _T("*The*Bee*"), _T("The Bee"), IDI_THEBEE, JABBER_CASE, TRUE },
- { "client_Thunderbird", _T("*Thunderbi*"), _T("Thunderbird"), IDI_THUNDERBIRD, JABBER_CASE, TRUE },
- { "client_Tigase", _T("*Tigase*"), _T("Tigase"), IDI_TIGASE, JABBER_CASE, TRUE },
- { "client_TipicIM", _T("Tipic*"), _T("TipicIM"), IDI_TIPICIM, JABBER_CASE, TRUE },
- { "client_Tkabber", _T("*Tkabber*"), _T("Tkabber"), IDI_TKABBER, JABBER_CASE, TRUE },
- { "client_TransactIM", _T("*Transact*"), _T("TransactIM"), IDI_TRANSACTIM, JABBER_CASE, TRUE },
- { "client_Translate", _T("*Translate*"), _T("Translate component"), IDI_TRANSLATE, JABBER_CASE, TRUE },
- { "client_Triple", _T("Triple*"), _T("TripleSoftwareIM (TSIM)"), IDI_TRIPLE_SOFTWARE, JABBER_CASE, TRUE },
- { "client_Vacuum", _T("*Vacuum*"), _T("Vacuum IM"), IDI_VACUUM, JABBER_CASE, TRUE },
- { "client_V&V", _T("*V&V*"), _T("V&V Messenger"), IDI_VANDV, JABBER_CASE, TRUE },
- { "client_Vayusphere", _T("*Vayusphere*"), _T("Vayusphere"), IDI_VAYUSPHERE, JABBER_CASE, TRUE },
- { "client_Vysper", _T("*Vysper*"), _T("Vysper"), IDI_VYSPER, JABBER_CASE, TRUE },
- { "client_WTW", _T("**WTW**|*wtw.k2t.eu*"), _T("WTW"), IDI_WTW, JABBER_CASE, TRUE },
- { "client_WannaChat", _T("Wanna*Chat*"), _T("WannaChat"), IDI_WANNACHAT, JABBER_CASE, TRUE },
- { "client_WebEx", _T("*webex.com*"), _T("Cisco WebEx Connect"), IDI_WEBEX, JABBER_CASE, TRUE },
- { "client_WhisperIM", _T("*Whisper*"), _T("WhisperIM"), IDI_WHISPERIM, JABBER_CASE, TRUE },
- { "client_Wija", _T("*wija*"), _T("Wija"), IDI_WIJA, JABBER_CASE, TRUE },
- { "client_Wildfire", _T("Wildfire*"), _T("Wildfire"), IDI_WILDFIRE, JABBER_CASE, TRUE },
- { "client_WinJab", _T("*WinJab*"), _T("WinJab"), IDI_WINJAB, JABBER_CASE, TRUE },
- { "client_Xiffian", _T("*Xiffian*"), _T("Xiffian"), IDI_XIFFIAN, JABBER_CASE, TRUE },
- { "client_Yambi", _T("*Yambi*"), _T("Yambi"), IDI_YAMBI, JABBER_CASE, TRUE },
- { "client_chat_bots", _T("*chat*bot*"), _T("chat bot"), IDI_CHAT_BOT, JABBER_CASE, TRUE },
- { "client_dziObber", _T("*dzi?bber*"), _T("dziObber"), IDI_DZIOBBER, JABBER_CASE, TRUE },
- { "client_ejabberd", _T("*ejabberd*"), _T("ejabberd"), IDI_EJABBERD, JABBER_CASE, TRUE },
- { "client_emite", _T("*emite*"), _T("emite"), IDI_EMITE, JABBER_CASE, TRUE },
- { "client_gYaber", _T("gYaber*"), _T("gYaber"), IDI_GYABER, JABBER_CASE, TRUE },
- { "client_glu", _T("*glu*"), _T("glu"), IDI_GLU, JABBER_CASE, TRUE },
- { "client_iGoogle", _T("iGoogle*"), _T("iGoogle"), IDI_IGOOGLE, JABBER_CASE, TRUE },
- { "client_iJab", _T("*iJab*"), _T("iJab"), IDI_IJAB, JABBER_CASE, TRUE },
- { "client_iMeem", _T("iMeem*"), _T("iMeem"), IDI_IMEEM, JABBER_CASE, TRUE },
- { "client_iMov", _T("*imov*"), _T("iMov"), IDI_IMOV, JABBER_CASE, TRUE },
- { "client_jTalk", _T("|*jTalk*|http://jtalk*"), _T("jTalk"), IDI_JTALK, JABBER_CASE, TRUE },
- { "client_jTalkmod", _T("|*jTalkmod*")
- _T("|*glSvJ3yM3M2f53oregNy6fYwocY=*")
- _T("|*XEssZlSs8oF4EcTHU1b8BsVxcPg=*"), _T("jTalkmod"), IDI_JTALKMOD, JABBER_CASE, TRUE },
- { "client_jabberDisk", _T("|*jdisk*|*jabber*Disk*"), _T("jabberDisk"), IDI_JABBER_DISK, JABBER_CASE, TRUE },
- { "client_jabbim", _T("*jabbim*"), _T("Jabbim"), IDI_JABBIM, JABBER_CASE, TRUE },
- { "client_jabiru", _T("*jabiru*"), _T("Jabiru"), IDI_JABIRU, JABBER_CASE, TRUE },
- { "client_jappix", _T("*jappix*"), _T("jappix"), IDI_JAPPIX, JABBER_CASE, TRUE },
- { "client_jrudevels", _T("*jrudevels*"), _T("Jrudevels"), IDI_JRUDEVELS, JABBER_CASE, TRUE },
- { "client_juick", _T("*juick*"), _T("Juick"), IDI_JUICK, JABBER_CASE, TRUE },
- { "client_kf", _T("|^*smack*|*kf*"), _T("kf jabber"), IDI_KF, JABBER_CASE, TRUE },
- { "client_laffer", _T("*laffer*"), _T("Laffer"), IDI_LAFFER, JABBER_CASE, TRUE },
- { "client_mJabber", _T("*mJabber*"), _T("mJabber"), IDI_MJABBER, JABBER_CASE, TRUE },
- { "client_meinvz", _T("*meinvz*"), _T("MeinVZ"), IDI_MEINVZ, JABBER_CASE, TRUE },
- { "client_moJab", _T("*moJab*"), _T("moJab"), IDI_MOJAB, JABBER_CASE, TRUE },
- { "client_mobber", _T("*mobber*"), _T("mobber"), IDI_MOBBER, JABBER_CASE, TRUE },
- { "client_myJabber", _T("*myJabber*"), _T("myJabber"), IDI_MYJABBER, JABBER_CASE, TRUE },
- { "client_orkut", _T("*orkut*"), _T("orkut"), IDI_ORKUT, JABBER_CASE, TRUE },
- { "client_pjc", _T("|*PJC*|*pjc.googlecode.com*"), LPGENT("PHP Jabber Client"), IDI_PJC, JABBER_CASE, TRUE },
- { "client_saje", _T("*saje*"), _T("saje"), IDI_SAJE, JABBER_CASE, TRUE },
- { "client_schuelervz", _T("*schuelervz*"), _T("SchulerVZ"), IDI_SCHULERVZ, JABBER_CASE, TRUE },
- { "client_studivz", _T("*studivz*"), _T("StudiVZ"), IDI_STUDIVZ, JABBER_CASE, TRUE },
- { "client_tkchat", _T("*tkchat*"), _T("tkchat"), IDI_TKCHAT, JABBER_CASE, TRUE },
- // {"client_uJabber", _T("*uJabber*"), _T("uJabber"), IDI_UJABBER, JABBER_CASE, TRUE },
- { "client_uKeeper", _T("*uKeeper*"), _T("uKeeper"), IDI_UKEEPER, JABBER_CASE, TRUE },
- { "client_whoisbot", _T("whoisbot"), _T("Swissjabber Whois Bot"), IDI_WHOISBOT, JABBER_CASE, TRUE },
- { "client_xeus2", _T("*xeus 2*"), _T("xeus 2"), IDI_XEUS2, JABBER_CASE, TRUE },
- { "client_xeus", _T("*xeus*"), _T("xeus"), IDI_XEUS, JABBER_CASE, TRUE },
- { "client_yaonline", _T("|*yandex*|*yaonline*")
- _T("|*Я.Онлайн*|*ЯндекÑ*"), _T("Ya.Online"), IDI_YAONLINE, JABBER_CASE, TRUE },
- { "client_yaxim", _T("*yaxim*"), _T("yaxim"), IDI_YAXIM, JABBER_CASE, TRUE },
+ { "client_Akeni", L"*Akeni*", L"Akeni", IDI_AKENI, JABBER_CASE, TRUE },
+ { "client_Ambrosia", L"*Ambrosia*", L"Ambrosia XMPP Server", IDI_AMBROSIA, JABBER_CASE, TRUE },
+ { "client_AnothRSSBot", L"|*Anothrbot*|*Anothr Rss Bot*", L"Anothr Rss Bot", IDI_ANOTHRSSBOT, JABBER_CASE, TRUE },
+ { "client_Aqq", L"|*aqq.eu*|aqq*", L"Aqq", IDI_AQQ, JABBER_CASE, TRUE },
+ { "client_BarnOwl", L"*Barn*Owl*", L"BarnOwl", IDI_BARNOWL, JABBER_CASE, TRUE },
+ { "client_Beem", L"*Beem*", L"Beem", IDI_BEEM, JABBER_CASE, TRUE },
+ { "client_BellSouth", L"*BellSouth*", L"BellSouth", IDI_BELLSOUTH, JABBER_CASE, TRUE },
+ { "client_BitWise", L"*BitWise*", L"BitWise", IDI_BITWISE, JABBER_CASE, TRUE },
+ { "client_Bombus", L"*Bombus*", L"Bombus", IDI_BOMBUS, JABBER_CASE, TRUE },
+ { "client_BombusMod", L"|*Bombus*mod*|*bombusmod*", L"BombusMod", IDI_BOMBUS_MOD, JABBER_CASE, TRUE },
+ { "client_BombusNG", L"*Bombus*NG*", L"Bombus NG", IDI_BOMBUS_NG, JABBER_CASE, TRUE },
+ { "client_BombusQD", L"|*Bombusmod-qd*|*bombus*qd*", L"Bombus QD", IDI_BOMBUS_QD, JABBER_CASE, TRUE },
+ { "client_Bowline", L"*Bow*line*", L"Bowline", IDI_BOWLINE, JABBER_CASE, TRUE },
+ { "client_BuddySpace", L"Buddy*Space*", L"BuddySpace", IDI_BUDDYSPACE, JABBER_CASE, TRUE },
+ { "client_CJC", L"*CJC*", L"CJC", IDI_CJC, JABBER_CASE, TRUE },
+ { "client_CRoom", L"*CRoom*", L"CRoom", IDI_CROOM, JABBER_CASE, TRUE },
+ { "client_Candy", L"*Candy*", L"Candy", IDI_CANDY, JABBER_CASE, TRUE },
+ { "client_Chatopus", L"*Chatopus*", L"Chatopus", IDI_CHATOPUS, JABBER_CASE, TRUE },
+ { "client_Chikka", L"*Chikka*", L"Chikka", IDI_CHIKKA, JABBER_CASE, TRUE },
+ { "client_ChitChat", L"*Chit*Chat*", L"ChitChat", IDI_CHITCHAT, JABBER_CASE, TRUE },
+ { "client_Claros_Chat", L"*Claros*", L"Claros Chat", IDI_CLAROS_CHAT, JABBER_CASE, TRUE },
+ { "client_Coccinella", L"*Coccinella*", L"Coccinella", IDI_COCCINELLA, JABBER_CASE, TRUE },
+ { "client_Colibry", L"Colibry*", L"Colibry", IDI_COLIBRY, JABBER_CASE, TRUE },
+ { "client_Colloquy", L"Colloquy*", L"Colloquy", IDI_COLLOQUY, JABBER_CASE, TRUE },
+ { "client_CommuniGate", L"*CommuniGate*", L"CommuniGate Pro", IDI_COMMUNIGATE, JABBER_CASE, TRUE },
+ { "client_Conference", L"Conference*", L"Conference Bot (GMail)", IDI_CONFERENCE, JABBER_CASE, TRUE },
+ { "client_Conversations", L"*http://conversations.im*", L"Conversations", IDI_CONVERSATIONS, JABBER_CASE, TRUE },
+ { "client_Crosstalk", L"*Cross*talk*", L"Crosstalk", IDI_CROSSTALK, JABBER_CASE, TRUE },
+ { "client_Cudumar", L"*Cudumar*", L"Cudumar", IDI_CUDUMAR, JABBER_CASE, TRUE },
+ { "client_CyclopsChat", L"*Cyclops*", L"Cyclops Chat", IDI_CYCLOPS_CHAT, JABBER_CASE, TRUE },
+ { "client_Desyr", L"*Desyr*", L"Desyr Messenger", IDI_DESYR, JABBER_CASE, TRUE },
+ { "client_EMess", L"*EMess*", L"EMess", IDI_EMESS, JABBER_CASE, TRUE },
+ { "client_Elmer_Bot", L"*Elmer*", L"Elmer Bot", IDI_ELMER, JABBER_CASE, TRUE },
+ { "client_Emacs", L"|*Jabber.el*|*Emacs*", L"Emacs (Jabber.el)", IDI_EMACS, JABBER_CASE, TRUE },
+ { "client_Exodus", L"*Exodus*", L"Exodus", IDI_EXODUS, JABBER_CASE, TRUE },
+
+ { "client_GCN", L"*GCN*", L"GCN", IDI_GCN, JABBER_CASE, TRUE },
+ { "client_GMail", L"|*gmail.*|GMail*", L"GoogleMail", IDI_GMAIL, JABBER_CASE, TRUE },
+ { "client_GOIM", L"*GOIM*", L"GOIM", IDI_GOIM, JABBER_CASE, TRUE },
+ { "client_GTalk", L"|*Talk.v*|*Google*Talk*" L"|*Gtalk*", L"GoogleTalk", IDI_GTALK, JABBER_CASE, TRUE },
+ { "client_GTalk_Gadget", L"|^messaging-*|*Talk*Gadget*", L"GTalk Gadget", IDI_GTALK_GADGET, JABBER_CASE, TRUE },
+ { "client_Gabber", L"*Gabber*", L"Gabber", IDI_GABBER, JABBER_CASE, TRUE },
+ { "client_Gajim", L"*Gajim*", L"Gajim", IDI_GAJIM, JABBER_CASE, TRUE },
+ { "client_Gibberbot", L"*Gibber*", L"Gibberbot", IDI_GIBBERBOT, JABBER_CASE, TRUE },
+ { "client_Glu", L"|glu*|*glu.net*", L"Glu", IDI_GLU, JABBER_CASE, TRUE },
+ { "client_Gnome", L"*Gnome*", L"Gnome", IDI_GNOME, JABBER_CASE, TRUE },
+ { "client_GoTalkMobile", L"*Go*Talk*Mobile*", L"GoTalkMobile", IDI_GOTALKMOBILE, JABBER_CASE, TRUE },
+ { "client_Gossip", L"*Gossip*", L"Gossip", IDI_GOSSIP, JABBER_CASE, TRUE },
+ { "client_GreenThumb", L"gReeNtHumB*", L"GreenThumb", IDI_GREENTHUMB, JABBER_CASE, TRUE },
+ { "client_Gush", L"*Gush*", L"Gush", IDI_GUSH, JABBER_CASE, TRUE },
+ { "client_IMCom", L"*IMCom*", L"IMCom", IDI_IMCOM, JABBER_CASE, TRUE },
+ { "client_IM_Friendly", L"*IM*Friendly*", L"IM Friendly!", IDI_IM_FRIENDLY, JABBER_CASE, TRUE },
+ { "client_Imified", L"*someresource*", L"Imified", IDI_IMIFIED, JABBER_CASE, TRUE },
+ { "client_Importal", L"*Importal*", L"Importal", IDI_IMPORTAL, JABBER_CASE, TRUE },
+ { "client_InstanT", L"*Instan-t*", L"Instan-t", IDI_INSTANT, JABBER_CASE, TRUE },
+ { "client_Interaction", L"*Interaction*", L"Interaction", IDI_INTERACTION, JABBER_CASE, TRUE },
+ { "client_iruka", L"*Iruka*", L"Iruka", IDI_IRUKA, JABBER_CASE, TRUE },
+ { "client_J2J_Transport", L"*J2J*Transport*", L"J2J Transport", IDI_J2J_TRANSPORT, JABBER_CASE, TRUE },
+ { "client_Jamm", L"*Jamm*", L"Jamm", IDI_JAMM, JABBER_CASE, TRUE },
+ { "client_JClaim", L"*JClaim*", L"JClaim", IDI_JCLAIM, JABBER_CASE, TRUE },
+ { "client_JMC", L"JMC*", L"JMC (Jabber Mix Client)", IDI_JMC, JABBER_CASE, TRUE },
+ { "client_JWChat", L"*JWChat*", L"JWChat", IDI_JWCHAT, JABBER_CASE, TRUE },
+ { "client_JWGC", L"|*JWGC*|Jabber *Gram*", L"Jabber WindowGram Client", IDI_JWGC, JABBER_CASE, TRUE },
+ { "client_Jabba", L"*Jabba*", L"Jabba", IDI_JABBA, JABBER_CASE, TRUE },
+
+ { "client_JabberApplet", L"Jabber*Applet*", L"JabberApplet", IDI_JABBER_APPLET, JABBER_CASE, TRUE },
+ { "client_JabberBeOS", L"Jabber*BeOS*", L"Jabber (BeOS)", IDI_JABBER_BEOS, JABBER_CASE, TRUE },
+ { "client_JabberFoX", L"*fox*", L"JabberFoX", IDI_JABBERFOX, JABBER_CASE, TRUE },
+ { "client_JabberMSNGR", L"Jabber Messenger*", L"Jabber Messenger", IDI_JABBER_MESSENGER, JABBER_CASE, TRUE },
+ { "client_JabberNaut", L"*Jabber*Naut*", L"JabberNaut", IDI_JABBERNAUT, JABBER_CASE, TRUE },
+ { "client_JabberZilla", L"*Zilla*", L"JabberZilla", IDI_JABBERZILLA, JABBER_CASE, TRUE },
+ { "client_Jabber_Net", L"|*Jabber*Net*|*cursive.net*|*csharp*", L"Jabber-Net", IDI_JABBER_NET, JABBER_CASE, TRUE },
+ { "client_Jabberwocky", L"Jabberwocky*", L"Jabberwocky (Amiga)", IDI_JABBERWOCKY, JABBER_CASE, TRUE },
+ { "client_Jabbroid", L"*Jabbroid*", L"Jabbroid", IDI_JABBROID, JABBER_CASE, TRUE },
+ { "client_Jajc", L"|*Jajc*|Just Another Jabber Client", L"JAJC", IDI_JAJC, JABBER_CASE, TRUE },
+ { "client_Jeti", L"*Jeti*", L"Jeti", IDI_JETI, JABBER_CASE, TRUE },
+ { "client_Jitsi", L"*Jitsi*", L"Jitsi", IDI_JITSI, JABBER_CASE, TRUE },
+ { "client_Joost", L"*Joost*", L"Joost", IDI_JOOST, JABBER_CASE, TRUE },
+ { "client_Kadu", L"*Kadu*", L"Kadu", IDI_KADU, JABBER_CASE, TRUE },
+ { "client_Konnekt", L"Konnekt*", L"Konnekt", IDI_KONNEKT, JABBER_CASE, TRUE },
+ { "client_LLuna", L"LLuna*", L"LLuna", IDI_LLUNA, JABBER_CASE, TRUE },
+ { "client_Lamp", L"*Lamp*IM*", L"Lamp IM", IDI_LAMP_IM, JABBER_CASE, TRUE },
+ { "client_Lampiro", L"*Lampiro*", L"Lampiro", IDI_LAMPIRO, JABBER_CASE, TRUE },
+ { "client_Landell", L"*Landell*", L"Landell", IDI_LANDELL, JABBER_CASE, TRUE },
+ { "client_Leaf", L"*Leaf*", L"Leaf Messenger", IDI_LEAF, JABBER_CASE, TRUE },
+ { "client_LinQ", L"*LinQ*", L"LinQ", IDI_LINQ, JABBER_CASE, TRUE },
+ { "client_M8Jabber", L"*M8Jabber*", L"M8Jabber", IDI_M8JABBER, JABBER_CASE, TRUE },
+ { "client_MCabber", L"*mcabber*", L"MCabber", IDI_MCABBER, JABBER_CASE, TRUE },
+ { "client_MGTalk", L"|*MGTalk*|*Mobile?\?\?\?\?\?\?\?", L"MGTalk", IDI_MGTALK, JABBER_CASE, TRUE },
+ { "client_MUCkl", L"*MUCkl*", L"MUCkl", IDI_MUCKL, JABBER_CASE, TRUE },
+ { "client_Mango", L"*Mango*", L"Mango", IDI_MANGO, JABBER_CASE, TRUE },
+ { "client_Mercury", L"*Mercury*", L"Mercury Messenger", IDI_MERCURY_MESSENGER, JABBER_CASE, TRUE },
+ { "client_Monal", L"*Monal*", L"Monal", IDI_MONAL, JABBER_CASE, TRUE },
+ { "client_MozillaChat", L"*Mozilla*Chat*", L"MozillaChat", IDI_MOZILLACHAT, JABBER_CASE, TRUE },
+ { "client_Neos", L"Neos*", L"Neos", IDI_NEOS, JABBER_CASE, TRUE },
+ { "client_Nitro", L"Nitro*", L"Nitro", IDI_NITRO, JABBER_CASE, TRUE },
+ { "client_Nostromo", L"*USCSS*Nostromo*", L"USCSS Nostromo", IDI_NOSTROMO, JABBER_CASE, TRUE },
+ { "client_OM", L"OM*", L"OM aka Online Messenger", IDI_OM, JABBER_CASE, TRUE },
+ { "client_OctroTalk", L"*Octro*", L"OctroTalk", IDI_OCTROTALK, JABBER_CASE, TRUE },
+ { "client_OneTeam", L"*OneTeam*", L"OneTeam", IDI_ONETEAM, JABBER_CASE, TRUE },
+ { "client_Openfire", L"*Openfire*", L"Openfire", IDI_OPENFIRE, JABBER_CASE, TRUE },
+ { "client_Fire", L"Fire*", L"Fire", IDI_FIRE, JABBER_CASE, TRUE },
+ { "client_Paltalk", L"*Paltalk*", L"Paltalk", IDI_PALTALK, JABBER_CASE, TRUE },
+ { "client_Pandion", L"|*Pandion*|*Пандион*", L"Pandion", IDI_PANDION, JABBER_CASE, TRUE },
+ { "client_Papla", L"*Papla*", L"Papla", IDI_PAPLA, JABBER_CASE, TRUE },
+ { "client_Poezio", L"*Poezio*", L"Poezio", IDI_POEZIO, JABBER_CASE, TRUE },
+ { "client_Prosody", L"*Prosody*", L"Prosody", IDI_PROSODY, JABBER_CASE, TRUE },
+
+ { "client_Psi_plus", L"|*PSI+*|*psi-dev.googlecode*", L"PSI+", IDI_PSIPLUS, JABBER_CASE, TRUE },
+ { "client_Psi", L"*Psi*", L"PSI", IDI_PSI, JABBER_CASE, TRUE },
+
+ { "client_Psto", L"*Psto*", L"Psto.net", IDI_PSTO, JABBER_CASE, TRUE },
+ { "client_Psyc", L"*Psyc*", L"Psyc", IDI_PSYC, JABBER_CASE, TRUE },
+ { "client_Pygeon", L"*Pygeon*", L"Pygeon", IDI_PYGEON, JABBER_CASE, TRUE },
+
+ { "client_QTJim", L"*QTJim*", L"QTJim", IDI_QTJIM, JABBER_CASE, TRUE },
+ { "client_QuteCom", L"*Qute*Com*", L"QuteCom", IDI_QUTECOM, JABBER_CASE, TRUE },
+ { "client_RenRen", L"|*WTalkProxy0_0*|*talk.xiaonei.com*", L"RenRen", IDI_RENREN, JABBER_CASE, TRUE },
+ { "client_SBot", L"*SBot*", L"SBot", IDI_SBOT, JABBER_CASE, TRUE },
+ { "client_SMTP_Transport", L"*smtp*transport*", L"SMTP Transport", IDI_SMTP_TRANSPORT, JABBER_CASE, TRUE },
+ { "client_SamePlace", L"*SamePlace*", L"SamePlace", IDI_SAMEPLACE, JABBER_CASE, TRUE },
+ { "client_Sky_Messager", L"Sky*Mess*", L"Sky Messager", IDI_SKYMESSAGER, JABBER_CASE, TRUE },
+ { "client_Sky_Messager", L"*Sky*Messager*", L"Sky Messager", IDI_SKYMESSAGER, JABBER_CASE, TRUE },
+
+ { "client_xabber", L"|*xabber*"
+ L"|*GyIX*", L"xabber", IDI_XABBER, JABBER_CASE, TRUE },
+ { "client_Gabble", L"*Gabble*", L"Gabble", IDI_GABBLE, JABBER_CASE, TRUE },
+ { "client_Smack", L"|*igniterealtime.*smack*|*smack*", L"Smack", IDI_SMACK, JABBER_CASE, TRUE },
+
+ { "client_SoapBox", L"*SoapBox*", L"SoapBox", IDI_SOAPBOX, JABBER_CASE, TRUE },
+ { "client_Spark", L"*Spark*", L"Spark", IDI_SPARK, JABBER_CASE, TRUE },
+ { "client_Speakall", L"*Speak*all*", L"Speakall", IDI_SPEAKALL, JABBER_CASE, TRUE },
+ { "client_Speeqe", L"*Speeqe*", L"Speeqe", IDI_SPEEQE, JABBER_CASE, TRUE },
+ { "client_Spik", L"*Spik*", L"Spik", IDI_SPIK, JABBER_CASE, TRUE },
+ { "client_Swift", L"*Swift*", L"Swift", IDI_SWIFT, JABBER_CASE, TRUE },
+ { "client_SworIM", L"*Swor*IM*", L"SworIM", IDI_SWORIM, JABBER_CASE, TRUE },
+ { "client_Synapse", L"*Synapse*", L"Synapse", IDI_SYNAPSE, JABBER_CASE, TRUE },
+ { "client_Talkdroid", L"*Talkdroid*", L"Talkdroid", IDI_TALKDROID, JABBER_CASE, TRUE },
+ { "client_Talkonaut", L"*Talkonaut*", L"Talkonaut", IDI_TALKONAUT, JABBER_CASE, TRUE },
+ { "client_Tapioca", L"*Tapioca*", L"Tapioca", IDI_TAPIOCA, JABBER_CASE, TRUE },
+ { "client_Teabot", L"|*teabot*|*teabot.org/bot*", L"Teabot", IDI_TEABOT, JABBER_CASE, TRUE },
+ { "client_Telepathy", L"*Telepathy*", L"Telepathy", IDI_TELEPATHY, JABBER_CASE, TRUE },
+ { "client_The_Bee", L"*The*Bee*", L"The Bee", IDI_THEBEE, JABBER_CASE, TRUE },
+ { "client_Thunderbird", L"*Thunderbi*", L"Thunderbird", IDI_THUNDERBIRD, JABBER_CASE, TRUE },
+ { "client_Tigase", L"*Tigase*", L"Tigase", IDI_TIGASE, JABBER_CASE, TRUE },
+ { "client_TipicIM", L"Tipic*", L"TipicIM", IDI_TIPICIM, JABBER_CASE, TRUE },
+ { "client_Tkabber", L"*Tkabber*", L"Tkabber", IDI_TKABBER, JABBER_CASE, TRUE },
+ { "client_TransactIM", L"*Transact*", L"TransactIM", IDI_TRANSACTIM, JABBER_CASE, TRUE },
+ { "client_Translate", L"*Translate*", L"Translate component", IDI_TRANSLATE, JABBER_CASE, TRUE },
+ { "client_Triple", L"Triple*", L"TripleSoftwareIM (TSIM)", IDI_TRIPLE_SOFTWARE, JABBER_CASE, TRUE },
+ { "client_Vacuum", L"*Vacuum*", L"Vacuum IM", IDI_VACUUM, JABBER_CASE, TRUE },
+ { "client_V&V", L"*V&V*", L"V&V Messenger", IDI_VANDV, JABBER_CASE, TRUE },
+ { "client_Vayusphere", L"*Vayusphere*", L"Vayusphere", IDI_VAYUSPHERE, JABBER_CASE, TRUE },
+ { "client_Vysper", L"*Vysper*", L"Vysper", IDI_VYSPER, JABBER_CASE, TRUE },
+ { "client_WTW", L"**WTW**|*wtw.k2t.eu*", L"WTW", IDI_WTW, JABBER_CASE, TRUE },
+ { "client_WannaChat", L"Wanna*Chat*", L"WannaChat", IDI_WANNACHAT, JABBER_CASE, TRUE },
+ { "client_WebEx", L"*webex.com*", L"Cisco WebEx Connect", IDI_WEBEX, JABBER_CASE, TRUE },
+ { "client_WhisperIM", L"*Whisper*", L"WhisperIM", IDI_WHISPERIM, JABBER_CASE, TRUE },
+ { "client_Wija", L"*wija*", L"Wija", IDI_WIJA, JABBER_CASE, TRUE },
+ { "client_Wildfire", L"Wildfire*", L"Wildfire", IDI_WILDFIRE, JABBER_CASE, TRUE },
+ { "client_WinJab", L"*WinJab*", L"WinJab", IDI_WINJAB, JABBER_CASE, TRUE },
+ { "client_Xiffian", L"*Xiffian*", L"Xiffian", IDI_XIFFIAN, JABBER_CASE, TRUE },
+ { "client_Yambi", L"*Yambi*", L"Yambi", IDI_YAMBI, JABBER_CASE, TRUE },
+ { "client_chat_bots", L"*chat*bot*", L"chat bot", IDI_CHAT_BOT, JABBER_CASE, TRUE },
+ { "client_dziObber", L"*dzi?bber*", L"dziObber", IDI_DZIOBBER, JABBER_CASE, TRUE },
+ { "client_ejabberd", L"*ejabberd*", L"ejabberd", IDI_EJABBERD, JABBER_CASE, TRUE },
+ { "client_emite", L"*emite*", L"emite", IDI_EMITE, JABBER_CASE, TRUE },
+ { "client_gYaber", L"gYaber*", L"gYaber", IDI_GYABER, JABBER_CASE, TRUE },
+ { "client_glu", L"*glu*", L"glu", IDI_GLU, JABBER_CASE, TRUE },
+ { "client_iGoogle", L"iGoogle*", L"iGoogle", IDI_IGOOGLE, JABBER_CASE, TRUE },
+ { "client_iJab", L"*iJab*", L"iJab", IDI_IJAB, JABBER_CASE, TRUE },
+ { "client_iMeem", L"iMeem*", L"iMeem", IDI_IMEEM, JABBER_CASE, TRUE },
+ { "client_iMov", L"*imov*", L"iMov", IDI_IMOV, JABBER_CASE, TRUE },
+ { "client_jTalk", L"|*jTalk*|http://jtalk*", L"jTalk", IDI_JTALK, JABBER_CASE, TRUE },
+ { "client_jTalkmod", L"|*jTalkmod*"
+ L"|*glSvJ3yM3M2f53oregNy6fYwocY=*"
+ L"|*XEssZlSs8oF4EcTHU1b8BsVxcPg=*", L"jTalkmod", IDI_JTALKMOD, JABBER_CASE, TRUE },
+ { "client_jabberDisk", L"|*jdisk*|*jabber*Disk*", L"jabberDisk", IDI_JABBER_DISK, JABBER_CASE, TRUE },
+ { "client_jabbim", L"*jabbim*", L"Jabbim", IDI_JABBIM, JABBER_CASE, TRUE },
+ { "client_jabiru", L"*jabiru*", L"Jabiru", IDI_JABIRU, JABBER_CASE, TRUE },
+ { "client_jappix", L"*jappix*", L"jappix", IDI_JAPPIX, JABBER_CASE, TRUE },
+ { "client_jrudevels", L"*jrudevels*", L"Jrudevels", IDI_JRUDEVELS, JABBER_CASE, TRUE },
+ { "client_juick", L"*juick*", L"Juick", IDI_JUICK, JABBER_CASE, TRUE },
+ { "client_kf", L"|^*smack*|*kf*", L"kf jabber", IDI_KF, JABBER_CASE, TRUE },
+ { "client_laffer", L"*laffer*", L"Laffer", IDI_LAFFER, JABBER_CASE, TRUE },
+ { "client_mJabber", L"*mJabber*", L"mJabber", IDI_MJABBER, JABBER_CASE, TRUE },
+ { "client_meinvz", L"*meinvz*", L"MeinVZ", IDI_MEINVZ, JABBER_CASE, TRUE },
+ { "client_moJab", L"*moJab*", L"moJab", IDI_MOJAB, JABBER_CASE, TRUE },
+ { "client_mobber", L"*mobber*", L"mobber", IDI_MOBBER, JABBER_CASE, TRUE },
+ { "client_myJabber", L"*myJabber*", L"myJabber", IDI_MYJABBER, JABBER_CASE, TRUE },
+ { "client_orkut", L"*orkut*", L"orkut", IDI_ORKUT, JABBER_CASE, TRUE },
+ { "client_pjc", L"|*PJC*|*pjc.googlecode.com*", LPGENT("PHP Jabber Client"), IDI_PJC, JABBER_CASE, TRUE },
+ { "client_saje", L"*saje*", L"saje", IDI_SAJE, JABBER_CASE, TRUE },
+ { "client_schuelervz", L"*schuelervz*", L"SchulerVZ", IDI_SCHULERVZ, JABBER_CASE, TRUE },
+ { "client_studivz", L"*studivz*", L"StudiVZ", IDI_STUDIVZ, JABBER_CASE, TRUE },
+ { "client_tkchat", L"*tkchat*", L"tkchat", IDI_TKCHAT, JABBER_CASE, TRUE },
+ // {"client_uJabber", L"*uJabber*", L"uJabber", IDI_UJABBER, JABBER_CASE, TRUE },
+ { "client_uKeeper", L"*uKeeper*", L"uKeeper", IDI_UKEEPER, JABBER_CASE, TRUE },
+ { "client_whoisbot", L"whoisbot", L"Swissjabber Whois Bot", IDI_WHOISBOT, JABBER_CASE, TRUE },
+ { "client_xeus2", L"*xeus 2*", L"xeus 2", IDI_XEUS2, JABBER_CASE, TRUE },
+ { "client_xeus", L"*xeus*", L"xeus", IDI_XEUS, JABBER_CASE, TRUE },
+ { "client_yaonline", L"|*yandex*|*yaonline*"
+ L"|*Я.Онлайн*|*ЯндекÑ*", L"Ya.Online", IDI_YAONLINE, JABBER_CASE, TRUE },
+ { "client_yaxim", L"*yaxim*", L"yaxim", IDI_YAXIM, JABBER_CASE, TRUE },
//#########################################################################################################################################################################
//################################# IRC ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_AmIRC", _T("*AmIRC*"), _T("AmIRC"), IDI_AMIRC, IRC_CASE, TRUE },
- { "client_Babbel", _T("*Babbel*"), _T("Babbel"), IDI_BABBEL, IRC_CASE, TRUE },
- { "client_BersIRC", _T("*BersIRC*"), _T("BersIRC"), IDI_BERSIRC, IRC_CASE, TRUE },
- { "client_ChatZilla", _T("*ChatZilla*"), _T("ChatZilla"), IDI_CHATZILLA, IRC_CASE, TRUE },
- { "client_Conversation", _T("*Conversation*"), _T("Conversation"), IDI_CONVERSATION, IRC_CASE, TRUE },
- { "client_Eggdrop", _T("*Eggdrop*"), _T("Eggdrop"), IDI_EGGDROP, IRC_CASE, TRUE },
- { "client_EggdropRacBot", _T("*Eggdrop*RacBot*"), _T("Eggdrop RacBot"), IDI_EGGDROP_RACBOT, IRC_CASE, TRUE },
- { "client_FChat", _T("*FChat*"), _T("FChat"), IDI_FCHAT, IRC_CASE, TRUE },
- { "client_GDPChat", _T("*GDPChat*"), _T("GDP Web Chat"), IDI_GDPCHAT, IRC_CASE, TRUE },
- { "client_GoPowerTools", _T("*Go*PowerTools*"), _T("GoPowerTools"), IDI_GOPOWERTOOLS, IRC_CASE, TRUE },
- { "client_HydraIRC", _T("*Hydra*IRC*"), _T("HydraIRC"), IDI_HYDRA_IRC, IRC_CASE, TRUE },
- { "client_IRCXpro", _T("*IRCXpro*"), _T("IRCXpro"), IDI_IRCXPRO, IRC_CASE, TRUE },
- { "client_IceChat", _T("*Ice*Chat*"), _T("IceChat"), IDI_ICECHAT, IRC_CASE, TRUE },
- { "client_KSirc", _T("*ksirk*"), _T("KSirc"), IDI_KSIRC, IRC_CASE, TRUE },
- { "client_KVIrc", _T("*KVIrc*"), _T("KVIrc"), IDI_KVIRC, IRC_CASE, TRUE },
- { "client_Klient", _T("*Klient*"), _T("Klient"), IDI_KLIENT, IRC_CASE, TRUE },
- { "client_Konversation", _T("*Konversation*"), _T("Konversation"), IDI_KONVERSATION, IRC_CASE, TRUE },
- { "client_MP3Script", _T("*MP3*Script*"), LPGENT("MP3 Script for mIRC"), IDI_MP3_SCRIPT, IRC_CASE, TRUE },
- { "client_NeoRaTrion", _T("*NeoRa*Trion*"), _T("NeoRa Trion"), IDI_NEORATRION, IRC_CASE, TRUE },
- { "client_Nettalk", _T("*Nettalk*"), _T("Nettalk"), IDI_NETTALK, IRC_CASE, TRUE },
- { "client_NoNameScript", _T("*NoName*Script*"), _T("NoNameScript"), IDI_NONAME_SCRIPT, IRC_CASE, TRUE },
- { "client_Opera", _T("*Opera*"), _T("Opera"), IDI_OPERA, IRC_CASE, TRUE },
- { "client_PJIRC", _T("*PJIRC*"), _T("PJIRC"), IDI_PJIRC, IRC_CASE, TRUE },
- { "client_Pirch", _T("*Pirch*"), _T("Pirch"), IDI_PIRCH, IRC_CASE, TRUE },
- { "client_PocketIRC", _T("*Pocket*IRC*"), _T("Pocket IRC"), IDI_POCKET_IRC, IRC_CASE, TRUE },
- { "client_ProChat", _T("*Pro*Chat*"), _T("ProChat"), IDI_PROCHAT, IRC_CASE, TRUE },
- { "client_SmartIRC", _T("*Smart*IRC*"), _T("SmartIRC"), IDI_SMART_IRC, IRC_CASE, TRUE },
- { "client_Snak", _T("*Snak*"), _T("Snak"), IDI_SNAK, IRC_CASE, TRUE },
- { "client_SysReset", _T("*Sys*Reset*"), _T("SysReset"), IDI_SYSRESET, IRC_CASE, TRUE },
- { "client_VircaIRC", _T("*VircaIRC*"), _T("VircaIRC"), IDI_VIRCAIRC, IRC_CASE, TRUE },
- { "client_VisionIRC", _T("*VisionIRC*"), _T("VisionIRC"), IDI_VISIONIRC, IRC_CASE, TRUE },
- { "client_VisualIRC", _T("*VisualIRC*"), _T("VisualIRC"), IDI_VISUALIRC, IRC_CASE, TRUE },
- { "client_VortecIRC", _T("*VortecIRC*"), _T("VortecIRC"), IDI_VORTECIRC, IRC_CASE, TRUE },
- { "client_WLIrc", _T("*WLIrc*"), _T("WLIrc"), IDI_WLIRC, IRC_CASE, TRUE },
- { "client_XChatAqua", _T("*X*Chat*Aqua*"), _T("X-Chat Aqua"), IDI_XCHATAQUA, IRC_CASE, TRUE },
- { "client_XiRCON", _T("*XiRCON*"), _T("XiRCON"), IDI_XIRCON, IRC_CASE, TRUE },
- { "client_Xirc", _T("*Xirc*"), _T("Xirc"), IDI_XIRC, IRC_CASE, TRUE },
- { "client_cbirc", _T("*cbirc*"), _T("cbirc"), IDI_CBIRC, IRC_CASE, TRUE },
- { "client_dIRC", _T("*dIRC*"), _T("dIRC"), IDI_DIRC, IRC_CASE, TRUE },
-
- { "client_iroffer_dinoex", _T("*iroffer*dinoex*"), _T("iroffer dinoex"), IDI_IROFFER_DINOEX, IRC_CASE, TRUE },
- { "client_iroffer", _T("*iroffer*"), _T("iroffer"), IDI_IROFFER, IRC_CASE, TRUE },
-
- { "client_ircle", _T("*ircle*"), _T("ircle"), IDI_IRCLE, IRC_CASE, TRUE },
- { "client_jircii", _T("*jircii*"), _T("jircii"), IDI_JIRCII, IRC_CASE, TRUE },
- { "client_jmIrc", _T("*jmIrc*"), _T("jmIrc"), IDI_JMIRC, IRC_CASE, TRUE },
- { "client_mIRC", _T("*mIRC*"), _T("mIRC"), IDI_MIRC, IRC_CASE, TRUE },
- { "client_pIRC", _T("*pIRC*"), _T("pIRC"), IDI_PIRC, IRC_CASE, TRUE },
- { "client_piorun", _T("*piorun*"), _T("Piorun"), IDI_PIORUN, IRC_CASE, TRUE },
- { "client_psyBNC", _T("*psyBNC*"), _T("psyBNC"), IDI_PSYBNC, IRC_CASE, TRUE },
- { "client_savIRC", _T("*savIRC*"), _T("savIRC"), IDI_SAVIRC, IRC_CASE, TRUE },
- { "client_wmIRC", _T("*wmIRC*"), _T("wmIRC"), IDI_WMIRC, IRC_CASE, TRUE },
- { "client_xBitch", _T("*xBitch*"), _T("xBitch"), IDI_XBITCH, IRC_CASE, TRUE },
- { "client_xChat", _T("*xChat*"), _T("xChat"), IDI_XCHAT, IRC_CASE, TRUE },
- { "client_zsIRC", _T("*zsIRC*"), _T("zsIRC"), IDI_ZSIRC, IRC_CASE, TRUE },
- { "client_ZNC", _T("*ZNC*"), _T("ZNC"), IDI_ZNC, IRC_CASE, TRUE },
-
- { "client_aMule", _T("*aMule*"), _T("aMule"), IDI_AMULE, IRC_CASE, TRUE },
- { "client_eMuleMorphXT", _T("eMule*MorphXT*"), _T("eMule MorphXT"), IDI_EMULE_MORPHXT, IRC_CASE, TRUE },
- { "client_eMuleNeo", _T("eMule*Neo*"), _T("eMule Neo"), IDI_EMULE_NEO, IRC_CASE, TRUE },
- { "client_eMulePlus", _T("|eMule*plus*|eMule*+*"), _T("eMule+"), IDI_EMULE_PLUS, IRC_CASE, TRUE },
- { "client_eMuleXtreme", _T("eMule*Xtreme*"), _T("eMule Xtreme"), IDI_EMULE_XTREME, IRC_CASE, TRUE },
- { "client_eMule", _T("*eMule*"), _T("eMule"), IDI_EMULE, IRC_CASE, TRUE },
-
- { "client_IRCUnknown", _T("*IRC*"), _T("Unknown IRC client"), IDI_IRC, IRC_CASE, TRUE },
+ { "client_AmIRC", L"*AmIRC*", L"AmIRC", IDI_AMIRC, IRC_CASE, TRUE },
+ { "client_Babbel", L"*Babbel*", L"Babbel", IDI_BABBEL, IRC_CASE, TRUE },
+ { "client_BersIRC", L"*BersIRC*", L"BersIRC", IDI_BERSIRC, IRC_CASE, TRUE },
+ { "client_ChatZilla", L"*ChatZilla*", L"ChatZilla", IDI_CHATZILLA, IRC_CASE, TRUE },
+ { "client_Conversation", L"*Conversation*", L"Conversation", IDI_CONVERSATION, IRC_CASE, TRUE },
+ { "client_Eggdrop", L"*Eggdrop*", L"Eggdrop", IDI_EGGDROP, IRC_CASE, TRUE },
+ { "client_EggdropRacBot", L"*Eggdrop*RacBot*", L"Eggdrop RacBot", IDI_EGGDROP_RACBOT, IRC_CASE, TRUE },
+ { "client_FChat", L"*FChat*", L"FChat", IDI_FCHAT, IRC_CASE, TRUE },
+ { "client_GDPChat", L"*GDPChat*", L"GDP Web Chat", IDI_GDPCHAT, IRC_CASE, TRUE },
+ { "client_GoPowerTools", L"*Go*PowerTools*", L"GoPowerTools", IDI_GOPOWERTOOLS, IRC_CASE, TRUE },
+ { "client_HydraIRC", L"*Hydra*IRC*", L"HydraIRC", IDI_HYDRA_IRC, IRC_CASE, TRUE },
+ { "client_IRCXpro", L"*IRCXpro*", L"IRCXpro", IDI_IRCXPRO, IRC_CASE, TRUE },
+ { "client_IceChat", L"*Ice*Chat*", L"IceChat", IDI_ICECHAT, IRC_CASE, TRUE },
+ { "client_KSirc", L"*ksirk*", L"KSirc", IDI_KSIRC, IRC_CASE, TRUE },
+ { "client_KVIrc", L"*KVIrc*", L"KVIrc", IDI_KVIRC, IRC_CASE, TRUE },
+ { "client_Klient", L"*Klient*", L"Klient", IDI_KLIENT, IRC_CASE, TRUE },
+ { "client_Konversation", L"*Konversation*", L"Konversation", IDI_KONVERSATION, IRC_CASE, TRUE },
+ { "client_MP3Script", L"*MP3*Script*", LPGENT("MP3 Script for mIRC"), IDI_MP3_SCRIPT, IRC_CASE, TRUE },
+ { "client_NeoRaTrion", L"*NeoRa*Trion*", L"NeoRa Trion", IDI_NEORATRION, IRC_CASE, TRUE },
+ { "client_Nettalk", L"*Nettalk*", L"Nettalk", IDI_NETTALK, IRC_CASE, TRUE },
+ { "client_NoNameScript", L"*NoName*Script*", L"NoNameScript", IDI_NONAME_SCRIPT, IRC_CASE, TRUE },
+ { "client_Opera", L"*Opera*", L"Opera", IDI_OPERA, IRC_CASE, TRUE },
+ { "client_PJIRC", L"*PJIRC*", L"PJIRC", IDI_PJIRC, IRC_CASE, TRUE },
+ { "client_Pirch", L"*Pirch*", L"Pirch", IDI_PIRCH, IRC_CASE, TRUE },
+ { "client_PocketIRC", L"*Pocket*IRC*", L"Pocket IRC", IDI_POCKET_IRC, IRC_CASE, TRUE },
+ { "client_ProChat", L"*Pro*Chat*", L"ProChat", IDI_PROCHAT, IRC_CASE, TRUE },
+ { "client_SmartIRC", L"*Smart*IRC*", L"SmartIRC", IDI_SMART_IRC, IRC_CASE, TRUE },
+ { "client_Snak", L"*Snak*", L"Snak", IDI_SNAK, IRC_CASE, TRUE },
+ { "client_SysReset", L"*Sys*Reset*", L"SysReset", IDI_SYSRESET, IRC_CASE, TRUE },
+ { "client_VircaIRC", L"*VircaIRC*", L"VircaIRC", IDI_VIRCAIRC, IRC_CASE, TRUE },
+ { "client_VisionIRC", L"*VisionIRC*", L"VisionIRC", IDI_VISIONIRC, IRC_CASE, TRUE },
+ { "client_VisualIRC", L"*VisualIRC*", L"VisualIRC", IDI_VISUALIRC, IRC_CASE, TRUE },
+ { "client_VortecIRC", L"*VortecIRC*", L"VortecIRC", IDI_VORTECIRC, IRC_CASE, TRUE },
+ { "client_WLIrc", L"*WLIrc*", L"WLIrc", IDI_WLIRC, IRC_CASE, TRUE },
+ { "client_XChatAqua", L"*X*Chat*Aqua*", L"X-Chat Aqua", IDI_XCHATAQUA, IRC_CASE, TRUE },
+ { "client_XiRCON", L"*XiRCON*", L"XiRCON", IDI_XIRCON, IRC_CASE, TRUE },
+ { "client_Xirc", L"*Xirc*", L"Xirc", IDI_XIRC, IRC_CASE, TRUE },
+ { "client_cbirc", L"*cbirc*", L"cbirc", IDI_CBIRC, IRC_CASE, TRUE },
+ { "client_dIRC", L"*dIRC*", L"dIRC", IDI_DIRC, IRC_CASE, TRUE },
+
+ { "client_iroffer_dinoex", L"*iroffer*dinoex*", L"iroffer dinoex", IDI_IROFFER_DINOEX, IRC_CASE, TRUE },
+ { "client_iroffer", L"*iroffer*", L"iroffer", IDI_IROFFER, IRC_CASE, TRUE },
+
+ { "client_ircle", L"*ircle*", L"ircle", IDI_IRCLE, IRC_CASE, TRUE },
+ { "client_jircii", L"*jircii*", L"jircii", IDI_JIRCII, IRC_CASE, TRUE },
+ { "client_jmIrc", L"*jmIrc*", L"jmIrc", IDI_JMIRC, IRC_CASE, TRUE },
+ { "client_mIRC", L"*mIRC*", L"mIRC", IDI_MIRC, IRC_CASE, TRUE },
+ { "client_pIRC", L"*pIRC*", L"pIRC", IDI_PIRC, IRC_CASE, TRUE },
+ { "client_piorun", L"*piorun*", L"Piorun", IDI_PIORUN, IRC_CASE, TRUE },
+ { "client_psyBNC", L"*psyBNC*", L"psyBNC", IDI_PSYBNC, IRC_CASE, TRUE },
+ { "client_savIRC", L"*savIRC*", L"savIRC", IDI_SAVIRC, IRC_CASE, TRUE },
+ { "client_wmIRC", L"*wmIRC*", L"wmIRC", IDI_WMIRC, IRC_CASE, TRUE },
+ { "client_xBitch", L"*xBitch*", L"xBitch", IDI_XBITCH, IRC_CASE, TRUE },
+ { "client_xChat", L"*xChat*", L"xChat", IDI_XCHAT, IRC_CASE, TRUE },
+ { "client_zsIRC", L"*zsIRC*", L"zsIRC", IDI_ZSIRC, IRC_CASE, TRUE },
+ { "client_ZNC", L"*ZNC*", L"ZNC", IDI_ZNC, IRC_CASE, TRUE },
+
+ { "client_aMule", L"*aMule*", L"aMule", IDI_AMULE, IRC_CASE, TRUE },
+ { "client_eMuleMorphXT", L"eMule*MorphXT*", L"eMule MorphXT", IDI_EMULE_MORPHXT, IRC_CASE, TRUE },
+ { "client_eMuleNeo", L"eMule*Neo*", L"eMule Neo", IDI_EMULE_NEO, IRC_CASE, TRUE },
+ { "client_eMulePlus", L"|eMule*plus*|eMule*+*", L"eMule+", IDI_EMULE_PLUS, IRC_CASE, TRUE },
+ { "client_eMuleXtreme", L"eMule*Xtreme*", L"eMule Xtreme", IDI_EMULE_XTREME, IRC_CASE, TRUE },
+ { "client_eMule", L"*eMule*", L"eMule", IDI_EMULE, IRC_CASE, TRUE },
+
+ { "client_IRCUnknown", L"*IRC*", L"Unknown IRC client", IDI_IRC, IRC_CASE, TRUE },
//#########################################################################################################################################################################
//################################# AIM ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_Aim7", _T("AIM*7.*"), _T("AIM v7.x"), IDI_AIM_7, AIM_CASE, TRUE },
- { "client_Aim6", _T("AIM*6.*"), _T("AIM v6.x"), IDI_AIM_6, AIM_CASE, TRUE },
+ { "client_Aim7", L"AIM*7.*", L"AIM v7.x", IDI_AIM_7, AIM_CASE, TRUE },
+ { "client_Aim6", L"AIM*6.*", L"AIM v6.x", IDI_AIM_6, AIM_CASE, TRUE },
- { "client_AIM_Triton", _T("*AIM*Triton*"), _T("AIM Triton"), IDI_AIM_TRITON, AIM_CASE, TRUE },
- { "client_AimMac", _T("AIM*Mac*"), _T("AIM for MacOS"), IDI_AIM_MAC, AIM_CASE, TRUE },
- { "client_AimMobile", _T("|AIM*Mobile*|AIM*gprs*|Aim*sms*"), _T("AIM Mobile"), IDI_AIM_MOBILE, AIM_CASE, TRUE },
- { "client_Naim", _T("*naim*"), _T("Naim"), IDI_NAIM, AIM_CASE, TRUE },
- { "client_miniaim", _T("*miniaim*"), _T("miniaim"), IDI_MINIAIM, AIM_CASE, TRUE },
- { "client_TerraIM", _T("*Terra*"), _T("TerraIM"), IDI_TERRAIM, AIM_CASE, TRUE },
- { "client_AIM", _T("AIM*"), _T("AIM"), IDI_AIM_7, AIM_CASE, TRUE },
+ { "client_AIM_Triton", L"*AIM*Triton*", L"AIM Triton", IDI_AIM_TRITON, AIM_CASE, TRUE },
+ { "client_AimMac", L"AIM*Mac*", L"AIM for MacOS", IDI_AIM_MAC, AIM_CASE, TRUE },
+ { "client_AimMobile", L"|AIM*Mobile*|AIM*gprs*|Aim*sms*", L"AIM Mobile", IDI_AIM_MOBILE, AIM_CASE, TRUE },
+ { "client_Naim", L"*naim*", L"Naim", IDI_NAIM, AIM_CASE, TRUE },
+ { "client_miniaim", L"*miniaim*", L"miniaim", IDI_MINIAIM, AIM_CASE, TRUE },
+ { "client_TerraIM", L"*Terra*", L"TerraIM", IDI_TERRAIM, AIM_CASE, TRUE },
+ { "client_AIM", L"AIM*", L"AIM", IDI_AIM_7, AIM_CASE, TRUE },
//#########################################################################################################################################################################
//################################# MSN ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_WLM11", _T("WLM*2011*"), _T("Windows Live 11"), IDI_WLM_10, MSN_CASE, TRUE },
- { "client_WLM10", _T("WLM*2010*"), _T("Windows Live 10"), IDI_WLM_10, MSN_CASE, TRUE },
- { "client_WLM9", _T("WLM*9*"), _T("Windows Live v9.x"), IDI_WLM_9, MSN_CASE, TRUE },
- { "client_MSN8", _T("|WLM*8.*|MSN*8.*"), _T("Windows Live v8.x"), IDI_MSN_8, MSN_CASE, TRUE },
- { "client_MSN7x", _T("MSN*7.*"), _T("MSN Messenger v7.x"), IDI_MSN_7, MSN_CASE, TRUE },
- { "client_MSN6x", _T("MSN*6.*"), _T("MSN Messenger v6.x"), IDI_MSN_6, MSN_CASE, TRUE },
- { "client_MSN45", _T("MSN*4.x-5.x"), _T("MSN Messenger v4.x-5.x"), IDI_MSN_45, MSN_CASE, TRUE },
- { "client_MSN4Mac", _T("MSN*Mac*"), _T("MSN for Mac"), IDI_MSN_MAC, MSN_CASE, TRUE },
- { "client_aMSN", _T("*aMSN*"), _T("aMSN"), IDI_AMSN, MSN_CASE, TRUE },
- { "client_MSN_Web", _T("WebMessenger*"), _T("WebMessenger"), IDI_WEBMESSENGER, MSN_CASE, TRUE },
- { "client_MSN", _T("|WLM*|MSN*|Windows Live*"), _T("MSN"), IDI_MSN, MSN_CASE, TRUE },
+ { "client_WLM11", L"WLM*2011*", L"Windows Live 11", IDI_WLM_10, MSN_CASE, TRUE },
+ { "client_WLM10", L"WLM*2010*", L"Windows Live 10", IDI_WLM_10, MSN_CASE, TRUE },
+ { "client_WLM9", L"WLM*9*", L"Windows Live v9.x", IDI_WLM_9, MSN_CASE, TRUE },
+ { "client_MSN8", L"|WLM*8.*|MSN*8.*", L"Windows Live v8.x", IDI_MSN_8, MSN_CASE, TRUE },
+ { "client_MSN7x", L"MSN*7.*", L"MSN Messenger v7.x", IDI_MSN_7, MSN_CASE, TRUE },
+ { "client_MSN6x", L"MSN*6.*", L"MSN Messenger v6.x", IDI_MSN_6, MSN_CASE, TRUE },
+ { "client_MSN45", L"MSN*4.x-5.x", L"MSN Messenger v4.x-5.x", IDI_MSN_45, MSN_CASE, TRUE },
+ { "client_MSN4Mac", L"MSN*Mac*", L"MSN for Mac", IDI_MSN_MAC, MSN_CASE, TRUE },
+ { "client_aMSN", L"*aMSN*", L"aMSN", IDI_AMSN, MSN_CASE, TRUE },
+ { "client_MSN_Web", L"WebMessenger*", L"WebMessenger", IDI_WEBMESSENGER, MSN_CASE, TRUE },
+ { "client_MSN", L"|WLM*|MSN*|Windows Live*", L"MSN", IDI_MSN, MSN_CASE, TRUE },
//#########################################################################################################################################################################
//################################# MAIL.RU ###########################################################################################################################
//#########################################################################################################################################################################
- { "client_MRA_official", _T("|magent*|Mail.ru Agent*official*")
- _T("|Mail.ru Agent*PC*")
- _T("|*agent.mail.ru*"), LPGENT("Mail.Ru Agent (official)"), IDI_MAIL_RU_OFFICIAL, MRA_CASE, TRUE },
- { "client_MRA_Mobile", _T("|MobileAgent*|Mail.ru Agent*Symbian*"), _T("Mail.Ru Mobile Agent"), IDI_MAIL_RU_MOBILE, MRA_CASE, TRUE },
- { "client_MRA_web", _T("|webagent*|*Web Agent*"), _T("Mail.Ru Web Agent"), IDI_MAIL_RU_WEBAGENT, MRA_CASE, TRUE },
- { "client_MRA_unknown", _T("|Mail.ru Agent*|MRA client"), LPGENT("Mail.Ru (unknown client)"), IDI_MAIL_RU_UNKNOWN, MRA_CASE },
+ { "client_MRA_official", L"|magent*|Mail.ru Agent*official*"
+ L"|Mail.ru Agent*PC*"
+ L"|*agent.mail.ru*", LPGENT("Mail.Ru Agent (official)"), IDI_MAIL_RU_OFFICIAL, MRA_CASE, TRUE },
+ { "client_MRA_Mobile", L"|MobileAgent*|Mail.ru Agent*Symbian*", L"Mail.Ru Mobile Agent", IDI_MAIL_RU_MOBILE, MRA_CASE, TRUE },
+ { "client_MRA_web", L"|webagent*|*Web Agent*", L"Mail.Ru Web Agent", IDI_MAIL_RU_WEBAGENT, MRA_CASE, TRUE },
+ { "client_MRA_unknown", L"|Mail.ru Agent*|MRA client", LPGENT("Mail.Ru (unknown client)"), IDI_MAIL_RU_UNKNOWN, MRA_CASE },
//#########################################################################################################################################################################
//################################# YAHOO #############################################################################################################################
//#########################################################################################################################################################################
- { "client_YahGoMobile", _T("|Yahoo*Go*|Yahoo*Mobile*"), _T("Yahoo! Go Mobile"), IDI_YAHOO_GO_MOBILE, YAHOO_CASE, TRUE },
- { "client_PingBox", _T("*Yahoo*PingBox*"), _T("Yahoo PingBox"), IDI_YAHOO_PINGBOX, YAHOO_CASE, TRUE },
- { "client_YahooWeb", _T("*Yahoo*Web*Messenger"), _T("Yahoo Web Messenger"), IDI_YAHOO_WEB, YAHOO_CASE, TRUE },
- { "client_libyahoo2", _T("*libyahoo*"), _T("libyahoo2"), IDI_LIBYAHOO2, YAHOO_CASE, TRUE },
- { "client_Yahoo", _T("*Yahoo*"), _T("Yahoo Messenger"), IDI_YAHOO, YAHOO_CASE },
+ { "client_YahGoMobile", L"|Yahoo*Go*|Yahoo*Mobile*", L"Yahoo! Go Mobile", IDI_YAHOO_GO_MOBILE, YAHOO_CASE, TRUE },
+ { "client_PingBox", L"*Yahoo*PingBox*", L"Yahoo PingBox", IDI_YAHOO_PINGBOX, YAHOO_CASE, TRUE },
+ { "client_YahooWeb", L"*Yahoo*Web*Messenger", L"Yahoo Web Messenger", IDI_YAHOO_WEB, YAHOO_CASE, TRUE },
+ { "client_libyahoo2", L"*libyahoo*", L"libyahoo2", IDI_LIBYAHOO2, YAHOO_CASE, TRUE },
+ { "client_Yahoo", L"*Yahoo*", L"Yahoo Messenger", IDI_YAHOO, YAHOO_CASE },
//#########################################################################################################################################################################
//################################# WEATHER ###########################################################################################################################
//#########################################################################################################################################################################
- { "client_accu", _T("*accuweather*"), _T("AccuWeather"), IDI_ACCU, WEATHER_CASE, TRUE },
- { "client_gismeteo", _T("*gismeteo*"), _T("GisMeteo"), IDI_GISMETEO, WEATHER_CASE, TRUE },
- { "client_intelli", _T("*intellicast*"), _T("Intellicast"), IDI_INTELLI, WEATHER_CASE, TRUE },
- { "client_meteogid", _T("|*meteo-gid*|*meteogid*"), _T("Meteo-Gid"), IDI_METEOGID, WEATHER_CASE, TRUE },
- { "client_meteonovosti", _T("*meteonovosti*"), _T("Meteonovosti"), IDI_METEONOVOSTI, WEATHER_CASE, TRUE },
- { "client_noaa", _T("*noaa*"), _T("NOAA Weather"), IDI_NOAA, WEATHER_CASE, TRUE },
- { "client_real", _T("*realmeteo*"), _T("RealMeteo"), IDI_REALMETEO, WEATHER_CASE, TRUE },
- { "client_under", _T("Weather Underground*"), _T("Weather Underground"), IDI_UNDERGROUND, WEATHER_CASE, TRUE },
- { "client_weatherxml", _T("*WeatherXML*"), _T("WeatherXML"), IDI_WEATHERXML, WEATHER_CASE, TRUE },
- { "client_wetter", _T("*wetter*"), _T("Wetter"), IDI_WETTER, WEATHER_CASE, TRUE },
- { "client_yweather", _T("*Yahoo Weather*"), _T("Yahoo Weather"), IDI_YWEATHER, WEATHER_CASE, TRUE },
- { "client_weather_cn", _T("*weather.com.cn*"), _T("Weather CN"), IDI_WEATHER_CN, WEATHER_CASE, TRUE },
- { "client_weather", _T("*weather*"), _T("Weather"), IDI_WEATHER, WEATHER_CASE, TRUE },
+ { "client_accu", L"*accuweather*", L"AccuWeather", IDI_ACCU, WEATHER_CASE, TRUE },
+ { "client_gismeteo", L"*gismeteo*", L"GisMeteo", IDI_GISMETEO, WEATHER_CASE, TRUE },
+ { "client_intelli", L"*intellicast*", L"Intellicast", IDI_INTELLI, WEATHER_CASE, TRUE },
+ { "client_meteogid", L"|*meteo-gid*|*meteogid*", L"Meteo-Gid", IDI_METEOGID, WEATHER_CASE, TRUE },
+ { "client_meteonovosti", L"*meteonovosti*", L"Meteonovosti", IDI_METEONOVOSTI, WEATHER_CASE, TRUE },
+ { "client_noaa", L"*noaa*", L"NOAA Weather", IDI_NOAA, WEATHER_CASE, TRUE },
+ { "client_real", L"*realmeteo*", L"RealMeteo", IDI_REALMETEO, WEATHER_CASE, TRUE },
+ { "client_under", L"Weather Underground*", L"Weather Underground", IDI_UNDERGROUND, WEATHER_CASE, TRUE },
+ { "client_weatherxml", L"*WeatherXML*", L"WeatherXML", IDI_WEATHERXML, WEATHER_CASE, TRUE },
+ { "client_wetter", L"*wetter*", L"Wetter", IDI_WETTER, WEATHER_CASE, TRUE },
+ { "client_yweather", L"*Yahoo Weather*", L"Yahoo Weather", IDI_YWEATHER, WEATHER_CASE, TRUE },
+ { "client_weather_cn", L"*weather.com.cn*", L"Weather CN", IDI_WEATHER_CN, WEATHER_CASE, TRUE },
+ { "client_weather", L"*weather*", L"Weather", IDI_WEATHER, WEATHER_CASE, TRUE },
//#########################################################################################################################################################################
//################################# RSS ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_rss09x", _T("*RSS*0.9*"), _T("RSS 0.9x"), IDI_RSS09, RSS_CASE, TRUE },
- { "client_rss2", _T("*RSS*2.*"), _T("RSS 2"), IDI_RSS2, RSS_CASE, TRUE },
- { "client_rss1", _T("*RSS*1.*"), _T("RSS 1"), IDI_RSS1, RSS_CASE, TRUE },
- { "client_atom3", _T("*Atom*3*"), _T("Atom 3"), IDI_ATOM3, RSS_CASE, TRUE },
- { "client_atom1", _T("*Atom*1*"), _T("Atom 1"), IDI_ATOM1, RSS_CASE, TRUE },
+ { "client_rss09x", L"*RSS*0.9*", L"RSS 0.9x", IDI_RSS09, RSS_CASE, TRUE },
+ { "client_rss2", L"*RSS*2.*", L"RSS 2", IDI_RSS2, RSS_CASE, TRUE },
+ { "client_rss1", L"*RSS*1.*", L"RSS 1", IDI_RSS1, RSS_CASE, TRUE },
+ { "client_atom3", L"*Atom*3*", L"Atom 3", IDI_ATOM3, RSS_CASE, TRUE },
+ { "client_atom1", L"*Atom*1*", L"Atom 1", IDI_ATOM1, RSS_CASE, TRUE },
//#########################################################################################################################################################################
//################################# QQ ###############################################################################################################################
//#########################################################################################################################################################################
- { "client_MobileQQ", _T("|Mobile*QQ*|iPhone*QQ*|QQ WAP*"), _T("Mobile QQ"), IDI_MOBILEQQ, QQ_CASE, TRUE },
- { "client_QQConcept", _T("QQ*Concept*"), _T("QQ Concept"), IDI_QQCONCEPT, QQ_CASE, TRUE },
- { "client_QQCRM", _T("QQ*CRM*"), _T("QQ CRM"), IDI_QQCRM, QQ_CASE, TRUE },
- { "client_QQSilver", _T("QQ*Silverlight*"), _T("QQ Silverlight"), IDI_QQSILVER, QQ_CASE, TRUE },
- { "client_TM2008", _T("|TM2008*|TM2009*|TM2010*"), LPGENT("TM 2008 and >"), IDI_TM2008, QQ_CASE },
- { "client_TM", _T("TM*"), _T("TM"), IDI_TM, QQ_CASE },
- { "client_QQInt", _T("QQ*International*"), _T("QQ International"), IDI_QQINT, QQ_CASE },
- { "client_YamQQ", _T("YamQQ*"), _T("Yam QQ"), IDI_YAMQQ, QQ_CASE },
- { "client_WebQQ", _T("WebQQ*"), _T("WebQQ"), IDI_WEBQQ, QQ_CASE },
- { "client_QQ", _T("QQ*"), _T("QQ"), IDI_QQ, QQ_CASE },
+ { "client_MobileQQ", L"|Mobile*QQ*|iPhone*QQ*|QQ WAP*", L"Mobile QQ", IDI_MOBILEQQ, QQ_CASE, TRUE },
+ { "client_QQConcept", L"QQ*Concept*", L"QQ Concept", IDI_QQCONCEPT, QQ_CASE, TRUE },
+ { "client_QQCRM", L"QQ*CRM*", L"QQ CRM", IDI_QQCRM, QQ_CASE, TRUE },
+ { "client_QQSilver", L"QQ*Silverlight*", L"QQ Silverlight", IDI_QQSILVER, QQ_CASE, TRUE },
+ { "client_TM2008", L"|TM2008*|TM2009*|TM2010*", LPGENT("TM 2008 and >"), IDI_TM2008, QQ_CASE },
+ { "client_TM", L"TM*", L"TM", IDI_TM, QQ_CASE },
+ { "client_QQInt", L"QQ*International*", L"QQ International", IDI_QQINT, QQ_CASE },
+ { "client_YamQQ", L"YamQQ*", L"Yam QQ", IDI_YAMQQ, QQ_CASE },
+ { "client_WebQQ", L"WebQQ*", L"WebQQ", IDI_WEBQQ, QQ_CASE },
+ { "client_QQ", L"QQ*", L"QQ", IDI_QQ, QQ_CASE },
//#########################################################################################################################################################################
//################################# GADU-GADU #########################################################################################################################
//#########################################################################################################################################################################
- { "client_GG", _T("|Gadu-Gadu*|GG*"), LPGENT("Gadu-Gadu client"), IDI_GG, GG_CASE },
+ { "client_GG", L"|Gadu-Gadu*|GG*", LPGENT("Gadu-Gadu client"), IDI_GG, GG_CASE },
//#########################################################################################################################################################################
//################################# TLEN ##############################################################################################################################
//#########################################################################################################################################################################
- { "client_Tlen", _T("*Tlen*"), LPGENT("Tlen.pl client"), IDI_TLEN, TLEN_CASE },
+ { "client_Tlen", L"*Tlen*", LPGENT("Tlen.pl client"), IDI_TLEN, TLEN_CASE },
//#########################################################################################################################################################################
//################################# Facebook ##########################################################################################################################
//#########################################################################################################################################################################
- { "client_Facebook_other", _T("*Facebook*other*"), _T("Facebook (other)"), IDI_FACEBOOK_OTHER, FACEBOOK_CASE },
- { "client_Facebook_app", _T("*Facebook*App*"), _T("Facebook App"), IDI_FACEBOOK_APP, FACEBOOK_CASE },
- { "client_Facebook_mess", _T("*Facebook*Messenger*"), _T("Facebook Messenger"), IDI_FACEBOOK_MESSENGER, FACEBOOK_CASE },
- { "client_Facebook", _T("*Facebook*"), _T("Facebook"), IDI_FACEBOOK, FACEBOOK_CASE },
+ { "client_Facebook_other", L"*Facebook*other*", L"Facebook (other)", IDI_FACEBOOK_OTHER, FACEBOOK_CASE },
+ { "client_Facebook_app", L"*Facebook*App*", L"Facebook App", IDI_FACEBOOK_APP, FACEBOOK_CASE },
+ { "client_Facebook_mess", L"*Facebook*Messenger*", L"Facebook Messenger", IDI_FACEBOOK_MESSENGER, FACEBOOK_CASE },
+ { "client_Facebook", L"*Facebook*", L"Facebook", IDI_FACEBOOK, FACEBOOK_CASE },
//#########################################################################################################################################################################
//################################# VKontakte #########################################################################################################################
//#########################################################################################################################################################################
- { "client_VK", _T("|*VKontakte*|*vk.com*"), _T("VKontakte"), IDI_VK, VK_CASE },
- { "client_VK_Kate", _T("*Kate*Mobile*"), _T("Kate Mobile"), IDI_VK_KATE, VK_CASE },
+ { "client_VK", L"|*VKontakte*|*vk.com*", L"VKontakte", IDI_VK, VK_CASE },
+ { "client_VK_Kate", L"*Kate*Mobile*", L"Kate Mobile", IDI_VK_KATE, VK_CASE },
//#########################################################################################################################################################################
//################################# OTHER CLIENTS #####################################################################################################################
//#########################################################################################################################################################################
- { "client_Android", _T("Android*"), _T("Android"), IDI_ANDROID, MULTI_CASE, TRUE },
+ { "client_Android", L"Android*", L"Android", IDI_ANDROID, MULTI_CASE, TRUE },
- { "client_Pidgin", _T("|*Pidgin*|*libpurple*|Purple*"), _T("Pidgin (libpurple)"), IDI_PIDGIN, MULTI_CASE },
+ { "client_Pidgin", L"|*Pidgin*|*libpurple*|Purple*", L"Pidgin (libpurple)", IDI_PIDGIN, MULTI_CASE },
- { "client_Python", _T("|*Python*|Py*|*ταλιςμαη*"), LPGENT("Python-based clients"), IDI_PYTHON, MULTI_CASE },
+ { "client_Python", L"|*Python*|Py*|*ταλιςμαη*", LPGENT("Python-based clients"), IDI_PYTHON, MULTI_CASE },
- { "client_Jabber", _T("*Jabber*client*"), LPGENT("Jabber client"), IDI_JABBER, JABBER_CASE, TRUE },
+ { "client_Jabber", L"*Jabber*client*", LPGENT("Jabber client"), IDI_JABBER, JABBER_CASE, TRUE },
- { "client_XMPP", _T("|*XMPP*|Mrim*|*DRQZ00fz5WPn1gH+*"), LPGENT("XMPP client"), IDI_XMPP, JABBER_CASE },
+ { "client_XMPP", L"|*XMPP*|Mrim*|*DRQZ00fz5WPn1gH+*", LPGENT("XMPP client"), IDI_XMPP, JABBER_CASE },
- { "client_Hangouts", _T("messaging-*"), _T("Google+ Hangouts"), IDI_HANGOUTS, OTHER_PROTOS_CASE, TRUE },
+ { "client_Hangouts", L"messaging-*", L"Google+ Hangouts", IDI_HANGOUTS, OTHER_PROTOS_CASE, TRUE },
- { "client_WhatsApp", _T("*WhatsApp*"), _T("WhatsApp"), IDI_WHATSAPP, OTHER_PROTOS_CASE, TRUE },
+ { "client_WhatsApp", L"*WhatsApp*", L"WhatsApp", IDI_WHATSAPP, OTHER_PROTOS_CASE, TRUE },
- { "client_Twitter", _T("*Twitter*"), _T("Twitter"), IDI_TWITTER, OTHER_PROTOS_CASE, TRUE },
+ { "client_Twitter", L"*Twitter*", L"Twitter", IDI_TWITTER, OTHER_PROTOS_CASE, TRUE },
- { "client_Skype", _T("*Skype**"), _T("Skype"), IDI_SKYPE, OTHER_PROTOS_CASE },
+ { "client_Skype", L"*Skype**", L"Skype", IDI_SKYPE, OTHER_PROTOS_CASE },
- { "client_Steam", _T("*Steam*"), _T("Steam"), IDI_STEAM, OTHER_PROTOS_CASE },
+ { "client_Steam", L"*Steam*", L"Steam", IDI_STEAM, OTHER_PROTOS_CASE },
//#########################################################################################################################################################################
//################################# UNDEFINED CLIENTS #################################################################################################################
//#########################################################################################################################################################################
- { "client_Notfound", _T("Notfound"), LPGENT("Client not found"), IDI_NOTFOUND, OTHERS_CASE, TRUE },
- { "client_Unknown", _T("|*Unknown*|..."), LPGENT("Unknown client"), IDI_UNKNOWN, OTHERS_CASE, TRUE },
- { "client_Undetected", _T("?*"), LPGENT("Undetected client"), IDI_UNDETECTED, OTHERS_CASE, TRUE },
+ { "client_Notfound", L"Notfound", LPGENT("Client not found"), IDI_NOTFOUND, OTHERS_CASE, TRUE },
+ { "client_Unknown", L"|*Unknown*|...", LPGENT("Unknown client"), IDI_UNKNOWN, OTHERS_CASE, TRUE },
+ { "client_Undetected", L"?*", LPGENT("Undetected client"), IDI_UNDETECTED, OTHERS_CASE, TRUE },
};
@@ -640,124 +640,124 @@ int DEFAULT_KN_FP_MASK_COUNT = _countof(def_kn_fp_mask); //#########################################################################################################################################################################
KN_FP_MASK def_kn_fp_overlays_mask[] =
-{// {"Client_IconName", _T("|^*Mask*|*names*"), _T("Icon caption"), IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
+{// {"Client_IconName", L"|^*Mask*|*names*", L"Icon caption", IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
//#########################################################################################################################################################################
//################################# MIRANDA PACKS OVERLAYS ############################################################################################################
//#########################################################################################################################################################################
- { "client_AF_pack", _T("*AF*Pack*"), _T("AF"), IDI_MIRANDA_AF, MIRANDA_PACKS_CASE },
- { "client_AlfaMaR_pack", _T("*AlfaMaR*"), _T("AlfaMaR"), IDI_MIRANDA_ALFAMAR, MIRANDA_PACKS_CASE },
- { "client_Amatory_pack", _T("*Amatory*"), _T("Amatory"), IDI_MIRANDA_AMATORY, MIRANDA_PACKS_CASE },
- { "client_BRI_pack", _T("*bri*edition*"), _T("Bri edition"), IDI_MIRANDA_BRI, MIRANDA_PACKS_CASE },
- { "client_Devil_pack", _T("*6.6.6*"), _T("Devil Suite"), IDI_MIRANDA_DEVIL, MIRANDA_PACKS_CASE },
- { "client_E33_pack", _T("*[E33*]*"), _T("E33"), IDI_MIRANDA_E33, MIRANDA_PACKS_CASE },
- { "client_FR_pack", _T("*FR*Pack*"), _T("Miranda FR"), IDI_MIRANDA_FR, MIRANDA_PACKS_CASE },
- { "client_Faith_pack", _T("*Faith*Pack*"), _T("FaithPack"), IDI_MIRANDA_FAITH, MIRANDA_PACKS_CASE },
- { "client_Final_pack", _T("*[Final*Pack]*"), _T("Final pack"), IDI_MIRANDA_FINAL, MIRANDA_PACKS_CASE },
- { "client_Freize_pack", _T("*Freize*"), _T("Freize"), IDI_MIRANDA_FREIZE, MIRANDA_PACKS_CASE },
- { "client_Ghost_pack", _T("*Ghost's*"), _T("Ghost's pack"), IDI_MIRANDA_GHOST, MIRANDA_PACKS_CASE },
- { "client_HotCoffee_pack", _T("*HotCoffee*"), _T("HotCoffee"), IDI_MIRANDA_CAPPUCCINO, MIRANDA_PACKS_CASE },
- { "client_HierOS_pack", _T("*HierOS*"), _T("HierOS"), IDI_MIRANDA_HIEROS, MIRANDA_PACKS_CASE },
- { "client_ICE_pack", _T("|*miranda*[ice*]|*induction*"), _T("iCE / Induction"), IDI_MIRANDA_INDUCTION, MIRANDA_PACKS_CASE },
- { "client_KDL_pack", _T("|*KDL*|*КДЛ*"), _T("KDL"), IDI_MIRANDA_KDL, MIRANDA_PACKS_CASE },
- { "client_Kolich_pack", _T("*Kolich*"), _T("Kolich"), IDI_MIRANDA_KOLICH, MIRANDA_PACKS_CASE },
- { "client_Kuzzman_pack", _T("*kuzzman*"), _T("Kuzzman"), IDI_MIRANDA_KUZZMAN, MIRANDA_PACKS_CASE },
- { "client_Lenin_pack", _T("*[Lenin*]*"), _T("Lenin pack"), IDI_MIRANDA_LENINPACK, MIRANDA_PACKS_CASE },
- { "client_Lestat_pack", _T("*[Lpack*]*"), _T("Lestat pack"), IDI_MIRANDA_LESTAT, MIRANDA_PACKS_CASE },
- { "client_LexSys_pack", _T("|*Miranda*LS*|*LexSys*"), _T("LexSys"), IDI_MIRANDA_LEXSYS, MIRANDA_PACKS_CASE },
- { "client_MD_pack", _T("*MDpack*"), _T("MDpack"), IDI_MIRANDA_MD, MIRANDA_PACKS_CASE },
- { "client_Mataes_pack", _T("*Mataes*"), _T("Mataes pack"), IDI_MIRANDA_MATAES, MIRANDA_PACKS_CASE },
- { "client_Mir_ME_pack", _T("*[Miranda*ME]*"), _T("Miranda ME"), IDI_MIRANDA_ME, MIRANDA_PACKS_CASE },
- { "client_Native_pack", _T("*Native*"), _T("Native"), IDI_MIRANDA_NATIVE, MIRANDA_PACKS_CASE },
- { "client_New_Style_pack", _T("*New*Style*"), _T("New Style"), IDI_MIRANDA_NEW_STYLE, MIRANDA_PACKS_CASE },
- { "client_Pilot_pack", _T("*Pilot*"), _T("Pilot"), IDI_MIRANDA_PILOT, MIRANDA_PACKS_CASE },
- { "client_Razunter_pack", _T("*Razunter*"), _T("Razunter's Pk"), IDI_MIRANDA_RAZUNTER, MIRANDA_PACKS_CASE },
- { "client_Robyer_pack", _T("*Robyer*Pack*"), _T("Robyer pack"), IDI_MIRANDA_ROBYER, MIRANDA_PACKS_CASE },
- { "client_SSS_pack", _T("*sss*pack*"), _T("SSS build"), IDI_MIRANDA_SSS_MOD, MIRANDA_PACKS_CASE },
- { "client_Se7ven_pack", _T("|^*sss*|*[S7*pack]*|*[*S7*]*"), _T("Se7ven"), IDI_MIRANDA_SE7VEN, MIRANDA_PACKS_CASE },
- { "client_SpellhowleR_pack", _T("*Spellhowler*"), _T("xSpellhowleRx pack"), IDI_MIRANDA_SPELLHOWLER, MIRANDA_PACKS_CASE },
- { "client_Stalker_pack", _T("*Stalker*"), _T("Stalker"), IDI_MIRANDA_STALKER, MIRANDA_PACKS_CASE },
- { "client_Tweety_pack", _T("*tweety*"), _T("Tweety"), IDI_MIRANDA_TWEETY, MIRANDA_PACKS_CASE },
- { "client_Umedon_pack", _T("*Miranda*Umedon*"), _T("Umedon"), IDI_MIRANDA_UMEDON, MIRANDA_PACKS_CASE },
- { "client_ValeraVi_pack", _T("*Valera*Vi*"), _T("ValeraVi"), IDI_MIRANDA_VALERAVI, MIRANDA_PACKS_CASE },
- { "client_Watcher_pack", _T("*Watcher*"), _T("Watcher pack"), IDI_MIRANDA_WATCHER, MIRANDA_PACKS_CASE },
- { "client_YAOL_pack", _T("*yaol*"), _T("YAOL"), IDI_MIRANDA_YAOL, MIRANDA_PACKS_CASE },
- { "client_dar_veter_pack", _T("*Dar*veter*"), _T("Dar_veter pack"), IDI_MIRANDA_DAR, MIRANDA_PACKS_CASE },
- { "client_dmikos_pack", _T("*dmikos*"), _T("Dmikos"), IDI_MIRANDA_DMIKOS, MIRANDA_PACKS_CASE },
- { "client_zeleboba_pack", _T("*zeleboba*"), _T("zeleboba's"), IDI_MIRANDA_ZELEBOBA, MIRANDA_PACKS_CASE },
+ { "client_AF_pack", L"*AF*Pack*", L"AF", IDI_MIRANDA_AF, MIRANDA_PACKS_CASE },
+ { "client_AlfaMaR_pack", L"*AlfaMaR*", L"AlfaMaR", IDI_MIRANDA_ALFAMAR, MIRANDA_PACKS_CASE },
+ { "client_Amatory_pack", L"*Amatory*", L"Amatory", IDI_MIRANDA_AMATORY, MIRANDA_PACKS_CASE },
+ { "client_BRI_pack", L"*bri*edition*", L"Bri edition", IDI_MIRANDA_BRI, MIRANDA_PACKS_CASE },
+ { "client_Devil_pack", L"*6.6.6*", L"Devil Suite", IDI_MIRANDA_DEVIL, MIRANDA_PACKS_CASE },
+ { "client_E33_pack", L"*[E33*]*", L"E33", IDI_MIRANDA_E33, MIRANDA_PACKS_CASE },
+ { "client_FR_pack", L"*FR*Pack*", L"Miranda FR", IDI_MIRANDA_FR, MIRANDA_PACKS_CASE },
+ { "client_Faith_pack", L"*Faith*Pack*", L"FaithPack", IDI_MIRANDA_FAITH, MIRANDA_PACKS_CASE },
+ { "client_Final_pack", L"*[Final*Pack]*", L"Final pack", IDI_MIRANDA_FINAL, MIRANDA_PACKS_CASE },
+ { "client_Freize_pack", L"*Freize*", L"Freize", IDI_MIRANDA_FREIZE, MIRANDA_PACKS_CASE },
+ { "client_Ghost_pack", L"*Ghost's*", L"Ghost's pack", IDI_MIRANDA_GHOST, MIRANDA_PACKS_CASE },
+ { "client_HotCoffee_pack", L"*HotCoffee*", L"HotCoffee", IDI_MIRANDA_CAPPUCCINO, MIRANDA_PACKS_CASE },
+ { "client_HierOS_pack", L"*HierOS*", L"HierOS", IDI_MIRANDA_HIEROS, MIRANDA_PACKS_CASE },
+ { "client_ICE_pack", L"|*miranda*[ice*]|*induction*", L"iCE / Induction", IDI_MIRANDA_INDUCTION, MIRANDA_PACKS_CASE },
+ { "client_KDL_pack", L"|*KDL*|*КДЛ*", L"KDL", IDI_MIRANDA_KDL, MIRANDA_PACKS_CASE },
+ { "client_Kolich_pack", L"*Kolich*", L"Kolich", IDI_MIRANDA_KOLICH, MIRANDA_PACKS_CASE },
+ { "client_Kuzzman_pack", L"*kuzzman*", L"Kuzzman", IDI_MIRANDA_KUZZMAN, MIRANDA_PACKS_CASE },
+ { "client_Lenin_pack", L"*[Lenin*]*", L"Lenin pack", IDI_MIRANDA_LENINPACK, MIRANDA_PACKS_CASE },
+ { "client_Lestat_pack", L"*[Lpack*]*", L"Lestat pack", IDI_MIRANDA_LESTAT, MIRANDA_PACKS_CASE },
+ { "client_LexSys_pack", L"|*Miranda*LS*|*LexSys*", L"LexSys", IDI_MIRANDA_LEXSYS, MIRANDA_PACKS_CASE },
+ { "client_MD_pack", L"*MDpack*", L"MDpack", IDI_MIRANDA_MD, MIRANDA_PACKS_CASE },
+ { "client_Mataes_pack", L"*Mataes*", L"Mataes pack", IDI_MIRANDA_MATAES, MIRANDA_PACKS_CASE },
+ { "client_Mir_ME_pack", L"*[Miranda*ME]*", L"Miranda ME", IDI_MIRANDA_ME, MIRANDA_PACKS_CASE },
+ { "client_Native_pack", L"*Native*", L"Native", IDI_MIRANDA_NATIVE, MIRANDA_PACKS_CASE },
+ { "client_New_Style_pack", L"*New*Style*", L"New Style", IDI_MIRANDA_NEW_STYLE, MIRANDA_PACKS_CASE },
+ { "client_Pilot_pack", L"*Pilot*", L"Pilot", IDI_MIRANDA_PILOT, MIRANDA_PACKS_CASE },
+ { "client_Razunter_pack", L"*Razunter*", L"Razunter's Pk", IDI_MIRANDA_RAZUNTER, MIRANDA_PACKS_CASE },
+ { "client_Robyer_pack", L"*Robyer*Pack*", L"Robyer pack", IDI_MIRANDA_ROBYER, MIRANDA_PACKS_CASE },
+ { "client_SSS_pack", L"*sss*pack*", L"SSS build", IDI_MIRANDA_SSS_MOD, MIRANDA_PACKS_CASE },
+ { "client_Se7ven_pack", L"|^*sss*|*[S7*pack]*|*[*S7*]*", L"Se7ven", IDI_MIRANDA_SE7VEN, MIRANDA_PACKS_CASE },
+ { "client_SpellhowleR_pack", L"*Spellhowler*", L"xSpellhowleRx pack", IDI_MIRANDA_SPELLHOWLER, MIRANDA_PACKS_CASE },
+ { "client_Stalker_pack", L"*Stalker*", L"Stalker", IDI_MIRANDA_STALKER, MIRANDA_PACKS_CASE },
+ { "client_Tweety_pack", L"*tweety*", L"Tweety", IDI_MIRANDA_TWEETY, MIRANDA_PACKS_CASE },
+ { "client_Umedon_pack", L"*Miranda*Umedon*", L"Umedon", IDI_MIRANDA_UMEDON, MIRANDA_PACKS_CASE },
+ { "client_ValeraVi_pack", L"*Valera*Vi*", L"ValeraVi", IDI_MIRANDA_VALERAVI, MIRANDA_PACKS_CASE },
+ { "client_Watcher_pack", L"*Watcher*", L"Watcher pack", IDI_MIRANDA_WATCHER, MIRANDA_PACKS_CASE },
+ { "client_YAOL_pack", L"*yaol*", L"YAOL", IDI_MIRANDA_YAOL, MIRANDA_PACKS_CASE },
+ { "client_dar_veter_pack", L"*Dar*veter*", L"Dar_veter pack", IDI_MIRANDA_DAR, MIRANDA_PACKS_CASE },
+ { "client_dmikos_pack", L"*dmikos*", L"Dmikos", IDI_MIRANDA_DMIKOS, MIRANDA_PACKS_CASE },
+ { "client_zeleboba_pack", L"*zeleboba*", L"zeleboba's", IDI_MIRANDA_ZELEBOBA, MIRANDA_PACKS_CASE },
//#########################################################################################################################################################################
//################################# PROTO OVERLAYS ####################################################################################################################
//#########################################################################################################################################################################
- { "client_AIM_overlay", _T("|^AIM*|*AIM*"), LPGENT("AIM overlay"), IDI_AIM_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_ICQJ_Plus_over", _T("*ICQ*Plus*"), LPGENT("ICQJ Plus Mod overlay"), IDI_ICQJ_PLUS_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_ICQJ_overlay", _T("|^ICQ|^ICQ*|*ICQ*|MRA client"), LPGENT("ICQJ overlay"), IDI_ICQJ_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_IRC_overlay", _T("|^IRC*|Miranda*IRC*"), LPGENT("IRC overlay"), IDI_IRC_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_JGmail_overlay", _T("*JGmail*"), LPGENT("JGmail overlay"), IDI_GMAIL_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_JGTalk_overlay", _T("*JGTalk*"), LPGENT("JGTalk overlay"), IDI_JGTALK_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_Jabber_overlay", _T("|^jabber*|Miranda*Jabber*|py*jabb*"), LPGENT("Jabber overlay"), IDI_JABBER_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_MSN_overlay", _T("|^MSN*|*Miranda*MSN*"), LPGENT("MSN overlay"), IDI_MSN_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_QQ_overlay", _T("|Miranda*QQ*|MIM*QQ*"), LPGENT("QQ overlay"), IDI_QQ_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_Tlen_overlay", _T("|^tlen*|*tlen*"), LPGENT("Tlen.pl overlay"), IDI_TLEN_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_Yahoo_overlay", _T("|^Yahoo*|*yahoo*"), LPGENT("Yahoo overlay"), IDI_YAHOO_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_MRA_overlay", _T("|^MRA*|^Mail.ru*")
- _T("|*MRA*|*Mail.ru*IM*|Mrim*")
- _T("|*DRQZ00fz5WPn1gH+*|*nxthUwJANorB6+*|ICQ client"), LPGENT("Mail.Ru Agent overlay"), IDI_MAILRU_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_VK_overlay", _T("|Miranda*VKontakte*"), LPGENT("VK overlay"), IDI_VK_OVERLAY, OVERLAYS_PROTO_CASE },
- { "client_Skype_overlay", _T("|Miranda*Skype*"), LPGENT("Skype overlay"), IDI_SKYPE_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_AIM_overlay", L"|^AIM*|*AIM*", LPGENT("AIM overlay"), IDI_AIM_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_ICQJ_Plus_over", L"*ICQ*Plus*", LPGENT("ICQJ Plus Mod overlay"), IDI_ICQJ_PLUS_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_ICQJ_overlay", L"|^ICQ|^ICQ*|*ICQ*|MRA client", LPGENT("ICQJ overlay"), IDI_ICQJ_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_IRC_overlay", L"|^IRC*|Miranda*IRC*", LPGENT("IRC overlay"), IDI_IRC_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_JGmail_overlay", L"*JGmail*", LPGENT("JGmail overlay"), IDI_GMAIL_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_JGTalk_overlay", L"*JGTalk*", LPGENT("JGTalk overlay"), IDI_JGTALK_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_Jabber_overlay", L"|^jabber*|Miranda*Jabber*|py*jabb*", LPGENT("Jabber overlay"), IDI_JABBER_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_MSN_overlay", L"|^MSN*|*Miranda*MSN*", LPGENT("MSN overlay"), IDI_MSN_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_QQ_overlay", L"|Miranda*QQ*|MIM*QQ*", LPGENT("QQ overlay"), IDI_QQ_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_Tlen_overlay", L"|^tlen*|*tlen*", LPGENT("Tlen.pl overlay"), IDI_TLEN_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_Yahoo_overlay", L"|^Yahoo*|*yahoo*", LPGENT("Yahoo overlay"), IDI_YAHOO_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_MRA_overlay", L"|^MRA*|^Mail.ru*"
+ L"|*MRA*|*Mail.ru*IM*|Mrim*"
+ L"|*DRQZ00fz5WPn1gH+*|*nxthUwJANorB6+*|ICQ client", LPGENT("Mail.Ru Agent overlay"), IDI_MAILRU_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_VK_overlay", L"|Miranda*VKontakte*", LPGENT("VK overlay"), IDI_VK_OVERLAY, OVERLAYS_PROTO_CASE },
+ { "client_Skype_overlay", L"|Miranda*Skype*", LPGENT("Skype overlay"), IDI_SKYPE_OVERLAY, OVERLAYS_PROTO_CASE },
//#########################################################################################################################################################################
//################################# CLIENT VERSION OVERLAYS ###########################################################################################################
//#########################################################################################################################################################################
- { "client_ICQ3_over", _T("ICQ*2003*"), LPGENT("ICQ 2003 overlay"), IDI_ICQ3_OVERLAY, ICQ_CASE },
- { "client_ICQ4_over", _T("|ICQ*4*|ICQ*lite*4*"), LPGENT("ICQ Lite 4 overlay"), IDI_ICQ4_OVERLAY, ICQ_CASE },
- { "client_ICQ5_over", _T("|ICQ*5*|ICQ*lite*5*|icq5*"), LPGENT("ICQ v5.x overlay"), IDI_ICQ5_OVERLAY, ICQ_CASE },
- { "client_ICQ6_over", _T("ICQ*6*"), LPGENT("ICQ v6.x overlay"), IDI_ICQ6_OVERLAY, ICQ_CASE },
- { "client_ICQ7_over", _T("ICQ*7*"), LPGENT("ICQ v7.x overlay"), IDI_ICQ7_OVERLAY, ICQ_CASE },
- { "client_ICQ8_over", _T("ICQ*8*"), LPGENT("ICQ v8.x overlay"), IDI_ICQ8_OVERLAY, ICQ_CASE },
-
- { "client_Yahoo_11", _T("*Yahoo 11*"), LPGENT("Yahoo v11.x overlay"), IDI_YAHOO11_OVERLAY, YAHOO_CASE },
- { "client_Yahoo_10", _T("*Yahoo 10*"), LPGENT("Yahoo v10.x overlay"), IDI_YAHOO10_OVERLAY, YAHOO_CASE },
- { "client_Yahoo_9", _T("*Yahoo 9*"), LPGENT("Yahoo v9.x overlay"), IDI_YAHOO9_OVERLAY, YAHOO_CASE },
-
- { "client_GG_11", _T("|Gadu-Gadu*11*|GG*11*"), LPGENT("Gadu-Gadu v11 client"), IDI_GG11_OVERLAY, GG_CASE },
- { "client_GG_10", _T("|Gadu-Gadu*10*|GG*10"), LPGENT("Gadu-Gadu v10 client"), IDI_GG10_OVERLAY, GG_CASE },
- { "client_GG_9", _T("|Gadu-Gadu*9*|GG*9*"), LPGENT("Gadu-Gadu v9 client"), IDI_GG9_OVERLAY, GG_CASE },
- { "client_GG_8", _T("|Gadu-Gadu*8*|GG*8*"), LPGENT("Gadu-Gadu v8 client"), IDI_GG8_OVERLAY, GG_CASE },
-
- // {"client_Tlen_8", _T("Tlen Protocol 1?"), LPGENT("Tlen 8.x overlay"), IDI_TLEN8_OVERLAY, TLEN_CASE },
- { "client_Tlen_7", _T("Tlen Protocol 16"), LPGENT("Tlen 7.x overlay"), IDI_TLEN7_OVERLAY, TLEN_CASE },
- { "client_Tlen_6", _T("Tlen Protocol 10"), LPGENT("Tlen 6.x overlay"), IDI_TLEN6_OVERLAY, TLEN_CASE },
- { "client_Tlen_5", _T("Tlen Protocol 7"), LPGENT("Tlen 5.x overlay"), IDI_TLEN5_OVERLAY, TLEN_CASE },
-
- { "client_QQ_2012", _T("|QQ2012*|TM2012*"), LPGENT("TM/QQ 2012 overlay"), IDI_QQ_2012_OVERLAY, QQ_CASE },
- { "client_QQ_2011", _T("|QQ2011*|TM2011*"), LPGENT("TM/QQ 2011 overlay"), IDI_QQ_2011_OVERLAY, QQ_CASE },
- { "client_QQ_2010", _T("|QQ2010*|TM2010*"), LPGENT("TM/QQ 2010 overlay"), IDI_QQ_2010_OVERLAY, QQ_CASE },
- { "client_QQ_2009", _T("|QQ2009*|TM2009*"), LPGENT("TM/QQ 2009 overlay"), IDI_QQ_2009_OVERLAY, QQ_CASE },
- { "client_QQ_2008", _T("|QQ2008*|TM2008*"), LPGENT("TM/QQ 2008 overlay"), IDI_QQ_2008_OVERLAY, QQ_CASE },
- { "client_QQ_2007", _T("|QQ2007*|TM2007*"), LPGENT("TM/QQ 2007 overlay"), IDI_QQ_2007_OVERLAY, QQ_CASE },
- { "client_QQ_2006", _T("|QQ2006*|TM2006*"), LPGENT("TM/QQ 2006 overlay"), IDI_QQ_2006_OVERLAY, QQ_CASE },
- { "client_QQ_2005", _T("|QQ2005*|TM2005*"), LPGENT("TM/QQ 2005 overlay"), IDI_QQ_2005_OVERLAY, QQ_CASE },
- { "client_QQ_2004", _T("QQ2004*"), LPGENT("QQ 2004 overlay"), IDI_QQ_2004_OVERLAY, QQ_CASE },
- { "client_QQ_2003", _T("|QQ2003*|TM 3.*"), LPGENT("TM 3.x / QQ 2003 overlay"), IDI_QQ_2003_OVERLAY, QQ_CASE },
- { "client_TM_2002", _T("TM 2.*"), LPGENT("TM 2.x overlay"), IDI_QQ_2002_OVERLAY, QQ_CASE },
- { "client_TM_2001", _T("TM 1.*"), LPGENT("TM 1.x overlay"), IDI_QQ_2001_OVERLAY, QQ_CASE },
- { "client_QQ_2000", _T("QQ2000*"), LPGENT("QQ 2000 overlay"), IDI_QQ_2000_OVERLAY, QQ_CASE },
+ { "client_ICQ3_over", L"ICQ*2003*", LPGENT("ICQ 2003 overlay"), IDI_ICQ3_OVERLAY, ICQ_CASE },
+ { "client_ICQ4_over", L"|ICQ*4*|ICQ*lite*4*", LPGENT("ICQ Lite 4 overlay"), IDI_ICQ4_OVERLAY, ICQ_CASE },
+ { "client_ICQ5_over", L"|ICQ*5*|ICQ*lite*5*|icq5*", LPGENT("ICQ v5.x overlay"), IDI_ICQ5_OVERLAY, ICQ_CASE },
+ { "client_ICQ6_over", L"ICQ*6*", LPGENT("ICQ v6.x overlay"), IDI_ICQ6_OVERLAY, ICQ_CASE },
+ { "client_ICQ7_over", L"ICQ*7*", LPGENT("ICQ v7.x overlay"), IDI_ICQ7_OVERLAY, ICQ_CASE },
+ { "client_ICQ8_over", L"ICQ*8*", LPGENT("ICQ v8.x overlay"), IDI_ICQ8_OVERLAY, ICQ_CASE },
+
+ { "client_Yahoo_11", L"*Yahoo 11*", LPGENT("Yahoo v11.x overlay"), IDI_YAHOO11_OVERLAY, YAHOO_CASE },
+ { "client_Yahoo_10", L"*Yahoo 10*", LPGENT("Yahoo v10.x overlay"), IDI_YAHOO10_OVERLAY, YAHOO_CASE },
+ { "client_Yahoo_9", L"*Yahoo 9*", LPGENT("Yahoo v9.x overlay"), IDI_YAHOO9_OVERLAY, YAHOO_CASE },
+
+ { "client_GG_11", L"|Gadu-Gadu*11*|GG*11*", LPGENT("Gadu-Gadu v11 client"), IDI_GG11_OVERLAY, GG_CASE },
+ { "client_GG_10", L"|Gadu-Gadu*10*|GG*10", LPGENT("Gadu-Gadu v10 client"), IDI_GG10_OVERLAY, GG_CASE },
+ { "client_GG_9", L"|Gadu-Gadu*9*|GG*9*", LPGENT("Gadu-Gadu v9 client"), IDI_GG9_OVERLAY, GG_CASE },
+ { "client_GG_8", L"|Gadu-Gadu*8*|GG*8*", LPGENT("Gadu-Gadu v8 client"), IDI_GG8_OVERLAY, GG_CASE },
+
+ // {"client_Tlen_8", L"Tlen Protocol 1?", LPGENT("Tlen 8.x overlay"), IDI_TLEN8_OVERLAY, TLEN_CASE },
+ { "client_Tlen_7", L"Tlen Protocol 16", LPGENT("Tlen 7.x overlay"), IDI_TLEN7_OVERLAY, TLEN_CASE },
+ { "client_Tlen_6", L"Tlen Protocol 10", LPGENT("Tlen 6.x overlay"), IDI_TLEN6_OVERLAY, TLEN_CASE },
+ { "client_Tlen_5", L"Tlen Protocol 7", LPGENT("Tlen 5.x overlay"), IDI_TLEN5_OVERLAY, TLEN_CASE },
+
+ { "client_QQ_2012", L"|QQ2012*|TM2012*", LPGENT("TM/QQ 2012 overlay"), IDI_QQ_2012_OVERLAY, QQ_CASE },
+ { "client_QQ_2011", L"|QQ2011*|TM2011*", LPGENT("TM/QQ 2011 overlay"), IDI_QQ_2011_OVERLAY, QQ_CASE },
+ { "client_QQ_2010", L"|QQ2010*|TM2010*", LPGENT("TM/QQ 2010 overlay"), IDI_QQ_2010_OVERLAY, QQ_CASE },
+ { "client_QQ_2009", L"|QQ2009*|TM2009*", LPGENT("TM/QQ 2009 overlay"), IDI_QQ_2009_OVERLAY, QQ_CASE },
+ { "client_QQ_2008", L"|QQ2008*|TM2008*", LPGENT("TM/QQ 2008 overlay"), IDI_QQ_2008_OVERLAY, QQ_CASE },
+ { "client_QQ_2007", L"|QQ2007*|TM2007*", LPGENT("TM/QQ 2007 overlay"), IDI_QQ_2007_OVERLAY, QQ_CASE },
+ { "client_QQ_2006", L"|QQ2006*|TM2006*", LPGENT("TM/QQ 2006 overlay"), IDI_QQ_2006_OVERLAY, QQ_CASE },
+ { "client_QQ_2005", L"|QQ2005*|TM2005*", LPGENT("TM/QQ 2005 overlay"), IDI_QQ_2005_OVERLAY, QQ_CASE },
+ { "client_QQ_2004", L"QQ2004*", LPGENT("QQ 2004 overlay"), IDI_QQ_2004_OVERLAY, QQ_CASE },
+ { "client_QQ_2003", L"|QQ2003*|TM 3.*", LPGENT("TM 3.x / QQ 2003 overlay"), IDI_QQ_2003_OVERLAY, QQ_CASE },
+ { "client_TM_2002", L"TM 2.*", LPGENT("TM 2.x overlay"), IDI_QQ_2002_OVERLAY, QQ_CASE },
+ { "client_TM_2001", L"TM 1.*", LPGENT("TM 1.x overlay"), IDI_QQ_2001_OVERLAY, QQ_CASE },
+ { "client_QQ_2000", L"QQ2000*", LPGENT("QQ 2000 overlay"), IDI_QQ_2000_OVERLAY, QQ_CASE },
//#########################################################################################################################################################################
//################################# PLATFORM OVERLAYS #################################################################################################################
//#########################################################################################################################################################################
- { "client_on_Win32", _T("|*Win*|* WM *|wmagent*|*Vista*"), LPGENT("Windows overlay"), IDI_PLATFORM_WIN, OVERLAYS_PLATFORM_CASE },
- { "client_on_iOS", _T("|*ipad*|*iphone*|*iOS*"), LPGENT("iOS overlay (iPhone/iPad)"), IDI_PLATFORM_IOS, OVERLAYS_PLATFORM_CASE },
- { "client_on_Mac", _T("|^*smack*|* Mac *|*mac*|*OSX*"), LPGENT("MacOS overlay"), IDI_PLATFORM_MAC, OVERLAYS_PLATFORM_CASE },
- { "client_on_Linux", _T("*Linux*"), LPGENT("Linux overlay"), IDI_PLATFORM_LINUX, OVERLAYS_PLATFORM_CASE },
- { "client_on_Flash", _T("|*Flash*|*Web*ICQ*"), LPGENT("Flash overlay"), IDI_PLATFORM_FLASH, OVERLAYS_PLATFORM_CASE },
- { "client_on_Java", _T("|*Java*|jagent*|ICQ2Go!*"), LPGENT("Java overlay"), IDI_PLATFORM_JAVA, OVERLAYS_PLATFORM_CASE },
- { "client_on_Symbian", _T("|*Symbian*|sagent*"), LPGENT("Symbian overlay"), IDI_PLATFORM_SYMBIAN, OVERLAYS_PLATFORM_CASE },
- { "client_on_Amiga", _T("*Amiga*"), LPGENT("Amiga overlay"), IDI_PLATFORM_AMIGA, OVERLAYS_PLATFORM_CASE },
- { "client_on_Android", _T("|*Android*|*(android)*"), LPGENT("Android overlay"), IDI_PLATFORM_ANDROID, OVERLAYS_PLATFORM_CASE },
- { "client_on_Website", _T("|*(website)*|*(Web)*"), LPGENT("Website overlay"), IDI_PLATFORM_WEBSITE, OVERLAYS_PLATFORM_CASE },
- { "client_on_WinPhone", _T("|*(wphone)*|*(WP)*"), LPGENT("Windows Phone overlay"), IDI_PLATFORM_WINPHONE, OVERLAYS_PLATFORM_CASE },
- { "client_on_mobile", _T("*(mobile)*"), LPGENT("Mobile overlay"), IDI_PLATFORM_MOBILE, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Win32", L"|*Win*|* WM *|wmagent*|*Vista*", LPGENT("Windows overlay"), IDI_PLATFORM_WIN, OVERLAYS_PLATFORM_CASE },
+ { "client_on_iOS", L"|*ipad*|*iphone*|*iOS*", LPGENT("iOS overlay (iPhone/iPad)"), IDI_PLATFORM_IOS, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Mac", L"|^*smack*|* Mac *|*mac*|*OSX*", LPGENT("MacOS overlay"), IDI_PLATFORM_MAC, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Linux", L"*Linux*", LPGENT("Linux overlay"), IDI_PLATFORM_LINUX, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Flash", L"|*Flash*|*Web*ICQ*", LPGENT("Flash overlay"), IDI_PLATFORM_FLASH, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Java", L"|*Java*|jagent*|ICQ2Go!*", LPGENT("Java overlay"), IDI_PLATFORM_JAVA, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Symbian", L"|*Symbian*|sagent*", LPGENT("Symbian overlay"), IDI_PLATFORM_SYMBIAN, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Amiga", L"*Amiga*", LPGENT("Amiga overlay"), IDI_PLATFORM_AMIGA, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Android", L"|*Android*|*(android)*", LPGENT("Android overlay"), IDI_PLATFORM_ANDROID, OVERLAYS_PLATFORM_CASE },
+ { "client_on_Website", L"|*(website)*|*(Web)*", LPGENT("Website overlay"), IDI_PLATFORM_WEBSITE, OVERLAYS_PLATFORM_CASE },
+ { "client_on_WinPhone", L"|*(wphone)*|*(WP)*", LPGENT("Windows Phone overlay"), IDI_PLATFORM_WINPHONE, OVERLAYS_PLATFORM_CASE },
+ { "client_on_mobile", L"*(mobile)*", LPGENT("Mobile overlay"), IDI_PLATFORM_MOBILE, OVERLAYS_PLATFORM_CASE },
};
int DEFAULT_KN_FP_OVERLAYS_COUNT = _countof(def_kn_fp_overlays_mask);
@@ -769,38 +769,38 @@ int DEFAULT_KN_FP_OVERLAYS_COUNT = _countof(def_kn_fp_overlays_mask); //#########################################################################################################################################################################
KN_FP_MASK def_kn_fp_overlays2_mask[] =
-{// {"Client_IconName", _T("|^*Mask*|*names*"), _T("Icon caption"), IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
- { "client_debug_overlay", _T("|*[*debug*]*|*test*|*теÑÑ‚*"), LPGENT("debug overlay"), IDI_DEBUG_OVERLAY, OVERLAYS_RESOURCE_CASE },
- { "client_office_overlay", _T("|*[*office*]*|*[*офиÑ*]*"), LPGENT("office overlay"), IDI_OFFICE_OVERLAY, OVERLAYS_RESOURCE_CASE },
- { "client_mobile_overlay", _T("|*[*mobile*]*|*[*pda*]*"), LPGENT("mobile overlay"), IDI_MOBILE_OVERLAY, OVERLAYS_RESOURCE_CASE },
- { "client_home_overlay", _T("|*[*home*]*|*[*дом*]*|*[*хоме*]*"), LPGENT("home overlay"), IDI_HOME_OVERLAY, OVERLAYS_RESOURCE_CASE },
-
- { "client_work_overlay", _T("|*[*work*]*|*wrk*")
- _T("|*[*работа*]*|*ворк*"), LPGENT("work overlay"), IDI_WORK_OVERLAY, OVERLAYS_RESOURCE_CASE },
-
- { "client_note_overlay", _T("|*[*note*]*|*[*laptop*]*")
- _T("|*[*нетбу*]*|*[*ноут*]*|*[*ноте*]*")
- _T("|*[*кирпич*]*|*[*portable*]*")
- _T("|*[*flash*]*|*[*usb*]*"), LPGENT("notebook overlay"), IDI_NOTEBOOK_OVERLAY, OVERLAYS_RESOURCE_CASE },
-
- // {"client_MirNG_09_over", _T("*Miranda*NG*\?.\?\?.9.*"), _T("Miranda NG v0.9 #2 overlay"), IDI_MIRANDA_NG_V9, MIRANDA_VERSION_CASE },
- // {"client_MirNG_08_over", _T("*Miranda*NG*\?.\?\?.8.*"), _T("Miranda NG v0.8 #2 overlay"), IDI_MIRANDA_NG_V8, MIRANDA_VERSION_CASE },
- // {"client_MirNG_07_over", _T("*Miranda*NG*\?.\?\?.7.*"), _T("Miranda NG v0.7 #2 overlay"), IDI_MIRANDA_NG_V7, MIRANDA_VERSION_CASE },
-
- { "client_MirNG_06_over", _T("*Miranda*NG*\?.\?\?.6.*"), LPGENT("Miranda NG v0.6 #2 overlay"), IDI_MIRANDA_NG_V6, MIRANDA_VERSION_CASE },
- { "client_MirNG_05_over", _T("*Miranda*NG*\?.\?\?.5.*"), LPGENT("Miranda NG v0.5 #2 overlay"), IDI_MIRANDA_NG_V5, MIRANDA_VERSION_CASE },
- { "client_MirNG_04_over", _T("*Miranda*NG*\?.\?\?.4.*"), LPGENT("Miranda NG v0.4 #2 overlay"), IDI_MIRANDA_NG_V4, MIRANDA_VERSION_CASE },
- { "client_MirNG_03_over", _T("*Miranda*NG*\?.\?\?.3.*"), LPGENT("Miranda NG v0.3 #2 overlay"), IDI_MIRANDA_NG_V3, MIRANDA_VERSION_CASE },
- { "client_MirNG_02_over", _T("*Miranda*NG*\?.\?\?.2.*"), LPGENT("Miranda NG v0.2 #2 overlay"), IDI_MIRANDA_NG_V2, MIRANDA_VERSION_CASE },
- { "client_MirNG_01_over", _T("*Miranda*NG*\?.\?\?.1.*"), LPGENT("Miranda NG v0.1 #2 overlay"), IDI_MIRANDA_NG_V1, MIRANDA_VERSION_CASE },
-
- { "client_MirIM_010_over", _T("*Miranda*0.10.*"), LPGENT("Miranda IM v0.10 #2 overlay"), IDI_MIRANDA_IM_V10, MIRANDA_VERSION_CASE },
- { "client_MirIM_09_over", _T("*Miranda*0.9.*"), LPGENT("Miranda IM v0.9 #2 overlay"), IDI_MIRANDA_IM_V9, MIRANDA_VERSION_CASE },
- { "client_MirIM_08_over", _T("*Miranda*0.8.*"), LPGENT("Miranda IM v0.8 #2 overlay"), IDI_MIRANDA_IM_V8, MIRANDA_VERSION_CASE },
- { "client_MirIM_07_over", _T("*Miranda*0.7.*"), LPGENT("Miranda IM v0.7 #2 overlay"), IDI_MIRANDA_IM_V7, MIRANDA_VERSION_CASE },
- { "client_MirIM_06_over", _T("*Miranda*0.6.*"), LPGENT("Miranda IM v0.6 #2 overlay"), IDI_MIRANDA_IM_V6, MIRANDA_VERSION_CASE },
- { "client_MirIM_05_over", _T("*Miranda*0.5.*"), LPGENT("Miranda IM v0.5 #2 overlay"), IDI_MIRANDA_IM_V5, MIRANDA_VERSION_CASE },
- { "client_MirIM_04_over", _T("*Miranda*0.4.*"), LPGENT("Miranda IM v0.4 #2 overlay"), IDI_MIRANDA_IM_V4, MIRANDA_VERSION_CASE },
+{// {"Client_IconName", L"|^*Mask*|*names*", L"Icon caption", IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
+ { "client_debug_overlay", L"|*[*debug*]*|*test*|*теÑÑ‚*", LPGENT("debug overlay"), IDI_DEBUG_OVERLAY, OVERLAYS_RESOURCE_CASE },
+ { "client_office_overlay", L"|*[*office*]*|*[*офиÑ*]*", LPGENT("office overlay"), IDI_OFFICE_OVERLAY, OVERLAYS_RESOURCE_CASE },
+ { "client_mobile_overlay", L"|*[*mobile*]*|*[*pda*]*", LPGENT("mobile overlay"), IDI_MOBILE_OVERLAY, OVERLAYS_RESOURCE_CASE },
+ { "client_home_overlay", L"|*[*home*]*|*[*дом*]*|*[*хоме*]*", LPGENT("home overlay"), IDI_HOME_OVERLAY, OVERLAYS_RESOURCE_CASE },
+
+ { "client_work_overlay", L"|*[*work*]*|*wrk*"
+ L"|*[*работа*]*|*ворк*", LPGENT("work overlay"), IDI_WORK_OVERLAY, OVERLAYS_RESOURCE_CASE },
+
+ { "client_note_overlay", L"|*[*note*]*|*[*laptop*]*"
+ L"|*[*нетбу*]*|*[*ноут*]*|*[*ноте*]*"
+ L"|*[*кирпич*]*|*[*portable*]*"
+ L"|*[*flash*]*|*[*usb*]*", LPGENT("notebook overlay"), IDI_NOTEBOOK_OVERLAY, OVERLAYS_RESOURCE_CASE },
+
+ // {"client_MirNG_09_over", L"*Miranda*NG*\?.\?\?.9.*", L"Miranda NG v0.9 #2 overlay", IDI_MIRANDA_NG_V9, MIRANDA_VERSION_CASE },
+ // {"client_MirNG_08_over", L"*Miranda*NG*\?.\?\?.8.*", L"Miranda NG v0.8 #2 overlay", IDI_MIRANDA_NG_V8, MIRANDA_VERSION_CASE },
+ // {"client_MirNG_07_over", L"*Miranda*NG*\?.\?\?.7.*", L"Miranda NG v0.7 #2 overlay", IDI_MIRANDA_NG_V7, MIRANDA_VERSION_CASE },
+
+ { "client_MirNG_06_over", L"*Miranda*NG*\?.\?\?.6.*", LPGENT("Miranda NG v0.6 #2 overlay"), IDI_MIRANDA_NG_V6, MIRANDA_VERSION_CASE },
+ { "client_MirNG_05_over", L"*Miranda*NG*\?.\?\?.5.*", LPGENT("Miranda NG v0.5 #2 overlay"), IDI_MIRANDA_NG_V5, MIRANDA_VERSION_CASE },
+ { "client_MirNG_04_over", L"*Miranda*NG*\?.\?\?.4.*", LPGENT("Miranda NG v0.4 #2 overlay"), IDI_MIRANDA_NG_V4, MIRANDA_VERSION_CASE },
+ { "client_MirNG_03_over", L"*Miranda*NG*\?.\?\?.3.*", LPGENT("Miranda NG v0.3 #2 overlay"), IDI_MIRANDA_NG_V3, MIRANDA_VERSION_CASE },
+ { "client_MirNG_02_over", L"*Miranda*NG*\?.\?\?.2.*", LPGENT("Miranda NG v0.2 #2 overlay"), IDI_MIRANDA_NG_V2, MIRANDA_VERSION_CASE },
+ { "client_MirNG_01_over", L"*Miranda*NG*\?.\?\?.1.*", LPGENT("Miranda NG v0.1 #2 overlay"), IDI_MIRANDA_NG_V1, MIRANDA_VERSION_CASE },
+
+ { "client_MirIM_010_over", L"*Miranda*0.10.*", LPGENT("Miranda IM v0.10 #2 overlay"), IDI_MIRANDA_IM_V10, MIRANDA_VERSION_CASE },
+ { "client_MirIM_09_over", L"*Miranda*0.9.*", LPGENT("Miranda IM v0.9 #2 overlay"), IDI_MIRANDA_IM_V9, MIRANDA_VERSION_CASE },
+ { "client_MirIM_08_over", L"*Miranda*0.8.*", LPGENT("Miranda IM v0.8 #2 overlay"), IDI_MIRANDA_IM_V8, MIRANDA_VERSION_CASE },
+ { "client_MirIM_07_over", L"*Miranda*0.7.*", LPGENT("Miranda IM v0.7 #2 overlay"), IDI_MIRANDA_IM_V7, MIRANDA_VERSION_CASE },
+ { "client_MirIM_06_over", L"*Miranda*0.6.*", LPGENT("Miranda IM v0.6 #2 overlay"), IDI_MIRANDA_IM_V6, MIRANDA_VERSION_CASE },
+ { "client_MirIM_05_over", L"*Miranda*0.5.*", LPGENT("Miranda IM v0.5 #2 overlay"), IDI_MIRANDA_IM_V5, MIRANDA_VERSION_CASE },
+ { "client_MirIM_04_over", L"*Miranda*0.4.*", LPGENT("Miranda IM v0.4 #2 overlay"), IDI_MIRANDA_IM_V4, MIRANDA_VERSION_CASE },
};
int DEFAULT_KN_FP_OVERLAYS2_COUNT = _countof(def_kn_fp_overlays2_mask);
@@ -810,11 +810,11 @@ int DEFAULT_KN_FP_OVERLAYS2_COUNT = _countof(def_kn_fp_overlays2_mask); //############################## OVERLAYS LAYER #3 ####################################################################################################################
//#########################################################################################################################################################################
KN_FP_MASK def_kn_fp_overlays3_mask[] =
-{// {"Client_IconName", _T("|^*Mask*|*names*"), _T("Icon caption"), IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
- { "client_platform_x64", _T("|*x64*|*64*bit*"), LPGENT("x64 overlay"), IDI_PLATFORM_X64, OVERLAYS_PLATFORM_CASE },
- { "client_platform_x32", _T("|*x32*|*32*bit*|*x86*"), LPGENT("x32 overlay"), IDI_PLATFORM_X32, OVERLAYS_PLATFORM_CASE },
+{// {"Client_IconName", L"|^*Mask*|*names*", L"Icon caption", IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
+ { "client_platform_x64", L"|*x64*|*64*bit*", LPGENT("x64 overlay"), IDI_PLATFORM_X64, OVERLAYS_PLATFORM_CASE },
+ { "client_platform_x32", L"|*x32*|*32*bit*|*x86*", LPGENT("x32 overlay"), IDI_PLATFORM_X32, OVERLAYS_PLATFORM_CASE },
- { "client_Unicode", _T("*unicode*"), LPGENT("Unicode overlay"), IDI_UNICODE_CLIENT, OVERLAYS_UNICODE_CASE },
+ { "client_Unicode", L"*unicode*", LPGENT("Unicode overlay"), IDI_UNICODE_CLIENT, OVERLAYS_UNICODE_CASE },
};
int DEFAULT_KN_FP_OVERLAYS3_COUNT = _countof(def_kn_fp_overlays3_mask);
@@ -824,10 +824,10 @@ int DEFAULT_KN_FP_OVERLAYS3_COUNT = _countof(def_kn_fp_overlays3_mask); //############################## OVERLAYS LAYER #4 ####################################################################################################################
//#########################################################################################################################################################################
KN_FP_MASK def_kn_fp_overlays4_mask[] =
-{// {"Client_IconName", _T("|^*Mask*|*names*"), _T("Icon caption"), IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
- { "client_NewGPG_over", _T("*New*GPG*"), LPGENT("NewGPG overlay"), IDI_NEWGPG_OVERLAY, OVERLAYS_SECURITY_CASE },
- { "client_MirOTR_over", _T("*Mir*OTR*"), LPGENT("MirOTR overlay"), IDI_MIROTR_OVERLAY, OVERLAYS_SECURITY_CASE },
- { "client_SecureIM_over", _T("*Secure*IM*"), LPGENT("SecureIM overlay"), IDI_SECUREIM_OVERLAY, OVERLAYS_SECURITY_CASE },
+{// {"Client_IconName", L"|^*Mask*|*names*", L"Icon caption", IDI_RESOURCE_ID, CLIENT_CASE, OVERLAY? },
+ { "client_NewGPG_over", L"*New*GPG*", LPGENT("NewGPG overlay"), IDI_NEWGPG_OVERLAY, OVERLAYS_SECURITY_CASE },
+ { "client_MirOTR_over", L"*Mir*OTR*", LPGENT("MirOTR overlay"), IDI_MIROTR_OVERLAY, OVERLAYS_SECURITY_CASE },
+ { "client_SecureIM_over", L"*Secure*IM*", LPGENT("SecureIM overlay"), IDI_SECUREIM_OVERLAY, OVERLAYS_SECURITY_CASE },
};
int DEFAULT_KN_FP_OVERLAYS4_COUNT = _countof(def_kn_fp_overlays4_mask);
diff --git a/plugins/FingerprintNG/src/stdafx.h b/plugins/FingerprintNG/src/stdafx.h index 17a2065896..3cdf31a6a0 100644 --- a/plugins/FingerprintNG/src/stdafx.h +++ b/plugins/FingerprintNG/src/stdafx.h @@ -110,7 +110,7 @@ typedef struct _foundInfo #define MODULENAME "Finger"
-#define DEFAULT_SKIN_FOLDER _T("Icons\\Fp_icons.dll")
+#define DEFAULT_SKIN_FOLDER L"Icons\\Fp_icons.dll"
void ClearFI();
diff --git a/plugins/FloatingContacts/src/fltcont.h b/plugins/FloatingContacts/src/fltcont.h index 1093cfff3e..616baa50dc 100644 --- a/plugins/FloatingContacts/src/fltcont.h +++ b/plugins/FloatingContacts/src/fltcont.h @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////////////////
//
-#define WND_CLASS _T("MirandaThumbsWnd")
+#define WND_CLASS L"MirandaThumbsWnd"
#define WM_REFRESH_CONTACT WM_USER + 0x100
#ifndef WS_EX_LAYERED
diff --git a/plugins/FloatingContacts/src/options.cpp b/plugins/FloatingContacts/src/options.cpp index 255e2b11e9..bad721a483 100644 --- a/plugins/FloatingContacts/src/options.cpp +++ b/plugins/FloatingContacts/src/options.cpp @@ -256,7 +256,7 @@ static INT_PTR APIENTRY OptSknWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP 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))
return FALSE;
SetDlgItemText(hwndDlg, IDC_FILENAME, str);
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp index d0c5c3284a..d14722300f 100644 --- a/plugins/Folders/src/dlg_handlers.cpp +++ b/plugins/Folders/src/dlg_handlers.cpp @@ -123,7 +123,7 @@ static INT_PTR CALLBACK DlgProcVariables(HWND hWnd, UINT msg, WPARAM wParam, LPA switch (msg) {
case WM_INITDIALOG:
- mir_sntprintf(tszMessage, _T("%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s"),
+ mir_sntprintf(tszMessage, L"%s\r\n%s\r\n\r\n%s\t\t%s\r\n%%miranda_path%%\t\t%s\r\n%%profile_path%%\t\t%s\r\n\t\t\t%s\r\n%%current_profile%%\t\t%s\r\n\t\t\t%s\r\n\r\n\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n\r\n%s\r\n%s\r\n%s\r\n%%miranda_path%%\t\t\t%s\r\n%%profile_path%%\t\t\t%s\r\n%%current_profile%%\t\t\t%s\r\n%%temp%%\t\t\t\t%s\r\n%%profile_path%%\\%%current_profile%%\t%s\r\n%%miranda_path%%\\plugins\\config\t%s\r\n' %%miranda_path%%\\\\\\\\ '\t\t%s\r\n\r\n%s",
TranslateT("Don't forget to click on Apply to save the changes. If you don't then the changes won't"),
TranslateT("be saved to the database, they will only be valid for this session."),
TranslateT("Variable string"),
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp index 4da4164568..e1b46cb393 100644 --- a/plugins/Folders/src/folderItem.cpp +++ b/plugins/Folders/src/folderItem.cpp @@ -107,7 +107,7 @@ int CFolderItem::FolderDeleteOldDirectory(int showFolder) RemoveDirectories(buffer);
int res = (DirectoryExists(buffer)) ? FOLDER_FAILURE : FOLDER_SUCCESS;
if ((res == FOLDER_FAILURE) && (showFolder))
- ShellExecute(NULL, _T("explore"), buffer, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"explore", buffer, NULL, NULL, SW_SHOW);
return res;
}
diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp index e36cadc554..348db4468e 100644 --- a/plugins/Folders/src/services.cpp +++ b/plugins/Folders/src/services.cpp @@ -86,7 +86,7 @@ int InitServices() GetModuleFileName(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
pos = _tcsrchr(szMirandaPath, '\\'); if (pos) *pos = 0;
- TCHAR *szTemp = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+ TCHAR *szTemp = Utils_ReplaceVarsT(L"%miranda_userdata%");
mir_sntprintf(szUserDataPath, szTemp);
mir_free(szTemp);
diff --git a/plugins/GmailNotifier/src/check.cpp b/plugins/GmailNotifier/src/check.cpp index 15d71299ad..fbcdc83e57 100644 --- a/plugins/GmailNotifier/src/check.cpp +++ b/plugins/GmailNotifier/src/check.cpp @@ -92,7 +92,7 @@ void CheckMailInbox(Account *curAcc) }
else mir_strcpy(str, "/mail/feed/atom");
- hHTTPRequest = HttpOpenRequest(hHTTPConnection, _T("GET"), _A2T(str), NULL, NULL, NULL, INTERNET_FLAG_SECURE | INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD, 0);
+ hHTTPRequest = HttpOpenRequest(hHTTPConnection, L"GET", _A2T(str), NULL, NULL, NULL, INTERNET_FLAG_SECURE | INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD, 0);
InternetSetOption(hHTTPRequest, INTERNET_OPTION_USERNAME, _A2T(curAcc->name), (int)mir_strlen(curAcc->name) + 1);
InternetSetOption(hHTTPRequest, INTERNET_OPTION_PASSWORD, _A2T(curAcc->pass), (int)mir_strlen(curAcc->pass) + 1);
if (!HttpSendRequest(hHTTPRequest, NULL, 0, NULL, 0)) {
diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index e26e48e737..959fcd6d16 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -131,7 +131,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA GetDlgItemText(hwndDlg, IDC_PRG, szName, _countof(szName));
OpenFileName.lStructSize = sizeof(OPENFILENAME);
OpenFileName.hwndOwner = hwndDlg;
- OpenFileName.lpstrFilter = _T("Executables (*.exe;*.com;*.bat)\0*.exe;*.com;*.bat\0\0");
+ OpenFileName.lpstrFilter = L"Executables (*.exe;*.com;*.bat)\0*.exe;*.com;*.bat\0\0";
OpenFileName.lpstrFile = szName;
OpenFileName.nMaxFile = _countof(szName);
OpenFileName.Flags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index d58a86e83d..d79e8a8450 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -443,7 +443,7 @@ bool bShowShareNewFileDlg(HWND hwndOwner, STFileShareInfo * pstNewShare) ofn.lStructSize = sizeof(OPENFILENAME);
char temp[MAX_PATH];
- mir_snprintf(temp, _T("%s (*.*)%c*.*%c%c"), Translate("All files"), 0, 0, 0);
+ mir_snprintf(temp, "%s (*.*)%c*.*%c%c", Translate("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrFile = pstNewShare->pszRealPath;
@@ -1122,24 +1122,24 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP {// Url Address
SetDlgItemText(hwndDlg, IDC_URL_ADDRESS, sUrlAddress.c_str());
HWND hComboBox = GetDlgItem(hwndDlg, IDC_URL_ADDRESS);
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://checkip.dyndns.org"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://checkip.dyndns.org:8245/"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://dynamic.zoneedit.com/checkip.html"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://ipdetect.dnspark.com/"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://update.dynu.com/basic/ipcheck.asp"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://www.dnsart.com/myip.php"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("http://www.dnsart.com:7777/myip.php"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://checkip.dyndns.org");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://checkip.dyndns.org:8245/");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://dynamic.zoneedit.com/checkip.html");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://ipdetect.dnspark.com/");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://update.dynu.com/basic/ipcheck.asp");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://www.dnsart.com/myip.php");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"http://www.dnsart.com:7777/myip.php");
}
{// Page keyword
SetDlgItemText(hwndDlg, IDC_PAGE_KEYWORD, sPageKeyword.c_str());
HWND hComboBox = GetDlgItem(hwndDlg, IDC_PAGE_KEYWORD);
SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"");
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGENT("Current IP Address: "));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGENT("Current Address: "));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGENT("IP Address: "));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGENT("You are browsing from"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("<HTML><BODY>"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGEN("Current IP Address: "));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGEN("Current Address: "));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGEN("IP Address: "));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)LPGEN("You are browsing from"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)"<HTML><BODY>");
}
SetDlgItemInt(hwndDlg, IDC_MAX_SPEED, nMaxUploadSpeed >> 10, true);
@@ -1492,7 +1492,7 @@ void InitGuiElements() hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
if (!hEventOptionsInitialize)
- MessageBox(NULL, _T("Failed to HookEvent ME_OPT_INITIALISE"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to HookEvent ME_OPT_INITIALISE", MSG_BOX_TITEL, MB_OK);
bShowPopups = db_get_b(NULL, MODULE, "ShowPopups", bShowPopups) != 0;
}
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index 04bc7edd8c..c258832321 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -17,13 +17,15 @@ #include "Glob.h"
-static const TCHAR szXmlHeader1[] = _T("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n")
-_T("<?xml-stylesheet type=\"text/xsl\" href=\"");
+static const char szXmlHeader1[] =
+ "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n"
+ "<?xml-stylesheet type=\"text/xsl\" href=\"";
-static const TCHAR szXmlHeader2[] = _T("\"?>\r\n")
-_T("<config>\r\n");
+static const char szXmlHeader2[] =
+ "\"?>\r\n"
+ "<config>\r\n";
-static const TCHAR szXmlTail[] = _T("</config>");
+static const char szXmlTail[] = "</config>";
static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace,
const char * pszNew)
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 3490f07599..76f1ffe840 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -20,9 +20,9 @@ #define szConfigFile "HTTPServer.xml"
-const TCHAR szXmlHeader[] = _T("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n")
-_T("<?xml-stylesheet type=\"text/xsl\" href=\"HTTPServer.xsl\"?>\r\n")
-_T("<config>\r\n");
+const char szXmlHeader[] = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n"
+"<?xml-stylesheet type=\"text/xsl\" href=\"HTTPServer.xsl\"?>\r\n"
+"<config>\r\n";
const char szXmlData[] = "\t<share>\r\n"
"\t\t<name>%s</name>\r\n"
@@ -32,7 +32,7 @@ const char szXmlData[] = "\t<share>\r\n" "\t\t<ip_mask>%d.%d.%d.%d</ip_mask>\r\n"
"\t</share>\r\n";
-const TCHAR szXmlTail[] = _T("</config>");
+const char szXmlTail[] = "</config>";
const char* pszDefaultShares[] = {
"htdocs\\@settings\\favicon.ico", "/favicon.ico",
@@ -342,7 +342,7 @@ bool bWriteConfigurationFile() HANDLE hFile = CreateFile(szBuf, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
TCHAR temp[200];
- mir_sntprintf(temp, _T("%s%s"), TranslateT("Failed to open or create file "), _T(szConfigFile));
+ mir_sntprintf(temp, "%s%s", TranslateT("Failed to open or create file "), _T(szConfigFile));
MessageBox(NULL, temp, MSG_BOX_TITEL, MB_OK);
return false;
}
@@ -350,11 +350,11 @@ bool bWriteConfigurationFile() DWORD dwBytesWriten = 0;
if (!WriteFile(hFile, szXmlHeader, sizeof(szXmlHeader) - 1, &dwBytesWriten, NULL)) {
TCHAR temp[200];
- mir_sntprintf(temp, _T("%s%s"), TranslateT("Failed to write xml header to file "), _T(szConfigFile));
+ mir_sntprintf(temp, "%s%s", TranslateT("Failed to write xml header to file "), _T(szConfigFile));
MessageBox(NULL, temp, MSG_BOX_TITEL, MB_OK);
}
else {
- CLFileShareNode * pclCur = pclFirstNode;
+ CLFileShareNode *pclCur = pclFirstNode;
while (pclCur) {
DWORD dwBytesToWrite = mir_snprintf(szBuf, szXmlData,
pclCur->st.pszSrvPath,
@@ -365,7 +365,7 @@ bool bWriteConfigurationFile() if (!WriteFile(hFile, szBuf, dwBytesToWrite, &dwBytesWriten, NULL)) {
TCHAR temp[200];
- mir_sntprintf(temp, _T("%s%s"), TranslateT("Failed to write xml data to file "), _T(szConfigFile));
+ mir_sntprintf(temp, "%s%s", TranslateT("Failed to write xml data to file "), _T(szConfigFile));
MessageBox(NULL, temp, MSG_BOX_TITEL, MB_OK);
break;
}
@@ -374,7 +374,7 @@ bool bWriteConfigurationFile() if (!WriteFile(hFile, szXmlTail, sizeof(szXmlTail) - 1, &dwBytesWriten, NULL)) {
TCHAR temp[200];
- mir_sntprintf(temp, _T("%s%s"), TranslateT("Failed to write xml tail to file "), _T(szConfigFile));
+ mir_sntprintf(temp, "%s%s", TranslateT("Failed to write xml tail to file "), _T(szConfigFile));
MessageBox(NULL, temp, MSG_BOX_TITEL, MB_OK);
}
}
@@ -751,7 +751,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) nlu.ptszDescriptiveName = TranslateT("HTTP Server");
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)& nlu);
if (!hNetlibUser) {
- MessageBox(NULL, _T("Failed to register NetLib user"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to register NetLib user", MSG_BOX_TITEL, MB_OK);
return 0;
}
@@ -865,49 +865,49 @@ extern "C" __declspec(dllexport) int Load() hHttpAcceptConnectionsService = CreateServiceFunction(MS_HTTP_ACCEPT_CONNECTIONS, nToggelAcceptConnections);
if (!hHttpAcceptConnectionsService) {
- MessageBox(NULL, _T("Failed to CreateServiceFunction MS_HTTP_ACCEPT_CONNECTIONS"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to CreateServiceFunction MS_HTTP_ACCEPT_CONNECTIONS", MSG_BOX_TITEL, MB_OK);
return 1;
}
hHttpAddChangeRemoveService = CreateServiceFunction(MS_HTTP_ADD_CHANGE_REMOVE, nAddChangeRemoveShare);
if (!hHttpAddChangeRemoveService) {
- MessageBox(NULL, _T("Failed to CreateServiceFunction MS_HTTP_ADD_CHANGE_REMOVE"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to CreateServiceFunction MS_HTTP_ADD_CHANGE_REMOVE", MSG_BOX_TITEL, MB_OK);
return 1;
}
hHttpGetShareService = CreateServiceFunction(MS_HTTP_GET_SHARE, nGetShare);
if (!hHttpGetShareService) {
- MessageBox(NULL, _T("Failed to CreateServiceFunction MS_HTTP_GET_SHARE"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to CreateServiceFunction MS_HTTP_GET_SHARE", MSG_BOX_TITEL, MB_OK);
return 1;
}
hHttpGetAllShares = CreateServiceFunction(MS_HTTP_GET_ALL_SHARES, nHttpGetAllShares);
if (!hHttpGetAllShares) {
- MessageBox(NULL, _T("Failed to CreateServiceFunction MS_HTTP_GET_ALL_SHARES"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to CreateServiceFunction MS_HTTP_GET_ALL_SHARES", MSG_BOX_TITEL, MB_OK);
return 1;
}
hEventSystemInit = HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
if (!hEventSystemInit) {
- MessageBox(NULL, _T("Failed to HookEvent ME_SYSTEM_MODULESLOADED"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to HookEvent ME_SYSTEM_MODULESLOADED", MSG_BOX_TITEL, MB_OK);
return 1;
}
hPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
if (!hPreShutdown) {
- MessageBox(NULL, _T("Failed to HookEvent ME_SYSTEM_PRESHUTDOWN"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to HookEvent ME_SYSTEM_PRESHUTDOWN", MSG_BOX_TITEL, MB_OK);
return 1;
}
if (CallService(MS_DB_GETPROFILEPATH, MAX_PATH, (LPARAM)szPluginPath)) {
- MessageBox(NULL, _T("Failed to retrieve plugin path."), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to retrieve plugin path.", MSG_BOX_TITEL, MB_OK);
return 1;
}
- mir_tstrncat(szPluginPath, _T("\\HTTPServer\\"), _countof(szPluginPath) - mir_tstrlen(szPluginPath));
+ mir_tstrncat(szPluginPath, "\\HTTPServer\\", _countof(szPluginPath) - mir_tstrlen(szPluginPath));
int err = CreateDirectoryTree(szPluginPath);
if ((err != 0) && (err != ERROR_ALREADY_EXISTS)) {
- MessageBox(NULL, _T("Failed to create HTTPServer directory."), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, "Failed to create HTTPServer directory.", MSG_BOX_TITEL, MB_OK);
return 1;
}
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 88de017407..2d4ea92498 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -77,7 +77,7 @@ extern "C" __declspec(dllexport) int Load(void) wndclass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
- wndclass.lpszClassName = _T("Progressbar");
+ wndclass.lpszClassName = L"Progressbar";
RegisterClass(&wndclass);
splitCursor = LoadCursor(NULL, IDC_SIZENS);
@@ -140,7 +140,7 @@ static INT_PTR LinkList_Main(WPARAM hContact, LPARAM) RECT DesktopRect;
GetWindowRect(GetDesktopWindow(), &DesktopRect);
- HWND hWndProgress = CreateWindow(_T("Progressbar"), TranslateT("Processing history..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
+ HWND hWndProgress = CreateWindow(L"Progressbar", TranslateT("Processing history..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
if (hWndProgress == NULL) {
mir_free(dbe.pBlob);
MessageBox(NULL, TranslateT("Could not create window!"), TranslateT("Error"), MB_OK | MB_ICONEXCLAMATION );
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 0292052253..9946d3f060 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -76,7 +76,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) SetClassLongPtr(hDlg, GCLP_HICON, (LONG_PTR)LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON)));
WindowList_Add(hWindowList, hDlg, DlgParam->hContact);
- mir_sntprintf(title, _T("%s [%s]"), TranslateT("Linklist plugin"), pcli->pfnGetContactDisplayName(DlgParam->hContact, 0));
+ mir_sntprintf(title, L"%s [%s]", TranslateT("Linklist plugin"), pcli->pfnGetContactDisplayName(DlgParam->hContact, 0));
SetWindowText(hDlg, title);
GetFilterText(listMenu, filter, _countof(filter));
SetDlgItemText(hDlg, IDC_STATUS, filter);
@@ -123,7 +123,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) break;
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg);
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
- if (_tcsstr(link, _T("mailto:")) != NULL)
+ if (_tcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else {
bool openNewWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF) != 0xFF;
@@ -154,13 +154,13 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL)) {
case IDM_LINK_OPEN:
- if (_tcsstr(link, _T("mailto:")) != NULL)
+ if (_tcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
Utils_OpenUrlT(link,false);
break;
case IDM_LINK_OPENNEW:
- if (_tcsstr(link, _T("mailto:")) != NULL)
+ if (_tcsstr(link, L"mailto:") != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
Utils_OpenUrlT(link);
@@ -202,7 +202,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) case IDM_CLEARSEARCH: // clear search results
GetFilterText(listMenu, filter, _countof(filter));
SetDlgItemText(hDlg, IDC_STATUS, filter);
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hDlg, IDC_MAIN, L"");
WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
break;
case IDM_SAVE: // save button
@@ -218,7 +218,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) SetDlgItemText(hDlg, IDC_STATUS, filter);
if ((GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
break; // not possible if search dialog is open
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hDlg, IDC_MAIN, L"");
if (GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED) {
CheckMenuItem(listMenu, IDM_DIR_IN, MF_UNCHECKED);
WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
@@ -235,7 +235,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) SetDlgItemText(hDlg, IDC_STATUS, filter);
if ((GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
break; // not possible if search dialog is open
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hDlg, IDC_MAIN, L"");
if (GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED) {
CheckMenuItem(listMenu, IDM_DIR_OUT, MF_UNCHECKED);
WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
@@ -253,7 +253,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) // not possible if search dialog is open
if ((GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
break;
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hDlg, IDC_MAIN, L"");
if (GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_CHECKED) {
CheckMenuItem(listMenu, IDM_TYPE_WEB, MF_UNCHECKED);
WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
@@ -268,7 +268,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) case IDM_TYPE_MAIL: // view only URLs
if ((GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
break; // not possible if search dialog is open
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hDlg, IDC_MAIN, L"");
if (GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED) {
CheckMenuItem(listMenu, IDM_TYPE_MAIL, MF_UNCHECKED);
WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
@@ -380,7 +380,7 @@ INT_PTR CALLBACK SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara hListDlg = WindowList_Find(hWindowList, DlgParam->hContact);
if (hListDlg == NULL)
break;
- SetDlgItemText(hListDlg, IDC_MAIN, _T(""));
+ SetDlgItemText(hListDlg, IDC_MAIN, L"");
if (IsDlgButtonChecked(hDlg, IDC_TYPE_WEB) == BST_UNCHECKED)
flags |= WLL_MAIL;
if (IsDlgButtonChecked(hDlg, IDC_TYPE_MAIL) == BST_UNCHECKED)
@@ -399,7 +399,7 @@ INT_PTR CALLBACK SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
mir_free(buffer);
}
- mir_sntprintf(filter, _T("%s: %s"), TXT_FILTER, TXT_SEARCHFILTER);
+ mir_sntprintf(filter, L"%s: %s", TXT_FILTER, TXT_SEARCHFILTER);
SetDlgItemText(hWndMain, IDC_STATUS, filter);
} break;
}
@@ -788,7 +788,7 @@ LRESULT CALLBACK ProgressBarDlg(HWND hwnd, UINT message, WPARAM wParam, LPARAM l switch (message) {
case WM_CREATE:
- hwndPB = CreateWindowEx(0, PROGRESS_CLASS, _T(""), WS_CHILD | WS_VISIBLE, 0, 2, 343, 17, hwnd, NULL, hInst, NULL);
+ hwndPB = CreateWindowEx(0, PROGRESS_CLASS, L"", WS_CHILD | WS_VISIBLE, 0, 2, 343, 17, hwnd, NULL, hInst, NULL);
SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM (0, 100));
return 0;
break;
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index aca2c7dd56..558a931e05 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -35,11 +35,11 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart) LPTSTR word, wordsearch, date_ptr, time_ptr;
LPTSTR tok_ctx;
static LPCTSTR hyperlinkPrefixes[] = {
- _T("http://"),_T("ftp://"),_T("https://"),_T("mailto:"),_T("www."),_T("ftp."),
- _T("icq#"),_T("gopher://"),_T("news://"),_T("file://"),_T("\\\\")
+ L"http://",L"ftp://",L"https://",L"mailto:",L"www.",L"ftp.",
+ L"icq#",L"gopher://",L"news://",L"file://",L"\\\\"
};
static LPCTSTR hyperlinkSubstrings[] = {
- _T(".com"),_T(".net"),_T(".org"),_T(".co.uk"),_T(".ru")
+ L".com",L".net",L".org",L".co.uk",L".ru"
};
LISTELEMENT *newElement, *actualElement;
@@ -138,16 +138,16 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart) }
if (isLink && wordlen <= LINK_MAX) {
- if (_tcsstr(wordsearch, _T("www.")) != NULL && _tcsstr(wordsearch, _T("http://")) == NULL && _tcsstr(wordsearch, _T("https://")) == NULL) {
- _tcsncpy_s(link, _T("http://"), LINK_MAX);
+ if (_tcsstr(wordsearch, L"www.") != NULL && _tcsstr(wordsearch, L"http://") == NULL && _tcsstr(wordsearch, L"https://") == NULL) {
+ _tcsncpy_s(link, L"http://", LINK_MAX);
_tcsncat_s(link, word, LINK_MAX);
} else {
_tcsncpy_s(link, word, LINK_MAX);
}
- TimeZone_ToStringT(dbei->timestamp, _T("d-t"), dbdate, _countof(dbdate));
- date_ptr = _tcstok_s(dbdate, _T("-"), &tok_ctx);
- time_ptr = _tcstok_s(NULL, _T("-"), &tok_ctx);
+ TimeZone_ToStringT(dbei->timestamp, L"d-t", dbdate, _countof(dbdate));
+ date_ptr = _tcstok_s(dbdate, L"-", &tok_ctx);
+ time_ptr = _tcstok_s(NULL, L"-", &tok_ctx);
_tcsncpy_s(date, date_ptr, _TRUNCATE);
_tcsncpy_s(time, time_ptr, _TRUNCATE);
@@ -157,10 +157,10 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart) direction = DIRECTION_IN;
}
- if (type == LINK_MAIL && _tcsstr(link, _T("mailto:")) == NULL) {
+ if (type == LINK_MAIL && _tcsstr(link, L"mailto:") == NULL) {
_tcsncpy_s(templink, link, _TRUNCATE);
- _tcsncpy_s(link, _T("mailto:"), _TRUNCATE);
- _tcsncpy_s((link + _mstrlen(_T("mailto:"))), (_countof(link) - _mstrlen(_T("mailto:"))), templink, _TRUNCATE);
+ _tcsncpy_s(link, L"mailto:", _TRUNCATE);
+ _tcsncpy_s((link + _mstrlen(L"mailto:")), (_countof(link) - _mstrlen(L"mailto:")), templink, _TRUNCATE);
}
// Add new Element to list:
@@ -303,10 +303,10 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
cf.crTextColor = colourSet.text;
- _tcscpy_s(cf.szFaceName, _T("Arial"));
+ _tcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
- mir_sntprintf(searchText, _T("%s '%s': %d\n\n"), TranslateT("Matches for searchtext"), searchString, listCount);
+ mir_sntprintf(searchText, L"%s '%s': %d\n\n", TranslateT("Matches for searchtext"), searchString, listCount);
SendDlgItemMessage(hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)searchText);
linePos += 2;
}
@@ -314,7 +314,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
}
@@ -343,7 +343,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc {
// Create Progressbar
GetWindowRect(GetDesktopWindow(), &DesktopRect);
- hwndProgress = CreateWindow(_T("Progressbar"), TranslateT("Processing list..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
+ hwndProgress = CreateWindow(L"Progressbar", TranslateT("Processing list..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
SetWindowPos(hwndProgress,HWND_TOP,(int)(DesktopRect.right*0.5)-175,(int)(DesktopRect.bottom*0.5)-22,0,0,SWP_NOSIZE);
if ( hwndProgress != NULL )
@@ -415,19 +415,19 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _T("Arial"));
+ _tcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options.showDate != 0 )
{
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) actualElement->date);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) _T("\n\n"));
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) L"\n\n");
linePos += 3;
}
_tcscpy_s(lastDate, actualElement->date);
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof cf;
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
}
memset(&cf, 0, sizeof(cf));
@@ -443,25 +443,25 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc switch( actualElement->type ) {
case LINK_MAIL:
- type = _T("[mail]");
+ type = L"[mail]";
break;
case LINK_URL:
- type = _T("[URL ]");
+ type = L"[URL ]";
break;
case LINK_FILE:
- type = _T("[file]");
+ type = L"[file]";
break;
default:
- type = _T("[UNK ]");
+ type = L"[UNK ]";
}
- mir_sntprintf(textLine, _T("%s%s%s%s%s%s%s\n"),
- options.showDirection ? (actualElement->direction==DIRECTION_IN?_T("[in ]"):_T("[out]")) : _T(""),
- options.showDirection? _T(" ") : _T(""),
- options.showType ? type : _T(""),
- options.showType ? _T(" ") : _T(""),
- options.showTime ? actualElement->time : _T(""),
- options.showTime ? _T(" ") : _T(""),
+ mir_sntprintf(textLine, L"%s%s%s%s%s%s%s\n",
+ options.showDirection ? (actualElement->direction==DIRECTION_IN?L"[in ]":L"[out]") : L"",
+ options.showDirection? L" " : L"",
+ options.showType ? type : L"",
+ options.showType ? L" " : L"",
+ options.showTime ? actualElement->time : L"",
+ options.showTime ? L" " : L"",
actualElement->link);
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendDlgItemMessage(hDlg, IDC_MAIN, EM_REPLACESEL, FALSE,(LPARAM)textLine);
@@ -485,10 +485,10 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _T("Arial"));
+ _tcscpy_s(cf.szFaceName, L"Arial");
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)TranslateT("No messages found!\nPlease change current filter options."));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
}
}
@@ -525,31 +525,31 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD | CFM_ITALIC | CFM_COLOR;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
cf.crTextColor = TxtColourSel;
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if ( options->showLine == 1 )
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("___________________________________________\n"));
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"___________________________________________\n");
else
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _T("Arial"));
+ _tcscpy_s(cf.szFaceName, L"Arial");
cf.crTextColor = TxtColourSel;
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
if(options->showDate == 1)
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)TXT_DATE);
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM) _T("\n"));
+ SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM) L"\n");
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
// incoming
@@ -557,47 +557,47 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = InColourSel;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf );
if ( options->showDirection == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n[in ] "));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"\n[in ] ");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
if ( options->showType == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("URL "));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"URL ");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"");
if ( options->showTime == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("08:15 http://miranda-ng.org\n"));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"08:15 http://miranda-ng.org\n");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("http://miranda-ng.org\n"));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"http://miranda-ng.org\n");
// outgoing
memset(&cf, 0, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR | CFM_FACE;
cf.crTextColor = OutColourSel;
- _tcscpy_s(cf.szFaceName, _T("Courier"));
+ _tcscpy_s(cf.szFaceName, L"Courier");
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
if ( options->showDirection == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("[out] "));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"[out] ");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"");
if(options->showType == 1)
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("URL "));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"URL ");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"");
if(options->showTime == 1)
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("08:16 http://miranda-ng.org\n"));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"08:16 http://miranda-ng.org\n");
else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("http://miranda-ng.org\n"));
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)L"http://miranda-ng.org\n");
return 0;
}
@@ -661,17 +661,17 @@ void GetFilterText(HMENU listMenu, LPTSTR filter, size_t max_len) if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
{
//incoming URLs
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_INCOMING, TXT_URLSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_INCOMING, TXT_URLSONLY);
}
else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
{
//outgoing URLs
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_OUTGOING, TXT_URLSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_OUTGOING, TXT_URLSONLY);
}
else
{
// both directions (URL)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, "", TXT_URLSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, "", TXT_URLSONLY);
}
}
else if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED )
@@ -679,17 +679,17 @@ void GetFilterText(HMENU listMenu, LPTSTR filter, size_t max_len) if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
{
//incoming mail
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_INCOMING, TXT_MAILSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_INCOMING, TXT_MAILSONLY);
}
else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
{
//outgoing mail
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_OUTGOING, TXT_MAILSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_OUTGOING, TXT_MAILSONLY);
}
else
{
// both directions (mail)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, "", TXT_MAILSONLY);
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, "", TXT_MAILSONLY);
}
}
else
@@ -697,17 +697,17 @@ void GetFilterText(HMENU listMenu, LPTSTR filter, size_t max_len) if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
{
//incoming (both)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_INCOMING, "");
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_INCOMING, "");
}
else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
{
//outgoing (both)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_OUTGOING, "");
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_OUTGOING, "");
}
else
{
// no filter
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TXT_FILTER, TXT_NOFILTER, "");
+ mir_sntprintf(filter, max_len, L"%s: %s %s", TXT_FILTER, TXT_NOFILTER, "");
}
}
}
@@ -726,7 +726,7 @@ void DrawLine(HWND hDlg, size_t lineLen) }
line[lineLen+18] = _T('\0');
SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)line);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)L"\n");
return;
}
@@ -1241,13 +1241,13 @@ BOOL SaveEditAsStream( HWND hDlg ) TCHAR szFilename[MAX_PATH];
// Initialize filename field
- _tcscpy_s(szFilename, _T("*.rtf"));
+ _tcscpy_s(szFilename, L"*.rtf");
// Fill in OPENFILENAME struct
memset(&ofn, 0, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
TCHAR temp[MAX_PATH];
- mir_sntprintf(temp, _T("%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c"), TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
+ mir_sntprintf(temp, L"%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c", TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrFile = szFilename;
ofn.nMaxFile = _countof(szFilename);
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp index d9a0151797..76e8b47dbe 100644 --- a/plugins/HistoryStats/src/bandctrlimpl.cpp +++ b/plugins/HistoryStats/src/bandctrlimpl.cpp @@ -8,7 +8,7 @@ * BandCtrlImpl
*/
-const TCHAR* BandCtrlImpl::m_ClassName = _T("HistoryStatsBand");
+const TCHAR* BandCtrlImpl::m_ClassName = L"HistoryStatsBand";
const int BandCtrlImpl::m_PollId = 100;
const int BandCtrlImpl::m_PollDelay = 50;
@@ -265,7 +265,7 @@ void BandCtrlImpl::onWMPaint() HGDIOBJ hOldFont = SelectObject(hDC, m_hFont);
SIZE textSize;
- GetTextExtentPoint32(hDC, _T("X"), 1, &textSize);
+ GetTextExtentPoint32(hDC, L"X", 1, &textSize);
SetBkMode(hDC, TRANSPARENT);
SetTextColor(hDC, GetSysColor(bBandEnabled ? COLOR_BTNTEXT : COLOR_GRAYTEXT));
@@ -461,8 +461,8 @@ int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton) id.bChecked = bool_(pButton->dwFlags & BCF_CHECKED);
id.bVisible = !(pButton->dwFlags & BCF_HIDDEN);
id.bDropDown = bool_(pButton->dwFlags & BCF_DROPDOWN);
- id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : _T("");
- id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : _T("");
+ id.text = (pButton->dwFlags & BCF_TEXT) ? TranslateTS(pButton->m_szText) : L"";
+ id.tooltip = (pButton->dwFlags & BCF_TOOLTIP) ? TranslateTS(pButton->m_szTooltip) : L"";
id.uTTId = -1;
id.dwData = (pButton->dwFlags & BCF_DATA) ? pButton->dwData : 0;
id.bEnabled = !(pButton->dwFlags & BCF_DISABLED);
@@ -622,7 +622,7 @@ void BandCtrlImpl::recalcButtonRects() else if (m_Items[i].uTTId == -1 && m_Items[i].bVisible && !m_Items[i].tooltip.empty()) {
// add a tooltip, if we don't have a tooltip but are now visible
if (!m_hTooltip)
- m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
+ m_hTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
TOOLINFO ti = { sizeof(TOOLINFO), TTF_SUBCLASS, m_hWnd, UINT_PTR(i+1), m_Items[i].rItem, NULL,
const_cast<TCHAR*>(m_Items[i].tooltip.c_str()), // lpszText
diff --git a/plugins/HistoryStats/src/colbase_words.cpp b/plugins/HistoryStats/src/colbase_words.cpp index 9d771df800..8bb4840924 100644 --- a/plugins/HistoryStats/src/colbase_words.cpp +++ b/plugins/HistoryStats/src/colbase_words.cpp @@ -194,7 +194,7 @@ void ColBaseWords::impl_configRead(const SettingsTree& settings) upto_each_(i, nCount)
{
- m_FilterWords.insert(settings.readStr((con::KeyFilterWords + utils::intToString(i)).c_str(), _T("")));
+ m_FilterWords.insert(settings.readStr((con::KeyFilterWords + utils::intToString(i)).c_str(), L""));
}
}
@@ -224,8 +224,8 @@ void ColBaseWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup) m_hSource = Opt.insertRadio (hTemp, NULL, TranslateT("Incoming messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("Outgoing messages"));
Opt.insertRadio (hTemp, m_hSource, TranslateT("All messages"));
- m_hMinLength = Opt.insertEdit(hGroup, TranslateT("Ignore words shorter than (chars)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hMaxLength = Opt.insertEdit(hGroup, TranslateT("Ignore words longer than (chars, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hMinLength = Opt.insertEdit(hGroup, TranslateT("Ignore words shorter than (chars)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hMaxLength = Opt.insertEdit(hGroup, TranslateT("Ignore words longer than (chars, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
m_hFilterLinks = Opt.insertCheck(hGroup, TranslateT("Filter URLs/e-mail addresses"));
Opt.insertButton(hGroup, TranslateT("Filter words/messages"), TranslateT("Define..."), 0, Settings::biFilterWords);
@@ -249,7 +249,7 @@ void ColBaseWords::impl_configFromUI(OptionsCtrl& Opt) ext::string ColBaseWords::impl_contactDataGetUID() const
{
- ext::string strUID = ext::str(ext::format(_T("words-|-|-|-|"))
+ ext::string strUID = ext::str(ext::format(L"words-|-|-|-|")
% m_nSource
% m_nMinLength
% m_nMaxLength
@@ -257,7 +257,7 @@ ext::string ColBaseWords::impl_contactDataGetUID() const citer_each_(ColFilterSet, i, m_FilterWords)
{
- strUID += _T("-");
+ strUID += L"-";
strUID += *i;
}
diff --git a/plugins/HistoryStats/src/column.cpp b/plugins/HistoryStats/src/column.cpp index 82c95c61ce..1a0d85f2fb 100644 --- a/plugins/HistoryStats/src/column.cpp +++ b/plugins/HistoryStats/src/column.cpp @@ -54,7 +54,7 @@ void Column::FactoryList::initList() ext::string Column::IDProvider::getID()
{
- ext::string s = _T("q");
+ ext::string s = L"q";
int val = m_nNextID++;
while (val > 0) {
@@ -106,15 +106,15 @@ void Column::writeRowspanTD(ext::ostream& tos, const ext::string& innerHTML, int {
int curRowSpan = (row < numRows) ? 1 : (rowSpan - numRows + 1);
- tos << _T("<td");
+ tos << L"<td";
if (colSpan > 1)
- tos << _T(" colspan=\"") << colSpan << _T("\"");
+ tos << L" colspan=\"" << colSpan << L"\"";
if (curRowSpan > 1)
- tos << _T(" rowspan=\"") << curRowSpan << _T("\"");
+ tos << L" rowspan=\"" << curRowSpan << L"\"";
- tos << _T(">") << innerHTML << _T("</td>") << ext::endl;
+ tos << L">" << innerHTML << L"</td>" << ext::endl;
}
void Column::copyAttrib(const Column* pSource)
@@ -130,7 +130,7 @@ const ext::string Column::getCustomTitle(const ext::string& strShort, const ext: ext::string strTitle = utils::htmlEscape(m_CustomTitle.empty() ? (m_pSettings->m_TableHeaderVerbose ? strLong : strShort) : m_CustomTitle);
if (m_pSettings->m_HeaderTooltips && (!m_pSettings->m_HeaderTooltipsIfCustom || !m_CustomTitle.empty() || (!m_pSettings->m_TableHeaderVerbose && strShort != strLong)))
- strTitle = _T("<span title=\"") + utils::htmlEscape(strLong) + _T("\">") + strTitle + _T("</span>");
+ strTitle = L"<span title=\"" + utils::htmlEscape(strLong) + L"\">" + strTitle + L"</span>";
return strTitle;
}
diff --git a/plugins/HistoryStats/src/column.h b/plugins/HistoryStats/src/column.h index 7d8bd1d0c4..1c1aaca70e 100644 --- a/plugins/HistoryStats/src/column.h +++ b/plugins/HistoryStats/src/column.h @@ -137,7 +137,7 @@ protected: public:
Column()
- : m_bEnabled(true), m_CustomTitle(_T("")),
+ : m_bEnabled(true), m_CustomTitle(L""),
m_nContactDataSlot(-1), m_nContactDataTransformSlot(-1),
m_pStatistic(NULL), m_pSettings(NULL), m_pCharMapper(NULL),
m_bUsePNG(false)
@@ -155,7 +155,7 @@ public: void setCustomTitle(const ext::string& customTitle) { m_CustomTitle = customTitle; }
const ext::string getCustomTitle() const { return m_CustomTitle; }
const ext::string getCustomTitle(const ext::string& strShort, const ext::string& strLong) const;
- ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + _T(" (") + TranslateTS(getTitle()) + _T(")")); }
+ ext::string getTitleForOptions() { return m_CustomTitle.empty() ? TranslateTS(getTitle()) : (m_CustomTitle + L" (" + TranslateTS(getTitle()) + L")"); }
void setHelpers(Statistic* pStatistic, Settings* pSettings, Settings::CharMapper* pCharMapper) { m_pStatistic = pStatistic; m_pSettings = pSettings; m_pCharMapper = pCharMapper; }
Statistic* getStatistic() const { return m_pStatistic; }
diff --git a/plugins/HistoryStats/src/column_chatduration.cpp b/plugins/HistoryStats/src/column_chatduration.cpp index 43e96e2e15..4954f693b8 100644 --- a/plugins/HistoryStats/src/column_chatduration.cpp +++ b/plugins/HistoryStats/src/column_chatduration.cpp @@ -64,13 +64,13 @@ Column::StyleList ColChatDuration::impl_outputGetAdditionalStyles(IDProvider& id {
m_CSS = idp.getID();
- l.push_back(StylePair(_T("td.") + m_CSS, _T("vertical-align: middle; padding: 2px 2px 2px 2px;")));
- l.push_back(StylePair(_T("td.") + m_CSS + _T(" div.n"), _T("text-align: center;")));
+ l.push_back(StylePair(L"td." + m_CSS, L"vertical-align: middle; padding: 2px 2px 2px 2px;"));
+ l.push_back(StylePair(L"td." + m_CSS + L" div.n", L"text-align: center;"));
if (!usePNG())
{
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -35px; width: 70px; height: 15px; background-color: ") + utils::colorToHTML(con::ColorBarBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; left: 0px; height: 15px; overflow: hidden; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -35px; width: 70px; height: 15px; background-color: " + utils::colorToHTML(con::ColorBarBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; left: 0px; height: 15px; overflow: hidden; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
}
}
@@ -89,7 +89,7 @@ void ColChatDuration::impl_outputRenderHeader(ext::ostream& tos, int row, int ro if (row == 1)
{
ext::string szLong = TranslateTS(szVisModeDesc[m_nVisMode]);
- writeRowspanTD(tos, getCustomTitle(TranslateT("Chat duration"), szLong) + (m_bGraph ? _T("<div style=\"width: 70px;\"></div>") : _T("")), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateT("Chat duration"), szLong) + (m_bGraph ? L"<div style=\"width: 70px;\"></div>" : L""), row, 1, rowSpan);
}
}
@@ -137,11 +137,11 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con // begin output
if (m_bGraph)
{
- tos << _T("<td class=\"") << m_CSS;
+ tos << L"<td class=\"" << m_CSS;
}
else
{
- tos << _T("<td class=\"num");
+ tos << L"<td class=\"num";
}
// read and format data
@@ -176,26 +176,26 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con {
if (i != m_nVisMode)
{
- strTooltip += ext::str(ext::kformat(TranslateTS(szPrefixes[i])) % _T("#{amount}") * strAll[i]);
+ strTooltip += ext::str(ext::kformat(TranslateTS(szPrefixes[i])) % L"#{amount}" * strAll[i]);
++nSegments;
if (nSegments < 3)
{
- strTooltip += _T(" / ");
+ strTooltip += L" / ";
}
}
}
- tos << _T("\" title=\"") << utils::htmlEscape(strTooltip) << _T("\">");
+ tos << L"\" title=\"" << utils::htmlEscape(strTooltip) << L"\">";
}
else
{
- tos << _T("\">");
+ tos << L"\">";
}
if (m_bGraph)
{
- tos << _T("<div class=\"n\">")
+ tos << L"<div class=\"n\">"
<< utils::htmlEscape(strAll[m_nVisMode]);
if (display == asContact || m_nVisMode != 3)
@@ -226,23 +226,23 @@ void ColChatDuration::impl_outputRenderRow(ext::ostream& tos, const Contact& con if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<br/><img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<br/><img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
}
else
{
- tos << _T("</div>")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div style=\"width: ") << barW << _T("px;\"></div>");
+ tos << L"</div>"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div style=\"width: " << barW << L"px;\"></div>";
}
}
- tos << _T("</div>");
+ tos << L"</div>";
}
else
{
tos << utils::htmlEscape(strAll[m_nVisMode]);
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp index 657606ea1e..5b2c859d8c 100644 --- a/plugins/HistoryStats/src/column_events.cpp +++ b/plugins/HistoryStats/src/column_events.cpp @@ -86,7 +86,7 @@ void ColEvents::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, &Contact::getTotalFiles,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped((contact.*getData[m_nSource])())
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_group.cpp b/plugins/HistoryStats/src/column_group.cpp index 61db6bd224..740e97d0e1 100644 --- a/plugins/HistoryStats/src/column_group.cpp +++ b/plugins/HistoryStats/src/column_group.cpp @@ -20,12 +20,12 @@ void ColGroup::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D ext::string groupName = contact.getGroup();
// replace subgroup separator with something better (really better?)
- utils::replaceAllInPlace(groupName, _T("\\"), _T(" > "));
+ utils::replaceAllInPlace(groupName, L"\\", L" > ");
- tos << _T("<td>") << utils::htmlEscape(groupName) << _T("</td>") << ext::endl;
+ tos << L"<td>" << utils::htmlEscape(groupName) << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td> </td>");
+ tos << L"<td> </td>";
}
}
diff --git a/plugins/HistoryStats/src/column_inout.cpp b/plugins/HistoryStats/src/column_inout.cpp index 7874e1c1b6..6bdc88909c 100644 --- a/plugins/HistoryStats/src/column_inout.cpp +++ b/plugins/HistoryStats/src/column_inout.cpp @@ -112,8 +112,8 @@ void ColInOut::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource])
- % _T("#{unit}") * TranslateTS(szUnitDesc[m_nAbsTime]));
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateTS(szUnitDesc[m_nAbsTime]));
}
writeRowspanTD(tos, getCustomTitle(TranslateTS(szShortDesc[m_nSource / 3]), strTitle), row, 1, rowSpan);
@@ -136,9 +136,9 @@ void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D &Contact::getTotalChats,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped((contact.*getData[m_nSource])())
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
@@ -160,8 +160,8 @@ void ColInOut::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D 60.0 * 60.0 * 24.0 * 30.0,
};
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::floatToGrouped((contact.*getData[m_nSource])() * avgFactor[m_nAbsTime], 1)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_inoutgraph.cpp b/plugins/HistoryStats/src/column_inoutgraph.cpp index 34e696d408..be00a85cb6 100644 --- a/plugins/HistoryStats/src/column_inoutgraph.cpp +++ b/plugins/HistoryStats/src/column_inoutgraph.cpp @@ -99,24 +99,24 @@ Column::StyleList ColInOutGraph::impl_outputGetAdditionalStyles(IDProvider& idp) m_CSS = idp.getID();
- l.push_back(StylePair(_T("td.") + m_CSS, _T("vertical-align: middle; padding: 2px 2px 2px 2px;")));
+ l.push_back(StylePair(L"td." + m_CSS, L"vertical-align: middle; padding: 2px 2px 2px 2px;"));
if (m_bShowSum)
{
- l.push_back(StylePair(_T("td.") + m_CSS + _T(" div.n"), _T("text-align: center;")));
+ l.push_back(StylePair(L"td." + m_CSS + L" div.n", L"text-align: center;"));
}
if (!usePNG())
{
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -50px; width: 100px; height: 15px; background-color: ") + utils::colorToHTML(con::ColorBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; height: 15px; overflow: hidden; font-size: 80%; color: ") + utils::colorToHTML(con::ColorBack) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.obar"), _T("left: 0px; background-color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.ibar"), _T("right: 0px; background-color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -50px; width: 100px; height: 15px; background-color: " + utils::colorToHTML(con::ColorBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; height: 15px; overflow: hidden; font-size: 80%; color: " + utils::colorToHTML(con::ColorBack) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.obar", L"left: 0px; background-color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.ibar", L"right: 0px; background-color: " + utils::colorToHTML(con::ColorIn) + L";"));
if (m_bGraphPercent)
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.otext"), _T("left: 2px; width: 48px; text-align: left; z-index: 9;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.itext"), _T("right: 2px; width: 48px; text-align: right; z-index: 9;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.otext", L"left: 2px; width: 48px; text-align: left; z-index: 9;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.itext", L"right: 2px; width: 48px; text-align: right; z-index: 9;"));
}
}
@@ -155,11 +155,11 @@ void ColInOutGraph::impl_outputRenderHeader(ext::ostream& tos, int row, int rowS else
{
strTitle = str(ext::kformat(TranslateT("#{data} per #{unit}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource])
- % _T("#{unit}") * TranslateTS(szSourceUnit[m_nAbsTime]));
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource])
+ % L"#{unit}" * TranslateTS(szSourceUnit[m_nAbsTime]));
}
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szSourceDesc[m_nSource]), strTitle) + _T("<div style=\"width: 100px;\"></div>"), 1, 2, rowSpan, 2);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szSourceDesc[m_nSource]), strTitle) + L"<div style=\"width: 100px;\"></div>", 1, 2, rowSpan, 2);
}
else if (row == 2)
{
@@ -194,7 +194,7 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta double avgTotal = avgFactor[m_nAbsTime] * (contact.*getAvgTotal[m_nSource])();
// begin output
- tos << _T("<td colspan=\"2\" class=\"") << m_CSS;
+ tos << L"<td colspan=\"2\" class=\"" << m_CSS;
if (m_bDetail)
{
@@ -213,26 +213,26 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta if (m_bDetailPercent)
{
- tos << _T("\" title=\"")
+ tos << L"\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_amount} (#{out_ratio}) / [In] #{in_amount} (#{in_ratio})"))
- % _T("#{out_amount}") * strOut
- % _T("#{out_ratio}") * utils::ratioToPercent(numOut, numTotal)
- % _T("#{in_amount}") * strIn
- % _T("#{in_ratio}") * utils::ratioToPercent(numIn, numTotal)))
- << _T("\">");
+ % L"#{out_amount}" * strOut
+ % L"#{out_ratio}" * utils::ratioToPercent(numOut, numTotal)
+ % L"#{in_amount}" * strIn
+ % L"#{in_ratio}" * utils::ratioToPercent(numIn, numTotal)))
+ << L"\">";
}
else
{
- tos << _T("\" title=\"")
+ tos << L"\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_amount} / [In] #{in_amount}"))
- % _T("#{out_amount}") * strOut
- % _T("#{in_amount}") * strIn))
- << _T("\">");
+ % L"#{out_amount}" * strOut
+ % L"#{in_amount}" * strIn))
+ << L"\">";
}
}
else
{
- tos << _T("\">");
+ tos << L"\">";
}
if (numOut + numIn == 0)
@@ -256,12 +256,12 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta if (usePNG())
{
- tos << _T("<div class=\"n\">");
+ tos << L"<div class=\"n\">";
if (m_bShowSum)
{
tos << (m_bAbsolute ? utils::intToGrouped(numTotal) : utils::floatToGrouped(avgTotal, 1))
- << _T("<br/>");
+ << L"<br/>";
}
// draw graph
@@ -298,7 +298,7 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS,
- _T("Verdana")
+ L"Verdana"
};
HFONT hFont = CreateFontIndirect(&lf);
@@ -317,40 +317,40 @@ void ColInOutGraph::impl_outputRenderRow(ext::ostream& tos, const Contact& conta if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</div>");
+ tos << L"</div>";
}
else
{
if (m_bShowSum)
{
- tos << _T("<div class=\"n\">")
+ tos << L"<div class=\"n\">"
<< (m_bAbsolute ? utils::intToGrouped(numTotal) : utils::floatToGrouped(avgTotal, 1))
- << _T("</div>");
+ << L"</div>";
}
- tos << _T("<div class=\"") << m_CSS << _T("\">");
+ tos << L"<div class=\"" << m_CSS << L"\">";
if (outW != 0)
{
- tos << _T("<div class=\"obar\" style=\"width: ") << outW << _T("px;\"></div>");
+ tos << L"<div class=\"obar\" style=\"width: " << outW << L"px;\"></div>";
}
if (inW != 0)
{
- tos << _T("<div class=\"ibar\" style=\"width: ") << inW << _T("px;\"></div>");
+ tos << L"<div class=\"ibar\" style=\"width: " << inW << L"px;\"></div>";
}
if (m_bGraphPercent)
{
- tos << _T("<div class=\"otext\">") << utils::ratioToPercent(numOut, allNum) << _T("</div>");
- tos << _T("<div class=\"itext\">") << utils::ratioToPercent(numIn, allNum) << _T("</div>");
+ tos << L"<div class=\"otext\">" << utils::ratioToPercent(numOut, allNum) << L"</div>";
+ tos << L"<div class=\"itext\">" << utils::ratioToPercent(numIn, allNum) << L"</div>";
}
- tos << _T("</div>");
+ tos << L"</div>";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_nick.cpp b/plugins/HistoryStats/src/column_nick.cpp index 95b6c2d23d..4ab72104ec 100644 --- a/plugins/HistoryStats/src/column_nick.cpp +++ b/plugins/HistoryStats/src/column_nick.cpp @@ -58,7 +58,7 @@ void ColNick::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) c void ColNick::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
{
- tos << _T("<td");
+ tos << L"<td";
if (m_bDetail || (m_bContactCount && display != asContact))
{
@@ -76,30 +76,30 @@ void ColNick::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, Di if (m_bDetail && !(m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("[First] #{first_time} / [Last] #{last_time}"))
- % _T("#{first_time}") * strFirstTime
- % _T("#{last_time}") * strLastTime));
+ % L"#{first_time}" * strFirstTime
+ % L"#{last_time}" * strLastTime));
}
else if (m_bDetail && (m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{count} contacts / [First] #{first_time} / [Last] #{last_time}"))
- % _T("#{count}") * contact.getNumContacts()
- % _T("#{first_time}") * strFirstTime
- % _T("#{last_time}") * strLastTime));
+ % L"#{count}" * contact.getNumContacts()
+ % L"#{first_time}" * strFirstTime
+ % L"#{last_time}" * strLastTime));
}
else // if (!m_bDetail && (m_bContactCount && display != asContact))
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{count} contacts"))
- % _T("#{count}") * contact.getNumContacts()));
+ % L"#{count}" * contact.getNumContacts()));
}
- tos << _T(" title=\"") << strTooltip << _T("\">");
+ tos << L" title=\"" << strTooltip << L"\">";
}
- else tos << _T(">");
+ else tos << L">";
if (display == asContact)
- tos << utils::htmlEscape(contact.getNick()) << _T("</td>") << ext::endl;
+ tos << utils::htmlEscape(contact.getNick()) << L"</td>" << ext::endl;
else if (display == asOmitted)
- tos << TranslateT("Omitted") << _T("</td>") << ext::endl;
+ tos << TranslateT("Omitted") << L"</td>" << ext::endl;
else
- tos << TranslateT("Totals") << _T("</td>") << ext::endl;
+ tos << TranslateT("Totals") << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_protocol.cpp b/plugins/HistoryStats/src/column_protocol.cpp index e3a03368f8..ac583492ac 100644 --- a/plugins/HistoryStats/src/column_protocol.cpp +++ b/plugins/HistoryStats/src/column_protocol.cpp @@ -14,7 +14,7 @@ void ColProtocol::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa void ColProtocol::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType display)
{
if (display == asContact)
- tos << _T("<td>") << utils::htmlEscape(contact.getProtocol()) << _T("</td>") << ext::endl;
+ tos << L"<td>" << utils::htmlEscape(contact.getProtocol()) << L"</td>" << ext::endl;
else
- tos << _T("<td> </td>");
+ tos << L"<td> </td>";
}
diff --git a/plugins/HistoryStats/src/column_rank.cpp b/plugins/HistoryStats/src/column_rank.cpp index 140ae94adc..93f2027961 100644 --- a/plugins/HistoryStats/src/column_rank.cpp +++ b/plugins/HistoryStats/src/column_rank.cpp @@ -19,9 +19,9 @@ void ColRank::impl_outputBegin() void ColRank::impl_outputRenderRow(ext::ostream& tos, const Contact&, DisplayType display)
{
if (display == asContact)
- tos << _T("<td class=\"num\">")
- << utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{rank}.")) % _T("#{rank}") * (m_nNextRank++)))
- << _T("</td>") << ext::endl;
+ tos << L"<td class=\"num\">"
+ << utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{rank}.")) % L"#{rank}" * (m_nNextRank++)))
+ << L"</td>" << ext::endl;
else
- tos << _T("<td> </td>");
+ tos << L"<td> </td>";
}
diff --git a/plugins/HistoryStats/src/column_split.cpp b/plugins/HistoryStats/src/column_split.cpp index 29e2ab4970..0b3be3ca4f 100644 --- a/plugins/HistoryStats/src/column_split.cpp +++ b/plugins/HistoryStats/src/column_split.cpp @@ -66,8 +66,8 @@ void ColSplit::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup) hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
m_hBlockUnit = Opt.insertCombo(hTemp, TranslateT("Bar unit"));
- m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per bar"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Bars per graph"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per bar"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Bars per graph"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
@@ -139,7 +139,7 @@ ext::string ColSplit::impl_contactDataGetUID() const {
SplitParams params = getParams();
- return ext::str(ext::format(_T("split-|-|-|-|-|"))
+ return ext::str(ext::format(L"split-|-|-|-|-|")
% m_nSource
% m_nSourceType
% params.hours_in_block
@@ -249,13 +249,13 @@ Column::StyleList ColSplit::impl_outputGetAdditionalStyles(IDProvider& idp) m_CSS = idp.getID();
l.push_back(StylePair(
- _T("div.") + m_CSS,
- ext::str(ext::format(_T("position: relative; left: 50%; margin-left: -|px; width: |px; height: 50px;"))
+ L"div." + m_CSS,
+ ext::str(ext::format(L"position: relative; left: 50%; margin-left: -|px; width: |px; height: 50px;")
% ((5 * params.blocks_in_column - 1) / 2)
% (5 * params.blocks_in_column - 1))));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 4px; height: 50px; overflow: hidden;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div"), _T("position: absolute; left: 0px; width: 4px; height: 50px; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 4px; height: 50px; overflow: hidden;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div", L"position: absolute; left: 0px; width: 4px; height: 50px; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
}
return l;
@@ -285,10 +285,10 @@ void ColSplit::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) {
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % _T("#{data}") * TranslateTS(szSourceDesc[3 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateTS(szSourceDesc[3 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(_T("<div style=\"width: |px;\"></div>")) % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + ext::str(ext::format(L"<div style=\"width: |px;\"></div>") % (5 * params.blocks_in_column - 1)), row, 1, rowSpan);
}
}
@@ -370,7 +370,7 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D if (usePNG())
{
- tos << _T("<td class=\"img_bottom\">");
+ tos << L"<td class=\"img_bottom\">";
// draw graph
Canvas canvas(5 * params.blocks_in_column - 1, 50);
@@ -400,15 +400,15 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_bottom\">")
- << _T("<div class=\"") << m_CSS << _T("\">") << ext::endl;
+ tos << L"<td class=\"bars_bottom\">"
+ << L"<div class=\"" << m_CSS << L"\">" << ext::endl;
upto_each_(j, params.blocks_in_column)
{
@@ -421,41 +421,41 @@ void ColSplit::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D if (params.effective_vis_mode == 0)
{
divTitle = ext::str(ext::kformat(TranslateT("[#{hour}:00-#{hour}:59] #{amount}"))
- % _T("#{hour}") * utils::intToPadded(j, 2)
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{hour}" * utils::intToPadded(j, 2)
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
else if (params.effective_vis_mode == 1)
{
divTitle = ext::str(ext::kformat(TranslateT("[#{day}] #{amount}"))
- % _T("#{day}") * utils::stripPrefix(_T("wday3:"), TranslateTS(szWDayName[j]))
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{day}" * utils::stripPrefix(L"wday3:", TranslateTS(szWDayName[j]))
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
else
{
divTitle = ext::str(ext::kformat(TranslateT("#{amount}"))
- % _T("#{amount}") * utils::intToGrouped(part_top));
+ % L"#{amount}" * utils::intToGrouped(part_top));
}
- tos << _T("<div title=\"") << utils::htmlEscape(divTitle) << _T("\" style=\"left: ") << (5 * j) << _T("px;\">");
+ tos << L"<div title=\"" << utils::htmlEscape(divTitle) << L"\" style=\"left: " << (5 * j) << L"px;\">";
}
else if (part_top != 0)
{
- tos << _T("<div style=\"left: ") << (5 * j) << _T("px;\">");
+ tos << L"<div style=\"left: " << (5 * j) << L"px;\">";
}
if (part_top != 0)
{
int bar_len = (50 * part_top + top - 1) / top;
- tos << _T("<div style=\"top: ") << (50 - bar_len) << _T("px;\"></div>");
+ tos << L"<div style=\"top: " << (50 - bar_len) << L"px;\"></div>";
}
if (m_bDetail || part_top != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_splittimeline.cpp b/plugins/HistoryStats/src/column_splittimeline.cpp index e9db4d32fc..17e139ba78 100644 --- a/plugins/HistoryStats/src/column_splittimeline.cpp +++ b/plugins/HistoryStats/src/column_splittimeline.cpp @@ -73,21 +73,21 @@ void ColSplitTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGrou OptionsCtrl::Radio hTempRadio;
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
- m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hGroup, TranslateT("\"Split\" type"));
m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Hours of day"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hHODGroup = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hHODGroup = Opt.insertEdit (m_hVisMode, TranslateT("Number of days to group"), L"", OptionsCtrl::OCF_NUMBER);
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Days of week"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hDOWGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hDOWGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of weeks to group"), L"", OptionsCtrl::OCF_NUMBER);
hTempRadio = Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Custom (for experts only)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Column setup"));
m_hBlockUnit = Opt.insertCombo(hTemp, TranslateT("Block unit"));
- m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hUnitsPerBlock = Opt.insertEdit (hTemp, TranslateT("Units per block"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hBlocks = Opt.insertEdit (hTemp, TranslateT("Blocks per column"), L"", OptionsCtrl::OCF_NUMBER);
hTemp = Opt.insertGroup(hTempRadio, TranslateT("Graph alignment"));
m_hGraphAlign = Opt.insertRadio(hTemp, NULL, TranslateT("Align on day boundary"));
Opt.insertRadio(hTemp, m_hGraphAlign, TranslateT("Align on week boundary"));
- m_hCustomGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hCustomGroup = Opt.insertEdit (hTempRadio, TranslateT("Number of columns to group"), L"", OptionsCtrl::OCF_NUMBER);
m_hTopPerColumn = Opt.insertCheck(hGroup, TranslateT("Calculate maximum per column (not per graph)"));
static const TCHAR* sourceTexts[] = {
@@ -162,7 +162,7 @@ ext::string ColSplitTimeline::impl_contactDataGetUID() const {
SplitParams params = getParams();
- return ext::str(ext::format(_T("splittimeline-|-|-|"))
+ return ext::str(ext::format(L"splittimeline-|-|-|")
% m_nSource
% params.hours_in_block
% params.alignment);
@@ -275,10 +275,10 @@ void ColSplitTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int r {
SplitParams params = getParams();
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[params.effective_vis_mode])
- % _T("#{data}") * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{type}" * TranslateTS(szTypeDesc[params.effective_vis_mode])
+ % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + _T("<div style=\"width: ") + utils::intToString(m_nTimelineWidth) + _T("px;\"></div>"), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[params.effective_vis_mode]), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
}
@@ -459,7 +459,7 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co }
}
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -548,10 +548,10 @@ void ColSplitTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& co if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact, DisplayType)
@@ -559,7 +559,7 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co SplitParams params = getParams();
const TimelineMap* pData = reinterpret_cast<const TimelineMap*>(contact.getSlot(contactDataSlotGet()));
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -631,8 +631,8 @@ void ColSplitTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& co if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/column_timeline.cpp b/plugins/HistoryStats/src/column_timeline.cpp index e3b6596c06..b6a5dc55c5 100644 --- a/plugins/HistoryStats/src/column_timeline.cpp +++ b/plugins/HistoryStats/src/column_timeline.cpp @@ -43,9 +43,9 @@ void ColTimeline::impl_configWrite(SettingsTree& settings) const void ColTimeline::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
{
m_hSource = Opt.insertCombo(hGroup, TranslateT("Data source"));
- m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreOld = Opt.insertEdit(hGroup, TranslateT("Drop everything older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Details for every bar (tooltip)"));
- m_hDays = Opt.insertEdit (hGroup, TranslateT("Number of days to group"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hDays = Opt.insertEdit (hGroup, TranslateT("Number of days to group"), L"", OptionsCtrl::OCF_NUMBER);
static const TCHAR* sourceTexts[] = {
LPGENT("Characters (incoming)"),
@@ -96,7 +96,7 @@ int ColTimeline::impl_configGetRestrictions(ext::string* pDetails) const ext::string ColTimeline::impl_contactDataGetUID() const
{
- return ext::str(ext::format(_T("timeline-|")) % m_nSource);
+ return ext::str(ext::format(L"timeline-|") % m_nSource);
}
void ColTimeline::impl_contactDataPrepare(Contact& contact) const
@@ -168,20 +168,20 @@ Column::StyleList ColTimeline::impl_outputGetAdditionalStyles(IDProvider& idp) {
m_CSS = idp.getID();
- l.push_back(StylePair(_T("div.") + m_CSS, _T("position: relative; left: 50%; margin-left: -") + utils::intToString(m_nTimelineWidth / 2) + _T("px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; height: 49px;")));
+ l.push_back(StylePair(L"div." + m_CSS, L"position: relative; left: 50%; margin-left: -" + utils::intToString(m_nTimelineWidth / 2) + L"px; width: " + utils::intToString(m_nTimelineWidth) + L"px; height: 49px;"));
if (m_nSourceType != 3)
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div"), _T("position: absolute; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorBar) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.l"), _T("position: absolute; top: 24px; left: 0px; height: 1px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; background-color: ") + utils::colorToHTML(con::ColorBarLine) + _T("; z-index: 9;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div", L"position: absolute; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorBar) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.l", L"position: absolute; top: 24px; left: 0px; height: 1px; width: " + utils::intToString(m_nTimelineWidth) + L"px; background-color: " + utils::colorToHTML(con::ColorBarLine) + L"; z-index: 9;"));
}
else
{
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div"), _T("position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden; z-index: 9;")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div.o"), _T("position: absolute; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div div.i"), _T("position: absolute; top: 24px; left: 0px; width: 3px; background-color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
- l.push_back(StylePair(_T("div.") + m_CSS + _T(" div.l"), _T("position: absolute; top: 24px; left: 0px; height: 1px; width: ") + utils::intToString(m_nTimelineWidth) + _T("px; background-color: ") + utils::colorToHTML(con::ColorIOLine) + _T("; z-index: 8;")));
+ l.push_back(StylePair(L"div." + m_CSS + L" div", L"position: absolute; top: 0px; width: 3px; height: 49px; overflow: hidden; z-index: 9;"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div.o", L"position: absolute; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div div.i", L"position: absolute; top: 24px; left: 0px; width: 3px; background-color: " + utils::colorToHTML(con::ColorIn) + L";"));
+ l.push_back(StylePair(L"div." + m_CSS + L" div.l", L"position: absolute; top: 24px; left: 0px; height: 1px; width: " + utils::intToString(m_nTimelineWidth) + L"px; background-color: " + utils::colorToHTML(con::ColorIOLine) + L"; z-index: 8;"));
}
}
@@ -208,9 +208,9 @@ void ColTimeline::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpa if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("Timeline for #{data}"))
- % _T("#{data}") * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
+ % L"#{data}" * TranslateTS(szSourceDesc[4 * m_nSource + m_nSourceType]));
- writeRowspanTD(tos, getCustomTitle(TranslateT("Timeline"), strTitle) + _T("<div style=\"width: ") + utils::intToString(m_nTimelineWidth) + _T("px;\"></div>"), row, 1, rowSpan);
+ writeRowspanTD(tos, getCustomTitle(TranslateT("Timeline"), strTitle) + L"<div style=\"width: " + utils::intToString(m_nTimelineWidth) + L"px;\"></div>", row, 1, rowSpan);
}
}
@@ -271,7 +271,7 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact if (usePNG())
{
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -311,16 +311,16 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_middle\">")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div class=\"l\"></div>") << ext::endl;
+ tos << L"<td class=\"bars_middle\">"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div class=\"l\"></div>" << ext::endl;
for (curDay = m_nFirstDay; curDay <= m_nLastDay; curDay += m_nDays)
{
@@ -342,42 +342,42 @@ void ColTimeline::outputRenderRowInOut(ext::ostream& tos, const Contact& contact {
int rightDay = min(curDay + m_nDays - 1, m_nLastDay);
- tos << _T("<div title=\"");
+ tos << L"<div title=\"";
if (rightDay != curDay)
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{start_date}-#{end_date}] #{amount}"))
- % _T("#{start_date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{end_date}") * utils::timestampToDate(rightDay * 86400)
- % _T("#{amount}") * utils::intToGrouped(part_top)));
+ % L"#{start_date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{end_date}" * utils::timestampToDate(rightDay * 86400)
+ % L"#{amount}" * utils::intToGrouped(part_top)));
}
else
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{date}] #{amount}"))
- % _T("#{date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{amount}") * utils::intToGrouped(part_top)));
+ % L"#{date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{amount}" * utils::intToGrouped(part_top)));
}
- tos << _T("\" style=\"left: ")
- << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"\" style=\"left: "
+ << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
else if (bar_len != 0)
{
- tos << _T("<div style=\"left: ") << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"<div style=\"left: " << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
if (bar_len != 0)
{
- tos << _T("<div style=\"top: ") << (24 - bar_len) << _T("px; height: ") << (1 + 2 * bar_len) << _T("px;\"></div>");
+ tos << L"<div style=\"top: " << (24 - bar_len) << L"px; height: " << (1 + 2 * bar_len) << L"px;\"></div>";
}
if (m_bDetail || bar_len != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
@@ -389,7 +389,7 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact if (usePNG())
{
- tos << _T("<td class=\"img_middle\">");
+ tos << L"<td class=\"img_middle\">";
// draw graph
Canvas canvas(m_nTimelineWidth, 49);
@@ -446,16 +446,16 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact if (getStatistic()->newFilePNG(canvas, strFinalFile))
{
- tos << _T("<img src=\"") << strFinalFile << _T("\" alt=\"\" />");
+ tos << L"<img src=\"" << strFinalFile << L"\" alt=\"\" />";
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"bars_middle\">")
- << _T("<div class=\"") << m_CSS << _T("\">")
- << _T("<div class=\"l\"></div>") << ext::endl;
+ tos << L"<td class=\"bars_middle\">"
+ << L"<div class=\"" << m_CSS << L"\">"
+ << L"<div class=\"l\"></div>" << ext::endl;
for (curDay = m_nFirstDay; curDay <= m_nLastDay; curDay += m_nDays)
{
@@ -486,47 +486,47 @@ void ColTimeline::outputRenderRowRatio(ext::ostream& tos, const Contact& contact {
int rightDay = min(curDay + m_nDays - 1, m_nLastDay);
- tos << _T("<div title=\"");
+ tos << L"<div title=\"";
if (rightDay != curDay)
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{start_date}-#{end_date}] #{out_amount} (out) / #{in_amount} (in)"))
- % _T("#{start_date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{end_date}") * utils::timestampToDate(rightDay * 86400)
- % _T("#{out_amount}") * utils::intToGrouped(part_out)
- % _T("#{in_amount}") * utils::intToGrouped(part_in)));
+ % L"#{start_date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{end_date}" * utils::timestampToDate(rightDay * 86400)
+ % L"#{out_amount}" * utils::intToGrouped(part_out)
+ % L"#{in_amount}" * utils::intToGrouped(part_in)));
}
else
{
tos << utils::htmlEscape(ext::str(ext::kformat(TranslateT("[#{date}] #{out_amount} (out) / #{in_amount} (in)"))
- % _T("#{date}") * utils::timestampToDate(curDay * 86400)
- % _T("#{out_amount}") * utils::intToGrouped(part_out)
- % _T("#{in_amount}") * utils::intToGrouped(part_in)));
+ % L"#{date}" * utils::timestampToDate(curDay * 86400)
+ % L"#{out_amount}" * utils::intToGrouped(part_out)
+ % L"#{in_amount}" * utils::intToGrouped(part_in)));
}
- tos << _T("\" style=\"left: ")
- << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"\" style=\"left: "
+ << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
else if (bar_len != 0)
{
- tos << _T("<div style=\"left: ") << (3 * ((curDay - m_nFirstDay) / m_nDays)) << _T("px;\">");
+ tos << L"<div style=\"left: " << (3 * ((curDay - m_nFirstDay) / m_nDays)) << L"px;\">";
}
if (bar_len < 0)
{
- tos << _T("<div class=\"i\" style=\"height: ") << -bar_len << _T("px;\"></div>");
+ tos << L"<div class=\"i\" style=\"height: " << -bar_len << L"px;\"></div>";
}
else if (bar_len > 0)
{
- tos << _T("<div class=\"o\" style=\"top: ") << (25 - bar_len) << _T("px; height: ") << bar_len << _T("px;\"></div>");
+ tos << L"<div class=\"o\" style=\"top: " << (25 - bar_len) << L"px; height: " << bar_len << L"px;\"></div>";
}
if (m_bDetail || bar_len != 0)
{
- tos << _T("</div>") << ext::endl;
+ tos << L"</div>" << ext::endl;
}
}
- tos << _T("</div></td>") << ext::endl;
+ tos << L"</div></td>" << ext::endl;
}
}
diff --git a/plugins/HistoryStats/src/column_wordcount.cpp b/plugins/HistoryStats/src/column_wordcount.cpp index d058b1bbe1..a00d9c510d 100644 --- a/plugins/HistoryStats/src/column_wordcount.cpp +++ b/plugins/HistoryStats/src/column_wordcount.cpp @@ -125,8 +125,8 @@ void ColWordCount::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSp if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[m_nVisMode])
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
@@ -142,18 +142,18 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac {
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped(pWordCount[0])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{distict_words} distinct"))
- % _T("#{distict_words}") * utils::intToGrouped(pWordCount[1])))
- << _T("\">")
+ % L"#{distict_words}" * utils::intToGrouped(pWordCount[1])))
+ << L"\">"
<< utils::intToGrouped(pWordCount[0])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
@@ -162,18 +162,18 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac {
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::intToGrouped(pWordCount[1])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{words} total"))
- % _T("#{words}") * utils::intToGrouped(pWordCount[0])))
- << _T("\">")
+ % L"#{words}" * utils::intToGrouped(pWordCount[0])))
+ << L"\">"
<< utils::intToGrouped(pWordCount[1])
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
@@ -182,19 +182,19 @@ void ColWordCount::impl_outputRenderRow(ext::ostream& tos, const Contact& contac {
if (!m_bDetail)
{
- tos << _T("<td class=\"num\">")
+ tos << L"<td class=\"num\">"
<< utils::ratioToString(pWordCount[0], pWordCount[1], 2)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
else
{
- tos << _T("<td class=\"num\" title=\"")
+ tos << L"<td class=\"num\" title=\""
<< utils::htmlEscape(ext::str(ext::kformat(TranslateT("#{words} total / #{distict_words} distinct"))
- % _T("#{words}") * utils::intToGrouped(pWordCount[0])
- % _T("#{distict_words}") * utils::intToGrouped(pWordCount[1])))
- << _T("\">")
+ % L"#{words}" * utils::intToGrouped(pWordCount[0])
+ % L"#{distict_words}" * utils::intToGrouped(pWordCount[1])))
+ << L"\">"
<< utils::ratioToString(pWordCount[0], pWordCount[1], 2)
- << _T("</td>") << ext::endl;
+ << L"</td>" << ext::endl;
}
}
break;
diff --git a/plugins/HistoryStats/src/column_words.cpp b/plugins/HistoryStats/src/column_words.cpp index da16922fa9..6de8d42440 100644 --- a/plugins/HistoryStats/src/column_words.cpp +++ b/plugins/HistoryStats/src/column_words.cpp @@ -136,8 +136,8 @@ void ColWords::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup) m_hVisMode = Opt.insertRadio(hTemp, NULL, TranslateT("Most common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Least common words"));
Opt.insertRadio(hTemp, m_hVisMode, TranslateT("Longest words"));
- m_hNum = Opt.insertEdit (hGroup, TranslateT("Number of words"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hOffset = Opt.insertEdit (hGroup, TranslateT("Number of words to skip in output"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hNum = Opt.insertEdit (hGroup, TranslateT("Number of words"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hOffset = Opt.insertEdit (hGroup, TranslateT("Number of words to skip in output"), L"", OptionsCtrl::OCF_NUMBER);
m_hDetail = Opt.insertCheck(hGroup, TranslateT("Word count for each word (tooltip)"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hDetailInOut = Opt.insertCheck(m_hDetail, TranslateT("Show separate counts for incoming/outgoing"));
m_hInOutColor = Opt.insertCheck(hGroup, TranslateT("Color words according to in/out ratio"));
@@ -207,8 +207,8 @@ Column::StyleList ColWords::impl_outputGetAdditionalStyles(IDProvider&) if (m_bInOutColor)
{
- l.push_back(StylePair(_T("span.onum"), _T("color: ") + utils::colorToHTML(con::ColorOut) + _T(";")));
- l.push_back(StylePair(_T("span.inum"), _T("color: ") + utils::colorToHTML(con::ColorIn) + _T(";")));
+ l.push_back(StylePair(L"span.onum", L"color: " + utils::colorToHTML(con::ColorOut) + L";"));
+ l.push_back(StylePair(L"span.inum", L"color: " + utils::colorToHTML(con::ColorIn) + L";"));
}
return l;
@@ -231,8 +231,8 @@ void ColWords::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) if (row == 1)
{
ext::string strTitle = str(ext::kformat(TranslateT("#{type} for #{data}"))
- % _T("#{type}") * TranslateTS(szTypeDesc[m_nVisMode])
- % _T("#{data}") * TranslateTS(szSourceDesc[m_nSource]));
+ % L"#{type}" * TranslateTS(szTypeDesc[m_nVisMode])
+ % L"#{data}" * TranslateTS(szSourceDesc[m_nSource]));
writeRowspanTD(tos, getCustomTitle(TranslateTS(szTypeDesc[m_nVisMode]), strTitle), row, 1, rowSpan);
}
@@ -242,7 +242,7 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D {
const WordList* pWords = reinterpret_cast<const WordList*>(contact.getSlot(contactDataTransformSlotGet()));
- tos << _T("<td>");
+ tos << L"<td>";
vector_each_(j, *pWords)
{
@@ -257,21 +257,21 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D else
{
strTooltip = utils::htmlEscape(ext::str(ext::kformat(TranslateT("[Out] #{out_words} / [In] #{in_words}"))
- % _T("#{out_words}") * w.first.out
- % _T("#{in_words}") * w.first.in));
+ % L"#{out_words}" * w.first.out
+ % L"#{in_words}" * w.first.in));
}
if (!m_bInOutColor || m_nSource != 2 || w.first.in == w.first.out)
{
- tos << _T("<span title=\"") << strTooltip << _T("\">")
- << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span title=\"" << strTooltip << L"\">"
+ << utils::htmlEscape(w.second) << L"</span>";
}
else
{
- tos << _T("<span class=\"")
- << ((w.first.out - w.first.in > 0) ? _T("onum") : _T("inum"))
- << _T("\" title=\"") << strTooltip << _T("\">")
- << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span class=\""
+ << ((w.first.out - w.first.in > 0) ? L"onum" : L"inum")
+ << L"\" title=\"" << strTooltip << L"\">"
+ << utils::htmlEscape(w.second) << L"</span>";
}
}
else
@@ -282,17 +282,17 @@ void ColWords::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, D }
else
{
- tos << _T("<span class=\"")
- << ((w.first.out - w.first.in > 0) ? _T("onum") : _T("inum"))
- << _T("\">") << utils::htmlEscape(w.second) << _T("</span>");
+ tos << L"<span class=\""
+ << ((w.first.out - w.first.in > 0) ? L"onum" : L"inum")
+ << L"\">" << utils::htmlEscape(w.second) << L"</span>";
}
}
if (j < pWords->size() - 1)
{
- tos << _T(", ");
+ tos << L", ";
}
}
- tos << _T("</td>") << ext::endl;
+ tos << L"</td>" << ext::endl;
}
diff --git a/plugins/HistoryStats/src/dlgfilterwords.cpp b/plugins/HistoryStats/src/dlgfilterwords.cpp index c3e17cfe2e..48d1dfb4da 100644 --- a/plugins/HistoryStats/src/dlgfilterwords.cpp +++ b/plugins/HistoryStats/src/dlgfilterwords.cpp @@ -226,7 +226,7 @@ void DlgFilterWords::onSetSelChanging(HANDLE hItem, INT_PTR dwData) if (GetWindowText(hText, szText, nLen + 1)) {
ext::string strText = szText;
- utils::replaceAllInPlace(strText, _T("\r"), _T(""));
+ utils::replaceAllInPlace(strText, L"\r", L"");
pFilter->clearWords();
ext::string::size_type nPos = strText.find('\n');
@@ -270,7 +270,7 @@ void DlgFilterWords::onSetSelChanged(HANDLE hItem, INT_PTR dwData) citer_each_(WordSet, i, pFilter->getWords())
{
strWords += *i;
- strWords += _T("\r\n");
+ strWords += L"\r\n";
}
if (!strWords.empty())
@@ -279,8 +279,8 @@ void DlgFilterWords::onSetSelChanged(HANDLE hItem, INT_PTR dwData) SetDlgItemText(m_hWnd, IDC_WORDS, strWords.c_str());
}
else {
- SetDlgItemText(m_hWnd, IDC_SETNAME, _T(""));
- SetDlgItemText(m_hWnd, IDC_WORDS, _T(""));
+ SetDlgItemText(m_hWnd, IDC_SETNAME, L"");
+ SetDlgItemText(m_hWnd, IDC_WORDS, L"");
}
// (de)activate band controls
diff --git a/plugins/HistoryStats/src/dlgoption.cpp b/plugins/HistoryStats/src/dlgoption.cpp index b164d29319..03125b1857 100644 --- a/plugins/HistoryStats/src/dlgoption.cpp +++ b/plugins/HistoryStats/src/dlgoption.cpp @@ -246,11 +246,11 @@ void DlgOption::onProblemInfo() citer_each_(HelpVec, i, help)
{
- msg += _T("\r\n\r\n");
+ msg += L"\r\n\r\n";
msg += i->first;
if (!i->second.empty()) {
- msg += _T("\r\n - ");
+ msg += L"\r\n - ";
msg += i->second;
}
}
diff --git a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp index e7a7368eda..cf385fe4ad 100644 --- a/plugins/HistoryStats/src/dlgoption_subcolumns.cpp +++ b/plugins/HistoryStats/src/dlgoption_subcolumns.cpp @@ -54,7 +54,7 @@ INT_PTR CALLBACK DlgOption::SubColumns::staticAddProc(HWND hDlg, UINT msg, WPARA int nData = SendMessage(hWndList, LB_GETITEMDATA, nIndex, 0);
SetDlgItemText(hDlg, IDC_DESCRIPTION, Column::getColInfo(nData).m_Description);
}
- else SetDlgItemText(hDlg, IDC_DESCRIPTION, _T(""));
+ else SetDlgItemText(hDlg, IDC_DESCRIPTION, L"");
}
else if (HIWORD(wParam) == LBN_DBLCLK)
SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), NULL);
@@ -415,14 +415,14 @@ void DlgOption::SubColumns::onColSelChanged(HANDLE hItem, INT_PTR) if (restrictions & Column::crHTMLMask) {
// MEMO: don't distinguish between full/partial since not yet supported
- msg += _T("HTML");
+ msg += L"HTML";
}
if (restrictions & Column::crPNGMask) {
if (restrictions & Column::crHTMLMask)
- msg += _T(", ");
+ msg += L", ";
- msg += ((restrictions & Column::crPNGMask) == Column::crPNGPartial) ? TranslateT("PNG (partial)") : _T("PNG");
+ msg += ((restrictions & Column::crPNGMask) == Column::crPNGPartial) ? TranslateT("PNG (partial)") : L"PNG";
}
tvi.item.pszText = const_cast<TCHAR*>(msg.c_str());
@@ -450,18 +450,18 @@ void DlgOption::SubColumns::onColSelChanged(HANDLE hItem, INT_PTR) */
if (!bPNGOutput) {
- msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? _T("HTML") : TranslateT("Nothing (column will be skipped)");
+ msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? L"HTML" : TranslateT("Nothing (column will be skipped)");
}
else if (nPNGMode != Settings::pmPreferHTML) // && bPNGOutput
{
if (restrictions == (Column::crHTMLFull | Column::crPNGPartial))
msg += (nPNGMode == Settings::pmHTMLFallBack) ? TranslateT("HTML as fallback") : TranslateT("PNG, ignoring some settings");
else // !(html-full | png-partial)
- msg += ((restrictions & Column::crPNGMask) == Column::crPNGFull) ? _T("PNG") : _T("HTML");
+ msg += ((restrictions & Column::crPNGMask) == Column::crPNGFull) ? L"PNG" : L"HTML";
}
else // bPNGOutput && nPNGMode == Settings::pmPreferHTML
{
- msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? _T("HTML") : _T("PNG");
+ msg += ((restrictions & Column::crHTMLMask) == Column::crHTMLFull) ? L"HTML" : L"PNG";
}
tvi.item.pszText = const_cast<TCHAR*>(msg.c_str());
@@ -675,10 +675,10 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp) pHelp->push_back(HelpPair());
pHelp->back().first = TranslateTS(pCol->getTitle());
- pHelp->back().first += _T(": ");
+ pHelp->back().first += L": ";
pHelp->back().first += TranslateT("HTML output unsupported.");
- pHelp->back().second = _T("");
+ pHelp->back().second = L"";
}
++nConflicts;
@@ -695,7 +695,7 @@ bool DlgOption::SubColumns::configHasConflicts(HelpVec* pHelp) pHelp->push_back(HelpPair());
pHelp->back().first = TranslateTS(pCol->getTitle());
- pHelp->back().first += _T(": ");
+ pHelp->back().first += L": ";
if (nPNGMode == Settings::pmHTMLFallBack)
pHelp->back().first += TranslateT("Fallback to HTML due to setting.");
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp index 88a3cec5c7..d04db4d390 100644 --- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp +++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp @@ -42,9 +42,9 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA ext::string linkLabel = linkURLs.substr(posURLs + 1);
- linkLabel += _T(" [");
+ linkLabel += L" [";
linkLabel += linkTexts.substr(posTexts + 1);
- linkLabel += _T("]");
+ linkLabel += L"]";
SetDlgItemText(hDlg, LinkIDs[nCurLink], linkLabel.c_str());
@@ -97,7 +97,7 @@ INT_PTR CALLBACK DlgOption::SubGlobal::staticInfoProc(HWND hDlg, UINT msg, WPARA TCHAR* szTitle = new TCHAR[nLen + 1];
if (GetWindowText(hLink, szTitle, nLen + 1)) {
- TCHAR* szEndOfURL = (TCHAR*)ext::strfunc::str(szTitle, _T(" ["));
+ TCHAR* szEndOfURL = (TCHAR*)ext::strfunc::str(szTitle, L" [");
if (szEndOfURL) {
*szEndOfURL = '\0';
g_pSettings->openURL(szTitle);
@@ -316,7 +316,7 @@ void DlgOption::SubGlobal::initSupportInfo() LPGENT(""),
LPGENT(""),
LPGENT(""),
- _T("")
+ L""
},
};
diff --git a/plugins/HistoryStats/src/dlgoption_subinput.cpp b/plugins/HistoryStats/src/dlgoption_subinput.cpp index 90b9ff8e66..23ec3e4fe2 100644 --- a/plugins/HistoryStats/src/dlgoption_subinput.cpp +++ b/plugins/HistoryStats/src/dlgoption_subinput.cpp @@ -71,9 +71,9 @@ void DlgOption::SubInput::onWMInitDialog() OptionsCtrl::Item hTemp, hTemp2;
hTemp = m_Options.insertGroup(NULL, TranslateT("History interpretation"), OptionsCtrl::OCF_ROOTGROUP);
- m_hChatSessionMinDur = m_Options.insertEdit(hTemp, TranslateT("Time a chat session must last to be counted (seconds)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hChatSessionMinDur = m_Options.insertEdit(hTemp, TranslateT("Time a chat session must last to be counted (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hChatSessionTimeout = m_Options.insertEdit(hTemp, TranslateT("Time between two chat sessions (seconds)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hAverageMinTime = m_Options.insertEdit(hTemp, TranslateT("Minimum time to assume when calculating average (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hWordDelimiters = m_Options.insertEdit(hTemp, TranslateT("Word delimiting characters"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Contact filtering"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hProtocols = m_Options.insertGroup(hTemp, TranslateT("Ignore all contacts with protocol..."));
@@ -92,9 +92,9 @@ void DlgOption::SubInput::onWMInitDialog() m_Options.insertRadio(hTemp2, m_hMergeMode, TranslateT("Don't merge events"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Message filtering"), OptionsCtrl::OCF_ROOTGROUP);
hTemp2 = m_Options.insertGroup(hTemp, TranslateT("Ignore messages..."));
- m_hIgnoreOlder = m_Options.insertEdit(hTemp2, TranslateT("...older than (days, 0=no limit)"), _T(""), OptionsCtrl::OCF_NUMBER);
- m_hIgnoreBefore = m_Options.insertDateTime(hTemp2, TranslateT("...before date (none=no limit)"), 0, _T("%Y-%m-%d"), OptionsCtrl::OCF_ALLOWNONE);
- m_hIgnoreAfter = m_Options.insertDateTime(hTemp2, TranslateT("...after date (none=no limit)"), 0, _T("%Y-%m-%d"), OptionsCtrl::OCF_ALLOWNONE);
+ m_hIgnoreOlder = m_Options.insertEdit(hTemp2, TranslateT("...older than (days, 0=no limit)"), L"", OptionsCtrl::OCF_NUMBER);
+ m_hIgnoreBefore = m_Options.insertDateTime(hTemp2, TranslateT("...before date (none=no limit)"), 0, L"%Y-%m-%d", OptionsCtrl::OCF_ALLOWNONE);
+ m_hIgnoreAfter = m_Options.insertDateTime(hTemp2, TranslateT("...after date (none=no limit)"), 0, L"%Y-%m-%d", OptionsCtrl::OCF_ALLOWNONE);
m_hFilterRawRTF = m_Options.insertCheck(hTemp, TranslateT("Strip raw RTF control sequences from message"));
m_hFilterBBCodes = m_Options.insertCheck(hTemp, TranslateT("Strip BBCode tags from messages"));
diff --git a/plugins/HistoryStats/src/dlgoption_suboutput.cpp b/plugins/HistoryStats/src/dlgoption_suboutput.cpp index dce580a1f6..866c865dd6 100644 --- a/plugins/HistoryStats/src/dlgoption_suboutput.cpp +++ b/plugins/HistoryStats/src/dlgoption_suboutput.cpp @@ -108,17 +108,17 @@ void DlgOption::SubOutput::onWMInitDialog() hTemp2 = m_Options.insertGroup(m_hOmitContacts, TranslateT("Criteria"));
m_hOmitByValue = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that didn't produce a certain amount of data"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hOmitByValueData = m_Options.insertCombo(m_hOmitByValue, TranslateT("Omit if"));
- m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hOmitByValueLimit = m_Options.insertEdit(m_hOmitByValue, TranslateT("...is less than"), L"", OptionsCtrl::OCF_NUMBER);
m_hOmitByTime = m_Options.insertCheck(hTemp2, TranslateT("Omit contacts that were inactive for some time"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), _T(""), OptionsCtrl::OCF_NUMBER);
+ m_hOmitByTimeDays = m_Options.insertEdit(m_hOmitByTime, TranslateT("Maximum inactivity time (days)"), L"", OptionsCtrl::OCF_NUMBER);
m_hOmitByRank = m_Options.insertCheck(hTemp2, TranslateT("Omit all contacts not in \"Top n\""), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
- m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), _T("10"), OptionsCtrl::OCF_NUMBER);
+ m_hOmitNumOnTop = m_Options.insertEdit(m_hOmitByRank, TranslateT("Number of contacts in \"Top n\""), L"10", OptionsCtrl::OCF_NUMBER);
m_hOmittedInTotals = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include omitted contacts in totals"));
m_hOmittedInExtraRow = m_Options.insertCheck(m_hOmitContacts, TranslateT("Include totals of omitted contacts in additional row"));
m_hCalcTotals = m_Options.insertCheck(hTemp, TranslateT("Include totals in statistics"));
hTemp = m_Options.insertGroup(NULL, TranslateT("Table header"), OptionsCtrl::OCF_ROOTGROUP | OptionsCtrl::OCF_NODISABLECHILDS);
m_hTableHeader = m_Options.insertCheck(hTemp, TranslateT("Output header"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK | OptionsCtrl::OCF_DISABLED | OptionsCtrl::OCF_NODISABLECHILDS);
- m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), _T("0"), OptionsCtrl::OCF_NUMBER);
+ m_hTableHeaderRepeat = m_Options.insertEdit(m_hTableHeader, TranslateT("Repeat header every n contacts (0=don't repeat)"), L"0", OptionsCtrl::OCF_NUMBER);
m_hTableHeaderVerbose = m_Options.insertCheck(m_hTableHeader, TranslateT("Make column titles more verbose"));
m_hHeaderTooltips = m_Options.insertCheck(m_hTableHeader, TranslateT("Show tooltips with detailed information in column titles"), OptionsCtrl::OCF_DISABLECHILDSONUNCHECK);
m_hHeaderTooltipsIfCustom = m_Options.insertCheck(m_hHeaderTooltips, TranslateT("Only show if a custom title was entered or if titles are not verbose"));
diff --git a/plugins/HistoryStats/src/iconlib.cpp b/plugins/HistoryStats/src/iconlib.cpp index 5c8ae3df8f..3f105824fa 100644 --- a/plugins/HistoryStats/src/iconlib.cpp +++ b/plugins/HistoryStats/src/iconlib.cpp @@ -62,7 +62,7 @@ void IconLib::init() GetModuleFileNameA(g_hInst, szModule, MAX_PATH);
- m_Section = _T("HistoryStats");
+ m_Section = L"HistoryStats";
m_IconName = "historystats_";
array_each_(i, m_IconInfo)
@@ -70,7 +70,7 @@ void IconLib::init() ext::string strSection = m_Section;
if (m_IconInfo[i].szSection) {
- strSection += _T("/");
+ strSection += L"/";
strSection += TranslateTS(m_IconInfo[i].szSection);
}
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index 4f7a1a09d4..f44efb8a85 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -211,10 +211,10 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam) // ask user if this is really what he wants
ext::string strConfirm = ext::str(ext::kformat(TranslateT("You're going to copy the complete history of #{source_name} (#{source_proto}) to #{target_name} (#{target_proto}). Afterwards, the target history will contain entries from both histories. There is no way to revert this operation. Be careful! This is a rather big operation and has the potential to damage your database. Be sure to have a backup of this database before performing this operation.\r\n\r\nAre you sure you would like to continue?")))
- % _T("#{source_name}") * mu::clist::getContactDisplayName(g_hHistoryCopyContact)
- % _T("#{source_proto}") * utils::fromA(GetContactProto(g_hHistoryCopyContact))
- % _T("#{target_name}") * mu::clist::getContactDisplayName(hTarget)
- % _T("#{target_proto}") * utils::fromA(GetContactProto(hTarget)));
+ % L"#{source_name}" * mu::clist::getContactDisplayName(g_hHistoryCopyContact)
+ % L"#{source_proto}" * utils::fromA(GetContactProto(g_hHistoryCopyContact))
+ % L"#{target_name}" * mu::clist::getContactDisplayName(hTarget)
+ % L"#{target_proto}" * utils::fromA(GetContactProto(hTarget)));
if (MessageBox(0, strConfirm.c_str(), TranslateT("HistoryStats - Confirm")), MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2) != IDYES)
{
@@ -265,9 +265,9 @@ static INT_PTR MenuHistoryPaste(WPARAM wParam, LPARAM lParam) // output summary
ext::string strSummary = ext::str(ext::kformat(TranslateT("Successfully read #{success} events of which #{fail_add} couldn't be added to the target history. #{fail} events couldn't be read from the source history.")))
- % _T("#{success}") * dwCountSuccess
- % _T("#{fail}") * dwCountFailRead
- % _T("#{fail_add}") * dwCountFailAdd);
+ % L"#{success}" * dwCountSuccess
+ % L"#{fail}" * dwCountFailRead
+ % L"#{fail_add}" * dwCountFailAdd);
MessageBox(0, strSummary.c_str(), TranslateT("HistoryStats - Information")), MB_ICONINFORMATION);
@@ -412,7 +412,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- OutputDebugString(_T("HistoryStats: MirandaPluginInfoEx() was called.\n"));
+ OutputDebugString(L"HistoryStats: MirandaPluginInfoEx() was called.\n");
// MEMO: (don't) fail, if version is below minimum
return &g_pluginInfoEx;
@@ -431,8 +431,8 @@ extern "C" __declspec(dllexport) int Load() {
MessageBox(
0,
- _T("Failed to register a required window class. Can't continue loading plugin."),
- _T("HistoryStats - Error"),
+ L"Failed to register a required window class. Can't continue loading plugin.",
+ L"HistoryStats - Error",
MB_OK | MB_ICONERROR);
return 1;
@@ -443,11 +443,11 @@ extern "C" __declspec(dllexport) int Load() {
MessageBox(
0,
- _T("This version of HistoryStats isn't compatible with your Miranda NG ")
- _T("version. Possibly, your Miranda NG is outdated or you are trying to ")
- _T("use the Unicode version with a non-Unicode Miranda NG.\r\n\r\n")
- _T("Please go to the plugin's homepage and check the requirements."),
- _T("HistoryStats - Error"),
+ L"This version of HistoryStats isn't compatible with your Miranda NG "
+ L"version. Possibly, your Miranda NG is outdated or you are trying to "
+ L"use the Unicode version with a non-Unicode Miranda NG.\r\n\r\n"
+ L"Please go to the plugin's homepage and check the requirements.",
+ L"HistoryStats - Error",
MB_OK | MB_ICONERROR);
return 1;
diff --git a/plugins/HistoryStats/src/message.cpp b/plugins/HistoryStats/src/message.cpp index f4112637e3..66a928bc8a 100644 --- a/plugins/HistoryStats/src/message.cpp +++ b/plugins/HistoryStats/src/message.cpp @@ -36,22 +36,22 @@ void Message::makeRawAvailable() void Message::stripRawRTF()
{
- if (m_Raw.substr(0, 6) == _T("{\\rtf1"))
+ if (m_Raw.substr(0, 6) == L"{\\rtf1")
m_Raw = RTFFilter::filter(m_Raw);
}
void Message::stripBBCodes()
{
static const TCHAR* szSimpleBBCodes[][2] = {
- { _T("[b]"), _T("[/b]") },
- { _T("[u]"), _T("[/u]") },
- { _T("[i]"), _T("[/i]") },
- { _T("[s]"), _T("[/s]") },
+ { L"[b]", L"[/b]" },
+ { L"[u]", L"[/u]" },
+ { L"[i]", L"[/i]" },
+ { L"[s]", L"[/s]" },
};
static const TCHAR* szParamBBCodes[][2] = {
- { _T("[url="), _T("[/url]") },
- { _T("[color="), _T("[/color]") },
+ { L"[url=", L"[/url]" },
+ { L"[color=", L"[/color]" },
};
// convert raw string to lower case
@@ -120,11 +120,11 @@ void Message::stripBBCodes() void Message::filterLinks()
{
- static const TCHAR* szSpaces = _T(" \r\r\n");
- static const TCHAR* szPrefixes = _T("([{<:\"'");
- static const TCHAR* szSuffixes = _T(".,:;!?)]}>\"'");
- static const TCHAR* szValidProtocol = _T("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
- static const TCHAR* szValidHost = _T(".-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+ static const TCHAR* szSpaces = L" \r\r\n";
+ static const TCHAR* szPrefixes = L"([{<:\"'";
+ static const TCHAR* szSuffixes = L".,:;!?)]}>\"'";
+ static const TCHAR* szValidProtocol = L"abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ static const TCHAR* szValidHost = L".-abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// init with raw text
m_WithoutLinks = getRaw();
@@ -134,7 +134,7 @@ void Message::filterLinks() // detect: protocol://[user[:password]@]host[/path]
while (true) {
- if ((pos = msg.find(_T("://"), pos + 1)) == ext::string::npos)
+ if ((pos = msg.find(L"://", pos + 1)) == ext::string::npos)
break;
// find start of URL
@@ -187,7 +187,7 @@ void Message::filterLinks() pos = -1;
while (true) {
- if ((pos = msg.find(_T("www."), pos + 1)) == ext::string::npos)
+ if ((pos = msg.find(L"www.", pos + 1)) == ext::string::npos)
break;
// find end of URL
@@ -214,7 +214,7 @@ void Message::filterLinks() if (pos_invalid == ext::string::npos || pos_invalid >= pos_slash) {
if (std::count(msg.begin() + pos_at + 1, msg.begin() + pos_slash, '.') >= 1) {
- ext::string link = _T("http://") + msg.substr(pos, pos_last - pos + 1);
+ ext::string link = L"http://" + msg.substr(pos, pos_last - pos + 1);
// remove extracted link from message text
msg.erase(pos, link.length() - 7);
@@ -262,8 +262,8 @@ void Message::filterLinks() pos = pos_last - (link.length());
// prepend "mailto:" if missing
- if (link.substr(0, 7) != _T("mailto:")) {
- link.insert(0, _T("mailto:"));
+ if (link.substr(0, 7) != L"mailto:") {
+ link.insert(0, L"mailto:");
}
// TODO: put link in list
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp index 35bce22df6..beb1932627 100644 --- a/plugins/HistoryStats/src/mirandacontact.cpp +++ b/plugins/HistoryStats/src/mirandacontact.cpp @@ -118,7 +118,7 @@ void MirandaContact::endRead() {
#if defined(_DEBUG)
if (m_CIs.size() + m_EIs.size() + m_SpareEIs.size() > 0) {
- ext::string strLog = ext::str(ext::format(_T("Freeing | CIs and |+| EIs...\n")) % m_CIs.size() % m_EIs.size() % m_SpareEIs.size());
+ ext::string strLog = ext::str(ext::format(L"Freeing | CIs and |+| EIs...\n") % m_CIs.size() % m_EIs.size() % m_SpareEIs.size());
OutputDebugString(strLog.c_str());
}
diff --git a/plugins/HistoryStats/src/optionsctrl.cpp b/plugins/HistoryStats/src/optionsctrl.cpp index 157464195f..2359259bad 100644 --- a/plugins/HistoryStats/src/optionsctrl.cpp +++ b/plugins/HistoryStats/src/optionsctrl.cpp @@ -38,7 +38,7 @@ HANDLE OptionsCtrl::insertRadio(HANDLE hParent, HANDLE hSibling, const TCHAR* sz return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTRADIO, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocr)));
}
-HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit /* = _T("") */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit /* = L"" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCEDIT oce;
oce.dwFlags = dwFlags;
@@ -70,7 +70,7 @@ HANDLE OptionsCtrl::insertButton(HANDLE hParent, const TCHAR* szLabel, const TCH return reinterpret_cast<HANDLE>(SendMessage(m_hOptWnd, OCM_INSERTBUTTON, reinterpret_cast<WPARAM>(hParent), reinterpret_cast<LPARAM>(&ocb)));
}
-HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat /* = _T("%Y-%m-%d") */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
+HANDLE OptionsCtrl::insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat /* = L"%Y-%m-%d" */, DWORD dwFlags /* = 0 */, INT_PTR dwData /* = 0 */)
{
OCDATETIME ocdt;
ocdt.dwFlags = dwFlags;
@@ -270,7 +270,7 @@ ext::string OptionsCtrl::getDateTimeStr(HANDLE hDateTime) bool bNone = false;
DWORD dwTimestamp = getDateTime(hDateTime, &bNone);
- return bNone ? _T("") : utils::formatDate(dwTimestamp);
+ return bNone ? L"" : utils::formatDate(dwTimestamp);
}
void OptionsCtrl::setDateTimeStr(HANDLE hDateTime, const ext::string& strDateTime)
diff --git a/plugins/HistoryStats/src/optionsctrl.h b/plugins/HistoryStats/src/optionsctrl.h index 29b802bf2f..026a535176 100644 --- a/plugins/HistoryStats/src/optionsctrl.h +++ b/plugins/HistoryStats/src/optionsctrl.h @@ -42,10 +42,10 @@ public: HANDLE insertGroup(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertCheck(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertRadio(HANDLE hParent, HANDLE hSibling, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit = _T(""), DWORD dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertEdit(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szEdit = L"", DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertCombo(HANDLE hParent, const TCHAR* szLabel, DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertButton(HANDLE hParent, const TCHAR* szLabel, const TCHAR* szButton, DWORD dwFlags = 0, INT_PTR dwData = 0);
- HANDLE insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat = _T("%Y-%m-%d"), DWORD dwFlags = 0, INT_PTR dwData = 0);
+ HANDLE insertDateTime(HANDLE hParent, const TCHAR* szLabel, DWORD dwDateTime, const TCHAR* szFormat = L"%Y-%m-%d", DWORD dwFlags = 0, INT_PTR dwData = 0);
HANDLE insertColor(HANDLE hParent, const TCHAR* szLabel, COLORREF crColor = 0, DWORD dwFlags = 0, INT_PTR dwData = 0);
const TCHAR* getItemLabel(HANDLE hItem);
void setItemLabel(HANDLE hItem, const TCHAR* szLabel);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.cpp b/plugins/HistoryStats/src/optionsctrlimpl.cpp index 2687e385a7..f4d8e55e5e 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl.cpp @@ -8,7 +8,7 @@ * OptionsCtrlImpl
*/
-const TCHAR* OptionsCtrlImpl::m_ClassName = _T("HistoryStatsOptions");
+const TCHAR* OptionsCtrlImpl::m_ClassName = L"HistoryStatsOptions";
HIMAGELIST OptionsCtrlImpl::m_hStateIcons = NULL;
int OptionsCtrlImpl::m_nStateIconsRef = 0;
@@ -434,7 +434,7 @@ LRESULT OptionsCtrlImpl::onWMCreate(CREATESTRUCT* pCS) m_hTree = CreateWindowEx(
WS_EX_CLIENTEDGE,
WC_TREEVIEW,
- _T(""),
+ L"",
WS_CHILD | WS_VISIBLE | WS_TABSTOP | TVS_HASLINES | TVS_NOHSCROLL | TVS_SHOWSELALWAYS | dwStyle,
0,
0,
@@ -1043,7 +1043,7 @@ void OptionsCtrlImpl::onOCMMoveItem(HTREEITEM& hItem, HTREEITEM hInsertAfter) TreeView_DeleteItem(m_hTree, hItem);
tvis.item.mask |= TVIF_TEXT;
- tvis.item.pszText = _T("");
+ tvis.item.pszText = L"";
hItem = TreeView_InsertItem(m_hTree, &tvis);
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp index d158c40659..436e32aa13 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_combo.cpp @@ -39,7 +39,7 @@ ext::string OptionsCtrlImpl::Combo::getCombinedText() {
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
strTemp += m_Items[m_nSelected];
return strTemp;
@@ -86,7 +86,7 @@ void OptionsCtrlImpl::Combo::onSelect() DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST;
if (hTempWnd = CreateWindowEx(
- WS_EX_CLIENTEDGE, WC_COMBOBOX, _T(""), dwStyle,
+ WS_EX_CLIENTEDGE, WC_COMBOBOX, L"", dwStyle,
r.left, r.top, r.right - r.left, (r.bottom - r.top) * 20,
m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccCombo), g_hInst, NULL))
{
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp index 3601a5175f..d55e4c0a38 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_datetime.cpp @@ -23,64 +23,64 @@ ext::string OptionsCtrlImpl::DateTime::getDTFormatString(const ext::string& strF switch (strFormat[i]) {
case 'a':
- strCode = _T("ddd");
+ strCode = L"ddd";
break;
case 'A':
- strCode = _T("dddd");
+ strCode = L"dddd";
break;
case 'b':
- strCode = _T("MMM");
+ strCode = L"MMM";
break;
case 'B':
- strCode = _T("MMMM");
+ strCode = L"MMMM";
break;
case 'd':
- strCode = bSharp ? _T("d") : _T("dd");
+ strCode = bSharp ? L"d" : L"dd";
break;
case 'H':
- strCode = bSharp ? _T("H") : _T("HH");
+ strCode = bSharp ? L"H" : L"HH";
break;
case 'I':
- strCode = bSharp ? _T("h") : _T("hh");
+ strCode = bSharp ? L"h" : L"hh";
break;
case 'm':
- strCode = bSharp ? _T("M") : _T("MM");
+ strCode = bSharp ? L"M" : L"MM";
break;
case 'M':
- strCode = bSharp ? _T("m") : _T("mm");
+ strCode = bSharp ? L"m" : L"mm";
break;
case 'p':
- strCode = _T("tt"); // MEMO: seems not to work if current locale is 24-hour
+ strCode = L"tt"; // MEMO: seems not to work if current locale is 24-hour
break;
case 'y':
- strCode = _T("yy");
+ strCode = L"yy";
break;
case 'Y':
- strCode = _T("yyyy");
+ strCode = L"yyyy";
break;
case '%':
- strPart += _T("%");
+ strPart += L"%";
break;
}
if (!strCode.empty()) {
if (!strPart.empty()) {
- strOut += _T("'");
+ strOut += L"'";
strOut += strPart;
- strOut += _T("'");
- strPart = _T("");
+ strOut += L"'";
+ strPart = L"";
}
strOut += strCode;
@@ -90,14 +90,14 @@ ext::string OptionsCtrlImpl::DateTime::getDTFormatString(const ext::string& strF strPart += strFormat[i];
if (strFormat[i] == '\'')
- strPart += _T("'");
+ strPart += L"'";
}
}
if (!strPart.empty()) {
- strOut += _T("'");
+ strOut += L"'";
strOut += strPart;
- strOut += _T("'");
+ strOut += L"'";
}
return strOut;
@@ -170,7 +170,7 @@ ext::string OptionsCtrlImpl::DateTime::getCombinedText() {
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
if (m_bNone)
strTemp += TranslateT("none");
@@ -219,7 +219,7 @@ void OptionsCtrlImpl::DateTime::onSelect() DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | (m_bAllowNone ? DTS_SHOWNONE : 0);
if (hTempWnd = CreateWindowEx(
- WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, _T(""), dwStyle,
+ WS_EX_CLIENTEDGE, DATETIMEPICK_CLASS, L"", dwStyle,
r.left, r.top, r.right - r.left, r.bottom - r.top,
m_pCtrl->m_hTree, reinterpret_cast<HMENU>(ccDateTime), g_hInst, NULL)) {
// restrict to dates a timestamp can hold (with 1 day less to avoid timezone issues)
diff --git a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp index 3684f59cc9..ce8a053190 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl_edit.cpp @@ -31,7 +31,7 @@ ext::string OptionsCtrlImpl::Edit::getCombinedText() {
ext::string strTemp = m_strLabel;
- strTemp += _T(": ");
+ strTemp += L": ";
strTemp += m_strEdit;
return strTemp;
diff --git a/plugins/HistoryStats/src/settings.cpp b/plugins/HistoryStats/src/settings.cpp index ce15912a01..ebd57958c7 100644 --- a/plugins/HistoryStats/src/settings.cpp +++ b/plugins/HistoryStats/src/settings.cpp @@ -13,7 +13,7 @@ Settings::CharMapper::CharMapper(const Settings& settings)
{
- static const TCHAR* defaultWordDelimiters = _T("\n\r\t");
+ static const TCHAR* defaultWordDelimiters = L"\n\r\t";
array_each_(i, m_CharMap)
{
@@ -45,17 +45,17 @@ Settings::Filter::Filter(const ext::string& strID) struct tm* curTM = localtime(&curTime);
m_strName += utils::intToPadded(1900 + curTM->tm_year, 4);
- m_strName += _T("-");
+ m_strName += L"-";
m_strName += utils::intToPadded(1 + curTM->tm_mon, 2);
- m_strName += _T("-");
+ m_strName += L"-";
m_strName += utils::intToPadded(curTM->tm_mday, 2);
- m_strName += _T(" ");
+ m_strName += L" ";
m_strName += utils::intToPadded(curTM->tm_hour, 2);
- m_strName += _T(":");
+ m_strName += L":";
m_strName += utils::intToPadded(curTM->tm_min, 2);
- m_strName += _T(":");
+ m_strName += L":";
m_strName += utils::intToPadded(curTM->tm_sec, 2);
- m_strName += _T(".");
+ m_strName += L".";
m_strName += utils::intToPadded(GetTickCount() % 1000, 3);
}
@@ -65,7 +65,7 @@ Settings::Filter::Filter(const ext::string& strID) const TCHAR* Settings::getDefaultWordDelimiters()
{
- return _T(".?!,:;()[]{}<>+-*/=\\_^&\"'~%#@|$");
+ return L".?!,:;()[]{}<>+-*/=\\_^&\"'~%#@|$";
}
const TCHAR* Settings::getDefaultStyleSheet()
@@ -76,29 +76,29 @@ const TCHAR* Settings::getDefaultStyleSheet() {
// general formats
StyleSheet +=
- _T("h1 { font-family: Verdana, Arial, sans-serif; font-size: 16pt; }\n")
- _T("div, span, td { font-family: Verdana, Arial, sans-serif; font-size: 10pt; }\n")
- _T("span[title], td[title], div[title] { cursor: help; }\n")
- _T("span[title] { border-bottom: 1px dotted; }\n")
- _T("span[title]:hover, td[title]:hover { background-color: #FFFFCF; }\n")
- _T("table { border-collapse: collapse; }\n")
- _T("td { border: 1px solid ") + utils::colorToHTML(con::ColorBorder) + _T("; text-align: left; padding: 2px 4px 2px 4px; }\n")
- _T("div.footer { padding: 12px 0px 8px 0px; }\n");
+ L"h1 { font-family: Verdana, Arial, sans-serif; font-size: 16pt; }\n"
+ L"div, span, td { font-family: Verdana, Arial, sans-serif; font-size: 10pt; }\n"
+ L"span[title], td[title], div[title] { cursor: help; }\n"
+ L"span[title] { border-bottom: 1px dotted; }\n"
+ L"span[title]:hover, td[title]:hover { background-color: #FFFFCF; }\n"
+ L"table { border-collapse: collapse; }\n"
+ L"td { border: 1px solid " + utils::colorToHTML(con::ColorBorder) + L"; text-align: left; padding: 2px 4px 2px 4px; }\n"
+ L"div.footer { padding: 12px 0px 8px 0px; }\n";
// special row formats
StyleSheet +=
- _T("tr.header td { background-color: ") + utils::colorToHTML(con::ColorHeader) + _T("; text-align: center; }\n")
- _T("tr.header td div { height: 1px; overflow: hidden; }\n")
- _T("tr.omitted td { background-color: ") + utils::colorToHTML(con::ColorOmitted) + _T("; }\n")
- _T("tr.totals td { background-color: ") + utils::colorToHTML(con::ColorTotals) + _T("; }\n");
+ L"tr.header td { background-color: " + utils::colorToHTML(con::ColorHeader) + L"; text-align: center; }\n"
+ L"tr.header td div { height: 1px; overflow: hidden; }\n"
+ L"tr.omitted td { background-color: " + utils::colorToHTML(con::ColorOmitted) + L"; }\n"
+ L"tr.totals td { background-color: " + utils::colorToHTML(con::ColorTotals) + L"; }\n";
// special cell formats
StyleSheet +=
- _T("td.num { text-align: right; }\n")
- _T("td.bars_bottom { vertical-align: bottom; padding: 4px 0px 0px 0px; }\n")
- _T("td.bars_middle { vertical-align: middle; padding: 2px 0px 2px 0px; }\n")
- _T("td.img_bottom { vertical-align: bottom; text-align: center; padding: 4px 0px 0px 0px; }\n")
- _T("td.img_middle { vertical-align: middle; text-align: center; padding: 2px 0px 2px 0px; }\n");
+ L"td.num { text-align: right; }\n"
+ L"td.bars_bottom { vertical-align: bottom; padding: 4px 0px 0px 0px; }\n"
+ L"td.bars_middle { vertical-align: middle; padding: 2px 0px 2px 0px; }\n"
+ L"td.img_bottom { vertical-align: bottom; text-align: center; padding: 4px 0px 0px 0px; }\n"
+ L"td.img_middle { vertical-align: middle; text-align: center; padding: 2px 0px 2px 0px; }\n";
}
return StyleSheet.c_str();
@@ -106,52 +106,52 @@ const TCHAR* Settings::getDefaultStyleSheet() const TCHAR* Settings::getDefaultHideContactMenuProtos()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
const TCHAR* Settings::getDefaultProtosIgnore()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
const TCHAR* Settings::getDefaultColumns()
{
return
- _T("{num:11;}")
- _T("0{enabled:y;guid:rank;}")
- _T("1{enabled:y;guid:nick;}1/data{detail:y;}")
- _T("2{enabled:y;guid:protocol;}")
- _T("3{enabled:y;guid:group;}")
- _T("4{enabled:y;guid:inout;}4/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:0;}")
- _T("5{enabled:y;guid:inout;}5/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:1;}")
- _T("6{enabled:y;guid:inout;}6/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:2;}")
- _T("7{enabled:y;guid:chatduration;}7/data{detail:y;graph:y;vis_mode:3;}")
- _T("8{enabled:y;guid:commonwords;}8/data{detail:y;filter_links:y;filter_words:0;in_out_color:n;max_length:0;min_length:1;num:10;offset:0;source:2;vis_mode:0;}")
- _T("9{enabled:y;guid:wordcount;}9/data{detail:y;filter_links:y;filter_words:0;max_length:0;min_length:1;source:2;vis_mode:0;}")
- _T("10{enabled:y;guid:split;}10/data{block_unit:0;blocks:28;detail:y;graph_align:1;source:0;source_type:2;units_per_block:6;vis_mode:0;}");
+ L"{num:11;}"
+ L"0{enabled:y;guid:rank;}"
+ L"1{enabled:y;guid:nick;}1/data{detail:y;}"
+ L"2{enabled:y;guid:protocol;}"
+ L"3{enabled:y;guid:group;}"
+ L"4{enabled:y;guid:inout;}4/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:0;}"
+ L"5{enabled:y;guid:inout;}5/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:1;}"
+ L"6{enabled:y;guid:inout;}6/data{abs_time:1;absolute:n;detail:y;detail_percent:n;graph_percent:y;show_sum:y;source:2;}"
+ L"7{enabled:y;guid:chatduration;}7/data{detail:y;graph:y;vis_mode:3;}"
+ L"8{enabled:y;guid:commonwords;}8/data{detail:y;filter_links:y;filter_words:0;in_out_color:n;max_length:0;min_length:1;num:10;offset:0;source:2;vis_mode:0;}"
+ L"9{enabled:y;guid:wordcount;}9/data{detail:y;filter_links:y;filter_words:0;max_length:0;min_length:1;source:2;vis_mode:0;}"
+ L"10{enabled:y;guid:split;}10/data{block_unit:0;blocks:28;detail:y;graph_align:1;source:0;source_type:2;units_per_block:6;vis_mode:0;}";
}
const TCHAR* Settings::getDefaultSort()
{
return
- _T("0{by:17;asc:n}")
- _T("1{by:-1;asc:y}")
- _T("2{by:-1;asc:y}");
+ L"0{by:17;asc:n}"
+ L"1{by:-1;asc:y}"
+ L"2{by:-1;asc:y}";
}
const TCHAR* Settings::getDefaultOutputFile()
{
- return _T("HistoryStats\\stats.html");
+ return L"HistoryStats\\stats.html";
}
const TCHAR* Settings::getDefaultOutputExtraFolder()
{
- return _T("extra");
+ return L"extra";
}
const TCHAR* Settings::getDefaultFilterWords()
{
- return _T("{num:0;}");
+ return L"{num:0;}";
}
void Settings::clearColumns()
@@ -172,16 +172,16 @@ Settings::Settings() : m_GraphicsMode(gmHTML),
m_PNGMode(pmHTMLFallBack),
m_ThreadLowPriority(true),
- m_PathToBrowser(_T("")),
+ m_PathToBrowser(L""),
// input settings
m_ChatSessionMinDur(0),
m_ChatSessionTimeout(900),
m_AverageMinTime(0),
- m_WordDelimiters(_T("")),
+ m_WordDelimiters(L""),
m_IgnoreOld(0),
- m_IgnoreBefore(_T("")),
- m_IgnoreAfter(_T("")),
+ m_IgnoreBefore(L""),
+ m_IgnoreAfter(L""),
m_FilterRawRTF(false),
m_FilterBBCodes(false),
m_MetaContactsMode(mcmBoth),
@@ -211,11 +211,11 @@ Settings::Settings() : m_TableHeaderVerbose(false),
m_HeaderTooltips(true),
m_HeaderTooltipsIfCustom(true),
- m_OwnNick(_T("")),
+ m_OwnNick(L""),
m_OutputVariables(false),
- m_OutputFile(_T("")),
+ m_OutputFile(L""),
m_OutputExtraToFolder(true),
- m_OutputExtraFolder(_T("")),
+ m_OutputExtraFolder(L""),
m_OverwriteAlways(false),
m_AutoOpenOptions(false),
m_AutoOpenStartup(false),
@@ -511,10 +511,10 @@ ext::string Settings::getOutputPrefix(DWORD timeStarted) const // append, if still not empty
if (!extraFolder.empty())
- return extraFolder + _T("\\");
+ return extraFolder + L"\\";
}
- return _T("");
+ return L"";
}
bool Settings::isPNGOutputActiveAndAvailable() const
@@ -569,7 +569,7 @@ void Settings::ensureConstraints() void Settings::openURL(const TCHAR* szURL)
{
if (m_PathToBrowser.empty())
- ShellExecute(NULL, _T("open"), szURL, NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, L"open", szURL, NULL, NULL, SW_SHOWNORMAL);
else
- ShellExecute(NULL, _T("open"), m_PathToBrowser.c_str(), szURL, NULL, SW_SHOWNORMAL);
+ ShellExecute(NULL, L"open", m_PathToBrowser.c_str(), szURL, NULL, SW_SHOWNORMAL);
}
diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp index 4740994f3b..0610fcf5e8 100644 --- a/plugins/HistoryStats/src/settingsserializer.cpp +++ b/plugins/HistoryStats/src/settingsserializer.cpp @@ -101,7 +101,7 @@ void SettingsSerializer::readFromDB() m_ShowContactMenu = m_DB.readBool(con::SettShowContactMenu, true);
m_ShowContactMenuPseudo = m_DB.readBool(con::SettShowContactMenuPseudo, false);
m_ThreadLowPriority = m_DB.readBool(con::SettThreadLowPriority, true);
- m_PathToBrowser = m_DB.readStr(con::SettPathToBrowser, _T(""));
+ m_PathToBrowser = m_DB.readStr(con::SettPathToBrowser, L"");
m_HideContactMenuProtos.clear();
m_DB.readTree(con::SettHideContactMenuProtos, getDefaultHideContactMenuProtos(), settingsTree);
@@ -110,7 +110,7 @@ void SettingsSerializer::readFromDB() upto_each_(i, nHideContactMenuProtos)
{
- m_HideContactMenuProtos.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), _T(""))));
+ m_HideContactMenuProtos.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), L"")));
}
// -- input settings --
@@ -126,12 +126,12 @@ void SettingsSerializer::readFromDB() upto_each_(i, nIgnoreProtos)
{
- m_ProtosIgnore.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), _T(""))));
+ m_ProtosIgnore.insert(utils::toA(settingsTree.readStr(utils::intToString(i).c_str(), L"")));
}
m_IgnoreOld = m_DB.readWord(con::SettIgnoreOld, 0);
- m_IgnoreBefore = m_DB.readStr(con::SettIgnoreBefore, _T(""));
- m_IgnoreAfter = m_DB.readStr(con::SettIgnoreAfter, _T(""));
+ m_IgnoreBefore = m_DB.readStr(con::SettIgnoreBefore, L"");
+ m_IgnoreAfter = m_DB.readStr(con::SettIgnoreAfter, L"");
m_FilterRawRTF = m_DB.readBool(con::SettFilterRawRTF, false);
m_FilterBBCodes = m_DB.readBool(con::SettFilterBBCodes, false);
m_MetaContactsMode = m_DB.readByte(con::SettMetaContactsMode, mcmBoth);
@@ -152,11 +152,11 @@ void SettingsSerializer::readFromDB() settingsTree.setKey(colPrefix.c_str());
- Column* pCol = Column::fromUID(settingsTree.readStr(con::KeyGUID, _T("")));
+ Column* pCol = Column::fromUID(settingsTree.readStr(con::KeyGUID, L""));
if (pCol) {
pCol->setEnabled(settingsTree.readBool(con::KeyEnabled, true));
- pCol->setCustomTitle(settingsTree.readStr(con::KeyTitle, _T("")));
+ pCol->setCustomTitle(settingsTree.readStr(con::KeyTitle, L""));
settingsTree.setKey((colPrefix + con::SuffixData).c_str());
@@ -224,9 +224,9 @@ void SettingsSerializer::readFromDB() // read filter attributes
settingsTree.setKey(strPrefix.c_str());
- FilterSet::iterator F = m_FilterWords.insert(Filter(settingsTree.readStr(con::KeyID, _T("")))).first;
+ FilterSet::iterator F = m_FilterWords.insert(Filter(settingsTree.readStr(con::KeyID, L""))).first;
Filter* curFilter = (Filter*)&*F;
- curFilter->setName(settingsTree.readStr(con::KeyName, _T("")));
+ curFilter->setName(settingsTree.readStr(con::KeyName, L""));
curFilter->setMode(settingsTree.readIntRanged(con::KeyMode, fwmWordsMatching, fwmFIRST, fwmLAST));
int nNumWords = settingsTree.readInt(con::KeyNumWords, 0);
@@ -237,7 +237,7 @@ void SettingsSerializer::readFromDB() upto_each_(j, nNumWords)
{
- curFilter->addWord(settingsTree.readStr(utils::intToString(j).c_str(), _T("")));
+ curFilter->addWord(settingsTree.readStr(utils::intToString(j).c_str(), L""));
}
}
}
@@ -481,7 +481,7 @@ void SettingsSerializer::setShowSupportInfo(bool bShow) ext::string SettingsSerializer::getLastStatisticsFile()
{
- return m_DB.readStr(con::SettLastStatisticsFile, _T(""));
+ return m_DB.readStr(con::SettLastStatisticsFile, L"");
}
void SettingsSerializer::setLastStatisticsFile(const TCHAR* szFileName)
diff --git a/plugins/HistoryStats/src/settingstree.cpp b/plugins/HistoryStats/src/settingstree.cpp index a13d82ac3c..2e8ab0a0a4 100644 --- a/plugins/HistoryStats/src/settingstree.cpp +++ b/plugins/HistoryStats/src/settingstree.cpp @@ -23,7 +23,7 @@ SettingsTree::SettingsTree(const ext::string& config) : void SettingsTree::clear()
{
m_Keys.clear();
- setKey(_T(""));
+ setKey(L"");
}
void SettingsTree::fromString(const ext::string& config)
@@ -45,13 +45,13 @@ void SettingsTree::fromString(const ext::string& config) while (i < config.length() && config[i] != '}') {
if (config[i] == ':') {
curSetting = curVal;
- curVal = _T("");
+ curVal = L"";
}
else if (config[i] == ';') {
vals[curSetting] = curVal;
- curSetting = _T("");
- curVal = _T("");
+ curSetting = L"";
+ curVal = L"";
}
else if (config[i] == '\\') {
++i;
@@ -62,24 +62,24 @@ void SettingsTree::fromString(const ext::string& config) ++i;
}
- curKey = _T("");
+ curKey = L"";
}
else curKey += config[i];
++i;
}
- setKey(_T(""));
+ setKey(L"");
}
ext::string SettingsTree::toString() const
{
static const TCHAR* replaces[5][2] = {
- { _T("\\"), _T("\\\\") },
- { _T("{"), _T("\\{") },
- { _T("}"), _T("\\}") },
- { _T(":"), _T("\\:") },
- { _T(";"), _T("\\;") }
+ { L"\\", L"\\\\" },
+ { L"{", L"\\{" },
+ { L"}", L"\\}" },
+ { L":", L"\\:" },
+ { L";", L"\\;" }
};
ext::string data;
@@ -89,12 +89,12 @@ ext::string SettingsTree::toString() const const ValueMap& vals = i->second;
data += i->first;
- data += _T("{");
+ data += L"{";
citer_each_(ValueMap, j, vals)
{
data += j->first;
- data += _T(":");
+ data += L":";
ext::string tempSecond = j->second;
@@ -104,10 +104,10 @@ ext::string SettingsTree::toString() const }
data += tempSecond;
- data += _T(";");
+ data += L";";
}
- data += _T("}");
+ data += L"}";
}
return data;
@@ -131,7 +131,7 @@ bool SettingsTree::readBool(const TCHAR* setting, bool errorValue) const ValueMap::iterator i = m_pCurValues->find(setting);
if (i != m_pCurValues->end()) {
- return (i->second == _T("y"));
+ return (i->second == L"y");
}
}
@@ -175,7 +175,7 @@ void SettingsTree::writeBool(const TCHAR* setting, bool value) {
makeKeyValid();
- (*m_pCurValues)[setting] = value ? _T("y") : _T("n");
+ (*m_pCurValues)[setting] = value ? L"y" : L"n";
}
void SettingsTree::writeInt(const TCHAR* setting, int value)
diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp index 9bcdaaa201..0f66d31c62 100644 --- a/plugins/HistoryStats/src/statistic.cpp +++ b/plugins/HistoryStats/src/statistic.cpp @@ -195,7 +195,7 @@ ext::string Statistic::createFile(const ext::string& desiredName) if (!m_Settings.m_OverwriteAlways && utils::fileExists(desiredName)) {
TCHAR tempBuf[MAX_PATH];
- UINT nUnique = GetTempFileName(m_TempPath.c_str(), _T("his"), 0, tempBuf);
+ UINT nUnique = GetTempFileName(m_TempPath.c_str(), L"his", 0, tempBuf);
if (nUnique == 0) {
abort();
@@ -213,7 +213,7 @@ ext::string Statistic::createFile(const ext::string& desiredName) if (!utils::pathExists(desiredPath)) {
if (!utils::createPath(desiredPath)) {
m_ErrorText = ext::str(ext::kformat(TranslateT("HistoryStats couldn't create a required folder (#{folder}).\r\n\r\nPlease check the output filename and additional output folder you have chosen for correctness. Additionally, please check whether the file, folder, and/or disk is writable."))
- % _T("#{folder}") * desiredPath);
+ % L"#{folder}" * desiredPath);
}
}
@@ -228,7 +228,7 @@ bool Statistic::newFile(const TCHAR* fileExt, ext::string& writeFile, ext::strin writeFile = createFile(m_OutputPath + finalURL);
// convert relative filename to relative URL
- utils::replaceAllInPlace(finalURL, _T("\\"), _T("/"));
+ utils::replaceAllInPlace(finalURL, L"\\", L"/");
return true;
}
@@ -315,11 +315,11 @@ void Statistic::setProgressMax(bool bSub, int max) SendDlgItemMessage(m_hWndProgress, bSub ? IDC_SUBBAR : IDC_MAINBAR, PBM_SETPOS, (WPARAM)0, (LPARAM)0);
SendDlgItemMessage(m_hWndProgress, bSub ? IDC_SUBBAR : IDC_MAINBAR, PBM_SETRANGE, (WPARAM)0, (LPARAM)MAKELPARAM(0, max));
- SetDlgItemText(m_hWndProgress, bSub ? IDC_SUBPERCENT : IDC_MAINPERCENT, (max > 0) ? _T("0%") : _T(""));
+ SetDlgItemText(m_hWndProgress, bSub ? IDC_SUBPERCENT : IDC_MAINPERCENT, (max > 0) ? L"0%" : L"");
if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -329,7 +329,7 @@ void Statistic::setProgressLabel(bool bSub, const ext::string& label) if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -345,7 +345,7 @@ void Statistic::stepProgress(bool bSub, int step /* = 1 */) if (!bSub) {
setProgressMax(true, 0);
- setProgressLabel(true, _T(""));
+ setProgressLabel(true, L"");
}
}
@@ -737,7 +737,7 @@ bool Statistic::stepOmitContacts() if (shouldTerminate())
return false;
- m_pOmitted = new Contact(this, m_nNextSlot, _T(""), _T(""), _T(""), 0, 0);
+ m_pOmitted = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pOmitted);
// omit depending on some value
@@ -869,7 +869,7 @@ bool Statistic::stepCalcTotals() if (shouldTerminate())
return false;
- m_pTotals = new Contact(this, m_nNextSlot, _T(""), _T(""), _T(""), 0, 0);
+ m_pTotals = new Contact(this, m_nNextSlot, L"", L"", L"", 0, 0);
prepareContactData(*m_pTotals);
setProgressMax(true, m_Contacts.size() + 1);
@@ -970,7 +970,7 @@ bool Statistic::stepWriteHTML() if (!ofs.good()) {
m_ErrorText = ext::str(ext::kformat(TranslateT("HistoryStats couldn't open the output file (#{file}) for write access.\r\n\r\nPlease check the output filename you have chosen for correctness. Additionally, please check whether the file, folder, and/or disk is writable."))
- % _T("#{file}") * m_OutputFile);
+ % L"#{file}" * m_OutputFile);
return false;
}
@@ -995,7 +995,7 @@ bool Statistic::stepWriteHTML() iter_each_(Column::StyleList, css, cssList)
{
if (additionalCSSSelectors.find(css->first) == additionalCSSSelectors.end()) {
- additionalCSS.push_back(css->first + _T(" { ") + css->second + _T(" }"));
+ additionalCSS.push_back(css->first + L" { " + css->second + L" }");
additionalCSSSelectors.insert(css->first);
}
}
@@ -1004,15 +1004,15 @@ bool Statistic::stepWriteHTML() additionalCSSSelectors.clear();
- tos << _T("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">") << ext::endl
- << _T("<html xmlns=\"http://www.w3.org/1999/xhtml\">") << ext::endl
- << _T("<head>") << ext::endl
- << _T("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />") << ext::endl
- << _T("<meta name=\"generator\" content=\"HistoryStats " << utils::versionToDotted(m_Settings.m_VersionCurrent) << "\" />") << ext::endl
- << _T("<title>")
- << ext::kformat(TranslateT("Statistics for #{nick} - HistoryStats")) % _T("#{nick}") * utils::htmlEscape(m_Settings.m_OwnNick)
- << _T("</title>") << ext::endl
- << _T("<style type=\"text/css\">") << ext::endl;
+ tos << L"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << ext::endl
+ << L"<html xmlns=\"http://www.w3.org/1999/xhtml\">" << ext::endl
+ << L"<head>" << ext::endl
+ << L"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" << ext::endl
+ << L"<meta name=\"generator\" content=\"HistoryStats " << utils::versionToDotted(m_Settings.m_VersionCurrent) << "\" />" << ext::endl
+ << L"<title>"
+ << ext::kformat(TranslateT("Statistics for #{nick} - HistoryStats")) % L"#{nick}" * utils::htmlEscape(m_Settings.m_OwnNick)
+ << L"</title>" << ext::endl
+ << L"<style type=\"text/css\">" << ext::endl;
tos << m_Settings.getDefaultStyleSheet();
iter_each_(std::vector<ext::string>, css, additionalCSS)
@@ -1020,12 +1020,12 @@ bool Statistic::stepWriteHTML() tos << *css << ext::endl;
}
- tos << _T("</style>") << ext::endl
- << _T("</head>") << ext::endl
- << _T("<body><h1>")
- << ext::kformat(TranslateT("Statistics for #{nick}")) % _T("#{nick}") * utils::htmlEscape(m_Settings.m_OwnNick)
- << _T("</h1>") << ext::endl;
- tos << _T("<table>") << ext::endl;
+ tos << L"</style>" << ext::endl
+ << L"</head>" << ext::endl
+ << L"<body><h1>"
+ << ext::kformat(TranslateT("Statistics for #{nick}")) % L"#{nick}" * utils::htmlEscape(m_Settings.m_OwnNick)
+ << L"</h1>" << ext::endl;
+ tos << L"<table>" << ext::endl;
additionalCSS.clear();
@@ -1042,14 +1042,14 @@ bool Statistic::stepWriteHTML() if (m_Settings.m_TableHeader) {
for (int j = 1; j <= headerSize.cy; j++) {
- tos << _T("<tr class=\"header\">") << ext::endl;
+ tos << L"<tr class=\"header\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderHeader(tos, j, headerSize.cy);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
}
}
@@ -1064,7 +1064,7 @@ bool Statistic::stepWriteHTML() if (!bInterrupted) {
upto_each_(i, countContacts())
{
- tos << _T("<tr>") << ext::endl;
+ tos << L"<tr>" << ext::endl;
const Contact& curContact = getContact(i);
@@ -1075,7 +1075,7 @@ bool Statistic::stepWriteHTML() (*col)->outputRenderRow(tos, curContact, Column::asContact);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
if (shouldTerminate()) {
bInterrupted = true;
@@ -1090,14 +1090,14 @@ bool Statistic::stepWriteHTML() if (m_Settings.m_TableHeader && m_Settings.m_TableHeaderRepeat != 0 && ((i + 1) % m_Settings.m_TableHeaderRepeat == 0)) {
for (int j = 1; j <= headerSize.cy; ++j) {
- tos << _T("<tr class=\"header\">") << ext::endl;
+ tos << L"<tr class=\"header\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderHeader(tos, j, headerSize.cy);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
}
}
@@ -1111,14 +1111,14 @@ bool Statistic::stepWriteHTML() const Contact& omittedContact = getOmitted();
- tos << _T("<tr class=\"omitted\">") << ext::endl;
+ tos << L"<tr class=\"omitted\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderRow(tos, omittedContact, Column::asOmitted);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
// stop if problem creating files/folders
if (!m_ErrorText.empty())
@@ -1139,29 +1139,29 @@ bool Statistic::stepWriteHTML() const Contact& totalsContact = getTotals();
- tos << _T("<tr class=\"totals\">") << ext::endl;
+ tos << L"<tr class=\"totals\">" << ext::endl;
iter_each_(std::vector<Column*>, col, m_ActiveCols)
{
(*col)->outputRenderRow(tos, totalsContact, Column::asTotal);
}
- tos << _T("</tr>") << ext::endl;
+ tos << L"</tr>" << ext::endl;
stepProgress(true);
// Finish output.
- tos << _T("</table>") << ext::endl;
+ tos << L"</table>" << ext::endl;
- tos << _T("<div class=\"footer\">")
+ tos << L"<div class=\"footer\">"
<< ext::kformat(TranslateT("Created with #{plugin} #{version} on #{date} at #{time}"))
- % _T("#{plugin}") * _T("<a href=\"http://miranda-ng.org/p/HistoryStats\">HistoryStats</a>")
- % _T("#{version}") * utils::versionToDotted(m_Settings.m_VersionCurrent)
- % _T("#{date}") * utils::htmlEscape(utils::timestampToDate(getTimeStarted()))
- % _T("#{time}") * utils::htmlEscape(utils::timestampToTime(getTimeStarted()))
- << _T("</div>") << ext::endl;
+ % L"#{plugin}" * L"<a href=\"http://miranda-ng.org/p/HistoryStats\">HistoryStats</a>"
+ % L"#{version}" * utils::versionToDotted(m_Settings.m_VersionCurrent)
+ % L"#{date}" * utils::htmlEscape(utils::timestampToDate(getTimeStarted()))
+ % L"#{time}" * utils::htmlEscape(utils::timestampToTime(getTimeStarted()))
+ << L"</div>" << ext::endl;
- tos << _T("</body></html>") << ext::endl;
+ tos << L"</body></html>" << ext::endl;
}
// Inform active columns about ending output.
diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h index cc9e4e4546..07b502b200 100644 --- a/plugins/HistoryStats/src/statistic.h +++ b/plugins/HistoryStats/src/statistic.h @@ -183,7 +183,7 @@ public: // file management
ext::string createFile(const ext::string& desiredName);
bool newFile(const TCHAR* fileExt, ext::string& writeFile, ext::string& finalURL);
- bool newFilePNG(ext::string& writeFile, ext::string& finalURL) { return newFile(_T(".png"), writeFile, finalURL); }
+ bool newFilePNG(ext::string& writeFile, ext::string& finalURL) { return newFile(L".png", writeFile, finalURL); }
bool newFilePNG(Canvas& canvas, ext::string& finalURL);
};
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp index 376593db3a..91dedaf163 100644 --- a/plugins/HistoryStats/src/utils.cpp +++ b/plugins/HistoryStats/src/utils.cpp @@ -16,14 +16,14 @@ namespace utils {
TCHAR temp[100] = { 0 };
- return (ext::strfunc::ftime(temp, 100, format, gmtime(&value)) > 0) ? temp : _T("");
+ return (ext::strfunc::ftime(temp, 100, format, gmtime(&value)) > 0) ? temp : L"";
}
ext::string tmStructToString(const tm& value, const TCHAR* format)
{
TCHAR temp[100] = { 0 };
- return (ext::strfunc::ftime(temp, 100, format, &value) > 0) ? temp : _T("");
+ return (ext::strfunc::ftime(temp, 100, format, &value) > 0) ? temp : L"";
}
ext::string durationToString(DWORD value)
@@ -34,9 +34,9 @@ namespace utils value /= 60;
if (value >= 1440)
- ext::strfunc::sprintf(temp, _T("%dd %02d:%02d"), value / 1440, (value / 60) % 24, value % 60);
+ ext::strfunc::sprintf(temp, L"%dd %02d:%02d", value / 1440, (value / 60) % 24, value % 60);
else
- ext::strfunc::sprintf(temp, _T("%02d:%02d"), value / 60, value % 60);
+ ext::strfunc::sprintf(temp, L"%02d:%02d", value / 60, value % 60);
return temp;
}
@@ -77,7 +77,7 @@ namespace utils {
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%d"), value);
+ ext::strfunc::sprintf(temp, L"%d", value);
return temp;
}
@@ -86,7 +86,7 @@ namespace utils {
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%0*d"), len, value);
+ ext::strfunc::sprintf(temp, L"%0*d", len, value);
return temp;
}
@@ -96,7 +96,7 @@ namespace utils TCHAR temp[100] = { 0 };
const char* grouping = Locale::grouping();
- ext::strfunc::sprintf(temp, _T("%d"), value);
+ ext::strfunc::sprintf(temp, L"%d", value);
if (*grouping == CHAR_MAX || *grouping <= 0)
return temp;
@@ -119,7 +119,7 @@ namespace utils {
TCHAR temp[100] = { 0 };
- ext::strfunc::sprintf(temp, _T("%.*f"), precision, value);
+ ext::strfunc::sprintf(temp, L"%.*f", precision, value);
return temp;
}
@@ -129,7 +129,7 @@ namespace utils TCHAR temp[100] = { 0 };
const char* grouping = Locale::grouping();
- ext::strfunc::sprintf(temp, _T("%.*f"), precision, value);
+ ext::strfunc::sprintf(temp, L"%.*f", precision, value);
if (*grouping == CHAR_MAX || *grouping <= 0)
return temp;
@@ -160,7 +160,7 @@ namespace utils value = 1.0f * numerator / denominator;
}
- ext::strfunc::sprintf(temp, _T("%.0f%%"), 100.0f * value);
+ ext::strfunc::sprintf(temp, L"%.0f%%", 100.0f * value);
return temp;
}
@@ -180,10 +180,10 @@ namespace utils void htmlEscapeInPlace(ext::string& text)
{
- replaceAllInPlace(text, _T("&"), _T("&"));
- replaceAllInPlace(text, _T("\""), _T("""));
- replaceAllInPlace(text, _T("<"), _T("<"));
- replaceAllInPlace(text, _T(">"), _T(">"));
+ replaceAllInPlace(text, L"&", L"&");
+ replaceAllInPlace(text, L"\"", L""");
+ replaceAllInPlace(text, L"<", L"<");
+ replaceAllInPlace(text, L">", L">");
}
const TCHAR* stripPrefix(const TCHAR* szPrefix, const TCHAR* szText)
@@ -199,7 +199,7 @@ namespace utils return szText;
}
- ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick /* = _T("") */)
+ ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick /* = L"" */)
{
static const TCHAR* szMonthName[][2] = {
{ LPGENT("month3:Jan"), LPGENT("monthF:January") },
@@ -239,83 +239,83 @@ namespace utils ext::string strSubst;
// match variable and generate substitution
- if (strVar == _T("h")) {
+ if (strVar == L"h") {
strSubst = intToString(timeTM->tm_hour % 12 + (timeTM->tm_hour % 12 == 0 ? 12 : 0));
}
- else if (strVar == _T("hh")) {
+ else if (strVar == L"hh") {
strSubst = intToPadded(timeTM->tm_hour % 12 + (timeTM->tm_hour % 12 == 0 ? 12 : 0), 2);
}
- else if (strVar == _T("H")) {
+ else if (strVar == L"H") {
strSubst = intToString(timeTM->tm_hour);
}
- else if (strVar == _T("HH")) {
+ else if (strVar == L"HH") {
strSubst = intToPadded(timeTM->tm_hour, 2);
}
- else if (strVar == _T("m")) {
+ else if (strVar == L"m") {
strSubst = intToString(timeTM->tm_min);
}
- else if (strVar == _T("mm")) {
+ else if (strVar == L"mm") {
strSubst = intToPadded(timeTM->tm_min, 2);
}
- else if (strVar == _T("s")) {
+ else if (strVar == L"s") {
strSubst = intToString(timeTM->tm_sec);
}
- else if (strVar == _T("ss")) {
+ else if (strVar == L"ss") {
strSubst = intToPadded(timeTM->tm_sec, 2);
}
- else if (strVar == _T("tt")) {
+ else if (strVar == L"tt") {
strSubst = timeTM->tm_hour / 12 ? TranslateT("pm") : TranslateT("am");
}
- else if (strVar == _T("TT")) {
+ else if (strVar == L"TT") {
strSubst = timeTM->tm_hour / 12 ? TranslateT("PM") : TranslateT("AM");
}
- else if (strVar == _T("yy")) {
+ else if (strVar == L"yy") {
strSubst = intToPadded((timeTM->tm_year + 1900) % 100, 2);
}
- else if (strVar == _T("yyyy")) {
+ else if (strVar == L"yyyy") {
strSubst = intToPadded(timeTM->tm_year + 1900, 4);
}
- else if (strVar == _T("M")) {
+ else if (strVar == L"M") {
strSubst = intToString(timeTM->tm_mon + 1);
}
- else if (strVar == _T("MM")) {
+ else if (strVar == L"MM") {
strSubst = intToPadded(timeTM->tm_mon + 1, 2);
}
- else if (strVar == _T("MMM")) {
- strSubst = stripPrefix(_T("month3:"), TranslateTS(szMonthName[timeTM->tm_mon % 12][0]));
+ else if (strVar == L"MMM") {
+ strSubst = stripPrefix(L"month3:", TranslateTS(szMonthName[timeTM->tm_mon % 12][0]));
}
- else if (strVar == _T("MMMM")) {
- strSubst = stripPrefix(_T("monthF:"), TranslateTS(szMonthName[timeTM->tm_mon % 12][1]));
+ else if (strVar == L"MMMM") {
+ strSubst = stripPrefix(L"monthF:", TranslateTS(szMonthName[timeTM->tm_mon % 12][1]));
}
- else if (strVar == _T("d")) {
+ else if (strVar == L"d") {
strSubst = intToString(timeTM->tm_mday);
}
- else if (strVar == _T("dd")) {
+ else if (strVar == L"dd") {
strSubst = intToPadded(timeTM->tm_mday, 2);
}
- else if (strVar == _T("ww")) {
- strSubst = stripPrefix(_T("wday2:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
+ else if (strVar == L"ww") {
+ strSubst = stripPrefix(L"wday2:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][0]));
}
- else if (strVar == _T("www")) {
- strSubst = stripPrefix(_T("wday3:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
+ else if (strVar == L"www") {
+ strSubst = stripPrefix(L"wday3:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][1]));
}
- else if (strVar == _T("wwww")) {
- strSubst = stripPrefix(_T("wdayF:"), TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
+ else if (strVar == L"wwww") {
+ strSubst = stripPrefix(L"wdayF:", TranslateTS(szWDayName[(timeTM->tm_wday + 6) % 7][2]));
}
- else if (strVar == _T("miranda_path")) {
+ else if (strVar == L"miranda_path") {
strSubst = getMirandaPath();
}
- else if (strVar == _T("profile_path")) {
+ else if (strVar == L"profile_path") {
strSubst = getProfilePath();
}
- else if (strVar == _T("profile_name")) {
+ else if (strVar == L"profile_name") {
strSubst = getProfileName();
}
- else if (strVar == _T("nick")) {
+ else if (strVar == L"nick") {
strSubst = szNick;
}
- else if (strVar == _T("")) {
- strSubst = _T("%");
+ else if (strVar == L"") {
+ strSubst = L"%";
}
// perform actual substitution
@@ -381,7 +381,7 @@ namespace utils int part = 3;
while (!version.empty() && part >= 0) {
- ext::string::size_type dotPos = version.find(_T("."));
+ ext::string::size_type dotPos = version.find(L".");
if (dotPos == ext::string::npos) {
dotPos = version.length();
@@ -401,7 +401,7 @@ namespace utils ext::strfunc::sprintf(
temp,
- _T("%d.%d.%d.%d"),
+ L"%d.%d.%d.%d",
(version >> 24) & 0xFF,
(version >> 16) & 0xFF,
(version >> 8) & 0xFF,
@@ -617,7 +617,7 @@ namespace utils bool pathExists(const ext::string& path)
{
WIN32_FIND_DATA wfd;
- HANDLE hFind = FindFirstFile((path + _T(".")).c_str(), &wfd);
+ HANDLE hFind = FindFirstFile((path + L".").c_str(), &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
FindClose(hFind);
@@ -641,7 +641,7 @@ namespace utils bool isValidFilePart(ext::string filePart)
{
// check for disallowed chars
- if (filePart.find_first_of(_T("<>:\"/\\|?*")) != ext::string::npos)
+ if (filePart.find_first_of(L"<>:\"/\\|?*") != ext::string::npos)
return false;
// check for dots only
@@ -650,29 +650,29 @@ namespace utils // check for disallowed names
static const TCHAR* disallowedNames[] = {
- _T("clock$"),
- _T("aux"),
- _T("con"),
- _T("nul"),
- _T("prn"),
- _T("com1"),
- _T("com2"),
- _T("com3"),
- _T("com4"),
- _T("com5"),
- _T("com6"),
- _T("com7"),
- _T("com8"),
- _T("com9"),
- _T("lpt1"),
- _T("lpt2"),
- _T("lpt3"),
- _T("lpt4"),
- _T("lpt5"),
- _T("lpt6"),
- _T("lpt7"),
- _T("lpt8"),
- _T("lpt9")
+ L"clock$",
+ L"aux",
+ L"con",
+ L"nul",
+ L"prn",
+ L"com1",
+ L"com2",
+ L"com3",
+ L"com4",
+ L"com5",
+ L"com6",
+ L"com7",
+ L"com8",
+ L"com9",
+ L"lpt1",
+ L"lpt2",
+ L"lpt3",
+ L"lpt4",
+ L"lpt5",
+ L"lpt6",
+ L"lpt7",
+ L"lpt8",
+ L"lpt9"
};
ext::string::size_type pos = filePart.find('.');
@@ -716,7 +716,7 @@ namespace utils ext::string::size_type pos = fileName.rfind('\\');
if (pos == ext::string::npos) {
- return _T("");
+ return L"";
}
else {
return fileName.substr(0, pos + 1);
@@ -766,7 +766,7 @@ namespace utils return false;
}
- curPath += _T("\\");
+ curPath += L"\\";
subDirs.pop();
}
@@ -776,7 +776,7 @@ namespace utils ext::string colorToHTML(COLORREF crColor)
{
- static const TCHAR hexDigits[] = _T("0123456789ABCDEF");
+ static const TCHAR hexDigits[] = L"0123456789ABCDEF";
ext::string htmlColor(7, '#');
@@ -823,7 +823,7 @@ namespace utils ext::string getGUID()
{
- static const TCHAR hexDigits[] = _T("0123456789ABCDEF");
+ static const TCHAR hexDigits[] = L"0123456789ABCDEF";
GUID guid;
CoCreateGuid(&guid);
@@ -895,7 +895,7 @@ namespace utils if (strMirandaPath.empty()) {
TCHAR szPath[MAX_PATH] = { 0 };
- PathToAbsoluteT(_T("x"), szPath);
+ PathToAbsoluteT(L"x", szPath);
strMirandaPath = extractPath(szPath);
}
@@ -914,7 +914,7 @@ namespace utils if (strProfilePath.empty() || strProfilePath[strProfilePath.length() - 1] != '\\')
{
- strProfilePath += _T("\\");
+ strProfilePath += L"\\";
}
}
@@ -986,8 +986,8 @@ RTFFilter::RTFFilter() : m_hRTFConv(NULL), m_RTFConvString(0) void RTFFilter::init()
{
- if (!(m_Data.m_hRTFConv = LoadLibrary(_T("rtfconv.dll"))))
- if (!(m_Data.m_hRTFConv = LoadLibrary(_T("plugins\\rtfconv.dll"))))
+ if (!(m_Data.m_hRTFConv = LoadLibrary(L"rtfconv.dll")))
+ if (!(m_Data.m_hRTFConv = LoadLibrary(L"plugins\\rtfconv.dll")))
return;
if (!(m_Data.m_RTFConvString = reinterpret_cast<RTFCONVSTRING>(GetProcAddress(m_Data.m_hRTFConv, "RtfconvString")))) {
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h index 6351f8d97f..834b154ccb 100644 --- a/plugins/HistoryStats/src/utils.h +++ b/plugins/HistoryStats/src/utils.h @@ -9,12 +9,12 @@ namespace utils // time formatting
ext::string timestampToString(time_t value, const TCHAR* format);
ext::string tmStructToString(const tm& value, const TCHAR* format);
- inline ext::string timestampToDateTime(DWORD value) { return timestampToString(value, _T("%c")); }
- inline ext::string timestampToDate(DWORD value) { return timestampToString(value, _T("%x")); }
- inline ext::string timestampToTime(DWORD value) { return timestampToString(value, _T("%X")); }
+ inline ext::string timestampToDateTime(DWORD value) { return timestampToString(value, L"%c"); }
+ inline ext::string timestampToDate(DWORD value) { return timestampToString(value, L"%x"); }
+ inline ext::string timestampToTime(DWORD value) { return timestampToString(value, L"%X"); }
ext::string durationToString(DWORD value);
DWORD parseDate(const ext::string& date);
- inline ext::string formatDate(time_t timeValue) { return timestampToString(timeValue, _T("%Y-%m-%d")); }
+ inline ext::string formatDate(time_t timeValue) { return timestampToString(timeValue, L"%Y-%m-%d"); }
// number formatting
ext::string intToString(int value);
@@ -32,7 +32,7 @@ namespace utils inline ext::string replaceAll(ext::string text, const TCHAR* find, const TCHAR* replace) { replaceAllInPlace(text, find, replace); return text; }
inline ext::string htmlEscape(ext::string text) { htmlEscapeInPlace(text); return text; }
const TCHAR* stripPrefix(const TCHAR* szPrefix, const TCHAR* szText);
- ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick = _T(""));
+ ext::string replaceVariables(const ext::string& strFormat, time_t timeValue, const TCHAR* szNick = L"");
// case conversion
ext::string toLowerCase(const ext::string& text);
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp index 418ae16b9a..836599dd8e 100644 --- a/plugins/IEHistory/src/dlgHandlers.cpp +++ b/plugins/IEHistory/src/dlgHandlers.cpp @@ -71,7 +71,7 @@ void LoadName(HWND hWnd) }
TCHAR *szOther = GetContactName(data->contact);
TCHAR buffer[1024];
- sntprintf(buffer, 1024, _T("'%s' - IEHistory"), szOther);
+ sntprintf(buffer, 1024, L"'%s' - IEHistory", szOther);
SetWindowText(hWnd, buffer);
mir_free(szOther);
}
@@ -369,7 +369,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara SetWindowLongPtr(hWnd, GWL_EXSTYLE, WS_EX_RTLREADING);
HWND hStatusBar = CreateWindow(STATUSCLASSNAME, //class
- _T("-"), //title
+ L"-", //title
WS_CHILD | WS_VISIBLE | SBARS_TOOLTIPS | SBARS_SIZEGRIP, //style
0, 0, //x, y
0, 0, //width, height
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 2833d432de..24d39ed408 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -185,10 +185,10 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut) hContact = getRealContact(hContact);
ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact));
- uinIn = mir_utf8encodeT(id ? id.get() : _T(""));
+ uinIn = mir_utf8encodeT(id ? id.get() : L"");
id = Contact_GetInfo(CNF_UNIQUEID, NULL);
- uinOut = mir_utf8encodeT(id ? id.get() : _T(""));
+ uinOut = mir_utf8encodeT(id ? id.get() : L"");
}
wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index d57f9c8582..adc87feb1b 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -168,7 +168,7 @@ void IEViewSink::PropertyChange(BSTR) {} void IEViewSink::BeforeNavigate2(IDispatch*, VARIANT* url, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT_BOOL* cancel)
{
#ifndef GECKO
- if (mir_tstrcmp(url->bstrVal, _T("about:blank")))
+ if (mir_tstrcmp(url->bstrVal, L"about:blank"))
{
Utils_OpenUrlT(url->bstrVal);
*cancel = VARIANT_TRUE;
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index b7fa241abd..94495a434c 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -509,7 +509,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::isSmileyAdd());
EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
{
- TCHAR* size[] = { _T("320 x 205"), _T("480 x 385"), _T("560 x 349"), _T("640 x 390") };
+ TCHAR* size[] = { L"320 x 205", L"480 x 385", L"560 x 349", L"640 x 390" };
for (int i = 0; i < _countof(size); ++i) {
int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(size[i]));
SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETITEMDATA, item, 0);
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 9be18d0f3e..49ee57bc83 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -58,7 +58,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto) if (result == NULL) {
/* relative -> absolute */
mir_tstrcpy(tmpPath, dbv.ptszVal);
- if (_tcsncmp(tmpPath, _T("http://"), 7))
+ if (_tcsncmp(tmpPath, L"http://", 7))
PathToAbsoluteT(dbv.ptszVal, tmpPath);
result = tmpPath;
}
@@ -86,7 +86,7 @@ char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mo TCHAR str[300];
if (mode) // time
- TimeZone_ToStringT(check, (dwFlags & Options::LOG_SHOW_SECONDS) ? _T("s") : _T("t"), str, _countof(str));
+ TimeZone_ToStringT(check, (dwFlags & Options::LOG_SHOW_SECONDS) ? L"s" : L"t", str, _countof(str));
else { // date
struct tm tm_now, tm_today;
time_t now = time(NULL);
@@ -100,7 +100,7 @@ char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mo else if (dwFlags & Options::LOG_RELATIVE_DATE && check > (today - 86400))
_tcsncpy(str, TranslateT("Yesterday"), _countof(str));
else
- TimeZone_ToStringT(check, (dwFlags & Options::LOG_LONG_DATE) ? _T("D") : _T("d"), str, _countof(str));
+ TimeZone_ToStringT(check, (dwFlags & Options::LOG_LONG_DATE) ? L"D" : L"d", str, _countof(str));
}
mir_strncpy(szResult, T2Utf(str), 500);
@@ -157,7 +157,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- mir_tstrcat(szNoAvatarPath, _T("\\noavatar.png"));
+ mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
if (_taccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
@@ -326,7 +326,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
- mir_tstrcat(szNoAvatarPath, _T("\\noavatar.png"));
+ mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
if (_taccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index a7e55a5541..56af00067a 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -25,7 +25,7 @@ wchar_t Utils::base_dir[MAX_PATH]; const wchar_t *Utils::getBaseDir()
{
- PathToAbsoluteT(_T("miranda32.exe"), base_dir);
+ PathToAbsoluteT(L"miranda32.exe", base_dir);
return base_dir;
}
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index f257153e75..920bf8b15d 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -242,7 +242,7 @@ static LRESULT CALLBACK ListWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM if (hwndCombo != NULL)
SendMessage(hwndCombo, WM_KILLFOCUS, 0, (LPARAM)hwndCombo);
- hwndCombo = CreateWindowEx(WS_EX_CLIENTEDGE, WC_COMBOBOX, _T(""), WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,
+ hwndCombo = CreateWindowEx(WS_EX_CLIENTEDGE, WC_COMBOBOX, L"", WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST,
r.left + 3, r.top, r.right - r.left - 3, r.bottom - r.top, hwnd, 0, hInst, NULL);
// copy a font from listview
@@ -1000,7 +1000,7 @@ void MirandaImport(HWND hdlg) // Get number of contacts
int nNumberOfContacts = srcDb->GetContactCount();
AddMessage(LPGENT("Number of contacts in database: %d"), nNumberOfContacts);
- AddMessage(_T(""));
+ AddMessage(L"");
// Configure database for fast writing
dstDb->SetCacheSafetyMode(FALSE);
@@ -1026,7 +1026,7 @@ void MirandaImport(HWND hdlg) if (nGroupsCount == -1)
AddMessage(LPGENT("Group import failed."));
- AddMessage(_T(""));
+ AddMessage(L"");
}
// End of Import Groups
@@ -1057,7 +1057,7 @@ void MirandaImport(HWND hdlg) ImportMeta(arMetas[i]);
}
else AddMessage(LPGENT("Skipping new contacts import."));
- AddMessage(_T(""));
+ AddMessage(L"");
// End of Import Contacts
// Import NULL contact message chain
@@ -1072,7 +1072,7 @@ void MirandaImport(HWND hdlg) ImportHistory(NULL, accs, protoCount);
}
else AddMessage(LPGENT("Skipping system history import."));
- AddMessage(_T(""));
+ AddMessage(L"");
// Import other contact messages
if (nImportOptions & IOPT_HISTORY) {
@@ -1086,7 +1086,7 @@ void MirandaImport(HWND hdlg) }
}
else AddMessage(LPGENT("Skipping history import."));
- AddMessage(_T(""));
+ AddMessage(L"");
// Restore database writing mode
dstDb->SetCacheSafetyMode(TRUE);
diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 8c3c774870..cbddcb5836 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -33,7 +33,7 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * {
// find in Miranda profile subfolders
TCHAR searchspec[MAX_PATH];
- mir_sntprintf(searchspec, _T("%s\\*.*"), mirandaPath);
+ mir_sntprintf(searchspec, L"%s\\*.*", mirandaPath);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(searchspec, &fd);
@@ -42,7 +42,7 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * do {
// find all subfolders except "." and ".."
- if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L".."))
continue;
// skip the current profile too
@@ -50,9 +50,9 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * continue;
TCHAR buf[MAX_PATH], profile[MAX_PATH];
- mir_sntprintf(buf, _T("%s\\%s\\%s.dat"), mirandaPath, fd.cFileName, fd.cFileName);
+ mir_sntprintf(buf, L"%s\\%s\\%s.dat", mirandaPath, fd.cFileName, fd.cFileName);
if (_taccess(buf, 0) == 0) {
- mir_sntprintf(profile, _T("%s.dat"), fd.cFileName);
+ mir_sntprintf(profile, L"%s.dat", fd.cFileName);
int i = SendDlgItemMessage(hwndDlg, IDC_LIST, LB_ADDSTRING, 0, (LPARAM)profile);
SendDlgItemMessage(hwndDlg, IDC_LIST, LB_SETITEMDATA, i, (LPARAM)mir_tstrdup(buf));
@@ -71,10 +71,10 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- VARST pfd(_T("%miranda_path%\\Profiles"));
- VARST pfd1(_T("%miranda_path%"));
- VARST pfd2(_T("%miranda_profilesdir%"));
- VARST pfn(_T("%miranda_profilename%"));
+ VARST pfd(L"%miranda_path%\\Profiles");
+ VARST pfd1(L"%miranda_path%");
+ VARST pfd2(L"%miranda_profilesdir%");
+ VARST pfn(L"%miranda_profilename%");
SearchForLists(hwndDlg, pfd2, pfn);
SearchForLists(hwndDlg, pfd1, NULL);
@@ -119,17 +119,17 @@ INT_PTR CALLBACK MirandaPageProc(HWND hwndDlg, UINT message, WPARAM wParam, LPAR break;
case IDC_OTHER:
- ptrT pfd(Utils_ReplaceVarsT(_T("%miranda_profilesdir%")));
+ ptrT pfd(Utils_ReplaceVarsT(L"%miranda_profilesdir%"));
TCHAR str[MAX_PATH], text[256];
GetDlgItemText(hwndDlg, IDC_FILENAME, str, _countof(str));
- mir_sntprintf(text, _T("%s (*.dat, *.bak)%c*.dat;*.bak%c%s (*.*)%c*.*%c%c"), TranslateT("Miranda NG database"), 0, 0, TranslateT("All Files"), 0, 0, 0);
+ mir_sntprintf(text, L"%s (*.dat, *.bak)%c*.dat;*.bak%c%s (*.*)%c*.*%c%c", TranslateT("Miranda NG database"), 0, 0, TranslateT("All Files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
ofn.lpstrFilter = text;
- ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrDefExt = L"dat";
ofn.lpstrFile = str;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_NOCHANGEDIR | OFN_DONTADDTORECENT;
ofn.nMaxFile = _countof(str);
diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp index 1b11915e45..8fd9325b5f 100644 --- a/plugins/KeyboardNotify/src/keyboard.cpp +++ b/plugins/KeyboardNotify/src/keyboard.cpp @@ -40,11 +40,11 @@ BOOL OpenKeyboardDevice() TCHAR aux1[MAX_PATH+1], aux2[MAX_PATH+1];
do {
- mir_sntprintf(aux1, _T("Kbd%d"), i);
- mir_sntprintf(aux2, _T("\\Device\\KeyboardClass%d"), i);
+ mir_sntprintf(aux1, L"Kbd%d", i);
+ mir_sntprintf(aux2, L"\\Device\\KeyboardClass%d", i);
DefineDosDevice(DDD_RAW_TARGET_PATH, aux1, aux2);
- mir_sntprintf(aux1, _T("\\\\.\\Kbd%d"), i);
+ mir_sntprintf(aux1, L"\\\\.\\Kbd%d", i);
hKbdDev[i] = CreateFile(aux1, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
@@ -80,7 +80,7 @@ void CloseKeyboardDevice() if (hKbdDev[i] != INVALID_HANDLE_VALUE)
CloseHandle(hKbdDev[i]);
- mir_sntprintf(aux, _T("Kbd%d"), i);
+ mir_sntprintf(aux, L"Kbd%d", i);
DefineDosDevice(DDD_REMOVE_DEFINITION, aux, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 54d1992fbb..9bccd96da1 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -914,9 +914,9 @@ static int ModulesLoaded(WPARAM, LPARAM) // Create some synchronisation objects
createEventPrefix(eventPrefix, MAX_PATH - 11);
- mir_sntprintf(eventName, _T("%s/FlashEvent"), eventPrefix);
+ mir_sntprintf(eventName, L"%s/FlashEvent", eventPrefix);
hFlashEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
- mir_sntprintf(eventName, _T("%s/ExitEvent"), eventPrefix);
+ mir_sntprintf(eventName, L"%s/ExitEvent", eventPrefix);
hExitEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
hThread = mir_forkthread(FlashThreadFunction, 0);
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp index 5b20e8f4b7..afd15ae342 100644 --- a/plugins/KeyboardNotify/src/options.cpp +++ b/plugins/KeyboardNotify/src/options.cpp @@ -34,7 +34,7 @@ extern PROCESS_LIST ProcessList; HWND hwndProto, hwndBasic, hwndEffect, hwndTheme, hwndIgnore, hwndCurrentTab; -TCHAR *AttendedName[]={_T("Miranda"), _T("Windows")}; +TCHAR *AttendedName[]={L"Miranda", L"Windows"}; TCHAR *OrderName[]={LPGENT("left -> right"), LPGENT("right -> left"), LPGENT("left <-> right")}; PROCESS_LIST ProcessListAux; @@ -59,7 +59,7 @@ static void writeThemeToCombo(const TCHAR *theme, const TCHAR *custom, BOOL over void exportThemes(const TCHAR *filename) { - FILE *fExport = _tfopen(filename, _T("wt")); + FILE *fExport = _tfopen(filename, L"wt"); if (!fExport) return; @@ -68,14 +68,14 @@ void exportThemes(const TCHAR *filename) TCHAR *szTheme; for (int i = 0; szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i)); i++) { - _ftprintf(fExport, _T("[%s]\n"), szTheme); + _ftprintf(fExport, L"[%s]\n", szTheme); mir_free(szTheme); if (szTheme = db_get_tsa(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i))) { - _ftprintf(fExport, _T("%s\n\n"), szTheme); + _ftprintf(fExport, L"%s\n\n", szTheme); mir_free(szTheme); } else - _ftprintf(fExport, _T("0\n\n")); + _ftprintf(fExport, L"0\n\n"); } _ftprintf(fExport, TranslateT("\n; End of automatically generated Keyboard Notify Theme file\n")); @@ -85,7 +85,7 @@ void exportThemes(const TCHAR *filename) void importThemes(const TCHAR *filename, BOOL overrideExisting) { - FILE *fImport = _tfopen(filename, _T("rt")); + FILE *fImport = _tfopen(filename, L"rt"); if (!fImport) return; @@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcProcesses(HWND hwndDlg, UINT msg, WPARAM wParam, int item = SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_FINDSTRINGEXACT, -1, (LPARAM)szFileName); SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_DELETESTRING, (WPARAM)item, 0); if (SendDlgItemMessage(hwndDlg, IDC_PROGRAMS, CB_GETCOUNT, 0, 0) == 0) { - SetDlgItemText(hwndDlg, IDC_PROGRAMS, _T("")); + SetDlgItemText(hwndDlg, IDC_PROGRAMS, L""); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETEPGM), FALSE); } else @@ -1037,7 +1037,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara if (str) SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, str); else - SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T("")); + SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L""); EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE); @@ -1049,7 +1049,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara int item = SendMessage((HWND)lParam, CB_FINDSTRINGEXACT, -1, (LPARAM)theme); if (item == CB_ERR) { //new theme - SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T("")); + SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L""); EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE); } @@ -1058,7 +1058,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara if (str) SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, str); else - SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T("")); + SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L""); EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), TRUE); } @@ -1139,8 +1139,8 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara mir_free(str); SendDlgItemMessage(hwndDlg, IDC_THEME, CB_DELETESTRING, (WPARAM)item, 0); if (SendDlgItemMessage(hwndDlg, IDC_THEME, CB_GETCOUNT, 0, 0) == 0) { - SetDlgItemText(hwndDlg, IDC_THEME, _T("")); - SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, _T("")); + SetDlgItemText(hwndDlg, IDC_THEME, L""); + SetDlgItemText(hwndDlg, IDC_CUSTOMSTRING, L""); EnableWindow(GetDlgItem(hwndDlg, IDC_DELETE), FALSE); } else { @@ -1163,20 +1163,20 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara ofn.hwndOwner = hwndDlg; ofn.hInstance = NULL; mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme")); - mir_wstrcat(filter, _T(" (*.knt)")); + mir_wstrcat(filter, L" (*.knt)"); pfilter = filter + mir_tstrlen(filter) + 1; - mir_tstrcpy(pfilter, _T("*.knt")); + mir_tstrcpy(pfilter, L"*.knt"); pfilter = pfilter + mir_tstrlen(pfilter) + 1; mir_tstrcpy(pfilter, TranslateT("All Files")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - mir_tstrcpy(pfilter, _T("*.*")); + mir_tstrcpy(pfilter, L"*.*"); pfilter = pfilter + mir_tstrlen(pfilter) + 1; *pfilter = _T('\0'); ofn.lpstrFilter = filter; ofn.lpstrFile = path; ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_NOREADONLYRETURN | OFN_PATHMUSTEXIST; ofn.nMaxFile = _countof(path); - ofn.lpstrDefExt = _T("knt"); + ofn.lpstrDefExt = L"knt"; if (GetSaveFileName(&ofn)) exportThemes(path); } @@ -1191,20 +1191,20 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara ofn.hwndOwner = hwndDlg; ofn.hInstance = NULL; mir_tstrcpy(filter, TranslateT("Keyboard Notify Theme")); - mir_wstrcat(filter, _T(" (*.knt)")); + mir_wstrcat(filter, L" (*.knt)"); pfilter = filter + mir_tstrlen(filter) + 1; - mir_tstrcpy(pfilter, _T("*.knt")); + mir_tstrcpy(pfilter, L"*.knt"); pfilter = pfilter + mir_tstrlen(pfilter) + 1; mir_tstrcpy(pfilter, TranslateT("All Files")); pfilter = pfilter + mir_tstrlen(pfilter) + 1; - mir_tstrcpy(pfilter, _T("*.*")); + mir_tstrcpy(pfilter, L"*.*"); pfilter = pfilter + mir_tstrlen(pfilter) + 1; *pfilter = _T('\0'); ofn.lpstrFilter = filter; ofn.lpstrFile = path; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR; ofn.nMaxFile = _countof(path); - ofn.lpstrDefExt = _T("knt"); + ofn.lpstrDefExt = L"knt"; if (GetOpenFileName(&ofn)) { importThemes(path, IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE) == BST_CHECKED); SendMessage(GetParent(GetParent(hwndDlg)), PSM_CHANGED, 0, 0); @@ -1244,7 +1244,7 @@ static INT_PTR CALLBACK DlgProcThemeOptions(HWND hwndDlg, UINT msg, WPARAM wPara if (str) db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), str); else - db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), _T("")); + db_set_ts(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), L""); if (!mir_wstrcmp(theme, themeAux)) wCustomTheme = i; diff --git a/plugins/KeyboardNotify/src/utils.cpp b/plugins/KeyboardNotify/src/utils.cpp index 451ac0867c..23b9408ff2 100644 --- a/plugins/KeyboardNotify/src/utils.cpp +++ b/plugins/KeyboardNotify/src/utils.cpp @@ -38,7 +38,7 @@ TCHAR *getAbsoluteProfileName(TCHAR *absoluteProfileName, size_t maxLen) profilePath[0] = profileName[0] = '\0';
CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)profilePath);
CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)profileName);
- mir_sntprintf(absoluteProfileName, maxLen, _T("%s\\%s"), profilePath, profileName);
+ mir_sntprintf(absoluteProfileName, maxLen, L"%s\\%s", profilePath, profileName);
return absoluteProfileName;
}
diff --git a/plugins/Kuzne4ikCrypt/src/utils.cpp b/plugins/Kuzne4ikCrypt/src/utils.cpp index a669540320..04ac8bab4f 100644 --- a/plugins/Kuzne4ikCrypt/src/utils.cpp +++ b/plugins/Kuzne4ikCrypt/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/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 5538f37b8b..a383681c07 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -332,52 +332,52 @@ int ModulesLoaded(WPARAM, LPARAM) tr.memType = TR_MEM_MIRANDA;
tr.flags = TRF_FREEMEM | TRF_PARSEFUNC | TRF_FIELD | TRF_TCHAR;
- tr.tszTokenString = _T("listening_info");
+ tr.tszTokenString = L"listening_info";
tr.parseFunctionT = VariablesParseInfo;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Listening info as set in the options");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_type");
+ tr.tszTokenString = L"listening_type";
tr.parseFunctionT = VariablesParseType;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Media type: Music, Video, etc.");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_artist");
+ tr.tszTokenString = L"listening_artist";
tr.parseFunctionT = VariablesParseArtist;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Artist name");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_album");
+ tr.tszTokenString = L"listening_album";
tr.parseFunctionT = VariablesParseAlbum;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Album name");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_title");
+ tr.tszTokenString = L"listening_title";
tr.parseFunctionT = VariablesParseTitle;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Song name");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_track");
+ tr.tszTokenString = L"listening_track";
tr.parseFunctionT = VariablesParseTrack;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Track number");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_year");
+ tr.tszTokenString = L"listening_year";
tr.parseFunctionT = VariablesParseYear;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Song year");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_genre");
+ tr.tszTokenString = L"listening_genre";
tr.parseFunctionT = VariablesParseGenre;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Song genre");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_length");
+ tr.tszTokenString = L"listening_length";
tr.parseFunctionT = VariablesParseLength;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Song length");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
- tr.tszTokenString = _T("listening_player");
+ tr.tszTokenString = L"listening_player";
tr.parseFunctionT = VariablesParsePlayer;
tr.szHelpText = LPGEN("Listening info") "\t" LPGEN("Player name");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
@@ -539,7 +539,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL) if (opts.xstatus_set == CHECK_XSTATUS_MUSIC) {
// Set text to nothing
TCHAR *fr[] = {
- _T("listening"), opts.nothing
+ L"listening", opts.nothing
};
Buffer<TCHAR> name;
@@ -611,16 +611,16 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti = NULL) }
TCHAR *fr[] = {
- _T("listening"), GetParsedFormat(lti),
- _T("artist"), UNKNOWN(lti->ptszArtist),
- _T("album"), UNKNOWN(lti->ptszAlbum),
- _T("title"), UNKNOWN(lti->ptszTitle),
- _T("track"), UNKNOWN(lti->ptszTrack),
- _T("year"), UNKNOWN(lti->ptszYear),
- _T("genre"), UNKNOWN(lti->ptszGenre),
- _T("length"), UNKNOWN(lti->ptszLength),
- _T("player"), UNKNOWN(lti->ptszPlayer),
- _T("type"), UNKNOWN(lti->ptszType)
+ L"listening", GetParsedFormat(lti),
+ L"artist", UNKNOWN(lti->ptszArtist),
+ L"album", UNKNOWN(lti->ptszAlbum),
+ L"title", UNKNOWN(lti->ptszTitle),
+ L"track", UNKNOWN(lti->ptszTrack),
+ L"year", UNKNOWN(lti->ptszYear),
+ L"genre", UNKNOWN(lti->ptszGenre),
+ L"length", UNKNOWN(lti->ptszLength),
+ L"player", UNKNOWN(lti->ptszPlayer),
+ L"type", UNKNOWN(lti->ptszType)
};
Buffer<TCHAR> name;
@@ -722,15 +722,15 @@ TCHAR *GetParsedFormat(LISTENINGTOINFO *lti) return NULL;
TCHAR *fr[] = {
- _T("artist"), UNKNOWN(lti->ptszArtist),
- _T("album"), UNKNOWN(lti->ptszAlbum),
- _T("title"), UNKNOWN(lti->ptszTitle),
- _T("track"), UNKNOWN(lti->ptszTrack),
- _T("year"), UNKNOWN(lti->ptszYear),
- _T("genre"), UNKNOWN(lti->ptszGenre),
- _T("length"), UNKNOWN(lti->ptszLength),
- _T("player"), UNKNOWN(lti->ptszPlayer),
- _T("type"), UNKNOWN(lti->ptszType)
+ L"artist", UNKNOWN(lti->ptszArtist),
+ L"album", UNKNOWN(lti->ptszAlbum),
+ L"title", UNKNOWN(lti->ptszTitle),
+ L"track", UNKNOWN(lti->ptszTrack),
+ L"year", UNKNOWN(lti->ptszYear),
+ L"genre", UNKNOWN(lti->ptszGenre),
+ L"length", UNKNOWN(lti->ptszLength),
+ L"player", UNKNOWN(lti->ptszPlayer),
+ L"type", UNKNOWN(lti->ptszType)
};
Buffer<TCHAR> ret;
@@ -910,19 +910,19 @@ TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai) LISTENINGTOINFO *lti = GetListeningInfo();
if (lti == NULL) {
ai->flags = AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
TCHAR *fr[] = {
- _T("artist"), UNKNOWN(lti->ptszArtist),
- _T("album"), UNKNOWN(lti->ptszAlbum),
- _T("title"), UNKNOWN(lti->ptszTitle),
- _T("track"), UNKNOWN(lti->ptszTrack),
- _T("year"), UNKNOWN(lti->ptszYear),
- _T("genre"), UNKNOWN(lti->ptszGenre),
- _T("length"), UNKNOWN(lti->ptszLength),
- _T("player"), UNKNOWN(lti->ptszPlayer),
- _T("type"), UNKNOWN(lti->ptszType)
+ L"artist", UNKNOWN(lti->ptszArtist),
+ L"album", UNKNOWN(lti->ptszAlbum),
+ L"title", UNKNOWN(lti->ptszTitle),
+ L"track", UNKNOWN(lti->ptszTrack),
+ L"year", UNKNOWN(lti->ptszYear),
+ L"genre", UNKNOWN(lti->ptszGenre),
+ L"length", UNKNOWN(lti->ptszLength),
+ L"player", UNKNOWN(lti->ptszPlayer),
+ L"type", UNKNOWN(lti->ptszType)
};
Buffer<TCHAR> ret;
@@ -938,7 +938,7 @@ TCHAR* VariablesParseInfo(ARGUMENTSINFO *ai) if (lti == NULL) \
{ \
ai->flags = AIF_FALSE; \
- return mir_tstrdup(_T("")); \
+ return mir_tstrdup(L""); \
} \
else if (IsEmpty(lti->__field__)) \
{ \
diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp index 90c9c58293..2e36c42b2a 100644 --- a/plugins/ListeningTo/src/options.cpp +++ b/plugins/ListeningTo/src/options.cpp @@ -51,10 +51,10 @@ static OptPageControl optionsControls[] = { };
static OptPageControl formatControls[] = {
- { &opts.templ, CONTROL_TEXT, IDC_TEMPLATE, "Template", (ULONG_PTR)_T("%artist% - %title%") },
+ { &opts.templ, CONTROL_TEXT, IDC_TEMPLATE, "Template", (ULONG_PTR)L"%artist% - %title%" },
{ &opts.unknown, CONTROL_TEXT, IDC_UNKNOWN, "Unknown", (ULONG_PTR)LPGENT("<Unknown>"), 0, 0, 128 },
{ &opts.xstatus_name, CONTROL_TEXT, IDC_XSTATUS_NAME, "XStatusName", (ULONG_PTR)LPGENT("Listening to") },
- { &opts.xstatus_message, CONTROL_TEXT, IDC_XSTATUS_MESSAGE, "XStatusMessage", (ULONG_PTR)_T("%listening%") },
+ { &opts.xstatus_message, CONTROL_TEXT, IDC_XSTATUS_MESSAGE, "XStatusMessage", (ULONG_PTR)L"%listening%" },
{ &opts.nothing, CONTROL_TEXT, IDC_NOTHING, "Nothing", (ULONG_PTR)LPGENT("<Nothing is playing now>"), 0, 0, 128 }
};
@@ -188,8 +188,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // Init combo
int total = EXTRA_ICON_COUNT, first = 0;
- SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_T("1"));
- SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)_T("2"));
+ SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)L"1");
+ SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM)L"2");
if (total > 0) {
TCHAR tmp[10];
diff --git a/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp b/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp index 5e7fa9a856..60fbf8ebe7 100644 --- a/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp +++ b/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/dialog_resize_helper.cpp @@ -131,7 +131,7 @@ void dialog_resize_helper::add_sizegrip() {
if (parent != 0 && sizegrip == 0)
{
- sizegrip = CreateWindowEx(0, WC_SCROLLBAR, _T(""), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SBS_SIZEGRIP | SBS_SIZEBOXBOTTOMRIGHTALIGN,
+ sizegrip = CreateWindowEx(0, WC_SCROLLBAR, L"", WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SBS_SIZEGRIP | SBS_SIZEBOXBOTTOMRIGHTALIGN,
0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
parent, (HMENU)0, NULL, NULL);
if (sizegrip != 0)
diff --git a/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/win32_misc.cpp b/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/win32_misc.cpp index 07d5034898..21560dcfcc 100644 --- a/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/win32_misc.cpp +++ b/plugins/ListeningTo/src/players/foo_mlt/foobar2000/helpers/win32_misc.cpp @@ -77,14 +77,14 @@ void GetOSVersionString(pfc::string_base & out) { }
static bool running_under_wine(void) {
- HMODULE module = GetModuleHandle(_T("ntdll.dll"));
+ HMODULE module = GetModuleHandle(L"ntdll.dll");
if (!module) return false;
return GetProcAddress(module, "wine_server_call") != NULL;
}
static bool FetchWineInfoAppend(pfc::string_base & out) {
typedef const char *(__cdecl *t_wine_get_build_id)(void);
typedef void (__cdecl *t_wine_get_host_version)( const char **sysname, const char **release );
- const HMODULE ntdll = GetModuleHandle(_T("ntdll.dll"));
+ const HMODULE ntdll = GetModuleHandle(L"ntdll.dll");
if (ntdll == NULL) return false;
t_wine_get_build_id wine_get_build_id;
t_wine_get_host_version wine_get_host_version;
diff --git a/plugins/ListeningTo/src/players/foo_mlt/pfc/profiler.cpp b/plugins/ListeningTo/src/players/foo_mlt/pfc/profiler.cpp index 3ec7ae5789..8eeac44c03 100644 --- a/plugins/ListeningTo/src/players/foo_mlt/pfc/profiler.cpp +++ b/plugins/ListeningTo/src/players/foo_mlt/pfc/profiler.cpp @@ -24,7 +24,7 @@ profiler_static::~profiler_static() OutputDebugStringA(message);
} catch(...) {
//should never happen
- OutputDebugString(_T("unexpected profiler failure\n"));
+ OutputDebugString(L"unexpected profiler failure\n");
}
}
diff --git a/plugins/ListeningTo/src/players/foobar.cpp b/plugins/ListeningTo/src/players/foobar.cpp index 4c1a2f8372..eb06043b11 100644 --- a/plugins/ListeningTo/src/players/foobar.cpp +++ b/plugins/ListeningTo/src/players/foobar.cpp @@ -20,15 +20,15 @@ Boston, MA 02111-1307, USA. #include "../stdafx.h"
static TCHAR *wcs[] = {
- _T("{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1"), // Foobar 0.9.1
- _T("{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}"),
- _T("{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}"), // Foobar 0.9.5.3
- _T("{E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}"), // Foobar Columns UI
+ L"{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}/1", // Foobar 0.9.1
+ L"{DA7CD0DE-1602-45e6-89A1-C2CA151E008E}",
+ L"{97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}", // Foobar 0.9.5.3
+ L"{E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}", // Foobar Columns UI
};
Foobar::Foobar()
{
- name = _T("foobar2000");
+ name = L"foobar2000";
window_classes = wcs;
num_window_classes = _countof(wcs);
}
diff --git a/plugins/ListeningTo/src/players/generic.cpp b/plugins/ListeningTo/src/players/generic.cpp index 10bb76f9f7..62456fd480 100644 --- a/plugins/ListeningTo/src/players/generic.cpp +++ b/plugins/ListeningTo/src/players/generic.cpp @@ -27,12 +27,12 @@ GenericPlayer *singleton = NULL; void m_log(const TCHAR *function, const TCHAR *fmt, ...)
{
if (hLog == NULL) {
- hLog = mir_createLog(MODULE_NAME, _T("ListeningTo log"), _T("c:\\temp\\listeningto.txt"), 0);
+ hLog = mir_createLog(MODULE_NAME, L"ListeningTo log", L"c:\\temp\\listeningto.txt", 0);
if (hLog == NULL)
return;
}
- mir_writeLogT(hLog, _T("%s: "), function);
+ mir_writeLogT(hLog, L"%s: ", function);
va_list args;
va_start(args, fmt);
@@ -67,7 +67,7 @@ static LRESULT CALLBACK ReceiverWndProc(HWND hWnd, UINT message, WPARAM wParam, GenericPlayer::GenericPlayer()
{
- name = _T("GenericPlayer");
+ name = L"GenericPlayer";
enabled = TRUE;
received[0] = L'\0';
@@ -122,7 +122,7 @@ void GenericPlayer::ProcessReceived() parts[pCount] = p;
pCount++;
p = p1 + 2;
- p1 = wcsstr(p, _T("\\0"));
+ p1 = wcsstr(p, L"\\0");
} while (p1 != NULL && pCount < 10);
if (p1 != NULL)
*p1 = _T('\0');
@@ -154,7 +154,7 @@ void GenericPlayer::ProcessReceived() li->cbSize = sizeof(listening_info);
li->dwFlags = LTI_TCHAR;
- li->ptszType = U2TD(parts[2], _T("Music"));
+ li->ptszType = U2TD(parts[2], L"Music");
li->ptszTitle = U2T(parts[3]);
li->ptszArtist = U2T(parts[4]);
li->ptszAlbum = U2T(parts[5]);
@@ -177,9 +177,9 @@ void GenericPlayer::ProcessReceived() int h = (length / 60) / 60;
if (h > 0)
- mir_sntprintf(li->ptszLength, 9, _T("%d:%02d:%02d"), h, m, s);
+ mir_sntprintf(li->ptszLength, 9, L"%d:%02d:%02d", h, m, s);
else
- mir_sntprintf(li->ptszLength, 9, _T("%d:%02d"), m, s);
+ mir_sntprintf(li->ptszLength, 9, L"%d:%02d", m, s);
}
}
}
diff --git a/plugins/ListeningTo/src/players/itunes.cpp b/plugins/ListeningTo/src/players/itunes.cpp index af6723ece3..79cea49a13 100644 --- a/plugins/ListeningTo/src/players/itunes.cpp +++ b/plugins/ListeningTo/src/players/itunes.cpp @@ -26,7 +26,7 @@ extern "C" ITunes::ITunes()
{
- name = _T("iTunes");
+ name = L"iTunes";
needPoll = TRUE;
filename[0] = L'\0';
@@ -40,7 +40,7 @@ ITunes::ITunes() void ITunes::FindWindow()
{
- hwnd = ::FindWindow(_T("iTunes"), _T("iTunes"));
+ hwnd = ::FindWindow(L"iTunes", L"iTunes");
}
void ITunes::FreeTempData()
@@ -125,12 +125,12 @@ BOOL ITunes::FillCache() int h = (lret / 60) / 60;
if (h > 0)
- mir_sntprintf(listening_info.ptszLength, 9, _T("%d:%02d:%02d"), h, m, s);
+ mir_sntprintf(listening_info.ptszLength, 9, L"%d:%02d:%02d", h, m, s);
else
- mir_sntprintf(listening_info.ptszLength, 9, _T("%d:%02d"), m, s);
+ mir_sntprintf(listening_info.ptszLength, 9, L"%d:%02d", m, s);
}
- listening_info.ptszType = mir_tstrdup(_T("Music"));
+ listening_info.ptszType = mir_tstrdup(L"Music");
if (listening_info.ptszTitle == NULL) {
// Get from filename
diff --git a/plugins/ListeningTo/src/players/mradio.cpp b/plugins/ListeningTo/src/players/mradio.cpp index e2ce0b40ef..5654325be2 100644 --- a/plugins/ListeningTo/src/players/mradio.cpp +++ b/plugins/ListeningTo/src/players/mradio.cpp @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. MRadio::MRadio()
{
- name = _T("mRadio");
+ name = L"mRadio";
needPoll = TRUE;
}
@@ -43,8 +43,8 @@ int MRadio::GetData() if (!db_get_s(hContact, "mRadio", "Nick", &dbv)) {
listening_info.cbSize = sizeof(listening_info);
listening_info.dwFlags = LTI_TCHAR;
- listening_info.ptszArtist = mir_tstrdup(_T("Radio"));
- listening_info.ptszType = mir_tstrdup(_T("Radio"));
+ listening_info.ptszArtist = mir_tstrdup(L"Radio");
+ listening_info.ptszType = mir_tstrdup(L"Radio");
listening_info.ptszTitle = mir_a2t(dbv.pszVal);
db_free(&dbv);
diff --git a/plugins/ListeningTo/src/players/player.cpp b/plugins/ListeningTo/src/players/player.cpp index 652f58fc20..a2bfcd1751 100644 --- a/plugins/ListeningTo/src/players/player.cpp +++ b/plugins/ListeningTo/src/players/player.cpp @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. extern void HasNewListeningInfo();
-Player::Player() : name(_T("Player")), enabled(FALSE), needPoll(FALSE)
+Player::Player() : name(L"Player"), enabled(FALSE), needPoll(FALSE)
{
memset(&listening_info, 0, sizeof(listening_info));
}
@@ -59,7 +59,7 @@ void Player::FreeData() ExternalPlayer::ExternalPlayer()
{
- name = _T("ExternalPlayer");
+ name = L"ExternalPlayer";
needPoll = TRUE;
window_classes = NULL;
@@ -94,7 +94,7 @@ BOOL ExternalPlayer::GetListeningInfo(LISTENINGTOINFO *lti) CodeInjectionPlayer::CodeInjectionPlayer()
{
- name = _T("CodeInjectionPlayer");
+ name = L"CodeInjectionPlayer";
dll_name = NULL;
message_window_class = NULL;
next_request_time = 0;
diff --git a/plugins/ListeningTo/src/players/watrack.cpp b/plugins/ListeningTo/src/players/watrack.cpp index 1e5af52236..3a7cd24a0f 100644 --- a/plugins/ListeningTo/src/players/watrack.cpp +++ b/plugins/ListeningTo/src/players/watrack.cpp @@ -32,7 +32,7 @@ int NewStatusCallback(WPARAM wParam, LPARAM lParam) WATrack::WATrack()
{
- name = _T("WATrack");
+ name = L"WATrack";
instance = this;
hNewStatusHook = NULL;
}
@@ -102,15 +102,15 @@ void WATrack::GetData() int h = (si->total / 60) / 60;
if (h > 0)
- mir_sntprintf(listening_info.ptszLength, 9, _T("%d:%02d:%02d"), h, m, s);
+ mir_sntprintf(listening_info.ptszLength, 9, L"%d:%02d:%02d", h, m, s);
else
- mir_sntprintf(listening_info.ptszLength, 9, _T("%d:%02d"), m, s);
+ mir_sntprintf(listening_info.ptszLength, 9, L"%d:%02d", m, s);
}
if (si->width > 0)
- listening_info.ptszType = mir_tstrdup(_T("Video"));
+ listening_info.ptszType = mir_tstrdup(L"Video");
else
- listening_info.ptszType = mir_tstrdup(_T("Music"));
+ listening_info.ptszType = mir_tstrdup(L"Music");
listening_info.ptszPlayer = DUPD(si->player, name);
diff --git a/plugins/ListeningTo/src/players/winamp.cpp b/plugins/ListeningTo/src/players/winamp.cpp index 1c3dd02e3e..35bfde5cfe 100644 --- a/plugins/ListeningTo/src/players/winamp.cpp +++ b/plugins/ListeningTo/src/players/winamp.cpp @@ -20,14 +20,14 @@ Boston, MA 02111-1307, USA. #include "../stdafx.h"
static TCHAR *wcs[] = {
- _T("Winamp v1.x")
+ L"Winamp v1.x"
};
Winamp::Winamp()
{
- name = _T("Winamp");
+ name = L"Winamp";
window_classes = wcs;
num_window_classes = _countof(wcs);
- message_window_class = MIRANDA_WINDOWCLASS _T(".Winamp");
+ message_window_class = MIRANDA_WINDOWCLASS L".Winamp";
dll_name = "gen_mlt";
}
diff --git a/plugins/ListeningTo/src/players/winamp_mlt/mlt_winamp.cpp b/plugins/ListeningTo/src/players/winamp_mlt/mlt_winamp.cpp index 1844186570..8c354ea49d 100644 --- a/plugins/ListeningTo/src/players/winamp_mlt/mlt_winamp.cpp +++ b/plugins/ListeningTo/src/players/winamp_mlt/mlt_winamp.cpp @@ -83,7 +83,7 @@ void WindowThread(void *param) RegisterClass(&wc); - hMsgWnd = CreateWindow(MESSAGE_WINDOWCLASS, _T("Miranda ListeningTo Winamp Plugin"), + hMsgWnd = CreateWindow(MESSAGE_WINDOWCLASS, L"Miranda ListeningTo Winamp Plugin", 0, 0, 0, 0, 0, NULL, NULL, hInst, NULL); if (hMsgWnd != NULL) @@ -466,5 +466,5 @@ int init() } void config() { - MessageBox(NULL, _T("Copyright (C) 2006 Ricardo Pescuma Domenecci"), _T("Miranda ListeningTo Winamp Plugin"), 0); + MessageBox(NULL, L"Copyright (C) 2006 Ricardo Pescuma Domenecci", L"Miranda ListeningTo Winamp Plugin", 0); } diff --git a/plugins/ListeningTo/src/players/wmp.cpp b/plugins/ListeningTo/src/players/wmp.cpp index 93776b626c..639c384b40 100644 --- a/plugins/ListeningTo/src/players/wmp.cpp +++ b/plugins/ListeningTo/src/players/wmp.cpp @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. #include "../stdafx.h"
-#define WMP_WINDOWCLASS _T("MsnMsgrUIManager")
+#define WMP_WINDOWCLASS L"MsnMsgrUIManager"
static LRESULT CALLBACK ReceiverWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -29,7 +29,7 @@ WindowsMediaPlayer *singleton = NULL; WindowsMediaPlayer::WindowsMediaPlayer()
{
- name = _T("WindowsMediaPlayer");
+ name = L"WindowsMediaPlayer";
received[0] = _T('\0');
singleton = this;
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index ed2a7b5345..fdd573b3bb 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -264,7 +264,7 @@ BOOL strrep(char *src, char *needle, char *newstring) // 1-subject
BOOL checkFilters(TCHAR* str, int field)
{
- TCHAR buff[512] = _T("");
+ TCHAR buff[512] = L"";
TCHAR *strptr = NULL;
switch(field) {
case 0:
@@ -488,7 +488,7 @@ void ErMsgT(TCHAR* msg) log_p(L"Error: %S", msg);
if(settingShowError && !isPopupWaiting) {
TCHAR buffer[256+14];
- _tcsncpy_s(buffer, _T("LotusNotify: "), _TRUNCATE);
+ _tcsncpy_s(buffer, L"LotusNotify: ", _TRUNCATE);
_tcscat_s(buffer, msg);
isPopupWaiting = TRUE;
PUShowMessageT(buffer, SM_WARNING);
@@ -1571,14 +1571,14 @@ void checkEnvPath(TCHAR *path) log_p(L"checkEnvPath: [%s]", path);
_tcslwr(path);
- TCHAR *cur = _tgetenv(_T("PATH"));
+ TCHAR *cur = _tgetenv(L"PATH");
_tcslwr(cur);
TCHAR *found = _tcsstr(cur, path);
size_t len = mir_tstrlen(path);
if (found != NULL && (found[len] == ';' || found[len] == 0 || (found[len] == '\\' && (found[len + 1] == ';' || found[len + 1] == 0))))
return;
- _tputenv(CMString(FORMAT, _T("PATH=%s;%s;"), cur, path));
+ _tputenv(CMString(FORMAT, L"PATH=%s;%s;", cur, path));
}
//GetStatus
@@ -1599,7 +1599,7 @@ static int modulesloaded(WPARAM, LPARAM) GetLotusPath(path, sizeof(path));
checkEnvPath(path);
- _tcscat_s(path, _countof(path), _T("nnotes.dll"));
+ _tcscat_s(path, _countof(path), L"nnotes.dll");
assert(mir_tstrlen(path) > 0);
log_p(L"Loading dll: %s", path);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 8ff3733012..66d45d1059 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -428,7 +428,7 @@ INT_PTR onSendAuthRequest(WPARAM wparam, LPARAM) DWORD flags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags&PF4_NOCUSTOMAUTH)
- ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)_T(""));
+ ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, (LPARAM)L"");
else
CreateDialogParam(hinstance, MAKEINTRESOURCE(IDD_AUTHREQ), pcli->hwndContactList, AuthReqWndProc, (LPARAM)hContact);
@@ -507,7 +507,7 @@ void ModifyCopyID(MCONTACT hContact, BOOL bShowID, BOOL bTrimID) szID[MAX_IDLEN + 1] = 0;
}
- mir_sntprintf(buffer, _T("%s [%S]"), TranslateT("Copy ID"), szID);
+ mir_sntprintf(buffer, L"%s [%S]", TranslateT("Copy ID"), szID);
Menu_ModifyItem(hmenuCopyID, buffer, hIconCID);
}
else Menu_ModifyItem(hmenuCopyID, LPGENT("Copy ID"), hIconCID);
@@ -629,10 +629,10 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam) if (_tcsclen(msg)) {
if (flags & VF_SMNAME) {
mir_tstrncat(buffer, TranslateTS(statusMsg[i].fullName), (_countof(buffer) - _tcsclen(buffer) - 1));
- mir_tstrncat(buffer, _T(": "), (_countof(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, L": ", (_countof(buffer) - _tcsclen(buffer) - 1));
}
mir_tstrncat(buffer, msg, (_countof(buffer) - _tcsclen(buffer) - 1));
- mir_tstrncat(buffer, _T("\r\n"), (_countof(buffer) - _tcsclen(buffer) - 1));
+ mir_tstrncat(buffer, L"\r\n", (_countof(buffer) - _tcsclen(buffer) - 1));
}
mir_free(msg);
}
@@ -704,7 +704,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam) return 0;
}
if (MessageBox(NULL, (LPCTSTR)TranslateT("Do you want to send authorization request\nto new contact?"),
- _T("Miranda NG"), MB_OKCANCEL | MB_SETFOREGROUND | MB_TOPMOST) == IDOK)
+ L"Miranda NG", MB_OKCANCEL | MB_SETFOREGROUND | MB_TOPMOST) == IDOK)
onSendAuthRequest((WPARAM)hContactNew, 0);
diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp index 03cc15895e..e82e65b045 100644 --- a/plugins/MenuItemEx/src/options.cpp +++ b/plugins/MenuItemEx/src/options.cpp @@ -48,7 +48,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) for (i = 0; i < 4; i++)
{
GetDlgItemText(hdlg, checkboxes[i].idc, buffer, (_countof(buffer) - 3));
- mir_tstrcat(buffer, _T(" *"));
+ mir_tstrcat(buffer, L" *");
SetDlgItemText(hdlg, checkboxes[i].idc, buffer);
}
}
diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp index 2d1e1914c3..b9ba0b26ab 100644 --- a/plugins/MimCmd/src/commands.cpp +++ b/plugins/MimCmd/src/commands.cpp @@ -40,15 +40,15 @@ int ConnectToMiranda() TCHAR *p = _tcsrchr(tszPath, '\\');
if (p) p[1] = 0;
- _tcsncat_s(tszPath, _T("libs"), _TRUNCATE);
+ _tcsncat_s(tszPath, L"libs", _TRUNCATE);
DWORD cbPath = (DWORD)_tcslen(tszPath);
- DWORD cbSize = GetEnvironmentVariable(_T("PATH"), NULL, 0);
+ DWORD cbSize = GetEnvironmentVariable(L"PATH", NULL, 0);
TCHAR *ptszVal = new TCHAR[cbSize + MAX_PATH + 2];
_tcscpy(ptszVal, tszPath);
- _tcscat(ptszVal, _T(";"));
- GetEnvironmentVariable(_T("PATH"), ptszVal + cbPath + 1, cbSize);
- SetEnvironmentVariable(_T("PATH"), ptszVal);
+ _tcscat(ptszVal, L";");
+ GetEnvironmentVariable(L"PATH", ptszVal + cbPath + 1, cbSize);
+ SetEnvironmentVariable(L"PATH", ptszVal);
delete[] ptszVal;
char pluginPath[1024];
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index 8c4861580a..06ea0e2092 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -208,7 +208,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ mir_sntprintf(buffer, 1024, TranslateT("Message sent"));
if(ServiceExists(MS_POPUP_ADDPOPUPCLASS))
- ShowClassPopupT("MirFox_Notify", _T("MirFox"), buffer);
+ ShowClassPopupT("MirFox_Notify", L"MirFox", buffer);
else
PUShowMessageT(buffer, SM_NOTIFY);
@@ -407,7 +407,7 @@ void MirandaUtils::setStatusOnAccount(ActionThreadArgStruct* args) }
if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
- ShowClassPopupT("MirFox_Notify", _T("MirFox"), buffer);
+ ShowClassPopupT("MirFox_Notify", L"MirFox", buffer);
} else {
PUShowMessageT(buffer, SM_NOTIFY);
}
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index 7aef66d263..b6d77a2973 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -62,8 +62,8 @@ static int lua_FindIterator(lua_State *L) }
}
- if (!mir_tstrcmpi(ffd.cFileName, _T(".")) ||
- !mir_tstrcmpi(ffd.cFileName, _T("..")) ||
+ if (!mir_tstrcmpi(ffd.cFileName, L".") ||
+ !mir_tstrcmpi(ffd.cFileName, L"..") ||
(ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT))
{
lua_pushlightuserdata(L, hFind);
@@ -1708,14 +1708,14 @@ static int global_GetOpenFileName(lua_State *L) {
_A2T tszExt(lua_tostring(L, 1));
- TCHAR buff[MAX_PATH] = _T("");
+ TCHAR buff[MAX_PATH] = L"";
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
ofn.lpstrFile = buff;
ofn.nMaxFile = _countof(buff);
ofn.lpstrDefExt = tszExt;
- ofn.lpstrFilter = _T("\0\0");
+ ofn.lpstrFilter = L"\0\0";
if (GetOpenFileName(&ofn))
lua_pushstring(L, T2Utf(buff));
diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 72bde7761f..6714d7ebed 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -62,9 +62,9 @@ void CMLuaOptions::OnInitDialog() TCHAR scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
PathToRelativeT(scriptDir, relativeScriptDir, NULL);
- mir_sntprintf(header, _T("%s (%s)"), TranslateT("Common scripts"), relativeScriptDir);
+ mir_sntprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
- m_scripts.AddColumn(0, _T("Script"), 380);
+ m_scripts.AddColumn(0, L"Script", 380);
m_scripts.AddColumn(1, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
m_scripts.AddColumn(2, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
@@ -126,7 +126,7 @@ void CMLuaOptions::OnScriptListClick(CCtrlListView::TEventInfo *evt) switch (lvi.iSubItem)
{
case 1:
- ShellExecute(m_hwnd, _T("Open"), script->GetFilePath(), NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(m_hwnd, L"Open", script->GetFilePath(), NULL, NULL, SW_SHOWNORMAL);
break;
case 2:
@@ -162,7 +162,7 @@ int CMLuaOptions::OnOptionsInit(WPARAM wParam, LPARAM) odp.hInstance = g_hInstance;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
odp.ptszGroup = LPGENT("Services");
- odp.ptszTitle = _T("Lua");
+ odp.ptszTitle = L"Lua";
odp.ptszTab = LPGENT("Scripts");
odp.pDialog = CMLuaOptions::CreateOptionsPage();
Options_AddPage(wParam, &odp);
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index ddecbad547..f95fdbfc78 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -7,7 +7,7 @@ CMLuaScriptLoader::CMLuaScriptLoader(lua_State *L) : L(L) void CMLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file)
{
TCHAR fullPath[MAX_PATH], path[MAX_PATH];
- mir_sntprintf(fullPath, _T("%s\\%s"), scriptDir, file);
+ mir_sntprintf(fullPath, L"%s\\%s", scriptDir, file);
PathToRelativeT(fullPath, path);
CMLuaScript *script = new CMLuaScript(L, path);
@@ -15,12 +15,12 @@ void CMLuaScriptLoader::LoadScript(const TCHAR *scriptDir, const TCHAR *file) if (db_get_b(NULL, MODULE, _T2A(file), 1) == FALSE)
{
- Log(_T("%s:PASS"), path);
+ Log(L"%s:PASS", path);
return;
}
if (script->Load())
- Log(_T("%s:OK"), path);
+ Log(L"%s:OK", path);
}
void CMLuaScriptLoader::LoadScripts()
@@ -28,10 +28,10 @@ void CMLuaScriptLoader::LoadScripts() TCHAR scriptDir[MAX_PATH];
FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARST(MIRLUA_PATHT));
- Log(_T("Loading scripts from %s"), scriptDir);
+ Log(L"Loading scripts from %s", scriptDir);
TCHAR searchMask[MAX_PATH];
- mir_sntprintf(searchMask, _T("%s\\%s"), scriptDir, _T("*.lua"));
+ mir_sntprintf(searchMask, L"%s\\%s", scriptDir, L"*.lua");
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(searchMask, &fd);
diff --git a/plugins/MirOTR/src/dialogs.cpp b/plugins/MirOTR/src/dialogs.cpp index 6f3e24a5ba..0451367f84 100644 --- a/plugins/MirOTR/src/dialogs.cpp +++ b/plugins/MirOTR/src/dialogs.cpp @@ -119,7 +119,7 @@ static INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam, } break; default: - SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, _T("")); + SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, L""); } } break; @@ -199,7 +199,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION)); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER)); @@ -215,11 +215,11 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0); - SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, L""); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD)); @@ -386,11 +386,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION)); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER)); @@ -495,11 +495,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION)); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER)); @@ -516,11 +516,11 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0); - SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, _T("")); + SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, L""); - SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, _T("")); + SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L""); SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0); SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD)); @@ -591,14 +591,14 @@ void SMPDialogUpdate(ConnContext *context, int percent) switch (percent){ case 0: VerifyFingerprint(context, false); - ShowWarning(_T("SMP failed")); + ShowWarning(L"SMP failed"); break; case 100: VerifyFingerprint(context, true); - ShowWarning(_T("SMP successful")); + ShowWarning(L"SMP successful"); break; default: - ShowWarning(_T("Received an SMP update")); + ShowWarning(L"Received an SMP update"); } */ } @@ -611,7 +611,7 @@ void SMPDialogReply(ConnContext *context, const char* question) data->question = (question) ? mir_utf8decodeT(question) : NULL; CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SMP_INPUT), 0, DlgSMPResponseProc, (LPARAM)data); /* - ShowError(_T("SMP requires user password (NOT IMPL YET)")); + ShowError(L"SMP requires user password (NOT IMPL YET)"); otr_abort_smp(context); */ //otr_continue_smp(context, pass, mir_strlen(pass)); diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp index 218f53e94a..134c5d8114 100644 --- a/plugins/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/src/dllmain.cpp @@ -58,7 +58,7 @@ int ModulesLoaded(WPARAM, LPARAM) extern "C" __declspec(dllexport) int Load(void)
{
- DEBUGOUT_T("LOAD MIROTR");
+ DEBUGOUTA("LOAD MIROTR");
mir_getLP(&pluginInfo);
mir_getCLI();
@@ -104,7 +104,7 @@ extern "C" __declspec(dllexport) int Unload(void) UnhookEvent(hEventWindow);
//UnhookEvent(hEventDbEventAddedFilter);
//UnhookEvent(hEventDbEventAdded);
- DEBUGOUT_T("UNLOAD MIROTR");
+ DEBUGOUTA("UNLOAD MIROTR");
DeinitSRMM();
DeinitDBFilter();
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp index 407f1cbf63..e4c214f823 100644 --- a/plugins/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/src/mirotrmenu.cpp @@ -68,12 +68,12 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam, LPARAM) switch (level) { case TRUST_PRIVATE: - mir_sntprintf(text, _T("%s [v%i]"), TranslateT(LANG_STATUS_PRIVATE), context->protocol_version); + mir_sntprintf(text, L"%s [v%i]", TranslateT(LANG_STATUS_PRIVATE), context->protocol_version); Menu_ModifyItem(hStatusInfoItem, text, IcoLib_GetIconHandle(ICON_PRIVATE)); break; case TRUST_UNVERIFIED: - mir_sntprintf(text, _T("%s [v%i]"), TranslateT(LANG_STATUS_UNVERIFIED), context->protocol_version); + mir_sntprintf(text, L"%s [v%i]", TranslateT(LANG_STATUS_UNVERIFIED), context->protocol_version); Menu_ModifyItem(hStatusInfoItem, text, IcoLib_GetIconHandle(ICON_UNVERIFIED)); break; @@ -150,9 +150,9 @@ void InitMirOTRMenu(void) WNDCLASS wc = { 0 }; wc.hInstance = hInst; wc.lpfnWndProc = PopupMenuWndProc; - wc.lpszClassName = _T("MirOTRPopupMenuProcessor"); + wc.lpszClassName = L"MirOTRPopupMenuProcessor"; RegisterClass(&wc); - hDummyPaintWin = CreateWindowEx(0, _T("MirOTRPopupMenuProcessor"), NULL, 0, 0, 0, 1, 1, 0, 0, hInst, 0); + hDummyPaintWin = CreateWindowEx(0, L"MirOTRPopupMenuProcessor", NULL, 0, 0, 0, 1, 1, 0, 0, hInst, 0); CreateServiceFunction("MirOTRMenuExecService", MirOTRMenuExecService); CreateServiceFunction("MirOTRMenuCheckService", MirOTRMenuCheckService); @@ -208,7 +208,7 @@ void UninitMirOTRMenu(void) DestroyWindow(hDummyPaintWin); hDummyPaintWin = 0; - UnregisterClass(_T("MirOTRPopupMenuProcessor"), hInst); + UnregisterClass(L"MirOTRPopupMenuProcessor", hInst); Menu_RemoveObject(hMirOTRMenuObject); hMirOTRMenuObject = 0; diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index a5259ae98e..6743a71079 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -8,7 +8,7 @@ TCHAR g_fingerprint_store_filename[MAX_PATH]; TCHAR g_instag_filename[MAX_PATH]; HANDLE hPATH_MIROTR; Options options; -#define DATA_DIRECTORY MIRANDA_USERDATAT _T("\\") _T(MODULENAME) +#define DATA_DIRECTORY MIRANDA_USERDATAT L"\\" _T(MODULENAME) struct PROTOREGENKEYOPTIONS { HWND refresh; @@ -21,15 +21,15 @@ void SetFilenames(const TCHAR *path) return; CreateDirectoryTreeT(path); - mir_sntprintf(g_private_key_filename, _T("%s\\") _T(PRIVATE_KEY_FILENAME), path); - mir_sntprintf(g_fingerprint_store_filename, _T("%s\\") _T(FINGERPRINT_STORE_FILENAME), path); - mir_sntprintf(g_instag_filename, _T("%s\\") _T(INSTAG_FILENAME), path); + mir_sntprintf(g_private_key_filename, L"%s\\" _T(PRIVATE_KEY_FILENAME), path); + mir_sntprintf(g_fingerprint_store_filename, L"%s\\" _T(FINGERPRINT_STORE_FILENAME), path); + mir_sntprintf(g_instag_filename, L"%s\\" _T(INSTAG_FILENAME), path); } int FoldersChanged(WPARAM, LPARAM) { TCHAR path[MAX_PATH]; - if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), _T(""))) + if ( FoldersGetCustomPathT(hPATH_MIROTR, path, _countof(path), L"")) SetFilenames( VARST(DATA_DIRECTORY)); else SetFilenames(path); @@ -120,7 +120,7 @@ extern "C" void set_context_contact(void *, ConnContext *context) void ReadPrivkeyFiles() { - DEBUGOUT_T("READ privkey"); + DEBUGOUTA("READ privkey"); lib_cs_lock(); otrl_privkey_read(otr_user_state, _T2A(g_private_key_filename)); otrl_privkey_read_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename), set_context_contact, 0); @@ -370,7 +370,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wP if (key) { otrl_privkey_forget(key); otrl_privkey_write(otr_user_state, _T2A(g_private_key_filename)); - ListView_SetItemText(GetDlgItem(hwndDlg, IDC_LV_PROTO_PROTOS), sel, 2, _T("")); + ListView_SetItemText(GetDlgItem(hwndDlg, IDC_LV_PROTO_PROTOS), sel, 2, L""); } } } @@ -821,7 +821,7 @@ static int OpenOptions(WPARAM wParam, LPARAM) odp.position = 100; odp.hInstance = hInst; odp.ptszGroup = LPGENT("Services"); - odp.ptszTitle = _T("OTR"); + odp.ptszTitle = L"OTR"; odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; odp.ptszTab = LANG_OPT_GENERAL; diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp index 8125247cd2..8f2c9f0bb8 100644 --- a/plugins/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/src/otr.cpp @@ -79,7 +79,7 @@ INT_PTR CALLBACK GenKeyDlgBoxProc(HWND hWndDlg, UINT msg, WPARAM, LPARAM lParam) extern "C" { /* Return the OTR policy for the given context. */ OtrlPolicy otr_gui_policy(void *opdata, ConnContext *context) { - DEBUGOUT_T("OTR_GUI_POLICY\n"); + DEBUGOUTA("OTR_GUI_POLICY\n"); MCONTACT hContact = (UINT_PTR)opdata; DWORD pol; if (hContact) { @@ -103,7 +103,7 @@ extern "C" { * desired. */ // otr_gui_create_privkey(void *opdata, const char *account_name, const char *protocol) { void otr_gui_create_privkey(void *opdata, const char *, const char *protocol) { - DEBUGOUT_T("OTR_GUI_CREATE_PRIVKEY\n"); + DEBUGOUTA("OTR_GUI_CREATE_PRIVKEY\n"); if (opdata) { protocol = GetContactProto((UINT_PTR)opdata); } @@ -120,7 +120,7 @@ extern "C" { * logged in" errors if you're wrong. */ //int otr_gui_is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient) { int otr_gui_is_logged_in(void *opdata, const char *, const char *, const char *) { - DEBUGOUT_T("OTR_GUI_IS_LOGGED_IN\n"); + DEBUGOUTA("OTR_GUI_IS_LOGGED_IN\n"); MCONTACT hContact = (UINT_PTR)opdata; if (hContact) { WORD status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE); @@ -135,7 +135,7 @@ extern "C" { * accountname/protocol. */ //void otr_gui_inject_message(void *opdata, const char *accountname, const char *protocol, const char *recipient, const char *message) { void otr_gui_inject_message(void *opdata, const char *, const char *protocol, const char *, const char *message) { - DEBUGOUT_T("OTR_GUI_INJECT_MESSAGE\n"); + DEBUGOUTA("OTR_GUI_INJECT_MESSAGE\n"); MCONTACT hContact = (UINT_PTR)opdata; if (db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) ProtoChainSend(hContact, PSS_MESSAGE, PREF_BYPASS_OTR, (LPARAM)message); @@ -146,12 +146,12 @@ extern "C" { //void otr_gui_update_context_list(void *opdata) { void otr_gui_update_context_list(void *) { //MessageBox(0, "Update Context List", "OTR Callback", MB_OK); - DEBUGOUT_T("OTR: Update Context List\n"); + DEBUGOUTA("OTR: Update Context List\n"); } /* A new fingerprint for the given user has been received. */ void otr_gui_new_fingerprint(void *opdata, OtrlUserState us, const char *accountname, const char *protocol, const char *username, unsigned char fingerprint[20]) { - DEBUGOUT_T("OTR_GUI_NEW_FINGERPRINT\n"); + DEBUGOUTA("OTR_GUI_NEW_FINGERPRINT\n"); ConnContext *context = otrl_context_find(us, username, accountname, protocol, OTRL_INSTAG_BEST, TRUE, 0, add_appdata, opdata); Fingerprint *fp = otrl_context_find_fingerprint(context, fingerprint, TRUE, 0); @@ -164,14 +164,14 @@ extern "C" { /* The list of known fingerprints has changed. Write them to disk. */ //void otr_gui_write_fingerprints(void *opdata) { void otr_gui_write_fingerprints(void *) { - DEBUGOUT_T("OTR_GUI_WRITE_FINGERPRINTS\n"); + DEBUGOUTA("OTR_GUI_WRITE_FINGERPRINTS\n"); //if(MessageBox(0, Translate("Would you like to save the current fingerprint list?"), Translate(MODULE), MB_YESNO) == IDYES) otrl_privkey_write_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename)); } /* A ConnContext has entered a secure state. */ void otr_gui_gone_secure(void *opdata, ConnContext *context) { - DEBUGOUT_T("OTR_GUI_GONE_SECURE\n"); + DEBUGOUTA("OTR_GUI_GONE_SECURE\n"); MCONTACT hContact = (UINT_PTR)opdata; TrustLevel trusted = otr_context_get_trust(context); SetEncryptionStatus(hContact, trusted); @@ -199,7 +199,7 @@ extern "C" { /* A ConnContext has left a secure state. */ void otr_gui_gone_insecure(void *opdata, ConnContext *context) { MCONTACT hContact = (UINT_PTR)opdata; - DEBUGOUT_T("OTR_GUI_GONE_INSECURE\n"); + DEBUGOUTA("OTR_GUI_GONE_INSECURE\n"); TCHAR buff[512]; mir_sntprintf(buff, TranslateT(LANG_SESSION_TERMINATED_BY_OTR), contact_get_nameT(hContact)); //MessageBox(0, buff, Translate("OTR Information"), MB_OK); @@ -215,7 +215,7 @@ extern "C" { * already knew. is_reply indicates whether we initiated the AKE. */ void otr_gui_still_secure(void *opdata, ConnContext *context, int is_reply) { MCONTACT hContact = (UINT_PTR)opdata; - DEBUGOUT_T("OTR_GUI_STILL_SECURE\n"); + DEBUGOUTA("OTR_GUI_STILL_SECURE\n"); TrustLevel trusted = otr_context_get_trust(context); SetEncryptionStatus(hContact, trusted); TCHAR buff[1024]; @@ -285,7 +285,7 @@ extern "C" { } void handle_smp_event(void *opdata, OtrlSMPEvent smp_event, ConnContext *context, unsigned short progress_percent, char *question) { - DEBUGOUT_T("HANDLE_SMP_EVENT\n"); + DEBUGOUTA("HANDLE_SMP_EVENT\n"); if (!context) return; switch (smp_event){ case OTRL_SMPEVENT_NONE: @@ -399,8 +399,8 @@ extern "C" { //void otr_create_instag(void *opdata, const char *accountname, const char *protocol) { void otr_create_instag(void *, const char *accountname, const char *protocol){ - DEBUGOUT_T("OTR_CREATE_INSTAG\n"); - FILE* instagf = _tfopen(g_instag_filename, _T("w+b")); + DEBUGOUTA("OTR_CREATE_INSTAG\n"); + FILE* instagf = _tfopen(g_instag_filename, L"w+b"); if (!instagf) return; otrl_instag_generate_FILEp(otr_user_state, instagf, accountname, protocol); diff --git a/plugins/MirOTR/src/stdafx.h b/plugins/MirOTR/src/stdafx.h index 1641a2e04e..0e1dd7f382 100644 --- a/plugins/MirOTR/src/stdafx.h +++ b/plugins/MirOTR/src/stdafx.h @@ -64,12 +64,10 @@ using namespace std; #ifdef _DEBUG
#define DEBUGOUTA(x) OutputDebugStringA(x)
- #define DEBUGOUT(x) OutputDebugString(x)
- #define DEBUGOUT_T(x) OutputDebugString(__T(x))
+ #define DEBUGOUTW(x) OutputDebugStringW(x)
#else
#define DEBUGOUTA(x);
- #define DEBUGOUT(x)
- #define DEBUGOUT_T(x)
+ #define DEBUGOUTW(x)
#endif
// modified manual policy - so that users set to 'opportunistic' will automatically start OTR with users set to 'manual'
diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp index f6edc8e7e7..9aa72920d9 100644 --- a/plugins/MirOTR/src/svcs_proto.cpp +++ b/plugins/MirOTR/src/svcs_proto.cpp @@ -5,7 +5,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){ CCSDATA *ccs = (CCSDATA *) lParam; - DEBUGOUT_T("SENDING\n"); + DEBUGOUTW(L"SENDING\n"); DEBUGOUTA("'"); DEBUGOUTA((const char*)ccs->lParam); DEBUGOUTA("'\n"); @@ -26,7 +26,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){ // don't filter OTR messages being sent (OTR messages should only happen *after* the otrl_message_sending call below) if(strncmp(oldmessage, "?OTR", 4) == 0) { - DEBUGOUT_T("OTR message without PREF_BYPASS_OTR\n"); + DEBUGOUTW(L"OTR message without PREF_BYPASS_OTR\n"); return Proto_ChainSend(wParam, ccs); } diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 9d2d30a9ac..0fc9e6a450 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -81,7 +81,7 @@ void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20]) for(word=0; word<5; ++word) { for(byte=0; byte<4; ++byte) { - _stprintf(p, _T("%02X"), hash[word*4+byte]); //!!!!!!!!!!!!!! + _stprintf(p, L"%02X", hash[word*4+byte]); //!!!!!!!!!!!!!! p += 2; } *(p++) = ' '; @@ -107,7 +107,7 @@ __inline const TCHAR* contact_get_nameT(MCONTACT hContact) { TCHAR* ProtoGetNickname(const char* proto) { TCHAR *p = Contact_GetInfo(CNF_NICK, NULL, proto); - return (p != NULL) ? p : mir_tstrdup(_T("")); + return (p != NULL) ? p : mir_tstrdup(L""); } void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact) { @@ -115,12 +115,12 @@ void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTA if ( !options.bHavePopups) { TCHAR title[256]; - mir_sntprintf(title, _T("%s Message"), _T(MODULENAME)); + mir_sntprintf(title, L"%s Message", _T(MODULENAME)); if(line1 && line2) { int size = int(mir_tstrlen(line1) + mir_tstrlen(line2) + 3); TCHAR *message = new TCHAR[size]; // newline and null terminator - mir_sntprintf(message, size, _T("%s\r\n%s"), line1, line2); + mir_sntprintf(message, size, L"%s\r\n%s", line1, line2); MessageBox( NULL, message, title, MB_OK | MB_ICONINFORMATION ); delete[] message; } else if(line1) { @@ -165,7 +165,7 @@ void ShowWarning(TCHAR *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, _T("%s Warning"), _T(MODULENAME)); + mir_sntprintf(buffer, L"%s Warning", _T(MODULENAME)); switch(disp) { @@ -173,7 +173,7 @@ void ShowWarning(TCHAR *msg) { { int size = int(mir_tstrlen(msg) + 515); TCHAR *message = new TCHAR[size]; // newline and null terminator - mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg); + mir_sntprintf(message, size, L"%s\r\n%s", buffer, msg); PUShowMessageT(message, SM_WARNING); delete[] message; } @@ -211,7 +211,7 @@ void ShowError(TCHAR *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, _T("%s Error"), _T(MODULENAME)); + mir_sntprintf(buffer, L"%s Error", _T(MODULENAME)); TCHAR *message; @@ -220,7 +220,7 @@ void ShowError(TCHAR *msg) { { int size = int(mir_tstrlen(msg) + 515); message = new TCHAR[size]; // newline and null terminator - mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg); + mir_sntprintf(message, size, L"%s\r\n%s", buffer, msg); PUShowMessageT(message, SM_WARNING); delete[] message; } @@ -269,7 +269,7 @@ void ShowErrorUtf(char* msg) { void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg) { TCHAR buff[1024]; - mir_sntprintf(buff, _T("%s%s"), _T(LANG_INLINE_PREFIX), msg); + mir_sntprintf(buff, L"%s%s", _T(LANG_INLINE_PREFIX), msg); T2Utf utf(buff); PROTORECVEVENT pre = {0}; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 1ce1f559bb..b1be837708 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -440,7 +440,7 @@ tstring CAppletManager::GetContactDisplayname(MCONTACT hContact, bool bShortened tstring strNick = GetContactDisplayname(hContact, false); if (strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) - return strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("..."); + return strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"..."; return strNick; } @@ -453,7 +453,7 @@ tstring CAppletManager::GetContactGroup(MCONTACT hContact) DBVARIANT dbv; int res = db_get_ts(hContact, "CList", "Group", &dbv); - tstring strGroup = _T(""); + tstring strGroup = L""; if (!res) strGroup = dbv.ptszVal; @@ -536,15 +536,15 @@ tstring CAppletManager::GetFormattedTimestamp(tm *tm_time) if (tm_time->tm_mday != tm_now.tm_mday || tm_time->tm_mon != tm_now.tm_mon) { if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS)) - _tcsftime(buffer, 128, _T("[%x %H:%M:%S]"), tm_time); + _tcsftime(buffer, 128, L"[%x %H:%M:%S]", tm_time); else - _tcsftime(buffer, 128, _T("[%x %H:%M]"), tm_time); + _tcsftime(buffer, 128, L"[%x %H:%M]", tm_time); } else { if (CConfig::GetBoolSetting(TIMESTAMP_SECONDS)) - _tcsftime(buffer, 128, _T("[%H:%M:%S]"), tm_time); + _tcsftime(buffer, 128, L"[%H:%M:%S]", tm_time); else - _tcsftime(buffer, 128, _T("[%H:%M]"), tm_time); + _tcsftime(buffer, 128, L"[%H:%M]", tm_time); } return toTstring(buffer); @@ -555,7 +555,7 @@ tstring CAppletManager::GetFormattedTimestamp(tm *tm_time) //************************************************************************ void CAppletManager::HandleEvent(CEvent *pEvent) { - TRACE(_T("<< Event: %i\n"), (int)pEvent->eType); + TRACE(L"<< Event: %i\n", (int)pEvent->eType); // check if the event's timestamp needs to be set if (!pEvent->bTime) { @@ -625,7 +625,7 @@ void CAppletManager::UpdateMessageJobs() Event.hValue = (*iter)->hEvent; Event.hContact = (*iter)->hContact; Event.iValue = ACKRESULT_FAILED; - Event.strValue = TranslateString(_T("Timeout: No response from contact/server")); + Event.strValue = TranslateString(L"Timeout: No response from contact/server"); HandleEvent(&Event); @@ -764,11 +764,11 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag GCDEST gcd = { szProto, 0, GC_EVENT_SENDMESSAGE }; gcd.ptszID = dbv.ptszVal; - tstring strID = tstring(gcd.ptszID) + _T(" - ") + tstring(_A2T(toNarrowString(pIRCCon->strNetwork).c_str())); + tstring strID = tstring(gcd.ptszID) + L" - " + tstring(_A2T(toNarrowString(pIRCCon->strNetwork).c_str())); gcd.ptszID = (LPTSTR)strID.c_str(); GCEVENT gce = { sizeof(gce), &gcd }; - gce.ptszStatus = _T(""); + gce.ptszStatus = L""; gce.ptszText = (LPTSTR)strAscii.c_str(); gce.time = time(NULL); gce.bIsMe = true; @@ -887,42 +887,42 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd pEvent->bNotification = true; } - pEvent->strDescription = strName + _T(": ") + pEvent->strValue; - pEvent->strSummary = TranslateString(_T("New message from %s"), strName.c_str()); + pEvent->strDescription = strName + L": " + pEvent->strValue; + pEvent->strSummary = TranslateString(L"New message from %s", strName.c_str()); break; case EVENTTYPE_URL: if (CConfig::GetBoolSetting(NOTIFY_URL)) pEvent->bNotification = true; pEvent->eType = EVENT_URL; - pEvent->strDescription = TranslateString(_T("Incoming URL from %s"), strName.c_str()); + pEvent->strDescription = TranslateString(L"Incoming URL from %s", strName.c_str()); break; case EVENTTYPE_CONTACTS: if (CConfig::GetBoolSetting(NOTIFY_CONTACTS)) pEvent->bNotification = true; - pEvent->strDescription = TranslateString(_T("Incoming contacts from %s"), strName.c_str()); + pEvent->strDescription = TranslateString(L"Incoming contacts from %s", strName.c_str()); pEvent->eType = EVENT_CONTACTS; break; case EVENTTYPE_ADDED: if (CConfig::GetBoolSetting(NOTIFY_CONTACTS)) pEvent->bNotification = true; - pEvent->strDescription = TranslateString(_T("You were added by %s"), strName.c_str()); + pEvent->strDescription = TranslateString(L"You were added by %s", strName.c_str()); pEvent->eType = EVENT_ADDED; break; case EVENTTYPE_AUTHREQUEST: if (CConfig::GetBoolSetting(NOTIFY_CONTACTS)) pEvent->bNotification = true; - pEvent->strDescription = TranslateString(_T("Incoming Authrequest!")); + pEvent->strDescription = TranslateString(L"Incoming Authrequest!"); pEvent->eType = EVENT_AUTHREQUEST; break; case EVENTTYPE_FILE: if (CConfig::GetBoolSetting(NOTIFY_FILE)) pEvent->bNotification = true; - pEvent->strDescription = TranslateString(_T("Incoming file from %s"), strName.c_str()); + pEvent->strDescription = TranslateString(L"Incoming file from %s", strName.c_str()); pEvent->eType = EVENT_FILE; break; default: @@ -932,7 +932,7 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd if (CConfig::GetBoolSetting(NOTIFY_SHOWPROTO)) { char *szProto = GetContactProto(pEvent->hContact); - pEvent->strDescription = _T("(") + toTstring(szProto) + _T(") ") + pEvent->strDescription; + pEvent->strDescription = L"(" + toTstring(szProto) + L") " + pEvent->strDescription; } // Clean up @@ -946,28 +946,28 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd tstring CAppletManager::StripIRCFormatting(tstring strText) { tstring::size_type start = 0, i = 0; - tstring strEntity = _T(""); - tstring strReplace = _T(""); + tstring strEntity = L""; + tstring strReplace = L""; while (i < strText.length()) { - start = strText.find(_T("%"), i); + start = strText.find(L"%", i); if (start != string::npos && start < strText.length() - 1) { strEntity = strText[start + 1]; - if (strEntity == _T("%")) { - strText.replace(start, 2, _T("%")); + if (strEntity == L"%") { + strText.replace(start, 2, L"%"); i = start + 1; } /* - else if(strEntity == _T("b") || strEntity == _T("B") || - strEntity == _T("i") || strEntity == _T("I") || - strEntity ==_T("u") || strEntity == _T("U") || - strEntity == _T("C") ||strEntity == _T("F")) + else if(strEntity == L"b" || strEntity == L"B" || + strEntity == L"i" || strEntity == L"I" || + strEntity ==L"u" || strEntity == L"U" || + strEntity == L"C" ||strEntity == L"F") { strText.erase(start,2); i = start; } */ - else if (strEntity == _T("c") || strEntity == _T("f")) { + else if (strEntity == L"c" || strEntity == L"f") { strText.erase(start, 4); i = start; } @@ -1004,7 +1004,7 @@ CIRCConnection *CAppletManager::CreateIRCConnection(tstring strProtocol) { CIRCConnection *pIRCCon = new CIRCConnection(); pIRCCon->strProtocol = strProtocol; - pIRCCon->strNetwork = _T(""); + pIRCCon->strNetwork = L""; m_vIRCConnections.push_back(pIRCCon); @@ -1112,24 +1112,24 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) GCDEST *gcd; if (gce == NULL || (gcd = gce->pDest) == NULL) { - TRACE(_T("<< [%s] skipping invalid event\n")); + TRACE(L"<< [%s] skipping invalid event\n"); return 0; } - TRACE(_T("<< [%s:%s] event %04X\n"), toTstring(gcd->pszModule).c_str(), gcd->ptszID, gcd->iType); + TRACE(L"<< [%s:%s] event %04X\n", toTstring(gcd->pszModule).c_str(), gcd->ptszID, gcd->iType); // get the matching irc connection entry CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(gcd->pszModule)); if (!pIRCCon) { - TRACE(_T("<< [%s] connection not found, skipping event\n"), toTstring(gcd->pszModule).c_str()); + TRACE(L"<< [%s] connection not found, skipping event\n", toTstring(gcd->pszModule).c_str()); return 0; } // fetch the network name if (gcd->iType == GC_EVENT_CHANGESESSIONAME) { - if (gcd->ptszID && !mir_tstrcmpi(gcd->ptszID, _T("Network log"))) { + if (gcd->ptszID && !mir_tstrcmpi(gcd->ptszID, L"Network log")) { pIRCCon->strNetwork = toTstring(gce->ptszText); - TRACE(_T("\t Found network identifier: %s\n"), pIRCCon->strNetwork.c_str()); + TRACE(L"\t Found network identifier: %s\n", pIRCCon->strNetwork.c_str()); return 0; } } @@ -1149,8 +1149,8 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) if (pos != tstring::npos) strChannel = strChannel.substr(0, pos - 1); else { - if (mir_tstrcmpi(gcd->ptszID, _T("Network log"))) - TRACE(_T("\t WARNING: ignoring unknown event!\n")); + if (mir_tstrcmpi(gcd->ptszID, L"Network log")) + TRACE(L"\t WARNING: ignoring unknown event!\n"); return 0; } pHistory = CAppletManager::GetInstance()->GetIRCHistoryByName(pIRCCon->strProtocol, strChannel); @@ -1165,7 +1165,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) Event.hContact = pHistory->hContact; } else if (gcd->iType != GC_EVENT_INFORMATION) { - TRACE(_T("\t WARNING: ignoring unknown event!\n")); + TRACE(L"\t WARNING: ignoring unknown event!\n"); return 0; } else @@ -1176,7 +1176,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) if (gcd->iType == GC_EVENT_JOIN && pHistory) pHistory->LUsers.push_back(toTstring(gce->ptszNick)); - TRACE(_T("\t Chatroom is hidden, skipping event!\n")); + TRACE(L"\t Chatroom is hidden, skipping event!\n"); return 0; } @@ -1185,17 +1185,17 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) tstring strStatus = toTstring(gce->ptszStatus); if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) - strNick = strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("..."); + strNick = strNick.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"..."; - TRACE(_T("\t Handling event...\t")); + TRACE(L"\t Handling event...\t"); switch (gcd->iType) { case GC_EVENT_INFORMATION: if (CConfig::GetBoolSetting(NOTIFY_IRC_CHANNEL)) Event.bNotification = true; - if (strText.find(_T("CTCP")) == 0) - Event.strValue = _T("--> ") + strText; + if (strText.find(L"CTCP") == 0) + Event.strValue = L"--> " + strText; else Event.strValue = strText; @@ -1203,12 +1203,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) case GC_EVENT_ACTION: if (CConfig::GetBoolSetting(NOTIFY_IRC_EMOTES)) Event.bNotification = true; - Event.strValue = strNick + _T(" ") + strText; + Event.strValue = strNick + L" " + strText; break; case GC_EVENT_MESSAGE: if (CConfig::GetBoolSetting(NOTIFY_IRC_MESSAGES)) Event.bNotification = true; - Event.strValue = strNick + _T(": ") + strText; + Event.strValue = strNick + L": " + strText; break; case GC_EVENT_JOIN: // Add the user to the list @@ -1219,7 +1219,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) // Skip join event for user if (gce->bIsMe) return 0; - Event.strValue = TranslateString(_T("%s has joined the channel"), strNick.c_str()); + Event.strValue = TranslateString(L"%s has joined the channel", strNick.c_str()); break; case GC_EVENT_PART: @@ -1227,7 +1227,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS)) Event.bNotification = true; tstring strFullNick = toTstring(gce->ptszNick); - Event.strValue = TranslateString(strText.empty() ? _T("%s has left") : _T("%s has left: %s"), strNick.c_str(), strText.c_str()); + Event.strValue = TranslateString(strText.empty() ? L"%s has left" : L"%s has left: %s", strNick.c_str(), strText.c_str()); if (pHistory) { // Remove the user from the list list<tstring>::iterator iter = pHistory->LUsers.begin(); @@ -1244,12 +1244,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) case GC_EVENT_QUIT: if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS)) Event.bNotification = true; - Event.strValue = TranslateString(strText.empty() ? _T("%s has disconnected") : _T("%s has disconnected: %s"), strNick.c_str(), strText.c_str()); + Event.strValue = TranslateString(strText.empty() ? L"%s has disconnected" : L"%s has disconnected: %s", strNick.c_str(), strText.c_str()); break; case GC_EVENT_KICK: if (CConfig::GetBoolSetting(NOTIFY_IRC_USERS)) Event.bNotification = true; - Event.strValue = TranslateString(_T("%s has kicked %s: %s"), strStatus.c_str(), strNick.c_str(), strText.c_str()); + Event.strValue = TranslateString(L"%s has kicked %s: %s", strStatus.c_str(), strNick.c_str(), strText.c_str()); break; case GC_EVENT_NICK: { @@ -1258,9 +1258,9 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) tstring strFullNick = toTstring(gce->ptszNick); if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strText.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) - strText = strText.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("..."); + strText = strText.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"..."; - Event.strValue = TranslateString(_T("%s is now known as %s"), strNick.c_str(), strText.c_str()); + Event.strValue = TranslateString(L"%s is now known as %s", strNick.c_str(), strText.c_str()); if (pHistory) { // change the nick in the userlist list<tstring>::iterator iter = pHistory->LUsers.begin(); @@ -1275,12 +1275,12 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) case GC_EVENT_NOTICE: if (CConfig::GetBoolSetting(NOTIFY_IRC_NOTICES)) Event.bNotification = true; - Event.strValue = TranslateString(_T("Notice from %s: %s"), strNick.c_str(), strText.c_str()); + Event.strValue = TranslateString(L"Notice from %s: %s", strNick.c_str(), strText.c_str()); break; case GC_EVENT_TOPIC: if (CConfig::GetBoolSetting(NOTIFY_IRC_CHANNEL)) Event.bNotification = true; - Event.strValue = TranslateString(_T("Topic is now '%s' (set by %s)"), strText.c_str(), strNick.c_str()); + Event.strValue = TranslateString(L"Topic is now '%s' (set by %s)", strText.c_str(), strNick.c_str()); break; case GC_EVENT_ADDSTATUS: { @@ -1288,9 +1288,9 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) Event.bNotification = true; tstring strNick2 = toTstring(gce->ptszStatus); if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick2.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) - strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("..."); + strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"..."; - Event.strValue = TranslateString(_T("%s enables '%s' for %s"), strText.c_str(), strNick2.c_str(), strNick.c_str()); + Event.strValue = TranslateString(L"%s enables '%s' for %s", strText.c_str(), strNick2.c_str(), strNick.c_str()); break; } case GC_EVENT_REMOVESTATUS: @@ -1299,13 +1299,13 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) Event.bNotification = true; tstring strNick2 = toTstring(gce->ptszStatus); if (CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF) && strNick2.length() > (tstring::size_type)CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) - strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + _T("..."); + strNick2 = strNick2.erase(CConfig::GetIntSetting(NOTIFY_NICKCUTOFF_OFFSET)) + L"..."; - Event.strValue = TranslateString(_T("%s disables '%s' for %s"), strText.c_str(), strNick2.c_str(), strNick.c_str()); + Event.strValue = TranslateString(L"%s disables '%s' for %s", strText.c_str(), strNick2.c_str(), strNick.c_str()); break; } default: - TRACE(_T("OK!\n")); + TRACE(L"OK!\n"); return 0; } if (gce->bIsMe || gcd->ptszID == NULL) @@ -1348,8 +1348,8 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) Event.hContact = (*iter)->hContact; tstring strName = CAppletManager::GetContactDisplayname((*iter)->hContact, true); - Event.strDescription = strName + _T(" - ") + Event.strValue; - Event.strSummary = _T("(") + toTstring(gcd->pszModule) + _T(") ") + strName; + Event.strDescription = strName + L" - " + Event.strValue; + Event.strSummary = L"(" + toTstring(gcd->pszModule) + L") " + strName; CAppletManager::GetInstance()->HandleEvent(&Event); break; } @@ -1358,26 +1358,26 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) iter++; } } - TRACE(_T("OK!\n")); + TRACE(L"OK!\n"); return 0; } else if (gcd->ptszID != NULL) { - TRACE(_T("OK!\n")); + TRACE(L"OK!\n"); return 0; } if (pHistory) { tstring strChannel = pHistory->strChannel; if (CConfig::GetBoolSetting(NOTIFY_CHANNELCUTOFF) && strChannel.length() > CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) { - strChannel = strChannel.erase(CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) + _T("..."); + strChannel = strChannel.erase(CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) + L"..."; } - Event.strDescription = strChannel + _T(" - ") + Event.strValue; - Event.strSummary = _T("(") + toTstring(gcd->pszModule) + _T(") ") + pHistory->strChannel; + Event.strDescription = strChannel + L" - " + Event.strValue; + Event.strSummary = L"(" + toTstring(gcd->pszModule) + L") " + pHistory->strChannel; } else Event.strDescription = Event.strValue; - TRACE(_T("OK!\n")); + TRACE(L"OK!\n"); CAppletManager::GetInstance()->HandleEvent(&Event); @@ -1475,7 +1475,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.eType = EVENT_SIGNED_ON; if (pIRCCon && db_get_b(Event.hContact, szProto, "ChatRoom", 0) != 0) { - Event.strDescription = TranslateString(_T("Joined %s"), strName.c_str()); + Event.strDescription = TranslateString(L"Joined %s", strName.c_str()); DBVARIANT dbv; if (db_get_ts(Event.hContact, szProto, "Nick", &dbv)) @@ -1484,7 +1484,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) db_free(&dbv); } else - Event.strDescription = TranslateString(_T("%s signed on (%s)"), strName.c_str(), Event.strValue.c_str()); + Event.strDescription = TranslateString(L"%s signed on (%s)", strName.c_str(), Event.strValue.c_str()); } // Contact signed off else if (iStatus == ID_STATUS_OFFLINE && iOldStatus != ID_STATUS_OFFLINE) { @@ -1493,12 +1493,12 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.eType = EVENT_SIGNED_OFF; if (pIRCCon && db_get_b(Event.hContact, szProto, "ChatRoom", 0) != 0) { - Event.strDescription = TranslateString(_T("Left %s"), strName.c_str()); + Event.strDescription = TranslateString(L"Left %s", strName.c_str()); // delete IRC-Channel history CAppletManager::GetInstance()->DeleteIRCHistory(Event.hContact); } else - Event.strDescription = TranslateString(_T("%s signed off"), strName.c_str()); + Event.strDescription = TranslateString(L"%s signed off", strName.c_str()); } // Contact changed status else if (iStatus != iOldStatus) { @@ -1506,18 +1506,18 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.bNotification = true; Event.eType = EVENT_STATUS; - Event.strDescription = TranslateString(_T("%s is now %s"), strName.c_str(), Event.strValue.c_str()); + Event.strDescription = TranslateString(L"%s is now %s", strName.c_str(), Event.strValue.c_str()); } // ignore remaining events else return 0; if (CConfig::GetBoolSetting(NOTIFY_SHOWPROTO)) - Event.strDescription = _T("(") + strProto + _T(") ") + Event.strDescription; + Event.strDescription = L"(" + strProto + L") " + Event.strDescription; - Event.strSummary = TranslateString(_T("Contactlist event")); + Event.strSummary = TranslateString(L"Contactlist event"); // Block notifications after connecting/disconnecting if (pProtocolData->iStatus == ID_STATUS_OFFLINE || (DWORD)pProtocolData->lTimeStamp + PROTOCOL_NOTIFY_DELAY > GetTickCount()) @@ -1554,7 +1554,7 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam) if (pAck->lParam != 0) Event.strValue = toTstring((char*)pAck->lParam); else - Event.strValue = _T(""); + Event.strValue = L""; if (Event.iValue == ACKRESULT_SUCCESS) CAppletManager::GetInstance()->FinishMessageJob((*iter)); @@ -1576,7 +1576,7 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam) tstring strProto = toTstring(pAck->szModule); // ignore metacontacts status changes - if (toLower(strProto) == _T("metacontacts")) + if (toLower(strProto) == L"metacontacts") return 0; CProtocolData *pProtoData = CAppletManager::GetInstance()->GetProtocolData(strProto); @@ -1610,8 +1610,8 @@ int CAppletManager::HookProtoAck(WPARAM, LPARAM lParam) // set the event description / summary tstring strStatus = toTstring(pcli->pfnGetStatusModeDescription(iNewStatus, 0)); - Event.strDescription = _T("(") + Event.strValue + _T(") ") + TranslateString(_T("You are now %s"), strStatus.c_str()); - Event.strSummary = TranslateString(_T("Protocol status change")); + Event.strDescription = L"(" + Event.strValue + L") " + TranslateString(L"You are now %s", strStatus.c_str()); + Event.strSummary = TranslateString(L"Protocol status change"); if (Event.eType != EVENT_PROTO_STATUS) pProtoData->lTimeStamp = GetTickCount(); @@ -1649,7 +1649,7 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM) tstring strName = CAppletManager::GetContactDisplayname(Event.hContact, true); - Event.strDescription = TranslateString(_T("%s was deleted from contactlist!"), strName.c_str()); + Event.strDescription = TranslateString(L"%s was deleted from contactlist!", strName.c_str()); CAppletManager::GetInstance()->HandleEvent(&Event); return 0; diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp index 6a1224afe6..34c228c697 100644 --- a/plugins/MirandaG15/src/CChatScreen.cpp +++ b/plugins/MirandaG15/src/CChatScreen.cpp @@ -41,22 +41,22 @@ bool CChatScreen::Initialize() // other attributes
m_InfoText.SetAlignment(DT_CENTER);
m_InfoText.SetWordWrap(TRUE);
- m_InfoText.SetText(_T(""));
+ m_InfoText.SetText(L"");
m_InfoText.Show(0);
m_UserName.SetAlignment(DT_CENTER);
m_UserName.SetWordWrap(TRUE);
- m_UserName.SetText(_T("Proto"));
+ m_UserName.SetText(L"Proto");
m_UserStatus.SetAlignment(DT_LEFT);
m_UserStatus.SetWordWrap(TRUE);
- m_UserStatus.SetText(_T("Status"));
+ m_UserStatus.SetText(L"Status");
m_UserProto.SetAlignment(DT_RIGHT);
m_UserProto.SetWordWrap(TRUE);
- m_UserProto.SetText(_T("User"));
+ m_UserProto.SetText(L"User");
m_Input.Show(0);
@@ -170,11 +170,11 @@ void CChatScreen::UpdateLabels() char *szProto = GetContactProto(m_hContact);
m_iStatus = ID_STATUS_OFFLINE;
- tstring strProto = _T("");
- tstring strStatus = _T("");
+ tstring strProto = L"";
+ tstring strStatus = L"";
if(szProto != NULL)
{
- strProto = _T("(") + toTstring(szProto) + _T(")");
+ strProto = L"(" + toTstring(szProto) + L")";
m_iStatus = db_get_w(m_hContact,szProto,"Status",ID_STATUS_OFFLINE);
}
@@ -186,7 +186,7 @@ void CChatScreen::UpdateLabels() m_UserStatus.SetText(strStatus.c_str());
if(m_bContactTyping && CConfig::GetBoolSetting(SESSION_SHOWTYPING))
- m_UserProto.SetText(CAppletManager::TranslateString(_T("typing..")));
+ m_UserProto.SetText(CAppletManager::TranslateString(L"typing.."));
else
m_UserProto.SetText(strProto.c_str());
}
@@ -267,7 +267,7 @@ void CChatScreen::LoadHistory() time(&now);
localtime_s(&tm_now,&now);
- AddIncomingMessage(CAppletManager::TranslateString(_T("IRC-Chatroom support is disabled!\nYou need to install the patched IRC.dll (see the readme) to use IRC-Chatrooms on the LCD")),&tm_now,true);
+ AddIncomingMessage(CAppletManager::TranslateString(L"IRC-Chatroom support is disabled!\nYou need to install the patched IRC.dll (see the readme) to use IRC-Chatrooms on the LCD"),&tm_now,true);
}
else
{
@@ -416,9 +416,9 @@ bool CChatScreen::Draw(CLCDGfx *pGfx) //************************************************************************
void CChatScreen::AddOutgoingMessage(tstring strMessage,tm *time,bool bIRC)
{
- tstring strPrefix = bIRC?_T(""):_T(">> ");
+ tstring strPrefix = bIRC?L"":L">> ";
if(CConfig::GetBoolSetting(SESSION_TIMESTAMPS))
- strPrefix += CAppletManager::GetFormattedTimestamp(time) + _T(" ");
+ strPrefix += CAppletManager::GetFormattedTimestamp(time) + L" ";
// adjust the scroll mode
m_TextLog.SetAutoscrollMode(SCROLL_LINE);
@@ -433,9 +433,9 @@ void CChatScreen::AddOutgoingMessage(tstring strMessage,tm *time,bool bIRC) //************************************************************************
void CChatScreen::AddIncomingMessage(tstring strMessage,tm *time,bool bIRC)
{
- tstring strPrefix = bIRC?_T(""):_T("<< ");
+ tstring strPrefix = bIRC?L"":L"<< ";
if(CConfig::GetBoolSetting(SESSION_TIMESTAMPS))
- strPrefix += CAppletManager::GetFormattedTimestamp(time) + _T(" ");
+ strPrefix += CAppletManager::GetFormattedTimestamp(time) + L" ";
// adjust the scroll mode
@@ -495,7 +495,7 @@ void CChatScreen::SendCurrentMessage() m_Input.DeactivateInput();
- m_InfoText.SetText(CAppletManager::TranslateString(_T("Sending message...")));
+ m_InfoText.SetText(CAppletManager::TranslateString(L"Sending message..."));
m_InfoText.Show(1);
m_Input.Show(0);
@@ -621,7 +621,7 @@ void CChatScreen::OnEventReceived(CEvent *pEvent) if(pEvent->iValue == ACKRESULT_SUCCESS)
DeactivateMessageMode();
else
- InvalidateMessageMode(pEvent->strValue.empty()?CAppletManager::TranslateString(_T("Could not send the message!")):pEvent->strValue);
+ InvalidateMessageMode(pEvent->strValue.empty()?CAppletManager::TranslateString(L"Could not send the message!"):pEvent->strValue);
break;
case EVENT_IRC_SENT:
// Add the message to the log
diff --git a/plugins/MirandaG15/src/CConfig.cpp b/plugins/MirandaG15/src/CConfig.cpp index 337cad2886..46cd677105 100644 --- a/plugins/MirandaG15/src/CConfig.cpp +++ b/plugins/MirandaG15/src/CConfig.cpp @@ -127,9 +127,9 @@ void CConfig::LoadSettings() pProtoFilter = new CProtoFilter();
pProtoFilter->strName = toTstring(ppAccounts[i]->szModuleName);
- strSetting = _T("ProtoFilter_") + pProtoFilter->strName;
+ strSetting = L"ProtoFilter_" + pProtoFilter->strName;
pProtoFilter->bNotificationFilter = db_get_dw(NULL, "MirandaG15", toNarrowString(strSetting).c_str(), 1) != 0;
- strSetting = _T("ProtoCListFilter_") + pProtoFilter->strName;
+ strSetting = L"ProtoCListFilter_" + pProtoFilter->strName;
pProtoFilter->bContactlistFilter = db_get_dw(NULL, "MirandaG15", toNarrowString(strSetting).c_str(), 1) != 0;
m_ProtoList.push_back(pProtoFilter);
}
@@ -215,11 +215,11 @@ void CConfig::SaveSettings() // save protocol specific settings
vector<CProtoFilter*>::iterator iter = m_ProtoList.begin();
- tstring strSetting = _T("");
+ tstring strSetting = L"";
while (iter != m_ProtoList.end()) {
- strSetting = _T("ProtoFilter_") + (*iter)->strName;
+ strSetting = L"ProtoFilter_" + (*iter)->strName;
db_set_dw(NULL, "MirandaG15", toNarrowString(strSetting).c_str(), (*iter)->bNotificationFilter);
- strSetting = _T("ProtoCListFilter_") + (*iter)->strName;
+ strSetting = L"ProtoCListFilter_" + (*iter)->strName;
db_set_dw(NULL, "MirandaG15", toNarrowString(strSetting).c_str(), (*iter)->bContactlistFilter);
iter++;
}
@@ -338,7 +338,7 @@ void CConfig::LoadFontSettings(int iFont) mir_snprintf(szSetting, "Font%dName", iFont);
DBVARIANT dbv;
if (db_get_ts(NULL, "MirandaG15", szSetting, &dbv))
- mir_tstrcpy(m_logfont[iFont].lfFaceName, _T("Small Fonts"));
+ mir_tstrcpy(m_logfont[iFont].lfFaceName, L"Small Fonts");
else {
mir_tstrcpy(m_logfont[iFont].lfFaceName, dbv.ptszVal);
db_free(&dbv);
@@ -453,7 +453,7 @@ INT_PTR CALLBACK CConfig::AppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wPar DeleteObject(m_hSampleFont[iFont]);
m_hSampleFont[iFont] = CreateFontIndirect(&m_templogfont[iFont]);
SendDlgItemMessage(hwndDlg, CConfig::GetSampleField(iFont), WM_SETFONT, (WPARAM)m_hSampleFont[iFont], (LPARAM)true);
- TRACE(_T("Font selected!"));
+ TRACE(L"Font selected!");
}
}
if (LOWORD(wParam) == IDC_DEVICE && SendDlgItemMessage(hwndDlg, IDC_DEVICE, CB_GETCURSEL, 0, 0) != m_aiIntSettings[DEVICE]) {
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index d15d1fcc5f..6e6f42593b 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -78,7 +78,7 @@ CContactListEntry *CContactList::GetContactData(CListEntry<CContactListEntry*,CC //************************************************************************
tstring CContactList::GetContactGroupPath(MCONTACT hContact)
{
- tstring strGroup = _T("");
+ tstring strGroup = L"";
if(db_get_b(0, "MetaContacts", "Enabled", 1) && db_mc_isSub(hContact))
{
MCONTACT hMetaContact = db_mc_getMeta(hContact);
@@ -86,7 +86,7 @@ tstring CContactList::GetContactGroupPath(MCONTACT hContact) strGroup = CAppletManager::GetContactGroup(hMetaContact);
tstring strMetaName = CAppletManager::GetContactDisplayname(hMetaContact);
- strGroup += (strGroup.empty()?_T(""):_T("\\"))+ strMetaName;
+ strGroup += (strGroup.empty()?L"":L"\\")+ strMetaName;
}
else
strGroup = CAppletManager::GetContactGroup(hContact);
@@ -133,8 +133,8 @@ void CContactList::AddContact(MCONTACT hContact) if(!mir_strcmpi(szProto,"MetaContacts"))
{
if(!CConfig::GetBoolSetting(CLIST_USEGROUPS))
- strGroup = _T("");
- strGroup += (strGroup.empty()?_T(""):_T("\\"))+psContact->strName;
+ strGroup = L"";
+ strGroup += (strGroup.empty()?L"":L"\\")+psContact->strName;
pGroup = GetGroupByString(strGroup);
if(pGroup == NULL)
pGroup = AddGroupByString(strGroup);
@@ -195,7 +195,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { return false;
}
- if(pEntry->strProto != _T("MetaContacts")) {
+ if(pEntry->strProto != L"MetaContacts") {
if(pEntry->iStatus == ID_STATUS_OFFLINE && CConfig::GetBoolSetting(CLIST_HIDEOFFLINE)) {
return false;
}
@@ -321,7 +321,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::GetGroupByS CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::AddGroupByString(tstring strGroup)
{
tstring strParse = strGroup;
- tstring strPath = _T("");
+ tstring strPath = L"";
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = (CListContainer<CContactListEntry*,CContactListGroup*>*)this;
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup2 = NULL;
@@ -344,7 +344,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::AddGroupByS pGroup = pGroup2;
}
ASSERT(pGroup != NULL);
- strPath += _T("\\");
+ strPath += L"\\";
}
strPath += strParse;
if(pGroup2 = FindGroupInGroup(strParse,pGroup))
@@ -402,11 +402,11 @@ void CContactList::DrawEntry(CLCDGfx *pGfx,CContactListEntry *pEntry,bool bSelec if(pEntry == NULL)
return;
- tstring strText = _T("");
+ tstring strText = L"";
if(pEntry->iMessages > 0) {
- strText = _T("[");
+ strText = L"[";
strText += pEntry->strMessages;
- strText += _T("]");
+ strText += L"]";
}
strText += pEntry->strName;
@@ -445,7 +445,7 @@ void CContactList::DrawGroup(CLCDGfx *pGfx,CContactListGroup *pGroup,bool bOpen, if(!pGroup->hMetaContact)
{
if(CConfig::GetBoolSetting(CLIST_COUNTERS))
- strText = strText + _T(" (") + toTstring(num2).c_str()+ _T("/") + toTstring(num).c_str() + _T(")");
+ strText = strText + L" (" + toTstring(num2).c_str()+ L"/" + toTstring(num).c_str() + L")";
}
else
{
@@ -456,16 +456,16 @@ void CContactList::DrawGroup(CLCDGfx *pGfx,CContactListGroup *pGroup,bool bOpen, if(iEvents != 0)
{
itoa(iEvents,num,10);
- strText = _T("[") + toTstring(num) + _T("]") + strText;
+ strText = L"[" + toTstring(num) + L"]" + strText;
}
int iOffset = !pGroup->hMetaContact?m_iFontHeight*0.8:m_iFontHeight*0.8+8;
pGfx->DrawText(iOffset,0,pGfx->GetClipWidth()-iOffset,strText.c_str());
if(bOpen)
- pGfx->DrawText(1,0,_T("-"));
+ pGfx->DrawText(1,0,L"-");
else
- pGfx->DrawText(1,0,_T("+"));
+ pGfx->DrawText(1,0,L"+");
if(bSelected && (GetTickCount() - m_dwLastScroll < 1000|| !CConfig::GetBoolSetting(CLIST_SELECTION)))
{
@@ -687,7 +687,7 @@ void CContactList::OnContactNickChanged(MCONTACT hContact, tstring strNick) CListContainer *pGroup = ((CListContainer<CContactListEntry*,CContactListGroup*>*)pContactEntry);
pGroup->GetGroupData()->strName = strNick;
tstring strPath = GetContactGroupPath(hContact);
- pGroup->GetGroupData()->strPath = strPath + (strPath.empty()?_T(""):_T("\\")) + strNick;
+ pGroup->GetGroupData()->strPath = strPath + (strPath.empty()?L"":L"\\") + strNick;
}
CContactListEntry* pEntry = GetContactData(pContactEntry);
@@ -865,7 +865,7 @@ void CContactList::OnContactGroupChanged(MCONTACT hContact,tstring strGroup) {
iter = pGroup->begin();
if((*iter)->GetType() == ITEM)
- OnContactGroupChanged(GetContactData(*iter)->hHandle,_T(""));
+ OnContactGroupChanged(GetContactData(*iter)->hHandle,L"");
Sleep(1);
}
}
@@ -877,10 +877,10 @@ void CContactList::OnContactGroupChanged(MCONTACT hContact,tstring strGroup) if(bMetaContact)
{
tstring strName = CAppletManager::GetContactDisplayname(hContact);
- tstring strPath = _T("");
+ tstring strPath = L"";
if(pOldGroup)
strPath += pOldGroup->strPath;
- strPath += (strPath.empty()?_T(""):_T("\\")) + strName;
+ strPath += (strPath.empty()?L"":L"\\") + strName;
DeleteGroupObjectByPath(strPath);
}
@@ -920,7 +920,7 @@ void CContactList::UpdateMessageCounter(CListEntry<CContactListEntry*,CContactLi }
}
if(pEntry->iMessages >= 100)
- pEntry->strMessages = _T(">99");
+ pEntry->strMessages = L">99";
else
{
char buffer[8];
@@ -1003,10 +1003,10 @@ void CContactList::InitializeGroupObjects() if(szProto && db_get_b(NULL,META_PROTO,"Enabled",1) && !mir_strcmpi(szProto,META_PROTO))
{
tstring strName = CAppletManager::GetContactDisplayname(hContact);
- tstring strPath = _T("");
+ tstring strPath = L"";
if(CConfig::GetBoolSetting(CLIST_USEGROUPS))
strPath += strGroup;
- strPath += (strPath.empty()?_T(""):_T("\\")) + strName;
+ strPath += (strPath.empty()?L"":L"\\") + strName;
CContactListGroup *pGroup = CreateGroupObjectByPath(strPath);
pGroup->hMetaContact = hContact;
@@ -1060,7 +1060,7 @@ CContactListGroup *CContactList::CreateGroupObjectByPath(tstring strPath) CContactListGroup *pNewGroup = new CContactListGroup();
CContactListGroup *pParentGroup = NULL;
- tstring strParsePath = _T("");
+ tstring strParsePath = L"";
tstring strName = strPath;
tstring::size_type pos;
@@ -1072,7 +1072,7 @@ CContactListGroup *CContactList::CreateGroupObjectByPath(tstring strPath) pParentGroup = GetGroupObjectByPath(strParsePath);
if(!pParentGroup)
pParentGroup = CreateGroupObjectByPath(strParsePath);
- strParsePath += _T("\\");
+ strParsePath += L"\\";
}
if(pParentGroup)
diff --git a/plugins/MirandaG15/src/CCreditsScreen.cpp b/plugins/MirandaG15/src/CCreditsScreen.cpp index 8001426b9d..9a025ffe51 100644 --- a/plugins/MirandaG15/src/CCreditsScreen.cpp +++ b/plugins/MirandaG15/src/CCreditsScreen.cpp @@ -28,8 +28,8 @@ bool CCreditsScreen::Initialize() m_Label.SetAlignment(DT_CENTER);
m_Label.SetWordWrap(TRUE);
- m_Label.SetText(_T(""));
- m_Label.SetFontFaceName(_T("Microsoft Sans Serif"));
+ m_Label.SetText(L"");
+ m_Label.SetFontFaceName(L"Microsoft Sans Serif");
m_Label.SetFontPointSize(10);
m_Label.SetFontWeight(FW_BOLD);
@@ -65,94 +65,94 @@ bool CCreditsScreen::Update() if(dwTimeElapsed > m_dwDuration)
{
m_dwDuration = 4000;
- m_Label.SetText(_T(""));
- m_Label2.SetText(_T(""));
+ m_Label.SetText(L"");
+ m_Label2.SetText(L"");
switch(m_iPosition)
{
case 0:
- m_Label.SetText(_T("MirandaG15"));
- m_Label2.SetText(_T("2008 by Martin Kleinhans"));
+ m_Label.SetText(L"MirandaG15");
+ m_Label2.SetText(L"2008 by Martin Kleinhans");
m_dwDuration = 2500;
break;
case 1:
m_Label.SetSize(GetWidth(),GetHeight());
- m_Label.SetText(_T("Special thanks to:"));
+ m_Label.SetText(L"Special thanks to:");
m_dwDuration = 2000;
break;
case 2:
m_Label.SetSize(GetWidth(),25);
- m_Label.SetText(_T("Shere Khan\n"));
- m_Label2.SetText(_T("Concept, Ideas, Testing"));
+ m_Label.SetText(L"Shere Khan\n");
+ m_Label2.SetText(L"Concept, Ideas, Testing");
m_dwDuration = 2500;
break;
case 3:
m_Label.SetSize(GetWidth(),25);
- m_Label.SetText(_T("Tauu and Cloonix\n"));
- m_Label2.SetText(_T("Ideas, Testing"));
+ m_Label.SetText(L"Tauu and Cloonix\n");
+ m_Label2.SetText(L"Ideas, Testing");
m_dwDuration = 2500;
break;
case 4:
m_Label.SetSize(GetWidth(),GetHeight());
m_Label.SetFontPointSize(10);
m_Label.SetFontWeight(FW_BOLD);
- m_Label.SetText(_T("Betatesters:"));
+ m_Label.SetText(L"Betatesters:");
m_dwDuration = 2000;
break;
case 5:
m_Label.SetSize(GetWidth(),25);
m_Label2.SetFontPointSize(10);
m_Label2.SetFontWeight(FW_BOLD);
- m_Label.SetText(_T("Cyberz"));
- m_Label2.SetText(_T("Cimlite"));
+ m_Label.SetText(L"Cyberz");
+ m_Label2.SetText(L"Cimlite");
m_dwDuration = 2000;
break;
case 6:
- m_Label.SetText(_T("Vullcan"));
- m_Label2.SetText(_T("Snake"));
+ m_Label.SetText(L"Vullcan");
+ m_Label2.SetText(L"Snake");
m_dwDuration = 2000;
break;
case 7:
- m_Label.SetText(_T("Wiebbe"));
- m_Label2.SetText(_T("Maluku"));
+ m_Label.SetText(L"Wiebbe");
+ m_Label2.SetText(L"Maluku");
m_dwDuration = 2000;
break;
case 8:
- m_Label.SetText(_T("lastwebpage"));
+ m_Label.SetText(L"lastwebpage");
m_dwDuration = 2000;
break;
case 9:
m_Label.SetSize(GetWidth(),GetHeight());
- m_Label.SetText(_T("Additional thanks to:"));
+ m_Label.SetText(L"Additional thanks to:");
m_dwDuration = 2000;
break;
case 10:
m_Label.SetSize(GetWidth(),25);
m_Label2.SetFontPointSize(8);
m_Label2.SetFontWeight(FW_NORMAL);
- m_Label.SetText(_T("Everyone"));
- m_Label2.SetText(_T("on G15Forums.com"));
+ m_Label.SetText(L"Everyone");
+ m_Label2.SetText(L"on G15Forums.com");
m_dwDuration = 2000;
break;
case 11:
- m_Label.SetText(_T("Everyone else"));
- m_Label2.SetText(_T("for feedback and suggestions"));
+ m_Label.SetText(L"Everyone else");
+ m_Label2.SetText(L"for feedback and suggestions");
m_dwDuration = 2000;
break;
case 12:
m_Label.SetFontPointSize(10);
m_Label.SetFontWeight(FW_BOLD);
m_Label.SetSize(GetWidth(),25);
- m_Label.SetText(_T("Logitech"));
- m_Label2.SetText(_T("for obvious reasons"));
+ m_Label.SetText(L"Logitech");
+ m_Label2.SetText(L"for obvious reasons");
m_dwDuration = 2000;
break;
case 13:
m_Label.SetSize(GetWidth(),10);
- m_Label.SetText(_T("You can contact me at:"));
+ m_Label.SetText(L"You can contact me at:");
m_Label2.SetSize(GetWidth(),33);
m_Label2.SetOrigin(0,10);
m_Label2.SetFontPointSize(8);
- m_Label2.SetText(_T("mail@mkleinhans.de\nwww.mkleinhans.de"));
+ m_Label2.SetText(L"mail@mkleinhans.de\nwww.mkleinhans.de");
m_dwDuration = 2500;
break;
default:
@@ -182,8 +182,8 @@ void CCreditsScreen::Reset() m_Label2.SetAlignment(DT_CENTER);
m_Label2.SetWordWrap(TRUE);
- m_Label2.SetText(_T(""));
- m_Label2.SetFontFaceName(_T("Microsoft Sans Serif"));
+ m_Label2.SetText(L"");
+ m_Label2.SetFontFaceName(L"Microsoft Sans Serif");
m_Label2.SetFontPointSize(8);
m_Label.SetOrigin(0,0);
diff --git a/plugins/MirandaG15/src/CEvent.h b/plugins/MirandaG15/src/CEvent.h index c94e98d108..4222600ca4 100644 --- a/plugins/MirandaG15/src/CEvent.h +++ b/plugins/MirandaG15/src/CEvent.h @@ -44,11 +44,11 @@ public: hContact = NULL;
bNotification = false;
bLog = true;
- strDescription = _T("");
+ strDescription = L"";
iValue = NULL;
hValue = NULL;
- strValue = _T("");
+ strValue = L"";
}
enum EventType eType;
diff --git a/plugins/MirandaG15/src/CEventScreen.cpp b/plugins/MirandaG15/src/CEventScreen.cpp index 819ec8b3b9..e03a36301e 100644 --- a/plugins/MirandaG15/src/CEventScreen.cpp +++ b/plugins/MirandaG15/src/CEventScreen.cpp @@ -111,7 +111,7 @@ void CEventScreen::OnConfigChanged() while(iter != m_EventLog.end())
{
pItem = static_cast<CListItem<CEventLogEntry*>*>(*iter);
- pItem->GetItemData()->strTimestamp = CAppletManager::GetFormattedTimestamp(&pItem->GetItemData()->Time) + _T(" ");
+ pItem->GetItemData()->strTimestamp = CAppletManager::GetFormattedTimestamp(&pItem->GetItemData()->Time) + L" ";
iter++;
}
@@ -133,7 +133,7 @@ void CEventScreen::OnEventReceived(CEvent *pEvent) pEntry->eType = pEvent->eType;
pEntry->Time = pEvent->Time;
- pEntry->strTimestamp = CAppletManager::GetFormattedTimestamp(&pEvent->Time) + _T(" ");
+ pEntry->strTimestamp = CAppletManager::GetFormattedTimestamp(&pEvent->Time) + L" ";
pEntry->strValue = pEvent->strDescription;
// add it to the list and scroll to it
diff --git a/plugins/MirandaG15/src/CNotificationScreen.cpp b/plugins/MirandaG15/src/CNotificationScreen.cpp index 0eb1cb3bdc..26955ebf78 100644 --- a/plugins/MirandaG15/src/CNotificationScreen.cpp +++ b/plugins/MirandaG15/src/CNotificationScreen.cpp @@ -35,7 +35,7 @@ bool CNotificationScreen::Initialize() //m_Input.Initialize();
//m_Input.Show(0);
- m_TitleText.SetText(_T("Miranda-IM"));
+ m_TitleText.SetText(L"Miranda-IM");
m_TitleText.SetAlignment(DT_LEFT);
m_Timestamp.SetAlignment(DT_RIGHT);
@@ -125,14 +125,14 @@ void CNotificationScreen::DisplayNotification(CNotificationEntry *pEntry) m_pEntry = pEntry;
if(CConfig::GetIntSetting(NOTIFY_TITLE) == NOTIFY_TITLE_NAME || pEntry->strTitle.empty())
- m_TitleText.SetText(_T("Miranda-IM"));
+ m_TitleText.SetText(L"Miranda-IM");
else
m_TitleText.SetText(pEntry->strTitle);
if(CConfig::GetBoolSetting(NOTIFY_TIMESTAMPS))
m_Timestamp.SetText(strTime);
else
- m_Timestamp.SetText(_T(""));
+ m_Timestamp.SetText(L"");
if(pEntry->hContact)
@@ -249,7 +249,7 @@ void CNotificationScreen::OnEventReceived(CEvent *pEvent) if(CConfig::GetIntSetting(NOTIFY_TITLE) == NOTIFY_TITLE_INFO)
pEntry->strText = pEvent->strValue;
else
- pEntry->strText = strUser + (pEvent->eType == EVENT_IRC_RECEIVED?_T(" - "):_T(": "))+ pEvent->strValue;
+ pEntry->strText = strUser + (pEvent->eType == EVENT_IRC_RECEIVED?L" - ":L": ")+ pEvent->strValue;
}
else
{
@@ -367,8 +367,8 @@ void CNotificationScreen::OnExpiration() delete pEntry;
}
// reset the object's content
- m_EventText.SetText(_T(""));
- m_MessageText.SetText(_T(""));
+ m_EventText.SetText(L"");
+ m_MessageText.SetText(L"");
m_pEntry = NULL;
}
\ No newline at end of file diff --git a/plugins/MirandaG15/src/CScreen.cpp b/plugins/MirandaG15/src/CScreen.cpp index cf095aab76..a49207baf1 100644 --- a/plugins/MirandaG15/src/CScreen.cpp +++ b/plugins/MirandaG15/src/CScreen.cpp @@ -45,9 +45,9 @@ bool CScreen::Initialize() m_Clock.SetOrigin(68,0);
m_Clock.SetSize(40,2);
- m_Clock.SetText(_T("23:00 - "));
+ m_Clock.SetText(L"23:00 - ");
- m_Clock.SetFontFaceName(_T("Small Fonts"));//Digital Limit 3õ3 C"));
+ m_Clock.SetFontFaceName(L"Small Fonts");//Digital Limit 3õ3 C"));
m_Clock.SetFontPointSize(10);
//m_Clock.SetFont(CConfig::GetFont(FONT_CLIST));
diff --git a/plugins/MirandaG15/src/CScreensaverScreen.cpp b/plugins/MirandaG15/src/CScreensaverScreen.cpp index d50e1e856f..0ba40da901 100644 --- a/plugins/MirandaG15/src/CScreensaverScreen.cpp +++ b/plugins/MirandaG15/src/CScreensaverScreen.cpp @@ -30,15 +30,15 @@ bool CScreensaverScreen::Initialize() m_Label.SetAlignment(DT_CENTER);
m_Label.SetWordWrap(TRUE);
- m_Label.SetText(_T("Screensaver is active"));
- m_Label.SetFontFaceName(_T("Microsoft Sans Serif"));
+ m_Label.SetText(L"Screensaver is active");
+ m_Label.SetFontFaceName(L"Microsoft Sans Serif");
m_Label.SetFontPointSize(10);
m_Label.SetFontWeight(FW_BOLD);
m_Label2.SetAlignment(DT_CENTER);
m_Label2.SetWordWrap(TRUE);
- m_Label2.SetText(_T(""));
- m_Label2.SetFontFaceName(_T("Microsoft Sans Serif"));
+ m_Label2.SetText(L"");
+ m_Label2.SetFontFaceName(L"Microsoft Sans Serif");
m_Label2.SetFontPointSize(8);
m_Label.SetOrigin(0,0);
@@ -80,20 +80,20 @@ bool CScreensaverScreen::Update() if(dwTimeElapsed > m_dwDuration)
{
m_dwDuration = 4000;
- m_Label.SetText(_T(""));
- m_Label2.SetText(_T(""));
+ m_Label.SetText(L"");
+ m_Label2.SetText(L"");
switch(m_iPosition)
{
case 0:
m_Label.SetFontPointSize(8);
- m_Label.SetText(_T("MirandaG15"));
- m_Label2.SetText(_T("Screensaver is active"));
+ m_Label.SetText(L"MirandaG15");
+ m_Label2.SetText(L"Screensaver is active");
m_dwDuration = 1800;
break;
case 1:
m_Label.SetFontPointSize(11);
- m_Label.SetText(_T("MirandaG15"));
- m_Label2.SetText(_T("Applet locked"));
+ m_Label.SetText(L"MirandaG15");
+ m_Label2.SetText(L"Applet locked");
m_dwDuration = 1800;
m_iPosition = -1;
break;
@@ -122,8 +122,8 @@ void CScreensaverScreen::Reset() m_Label.SetFontPointSize(10);
- m_Label.SetText(_T(""));
- m_Label2.SetText(_T(""));
+ m_Label.SetText(L"");
+ m_Label2.SetText(L"");
CAppletManager::GetInstance()->GetLCDConnection()->SetAsForeground(true);
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp index bd882b136f..768e586c39 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDConnectionLogitech.cpp @@ -166,10 +166,10 @@ bool CLCDConnectionLogitech::Initialize(tstring strAppletName, bool bAutostart, //************************************************************************
tstring CLCDConnectionLogitech::GetDeviceName() {
if (m_pConnectedDevice->GetIndex() == LGLCD_DEVICE_BW) {
- return _T("G15/Z10");
+ return L"G15/Z10";
}
else {
- return _T("G19");
+ return L"G19";
}
}
@@ -237,7 +237,7 @@ bool CLCDConnectionLogitech::Connect(int iIndex) m_hConnection = m_connectContext.connection;
m_hDevice = LGLCD_INVALID_CONNECTION;
- TRACE(_T("CLCDConnectionLogitech: Connection to LCDManager established successfully!\n"));
+ TRACE(L"CLCDConnectionLogitech: Connection to LCDManager established successfully!\n");
}
else {
return false;
@@ -323,7 +323,7 @@ bool CLCDConnectionLogitech::Shutdown() //************************************************************************
bool CLCDConnectionLogitech::HIDReadData(BYTE* data) {
static OVERLAPPED olRead;
- static HANDLE hReadEvent = CreateEvent(NULL, false, true, _T("ReadEvent"));
+ static HANDLE hReadEvent = CreateEvent(NULL, false, true, L"ReadEvent");
static BYTE privateBuffer[9];
DWORD TransBytes;
@@ -460,7 +460,7 @@ bool CLCDConnectionLogitech::Update() }
}
if (button != 0) {
- TRACE(_T("GKey pressed: %d \n"), button);
+ TRACE(L"GKey pressed: %d \n", button);
}
}
@@ -630,14 +630,14 @@ void CLCDConnectionLogitech::HandleErrorFromAPI(DWORD dwRes) break;
// we lost our device
case ERROR_DEVICE_NOT_CONNECTED:
- TRACE(_T("CLCDConnectionLogitech::HandleErrorFromAPI(): Device was unplugged, closing device\n"));
+ TRACE(L"CLCDConnectionLogitech::HandleErrorFromAPI(): Device was unplugged, closing device\n");
Disconnect();
SetReconnect(true);
SetVolumeWheelHook(false);
break;
default:
- TRACE(_T("CLCDConnectionLogitech::HandleErrorFromAPI(): FATAL ERROR, closing device and connection\n"));
+ TRACE(L"CLCDConnectionLogitech::HandleErrorFromAPI(): FATAL ERROR, closing device and connection\n");
Disconnect();
SetReconnect(true);
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h index d7d2efe35e..5d4776e0f5 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h +++ b/plugins/MirandaG15/src/LCDFramework/CLCDDevice.h @@ -42,7 +42,7 @@ public: // Returns the display name
tstring GetDisplayName() {
- return m_iBPP == 1? _T("G15") : _T("G19");
+ return m_iBPP == 1? L"G15" : L"G19";
}
// Returns the display size
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp index b258952b16..7d874a7a33 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDGfx.cpp @@ -60,7 +60,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits m_hDC = CreateCompatibleDC(NULL);
if(NULL == m_hDC)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to create compatible DC.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to create compatible DC.\n");
Shutdown();
return false;
}
@@ -69,7 +69,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits m_pBitmapInfo = (BITMAPINFO *) new BYTE [nBMISize];
if(NULL == m_pBitmapInfo)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to allocate bitmap info.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to allocate bitmap info.\n");
Shutdown();
return false;
}
@@ -100,7 +100,7 @@ bool CLCDGfx::Initialize(int nWidth, int nHeight, int nBPP, PBYTE pLcdBitmapBits m_hBitmap = CreateDIBSection(m_hDC, m_pBitmapInfo, DIB_RGB_COLORS, (PVOID *) &m_pBitmapBits, NULL, 0);
if(NULL == m_hBitmap)
{
- TRACE(_T("CLCDGfx::Initialize(): failed to create bitmap.\n"));
+ TRACE(L"CLCDGfx::Initialize(): failed to create bitmap.\n");
Shutdown();
return false;
}
@@ -317,7 +317,7 @@ void CLCDGfx::DrawText(int nX,int nY,int nWidth,tstring strText) SIZE sizeLine = {0, 0};
SIZE sizeCutOff = {0, 0};
- GetTextExtentPoint(GetHDC(),_T("..."),3,&sizeCutOff);
+ GetTextExtentPoint(GetHDC(),L"...",3,&sizeCutOff);
int *piWidths = new int[strText.length()];
int iMaxChars = 0;
@@ -329,7 +329,7 @@ void CLCDGfx::DrawText(int nX,int nY,int nWidth,tstring strText) if(piWidths[iMaxChars] + sizeCutOff.cx <= nWidth)
break;
- DrawText(nX,nY,(strText.substr(0,iMaxChars) + _T("...")).c_str());
+ DrawText(nX,nY,(strText.substr(0,iMaxChars) + L"...").c_str());
}
else DrawText(nX,nY,strText.c_str());
delete[] piWidths;
@@ -721,7 +721,7 @@ void CLCDGfx::Cache() m_dwTransitionStart = GetTickCount();
- TRACE(_T("Textmorphing: time consumed: %0.2f\n"),(double)(m_dwTransitionStart-dwStart)/(double)1000);
+ TRACE(L"Textmorphing: time consumed: %0.2f\n",(double)(m_dwTransitionStart-dwStart)/(double)1000);
}
//************************************************************************
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp index 547216ac09..1ca9bd4378 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDInput.cpp @@ -298,9 +298,9 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam) /*
if(bKeyDown)
- TRACE(_T("Key pressed: %i\n"),key->vkCode);
+ TRACE(L"Key pressed: %i\n",key->vkCode);
else
- TRACE(_T("Key released: %i\n"),key->vkCode);
+ TRACE(L"Key released: %i\n",key->vkCode);
*/
// Only handle Keyup
if(bKeyDown)
@@ -310,7 +310,7 @@ LRESULT CLCDInput::ProcessKeyEvent(int Code, WPARAM wParam, LPARAM lParam) && m_acKeyboardState[VK_SHIFT] & 0x80)
{
ActivateKeyboardLayout((HKL)HKL_NEXT,0);//KLF_SETFORPROCESS);
- TRACE(_T("Keyboardlayout switched!\n"));
+ TRACE(L"Keyboardlayout switched!\n");
return 1;
}
@@ -566,7 +566,7 @@ void CLCDInput::Reset() memset(&m_Marker[0], 0, sizeof(SMarker));
- m_strText = _T("");
+ m_strText = L"";
m_vLineOffsets.clear();
m_iLinePosition = 0;
SLineEntry offset;
@@ -623,7 +623,7 @@ void CLCDInput::UpdateOffsets(int iModified) bool bLineClosed = false;
- // TRACE(_T("InputText: Begin Update at #%i\n"),iLine);
+ // TRACE(L"InputText: Begin Update at #%i\n",iLine);
for(;iLine<m_vLineOffsets.size();iLine++)
{
bLineClosed = false;
@@ -633,7 +633,7 @@ void CLCDInput::UpdateOffsets(int iModified) if(!(iLen == 0) && iChar > iLen)
{
- // TRACE(_T("InputText: Deleted offset #%i\n"),iLine);
+ // TRACE(L"InputText: Deleted offset #%i\n",iLine);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine);
continue;
}
@@ -647,7 +647,7 @@ void CLCDInput::UpdateOffsets(int iModified) iWordOffset= iChar;
GetTextExtentExPoint(hDC,pszText+iChar,iLen-iChar,GetWidth(),&iMaxChars,piWidths,&sizeLine);
- pos = m_strText.find(_T("\n"),iChar);
+ pos = m_strText.find(L"\n",iChar);
// check for linebreaks
if(pos != tstring::npos && pos >= iChar && pos <= iChar + iMaxChars)
{
@@ -658,7 +658,7 @@ void CLCDInput::UpdateOffsets(int iModified) else
{
// find the last space in the line
- pos = m_strText.rfind(_T(" "),iChar + iMaxChars);
+ pos = m_strText.rfind(L" ",iChar + iMaxChars);
if(pos != tstring::npos && pos >= iChar)
iWordOffset = (int)pos +1;
else
@@ -701,7 +701,7 @@ void CLCDInput::UpdateOffsets(int iModified) // if there are other offsets in front of this one, delete them
if(iLine2 != iLine + 1 )
{
- // TRACE(_T("InputText: Deleted offsets #%i to #%i\n"),iLine+1,iLine2-1);
+ // TRACE(L"InputText: Deleted offsets #%i to #%i\n",iLine+1,iLine2-1);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine+1,m_vLineOffsets.begin()+iLine2);
}
break;
@@ -724,7 +724,7 @@ void CLCDInput::UpdateOffsets(int iModified) else
m_vLineOffsets[iLine].iWidth = 0;
- // TRACE(_T("InputText: shifted offsets #%i to end %i position(s)\n"),iLine+1,iDistance);
+ // TRACE(L"InputText: shifted offsets #%i to end %i position(s)\n",iLine+1,iDistance);
for(iLine++;iLine<m_vLineOffsets.size();iLine++)
m_vLineOffsets[iLine].iOffset += iDistance;
@@ -742,7 +742,7 @@ void CLCDInput::UpdateOffsets(int iModified) else
m_vLineOffsets.insert(m_vLineOffsets.begin()+iLine+1,offset);
- // TRACE(_T("InputText: Inserted new %soffset at #%i\n"),m_strText[iChar] == '\n'?_T("linebreak "):_T(""),iLine+1);
+ // TRACE(L"InputText: Inserted new %soffset at #%i\n",m_strText[iChar] == '\n'?L"linebreak ":L"",iLine+1);
}
break;
}
@@ -762,7 +762,7 @@ void CLCDInput::UpdateOffsets(int iModified) if(iLine != m_vLineOffsets.size() - 1 && !bLineClosed)
{
- // TRACE(_T("InputText: Deleted offsets #%i to #%i\n"),iLine+1,m_vLineOffsets.size()-1);
+ // TRACE(L"InputText: Deleted offsets #%i to #%i\n",iLine+1,m_vLineOffsets.size()-1);
m_vLineOffsets.erase(m_vLineOffsets.begin()+iLine+1,m_vLineOffsets.end());
}
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp index 38daccc7bf..2c0a0bd866 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.cpp @@ -11,7 +11,7 @@ CLCDLabel::CLCDLabel() : m_bCutOff(true), m_bWordWrap(false), m_iCutOffIndex(0),
m_iLineCount(0)
{
- m_strText = _T("");
+ m_strText = L"";
}
//************************************************************************
@@ -124,7 +124,7 @@ void CLCDLabel::UpdateCutOffIndex() if(iLen <= 0)
{
- m_strCutOff = _T("");
+ m_strCutOff = L"";
m_iCutOffIndex = 0;
return;
}
@@ -162,7 +162,7 @@ void CLCDLabel::UpdateCutOffIndex() if(m_strText[i] == '\n' || m_strText[i] == ' ')
i++;
- pos = m_strText.find(_T("\n"),i);
+ pos = m_strText.find(L"\n",i);
// check for linebreaks
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
@@ -170,7 +170,7 @@ void CLCDLabel::UpdateCutOffIndex() else if(iMaxChars < iLen - i || sizeLine.cx >= GetWidth())
{
// find the last space in the line ( substract -1 from offset to ignore spaces as last chars )
- pos = m_strText.rfind(_T(" "),i + iMaxChars -1 );
+ pos = m_strText.rfind(L" ",i + iMaxChars -1 );
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
}
@@ -188,7 +188,7 @@ void CLCDLabel::UpdateCutOffIndex() // calculate the cutoff position
- GetTextExtentPoint(hDC,_T("..."),3,&sizeCutOff);
+ GetTextExtentPoint(hDC,L"...",3,&sizeCutOff);
int *piWidths = new int[(*--m_vLines.end()).length()];
int iMaxChars = 0;
@@ -202,7 +202,7 @@ void CLCDLabel::UpdateCutOffIndex() if(piWidths[iMaxChars] + sizeCutOff.cx <= iWidth)
break;
}
- (*--m_vLines.end()) = (*--m_vLines.end()).substr(0,iMaxChars) + _T("...");
+ (*--m_vLines.end()) = (*--m_vLines.end()).substr(0,iMaxChars) + L"...";
}
delete[] piWidths;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp index 42bc3361de..cf8c680d12 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDOutputManager.cpp @@ -21,7 +21,7 @@ CLCDOutputManager::CLCDOutputManager() : m_dwButtonRepeatDelay(300), m_pGfx(0), ASSERT(m_pInstance == NULL); m_pInstance = this; - m_strAppletName = _T(""); + m_strAppletName = L""; } //************************************************************************ @@ -140,7 +140,7 @@ void CLCDOutputManager::InitializeGfxObject() { if(m_pGfx->IsInitialized()) return; - TRACE(_T("CLCDOutputManager::UpdateGfxObject(): initializing CLCDGfx\n")); + TRACE(L"CLCDOutputManager::UpdateGfxObject(): initializing CLCDGfx\n"); SIZE size; size = m_pLcdConnection->GetDisplaySize(); @@ -176,7 +176,7 @@ void CLCDOutputManager::DeinitializeGfxObject() { if(!m_pGfx->IsInitialized()) return; - TRACE(_T("CLCDOutputManager::UpdateGfxObject(): shutting down CLCDGfx\n")); + TRACE(L"CLCDOutputManager::UpdateGfxObject(): shutting down CLCDGfx\n"); m_pGfx->Shutdown(); free(m_pbButtonStates); diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp index 1db6536e08..f0c30b78cf 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextLog.cpp @@ -299,8 +299,8 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry) int iLen = (int)strString.size();
int i = 0;
- tstring strLine = _T("");
- tstring strWord = _T("");
+ tstring strLine = L"";
+ tstring strWord = L"";
SIZE sizeLine = {0, 0};
int *piExtents = new int[strString.length()];
@@ -320,7 +320,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry) if(strString[i] == '\n' || strString[i] == ' ')
i++;
- pos = strString.rfind(_T("\n"),i+iMaxChars);
+ pos = strString.rfind(L"\n",i+iMaxChars);
// check for linebreaks
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
@@ -328,7 +328,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry) else if(iMaxChars < iLen - i || sizeLine.cx >= GetWidth())
{
// find the last space in the line ( substract -1 from offset to ignore spaces as last chars )
- pos = strString.rfind(_T(" "),i + iMaxChars -1 );
+ pos = strString.rfind(L" ",i + iMaxChars -1 );
if(pos != tstring::npos && pos != i && pos >= i && pos != i+iMaxChars)
iMaxChars = 1 + (int)pos - i;
}
@@ -351,7 +351,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry) sizeLine.cx += sizeWord.cx;
strLine += strWord;
- strWord = _T("");
+ strWord = L"";
sizeWord.cx = 0;
}
@@ -365,7 +365,7 @@ void CLCDTextLog::WrapMessage(CLogEntry *pEntry) }
pEntry->vLines.push_back(strLine);
- strLine = _T("");
+ strLine = L"";
sizeLine.cx = 0;
}
i++;
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp index ccbb420206..56c2d9f68c 100644 --- a/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp +++ b/plugins/MirandaG15/src/LCDFramework/CLCDTextObject.cpp @@ -34,7 +34,7 @@ bool CLCDTextObject::Initialize() m_hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
if(NULL != m_hFont)
{
- SetFontFaceName(_T("Small Fonts"));
+ SetFontFaceName(L"Small Fonts");
SetFontPointSize(6);
}
return true;
diff --git a/plugins/MirandaG15/src/LCDFramework/misc.cpp b/plugins/MirandaG15/src/LCDFramework/misc.cpp index d4a491f446..968bb5ce6c 100644 --- a/plugins/MirandaG15/src/LCDFramework/misc.cpp +++ b/plugins/MirandaG15/src/LCDFramework/misc.cpp @@ -111,7 +111,7 @@ tstring toLower(const tstring &i_str) tstring Utf8_Decode(const char *str)
{
- tstring strRes = _T("");
+ tstring strRes = L"";
int i;
char *p;
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp index 8b3c76e946..03d98766bf 100644 --- a/plugins/MirandaG15/src/Miranda.cpp +++ b/plugins/MirandaG15/src/Miranda.cpp @@ -105,7 +105,7 @@ EXTERN_C int __declspec(dllexport) Load() g_bInitialized = false;
InitDebug();
- TRACE(_T("Plugin loaded\n"));
+ TRACE(L"Plugin loaded\n");
// Schedule actual initialization for later
HookEvent(ME_SYSTEM_MODULESLOADED, Init);
return 0;
@@ -115,15 +115,15 @@ EXTERN_C int __declspec(dllexport) Load() EXTERN_C int __declspec(dllexport) Unload(void)
{
if(!g_bInitialized) {
- TRACE(_T("ERROR: Unload requested, but plugin is not initialized?!\n"));
+ TRACE(L"ERROR: Unload requested, but plugin is not initialized?!\n");
return 0;
}
- TRACE(_T("-------------------------------------------\nUnloading started\n"));
+ TRACE(L"-------------------------------------------\nUnloading started\n");
UnInit();
- TRACE(_T("Unloading successful\n"));
- TRACE(_T("Cleaning up: "));
+ TRACE(L"Unloading successful\n");
+ TRACE(L"Cleaning up: ");
UnInitDebug();
- TRACE(_T("OK!\n"));
+ TRACE(L"OK!\n");
return 0;
}
@@ -161,17 +161,17 @@ int Init(WPARAM, LPARAM) if(!g_AppletManager->Initialize(toTstring(APP_SHORTNAME)))
{
if(CConfig::GetBoolSetting(SKIP_DRIVER_ERROR)) {
- tstring text = _T("Failed to initialize the LCD connection\n Make sure you have the newest Logitech drivers installed (>=1.03).\n");
+ tstring text = L"Failed to initialize the LCD connection\n Make sure you have the newest Logitech drivers installed (>=1.03).\n";
tstring title = _T(APP_SHORTNAME);
MessageBox(NULL, text.c_str(), title.c_str(), MB_OK | MB_ICONEXCLAMATION);
}
- TRACE(_T("Initialization failed!.\n"));
+ TRACE(L"Initialization failed!.\n");
return 0;
}
g_bInitialized = true;
- TRACE(_T("Initialization completed successfully.\n-------------------------------------------\n"));
+ TRACE(L"Initialization completed successfully.\n-------------------------------------------\n");
return 0;
}
//************************************************************************
diff --git a/plugins/MobileState/src/clients.h b/plugins/MobileState/src/clients.h index 413fa63f21..b9c87ae6e5 100644 --- a/plugins/MobileState/src/clients.h +++ b/plugins/MobileState/src/clients.h @@ -20,39 +20,39 @@ #pragma once
static const TCHAR *clients[] = {
- _T("android"),
- _T("mobile"),
- _T("pda"),
- _T("gtalk"),
- _T("conversions"),
- _T("conversations"),
- _T("jabiru"),
- _T("jtalk"),
- _T("jasmine"),
- _T("igniterealtime"),
- _T("ebuddy"),
- _T("emessenger"),
- _T("jimm"),
- _T("mobicq"),
- _T("bombus"),
- _T("colibry"),
- _T("berry"),
- _T("phone"),
- _T("ipad"),
- _T("im+"),
- _T("bayan"),
- _T("imo.im"),
- _T("slick"),
- _T("talkonaut"),
- _T("jabbroid"),
- _T("talkdroid"),
- _T("blackberry"),
- _T("prelude"),
- _T("nimbuzz"),
- _T("mqutim"),
- _T("sleekxmpp.com"),
- _T("facebook (mobile"),
- _T("facebook app"),
- _T("facebook messenger"),
- _T("wp")
+ L"android",
+ L"mobile",
+ L"pda",
+ L"gtalk",
+ L"conversions",
+ L"conversations",
+ L"jabiru",
+ L"jtalk",
+ L"jasmine",
+ L"igniterealtime",
+ L"ebuddy",
+ L"emessenger",
+ L"jimm",
+ L"mobicq",
+ L"bombus",
+ L"colibry",
+ L"berry",
+ L"phone",
+ L"ipad",
+ L"im+",
+ L"bayan",
+ L"imo.im",
+ L"slick",
+ L"talkonaut",
+ L"jabbroid",
+ L"talkdroid",
+ L"blackberry",
+ L"prelude",
+ L"nimbuzz",
+ L"mqutim",
+ L"sleekxmpp.com",
+ L"facebook (mobile",
+ L"facebook app",
+ L"facebook messenger",
+ L"wp"
};
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index 2f033d63a0..8eb3a1b369 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -239,7 +239,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BTN_APPLY))) {
int idResult = MessageBox(hwndDlg,
TranslateT("You have some unsaved changes here.\n Do you wish to apply settings before switching?"),
- _T("Miranda NG"), MB_ICONQUESTION | MB_YESNOCANCEL);
+ L"Miranda NG", MB_ICONQUESTION | MB_YESNOCANCEL);
if (idResult == IDCANCEL) break;
sttNotifyPages(dat, (idResult == IDYES) ? PSN_APPLY : PSN_RESET);
}
@@ -597,31 +597,31 @@ static int hookModernOpt_Initialize(WPARAM wParam, LPARAM) #if defined(_DEBUG) && defined(MOPT_SAMPLE_PAGES)
obj.iSection = MODERNOPT_PAGE_ADVANCED;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
- obj.lptzSubsection = _T("Page 1");
+ obj.lptzSubsection = L"Page 1";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Page 2");
+ obj.lptzSubsection = L"Page 2";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Page 3");
+ obj.lptzSubsection = L"Page 3";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.iType = MODERNOPT_TYPE_IGNOREOBJECT;
obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
- obj.lptzSubsection = _T("Files");
+ obj.lptzSubsection = L"Files";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- obj.lptzSubsection = _T("Messages");
+ obj.lptzSubsection = L"Messages";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_URL);
- obj.lptzSubsection = _T("URL events");
+ obj.lptzSubsection = L"URL events";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_TYPING);
- obj.lptzSubsection = _T("Typing notifications");
+ obj.lptzSubsection = L"Typing notifications";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
- obj.lptzSubsection = _T("Added notifications");
+ obj.lptzSubsection = L"Added notifications";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- obj.lptzSubsection = _T("Auth requests");
+ obj.lptzSubsection = L"Auth requests";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.iSection = MODERNOPT_PAGE_SKINS;
@@ -649,20 +649,20 @@ static int hookModernOpt_Initialize(WPARAM wParam, LPARAM) obj.iSection = MODERNOPT_PAGE_ADVANCED;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
- obj.lptzSubsection = _T("Page 1");
+ obj.lptzSubsection = L"Page 1";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Page 2");
+ obj.lptzSubsection = L"Page 2";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Page 3");
+ obj.lptzSubsection = L"Page 3";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.iSection = MODERNOPT_PAGE_MODULES;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
- obj.lptzSubsection = _T("Configure");
+ obj.lptzSubsection = L"Configure";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Update");
+ obj.lptzSubsection = L"Update";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.lptzSubsection = _T("Download");
+ obj.lptzSubsection = L"Download";
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
#endif
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 071e560cea..7c669dd656 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -46,7 +46,7 @@ static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps return;
}
- HBITMAP hbmPreview = Bitmap_Load(CMString(fn) + _T(".png"));
+ HBITMAP hbmPreview = Bitmap_Load(CMString(fn) + L".png");
if (!hbmPreview)
return;
@@ -93,7 +93,7 @@ struct TSkinListItem size_t length = mir_tstrlen(curPath) + mir_tstrlen(fn) + 2;
filename = (TCHAR *)mir_alloc(length * sizeof(TCHAR));
- mir_sntprintf(filename, length, _T("%s\\%s"), curPath, fn);
+ mir_sntprintf(filename, length, L"%s\\%s", curPath, fn);
}
~TSkinListItem()
@@ -140,16 +140,16 @@ static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool }
WIN32_FIND_DATA ffd = { 0 };
- HANDLE h = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE h = FindFirstFile(L"*.*", &ffd);
if (h != INVALID_HANDLE_VALUE) {
do {
- if (!mir_tstrcmp(ffd.cFileName, _T("")) || !mir_tstrcmp(ffd.cFileName, _T(".")) || !mir_tstrcmp(ffd.cFileName, _T("..")))
+ if (!mir_tstrcmp(ffd.cFileName, L"") || !mir_tstrcmp(ffd.cFileName, L".") || !mir_tstrcmp(ffd.cFileName, L".."))
continue;
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
SetCurrentDirectory(ffd.cFileName);
BuildSkinList(hwndList, szExt, nExtLength, false);
- SetCurrentDirectory(_T(".."));
+ SetCurrentDirectory(L"..");
}
else {
if (CheckExt(ffd.cFileName, szExt, nExtLength)) {
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 7fc9aa8d42..ee5b3e254a 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -152,7 +152,7 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, PVOID lpOrigFunc, PVOID void HookAPI()
{
- PVOID lpMessageBox = (PVOID)GetProcAddress(GetModuleHandle(_T("USER32.DLL")), "MessageBoxW");
+ PVOID lpMessageBox = (PVOID)GetProcAddress(GetModuleHandle(L"USER32.DLL"), "MessageBoxW");
PVOID lpPopupMsgBox = (PVOID)newMessageBox;
prevMessageBox = (MSGBOXPROC)lpMessageBox;
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp index bb095620a5..b6222a7d75 100644 --- a/plugins/MsgPopup/src/options.cpp +++ b/plugins/MsgPopup/src/options.cpp @@ -54,10 +54,10 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l case WM_COMMAND:
if (LOWORD(wParam) == IDC_PREVIEW) {
- MessageBox(0, TranslateT("Message with question"), TranslateTS(_T(SERVICENAME) _T(" - demo")), MB_ICONQUESTION);
- MessageBox(0, TranslateT("Message with exclamation"), TranslateTS(_T(SERVICENAME) _T(" - demo")), MB_ICONEXCLAMATION);
- MessageBox(0, TranslateT("Message with error"), TranslateTS(_T(SERVICENAME) _T(" - demo")), MB_ICONSTOP);
- MessageBox(0, TranslateT("Message with asterisk"), TranslateTS(_T(SERVICENAME) _T(" - demo")), MB_ICONASTERISK);
+ MessageBox(0, TranslateT("Message with question"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONQUESTION);
+ MessageBox(0, TranslateT("Message with exclamation"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONEXCLAMATION);
+ MessageBox(0, TranslateT("Message with error"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONSTOP);
+ MessageBox(0, TranslateT("Message with asterisk"), TranslateTS(_T(SERVICENAME) L" - demo"), MB_ICONASTERISK);
return FALSE;
}
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index d649dd39ef..40ca0e112f 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -463,7 +463,7 @@ bool bOpenExternaly(MCONTACT hContact) return true;
}
tstring sTmp = sFileViewerPrg;
- sTmp += _T(" \"");
+ sTmp += L" \"";
sTmp += sPath;
sTmp += '\"';
@@ -670,7 +670,7 @@ bool bLoadFile(HWND hwndDlg, CLHistoryDlg * pclDlg) CloseHandle(hFile);
TCHAR szTmp[100];
- mir_sntprintf(szTmp, _T("File open time %d\n"), GetTickCount() - dwStart);
+ mir_sntprintf(szTmp, L"File open time %d\n", GetTickCount() - dwStart);
OutputDebugString(szTmp);
GETTEXTLENGTHEX sData = { 0 };
@@ -908,7 +908,7 @@ void SetRichEditFont(HWND hRichEdit, bool bUseSyntaxHL) ncf.dwMask = CFM_BOLD | CFM_FACE | CFM_ITALIC | CFM_SIZE | CFM_UNDERLINE;
ncf.dwEffects = db_get_dw(NULL, MODULE, szFileViewDB "TEffects", 0);
ncf.yHeight = db_get_dw(NULL, MODULE, szFileViewDB "THeight", 165);
- mir_tstrcpy(ncf.szFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", _T("Courier New")).c_str());
+ mir_tstrcpy(ncf.szFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str());
if (!bUseSyntaxHL) {
ncf.dwMask |= CFM_COLOR;
@@ -988,7 +988,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, if (n != sPath.npos)
sPath.erase(0, n + 1);
- if (mir_sntprintf(szTitle, szFormat, pszNick, sPath.c_str(), (pclDlg->bUtf8File ? _T("UTF8") : _T("ANSI"))) > 0)
+ if (mir_sntprintf(szTitle, szFormat, pszNick, sPath.c_str(), (pclDlg->bUtf8File ? L"UTF8" : L"ANSI")) > 0)
SetWindowText(hwndDlg, szTitle);
}
@@ -1036,7 +1036,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, lf.lfStrikeOut = (dwEffects & CFE_STRIKEOUT) != 0;
lf.lfItalic = (dwEffects & CFE_ITALIC) != 0;
- mir_tstrcpy(lf.lfFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", _T("Courier New")).c_str());
+ mir_tstrcpy(lf.lfFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str());
CHOOSEFONT cf = { 0 };
cf.lStructSize = sizeof(cf);
cf.hwndOwner = hwndDlg;
@@ -1102,7 +1102,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, }
if ((wParam & 0xFFF0) == ID_FV_SAVE_AS_RTF) {
tstring sFile = pclDlg->sPath;
- sFile += _T(".rtf");
+ sFile += L".rtf";
HANDLE hFile = CreateFile(sFile.c_str(), GENERIC_WRITE,
FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index c6a3d41377..4befc1c23b 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -192,12 +192,12 @@ extern "C" __declspec(dllexport) int Load() if (nMaxLineWidth < 5)
nMaxLineWidth = 5;
- sExportDir = _DBGetString(NULL, MODULE, "ExportDir", _T("%dbpath%\\MsgExport\\"));
- sDefaultFile = _DBGetString(NULL, MODULE, "DefaultFile", _T("%nick%.txt"));
+ sExportDir = _DBGetString(NULL, MODULE, "ExportDir", L"%dbpath%\\MsgExport\\");
+ sDefaultFile = _DBGetString(NULL, MODULE, "DefaultFile", L"%nick%.txt");
- sTimeFormat = _DBGetString(NULL, MODULE, "TimeFormat", _T("d s"));
+ sTimeFormat = _DBGetString(NULL, MODULE, "TimeFormat", L"d s");
- sFileViewerPrg = _DBGetString(NULL, MODULE, "FileViewerPrg", _T(""));
+ sFileViewerPrg = _DBGetString(NULL, MODULE, "FileViewerPrg", L"");
bUseInternalViewer(db_get_b(NULL, MODULE, "UseInternalViewer", bUseInternalViewer()) != 0);
bReplaceHistory = db_get_b(NULL, MODULE, "ReplaceHistory", bReplaceHistory) != 0;
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 8d88d4f9ca..41251ca214 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -95,7 +95,7 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) return mir_tstrcmpi(pcli->pfnGetContactDisplayName(lParam1, 0), pcli->pfnGetContactDisplayName(lParam2, 0));
if (lParamSort == 2)
- return _DBGetString((MCONTACT)lParam1, "Protocol", "p", _T("")).compare(_DBGetString((MCONTACT)lParam2, "Protocol", "p", _T("")));
+ return _DBGetString((MCONTACT)lParam1, "Protocol", "p", L"").compare(_DBGetString((MCONTACT)lParam2, "Protocol", "p", L""));
if (lParamSort == 3) {
DWORD dwUin1 = db_get_dw((MCONTACT)lParam1, _DBGetStringA((MCONTACT)lParam1, "Protocol", "p", "").c_str(), "UIN", 0);
@@ -402,7 +402,7 @@ void ClearAllFileNames(HWND hwndDlg) {
LVITEM sItem = { 0 };
sItem.mask = LVIF_TEXT;
- sItem.pszText = _T("");
+ sItem.pszText = L"";
HWND hMapUser = GetDlgItem(hwndDlg, IDC_MAP_USER_LIST);
int nCount = ListView_GetItemCount(hMapUser);
@@ -628,7 +628,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar sItem.iImage = db_get_b(hContact, MODULE, "EnableLog", 1);
sItem.lParam = hContact;
- sTmp = _DBGetString(hContact, MODULE, "FileName", _T(""));
+ sTmp = _DBGetString(hContact, MODULE, "FileName", L"");
sItem.pszText = (TCHAR*)sTmp.c_str();
ListView_InsertItem(hMapUser, &sItem);
@@ -643,7 +643,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar DWORD dwUIN = db_get_dw(hContact, pa->szModuleName, "UIN", 0);
TCHAR szTmp[50];
- mir_sntprintf(szTmp, _T("%d"), dwUIN);
+ mir_sntprintf(szTmp, L"%d", dwUIN);
sItem.iSubItem = 3;
sItem.pszText = szTmp;
ListView_SetItem(hMapUser, &sItem);
@@ -664,41 +664,41 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar // Export dir
SetDlgItemText(hwndDlg, IDC_EXPORT_DIR, sExportDir.c_str());
hComboBox = GetDlgItem(hwndDlg, IDC_EXPORT_DIR);
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%dbpath%\\MsgExport\\"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("C:\\Backup\\MsgExport\\"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%dbpath%\\MsgExport\\%group% - "));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%dbpath%\\MsgExport\\%group%\\"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%dbpath%\\MsgExport\\");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"C:\\Backup\\MsgExport\\");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%dbpath%\\MsgExport\\%group% - ");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%dbpath%\\MsgExport\\%group%\\");
// default file
SetDlgItemText(hwndDlg, IDC_DEFAULT_FILE, sDefaultFile.c_str());
hComboBox = GetDlgItem(hwndDlg, IDC_DEFAULT_FILE);
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%nick%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%UIN%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%group%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%e-mail%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%identifier%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%year%-%month%-%day%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%group%\\%nick%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%group%\\%UIN%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%group%\\%identifier%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("%protocol%\\%nick%.txt"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("History.txt"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%nick%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%UIN%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%group%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%e-mail%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%identifier%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%year%-%month%-%day%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%group%\\%nick%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%group%\\%UIN%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%group%\\%identifier%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"%protocol%\\%nick%.txt");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"History.txt");
// time format
SetDlgItemText(hwndDlg, IDC_EXPORT_TIMEFORMAT, sTimeFormat.c_str());
hComboBox = GetDlgItem(hwndDlg, IDC_EXPORT_TIMEFORMAT);
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("d t"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("d s"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("d m"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("D s"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("D m :"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"d t");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"d s");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"d m");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"D s");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"D m :");
// File viewer
SetDlgItemText(hwndDlg, IDC_FILE_VIEWER, sFileViewerPrg.c_str());
hComboBox = GetDlgItem(hwndDlg, IDC_FILE_VIEWER);
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T(""));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("C:\\Windows\\Notepad.exe"));
- SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)_T("C:\\WinNT\\Notepad.exe"));
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"C:\\Windows\\Notepad.exe");
+ SendMessage(hComboBox, CB_ADDSTRING, 0, (LPARAM)L"C:\\WinNT\\Notepad.exe");
CheckDlgButton(hwndDlg, IDC_USE_INTERNAL_VIEWER, bUseInternalViewer() ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_REPLACE_MIRANDA_HISTORY, bReplaceHistory ? BST_CHECKED : BST_UNCHECKED);
@@ -793,7 +793,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar GetDlgItemText(hwndDlg, IDC_FILE_VIEWER, szFile, _countof(szFile));
TCHAR buf[MAX_PATH];
- mir_sntprintf(buf, _T("%s (*.exe;*.com;*.bat;*.cmd)%c*.exe;*.com;*.bat;*.cmd%c%s (*.*)%c*.*%c%c"), TranslateT("Executable files"), 0, 0, TranslateT("All files"), 0, 0, 0);
+ mir_sntprintf(buf, L"%s (*.exe;*.com;*.bat;*.cmd)%c*.exe;*.com;*.bat;*.cmd%c%s (*.*)%c*.*%c%c", TranslateT("Executable files"), 0, 0, TranslateT("All files"), 0, 0, 0);
{
OPENFILENAME ofn = {}; // common dialog box structure
ofn.lStructSize = sizeof(OPENFILENAME);
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index b5d13d04af..6ef31c4135 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -20,7 +20,7 @@ // Default error string used upon errors
const TCHAR *pszGroupError = LPGENT("No_Group");
-const TCHAR *pszDbPathError = _T(".");
+const TCHAR *pszDbPathError = L".";
// Replacement for chareteres not alowed in file names.
const TCHAR cBadCharReplace = _T('_');
@@ -51,15 +51,15 @@ int nMaxLineWidth = 80; const TCHAR *pszReplaceList[] =
{
- _T("%FirstName%"),
- _T("%LastName%"),
- _T("%e-mail%"),
- _T("%Nick%"),
- _T("%City%"),
- _T("%State%"),
- _T("%Phone%"),
- _T("%Homepage%"),
- _T("%About%")
+ L"%FirstName%",
+ L"%LastName%",
+ L"%e-mail%",
+ L"%Nick%",
+ L"%City%",
+ L"%State%",
+ L"%Phone%",
+ L"%Homepage%",
+ L"%About%"
};
const char *pszReplaceListA[] =
{
@@ -110,14 +110,14 @@ bool bIsUtf8Header(BYTE * pucByteOrder) void ShowDebugInfo()
{
- tstring sDebug = _T("Debug information\r\nsDBPath :");
+ tstring sDebug = L"Debug information\r\nsDBPath :";
sDebug += sDBPath;
- sDebug += _T("\r\nsMirandaPath :");
+ sDebug += L"\r\nsMirandaPath :";
sDebug += sMirandaPath;
- sDebug += _T("\r\nsDefaultFile :");
+ sDebug += L"\r\nsDefaultFile :";
sDebug += sDefaultFile;
- sDebug += _T("\r\nGetFilePathFromUser(NULL) :");
+ sDebug += L"\r\nGetFilePathFromUser(NULL) :";
sDebug += GetFilePathFromUser(NULL);
MessageBox(NULL, sDebug.c_str(), MSG_BOX_TITEL, MB_OK);
@@ -178,9 +178,9 @@ tstring sGetErrorString(DWORD dwError) // ...
// Display the string.
tstring ret = (LPCTSTR)lpMsgBuf;
- ReplaceAll(ret, _T("\r"), _T(" "));
- ReplaceAll(ret, _T("\n"), _T(" "));
- ReplaceAll(ret, _T(" "), _T(" "));
+ ReplaceAll(ret, L"\r", L" ");
+ ReplaceAll(ret, L"\n", L" ");
+ ReplaceAll(ret, L" ", L" ");
// Free the buffer.
LocalFree(lpMsgBuf);
@@ -198,7 +198,7 @@ void DisplayLastError(const TCHAR *pszError) DWORD error = GetLastError();
TCHAR szTemp[50];
- mir_sntprintf(szTemp, _T("\r\nErrorCode: %d\r\n"), error);
+ mir_sntprintf(szTemp, L"\r\nErrorCode: %d\r\n", error);
sError += szTemp;
sError += sGetErrorString(error);
MessageBox(NULL, sError.c_str(), MSG_BOX_TITEL, MB_OK);
@@ -465,13 +465,13 @@ bool bReadMirandaDirAndPath() {
TCHAR szDBPath[MAX_PATH], tmp[MAX_PATH];
mir_tstrcpy(szDBPath, pszDbPathError);
- PathToAbsoluteT(_T("miranda32.exe"), tmp);
+ PathToAbsoluteT(L"miranda32.exe", tmp);
sMirandaPath = tmp;
- sMirandaPath.erase(sMirandaPath.find_last_of(_T("\\")));
+ sMirandaPath.erase(sMirandaPath.find_last_of(L"\\"));
CallService(MS_DB_GETPROFILEPATHT, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
sDBPath = szDBPath;
CallService(MS_DB_GETPROFILENAMET, (WPARAM)MAX_PATH - 1, (LPARAM)szDBPath);
- sDBPath.append(_T("\\")).append(szDBPath);
+ sDBPath.append(L"\\").append(szDBPath);
sDBPath.erase(sDBPath.size() - 4);
return true;
}
@@ -491,7 +491,7 @@ bool bReadMirandaDirAndPath() void ReplaceDBPath(tstring &sRet)
{
- ReplaceAll(sRet, _T("%dbpath%"), sDBPath);
+ ReplaceAll(sRet, L"%dbpath%", sDBPath);
// Try to firure out if it is a relative path ( ..\..\MsgExport\ )
if (sRet.size() <= 2 || !(sRet[1] == ':' ||
(sRet[0] == '\\' && sRet[1] == '\\'))) {
@@ -520,7 +520,7 @@ tstring GetFilePathFromUser(MCONTACT hContact) {
tstring sFilePath = sExportDir + _DBGetString(hContact, MODULE, "FileName", sDefaultFile.c_str());
- bool bNickUsed = sFilePath.find(_T("%nick%")) != string::npos;
+ bool bNickUsed = sFilePath.find(L"%nick%") != string::npos;
ReplaceDefines(hContact, sFilePath);
@@ -530,7 +530,7 @@ tstring GetFilePathFromUser(MCONTACT hContact) ReplaceDBPath(sFilePath);
// Previous file name check to see if it has changed !!
- tstring sPrevFileName = _DBGetString(hContact, MODULE, "PrevFileName", _T(""));
+ tstring sPrevFileName = _DBGetString(hContact, MODULE, "PrevFileName", L"");
if (sNoDBPath != sPrevFileName) {
if (!sPrevFileName.empty()) {
ReplaceDBPath(sPrevFileName);
@@ -619,7 +619,7 @@ tstring FileNickFromHandle(MCONTACT hContact) {
tstring ret = pcli->pfnGetContactDisplayName(hContact, 0);
string::size_type nCur = 0;
- while ((nCur = ret.find_first_of(_T(":\\"), nCur)) != ret.npos)
+ while ((nCur = ret.find_first_of(L":\\", nCur)) != ret.npos)
ret[nCur] = cBadCharReplace;
return ret;
}
@@ -664,13 +664,13 @@ void ReplaceAllNoColon(tstring &sSrc, const TCHAR *pszReplace, tstring &sNew) void ReplaceDefines(MCONTACT hContact, tstring & sTarget)
{
- if (sTarget.find(_T("%nick%")) != string::npos)
- ReplaceAll(sTarget, _T("%nick%"), FileNickFromHandle(hContact));
+ if (sTarget.find(L"%nick%") != string::npos)
+ ReplaceAll(sTarget, L"%nick%", FileNickFromHandle(hContact));
- bool bUINUsed = sTarget.find(_T("%UIN%")) != string::npos;
- bool bEMailUsed = sTarget.find(_T("%e-mail%")) != string::npos;
- bool bProtoUsed = sTarget.find(_T("%protocol%")) != string::npos;
- bool bIdentifierUsed = sTarget.find(_T("%identifier%")) != string::npos;
+ bool bUINUsed = sTarget.find(L"%UIN%") != string::npos;
+ bool bEMailUsed = sTarget.find(L"%e-mail%") != string::npos;
+ bool bProtoUsed = sTarget.find(L"%protocol%") != string::npos;
+ bool bIdentifierUsed = sTarget.find(L"%identifier%") != string::npos;
if (bUINUsed || bEMailUsed || bProtoUsed || bIdentifierUsed) {
string sProto = _DBGetStringA(hContact, "Protocol", "p", "");
@@ -679,63 +679,63 @@ void ReplaceDefines(MCONTACT hContact, tstring & sTarget) tstring sReplaceUin;
if (dwUIN) {
TCHAR sTmp[20];
- mir_sntprintf(sTmp, _T("%d"), dwUIN);
+ mir_sntprintf(sTmp, L"%d", dwUIN);
sReplaceUin = sTmp;
}
else sReplaceUin = FileNickFromHandle(hContact);
if (bUINUsed)
- ReplaceAll(sTarget, _T("%UIN%"), sReplaceUin);
+ ReplaceAll(sTarget, L"%UIN%", sReplaceUin);
if (bIdentifierUsed && sProto == "ICQ") {
bIdentifierUsed = false;
- ReplaceAll(sTarget, _T("%identifier%"), sReplaceUin);
+ ReplaceAll(sTarget, L"%identifier%", sReplaceUin);
}
}
if (bEMailUsed || (bIdentifierUsed && sProto == "MSN")) {
- tstring sEMail = _DBGetString(hContact, sProto.c_str(), "e-mail", _T(""));
+ tstring sEMail = _DBGetString(hContact, sProto.c_str(), "e-mail", L"");
if (sEMail.empty()) {
- sEMail = _DBGetString(hContact, "MSN", "e-mail", _T(""));
+ sEMail = _DBGetString(hContact, "MSN", "e-mail", L"");
if (sEMail.empty()) {
// We can't finde the E-mail address we will use the the nick
sEMail = FileNickFromHandle(hContact);
}
}
if (bEMailUsed)
- ReplaceAllNoColon(sTarget, _T("%e-mail%"), sEMail);
+ ReplaceAllNoColon(sTarget, L"%e-mail%", sEMail);
if (bIdentifierUsed && sProto == "MSN") {
bIdentifierUsed = false;
- ReplaceAllNoColon(sTarget, _T("%identifier%"), sEMail);
+ ReplaceAllNoColon(sTarget, L"%identifier%", sEMail);
}
}
if (bIdentifierUsed && sProto == "Jabber") {
- tstring sReplace = _DBGetString(hContact, "Jabber", "jid", _T(""));
+ tstring sReplace = _DBGetString(hContact, "Jabber", "jid", L"");
if (sReplace.empty()) {
sReplace = FileNickFromHandle(hContact);
}
bIdentifierUsed = false;
- ReplaceAll(sTarget, _T("%identifier%"), sReplace);
+ ReplaceAll(sTarget, L"%identifier%", sReplace);
}
if (bProtoUsed) {
- tstring tmp = _DBGetString(hContact, "Protocol", "p", _T(""));
- ReplaceAllNoColon(sTarget, _T("%protocol%"), tmp);
+ tstring tmp = _DBGetString(hContact, "Protocol", "p", L"");
+ ReplaceAllNoColon(sTarget, L"%protocol%", tmp);
}
if (bIdentifierUsed) // It has still not been replaced we will just use nick
- ReplaceAll(sTarget, _T("%nick%"), FileNickFromHandle(hContact));
+ ReplaceAll(sTarget, L"%nick%", FileNickFromHandle(hContact));
}
- if (sTarget.find(_T("%group%")) != string::npos) {
- tstring sGroup = _DBGetString(hContact, "CList", "Group", _T(""));
- ReplaceAllNoColon(sTarget, _T("%group%"), sGroup);
+ if (sTarget.find(L"%group%") != string::npos) {
+ tstring sGroup = _DBGetString(hContact, "CList", "Group", L"");
+ ReplaceAllNoColon(sTarget, L"%group%", sGroup);
}
// We can't replace the : here because if the user uses C:\... in the file path
// this will also be replaced
string::size_type nCur = 0;
- while ((nCur = sTarget.find_first_of(_T("/*?<>|\""), nCur)) != sTarget.npos)
+ while ((nCur = sTarget.find_first_of(L"/*?<>|\"", nCur)) != sTarget.npos)
sTarget[nCur] = cBadCharReplace;
}
@@ -754,19 +754,19 @@ void ReplaceDefines(MCONTACT hContact, tstring & sTarget) void ReplaceTimeVariables(tstring &sRet)
{
- if (sRet.find(_T("%year%")) != string::npos ||
- sRet.find(_T("%month%")) != string::npos ||
- sRet.find(_T("%day%")) != string::npos) {
+ if (sRet.find(L"%year%") != string::npos ||
+ sRet.find(L"%month%") != string::npos ||
+ sRet.find(L"%day%") != string::npos) {
SYSTEMTIME stTime;
GetLocalTime(&stTime);
TCHAR sTmp[20];
- mir_sntprintf(sTmp, _T("%d"), stTime.wYear);
- ReplaceAll(sRet, _T("%year%"), sTmp);
- mir_sntprintf(sTmp, _T("%.2d"), stTime.wMonth);
- ReplaceAll(sRet, _T("%month%"), sTmp);
- mir_sntprintf(sTmp, _T("%.2d"), stTime.wDay);
- ReplaceAll(sRet, _T("%day%"), sTmp);
+ mir_sntprintf(sTmp, L"%d", stTime.wYear);
+ ReplaceAll(sRet, L"%year%", sTmp);
+ mir_sntprintf(sTmp, L"%.2d", stTime.wMonth);
+ ReplaceAll(sRet, L"%month%", sTmp);
+ mir_sntprintf(sTmp, L"%.2d", stTime.wDay);
+ ReplaceAll(sRet, L"%day%", sTmp);
}
}
@@ -821,7 +821,7 @@ void DisplayErrorDialog(const TCHAR *pszError, tstring& sFilePath, DBEVENTINFO * if (MessageBox(NULL, sError.c_str(), MSG_BOX_TITEL, MB_YESNO) == IDYES) {
OPENFILENAME ofn; // common dialog box structure
TCHAR szFile[260]; // buffer for file name
- mir_tstrcpy(szFile, _T("DebugInfo.txt"));
+ mir_tstrcpy(szFile, L"DebugInfo.txt");
// Initialize OPENFILENAME
memset(&ofn, 0, sizeof(OPENFILENAME));
@@ -835,7 +835,7 @@ void DisplayErrorDialog(const TCHAR *pszError, tstring& sFilePath, DBEVENTINFO * ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = 0 /*OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST*/;
- ofn.lpstrDefExt = _T("TXT");
+ ofn.lpstrDefExt = L"TXT";
// Display the Open dialog box.
if (GetSaveFileName(&ofn)) {
@@ -903,8 +903,8 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) string::size_type nFirstColumnWidth;
if (bUseLessAndGreaterInExport) {
- sLocalUser = _T("<<");
- sRemoteUser = _T(">>");
+ sLocalUser = L"<<";
+ sRemoteUser = L">>";
nFirstColumnWidth = 4;
}
else {
@@ -945,7 +945,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) return;
}
}
- tstring output = _T("------------------------------------------------\r\n")
+ tstring output = L"------------------------------------------------\r\n"
LPGENT(" History for\r\n")
LPGENT("User : %User%\r\n")
LPGENT("Protocol : %Proto%\r\n")
@@ -961,28 +961,28 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) LPGENT("Phone : %Phone%\r\n")
LPGENT("Homepage : %Homepage%\r\n")
LPGENT("- About -\r\n%About%\r\n")
- _T("------------------------------------------------\r\n");
+ L"------------------------------------------------\r\n";
// This is written this way because I expect this will become a string the user may set
// in the options dialog.
- ReplaceAll(output, _T("%User%"), sRemoteUser);
+ ReplaceAll(output, L"%User%", sRemoteUser);
string sProto = _DBGetStringA(hContact, "Protocol", "p", "");
- ReplaceAll(output, _T("%Proto%"), _DBGetString(hContact, "Protocol", "p", _T("")));
+ ReplaceAll(output, L"%Proto%", _DBGetString(hContact, "Protocol", "p", L""));
for (int nCur = 0; nCur < 9; nCur++)
- ReplaceAll(output, pszReplaceList[nCur], _DBGetString(hContact, sProto.c_str(), pszReplaceListA[nCur], _T("")));
+ ReplaceAll(output, pszReplaceList[nCur], _DBGetString(hContact, sProto.c_str(), pszReplaceListA[nCur], L""));
ptrT id(Contact_GetInfo(CNF_UNIQUEID, hContact, sProto.c_str()));
if (id != NULL)
- ReplaceAll(output, _T("%UIN%"), id);
+ ReplaceAll(output, L"%UIN%", id);
- mir_sntprintf(szTemp, _T("%d"), db_get_w(hContact, sProto.c_str(), "Age", 0));
- ReplaceAll(output, _T("%Age%"), szTemp);
+ mir_sntprintf(szTemp, L"%d", db_get_w(hContact, sProto.c_str(), "Age", 0));
+ ReplaceAll(output, L"%Age%", szTemp);
szTemp[0] = (TCHAR)db_get_b(hContact, sProto.c_str(), "Gender", 0);
szTemp[1] = 0;
- ReplaceAll(output, _T("%Gender%"), szTemp);
+ ReplaceAll(output, L"%Gender%", szTemp);
if (!bWriteTextToFile(hFile, output.data(), bWriteUTF8Format, (int)output.size())) {
DisplayErrorDialog(LPGENT("Failed to write user details to file :\n"), sFilePath, NULL);
@@ -993,7 +993,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) }
// Get time stamp
- int nIndent = mir_sntprintf(szTemp, _T("%-*s"), nFirstColumnWidth, dbei.flags & DBEF_SENT ? sLocalUser.c_str() : sRemoteUser.c_str());
+ int nIndent = mir_sntprintf(szTemp, L"%-*s", nFirstColumnWidth, dbei.flags & DBEF_SENT ? sLocalUser.c_str() : sRemoteUser.c_str());
TimeZone_ToStringT(dbei.timestamp, sTimeFormat.c_str(), &szTemp[nIndent], _countof(szTemp) - nIndent - 2);
@@ -1103,7 +1103,7 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) bWriteNewLine(hFile, nIndent) &&
bWriteTextToFile(hFile, LPGENT("UIN :"), bWriteUTF8Format)) {
DWORD uin = *((PDWORD)(dbei.pBlob));
- int n = mir_sntprintf(szTemp, _T("%d"), uin);
+ int n = mir_sntprintf(szTemp, L"%d", uin);
if (bWriteTextToFile(hFile, szTemp, bWriteUTF8Format, n)) {
char *pszEnd = (char *)(dbei.pBlob + dbei.cbSize);
for (int i = 0; i < nStringCount && pszCurBlobPos < pszEnd; i++) {
@@ -1157,10 +1157,10 @@ void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei) bWriteTextToFile(hFile, &pszStr[nMsgLenght], bWriteUTF8Format, (int)nFriendlyLen);
size_t nEmailOffset = nMsgLenght + nFriendlyLen + 1;
if (nEmailOffset < dbei.cbBlob) {
- bWriteTextToFile(hFile, _T("<"), bWriteUTF8Format);
+ bWriteTextToFile(hFile, L"<", bWriteUTF8Format);
size_t nEmailLen = mir_strlen(&pszStr[nEmailOffset]);
bWriteTextToFile(hFile, &pszStr[nEmailOffset], bWriteUTF8Format, (int)nEmailLen);
- bWriteTextToFile(hFile, _T(">"), bWriteUTF8Format);
+ bWriteTextToFile(hFile, L">", bWriteUTF8Format);
}
}
else bWriteTextToFile(hFile, LPGENT("No from address"), bWriteUTF8Format);
@@ -1326,7 +1326,7 @@ bool bWriteIndentedToFile(HANDLE hFile, int nIndent, const TCHAR *pszSrc, bool b if (pszPrev == pszSrc) {
// this is an programming error we have not moved forward in string
- MessageBox(NULL, _T("Programming error on line __LINE__ please report this"), MSG_BOX_TITEL, MB_OK);
+ MessageBox(NULL, L"Programming error on line __LINE__ please report this", MSG_BOX_TITEL, MB_OK);
break;
}
}
@@ -1380,14 +1380,14 @@ int nContactDeleted(WPARAM wparam, LPARAM /*lparam*/) CloseHandle(hPrevFile);
TCHAR szTemp[500];
- mir_sntprintf(szTemp, _T("%s\r\n%s"),
+ mir_sntprintf(szTemp, L"%s\r\n%s",
TranslateT("User has been deleted. Do you want to delete the file?"), sFilePath.c_str());
if (enDeleteAction == eDAAutomatic ||
MessageBox(NULL, szTemp, MSG_BOX_TITEL, MB_YESNO) == IDYES) {
if (!DeleteFile(sFilePath.c_str())) {
mir_sntprintf(szTemp,
- _T("%s\r\n%s"),
+ L"%s\r\n%s",
TranslateT("Failed to delete the file"),
sFilePath.c_str());
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 39132d8121..838c398f46 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -134,7 +134,7 @@ int Protocol::GetStatus() else {
TCHAR *p = (tszXStatusName[0] != 0) ? TranslateTS(tszXStatusName) : TranslateT("<no status name>");
if (tszXStatusMessage[0])
- mir_sntprintf(status_name, _T("%s: %s"), p, tszXStatusMessage);
+ mir_sntprintf(status_name, L"%s: %s", p, tszXStatusMessage);
else
lcopystr(status_name, p, _countof(status_name));
}
@@ -212,14 +212,14 @@ bool Protocol::CanSetStatusMsg(int aStatus) void Protocol::GetStatusMsg(int aStatus, TCHAR *msg, size_t msg_size)
{
if (!CanGetStatusMsg())
- lcopystr(msg, _T(""), msg_size);
+ lcopystr(msg, L"", msg_size);
else if (aStatus == status && ProtoServiceExists(name, PS_GETMYAWAYMSG)) {
ptrT tmp((TCHAR *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
- lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
+ lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
ptrT tmp((TCHAR *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, (LPARAM)name));
- lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
+ lcopystr(msg, tmp == NULL ? L"" : tmp, msg_size);
}
}
@@ -287,7 +287,7 @@ int Protocol::GetNickMaxLength() TCHAR* Protocol::GetNick()
{
ptrT nick(Contact_GetInfo(CNF_DISPLAY, NULL, name));
- lcopystr(nickname, (nick != NULL) ? nick : _T(""), _countof(nickname));
+ lcopystr(nickname, (nick != NULL) ? nick : L"", _countof(nickname));
return nickname;
}
@@ -338,13 +338,13 @@ bool Protocol::ListeningToEnabled() TCHAR *Protocol::GetListeningTo()
{
if (!CanGetListeningTo()) {
- lcopystr(listening_to, _T(""), _countof(listening_to));
+ lcopystr(listening_to, L"", _countof(listening_to));
return listening_to;
}
DBVARIANT dbv = { 0 };
if (db_get_ts(NULL, name, "ListeningTo", &dbv)) {
- lcopystr(listening_to, _T(""), _countof(listening_to));
+ lcopystr(listening_to, L"", _countof(listening_to));
return listening_to;
}
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index ee63734e94..e5a19095d5 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA. // Prototypes /////////////////////////////////////////////////////////////////////////////////////
#define WINDOW_NAME_PREFIX "mydetails_window"
-#define WINDOW_CLASS_NAME _T("MyDetailsFrame")
-#define CONTAINER_CLASS_NAME _T("MyDetailsFrameContainer")
+#define WINDOW_CLASS_NAME L"MyDetailsFrame"
+#define CONTAINER_CLASS_NAME L"MyDetailsFrameContainer"
#define ID_FRAME_TIMER 1011
#define ID_RECALC_TIMER 1012
@@ -33,9 +33,9 @@ Boston, MA 02111-1307, USA. #define IDC_HAND MAKEINTRESOURCE(32649)
-#define DEFAULT_NICKNAME _T("<no nickname>")
-#define DEFAULT_STATUS_MESSAGE _T("<no status message>")
-#define DEFAULT_LISTENING_TO _T("<nothing playing>")
+#define DEFAULT_NICKNAME L"<no nickname>"
+#define DEFAULT_STATUS_MESSAGE L"<no status message>"
+#define DEFAULT_LISTENING_TO L"<nothing playing>"
// Messages
@@ -246,7 +246,7 @@ int CreateFrame() font_id[i].deffontsettings.size = -MulDiv(font_sizes[i], GetDeviceCaps(hdc, LOGPIXELSY), 72);
font_id[i].deffontsettings.style = font_styles[i];
font_id[i].deffontsettings.charset = DEFAULT_CHARSET;
- mir_tstrncpy(font_id[i].deffontsettings.szFace, _T("Tahoma"), _countof(font_id[i].deffontsettings.szFace));
+ mir_tstrncpy(font_id[i].deffontsettings.szFace, L"Tahoma", _countof(font_id[i].deffontsettings.szFace));
font_id[i].order = i;
font_id[i].flags = FIDF_DEFAULTVALID;
FontRegisterT(&font_id[i]);
@@ -444,7 +444,7 @@ RECT GetRect(HDC hdc, RECT rc, SIZE s, UINT uFormat, int next_top, int text_left uFormat &= ~DT_END_ELLIPSIS;
RECT rc_tmp = rc;
- DrawText(hdc, _T(" ..."), 4, &rc_tmp, DT_CALCRECT | uFormat);
+ DrawText(hdc, L" ...", 4, &rc_tmp, DT_CALCRECT | uFormat);
s.cx += rc_tmp.right - rc_tmp.left;
}
@@ -747,7 +747,7 @@ void CalcRectangles(HWND hwnd) if (opts.show_protocol_cycle_button)
tmp_r.right -= 2 * ICON_SIZE;
- data->proto_rect = GetRect(hdc, tmp_r, proto->description, _T(""), proto, uFormat, next_top, tmp_text_left, false, true, false);
+ data->proto_rect = GetRect(hdc, tmp_r, proto->description, L"", proto, uFormat, next_top, tmp_text_left, false, true, false);
if (opts.show_protocol_cycle_button) {
data->draw_proto_cycle = true;
@@ -1055,7 +1055,7 @@ void DrawTextWithRect(HDC hdc, const TCHAR *text, const TCHAR *def_text, RECT rc uFormat &= ~DT_END_ELLIPSIS;
rc_tmp = r;
- text_height = DrawText(hdc, _T(" ..."), 4, &rc_tmp, DT_CALCRECT | uFormat);
+ text_height = DrawText(hdc, L" ...", 4, &rc_tmp, DT_CALCRECT | uFormat);
rc_tmp.top += (r.bottom - r.top - text_height) >> 1;
rc_tmp.bottom = rc_tmp.top + text_height;
@@ -1076,7 +1076,7 @@ void DrawTextWithRect(HDC hdc, const TCHAR *text, const TCHAR *def_text, RECT rc DRAW_TEXT(hdc, tmp2, (int)mir_tstrlen(tmp2), &r, uFormat, proto->name);
if (mouse_over)
- DrawText(hdc, _T(" ..."), 4, &rc_tmp, uFormat);
+ DrawText(hdc, L" ...", 4, &rc_tmp, uFormat);
SelectClipRgn(hdc, NULL);
DeleteObject(rgn);
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index 33f9bc22ee..dff4fa7a04 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -34,7 +34,7 @@ CIconList g_IconList; // Set window size and center its controls
void MySetPos(HWND hwndParent)
{
- HWND hWndTab = FindWindowEx(GetParent(hwndParent), NULL, _T("SysTabControl32"), _T(""));
+ HWND hWndTab = FindWindowEx(GetParent(hwndParent), NULL, L"SysTabControl32", L"");
if (!hWndTab) {
_ASSERT(0);
return;
@@ -201,10 +201,10 @@ static INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LP ChangeLock++;
if (!(pnm->ItemNew->Flags & TIF_ROOTITEM)) {
SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title);
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? _T("") : ((CTreeItem*)pnm->ItemNew)->User_Str1);
+ SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? L"" : ((CTreeItem*)pnm->ItemNew)->User_Str1);
}
else {
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, L"");
if (pnm->ItemNew->ID == g_Messages_RecentRootID)
SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("Your most recent status messages are placed in this category. It's not recommended that you put your messages manually here, as they'll be replaced by your recent messages."));
else {
@@ -519,8 +519,8 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int Meaning;
}
static IdleComboValues[] = {
- _T("Windows"), AUTOREPLY_IDLE_WINDOWS,
- _T("Miranda"), AUTOREPLY_IDLE_MIRANDA
+ L"Windows", AUTOREPLY_IDLE_WINDOWS,
+ L"Miranda", AUTOREPLY_IDLE_MIRANDA
};
for (int i = 0; i < _countof(IdleComboValues); i++)
@@ -552,7 +552,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l IDC_MOREOPTDLG_EVNTURL, LPGENT("URL"),
IDC_MOREOPTDLG_EVNTFILE, LPGENT("File")
};
- hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL);
+ hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL);
TOOLINFO ti = { 0 };
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
@@ -756,10 +756,10 @@ INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ChangeLock++;
if (!(pnm->ItemNew->Flags & TIF_ROOTITEM)) {
SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title);
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? _T("") : ((CTreeItem*)pnm->ItemNew)->User_Str1);
+ SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? L"" : ((CTreeItem*)pnm->ItemNew)->User_Str1);
}
else {
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, L"");
if (pnm->ItemNew->ID == g_Messages_RecentRootID)
SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("Your most recent status messages are placed in this category. It's not recommended that you put your messages manually here, as they'll be replaced by your recent messages."));
else {
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index daf06ea463..f5f291c59b 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -162,7 +162,7 @@ int StatusMsgReq(WPARAM wParam, LPARAM lParam, CString &szProto) return 0;
}
if (CContactSettings(iMode, hContactForSettings).Ignore) {
- CallAllowedPS_SETAWAYMSG(szProto, iMode, _T("")); // currently NULL makes ICQ to ignore _any_ further status message requests until the next PS_SETAWAYMSG, so i can't use it here..
+ CallAllowedPS_SETAWAYMSG(szProto, iMode, L""); // currently NULL makes ICQ to ignore _any_ further status message requests until the next PS_SETAWAYMSG, so i can't use it here..
return 0; // move along, sir
}
@@ -288,7 +288,7 @@ int CSStatusChange(WPARAM wParam, LPARAM lParam) // CommonStatus plugins (Startu for (int i = 0; i < lParam; i++) {
LogMessage("%d: cbSize=%d, szProto=%s, status=%d, lastStatus=%d, szMsg:",
- i + 1, ps[i]->cbSize, ps[i]->szName ? (char*)ps[i]->szName : "NULL", ps[i]->status, ps[i]->lastStatus, ps[i]->szMsg ? ps[i]->szMsg : _T("NULL"));
+ i + 1, ps[i]->cbSize, ps[i]->szName ? (char*)ps[i]->szName : "NULL", ps[i]->status, ps[i]->lastStatus, ps[i]->szMsg ? ps[i]->szMsg : L"NULL");
if (ps[i]->status != ID_STATUS_DISABLED) {
if (ps[i]->status != ID_STATUS_CURRENT)
g_ProtoStates[ps[i]->szName].m_status = (ps[i]->status == ID_STATUS_LAST) ? ps[i]->lastStatus : ps[i]->status;
@@ -489,7 +489,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) ai->flags = AIF_DONTPARSE;
TCString Result;
if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) {
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].m_awaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : _T("H:mm"), Result.GetBuffer(256), 256);
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].m_awaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : L"H:mm", Result.GetBuffer(256), 256);
Result.ReleaseBuffer();
}
else if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) {
@@ -510,11 +510,11 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) Result = TranslateT("Stranger");
}
else if (!mir_tstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) {
- mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0));
+ mir_sntprintf(Result.GetBuffer(16), 16, L"%d", db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0));
Result.ReleaseBuffer();
}
else if (!mir_tstrcmp(ai->targv[0], VAR_MESSAGENUM)) {
- mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0));
+ mir_sntprintf(Result.GetBuffer(16), 16, L"%d", db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0));
Result.ReleaseBuffer();
}
else if (!mir_tstrcmp(ai->targv[0], VAR_TIMEPASSED)) {
@@ -566,7 +566,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (!szResult)
return NULL;
- mir_tstrcpy(szResult, (Result != NULL) ? Result : _T(""));
+ mir_tstrcpy(szResult, (Result != NULL) ? Result : L"");
return (INT_PTR)szResult;
}
@@ -726,13 +726,13 @@ extern "C" int __declspec(dllexport) Load(void) InitOptions(); // must be called before we hook CallService
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
- TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T(""));
+ TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", L"");
if (Str.GetLen())
- db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext")));
+ db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(L"nas_message", L"extratext"));
- Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T(""));
+ Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", L"");
if (Str.GetLen())
- db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext")));
+ db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(L"nas_message", L"extratext"));
}
if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index c08508db61..84c365fbb2 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -171,23 +171,23 @@ int ICQStatusToGeneralStatus(int bICQStat) TCString VariablesEscape(TCString Str)
{
if (!Str.GetLen()) {
- return _T("");
+ return L"";
}
enum eState
{
ST_TEXT, ST_QUOTE
};
eState State = ST_QUOTE;
- TCString Result(_T("`"));
+ TCString Result(L"`");
const TCHAR *p = Str;
while (*p) {
if (*p == '`') {
if (State == ST_TEXT) {
- Result += _T("````");
+ Result += L"````";
State = ST_QUOTE;
}
else {
- Result += _T("``");
+ Result += L"``";
}
}
else {
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index ce2d3f9a03..1f7d3dd17d 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -367,7 +367,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact) TVINSERTSTRUCT tvIns;
memset(&tvIns, 0, sizeof(tvIns));
- tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", _T("")));
+ tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", L""));
tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvIns.hInsertAfter = TVI_ROOT;
tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
@@ -379,7 +379,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact) // adds a new group if it doesn't exist yet; returns its hItem
HTREEITEM CCList::AddGroup(TCString GroupName)
{
- if (GroupName == _T(""))
+ if (GroupName == L"")
return TVI_ROOT;
MGROUP hGroupId = Clist_GroupExists(GroupName);
@@ -395,7 +395,7 @@ HTREEITEM CCList::AddGroup(TCString GroupName) tvIns.hParent = TVI_ROOT;
tvIns.item.pszText = _tcsrchr(GroupName, '\\');
if (tvIns.item.pszText) {
- TCString ParentGroupName(_T(""));
+ TCString ParentGroupName(L"");
tvIns.hParent = AddGroup(ParentGroupName.DiffCat(GroupName, tvIns.item.pszText));
tvIns.item.pszText++;
}
diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 0cb9c2674c..60ec54710c 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -272,7 +272,7 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM } while (hCurWnd && !GetWindowText(hCurWnd, WndTitle, 256));
WndTitle.ReleaseBuffer();
}
- if (!m_bModified || MessageBox(GetParent(hWnd), TCString(TranslateT("You've made changes to multiple message trees at a time.\r\nDo you want to leave changes in \"")) + WndTitle + TranslateT("\" dialog?\r\nPress Yes to leave changes in this dialog, or No to discard its changes and save changes of the other message tree instead."), WndTitle + _T(" - ") + TranslateT("New Away System"), MB_ICONQUESTION | MB_YESNO) == IDNO) {
+ if (!m_bModified || MessageBox(GetParent(hWnd), TCString(TranslateT("You've made changes to multiple message trees at a time.\r\nDo you want to leave changes in \"")) + WndTitle + TranslateT("\" dialog?\r\nPress Yes to leave changes in this dialog, or No to discard its changes and save changes of the other message tree instead."), WndTitle + L" - " + TranslateT("New Away System"), MB_ICONQUESTION | MB_YESNO) == IDNO) {
COptItem_TreeCtrl *TreeCtrl = dat->GetTreeCtrl();
TCString OldTitle, OldMsg, NewTitle, NewMsg;
int OldOrder = TreeCtrl->IDToOrder(TreeCtrl->GetSelectedItemID(GetParent(hWnd)));
@@ -294,13 +294,13 @@ LRESULT CALLBACK MsgTreeSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM NewMsg = ((CTreeItem*)nm.ItemNew)->User_Str1;
}
if (OldTitle.IsEmpty())
- OldTitle = _T(""); // to be sure that NULL will be equal to "" in the latter comparisons
+ OldTitle = L""; // to be sure that NULL will be equal to "" in the latter comparisons
if (OldMsg.IsEmpty())
- OldMsg = _T("");
+ OldMsg = L"";
if (NewTitle.IsEmpty())
- NewTitle = _T("");
+ NewTitle = L"";
if (NewMsg.IsEmpty())
- NewMsg = _T("");
+ NewMsg = L"";
if (OldTitle != (const TCHAR*)NewTitle || OldMsg != (const TCHAR*)NewMsg) {
// probably it's better to leave nm.ItemOld = NULL, to prevent accidental rewriting of it with old data from an edit control etc.
@@ -616,7 +616,7 @@ bool CMsgTree::DeleteSelectedItem() // returns true if the item was deleted CTreeItem* CMsgTree::AddCategory()
{
COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl();
- CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(_T(""), 0, 0, TIF_GROUP));
+ CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(L"", 0, 0, TIF_GROUP));
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_TEXT;
tvi.hItem = TreeItem->hItem;
@@ -635,7 +635,7 @@ CTreeItem* CMsgTree::AddCategory() CTreeItem* CMsgTree::AddMessage()
{
COptItem_TreeCtrl *TreeCtrl = GetTreeCtrl();
- CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(_T(""), 0, 0));
+ CTreeItem* TreeItem = TreeCtrl->InsertItem(GetParent(hTreeView), CTreeItem(L"", 0, 0));
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_TEXT;
tvi.hItem = TreeItem->hItem;
diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index 66f7160ccf..fdf0b5ebe0 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -53,7 +53,7 @@ static int CALLBACK MenuWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar static VOID CALLBACK ShowContactMenu(MCONTACT hContact)
{
POINT pt;
- HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), _T(MOD_NAME)_T("_MenuWindow"), 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
+ HWND hMenuWnd = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", _T(MOD_NAME)L"_MenuWindow", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInstance, NULL);
SetWindowLongPtr(hMenuWnd, GWLP_WNDPROC, (LONG_PTR)MenuWndProc);
HMENU hMenu = Menu_BuildContactMenu(hContact);
GetCursorPos(&pt);
@@ -66,7 +66,7 @@ static VOID CALLBACK ShowContactMenu(MCONTACT hContact) void ShowLog(TCString &LogFilePath)
{
- INT_PTR Result = (INT_PTR)ShellExecute(NULL, _T("open"), LogFilePath, NULL, NULL, SW_SHOW);
+ INT_PTR Result = (INT_PTR)ShellExecute(NULL, L"open", LogFilePath, NULL, NULL, SW_SHOW);
if (Result <= 32) {
TCHAR szError[64];
mir_sntprintf(szError, TranslateT("Error #%d"), Result);
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp index c6209078f9..aea2556676 100644 --- a/plugins/NewAwaySysMod/src/Options.cpp +++ b/plugins/NewAwaySysMod/src/Options.cpp @@ -283,7 +283,7 @@ int TreeReadEnum(const char *szSetting, LPARAM lParam) pItem.ParentID = ParentID;
pItem.Flags = Flags;
pItem.hItem = NULL;
- pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T(""));
+ pItem.Title = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L"");
pItem.User_Str1 = (pData->TreeCtrl->User_Str1_DBName == NULL) ? NULL :
db_get_s(NULL, pData->sModule,
*pData->sDBSettingPrefix + pData->TreeCtrl->sDBSetting + pData->TreeCtrl->User_Str1_DBName + (szSetting + Len), (TCHAR*)NULL);
@@ -660,7 +660,7 @@ int ListReadEnum(const char *szSetting, LPARAM lParam) int Len = pData->sDBSettingPrefix.GetLen() + pData->ListCtrl->sDBSetting.GetLen() + _countof(LISTITEM_DBSTR_TEXT) - 1;
if (!strncmp(szSetting, pData->sDBSettingPrefix + pData->ListCtrl->sDBSetting + LISTITEM_DBSTR_TEXT, Len) && isdigit(szSetting[Len])) {
int ID = atol(szSetting + Len);
- pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, _T(""));
+ pData->ListCtrl->m_value.SetAtGrow(ID).Text = db_get_s(NULL, pData->sModule, *pData->sDBSettingPrefix + szSetting, L"");
}
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/Options.h b/plugins/NewAwaySysMod/src/Options.h index 4e4481da8b..b22a0b902b 100644 --- a/plugins/NewAwaySysMod/src/Options.h +++ b/plugins/NewAwaySysMod/src/Options.h @@ -406,7 +406,7 @@ public: {
if (TreeFlags & TREECTRL_FLAG_IS_SINGLE_LEVEL) {
_ASSERT(!RootItems.GetSize()); // there can't be any root items when the tree is a plain list
- this->RootItems.AddElem(CTreeRootItem(_T(""), 0, TIF_EXPANDED)); // TODO??
+ this->RootItems.AddElem(CTreeRootItem(L"", 0, TIF_EXPANDED)); // TODO??
this->RootItems[0].hItem = TVI_ROOT;
}
}
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index 59ffb1fca7..8056306df5 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -188,7 +188,7 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) int i;
// try to find an identical message in the same group (to prevent saving multiple identical messages),
// or at least if we'll find an identical message somewhere else, then we'll use its title for our new message
- TCString Title(_T(""));
+ TCString Title(L"");
for (i = 0; i < TreeCtrl->m_value.GetSize(); i++) {
if (!(TreeCtrl->m_value[i].Flags & TIF_GROUP) && TreeCtrl->m_value[i].User_Str1 == (const TCHAR*)Message) {
if (TreeCtrl->m_value[i].ParentID == RecentGroupID) { // found it in the same group
@@ -204,13 +204,13 @@ void CProtoSettings::SetMsgFormat(int Flags, TCString Message) if (i == TreeCtrl->m_value.GetSize()) { // we didn't find an identical message in the same group, so we'll add our new message here
if (Title.IsEmpty()) { // didn't find a title for our message either
if (Message.GetLen() > MRM_MAX_GENERATED_TITLE_LEN)
- Title = Message.Left(MRM_MAX_GENERATED_TITLE_LEN - 3) + _T("...");
+ Title = Message.Left(MRM_MAX_GENERATED_TITLE_LEN - 3) + L"...";
else
Title = Message;
TCHAR *p = Title.GetBuffer();
while (*p) { // remove "garbage"
- if (!(p = _tcspbrk(p, _T("\r\n\t"))))
+ if (!(p = _tcspbrk(p, L"\r\n\t")))
break;
*p++ = ' ';
@@ -270,7 +270,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) if (Flags & GMF_PROTOORGLOBAL && Message == NULL) {
Message = CProtoSettings().GetMsgFormat(GMF_PERSONAL | (Flags & GMF_TEMPORARY), pOrder);
- return (Message == NULL) ? _T("") : Message; // global message can't be NULL
+ return (Message == NULL) ? L"" : Message; // global message can't be NULL
}
if (Flags & GMF_LASTORDEFAULT && Message == NULL) { // try to get the last or default message, depending on current settings
@@ -331,7 +331,7 @@ TCString CProtoSettings::GetMsgFormat(int Flags, int *pOrder) *pOrder = Order;
}
if (Message == NULL)
- Message = _T(""); // last or default message can't be NULL.. otherwise ICQ won't reply to status message requests and won't notify us of status message requests at all
+ Message = L""; // last or default message can't be NULL.. otherwise ICQ won't reply to status message requests and won't notify us of status message requests at all
}
return Message;
}
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 87d0a4f376..6d124b2157 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -384,7 +384,7 @@ void ApplySelContactsMessage(SetAwayMsgData* dat, CCList *CList, PTREEITEMARRAY }
else if (ItemType == MCLCIT_INFO) {
char *szProto = (char*)CList->GetItemParam(hItem);
- CProtoSettings(szProto).SetMsgFormat(SMF_PERSONAL, (szProto || Message != NULL) ? Message : _T("")); // "szProto || Message != NULL..." means that we'll set an empty message instead of NULL for the global status, if the message is empty (NULL for the global status has a special meaning - SetMsgFormat will set the default message instead of NULL)
+ CProtoSettings(szProto).SetMsgFormat(SMF_PERSONAL, (szProto || Message != NULL) ? Message : L""); // "szProto || Message != NULL..." means that we'll set an empty message instead of NULL for the global status, if the message is empty (NULL for the global status has a special meaning - SetMsgFormat will set the default message instead of NULL)
}
else continue;
@@ -395,7 +395,7 @@ void ApplySelContactsMessage(SetAwayMsgData* dat, CCList *CList, PTREEITEMARRAY if (dat->hInitContact)
CContactSettings(0, dat->hInitContact).SetMsgFormat(SMF_PERSONAL, Message);
else
- CProtoSettings(dat->szProtocol).SetMsgFormat(SMF_PERSONAL, (dat->szProtocol || Message != NULL) ? Message : _T(""));
+ CProtoSettings(dat->szProtocol).SetMsgFormat(SMF_PERSONAL, (dat->szProtocol || Message != NULL) ? Message : L"");
}
SendDlgItemMessage(hwndDlg, IDC_SAWAYMSG_MSGDATA, EM_SETMODIFY, false, 0);
SetDlgItemText(hwndDlg, IDC_OK, TranslateT("OK"));
@@ -603,7 +603,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // init tooltips
TOOLINFO ti = { 0 };
- hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL);
+ hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.mir"), NULL);
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
for (int i = 0; i < _countof(Tooltips); i++) {
@@ -723,12 +723,12 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (!MessageDetermined) {
TCString CurMessage((ItemType == MCLCIT_CONTACT) ? CContactSettings(0, hContact).GetMsgFormat(GMF_PERSONAL) : CProtoSettings(szProto).GetMsgFormat(GMF_TEMPORARY | GMF_PERSONAL));
if (CurMessage == NULL)
- CurMessage = _T("");
+ CurMessage = L"";
if (Message == NULL)
Message = CurMessage;
else if (CurMessage != (const TCHAR*)Message) {
- Message = _T("");
+ Message = L"";
BtnTitle = TranslateT("Apply");
MessageDetermined = true;
}
@@ -750,11 +750,11 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA }
if (!bLeaveOldMessage)
- SetDlgItemText(hwndDlg, IDC_SAWAYMSG_MSGDATA, (Message == NULL) ? _T("") : Message);
+ SetDlgItemText(hwndDlg, IDC_SAWAYMSG_MSGDATA, (Message == NULL) ? L"" : Message);
SetDlgItemText(hwndDlg, IDC_OK, BtnTitle);
TCString WindowTitle(TranslateT("Set message for"));
- WindowTitle += _T(" \"");
+ WindowTitle += L" \"";
WindowTitle += Status ? pcli->pfnGetStatusModeDescription(Status, 0) : TranslateT("Statuses");
if (nNewContacts == 1) {
WindowTitle += TCString(TranslateT("\" ("));
@@ -782,34 +782,34 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (hContact) {
if (IsAnICQProto(GetContactProto(hContact))) {
WindowTitle += TranslateT("message for");
- WindowTitle += _T(" ");
+ WindowTitle += L" ";
}
else {
WindowTitle += TranslateT("for");
- WindowTitle += _T(" ");
+ WindowTitle += L" ";
}
WindowTitle += pcli->pfnGetContactDisplayName(hContact, 0);
if (!IsAnICQProto(GetContactProto(hContact))) {
- WindowTitle += _T(" ");
+ WindowTitle += L" ";
WindowTitle += TranslateT("available autoreply only");
- WindowTitle += _T(")");
+ WindowTitle += L")";
}
- else WindowTitle += _T(")");
+ else WindowTitle += L")";
}
else {
if (!szProto) {
WindowTitle += TranslateT("all accounts");
- WindowTitle += _T(")");
+ WindowTitle += L")";
}
else {
PROTOACCOUNT *acc = Proto_GetAccount(szProto);
WindowTitle += acc->tszAccountName;
- WindowTitle += _T(")");
+ WindowTitle += L")";
}
}
}
- else WindowTitle += _T("\"");
+ else WindowTitle += L"\"";
SetWindowText(hwndDlg, WindowTitle);
}
@@ -872,7 +872,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // don't forget to change Recent Message Save loop in the UM_SAM_APPLYANDCLOSE if you're changing something here
if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
PROTOACCOUNT * acc = Proto_GetAccount(p->szModuleName);
- hItem = CList->AddInfo(TCString(_T("* ")) + acc->tszAccountName + _T(" *"), CLC_ROOT, hItem, (LPARAM)p->szModuleName, Skin_LoadProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].m_status));
+ hItem = CList->AddInfo(TCString(L"* ") + acc->tszAccountName + L" *", CLC_ROOT, hItem, (LPARAM)p->szModuleName, Skin_LoadProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].m_status));
if (dat->szProtocol && !mir_strcmp(p->szModuleName, dat->szProtocol))
hSelItem = hItem;
}
diff --git a/plugins/NewAwaySysMod/src/stdafx.h b/plugins/NewAwaySysMod/src/stdafx.h index 37a3c6185a..d22135d6a1 100644 --- a/plugins/NewAwaySysMod/src/stdafx.h +++ b/plugins/NewAwaySysMod/src/stdafx.h @@ -76,15 +76,15 @@ #define CBSSTATE_PRESSED 2
#define CBSSTATE_DISABLED 3
-#define VAR_AWAYSINCE_TIME _T("nas_awaysince_time")
-#define VAR_AWAYSINCE_DATE _T("nas_awaysince_date")
-#define VAR_STATDESC _T("nas_statdesc")
-#define VAR_MYNICK _T("nas_mynick")
-#define VAR_REQUESTCOUNT _T("nas_requestcount")
-#define VAR_MESSAGENUM _T("nas_messagecount")
-#define VAR_TIMEPASSED _T("nas_timepassed")
-#define VAR_PREDEFINEDMESSAGE _T("nas_predefinedmessage")
-#define VAR_PROTOCOL _T("nas_protocol")
+#define VAR_AWAYSINCE_TIME L"nas_awaysince_time"
+#define VAR_AWAYSINCE_DATE L"nas_awaysince_date"
+#define VAR_STATDESC L"nas_statdesc"
+#define VAR_MYNICK L"nas_mynick"
+#define VAR_REQUESTCOUNT L"nas_requestcount"
+#define VAR_MESSAGENUM L"nas_messagecount"
+#define VAR_TIMEPASSED L"nas_timepassed"
+#define VAR_PREDEFINEDMESSAGE L"nas_predefinedmessage"
+#define VAR_PROTOCOL L"nas_protocol"
#define SENDSMSG_EVENT_MSG 0x1
#define SENDSMSG_EVENT_URL 0x2
@@ -180,7 +180,7 @@ #define DB_SENDCOUNT "SendCount"
#define MESSAGES_DB_MSGTREEDEF "MsgTreeDef"
-#define MSGTREE_RECENT_OTHERGROUP _T("Other")
+#define MSGTREE_RECENT_OTHERGROUP L"Other"
// GetMsgFormat flags
#define GMF_PERSONAL 1 // is also used to get global status message, when hContact = NULL (szProto = NULL)
@@ -300,7 +300,7 @@ void InitOptions(); // called once when plugin is loaded //int ShowPopupNotification(COptPage &PopupNotifyData, MCONTACT hContact, int iStatusMode);
void ShowLog(TCString &LogFilePath);
-void ShowMsg(TCHAR *szFirstLine, TCHAR *szSecondLine = _T(""), bool IsErrorMsg = false, int Timeout = 0);
+void ShowMsg(TCHAR *szFirstLine, TCHAR *szSecondLine = L"", bool IsErrorMsg = false, int Timeout = 0);
#define AWAYSYS_STATUSMSGREQUEST_SOUND "AwaySysStatusMsgRequest"
#define ME_AWAYSYS_WORKAROUND "AwaySys/_CallService"
@@ -325,7 +325,7 @@ static __inline int LogMessage(const char *Format, ...) __inline int CallAllowedPS_SETAWAYMSG(const char *szProto, int iMode, const TCHAR *szMsg)
{ // we must use this function everywhere we want to call PS_SETAWAYMSG, otherwise NAS won't allow to change the message!
- LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%S", szProto, iMode, szMsg ? szMsg : _T("NULL"));
+ LogMessage("PS_SETAWAYMSG called by NAS. szProto=%s, Status=%d, Msg:\n%S", szProto, iMode, szMsg ? szMsg : L"NULL");
return CallProtoService(szProto, PS_SETAWAYMSG, iMode, (LPARAM)szMsg);
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 8cb098af19..2202d1de62 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -538,14 +538,14 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) SetTimer(pdata->hWnd, TIMER_TO_ACTION, pdata->iSeconds * 1000, NULL);
}
- TCHAR lpzText[MAX_SECONDLINE*2] = _T("\0\0");
+ TCHAR lpzText[MAX_SECONDLINE*2] = L"\0\0";
if (pdata->pluginOptions->bShowHeaders)
mir_sntprintf(lpzText, TranslateT("[b]Number of new message(s): %d[/b]\n"), pdata->countEvent);
int doReverse = pdata->pluginOptions->bShowON;
if ((pdata->firstShowEventData != pdata->firstEventData && doReverse) || (pdata->firstShowEventData != pdata->lastEventData && !doReverse))
- mir_sntprintf(lpzText, _T("%s...\n"), lpzText);
+ mir_sntprintf(lpzText, L"%s...\n", lpzText);
//take the active event as starting one
EVENT_DATA_EX *eventData = pdata->firstShowEventData;
@@ -573,17 +573,17 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) TCHAR timestamp[MAX_DATASIZE];
TCHAR formatTime[MAX_DATASIZE];
if (pdata->pluginOptions->bShowDate)
- _tcsncpy(formatTime, _T("%Y.%m.%d"), _countof(formatTime));
+ _tcsncpy(formatTime, L"%Y.%m.%d", _countof(formatTime));
else if (pdata->pluginOptions->bShowTime)
- mir_tstrncat(formatTime, _T(" %H:%M"), _countof(formatTime) - mir_tstrlen(formatTime));
+ mir_tstrncat(formatTime, L" %H:%M", _countof(formatTime) - mir_tstrlen(formatTime));
time_t localTime = dbe.timestamp;
_tcsftime(timestamp, _countof(timestamp), formatTime, localtime(&localTime));
- mir_sntprintf(lpzText, _T("%s[b][i]%s[/i][/b]\n"), lpzText, timestamp);
+ mir_sntprintf(lpzText, L"%s[b][i]%s[/i][/b]\n", lpzText, timestamp);
}
// prepare event preview
TCHAR* szEventPreview = GetEventPreview(&dbe);
- mir_sntprintf(lpzText, _T("%s%s"), lpzText, szEventPreview);
+ mir_sntprintf(lpzText, L"%s%s", lpzText, szEventPreview);
mir_free(szEventPreview);
if (dbe.pBlob)
@@ -595,11 +595,11 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) else if ((iEvent >= pdata->pluginOptions->iNumberMsg && pdata->pluginOptions->iNumberMsg) || !eventData->prev)
break;
- mir_sntprintf(lpzText, _T("%s\n"), lpzText);
+ mir_sntprintf(lpzText, L"%s\n", lpzText);
}
if ((doReverse && eventData->next) || (!doReverse && eventData->prev))
- mir_sntprintf(lpzText, _T("%s\n..."), lpzText);
+ mir_sntprintf(lpzText, L"%s\n...", lpzText);
PUChangeTextT(pdata->hWnd, lpzText);
return 0;
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);
diff --git a/plugins/New_GPG/src/gpg_wrapper.cpp b/plugins/New_GPG/src/gpg_wrapper.cpp index c979149e2f..1e2fcfce97 100755 --- a/plugins/New_GPG/src/gpg_wrapper.cpp +++ b/plugins/New_GPG/src/gpg_wrapper.cpp @@ -25,7 +25,7 @@ pxResult pxExecute(std::vector<std::wstring> &aargv, string *aoutput, LPDWORD ae extern logtofile debuglog; - TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("")); + TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L""); { if(!boost::filesystem::exists(bin_path)) { @@ -48,7 +48,7 @@ pxResult pxExecute(std::vector<std::wstring> &aargv, string *aoutput, LPDWORD ae env.push_back(L"LC_ALL=English"); env.push_back(L"LANG=C"); argv.push_back(bin_path); - TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); if(mir_tstrlen(home_dir)) //this check are required for first run gpg binary validation { argv.push_back(L"--homedir"); @@ -81,7 +81,7 @@ pxResult pxExecute(std::vector<std::wstring> &aargv, string *aoutput, LPDWORD ae file_descriptor_sink serr(perr.sink, close_handle); TCHAR *mir_path = new TCHAR [MAX_PATH]; - PathToAbsoluteW(_T("\\"), mir_path); + PathToAbsoluteW(L"\\", mir_path); c = new child(execute(set_args(argv), bind_stdout(sout), bind_stderr(serr), close_stdin(),/*bind_stdin(sin),*/ show_window(SW_HIDE), hide_console(), inherit_env(), set_env(env), start_in_dir(mir_path))); _child = c; @@ -175,7 +175,7 @@ pxResult pxExecute_passwd_change(std::vector<std::wstring> &aargv, pxResult *res return pxNotConfigured; extern logtofile debuglog; - TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("")); + TCHAR *bin_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L""); { if(!boost::filesystem::exists(bin_path)) { @@ -197,7 +197,7 @@ pxResult pxExecute_passwd_change(std::vector<std::wstring> &aargv, pxResult *res env.push_back(L"LC_ALL=English"); argv.push_back(bin_path); argv.push_back(L"--homedir"); - TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); argv.push_back(home_dir); mir_free(home_dir); argv.push_back(L"--display-charset"); diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index a8834fd1d5..9a84c466ee 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -74,14 +74,14 @@ void init_vars() {
bAppendTags = db_get_b(NULL, szGPGModuleName, "bAppendTags", 0) != 0;
bStripTags = db_get_b(NULL, szGPGModuleName, "bStripTags", 0) != 0;
- inopentag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInOpenTag", _T("<GPGdec>"));
- inclosetag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInCloseTag", _T("</GPGdec>"));
- outopentag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutOpenTag", _T("<GPGenc>"));
- outclosetag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutCloseTag", _T("</GPGenc>"));
+ inopentag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInOpenTag", L"<GPGdec>");
+ inclosetag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInCloseTag", L"</GPGdec>");
+ outopentag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutOpenTag", L"<GPGenc>");
+ outclosetag = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutCloseTag", L"</GPGenc>");
bDebugLog = db_get_b(NULL, szGPGModuleName, "bDebugLog", 0) != 0;
bAutoExchange = db_get_b(NULL, szGPGModuleName, "bAutoExchange", 0) != 0;
bSameAction = db_get_b(NULL, szGPGModuleName, "bSameAction", 0) != 0;
- password = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T(""));
+ password = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L"");
debuglog.init();
bIsMiranda09 = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00090001;
bJabberAPI = db_get_b(NULL, szGPGModuleName, "bJabberAPI", bIsMiranda09) != 0;
@@ -102,7 +102,7 @@ void init_vars() load_existing_key_rect.left = db_get_dw(NULL, szGPGModuleName, "LoadExistingKeyWindowX", 0);
load_existing_key_rect.top = db_get_dw(NULL, szGPGModuleName, "LoadExistingKeyWindowY", 0);
tabsrmm_used = isTabsrmmUsed();
- bold_font = CreateFont(14, 0, 0, 0, 600, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, _T("Arial"));
+ bold_font = CreateFont(14, 0, 0, 0, 600, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, L"Arial");
}
static int OnModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/New_GPG/src/log.cpp b/plugins/New_GPG/src/log.cpp index e9daf7d1df..87c72605da 100644 --- a/plugins/New_GPG/src/log.cpp +++ b/plugins/New_GPG/src/log.cpp @@ -73,7 +73,7 @@ void logtofile::init() {
if(path)
mir_free(path);
- path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szLogFilePath", _T("C:\\GPGdebug.log"));
+ path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szLogFilePath", L"C:\\GPGdebug.log");
}
_bDebugLog = bDebugLog;
}
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 3de785cc84..8e50ba8998 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -49,7 +49,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE_PASSWD), 0); LVCOLUMN col = { 0 }; - col.pszText = _T("Key ID"); + col.pszText = L"Key ID"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 50; @@ -96,7 +96,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, item.mask = LVIF_TEXT; item.iItem = i; item.iSubItem = 0; - item.pszText = _T(""); + item.pszText = L""; { //parse gpg output string out; @@ -216,10 +216,10 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, setting += accounts[n]->szModuleName; setting += ")"; setting += "_KeyID"; - TCHAR *str = UniGetContactSettingUtf(NULL, szGPGModuleName, setting.c_str(), _T("")); + TCHAR *str = UniGetContactSettingUtf(NULL, szGPGModuleName, setting.c_str(), L""); if (key_id == str) { if (!accs.empty()) - accs += _T(","); + accs += L","; accs += accounts[n]->tszAccountName; } mir_free(str); @@ -279,7 +279,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, { if (_tcschr(name, _T('('))) { wstring str = name; - wstring::size_type p = str.find(_T("(")) - 1; + wstring::size_type p = str.find(L"(") - 1; mir_tstrcpy(name, str.substr(0, p).c_str()); } } @@ -323,8 +323,8 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, } if (!mir_strcmp(buf, Translate("Default"))) { wstring keyinfo = TranslateT("Default private key ID"); - keyinfo += _T(": "); - keyinfo += (fp[0]) ? fp : _T("not set"); + keyinfo += L": "; + keyinfo += (fp[0]) ? fp : L"not set"; extern HWND hwndCurKey_p; SetWindowText(hwndCurKey_p, keyinfo.c_str()); } @@ -358,7 +358,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, item.mask = LVIF_TEXT; item.iItem = i; item.iSubItem = 0; - item.pszText = _T(""); + item.pszText = L""; {//parse gpg output string out; DWORD code; @@ -505,10 +505,10 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, wstring path; { // generating key file - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); path = tmp; mir_free(tmp); - path.append(_T("\\new_key")); + path.append(L"\\new_key"); wfstream f(path.c_str(), std::ios::out); if (!f.is_open()) { MessageBox(0, TranslateT("Failed to open file"), TranslateT("Error"), MB_OK); @@ -681,7 +681,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg, UINT uMsg, WPARAM wParam, case IDC_EXPORT_PRIVATE: { - TCHAR *p = GetFilePath(_T("Choose file to export key"), _T("*"), _T("Any file"), true); + TCHAR *p = GetFilePath(L"Choose file to export key", L"*", L"Any file", true); if (!p || !p[0]) { delete[] p; //TODO: handle error @@ -796,12 +796,12 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, ptrT tmp(mir_a2t(mir_path)); - wstring gpg_path(tmp); gpg_path += _T("\\GnuPG\\gpg.exe"); - wstring gpg_lang_path(tmp); gpg_lang_path += _T("\\GnuPG\\gnupg.nls\\en@quot.mo"); + wstring gpg_path(tmp); gpg_path += L"\\GnuPG\\gpg.exe"; + wstring gpg_lang_path(tmp); gpg_lang_path += L"\\GnuPG\\gnupg.nls\\en@quot.mo"; if (boost::filesystem::exists(gpg_path)) { gpg_exists = true; - mir_tstrcpy(path, _T("GnuPG\\gpg.exe")); + mir_tstrcpy(path, L"GnuPG\\gpg.exe"); } else mir_tstrcpy(path, gpg_path.c_str()); @@ -815,7 +815,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, { ptrT tmp; if (!gpg_exists) { - tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", (SHGetValue(HKEY_CURRENT_USER, _T("Software\\GNU\\GnuPG"), _T("gpgProgram"), 0, path, &len) == ERROR_SUCCESS) ? path : _T("")); + tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", (SHGetValue(HKEY_CURRENT_USER, L"Software\\GNU\\GnuPG", L"gpgProgram", 0, path, &len) == ERROR_SUCCESS) ? path : L""); if (tmp[0]) if (!boost::filesystem::exists((TCHAR*)tmp)) MessageBox(0, TranslateT("Wrong GPG binary location found in system.\nPlease choose another location"), TranslateT("Warning"), MB_OK); @@ -854,7 +854,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } } { - ptrT tmp(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""))); + ptrT tmp(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"")); if (!tmp[0]) { mir_free(tmp); char *mir_path = (char*)mir_alloc(sizeof(char) * MAX_PATH); @@ -865,12 +865,12 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, MessageBox(0, TranslateT("\"GPG\" directory found in Miranda root.\nAssuming it's GPG home directory.\nGPG home directory set."), TranslateT("Info"), MB_OK); } else { - wstring path_ = _wgetenv(_T("APPDATA")); - path_ += _T("\\GnuPG"); + wstring path_ = _wgetenv(L"APPDATA"); + path_ += L"\\GnuPG"; tmp = mir_wstrdup(path_.c_str()); } } - SetDlgItemText(hwndDlg, IDC_HOME_DIR, !gpg_exists ? tmp : _T("gpg")); + SetDlgItemText(hwndDlg, IDC_HOME_DIR, !gpg_exists ? tmp : L"gpg"); } //TODO: additional check for write access if (gpg_exists && lang_exists && !bad_version) @@ -886,8 +886,8 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, switch (LOWORD(wParam)) { case IDC_SET_BIN_PATH: { - GetFilePath(_T("Choose gpg.exe"), "szGpgBinPath", _T("*.exe"), _T("EXE Executables")); - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("gpg.exe")); + GetFilePath(L"Choose gpg.exe", "szGpgBinPath", L"*.exe", L"EXE Executables"); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L"gpg.exe"); SetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp); char mir_path[MAX_PATH]; char *atmp = mir_t2a(tmp); @@ -903,8 +903,8 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, break; case IDC_SET_HOME_DIR: { - GetFolderPath(_T("Set home directory"), "szHomePath"); - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + GetFolderPath(L"Set home directory", "szHomePath"); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); SetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp); char mir_path[MAX_PATH]; char *atmp = mir_t2a(tmp); @@ -975,7 +975,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } db_set_ts(NULL, szGPGModuleName, "szHomePath", tmp); { - TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); DWORD dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; @@ -1046,7 +1046,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } db_set_ts(NULL, szGPGModuleName, "szHomePath", tmp); { - TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); DWORD dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; @@ -1058,10 +1058,10 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, { wstring path; { //generating key file - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); path = tmp; mir_free(tmp); - path.append(_T("\\new_key")); + path.append(L"\\new_key"); wfstream f(path.c_str(), std::ios::out); if (!f.is_open()) { MessageBox(0, TranslateT("Failed to open file"), TranslateT("Error"), MB_OK); @@ -1190,7 +1190,7 @@ static INT_PTR CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara //new_key_hcnt_mutex.unlock(); SetWindowPos(hwndDlg, 0, new_key_rect.left, new_key_rect.top, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); - TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", L""); SetDlgItemText(hwndDlg, IDC_MESSAGE, tmp[0] ? TranslateT("There is existing key for contact, would you like to replace it with new key?") : TranslateT("New public key was received, do you want to import it?")); EnableWindow(GetDlgItem(hwndDlg, IDC_IMPORT_AND_USE), db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0) ? 0 : 1); SetDlgItemText(hwndDlg, ID_IMPORT, tmp[0] ? TranslateT("Replace") : TranslateT("Accept")); @@ -1248,8 +1248,8 @@ static INT_PTR CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wPara SetWindowPos(hwndDlg, 0, key_gen_rect.left, key_gen_rect.top, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); SetWindowText(hwndDlg, TranslateT("Key Generation dialog")); - ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("RSA"), 0); - ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("DSA"), 1); + ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), L"RSA", 0); + ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), L"DSA", 1); SendDlgItemMessage(hwndDlg, IDC_KEY_TYPE, CB_SETCURSEL, 1, 0); SetDlgItemInt(hwndDlg, IDC_KEY_EXPIRE_DATE, 0, 0); SetDlgItemInt(hwndDlg, IDC_KEY_LENGTH, 4096, 0); @@ -1315,12 +1315,12 @@ static INT_PTR CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wPara mir_free(tmp); } { //generating key file - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); char *tmp2;// = mir_t2a(tmp); path = tmp; mir_free(tmp); // mir_free(tmp2); - path.append(_T("\\new_key")); + path.append(L"\\new_key"); wfstream f(path.c_str(), std::ios::out); if (!f.is_open()) { MessageBox(0, TranslateT("Failed to open file"), TranslateT("Error"), MB_OK); @@ -1436,7 +1436,7 @@ static INT_PTR CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wPara item.mask = LVIF_TEXT; item.iItem = i; item.iSubItem = 0; - item.pszText = _T(""); + item.pszText = L""; string out; DWORD code; string::size_type p = 0, p2 = 0, stop = 0; @@ -1546,37 +1546,37 @@ static INT_PTR CALLBACK DlgProcLoadExistingKey(HWND hwndDlg, UINT msg, WPARAM wP { SetWindowPos(hwndDlg, 0, load_existing_key_rect.left, load_existing_key_rect.top, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); - col.pszText = _T("Key ID"); + col.pszText = L"Key ID"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 50; ListView_InsertColumn(hwndList, 0, &col); memset(&col, 0, sizeof(col)); - col.pszText = _T("Email"); + col.pszText = L"Email"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; ListView_InsertColumn(hwndList, 1, &col); memset(&col, 0, sizeof(col)); - col.pszText = _T("Name"); + col.pszText = L"Name"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 250; ListView_InsertColumn(hwndList, 2, &col); memset(&col, 0, sizeof(col)); - col.pszText = _T("Creation date"); + col.pszText = L"Creation date"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; ListView_InsertColumn(hwndList, 3, &col); memset(&col, 0, sizeof(col)); - col.pszText = _T("Expiration date"); + col.pszText = L"Expiration date"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; ListView_InsertColumn(hwndList, 4, &col); memset(&col, 0, sizeof(col)); - col.pszText = _T("Key length"); + col.pszText = L"Key length"; col.mask = LVCF_TEXT | LVCF_WIDTH; col.fmt = LVCFMT_LEFT; col.cx = 30; @@ -1587,7 +1587,7 @@ static INT_PTR CALLBACK DlgProcLoadExistingKey(HWND hwndDlg, UINT msg, WPARAM wP item.mask = LVIF_TEXT; item.iItem = i; item.iSubItem = 0; - item.pszText = _T(""); + item.pszText = L""; {//parse gpg output string out; DWORD code; @@ -1773,8 +1773,8 @@ static INT_PTR CALLBACK DlgProcImportKeyDialog(HWND hwndDlg, UINT msg, WPARAM wP new_key_hcnt_mutex.unlock(); SetWindowPos(hwndDlg, 0, import_key_rect.left, import_key_rect.top, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); - ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), _T("subkeys.pgp.net"), 0); - ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), _T("keys.gnupg.net"), 0); + ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), L"subkeys.pgp.net", 0); + ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), L"keys.gnupg.net", 0); } return TRUE; @@ -1875,33 +1875,33 @@ void InitCheck() { { // parse gpg output - TCHAR *current_home = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); - db_set_ts(NULL, szGPGModuleName, "szHomePath", _T("")); //we do not need home for gpg binary validation + TCHAR *current_home = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); + db_set_ts(NULL, szGPGModuleName, "szHomePath", L""); //we do not need home for gpg binary validation gpg_valid = isGPGValid(); db_set_ts(NULL, szGPGModuleName, "szHomePath", current_home); //return current home dir back mir_free(current_home); bool home_dir_access = false, temp_access = false; - TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); std::wstring test_path = home_dir; mir_free(home_dir); - test_path += _T("/"); + test_path += L"/"; test_path += toUTF16(get_random(13)); wfstream test_file; test_file.open(test_path, std::ios::trunc | std::ios::out); if (test_file.is_open() && test_file.good()) { - test_file << _T("access_test\n"); + test_file << L"access_test\n"; if (test_file.good()) home_dir_access = true; test_file.close(); boost::filesystem::remove(test_path); } - home_dir = _tgetenv(_T("TEMP")); + home_dir = _tgetenv(L"TEMP"); test_path = home_dir; - test_path += _T("/"); + test_path += L"/"; test_path += toUTF16(get_random(13)); test_file.open(test_path, std::ios::trunc | std::ios::out); if (test_file.is_open() && test_file.good()) { - test_file << _T("access_test\n"); + test_file << L"access_test\n"; if (test_file.good()) temp_access = true; test_file.close(); @@ -1936,10 +1936,10 @@ void InitCheck() if (result == pxNotFound) return; } - home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + home_dir = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); wstring tmp_dir = home_dir; mir_free(home_dir); - tmp_dir += _T("\\tmp"); + tmp_dir += L"\\tmp"; _wmkdir(tmp_dir.c_str()); int count = 0; PROTOACCOUNT **accounts; @@ -2072,7 +2072,7 @@ void InitCheck() mir_free(key); } { - TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); DWORD dwFileAttr = GetFileAttributes(path); if (dwFileAttr != INVALID_FILE_ATTRIBUTES) { dwFileAttr &= ~FILE_ATTRIBUTE_READONLY; @@ -2137,16 +2137,16 @@ void ImportKey() std::vector<wstring> cmd; TCHAR tmp2[MAX_PATH] = { 0 }; { - _tcsncpy(tmp2, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""))), MAX_PATH - 1); - mir_tstrncat(tmp2, _T("\\"), _countof(tmp2) - mir_tstrlen(tmp2)); - mir_tstrncat(tmp2, _T("temporary_exported.asc"), _countof(tmp2) - mir_tstrlen(tmp2)); + _tcsncpy(tmp2, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"")), MAX_PATH - 1); + mir_tstrncat(tmp2, L"\\", _countof(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, L"temporary_exported.asc", _countof(tmp2) - mir_tstrlen(tmp2)); boost::filesystem::remove(tmp2); ptrT ptmp; if (db_mc_isMeta(hContact)) - ptmp = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", _T("")); + ptmp = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "GPGPubKey", L""); else - ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); + ptmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", L""); wfstream f(tmp2, std::ios::out); f << ptmp; @@ -2358,6 +2358,6 @@ void ImportKey() db_unset(hContact, szGPGModuleName, "bAlwatsTrust"); } - MessageBox(0, toUTF16(output).c_str(), _T(""), MB_OK); + MessageBox(0, toUTF16(output).c_str(), L"", MB_OK); boost::filesystem::remove(tmp2); } diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index e04ccc6e7f..de5940cb32 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -29,8 +29,8 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR DWORD dbflags = DBEF_UTF; { // check for gpg related data - wstring::size_type s1 = str.find(_T("-----BEGIN PGP MESSAGE-----")); - wstring::size_type s2 = str.find(_T("-----END PGP MESSAGE-----")); + wstring::size_type s1 = str.find(L"-----BEGIN PGP MESSAGE-----"); + wstring::size_type s2 = str.find(L"-----END PGP MESSAGE-----"); if (s2 != wstring::npos && s1 != wstring::npos) { //this is generic encrypted data block if (!isContactSecured(hContact)) @@ -68,13 +68,13 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR else if (bDebugLog) debuglog << std::string(time_str() + ": info: received encrypted message from: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); boost::algorithm::erase_all(str, "\r"); - s2 += mir_tstrlen(_T("-----END PGP MESSAGE-----")); + s2 += mir_tstrlen(L"-----END PGP MESSAGE-----"); - ptrT ptszHomePath(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""))); + ptrT ptszHomePath(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"")); wstring encfile = toUTF16(get_random(10)); wstring decfile = toUTF16(get_random(10)); { - wstring path = wstring(ptszHomePath) + _T("\\tmp\\") + encfile; + wstring path = wstring(ptszHomePath) + L"\\tmp\\" + encfile; if(!bDebugLog) { boost::system::error_code e; @@ -117,13 +117,13 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR string dbsetting = "szKey_"; dbsetting += inkeyid; dbsetting += "_Password"; - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L""); if (pass[0] && bDebugLog) debuglog << std::string(time_str() + ": info: found password in database for key ID: " + inkeyid + ", trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with password"); } else { - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L""); if (pass[0] && bDebugLog) debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " with password"); } @@ -147,7 +147,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR if(!bDebugLog) { boost::system::error_code e; - boost::filesystem::remove(wstring(ptszHomePath) + _T("\\tmp\\") + decfile, e); + boost::filesystem::remove(wstring(ptszHomePath) + L"\\tmp\\" + decfile, e); } cmd.push_back(L"--output"); @@ -296,10 +296,10 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR if(!bDebugLog) { boost::system::error_code e; - boost::filesystem::remove(wstring(ptszHomePath) + _T("\\tmp\\") + encfile, e); + boost::filesystem::remove(wstring(ptszHomePath) + L"\\tmp\\" + encfile, e); } - if (!boost::filesystem::exists(wstring(ptszHomePath) + _T("\\tmp\\") + decfile)) + if (!boost::filesystem::exists(wstring(ptszHomePath) + L"\\tmp\\" + decfile)) { string str1 = msg; str1.insert(0, "Received unencrypted message:\n"); @@ -319,7 +319,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR str.clear(); - wstring tszDecPath = wstring(ptszHomePath) + _T("\\tmp\\") + decfile; + wstring tszDecPath = wstring(ptszHomePath) + L"\\tmp\\" + decfile; { fstream f(tszDecPath.c_str(), std::ios::in | std::ios::ate | std::ios::binary); if (f.is_open()) @@ -408,17 +408,17 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) } wstring str = toUTF16(msg); size_t s1, s2; - if (bAutoExchange && (str.find(_T("-----PGP KEY RESPONSE-----")) != wstring::npos)) + if (bAutoExchange && (str.find(L"-----PGP KEY RESPONSE-----") != wstring::npos)) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange): parsing key response:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0))); - s2 = str.find(_T("-----END PGP PUBLIC KEY BLOCK-----")); - s1 = str.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----")); + s2 = str.find(L"-----END PGP PUBLIC KEY BLOCK-----"); + s1 = str.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----"); if (s1 != wstring::npos && s2 != wstring::npos) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange): found pubkey block:" + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0))); - s2 += mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----")); + s2 += mir_tstrlen(L"-----END PGP PUBLIC KEY BLOCK-----"); db_set_ts(ccs->hContact, szGPGModuleName, "GPGPubKey", str.substr(s1, s2 - s1).c_str()); { //gpg execute block std::vector<wstring> cmd; @@ -426,15 +426,15 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) string output; DWORD exitcode; { - ptrT ptmp(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""))); + ptrT ptmp(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"")); mir_tstrcpy(tmp2, ptmp); mir_free(ptmp); - mir_tstrcat(tmp2, _T("\\")); + mir_tstrcat(tmp2, L"\\"); TCHAR *tmp3 = mir_a2t(get_random(5).c_str()); mir_tstrcat(tmp2, tmp3); - mir_tstrcat(tmp2, _T(".asc")); + mir_tstrcat(tmp2, L".asc"); mir_free(tmp3); - //mir_tstrcat(tmp2, _T("temporary_exported.asc")); + //mir_tstrcat(tmp2, L"temporary_exported.asc"); if(!bDebugLog) { boost::system::error_code e; @@ -459,7 +459,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) f.open(tmp2, std::ios::out); } } - ptmp = UniGetContactSettingUtf(ccs->hContact, szGPGModuleName, "GPGPubKey", _T("")); + ptmp = UniGetContactSettingUtf(ccs->hContact, szGPGModuleName, "GPGPubKey", L""); f << (TCHAR*)ptmp; f.close(); cmd.push_back(L"--batch"); @@ -551,23 +551,23 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) return 1; } } - if (((s2 = str.find(_T("-----END PGP PUBLIC KEY BLOCK-----"))) == wstring::npos) || ((s1 = str.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"))) == wstring::npos)) + if (((s2 = str.find(L"-----END PGP PUBLIC KEY BLOCK-----")) == wstring::npos) || ((s1 = str.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----")) == wstring::npos)) { - s2 = str.find(_T("-----END PGP PRIVATE KEY BLOCK-----")); - s1 = str.find(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----")); + s2 = str.find(L"-----END PGP PRIVATE KEY BLOCK-----"); + s1 = str.find(L"-----BEGIN PGP PRIVATE KEY BLOCK-----"); } if ((s2 != wstring::npos) && (s1 != wstring::npos)) { //this is public key if (bDebugLog) debuglog << std::string(time_str() + ": info: received key from: " + toUTF8(pcli->pfnGetContactDisplayName(ccs->hContact, 0))); s1 = 0; - while ((s1 = str.find(_T("\r"), s1)) != wstring::npos) + while ((s1 = str.find(L"\r", s1)) != wstring::npos) str.erase(s1, 1); void ShowNewKeyDialog(); - if (((s2 = str.find(_T("-----END PGP PUBLIC KEY BLOCK-----"))) != wstring::npos) && ((s1 = str.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"))) != wstring::npos)) - s2 += mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----")); - else if (((s2 = str.find(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----"))) != wstring::npos) && ((s1 = str.find(_T("-----END PGP PRIVATE KEY BLOCK-----"))) != wstring::npos)) - s2 += mir_tstrlen(_T("-----END PGP PRIVATE KEY BLOCK-----")); + if (((s2 = str.find(L"-----END PGP PUBLIC KEY BLOCK-----")) != wstring::npos) && ((s1 = str.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----")) != wstring::npos)) + s2 += mir_tstrlen(L"-----END PGP PUBLIC KEY BLOCK-----"); + else if (((s2 = str.find(L"-----BEGIN PGP PRIVATE KEY BLOCK-----")) != wstring::npos) && ((s1 = str.find(L"-----END PGP PRIVATE KEY BLOCK-----")) != wstring::npos)) + s2 += mir_tstrlen(L"-----END PGP PRIVATE KEY BLOCK-----"); new_key.append(str.substr(s1, s2 - s1)); //new_key_hcnt_mutex.lock(); new_key_hcnt = ccs->hContact; @@ -613,7 +613,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) } else { - TCHAR *jid = UniGetContactSettingUtf(ccs->hContact, proto, "jid", _T("")); + TCHAR *jid = UniGetContactSettingUtf(ccs->hContact, proto, "jid", L""); if (jid[0]) { extern list <JabberAccount*> Accounts; @@ -632,7 +632,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) break; } mir_free(caps); - if (str1.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) + if (str1.find(L"GPG_Key_Auto_Exchange:0") != string::npos) { ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; @@ -658,8 +658,8 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) debuglog << std::string(time_str() + ": info: stripping tags in outgoing message, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); strip_tags(str); } - /* for(std::wstring::size_type i = str.find(_T("\r\n")); i != std::wstring::npos; i = str.find(_T("\r\n"), i+1)) - str.replace(i, 2, _T("\n")); */ + /* for(std::wstring::size_type i = str.find(L"\r\n"); i != std::wstring::npos; i = str.find(L"\r\n", i+1)) + str.replace(i, 2, L"\n"); */ string out; DWORD code; wstring file = toUTF16(get_random(10)), path; @@ -695,7 +695,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) mir_free(tmp2); } { - TCHAR *tmp2 = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *tmp2 = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); path = tmp2; cmd.push_back(std::wstring(tmp2) + L"\\tmp\\" + file); mir_free(tmp2); @@ -794,7 +794,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) boost::system::error_code e; boost::filesystem::remove(path, e); } - path.append(_T(".asc")); + path.append(L".asc"); wfstream f(path.c_str(), std::ios::in | std::ios::ate | std::ios::binary); count = 0; while (!f.is_open()) { @@ -933,7 +933,7 @@ int HookSendMsg(WPARAM w, LPARAM l) } } else { - TCHAR *jid = UniGetContactSettingUtf(hContact, proto, "jid", _T("")); + TCHAR *jid = UniGetContactSettingUtf(hContact, proto, "jid", L""); if (jid[0]) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange): protocol looks like jabber, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); @@ -950,7 +950,7 @@ int HookSendMsg(WPARAM w, LPARAM l) break; } mir_free(caps); - if (str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) { + if (str.find(L"GPG_Key_Auto_Exchange:0") != string::npos) { if (bDebugLog) debuglog << std::string(time_str() + ": info(autoexchange, jabber): autoexchange capability found, sending key request, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0))); ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 1a76b727f0..2b4caf0911 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -135,25 +135,25 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L char *tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", "");
tmp = mir_a2t(tmp2);
mir_free(tmp2);
- ListView_SetItemText(hwndList, iRow, 1, (mir_tstrlen(tmp) > 1) ? tmp : _T("not set"));
+ ListView_SetItemText(hwndList, iRow, 1, (mir_tstrlen(tmp) > 1) ? tmp : L"not set");
mir_free(tmp);
tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", "");
if (!toUTF16(tmp2).empty())
tmp = mir_wstrdup(toUTF16(tmp2).c_str());
else
- tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", _T(""));
+ tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainName", L"");
mir_free(tmp2);
- ListView_SetItemText(hwndList, iRow, 2, (mir_tstrlen(tmp) > 1) ? tmp : _T("not set"));
+ ListView_SetItemText(hwndList, iRow, 2, (mir_tstrlen(tmp) > 1) ? tmp : L"not set");
mir_free(tmp);
tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", "");
if (!toUTF16(tmp2).empty())
tmp = mir_wstrdup(toUTF16(tmp2).c_str());
else
- tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", _T(""));
+ tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyMainEmail", L"");
mir_free(tmp2);
- ListView_SetItemText(hwndList, iRow, 3, (mir_tstrlen(tmp) > 1) ? tmp : _T("not set"));
+ ListView_SetItemText(hwndList, iRow, 3, (mir_tstrlen(tmp) > 1) ? tmp : L"not set");
mir_free(tmp);
if (db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0))
@@ -168,8 +168,8 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L i++;
}
}
- TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szLogFilePath", _T(""));
- SetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, (mir_tstrlen(tmp) > 1) ? tmp : _T("c:\\GPGdebug.log"));
+ TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szLogFilePath", L"");
+ SetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, (mir_tstrlen(tmp) > 1) ? tmp : L"c:\\GPGdebug.log");
mir_free(tmp);
CheckStateLoadDB(hwndDlg, IDC_DEBUG_LOG, "bDebugLog", 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_JABBER_API), bIsMiranda09);
@@ -304,11 +304,11 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L case IDC_SAVE_KEY_BUTTON:
{
- TCHAR *tmp = GetFilePath(TranslateT("Export public key"), _T("*"), TranslateT(".asc pubkey file"), true);
+ TCHAR *tmp = GetFilePath(TranslateT("Export public key"), L"*", TranslateT(".asc pubkey file"), true);
if (tmp) {
- wstring str(ptrT(UniGetContactSettingUtf(user_data[item_num + 1], szGPGModuleName, "GPGPubKey", _T(""))));
+ wstring str(ptrT(UniGetContactSettingUtf(user_data[item_num + 1], szGPGModuleName, "GPGPubKey", L"")));
wstring::size_type s = 0;
- while ((s = str.find(_T("\r"), s)) != wstring::npos)
+ while ((s = str.find(L"\r", s)) != wstring::npos)
str.erase(s, 1);
wfstream f(tmp, std::ios::out);
@@ -360,7 +360,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L break;
case IDC_LOG_FILE_SET:
- SetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, ptrT(GetFilePath(TranslateT("Set log file"), _T("*"), TranslateT("LOG files"), 1)));
+ SetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, ptrT(GetFilePath(TranslateT("Set log file"), L"*", TranslateT("LOG files"), 1)));
break;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -415,16 +415,16 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetDlgItemText(hwndDlg, IDC_BIN_PATH, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("gpg.exe"))));
- SetDlgItemText(hwndDlg, IDC_HOME_DIR, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("gpg"))));
+ SetDlgItemText(hwndDlg, IDC_BIN_PATH, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L"gpg.exe")));
+ SetDlgItemText(hwndDlg, IDC_HOME_DIR, ptrT(UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"gpg")));
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_SET_BIN_PATH:
{
- GetFilePath(TranslateT("Choose gpg.exe"), "szGpgBinPath", _T("*.exe"), TranslateT("EXE Executables"));
- TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("gpg.exe"));
+ GetFilePath(TranslateT("Choose gpg.exe"), "szGpgBinPath", L"*.exe", TranslateT("EXE Executables"));
+ TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L"gpg.exe");
SetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp);
bool gpg_exists = false;
{
@@ -432,7 +432,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, gpg_exists = true;
if (gpg_exists) {
bool bad_version = false;
- TCHAR *tmp_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T(""));
+ TCHAR *tmp_path = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L"");
db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
string out;
DWORD code;
@@ -460,7 +460,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, MessageBox(0, TranslateT("This is not GnuPG binary!\nIt is recommended that you use GnuPG v1.x.x with this plugin."), TranslateT("Warning"), MB_OK);
}
/* if(bad_version) //looks like working fine with gpg2
- MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended that you use GnuPG v1.x.x with this plugin."), _T("Warning"), MB_OK); */
+ MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended that you use GnuPG v1.x.x with this plugin."), L"Warning", MB_OK); */
}
}
char mir_path[MAX_PATH];
@@ -478,7 +478,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_SET_HOME_DIR:
{
GetFolderPath(TranslateT("Set home directory"), "szHomePath");
- TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
+ TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
SetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp);
char mir_path[MAX_PATH];
char *atmp = mir_t2a(tmp);
@@ -526,16 +526,16 @@ static INT_PTR CALLBACK DlgProcGpgMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, CheckStateLoadDB(hwndDlg, IDC_APPEND_TAGS, "bAppendTags", 0);
CheckStateLoadDB(hwndDlg, IDC_STRIP_TAGS, "bStripTags", 0);
{
- TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInOpenTag", _T("<GPGdec>"));
+ TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInOpenTag", L"<GPGdec>");
SetDlgItemText(hwndDlg, IDC_IN_OPEN_TAG, tmp);
mir_free(tmp);
- tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInCloseTag", _T("</GPGdec>"));
+ tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szInCloseTag", L"</GPGdec>");
SetDlgItemText(hwndDlg, IDC_IN_CLOSE_TAG, tmp);
mir_free(tmp);
- tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutOpenTag", _T("<GPGenc>"));
+ tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutOpenTag", L"<GPGenc>");
SetDlgItemText(hwndDlg, IDC_OUT_OPEN_TAG, tmp);
mir_free(tmp);
- tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutCloseTag", _T("</GPGenc>"));
+ tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szOutCloseTag", L"</GPGenc>");
SetDlgItemText(hwndDlg, IDC_OUT_CLOSE_TAG, tmp);
mir_free(tmp);
}
@@ -679,16 +679,16 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa CheckDlgButton(hwndDlg, IDC_ENABLE_ENCRYPTION, BST_CHECKED);
}
if (hcnt) {
- TCHAR *tmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "GPGPubKey", _T(""));
+ TCHAR *tmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "GPGPubKey", L"");
wstring str = tmp;
mir_free(tmp); tmp = NULL;
if (!str.empty()) {
wstring::size_type p = 0, stop = 0;
for (;;) {
- if ((p = str.find(_T("\n"), p + 2)) != wstring::npos) {
+ if ((p = str.find(L"\n", p + 2)) != wstring::npos) {
if (p > stop) {
stop = p;
- str.insert(p, _T("\r"));
+ str.insert(p, L"\r");
}
else break;
}
@@ -736,7 +736,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa }
if (tmp)
mir_free(tmp);
- SetDlgItemText(hwndDlg, IDC_PUBLIC_KEY_EDIT, !str.empty() ? str.c_str() : _T(""));
+ SetDlgItemText(hwndDlg, IDC_PUBLIC_KEY_EDIT, !str.empty() ? str.c_str() : L"");
}
hPubKeyEdit = GetDlgItem(hwndDlg, IDC_PUBLIC_KEY_EDIT);
return TRUE;
@@ -751,26 +751,26 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa TCHAR *begin, *end;
GetDlgItemText(hwndDlg, IDC_PUBLIC_KEY_EDIT, tmp, 40960);
key_buf.append(tmp);
- key_buf.append(_T("\n")); //no new line at end of file )
+ key_buf.append(L"\n"); //no new line at end of file )
delete[] tmp;
- while ((ws1 = key_buf.find(_T("\r"), ws1)) != wstring::npos) {
+ while ((ws1 = key_buf.find(L"\r", ws1)) != wstring::npos) {
key_buf.erase(ws1, 1); //remove windows specific trash
}
ws1 = 0;
- if (((ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"))) != wstring::npos) && ((ws1 = key_buf.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"))) != wstring::npos)) {
- begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----")) + 1));
- mir_tstrcpy(begin, _T("-----BEGIN PGP PUBLIC KEY BLOCK-----"));
- end = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----")) + 1));
- mir_tstrcpy(end, _T("-----END PGP PUBLIC KEY BLOCK-----"));
+ if (((ws2 = key_buf.find(L"-----END PGP PUBLIC KEY BLOCK-----")) != wstring::npos) && ((ws1 = key_buf.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----")) != wstring::npos)) {
+ begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(L"-----BEGIN PGP PUBLIC KEY BLOCK-----") + 1));
+ mir_tstrcpy(begin, L"-----BEGIN PGP PUBLIC KEY BLOCK-----");
+ end = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(L"-----END PGP PUBLIC KEY BLOCK-----") + 1));
+ mir_tstrcpy(end, L"-----END PGP PUBLIC KEY BLOCK-----");
}
- else if (((ws2 = key_buf.find(_T("-----END PGP PRIVATE KEY BLOCK-----"))) != wstring::npos) && ((ws1 = key_buf.find(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----"))) != wstring::npos)) {
- begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----")) + 1));
- mir_tstrcpy(begin, _T("-----BEGIN PGP PRIVATE KEY BLOCK-----"));
- end = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(_T("-----END PGP PRIVATE KEY BLOCK-----")) + 1));
- mir_tstrcpy(end, _T("-----END PGP PRIVATE KEY BLOCK-----"));
+ else if (((ws2 = key_buf.find(L"-----END PGP PRIVATE KEY BLOCK-----")) != wstring::npos) && ((ws1 = key_buf.find(L"-----BEGIN PGP PRIVATE KEY BLOCK-----")) != wstring::npos)) {
+ begin = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(L"-----BEGIN PGP PRIVATE KEY BLOCK-----") + 1));
+ mir_tstrcpy(begin, L"-----BEGIN PGP PRIVATE KEY BLOCK-----");
+ end = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(L"-----END PGP PRIVATE KEY BLOCK-----") + 1));
+ mir_tstrcpy(end, L"-----END PGP PRIVATE KEY BLOCK-----");
}
else {
- MessageBox(0, TranslateT("This is not public or private key"), _T("INFO"), MB_OK);
+ MessageBox(0, TranslateT("This is not public or private key"), L"INFO", MB_OK);
break;
}
ws2 += mir_tstrlen(end);
@@ -800,18 +800,18 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa DWORD exitcode;
{
MCONTACT hcnt = db_mc_tryMeta(hContact);
- ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
+ ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L"");
_tcsncpy(tmp2, ptmp, MAX_PATH - 1);
mir_free(ptmp);
- mir_tstrncat(tmp2, _T("\\"), _countof(tmp2) - mir_tstrlen(tmp2));
- mir_tstrncat(tmp2, _T("temporary_exported.asc"), _countof(tmp2) - mir_tstrlen(tmp2));
+ mir_tstrncat(tmp2, L"\\", _countof(tmp2) - mir_tstrlen(tmp2));
+ mir_tstrncat(tmp2, L"temporary_exported.asc", _countof(tmp2) - mir_tstrlen(tmp2));
boost::filesystem::remove(tmp2);
wfstream f(tmp2, std::ios::out);
- ptmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "GPGPubKey", _T(""));
+ ptmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "GPGPubKey", L"");
wstring str = ptmp;
mir_free(ptmp);
wstring::size_type s = 0;
- while ((s = str.find(_T("\r"), s)) != wstring::npos) {
+ while ((s = str.find(L"\r", s)) != wstring::npos) {
str.erase(s, 1);
}
f << str.c_str();
@@ -1004,7 +1004,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa }
}
if (!hContact) {
- TCHAR *fp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", _T(""));
+ TCHAR *fp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", L"");
{
string out;
DWORD code;
@@ -1031,7 +1031,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa }
}
tmp = mir_wstrdup(toUTF16(output).c_str());
- MessageBox(0, tmp, _T(""), MB_OK);
+ MessageBox(0, tmp, L"", MB_OK);
mir_free(tmp);
boost::filesystem::remove(tmp2);
}
@@ -1069,7 +1069,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa break;
case ID_LOAD_FROM_FILE:
{
- TCHAR *tmp = GetFilePath(TranslateT("Set file containing GPG public key"), _T("*"), TranslateT("GPG public key file"));
+ TCHAR *tmp = GetFilePath(TranslateT("Set file containing GPG public key"), L"*", TranslateT("GPG public key file"));
if (!tmp)
break;
@@ -1095,17 +1095,17 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg, UINT uMsg, WPARAM wPa debuglog << std::string(time_str() + ": info: Failed to read key file");
break;
}
- ws2 = key_buf.find(_T("-----END PGP PUBLIC KEY BLOCK-----"));
- ws1 = key_buf.find(_T("-----BEGIN PGP PUBLIC KEY BLOCK-----"));
+ ws2 = key_buf.find(L"-----END PGP PUBLIC KEY BLOCK-----");
+ ws1 = key_buf.find(L"-----BEGIN PGP PUBLIC KEY BLOCK-----");
if (ws2 == wstring::npos || ws1 == wstring::npos) {
- ws2 = key_buf.find(_T("-----END PGP PRIVATE KEY BLOCK-----"));
- ws1 = key_buf.find(_T("-----BEGIN PGP PRIVATE KEY BLOCK-----"));
+ ws2 = key_buf.find(L"-----END PGP PRIVATE KEY BLOCK-----");
+ ws1 = key_buf.find(L"-----BEGIN PGP PRIVATE KEY BLOCK-----");
}
if (ws2 == wstring::npos || ws1 == wstring::npos) {
MessageBox(0, TranslateT("There is no public or private key."), TranslateT("Info"), MB_OK);
break;
}
- ws2 += mir_tstrlen(_T("-----END PGP PUBLIC KEY BLOCK-----"));
+ ws2 += mir_tstrlen(L"-----END PGP PUBLIC KEY BLOCK-----");
SetDlgItemText(hwndDlg, IDC_PUBLIC_KEY_EDIT, key_buf.substr(ws1, ws2 - ws1).c_str());
key_buf.clear();
}
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 97c5999500..4de5fc75a8 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -67,7 +67,7 @@ void GetFilePath(TCHAR *WindowTittle, char *szSetting, TCHAR *szExt, TCHAR *szEx pfilter[mir_tstrlen(pfilter) + 1] = '\0'; pfilter[mir_tstrlen(pfilter) + 2] = '\0'; ofn.lpstrFilter = filter; - tmp = UniGetContactSettingUtf(0, szGPGModuleName, szSetting, _T("")); + tmp = UniGetContactSettingUtf(0, szGPGModuleName, szSetting, L""); _tcsncpy(str, tmp, _countof(str) - 1); mir_free(tmp); if (mir_tstrlen(str) < 2) @@ -94,7 +94,7 @@ TCHAR *GetFilePath(TCHAR *WindowTittle, TCHAR *szExt, TCHAR *szExtDesc, bool sav pfilter[mir_tstrlen(pfilter) + 1] = '\0'; pfilter[mir_tstrlen(pfilter) + 2] = '\0'; ofn.lpstrFilter = filter; - mir_tstrcpy(str, _T("")); + mir_tstrcpy(str, L""); if (mir_tstrlen(str) < 2) str[0] = '\0'; ofn.lpstrFile = str; @@ -238,13 +238,13 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM) keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", ""); } TCHAR buf[128] = { 0 }; - mir_sntprintf(buf, _T("%s: %s"), TranslateT("Send public key"), toUTF16(keyid).c_str()); + mir_sntprintf(buf, L"%s: %s", TranslateT("Send public key"), toUTF16(keyid).c_str()); mir_free(keyid); Menu_ModifyItem(hSendKey, buf); } int flags; - TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", L""); if (!tmp[0]) { db_unset(hContact, szGPGModuleName, "GPGEncryption"); flags = CMIF_GRAYED; @@ -252,7 +252,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM) else flags = 0; Menu_ModifyItem(hToggleEncryption, - db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0) ? _T("Turn off GPG encryption") : _T("Turn on GPG encryption"), + db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0) ? L"Turn off GPG encryption" : L"Turn on GPG encryption", INVALID_HANDLE_VALUE, flags); mir_free(tmp); return 0; @@ -289,7 +289,7 @@ int onProtoAck(WPARAM, LPARAM l) if (!filename) return 0; } - if (_tcsstr(filename, _T(".gpg"))) //decrypt it + if (_tcsstr(filename, L".gpg")) //decrypt it { //process encrypted file if (!bFileTransfers && !bSameAction) { void ShowEncryptedFileMsgBox(); @@ -308,8 +308,8 @@ int onProtoAck(WPARAM, LPARAM l) std::vector<wstring> cmd; cmd.push_back(L"-o"); wstring file = filename; - wstring::size_type p1 = file.rfind(_T(".gpg")); - file.erase(p1, mir_tstrlen(_T(".gpg"))); + wstring::size_type p1 = file.rfind(L".gpg"); + file.erase(p1, mir_tstrlen(L".gpg")); if (boost::filesystem::exists(file)) { if (MessageBox(0, TranslateT("Target file exists, do you want to replace it?"), TranslateT("Warning"), MB_YESNO) == IDNO) return 0; @@ -324,12 +324,12 @@ int onProtoAck(WPARAM, LPARAM l) string dbsetting = "szKey_"; dbsetting += keyid; dbsetting += "_Password"; - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L""); if (mir_tstrlen(pass) > 0 && bDebugLog) debuglog << std::string(time_str() + ": info: found password in database for key ID: " + keyid + ", trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with password"); } else { - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L""); if (mir_tstrlen(pass) > 0 && bDebugLog) debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to decrypt message from " + toUTF8(pcli->pfnGetContactDisplayName(ack->hContact, 0)) + " with password"); } @@ -438,8 +438,8 @@ std::wstring encrypt_file(MCONTACT hContact, TCHAR *filename) name = filename; else name++; - TCHAR *file_out = new TCHAR[mir_tstrlen(name) + mir_tstrlen(_T(".gpg")) + 1]; - mir_sntprintf(file_out, mir_tstrlen(name) + mir_tstrlen(_T(".gpg")) + 1, _T("%s.gpg"), name); + TCHAR *file_out = new TCHAR[mir_tstrlen(name) + mir_tstrlen(L".gpg") + 1]; + mir_sntprintf(file_out, mir_tstrlen(name) + mir_tstrlen(L".gpg") + 1, L"%s.gpg", name); cmd.push_back(szKeyid); if (db_get_b(hcnt, szGPGModuleName, "bAlwaysTrust", 0)) { cmd.push_back(L"--trust-model"); @@ -448,10 +448,10 @@ std::wstring encrypt_file(MCONTACT hContact, TCHAR *filename) mir_free(szKeyid); mir_free(keyid); cmd.push_back(L"-o"); - TCHAR *temp = _tgetenv(_T("TEMP")); + TCHAR *temp = _tgetenv(L"TEMP"); cmd.push_back(wstring(temp) + L"\\" + file_out); wstring path_out = temp; - path_out += _T("\\"); + path_out += L"\\"; path_out += file_out; boost::filesystem::remove(path_out); cmd.push_back(L"-e"); @@ -501,7 +501,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) } } else { - TCHAR *jid = UniGetContactSettingUtf(ccs->hContact, proto, "jid", _T("")); + TCHAR *jid = UniGetContactSettingUtf(ccs->hContact, proto, "jid", L""); if (jid[0]) { extern list <JabberAccount*> Accounts; list<JabberAccount*>::iterator end = Accounts.end(); @@ -517,7 +517,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) break; } mir_free(caps); - if (str.find(_T("GPG_Encrypted_FileTransfers:0")) != string::npos) + if (str.find(L"GPG_Encrypted_FileTransfers:0") != string::npos) cap_found = true; } } @@ -538,7 +538,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) for (int i = 0; file[i]; i++) { if (!boost::filesystem::exists(file[i])) return 0; //we do not want to send file unencrypted (sometimes ack have wrong info) - if (_tcsstr(file[i], _T(".gpg"))) + if (_tcsstr(file[i], L".gpg")) continue; std::wstring path_out = encrypt_file(ccs->hContact, file[i]); mir_free(file[i]); @@ -642,7 +642,7 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) for (int n = 0; n <= xmlGetChildCount(node); local_node = xmlGetChild(node, n++)) { LPCTSTR str = xmlGetText(local_node); LPCTSTR nodename = xmlGetName(local_node); - LPCTSTR attr = xmlGetAttrValue(local_node, _T("to")); + LPCTSTR attr = xmlGetAttrValue(local_node, L"to"); if (attr) { MCONTACT hContact = ji->ContactFromJID(attr); if (hContact) @@ -654,39 +654,39 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) continue; // TODO: make following block more readable - if (_tcsstr(str, _T("-----BEGIN PGP MESSAGE-----")) && _tcsstr(str, _T("-----END PGP MESSAGE-----"))) { + if (_tcsstr(str, L"-----BEGIN PGP MESSAGE-----") && _tcsstr(str, L"-----END PGP MESSAGE-----")) { wstring data = str; - xmlSetText(local_node, _T("This message is encrypted.")); - wstring::size_type p1 = data.find(_T("-----BEGIN PGP MESSAGE-----")) + mir_tstrlen(_T("-----BEGIN PGP MESSAGE-----")); - while (data.find(_T("Version: "), p1) != wstring::npos) { - p1 = data.find(_T("Version: "), p1); - p1 = data.find(_T("\n"), p1); + xmlSetText(local_node, L"This message is encrypted."); + wstring::size_type p1 = data.find(L"-----BEGIN PGP MESSAGE-----") + mir_tstrlen(L"-----BEGIN PGP MESSAGE-----"); + while (data.find(L"Version: ", p1) != wstring::npos) { + p1 = data.find(L"Version: ", p1); + p1 = data.find(L"\n", p1); } - while (data.find(_T("Comment: "), p1) != wstring::npos) { - p1 = data.find(_T("Comment: "), p1); - p1 = data.find(_T("\n"), p1); + while (data.find(L"Comment: ", p1) != wstring::npos) { + p1 = data.find(L"Comment: ", p1); + p1 = data.find(L"\n", p1); } - while (data.find(_T("Encoding: "), p1) != wstring::npos) { - p1 = data.find(_T("Encoding: "), p1); - p1 = data.find(_T("\n"), p1); + while (data.find(L"Encoding: ", p1) != wstring::npos) { + p1 = data.find(L"Encoding: ", p1); + p1 = data.find(L"\n", p1); } p1 += 3; - wstring::size_type p2 = data.find(_T("-----END PGP MESSAGE-----")); + wstring::size_type p2 = data.find(L"-----END PGP MESSAGE-----"); wstring data2 = data.substr(p1, p2 - p1 - 2); strip_line_term(data2); if(bDebugLog) debuglog<<std::string(time_str() + ": jabber_api: attaching:\r\n\r\n" + toUTF8(data2) + "\n\n\t to outgoing xml"); - HXML encrypted_data = xmlAddChild(node, _T("x"), data2.c_str()); - xmlAddAttr(encrypted_data, _T("xmlns"), _T("jabber:x:encrypted")); + HXML encrypted_data = xmlAddChild(node, L"x", data2.c_str()); + xmlAddAttr(encrypted_data, L"xmlns", L"jabber:x:encrypted"); break; } - if (bPresenceSigning && nodename && _tcsstr(nodename, _T("status"))) { - TCHAR *path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + if (bPresenceSigning && nodename && _tcsstr(nodename, L"status")) { + TCHAR *path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); wstring path_out = path_c; wstring file = toUTF16(get_random(10)); mir_free(path_c); - path_out += _T("\\tmp\\"); + path_out += L"\\tmp\\"; path_out += file; boost::filesystem::remove(path_out); wfstream f(path_out.c_str(), std::ios::out); @@ -718,12 +718,12 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) string dbsetting = "szKey_"; dbsetting += inkeyid; dbsetting += "_Password"; - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L""); if (pass[0] && bDebugLog) debuglog << std::string(time_str() + ": info: found password in database for key ID: " + inkeyid.get() + ", trying to encrypt message from self with password"); } else { - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L""); if (pass[0] && bDebugLog) debuglog << std::string(time_str() + ": info: found password for all keys in database, trying to encrypt message from self with password"); } @@ -742,7 +742,7 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) } cmd.push_back(L"--local-user"); - path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", _T("")); + path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", L""); cmd.push_back(path_c); cmd.push_back(L"--default-key"); cmd.push_back(path_c); @@ -758,7 +758,7 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) params.result = &result; gpg_launcher(params, boost::posix_time::seconds(15)); // TODO: handle errors boost::filesystem::remove(path_out); - path_out += _T(".asc"); + path_out += L".asc"; f.open(path_out.c_str(), std::ios::in | std::ios::ate | std::ios::binary); wstring data; if (f.is_open()) { @@ -777,24 +777,24 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) debuglog << std::string(time_str() + ": info: Failed to read prescense sign from file"); break; } - if (data.find(_T("-----BEGIN PGP SIGNATURE-----")) != wstring::npos && data.find(_T("-----END PGP SIGNATURE-----")) != wstring::npos) { - wstring::size_type p1 = data.find(_T("-----BEGIN PGP SIGNATURE-----")) + mir_tstrlen(_T("-----BEGIN PGP SIGNATURE-----")); - if (data.find(_T("Version: "), p1) != wstring::npos) { - p1 = data.find(_T("Version: "), p1); - p1 = data.find(_T("\n"), p1); - if (data.find(_T("Version: "), p1) != wstring::npos) { - p1 = data.find(_T("Version: "), p1); - p1 = data.find(_T("\n"), p1) + 1; + if (data.find(L"-----BEGIN PGP SIGNATURE-----") != wstring::npos && data.find(L"-----END PGP SIGNATURE-----") != wstring::npos) { + wstring::size_type p1 = data.find(L"-----BEGIN PGP SIGNATURE-----") + mir_tstrlen(L"-----BEGIN PGP SIGNATURE-----"); + if (data.find(L"Version: ", p1) != wstring::npos) { + p1 = data.find(L"Version: ", p1); + p1 = data.find(L"\n", p1); + if (data.find(L"Version: ", p1) != wstring::npos) { + p1 = data.find(L"Version: ", p1); + p1 = data.find(L"\n", p1) + 1; } else p1 += 1; } - if (data.find(_T("Comment: "), p1) != wstring::npos) { - p1 = data.find(_T("Comment: "), p1); - p1 = data.find(_T("\n"), p1); - if (data.find(_T("Comment: "), p1) != wstring::npos) { - p1 = data.find(_T("Comment: "), p1); - p1 = data.find(_T("\n"), p1) + 1; + if (data.find(L"Comment: ", p1) != wstring::npos) { + p1 = data.find(L"Comment: ", p1); + p1 = data.find(L"\n", p1); + if (data.find(L"Comment: ", p1) != wstring::npos) { + p1 = data.find(L"Comment: ", p1); + p1 = data.find(L"\n", p1) + 1; } else p1 += 1; @@ -802,12 +802,12 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void*) else p1 += 1; p1++; - wstring::size_type p2 = data.find(_T("-----END PGP SIGNATURE-----")); + wstring::size_type p2 = data.find(L"-----END PGP SIGNATURE-----"); { std::wstring tmp = data.substr(p1, p2 - p1); strip_line_term(tmp); - HXML encrypted_data = xmlAddChild(node, _T("x"), tmp.c_str()); - xmlAddAttr(encrypted_data, _T("xmlns"), _T("jabber:x:signed")); + HXML encrypted_data = xmlAddChild(node, L"x", tmp.c_str()); + xmlAddAttr(encrypted_data, L"xmlns", L"jabber:x:signed"); } } break; @@ -822,16 +822,16 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface*, HXML node, void*) for (int n = 0; n <= xmlGetChildCount(node); n++) { LPCTSTR nodename = xmlGetName(local_node); if (nodename) { - if (_tcsstr(nodename, _T("x"))) { + if (_tcsstr(nodename, L"x")) { for (int i = 0; i < xmlGetAttrCount(local_node); i++) { LPCTSTR name = xmlGetAttrName(local_node, i); LPCTSTR value = xmlGetAttrValue(local_node, name); - if (_tcsstr(value, _T("jabber:x:signed"))) { + if (_tcsstr(value, L"jabber:x:signed")) { std::wstring status_str; HXML local_node2 = node; for (int k = 0; k <= xmlGetChildCount(node); k++) { LPCTSTR nodename2 = xmlGetName(local_node2); - if (_tcsstr(nodename2, _T("status"))) { + if (_tcsstr(nodename2, L"status")) { LPCTSTR status = xmlGetText(local_node2); if (status) status_str = status; @@ -840,11 +840,11 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface*, HXML node, void*) local_node2 = xmlGetChild(node, k); } LPCTSTR data = xmlGetText(local_node); - wstring sign = _T("-----BEGIN PGP SIGNATURE-----\n\n"); + wstring sign = L"-----BEGIN PGP SIGNATURE-----\n\n"; wstring file = toUTF16(get_random(10)), status_file = toUTF16(get_random(10)); sign += data; - sign += _T("\n-----END PGP SIGNATURE-----\n"); - TCHAR *path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + sign += L"\n-----END PGP SIGNATURE-----\n"; + TCHAR *path_c = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); wstring path_out = path_c, status_file_out = path_c; mir_free(path_c); path_out += L"\\tmp\\"; @@ -905,7 +905,7 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface*, HXML node, void*) for (unsigned int m = 0; m < Accounts.size(); m++, p++) { if (!(*p)) break; - hContact = (*p)->getJabberInterface()->ContactFromJID(xmlGetAttrValue(node, _T("from"))); + hContact = (*p)->getJabberInterface()->ContactFromJID(xmlGetAttrValue(node, L"from")); if (hContact) hcontact_data[hContact].key_in_prescense = out.substr(p1, p2 - p1 - 1).c_str(); } @@ -942,12 +942,12 @@ void AddHandlers() // if((*p)->getMessageHandler() == INVALID_HANDLE_VALUE) // (*p)->setMessageHandler((*p)->getJabberInterface()->AddMessageHandler((JABBER_HANDLER_FUNC)MessageHandler, JABBER_MESSAGE_TYPE_ANY ,NULL,NULL)); if (bAutoExchange) { - (*p)->getJabberInterface()->RegisterFeature(_T("GPG_Key_Auto_Exchange:0"), _T("Indicates that gpg installed and configured to public key auto exchange (currently implemented in new_gpg plugin for Miranda IM and Miranda NG)")); - (*p)->getJabberInterface()->AddFeatures(_T("GPG_Key_Auto_Exchange:0\0\0")); + (*p)->getJabberInterface()->RegisterFeature(L"GPG_Key_Auto_Exchange:0", L"Indicates that gpg installed and configured to public key auto exchange (currently implemented in new_gpg plugin for Miranda IM and Miranda NG)"); + (*p)->getJabberInterface()->AddFeatures(L"GPG_Key_Auto_Exchange:0\0\0"); } if (bFileTransfers) { - (*p)->getJabberInterface()->RegisterFeature(_T("GPG_Encrypted_FileTransfers:0"), _T("Indicates that gpg installed and configured to encrypt files (currently implemented in new_gpg plugin for Miranda IM and Miranda NG)")); - (*p)->getJabberInterface()->AddFeatures(_T("GPG_Encrypted_FileTransfers:0\0\0")); + (*p)->getJabberInterface()->RegisterFeature(L"GPG_Encrypted_FileTransfers:0", L"Indicates that gpg installed and configured to encrypt files (currently implemented in new_gpg plugin for Miranda IM and Miranda NG)"); + (*p)->getJabberInterface()->AddFeatures(L"GPG_Encrypted_FileTransfers:0\0\0"); } } } @@ -961,7 +961,7 @@ bool isContactSecured(MCONTACT hContact) return false; } if (!db_mc_isMeta(hContact)) { - TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); + TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", L""); if (!key[0]) { mir_free(key); if (bDebugLog) @@ -977,7 +977,7 @@ bool isContactSecured(MCONTACT hContact) bool isContactHaveKey(MCONTACT hContact) { - TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); + TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", L""); if (mir_tstrlen(key) > 0) { mir_free(key); return true; @@ -988,7 +988,7 @@ bool isContactHaveKey(MCONTACT hContact) bool isGPGKeyExist() { - TCHAR *id = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", _T("")); + TCHAR *id = UniGetContactSettingUtf(NULL, szGPGModuleName, "KeyID", L""); char *key = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); if (id[0] && key[0]) { mir_free(id); @@ -1003,7 +1003,7 @@ bool isGPGValid() { TCHAR *tmp = NULL; bool gpg_exists = false, is_valid = true; - tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", _T("")); + tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szGpgBinPath", L""); boost::filesystem::path p(tmp); if (boost::filesystem::exists(p) && boost::filesystem::is_regular_file(p)) @@ -1013,20 +1013,20 @@ bool isGPGValid() tmp = NULL; TCHAR *path = (TCHAR*)mir_alloc(sizeof(TCHAR)*MAX_PATH); TCHAR *mir_path = (TCHAR*)mir_alloc(MAX_PATH * sizeof(TCHAR)); - PathToAbsoluteW(_T("\\"), mir_path); + PathToAbsoluteW(L"\\", mir_path); SetCurrentDirectoryW(mir_path); tmp = mir_tstrdup(mir_path); mir_free(mir_path); //mir_realloc(path, (mir_tstrlen(path)+64)*sizeof(TCHAR)); TCHAR *gpg_path = (TCHAR*)mir_alloc(sizeof(TCHAR)*MAX_PATH); mir_tstrcpy(gpg_path, tmp); - mir_tstrcat(gpg_path, _T("\\GnuPG\\gpg.exe")); + mir_tstrcat(gpg_path, L"\\GnuPG\\gpg.exe"); mir_free(tmp); tmp = NULL; p = boost::filesystem::path(gpg_path); if (boost::filesystem::exists(p) && boost::filesystem::is_regular_file(p)) { gpg_exists = true; - mir_tstrcpy(path, _T("GnuPG\\gpg.exe")); + mir_tstrcpy(path, L"GnuPG\\gpg.exe"); } mir_free(gpg_path); tmp = mir_tstrdup(path); @@ -1059,8 +1059,8 @@ bool isGPGValid() } /* if(!gpg_exists) { - wstring path_ = _wgetenv(_T("APPDATA")); - path_ += _T("\\GnuPG"); + wstring path_ = _wgetenv(L"APPDATA"); + path_ += L"\\GnuPG"; tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", (TCHAR*)path_.c_str()); } if(tmp) @@ -1248,7 +1248,7 @@ bool isTabsrmmUsed() void ExportGpGKeysFunc(int type) { - TCHAR *p = GetFilePath(_T("Choose file to export keys"), _T("*"), _T("Any file"), true); + TCHAR *p = GetFilePath(L"Choose file to export keys", L"*", L"Any file", true); if (!p || !p[0]) { delete[] p; //TODO: handle error @@ -1430,7 +1430,7 @@ INT_PTR ExportGpGKeys(WPARAM, LPARAM) INT_PTR ImportGpGKeys(WPARAM, LPARAM) { - TCHAR *p = GetFilePath(_T("Choose file to import keys from"), _T("*"), _T("Any file")); + TCHAR *p = GetFilePath(L"Choose file to import keys from", L"*", L"Any file"); if (!p || !p[0]) { delete[] p; //TODO: handle error @@ -1616,7 +1616,7 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM) string output; DWORD exitcode; { - ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); path = ptmp; mir_free(ptmp); wstring rand = toUTF16(get_random(10)); @@ -1721,11 +1721,11 @@ INT_PTR ImportGpGKeys(WPARAM, LPARAM) string output; DWORD exitcode; { - ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); _tcsncpy(tmp2, ptmp, MAX_PATH - 1); mir_free(ptmp); - mir_tstrncat(tmp2, _T("\\"), _countof(tmp2) - mir_tstrlen(tmp2)); - mir_tstrncat(tmp2, _T("temporary_exported.asc"), _countof(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, L"\\", _countof(tmp2) - mir_tstrlen(tmp2)); + mir_tstrncat(tmp2, L"temporary_exported.asc", _countof(tmp2) - mir_tstrlen(tmp2)); boost::filesystem::remove(tmp2); wfstream f(tmp2, std::ios::out); f << toUTF16(key).c_str(); @@ -1770,15 +1770,15 @@ void fix_line_term(std::wstring &s) { if (s.empty()) return; - boost::algorithm::erase_all(s, _T("\r\r")); + boost::algorithm::erase_all(s, L"\r\r"); } void strip_line_term(std::wstring &s) { if (s.empty()) return; - boost::algorithm::erase_all(s, _T("\r")); - boost::algorithm::erase_all(s, _T("\n")); + boost::algorithm::erase_all(s, L"\r"); + boost::algorithm::erase_all(s, L"\n"); } void strip_line_term(std::string &s) @@ -1909,7 +1909,7 @@ static INT_PTR CALLBACK DlgProcChangePasswd(HWND hwndDlg, UINT msg, WPARAM wPara GetDlgItemText(hwndDlg, IDC_OLD_PASSWD, buf, _countof(buf)); old_pass = toUTF8(buf); bool old_pass_match = false; - TCHAR *pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); + TCHAR *pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L""); if (!mir_tstrcmp(pass, buf)) old_pass_match = true; mir_free(pass); @@ -1919,7 +1919,7 @@ static INT_PTR CALLBACK DlgProcChangePasswd(HWND hwndDlg, UINT msg, WPARAM wPara string dbsetting = "szKey_"; dbsetting += toUTF8(key_id_global); dbsetting += "_Password"; - pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), _T("")); + pass = UniGetContactSettingUtf(NULL, szGPGModuleName, dbsetting.c_str(), L""); if (!mir_tstrcmp(pass, buf)) old_pass_match = true; mir_free(pass); @@ -1991,7 +1991,7 @@ void clean_temp_dir() wstring path = toUTF16(mir_path); SetCurrentDirectoryA(mir_path); delete[] mir_path; - TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", L""); path += tmp; mir_free(tmp); path += L"\\tmp"; diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index d152cca932..c9967ba341 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
{
- Netlib_LogfT(hNetlibUser, _T("Started validating feed %s."), tszURL);
+ Netlib_LogfT(hNetlibUser, L"Started validating feed %s.", tszURL);
char *szData = NULL;
GetNewsData(tszURL, &szData, NULL, hwndDlg);
if (szData) {
@@ -36,11 +36,11 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg) LPCTSTR codepage = NULL;
int childcount = 0;
HXML node;
- if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
+ if (!mir_tstrcmpi(xmlGetName(hXml), L"xml")) {
int attrcount = xmlGetAttrCount(hXml);
for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
- if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
+ if (!mir_tstrcmpi(szAttrName, L"encoding")) {
codepage = xmlGetAttrValue(hXml, szAttrName);
break;
}
@@ -51,15 +51,15 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg) node = hXml;
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, L"rss") || !mir_tstrcmpi(szNodeName, L"rdf")) {
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"title")) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
return mir_tstrdup(buf);
@@ -69,14 +69,14 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg) }
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("title"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"title")) {
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION);
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
return mir_tstrdup(buf);
@@ -91,7 +91,7 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg) }
xmlDestroyNode(hXml);
}
- Netlib_LogfT(hNetlibUser, _T("%s is not a valid feed's address."), tszURL);
+ Netlib_LogfT(hNetlibUser, L"%s is not a valid feed's address.", tszURL);
TCHAR mes[MAX_PATH];
mir_sntprintf(mes, TranslateT("%s\nis not a valid feed's address."), tszURL);
MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONERROR);
@@ -105,39 +105,39 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin message = TAGSDEFAULT;
if (title.IsEmpty())
- message.Replace(_T("#<title>#"), TranslateT("empty"));
+ message.Replace(L"#<title>#", TranslateT("empty"));
else
- message.Replace(_T("#<title>#"), title);
+ message.Replace(L"#<title>#", title);
if (link.IsEmpty())
- message.Replace(_T("#<link>#"), TranslateT("empty"));
+ message.Replace(L"#<link>#", TranslateT("empty"));
else
- message.Replace(_T("#<link>#"), link);
+ message.Replace(L"#<link>#", link);
if (descr.IsEmpty())
- message.Replace(_T("#<description>#"), TranslateT("empty"));
+ message.Replace(L"#<description>#", TranslateT("empty"));
else
- message.Replace(_T("#<description>#"), descr);
+ message.Replace(L"#<description>#", descr);
if (author.IsEmpty())
- message.Replace(_T("#<author>#"), TranslateT("empty"));
+ message.Replace(L"#<author>#", TranslateT("empty"));
else
- message.Replace(_T("#<author>#"), author);
+ message.Replace(L"#<author>#", author);
if (comments.IsEmpty())
- message.Replace(_T("#<comments>#"), TranslateT("empty"));
+ message.Replace(L"#<comments>#", TranslateT("empty"));
else
- message.Replace(_T("#<comments>#"), comments);
+ message.Replace(L"#<comments>#", comments);
if (guid.IsEmpty())
- message.Replace(_T("#<guid>#"), TranslateT("empty"));
+ message.Replace(L"#<guid>#", TranslateT("empty"));
else
- message.Replace(_T("#<guid>#"), guid);
+ message.Replace(L"#<guid>#", guid);
if (category.IsEmpty())
- message.Replace(_T("#<category>#"), TranslateT("empty"));
+ message.Replace(L"#<category>#", TranslateT("empty"));
else
- message.Replace(_T("#<category>#"), category);
+ message.Replace(L"#<category>#", category);
DBEVENTINFO olddbei = { 0 };
olddbei.cbSize = sizeof(olddbei);
@@ -187,7 +187,7 @@ void CheckCurrentFeed(MCONTACT hContact) if (szURL == NULL)
return;
- Netlib_LogfT(hNetlibUser, _T("Started checking feed %s."), szURL);
+ Netlib_LogfT(hNetlibUser, L"Started checking feed %s.", szURL);
char *szData = NULL;
GetNewsData(szURL, &szData, hContact, NULL);
@@ -207,11 +207,11 @@ void CheckCurrentFeed(MCONTACT hContact) LPCTSTR codepage = NULL;
int childcount = 0;
HXML node;
- if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
+ if (!mir_tstrcmpi(xmlGetName(hXml), L"xml")) {
int attrcount = xmlGetAttrCount(hXml);
for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
- if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
+ if (!mir_tstrcmpi(szAttrName, L"encoding")) {
codepage = xmlGetAttrValue(hXml, szAttrName);
break;
}
@@ -222,29 +222,29 @@ void CheckCurrentFeed(MCONTACT hContact) node = hXml;
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- bool isRSS = !mir_tstrcmpi(szNodeName, _T("rss")), isAtom = !mir_tstrcmpi(szNodeName, _T("rdf"));
+ bool isRSS = !mir_tstrcmpi(szNodeName, L"rss"), isAtom = !mir_tstrcmpi(szNodeName, L"rdf");
if (isRSS || isAtom) {
if (isRSS) {
for (int i = 0; i < xmlGetAttrCount(node); i++) {
LPCTSTR szAttrName = xmlGetAttrName(node, i);
- if (!mir_tstrcmpi(szAttrName, _T("version"))) {
+ if (!mir_tstrcmpi(szAttrName, L"version")) {
TCHAR ver[MAX_PATH];
- mir_sntprintf(ver, _T("RSS %s"), xmlGetAttrValue(node, szAttrName));
+ mir_sntprintf(ver, L"RSS %s", xmlGetAttrValue(node, szAttrName));
db_set_ts(hContact, MODULE, "MirVer", ver);
break;
}
}
}
else if (isAtom)
- db_set_ts(hContact, MODULE, "MirVer", _T("RSS 1.0"));
+ db_set_ts(hContact, MODULE, "MirVer", L"RSS 1.0");
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
LPCTSTR childName = xmlGetName(child);
- if (!mir_tstrcmpi(childName, _T("title"))) {
+ if (!mir_tstrcmpi(childName, L"title")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -254,9 +254,9 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("link"))) {
+ else if (!mir_tstrcmpi(childName, L"link")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -266,9 +266,9 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("description"))) {
+ else if (!mir_tstrcmpi(childName, L"description")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -281,9 +281,9 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!mir_tstrcmpi(childName, _T("language"))) {
+ else if (!mir_tstrcmpi(childName, L"language")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -293,9 +293,9 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("managingEditor"))) {
+ else if (!mir_tstrcmpi(childName, L"managingEditor")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -305,9 +305,9 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("category"))) {
+ else if (!mir_tstrcmpi(childName, L"category")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -317,9 +317,9 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(childName, _T("copyright"))) {
+ else if (!mir_tstrcmpi(childName, L"copyright")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -329,10 +329,10 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText)
db_set_s(hContact, "UserInfo", "MyNotes", _T2A(ClearText(szValue, szChildText)));
}
- else if (!mir_tstrcmpi(childName, _T("image"))) {
+ else if (!mir_tstrcmpi(childName, L"image")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -345,8 +345,8 @@ void CheckCurrentFeed(MCONTACT hContact) ai.format = ProtoGetAvatarFormat(url);
CMString filename = szNick;
- filename.Replace(_T("/"), _T("_"));
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename.c_str(), ext);
+ filename.Replace(L"/", L"_");
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename.c_str(), ext);
CreateDirectoryTreeT(tszRoot);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
@@ -359,9 +359,9 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(childName, _T("lastBuildDate"))) {
+ else if (!mir_tstrcmpi(childName, L"lastBuildDate")) {
LPCTSTR szChildText = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(child)), -1, buf, _countof(buf));
szChildText = buf;
@@ -379,14 +379,14 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(childName, _T("item"))) {
+ else if (!mir_tstrcmpi(childName, L"item")) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
LPCTSTR itemName = xmlGetName(itemval);
LPCTSTR value = NULL;
- if (!mir_tstrcmpi(codepage, _T("koi8-r"))) {
+ if (!mir_tstrcmpi(codepage, L"koi8-r")) {
TCHAR buf[MAX_PATH];
MultiByteToWideChar(20866, 0, _T2A(xmlGetText(itemval)), -1, buf, _countof(buf));
value = buf;
@@ -395,29 +395,29 @@ void CheckCurrentFeed(MCONTACT hContact) value = xmlGetText(itemval);
// We only use the first tag for now and ignore the rest.
- if (!mir_tstrcmpi(itemName, _T("title")))
+ if (!mir_tstrcmpi(itemName, L"title"))
ClearText(title, value);
- else if (!mir_tstrcmpi(itemName, _T("link")))
+ else if (!mir_tstrcmpi(itemName, L"link"))
ClearText(link, value);
- else if (!mir_tstrcmpi(itemName, _T("pubDate")) || !mir_tstrcmpi(itemName, _T("date"))) {
+ else if (!mir_tstrcmpi(itemName, L"pubDate") || !mir_tstrcmpi(itemName, L"date")) {
if (stamp == 0)
stamp = DateToUnixTime(value, 0);
}
- else if (!mir_tstrcmpi(itemName, _T("description")) || !mir_tstrcmpi(itemName, _T("encoded")))
+ else if (!mir_tstrcmpi(itemName, L"description") || !mir_tstrcmpi(itemName, L"encoded"))
ClearText(descr, value);
- else if (!mir_tstrcmpi(itemName, _T("author")) || !mir_tstrcmpi(itemName, _T("creator")))
+ else if (!mir_tstrcmpi(itemName, L"author") || !mir_tstrcmpi(itemName, L"creator"))
ClearText(author, value);
- else if (!mir_tstrcmpi(itemName, _T("comments")))
+ else if (!mir_tstrcmpi(itemName, L"comments"))
ClearText(comments, value);
- else if (!mir_tstrcmpi(itemName, _T("guid")))
+ else if (!mir_tstrcmpi(itemName, L"guid"))
ClearText(guid, value);
- else if (!mir_tstrcmpi(itemName, _T("category")))
+ else if (!mir_tstrcmpi(itemName, L"category"))
ClearText(category, value);
}
@@ -425,27 +425,27 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
- db_set_ts(hContact, MODULE, "MirVer", _T("Atom 3"));
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
+ db_set_ts(hContact, MODULE, "MirVer", L"Atom 3");
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
LPCTSTR szChildName = xmlGetName(child);
- if (!mir_tstrcmpi(szChildName, _T("title"))) {
+ if (!mir_tstrcmpi(szChildName, L"title")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("link"))) {
+ else if (!mir_tstrcmpi(szChildName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(child); x++) {
- if (!mir_tstrcmpi(xmlGetAttrName(child, x), _T("rel")))
- if (!mir_tstrcmpi(xmlGetAttrValue(child, xmlGetAttrName(child, x)), _T("self")))
+ if (!mir_tstrcmpi(xmlGetAttrName(child, x), L"rel"))
+ if (!mir_tstrcmpi(xmlGetAttrValue(child, xmlGetAttrName(child, x)), L"self"))
break;
- if (!mir_tstrcmpi(xmlGetAttrName(child, x), _T("href")))
+ if (!mir_tstrcmpi(xmlGetAttrName(child, x), L"href"))
db_set_ts(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
}
}
- else if (!mir_tstrcmpi(szChildName, _T("subtitle"))) {
+ else if (!mir_tstrcmpi(szChildName, L"subtitle")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
@@ -453,29 +453,29 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue);
}
}
- else if (!mir_tstrcmpi(szChildName, _T("language"))) {
+ else if (!mir_tstrcmpi(szChildName, L"language")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("author"))) {
+ else if (!mir_tstrcmpi(szChildName, L"author")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML authorval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(authorval), _T("email"))) {
+ if (!mir_tstrcmpi(xmlGetName(authorval), L"email")) {
db_set_ts(hContact, MODULE, "e-mail", xmlGetText(authorval));
break;
}
}
}
- else if (!mir_tstrcmpi(szChildName, _T("category"))) {
+ else if (!mir_tstrcmpi(szChildName, L"category")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
- else if (!mir_tstrcmpi(szChildName, _T("icon"))) {
+ else if (!mir_tstrcmpi(szChildName, L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -487,7 +487,7 @@ void CheckCurrentFeed(MCONTACT hContact) ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
@@ -498,7 +498,7 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(szChildName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szChildName, L"updated")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
TCHAR *lastupdtime = (TCHAR *)szChildText;
@@ -512,57 +512,57 @@ void CheckCurrentFeed(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(szChildName, _T("entry"))) {
+ else if (!mir_tstrcmpi(szChildName, L"entry")) {
CMString title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
LPCTSTR szItemName = xmlGetName(itemval);
- if (!mir_tstrcmpi(szItemName, _T("title"))) {
+ if (!mir_tstrcmpi(szItemName, L"title")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(title, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("link"))) {
+ else if (!mir_tstrcmpi(szItemName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(itemval); x++) {
- if (!mir_tstrcmpi(xmlGetAttrName(itemval, x), _T("href"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(itemval, x), L"href")) {
ClearText(link, xmlGetAttrValue(itemval, xmlGetAttrName(itemval, x)));
break;
}
}
}
- else if (!mir_tstrcmpi(szItemName, _T("updated"))) {
+ else if (!mir_tstrcmpi(szItemName, L"updated")) {
if (stamp == 0)
stamp = DateToUnixTime(xmlGetText(itemval), 0);
}
- else if (!mir_tstrcmpi(szItemName, _T("summary")) || !mir_tstrcmpi(szItemName, _T("content"))) {
+ else if (!mir_tstrcmpi(szItemName, L"summary") || !mir_tstrcmpi(szItemName, L"content")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(descr, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("author"))) {
+ else if (!mir_tstrcmpi(szItemName, L"author")) {
for (int x = 0; x < xmlGetChildCount(itemval); x++) {
HXML authorval = xmlGetChild(itemval, x);
- if (!mir_tstrcmpi(xmlGetName(authorval), _T("name")) && xmlGetText(authorval)) {
+ if (!mir_tstrcmpi(xmlGetName(authorval), L"name") && xmlGetText(authorval)) {
ClearText(author, xmlGetText(authorval));
break;
}
}
}
- else if (!mir_tstrcmpi(szItemName, _T("comments"))) {
+ else if (!mir_tstrcmpi(szItemName, L"comments")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(comments, szItemText);
}
- else if (!mir_tstrcmpi(szItemName, _T("id"))) {
+ else if (!mir_tstrcmpi(szItemName, L"id")) {
LPCTSTR szItemText = xmlGetText(itemval);
if (szItemText)
ClearText(guid, xmlGetText(itemval));
}
- else if (!mir_tstrcmpi(szItemName, _T("category"))) {
+ else if (!mir_tstrcmpi(szItemName, L"category")) {
for (int x = 0; x < xmlGetAttrCount(itemval); x++) {
LPCTSTR szAttrName = xmlGetAttrName(itemval, x);
- if (!mir_tstrcmpi(szAttrName, _T("term")) && xmlGetText(itemval)) {
+ if (!mir_tstrcmpi(szAttrName, L"term") && xmlGetText(itemval)) {
ClearText(category, xmlGetAttrValue(itemval, szAttrName));
break;
}
@@ -612,14 +612,14 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) HXML node = xmlGetChild(hXml, childcount);
while (node) {
LPCTSTR szNodeName = xmlGetName(node);
- if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) {
+ if (!mir_tstrcmpi(szNodeName, L"rss") || !mir_tstrcmpi(szNodeName, L"rdf")) {
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
HXML child = xmlGetChild(chan, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("image"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"image")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -632,7 +632,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
@@ -646,13 +646,13 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) }
}
}
- else if (!mir_tstrcmpi(szNodeName, _T("feed"))) {
+ else if (!mir_tstrcmpi(szNodeName, L"feed")) {
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
- if (!mir_tstrcmpi(xmlGetName(child), _T("icon"))) {
+ if (!mir_tstrcmpi(xmlGetName(child), L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
- if (!mir_tstrcmpi(xmlGetName(imageval), _T("url"))) {
+ if (!mir_tstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
db_set_ts(hContact, MODULE, "ImageURL", url);
@@ -665,7 +665,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) ai.format = ProtoGetAvatarFormat(ext);
TCHAR *filename = szNick;
- mir_sntprintf(ai.filename, _T("%s\\%s.%s"), tszRoot, filename, ext);
+ mir_sntprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 7f2f403941..cbaac0f4b3 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -47,16 +47,16 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if(hXml != NULL) {
HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
bool isTextUTF = false, isURLUTF = false, isSiteURLUTF = false, isGroupUTF = false;
- HXML node = xmlGetChildByPath(hXml, _T("opml/body/outline"), 0);
+ HXML node = xmlGetChildByPath(hXml, L"opml/body/outline", 0);
if ( !node)
- node = xmlGetChildByPath(hXml, _T("body/outline"), 0);
+ node = xmlGetChildByPath(hXml, L"body/outline", 0);
int count = (int)SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0);
int DUPES = 0;
if (node) {
while (node) {
int outlineAttr = xmlGetAttrCount(node);
int outlineChildsCount = xmlGetChildCount(node);
- TCHAR *xmlUrl = (TCHAR *)xmlGetAttrValue(node, _T("xmlUrl"));
+ TCHAR *xmlUrl = (TCHAR *)xmlGetAttrValue(node, L"xmlUrl");
if (!xmlUrl && !outlineChildsCount) {
HXML tmpnode = node;
node = xmlGetNextNode(node);
@@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xmlGetNextNode(node);
if (node)
break;
- } while (mir_tstrcmpi(xmlGetName(node), _T("body")));
+ } while (mir_tstrcmpi(xmlGetName(node), L"body"));
}
}
else if (!xmlUrl && outlineChildsCount)
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TCHAR *text = NULL, *url = NULL, *siteurl = NULL, *group = NULL;
BYTE NeedToImport = FALSE;
for (int i = 0; i < outlineAttr; i++) {
- if (!mir_tstrcmpi(xmlGetAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(node, i), L"text")) {
text = mir_utf8decodeT(_T2A(xmlGetAttrValue(node, xmlGetAttrName(node, i))));
if (!text) {
isTextUTF = 0;
@@ -95,7 +95,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
continue;
}
- if (!mir_tstrcmpi(xmlGetAttrName(node, i), _T("xmlUrl"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(node, i), L"xmlUrl")) {
url = mir_utf8decodeT(_T2A(xmlGetAttrValue(node, xmlGetAttrName(node, i))));
if ( !url) {
isURLUTF = false;
@@ -108,7 +108,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
continue;
}
- if (!mir_tstrcmpi(xmlGetAttrName(node, i), _T("htmlUrl"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(node, i), L"htmlUrl")) {
siteurl = mir_utf8decodeT(_T2A(xmlGetAttrValue(node, xmlGetAttrName(node, i))));
if ( !siteurl) {
isSiteURLUTF = false;
@@ -124,13 +124,13 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (NeedToImport) {
HXML parent = xmlGetParent(node);
TCHAR tmpgroup[1024];
- while (mir_tstrcmpi(xmlGetName(parent), _T("body"))) {
+ while (mir_tstrcmpi(xmlGetName(parent), L"body")) {
for (int i = 0; i < xmlGetAttrCount(parent); i++) {
- if (!mir_tstrcmpi(xmlGetAttrName(parent, i), _T("text"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(parent, i), L"text")) {
if ( !group)
group = (TCHAR *)xmlGetAttrValue(parent, xmlGetAttrName(parent, i));
else {
- mir_sntprintf(tmpgroup, _T("%s\\%s"), xmlGetAttrValue(parent, xmlGetAttrName(parent, i)), group);
+ mir_sntprintf(tmpgroup, L"%s\\%s", xmlGetAttrValue(parent, xmlGetAttrName(parent, i)), group);
group = tmpgroup;
}
break;
@@ -183,7 +183,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (node)
break;
}
- while (mir_tstrcmpi(xmlGetName(tmpnode), _T("body")));
+ while (mir_tstrcmpi(xmlGetName(tmpnode), L"body"));
}
}
}
@@ -209,12 +209,12 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_BROWSEIMPORTFILE:
{
TCHAR FileName[MAX_PATH];
- VARST tszMirDir(_T("%miranda_path%"));
+ VARST tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, _T("%s (*.opml, *.xml)%c*.opml;*.xml%c%c"), TranslateT("OPML files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.opml, *.xml)%c*.opml;*.xml%c%c", TranslateT("OPML files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
@@ -223,20 +223,20 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = tszMirDir;
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn)) {
int bytesParsed = 0;
HXML hXml = xmlParseFile(FileName, &bytesParsed, NULL);
if(hXml != NULL) {
- HXML node = xmlGetChildByPath(hXml, _T("opml/body/outline"), 0);
+ HXML node = xmlGetChildByPath(hXml, L"opml/body/outline", 0);
if ( !node)
- node = xmlGetChildByPath(hXml, _T("body/outline"), 0);
+ node = xmlGetChildByPath(hXml, L"body/outline", 0);
if (node) {
while (node) {
int outlineAttr = xmlGetAttrCount(node);
int outlineChildsCount = xmlGetChildCount(node);
- TCHAR *xmlUrl = (TCHAR *)xmlGetAttrValue(node, _T("xmlUrl"));
+ TCHAR *xmlUrl = (TCHAR *)xmlGetAttrValue(node, L"xmlUrl");
if (!xmlUrl && !outlineChildsCount) {
HXML tmpnode = node;
node = xmlGetNextNode(node);
@@ -248,14 +248,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xmlGetNextNode(node);
if (node)
break;
- } while (mir_tstrcmpi(xmlGetName(node), _T("body")));
+ } while (mir_tstrcmpi(xmlGetName(node), L"body"));
}
}
else if (!xmlUrl && outlineChildsCount)
node = xmlGetFirstChild(node);
else if (xmlUrl) {
for (int i = 0; i < outlineAttr; i++) {
- if (!mir_tstrcmpi(xmlGetAttrName(node, i), _T("text"))) {
+ if (!mir_tstrcmpi(xmlGetAttrName(node, i), L"text")) {
TCHAR *text = mir_utf8decodeT(_T2A(xmlGetAttrValue(node, xmlGetAttrName(node, i))));
bool isTextUTF;
if (!text) {
@@ -282,7 +282,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xmlGetNextNode(node);
if (node)
break;
- } while (mir_tstrcmpi(xmlGetName(tmpnode), _T("body")));
+ } while (mir_tstrcmpi(xmlGetName(tmpnode), L"body"));
}
}
}
@@ -472,12 +472,12 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDOK:
{
TCHAR FileName[MAX_PATH];
- VARST tszMirDir(_T("%miranda_path%"));
+ VARST tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, _T("%s (*.opml)%c*.opml%c%c"), TranslateT("OPML files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.opml)%c*.opml%c%c", TranslateT("OPML files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
@@ -486,14 +486,14 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.Flags = OFN_HIDEREADONLY | OFN_SHAREAWARE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
ofn.lpstrInitialDir = tszMirDir;
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetSaveFileName(&ofn)) {
- HXML hXml = xmlCreateNode(_T("opml"), NULL, FALSE);
- xmlAddAttr(hXml, _T("version"), _T("1.0"));
- HXML header = xmlAddChild(hXml, _T("head"), NULL);
- xmlAddChild(header, _T("title"), _T("Miranda NG NewsAggregator plugin export"));
- header = xmlAddChild(hXml, _T("body"), NULL);
+ HXML hXml = xmlCreateNode(L"opml", NULL, FALSE);
+ xmlAddAttr(hXml, L"version", L"1.0");
+ HXML header = xmlAddChild(hXml, L"head", NULL);
+ xmlAddChild(header, L"title", L"Miranda NG NewsAggregator plugin export");
+ header = xmlAddChild(hXml, L"body", NULL);
int count = (int)SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
@@ -509,29 +509,29 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM HXML elem = header;
if (group)
{
- TCHAR *section = _tcstok(group, _T("\\"));
+ TCHAR *section = _tcstok(group, L"\\");
while (section != NULL)
{
- HXML existgroup = xmlGetChildByAttrValue(header, _T("outline"), _T("title"), section);
+ HXML existgroup = xmlGetChildByAttrValue(header, L"outline", L"title", section);
if ( !existgroup)
{
- elem = xmlAddChild(elem, _T("outline"), NULL);
- xmlAddAttr(elem, _T("title"), section);
- xmlAddAttr(elem, _T("text"), section);
+ elem = xmlAddChild(elem, L"outline", NULL);
+ xmlAddAttr(elem, L"title", section);
+ xmlAddAttr(elem, L"text", section);
} else {
elem = existgroup;
}
- section = _tcstok(NULL, _T("\\"));
+ section = _tcstok(NULL, L"\\");
}
- elem = xmlAddChild(elem, _T("outline"), NULL);
+ elem = xmlAddChild(elem, L"outline", NULL);
}
else
- elem = xmlAddChild(elem, _T("outline"), NULL);
- xmlAddAttr(elem, _T("text"), title);
- xmlAddAttr(elem, _T("title"), title);
- xmlAddAttr(elem, _T("type"), _T("rss"));
- xmlAddAttr(elem, _T("xmlUrl"), url);
- xmlAddAttr(elem, _T("htmlUrl"), siteurl);
+ elem = xmlAddChild(elem, L"outline", NULL);
+ xmlAddAttr(elem, L"text", title);
+ xmlAddAttr(elem, L"title", title);
+ xmlAddAttr(elem, L"type", L"rss");
+ xmlAddAttr(elem, L"xmlUrl", url);
+ xmlAddAttr(elem, L"htmlUrl", siteurl);
mir_free(title);
mir_free(url);
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 9420c88f79..74fdfc6f71 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -26,7 +26,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
SetWindowText(hwndDlg, TranslateT("Add Feed"));
- SetDlgItemText(hwndDlg, IDC_FEEDURL, _T("http://"));
+ SetDlgItemText(hwndDlg, IDC_FEEDURL, L"http://");
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, TAGSDEFAULT);
SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0);
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DEFAULT_UPDATE_TIME, TRUE);
@@ -44,7 +44,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, L"http://") == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -95,14 +95,14 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_TAGHELP:
TCHAR tszTagHelp[1024];
- mir_sntprintf(tszTagHelp, _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
- _T("#<title>#"), TranslateT("The title of the item."),
- _T("#<description>#"), TranslateT("The item synopsis."),
- _T("#<link>#"), TranslateT("The URL of the item."),
- _T("#<author>#"), TranslateT("Email address of the author of the item."),
- _T("#<comments>#"), TranslateT("URL of a page for comments relating to the item."),
- _T("#<guid>#"), TranslateT("A string that uniquely identifies the item."),
- _T("#<category>#"), TranslateT("Specify one or more categories that the item belongs to."));
+ mir_sntprintf(tszTagHelp, L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
+ L"#<title>#", TranslateT("The title of the item."),
+ L"#<description>#", TranslateT("The item synopsis."),
+ L"#<link>#", TranslateT("The URL of the item."),
+ L"#<author>#", TranslateT("Email address of the author of the item."),
+ L"#<comments>#", TranslateT("URL of a page for comments relating to the item."),
+ L"#<guid>#", TranslateT("A string that uniquely identifies the item."),
+ L"#<category>#", TranslateT("Specify one or more categories that the item belongs to."));
MessageBox(hwndDlg, tszTagHelp, TranslateT("Feed Tag Help"), MB_OK);
break;
@@ -116,7 +116,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR tszURL[MAX_PATH] = { 0 };
TCHAR *tszTitle = NULL;
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0)
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, L"http://") != 0)
tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
else
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
@@ -203,7 +203,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, L"http://") == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -255,14 +255,14 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_TAGHELP:
TCHAR tszTagHelp[1024];
- mir_sntprintf(tszTagHelp, _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
- _T("#<title>#"), TranslateT("The title of the item."),
- _T("#<description>#"), TranslateT("The item synopsis."),
- _T("#<link>#"), TranslateT("The URL of the item."),
- _T("#<author>#"), TranslateT("Email address of the author of the item."),
- _T("#<comments>#"), TranslateT("URL of a page for comments relating to the item."),
- _T("#<guid>#"), TranslateT("A string that uniquely identifies the item."),
- _T("#<category>#"), TranslateT("Specify one or more categories that the item belongs to."));
+ mir_sntprintf(tszTagHelp, L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
+ L"#<title>#", TranslateT("The title of the item."),
+ L"#<description>#", TranslateT("The item synopsis."),
+ L"#<link>#", TranslateT("The URL of the item."),
+ L"#<author>#", TranslateT("Email address of the author of the item."),
+ L"#<comments>#", TranslateT("URL of a page for comments relating to the item."),
+ L"#<guid>#", TranslateT("A string that uniquely identifies the item."),
+ L"#<category>#", TranslateT("Specify one or more categories that the item belongs to."));
MessageBox(hwndDlg, tszTagHelp, TranslateT("Feed Tag Help"), MB_OK);
break;
@@ -273,7 +273,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, L"http://") != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
@@ -361,7 +361,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK);
break;
}
- if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, _T("http://")) == 0) {
+ if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str)) || mir_tstrcmp(str, L"http://") == 0) {
MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK);
break;
}
@@ -411,14 +411,14 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_TAGHELP:
TCHAR tszTagHelp[1024];
- mir_sntprintf(tszTagHelp, _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
- _T("#<title>#"), TranslateT("The title of the item."),
- _T("#<description>#"), TranslateT("The item synopsis."),
- _T("#<link>#"), TranslateT("The URL of the item."),
- _T("#<author>#"), TranslateT("Email address of the author of the item."),
- _T("#<comments>#"), TranslateT("URL of a page for comments relating to the item."),
- _T("#<guid>#"), TranslateT("A string that uniquely identifies the item."),
- _T("#<category>#"), TranslateT("Specify one or more categories that the item belongs to."));
+ mir_sntprintf(tszTagHelp, L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
+ L"#<title>#", TranslateT("The title of the item."),
+ L"#<description>#", TranslateT("The item synopsis."),
+ L"#<link>#", TranslateT("The URL of the item."),
+ L"#<author>#", TranslateT("Email address of the author of the item."),
+ L"#<comments>#", TranslateT("URL of a page for comments relating to the item."),
+ L"#<guid>#", TranslateT("A string that uniquely identifies the item."),
+ L"#<category>#", TranslateT("Specify one or more categories that the item belongs to."));
MessageBox(hwndDlg, tszTagHelp, TranslateT("Feed Tag Help"), MB_OK);
break;
@@ -429,7 +429,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY:
TCHAR tszURL[MAX_PATH] = { 0 };
- if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) {
+ if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, _countof(tszURL)) || mir_tstrcmp(tszURL, L"http://") != 0) {
EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE);
SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait..."));
TCHAR *tszTitle = (TCHAR*)CheckFeed(tszURL, hwndDlg);
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index c021e5f6fa..bc2d5dabe6 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -31,16 +31,16 @@ void SetContactStatus(MCONTACT hContact, int nNewStatus) int OnFoldersChanged(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, L"");
return 0;
}
int NewsAggrInit(WPARAM, LPARAM)
{
- if (hNewsAggregatorFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("News Aggregator"), MIRANDA_USERDATAT _T("\\Avatars\\")_T(DEFAULT_AVATARS_FOLDER)))
- FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, _T(""));
+ if (hNewsAggregatorFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("News Aggregator"), MIRANDA_USERDATAT L"\\Avatars\\" DEFAULT_AVATARS_FOLDER))
+ FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, L"");
else
- mir_tstrncpy(tszRoot, VARST( _T("%miranda_userdata%\\Avatars\\" _T(DEFAULT_AVATARS_FOLDER))), _countof(tszRoot));
+ mir_tstrncpy(tszRoot, VARST(L"%miranda_userdata%\\Avatars\\" DEFAULT_AVATARS_FOLDER), _countof(tszRoot));
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 4886377782..d79697cbc4 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -45,14 +45,14 @@ void NetlibUnInit() void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg)
{
- Netlib_LogfT(hNetlibUser, _T("Getting feed data %s."), tszUrl);
+ Netlib_LogfT(hNetlibUser, L"Getting feed data %s.", tszUrl);
NETLIBHTTPREQUEST nlhr = { 0 };
// initialize the netlib request
nlhr.cbSize = sizeof(nlhr);
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_REDIRECT;
- if (_tcsstr(tszUrl, _T("https://")) != NULL)
+ if (_tcsstr(tszUrl, L"https://") != NULL)
nlhr.flags |= NLHRF_SSL;
char *szUrl = mir_t2a(tszUrl);
nlhr.szUrl = szUrl;
@@ -84,14 +84,14 @@ void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg) if (nlhrReply) {
// if the recieved code is 200 OK
if (nlhrReply->resultCode == 200 && nlhrReply->dataLength > 0) {
- Netlib_LogfT(hNetlibUser, _T("Code 200: Succeeded getting feed data %s."), tszUrl);
+ Netlib_LogfT(hNetlibUser, L"Code 200: Succeeded getting feed data %s.", tszUrl);
// allocate memory and save the retrieved data
*szData = (char *)mir_alloc((size_t)(nlhrReply->dataLength + 2));
memcpy(*szData, nlhrReply->pData, (size_t)nlhrReply->dataLength);
(*szData)[nlhrReply->dataLength] = 0;
}
else if (nlhrReply->resultCode == 401) {
- Netlib_LogfT(hNetlibUser, _T("Code 401: feed %s needs auth data."), tszUrl);
+ Netlib_LogfT(hNetlibUser, L"Code 401: feed %s needs auth data.", tszUrl);
ItemInfo SelItem = { 0 };
SelItem.hwndList = hwndDlg;
SelItem.hContact = hContact;
@@ -99,11 +99,11 @@ void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg) GetNewsData(tszUrl, szData, hContact, hwndDlg);
}
else
- Netlib_LogfT(hNetlibUser, _T("Code %d: Failed getting feed data %s."), nlhrReply->resultCode, tszUrl);
+ Netlib_LogfT(hNetlibUser, L"Code %d: Failed getting feed data %s.", nlhrReply->resultCode, tszUrl);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
}
else
- Netlib_LogfT(hNetlibUser, _T("Failed getting feed data %s, no response."), tszUrl);
+ Netlib_LogfT(hNetlibUser, L"Failed getting feed data %s, no response.", tszUrl);
mir_free(szUrl);
}
@@ -193,56 +193,56 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) else {
TCHAR *weekday, monthstr[4], timezonesign[2];
int day, month = 0, year, hour, min, sec, timezoneh, timezonem;
- if (_tcsstr(p, _T(","))) {
- weekday = _tcstok(p, _T(","));
- p = _tcstok(NULL, _T(","));
- _stscanf(p + 1, _T("%d %3s %d %d:%d:%d %1s%02d%02d"), &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!mir_tstrcmpi(monthstr, _T("Jan")))
+ if (_tcsstr(p, L",")) {
+ weekday = _tcstok(p, L",");
+ p = _tcstok(NULL, L",");
+ _stscanf(p + 1, L"%d %3s %d %d:%d:%d %1s%02d%02d", &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
+ if (!mir_tstrcmpi(monthstr, L"Jan"))
month = 1;
- if (!mir_tstrcmpi(monthstr, _T("Feb")))
+ if (!mir_tstrcmpi(monthstr, L"Feb"))
month = 2;
- if (!mir_tstrcmpi(monthstr, _T("Mar")))
+ if (!mir_tstrcmpi(monthstr, L"Mar"))
month = 3;
- if (!mir_tstrcmpi(monthstr, _T("Apr")))
+ if (!mir_tstrcmpi(monthstr, L"Apr"))
month = 4;
- if (!mir_tstrcmpi(monthstr, _T("May")))
+ if (!mir_tstrcmpi(monthstr, L"May"))
month = 5;
- if (!mir_tstrcmpi(monthstr, _T("Jun")))
+ if (!mir_tstrcmpi(monthstr, L"Jun"))
month = 6;
- if (!mir_tstrcmpi(monthstr, _T("Jul")))
+ if (!mir_tstrcmpi(monthstr, L"Jul"))
month = 7;
- if (!mir_tstrcmpi(monthstr, _T("Aug")))
+ if (!mir_tstrcmpi(monthstr, L"Aug"))
month = 8;
- if (!mir_tstrcmpi(monthstr, _T("Sep")))
+ if (!mir_tstrcmpi(monthstr, L"Sep"))
month = 9;
- if (!mir_tstrcmpi(monthstr, _T("Oct")))
+ if (!mir_tstrcmpi(monthstr, L"Oct"))
month = 10;
- if (!mir_tstrcmpi(monthstr, _T("Nov")))
+ if (!mir_tstrcmpi(monthstr, L"Nov"))
month = 11;
- if (!mir_tstrcmpi(monthstr, _T("Dec")))
+ if (!mir_tstrcmpi(monthstr, L"Dec"))
month = 12;
if (year < 2000)
year += 2000;
- if (!mir_tstrcmp(timezonesign, _T("+")))
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour - timezoneh, min - timezonem, sec);
- else if (!mir_tstrcmp(timezonesign, _T("-")))
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour + timezoneh, min + timezonem, sec);
+ if (!mir_tstrcmp(timezonesign, L"+"))
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour - timezoneh, min - timezonem, sec);
+ else if (!mir_tstrcmp(timezonesign, L"-"))
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour + timezoneh, min + timezonem, sec);
else
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour, min, sec);
}
- else if (_tcsstr(p, _T("T"))) {
- _stscanf(p, _T("%d-%d-%dT%d:%d:%d"), &year, &month, &day, &hour, &min, &sec);
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
+ else if (_tcsstr(p, L"T")) {
+ _stscanf(p, L"%d-%d-%dT%d:%d:%d", &year, &month, &day, &hour, &min, &sec);
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour, min, sec);
}
else
{
- _stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
- if (!mir_tstrcmp(timezonesign, _T("+")))
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour - timezoneh, min - timezonem, sec);
- else if (!mir_tstrcmp(timezonesign, _T("-")))
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour + timezoneh, min + timezonem, sec);
+ _stscanf(p, L"%d-%d-%d %d:%d:%d %1s%02d%02d", &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
+ if (!mir_tstrcmp(timezonesign, L"+"))
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour - timezoneh, min - timezonem, sec);
+ else if (!mir_tstrcmp(timezonesign, L"-"))
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour + timezoneh, min + timezonem, sec);
else
- mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec);
+ mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, L"%04d%02d%02dT%02d:%02d:%02d", year, month, day, hour, min, sec);
}
}
// Get the date part
@@ -273,7 +273,7 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) for (; *p != '\0' && !isdigit(*p); p++);
// Parse time
- if (_stscanf(p, _T("%d:%d:%d"), ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3)
+ if (_stscanf(p, L"%d:%d:%d", ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3)
return 0;
timestamp.tm_isdst = 0; // DST is already present in _timezone below
@@ -453,7 +453,7 @@ HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message) LPCTSTR ClearText(CMString &result, const TCHAR *message)
{
- BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(_T(""));
+ BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(L"");
HRESULT hr = TestMarkupServices(bstrHtml, &TestDocumentText, bstrRes);
if (SUCCEEDED(hr))
result = bstrRes;
diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h index d7de67206c..b4787929cb 100644 --- a/plugins/NewsAggregator/Src/stdafx.h +++ b/plugins/NewsAggregator/Src/stdafx.h @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. #include "resource.h"
#define MODULE "NewsAggregator"
-#define TAGSDEFAULT _T("#<title>#\r\n#<link>#\r\n#<description>#")
+#define TAGSDEFAULT L"#<title>#\r\n#<link>#\r\n#<description>#"
#define DEFAULT_AVATARS_FOLDER "NewsAggregator"
#define DEFAULT_UPDATE_TIME 60
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index 95a8552781..48f4dd5b43 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -47,7 +47,7 @@ INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar EnableWindow(GetDlgItem(hwnd, IDC_TIMER_TEXT), 1);
EnableWindow(GetDlgItem(hwnd, IDC_TIMER_INT), 1);
if (!GetWindowTextLength(GetDlgItem(hwnd, IDC_TIMER_INT)))
- SetDlgItemText(hwnd, IDC_TIMER_INT, _T("1"));
+ SetDlgItemText(hwnd, IDC_TIMER_INT, L"1");
}
break;
}
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp index 844181228f..aa5302f74b 100644 --- a/plugins/Non-IM Contact/src/files.cpp +++ b/plugins/Non-IM Contact/src/files.cpp @@ -237,8 +237,8 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(hwnd, IDC_FILE_LIST, CB_DELETESTRING, index, 0);
SendMessage(hwnd, WM_RELOADWINDOW, 0, 0);
if (!index) {
- SetDlgItemText(hwnd, IDC_FN, _T(""));
- SetDlgItemText(hwnd, IDC_FILE_CONTENTS, _T(""));
+ SetDlgItemText(hwnd, IDC_FN, L"");
+ SetDlgItemText(hwnd, IDC_FILE_CONTENTS, L"");
}
}
@@ -270,8 +270,8 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SetDlgItemTextA(hwnd, IDC_WWW_TIMER, _itoa(db_get_w(NULL, MODNAME, fn, 60), tmp, 10));
}
else {
- SetDlgItemText(hwnd, IDC_URL, _T(""));
- SetDlgItemText(hwnd, IDC_WWW_TIMER, _T(""));
+ SetDlgItemText(hwnd, IDC_URL, L"");
+ SetDlgItemText(hwnd, IDC_WWW_TIMER, L"");
}
readFile(hwnd);
}
diff --git a/plugins/NotesAndReminders/src/hotkeys.cpp b/plugins/NotesAndReminders/src/hotkeys.cpp index 8038037792..052e8d4dfd 100644 --- a/plugins/NotesAndReminders/src/hotkeys.cpp +++ b/plugins/NotesAndReminders/src/hotkeys.cpp @@ -1,6 +1,6 @@ #include "globals.h"
-#define MSG_WND_CLASS _T("MIM_SNMsgWindow")
+#define MSG_WND_CLASS "MIM_SNMsgWindow"
HWND HKHwnd;
@@ -105,7 +105,7 @@ void CreateMsgWindow(void) HWND hParent = NULL;
WNDCLASSEX TWC = {0};
- if (!GetClassInfoEx(hmiranda,MSG_WND_CLASS,&TWC))
+ if (!GetClassInfoEx(hmiranda, MSG_WND_CLASS, &TWC))
{
TWC.style = 0;
TWC.cbClsExtra = 0;
@@ -123,7 +123,7 @@ void CreateMsgWindow(void) hParent = HWND_MESSAGE;
- HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, _T("StickyNotes"), 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL);
+ HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, "StickyNotes", 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL);
SetTimer(HKHwnd, 1026, REMINDER_UPDATE_INTERVAL, 0);
}
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 67b3a00901..30ee8282a4 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -308,7 +308,7 @@ extern "C" __declspec(dllexport) int Load(void) ctrls.dwICC = ICC_DATE_CLASSES;
InitCommonControlsEx(&ctrls);
- hRichedDll = LoadLibrary(_T("Msftedit.dll"));
+ hRichedDll = LoadLibrary("Msftedit.dll");
if (!hRichedDll) {
if (MessageBox(0, TranslateT("Miranda could not load the Notes & Reminders plugin, Msftedit.dll is missing. If you are using WINE, please make sure you have Msftedit.dll installed. Press 'Yes' to continue loading Miranda."), _T(SECTIONNAME), MB_YESNO | MB_ICONINFORMATION) != IDYES)
return 1;
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 06e3c87cc0..8b752336ed 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -46,7 +46,7 @@ #define PENLINK ENLINK * -#define NOTE_WND_CLASS _T("MIM_StickyNote") +#define NOTE_WND_CLASS "MIM_StickyNote" #define IDM_COLORPRESET_BG 41000 @@ -311,7 +311,7 @@ STICKYNOTE* NewNoteEx(int Ax,int Ay,int Aw,int Ah,char *Data,ULARGE_INTEGER *ID, // NOTE: loaded note positions stem from GetWindowPlacement, which normally have a different coord space than // CreateWindow/SetWindowPos, BUT since we now use WS_EX_TOOLWINDOW they use the same coord space so // we don't have to worry about notes "drifting" between sessions - TSN->SNHwnd = CreateWindowEx(L1, NOTE_WND_CLASS, _T("StickyNote"), L2, Ax,Ay,Aw,Ah, NULL, 0, hmiranda, TSN); + TSN->SNHwnd = CreateWindowEx(L1, NOTE_WND_CLASS, "StickyNote", L2, Ax,Ay,Aw,Ah, NULL, 0, hmiranda, TSN); if (g_Transparency < 255) SetLayeredWindowAttributes(TSN->SNHwnd,0,(BYTE)g_Transparency,LWA_ALPHA); @@ -1002,10 +1002,10 @@ static int FindMenuItem(HMENU h, LPTSTR lpszName) static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam) { int n, i; - STICKYNOTE *SN = (STICKYNOTE*)GetProp(AhWnd, _T("ctrldata")); + STICKYNOTE *SN = (STICKYNOTE*)GetProp(AhWnd, "ctrldata"); HMENU hMenuLoad, FhMenu, hSub; - hMenuLoad = LoadMenu(hinstance, _T("MNU_NOTEPOPUP")); + hMenuLoad = LoadMenu(hinstance, "MNU_NOTEPOPUP"); FhMenu = GetSubMenu(hMenuLoad,0); if (SN->OnTop) @@ -1018,11 +1018,11 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam) // NOTE: names used for FindMenuItem would need to include & chars if such shortcuts are added to the menus - n = FindMenuItem(FhMenu, _T("Appearance")); + n = FindMenuItem(FhMenu, "Appearance"); if (n >= 0 && (hSub = GetSubMenu(FhMenu, n))) { - HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color"))); - HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color"))); + HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, "Background Color")); + HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, "Text Color")); for (i=0; i<_countof(clrPresets); i++) InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName)); @@ -1189,7 +1189,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l case WM_TIMER: if (wParam == 1025) { - STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg,_T("ctrldata")); + STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg, "ctrldata"); KillTimer(hdlg, 1025); JustSaveNotesEx(SN); @@ -1203,14 +1203,14 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l } case WM_CREATE: { - STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg,_T("ctrldata")); + STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg, "ctrldata"); CREATESTRUCT *CS = (CREATESTRUCT *)lParam; HWND H; DWORD mystyle; SN = (STICKYNOTE*)CS->lpCreateParams; - SetProp(hdlg,_T("ctrldata"),(HANDLE)SN); + SetProp(hdlg, "ctrldata", (HANDLE)SN); BringWindowToTop(hdlg); mystyle = WS_CHILD | WS_VISIBLE | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN; if (g_ShowScrollbar) mystyle |= WS_VSCROLL; @@ -1342,11 +1342,11 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l Buff = (char*)malloc(PEnLnk->chrg.cpMax - PEnLnk->chrg.cpMin + 1); SendDlgItemMessage(hdlg,1,EM_GETSELTEXT,0,(LPARAM)Buff); if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0) - ShellExecute(hdlg, _T("open"), _T("iexplore"), Buff, _T("") ,SW_SHOWNORMAL); + ShellExecute(hdlg, "open", "iexplore", Buff, "" ,SW_SHOWNORMAL); else if (g_lpszAltBrowser && *g_lpszAltBrowser) - ShellExecute(hdlg,_T("open"), g_lpszAltBrowser, Buff, _T("") ,SW_SHOWNORMAL); + ShellExecute(hdlg, "open", g_lpszAltBrowser, Buff, "" ,SW_SHOWNORMAL); else - ShellExecute(hdlg, _T("open"), Buff, _T(""), _T(""), SW_SHOWNORMAL); + ShellExecute(hdlg, "open", Buff, "", "", SW_SHOWNORMAL); SAFE_FREE((void**)&Buff); return TRUE; } @@ -1438,7 +1438,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l break; case WM_COMMAND: { - STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg, _T("ctrldata")); + STICKYNOTE *SN = (STICKYNOTE*)GetProp(hdlg, "ctrldata"); HWND H; UINT id; @@ -1673,12 +1673,12 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l return TRUE; } case WM_NCDESTROY: - { - RemoveProp(hdlg, _T("ctrldata")); - } + RemoveProp(hdlg, "ctrldata"); break; - case WM_CONTEXTMENU: - if (DoContextMenu(hdlg,wParam,lParam)) return FALSE; + + case WM_CONTEXTMENU: + if (DoContextMenu(hdlg,wParam,lParam)) + return FALSE; default: return DefWindowProc(hdlg,message,wParam,lParam); @@ -1927,7 +1927,7 @@ INT_PTR CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM TranslateDialogDefault(Dialog); - SetDlgItemText(Dialog,IDC_REMINDERDATA, _T("")); + SetDlgItemText(Dialog, IDC_REMINDERDATA, ""); HWND H = GetDlgItem(Dialog,IDC_LISTREMINDERS); lvCol.mask = LVCF_TEXT | LVCF_WIDTH; diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index fe5590f7a3..d8c013fa40 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -81,11 +81,11 @@ struct FontOptionsList }
static fontOptionsList[] =
{
- {LPGENT("Sticky Note Caption"), RGB(0,0,0), _T("Small Fonts"), 0, 7, LPGENT("Sticky Note Background Color")},
- //{LPGENT("Sticky Note Caption"), RGB(0,0,0), _T("Terminal"), 0, 6, LPGENT("Sticky Note Background Color")},
- //{LPGENT("Sticky Note Caption"), RGB(0,0,0), _T("MS Serif"), 0, 7, LPGENT("Sticky Note Background Color")},
- //{LPGENT("Sticky Note Body"), RGB(0,0,0), _T("Tahoma"), 0, 8, LPGENT("Sticky Note Background Color")},
- {LPGENT("Sticky Note Body"), RGB(0,0,0), _T("System"), DBFONTF_BOLD, 10, LPGENT("Sticky Note Background Color")},
+ {LPGENT("Sticky Note Caption"), RGB(0,0,0), "Small Fonts", 0, 7, LPGENT("Sticky Note Background Color")},
+ //{LPGENT("Sticky Note Caption"), RGB(0,0,0), L"Terminal", 0, 6, LPGENT("Sticky Note Background Color")},
+ //{LPGENT("Sticky Note Caption"), RGB(0,0,0), L"MS Serif", 0, 7, LPGENT("Sticky Note Background Color")},
+ //{LPGENT("Sticky Note Body"), RGB(0,0,0), L"Tahoma", 0, 8, LPGENT("Sticky Note Background Color")},
+ {LPGENT("Sticky Note Body"), RGB(0,0,0), "System", DBFONTF_BOLD, 10, LPGENT("Sticky Note Background Color")},
};
@@ -375,7 +375,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar else
SetDlgItemText(hdlg,IDC_EDIT_EMAILSMS,"");
- SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,g_lpszAltBrowser ? g_lpszAltBrowser : _T(""));
+ SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,g_lpszAltBrowser ? g_lpszAltBrowser : "");
return TRUE;
}
case WM_HSCROLL:
@@ -433,7 +433,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar mir_free(g_lpszAltBrowser);
g_lpszAltBrowser = NULL;
}
- SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,g_lpszAltBrowser ? g_lpszAltBrowser : _T(""));
+ SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,g_lpszAltBrowser ? g_lpszAltBrowser : "");
if (g_lpszAltBrowser)
db_set_s(0,MODULENAME,"AltBrowser",g_lpszAltBrowser);
else
@@ -469,7 +469,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar ofn.lpstrFile = s;
ofn.nMaxFile = _countof(s);
ofn.lpstrTitle = TranslateT("Select Executable");
- ofn.lpstrInitialDir = _T(".");
+ ofn.lpstrInitialDir = ".";
ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_ENABLESIZING | OFN_DONTADDTORECENT;
GetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, s, ofn.nMaxFile);
@@ -484,13 +484,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar case IDC_BUTTON_RESET:
{
SAFE_FREE((void**)&g_RemindSMS);
- SetDlgItemText(hdlg,IDC_EDIT_EMAILSMS,_T(""));
+ SetDlgItemText(hdlg, IDC_EDIT_EMAILSMS, "");
if (g_lpszAltBrowser)
{
mir_free(g_lpszAltBrowser);
g_lpszAltBrowser = NULL;
}
- SetDlgItemText(hdlg,IDC_EDIT_ALTBROWSER,_T(""));
+ SetDlgItemText(hdlg, IDC_EDIT_ALTBROWSER, "");
g_ShowNotesAtStart = TRUE;
g_AddContListMI = TRUE;
g_ShowScrollbar = TRUE;
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index ffea8e7052..f0a141fd44 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -2326,7 +2326,7 @@ static BOOL DoListContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam,REMINDERDAT {
HWND hwndListView = (HWND)wParam;
if (hwndListView != GetDlgItem(AhWnd, IDC_LISTREMINDERS)) return FALSE;
- HMENU hMenuLoad = LoadMenu(hinstance, _T("MNU_REMINDERPOPUP"));
+ HMENU hMenuLoad = LoadMenu(hinstance, "MNU_REMINDERPOPUP");
HMENU FhMenu = GetSubMenu(hMenuLoad, 0);
MENUITEMINFO mii = { 0 };
@@ -2373,7 +2373,7 @@ INT_PTR CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPA return 0;
case WM_RELOAD:
{
- SetDlgItemText(Dialog, IDC_REMINDERDATA, _T(""));
+ SetDlgItemText(Dialog, IDC_REMINDERDATA, "");
InitListView(GetDlgItem(Dialog, IDC_LISTREMINDERS));
return TRUE;
}
@@ -2401,7 +2401,7 @@ INT_PTR CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPA Window_SetIcon_IcoLib(Dialog, iconList[6].hIcolib);
TranslateDialogDefault(Dialog);
- SetDlgItemText(Dialog,IDC_REMINDERDATA, _T(""));
+ SetDlgItemText(Dialog,IDC_REMINDERDATA, "");
HWND H = GetDlgItem(Dialog,IDC_LISTREMINDERS);
lvCol.mask = LVCF_TEXT | LVCF_WIDTH;
S = Translate("Reminder text");
@@ -2512,7 +2512,7 @@ INT_PTR CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPA case IDM_DELETEALLREMINDERS:
if (RemindersList && MessageBox(Dialog, TranslateT("Are you sure you want to delete all reminders?"), TranslateT(SECTIONNAME), MB_OKCANCEL) == IDOK)
{
- SetDlgItemText(Dialog, IDC_REMINDERDATA, _T(""));
+ SetDlgItemText(Dialog, IDC_REMINDERDATA, "");
DeleteReminders();
InitListView(GetDlgItem(Dialog,IDC_LISTREMINDERS));
}
@@ -2528,7 +2528,7 @@ INT_PTR CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPA if (I != -1
&& MessageBox(Dialog, TranslateT("Are you sure you want to delete this reminder?"), TranslateT(SECTIONNAME), MB_OKCANCEL) == IDOK)
{
- SetDlgItemText(Dialog, IDC_REMINDERDATA, _T(""));
+ SetDlgItemText(Dialog, IDC_REMINDERDATA, "");
DeleteReminder((REMINDERDATA*)TreeGetAt(RemindersList, I));
JustSaveReminders();
InitListView(H);
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 2b41cc6a9a..cd35e85564 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -7,10 +7,10 @@ void cslog(const TCHAR *what, const TCHAR *file, int line) time(&t_);
tm *t = localtime(&t_);
//FILE *f = fopen("na.log", "a");
- FILE *f = _tfopen(g_settings.log_filename.c_str(), _T("a"));
+ FILE *f = _tfopen(g_settings.log_filename.c_str(), L"a");
if (f) {
//fprintf(f, "%s: %s:%i\n", what, file, line);
- _ftprintf(f, _T("[%04i-%02i-%02i %02i:%02i:%02i cs] %s: %s:%i\n"),
+ _ftprintf(f, L"[%04i-%02i-%02i %02i:%02i:%02i cs] %s: %s:%i\n",
int(t->tm_year + 1900), int(t->tm_mon), int(t->tm_mday),
int(t->tm_hour), int(t->tm_min), int(t->tm_sec), what, file, line);
fclose(f);
@@ -91,9 +91,9 @@ void dbg_msg(std::tstring str, int type) time_t t_;
time(&t_);
tm *t = localtime(&t_);
- FILE *f = _tfopen(g_settings.log_filename.c_str(), _T("a"));
+ FILE *f = _tfopen(g_settings.log_filename.c_str(), L"a");
if (f) {
- _ftprintf(f, _T("[%04i-%02i-%02i %02i:%02i:%02i dbg_msg] %s\n"),
+ _ftprintf(f, L"[%04i-%02i-%02i %02i:%02i:%02i dbg_msg] %s\n",
int(t->tm_year + 1900), int(t->tm_mon), int(t->tm_mday),
int(t->tm_hour), int(t->tm_min), int(t->tm_sec), str.c_str());
fclose(f);
@@ -139,9 +139,9 @@ void registerSound(const std::tstring &name) return;
sset.insert(name);
- std::tstring id = _T("NotifyAnything_") + name;
- std::tstring desc = _T("NotifyAnything: ") + name;
- std::tstring file = name + _T(".wav");
+ std::tstring id = L"NotifyAnything_" + name;
+ std::tstring desc = L"NotifyAnything: " + name;
+ std::tstring file = name + L".wav";
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
@@ -162,27 +162,27 @@ HICON getIcon(const std::tstring &name) init = true;
// windows icons
- icons[_T("exclamation")] = icons[_T("warning")] = LoadIcon(NULL, IDI_WARNING);
- deficon = icons[_T("information")] = icons[_T("asterisk")] = LoadIcon(NULL, IDI_ASTERISK);
- icons[_T("hand")] = icons[_T("error")] = LoadIcon(NULL, IDI_ERROR);
- icons[_T("question")] = LoadIcon(NULL, IDI_QUESTION);
- icons[_T("winlogo")] = LoadIcon(NULL, IDI_WINLOGO);
+ icons[L"exclamation"] = icons[L"warning"] = LoadIcon(NULL, IDI_WARNING);
+ deficon = icons[L"information"] = icons[L"asterisk"] = LoadIcon(NULL, IDI_ASTERISK);
+ icons[L"hand"] = icons[L"error"] = LoadIcon(NULL, IDI_ERROR);
+ icons[L"question"] = LoadIcon(NULL, IDI_QUESTION);
+ icons[L"winlogo"] = LoadIcon(NULL, IDI_WINLOGO);
// miranda icons
- icons[_T("online")] = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
- icons[_T("offline")] = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
- icons[_T("away")] = Skin_LoadIcon(SKINICON_STATUS_AWAY);
- icons[_T("na")] = Skin_LoadIcon(SKINICON_STATUS_NA);
- icons[_T("occupied")] = Skin_LoadIcon(SKINICON_STATUS_OCCUPIED);
- icons[_T("dnd")] = Skin_LoadIcon(SKINICON_STATUS_DND);
- icons[_T("free4chat")] = Skin_LoadIcon(SKINICON_STATUS_FREE4CHAT);
- icons[_T("invisible")] = Skin_LoadIcon(SKINICON_STATUS_INVISIBLE);
- icons[_T("onthephone")] = Skin_LoadIcon(SKINICON_STATUS_ONTHEPHONE);
- icons[_T("outtolunch")] = Skin_LoadIcon(SKINICON_STATUS_OUTTOLUNCH);
-
- icons[_T("message")] = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- icons[_T("url")] = Skin_LoadIcon(SKINICON_EVENT_URL);
- icons[_T("file")] = Skin_LoadIcon(SKINICON_EVENT_FILE);
+ icons[L"online"] = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
+ icons[L"offline"] = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
+ icons[L"away"] = Skin_LoadIcon(SKINICON_STATUS_AWAY);
+ icons[L"na"] = Skin_LoadIcon(SKINICON_STATUS_NA);
+ icons[L"occupied"] = Skin_LoadIcon(SKINICON_STATUS_OCCUPIED);
+ icons[L"dnd"] = Skin_LoadIcon(SKINICON_STATUS_DND);
+ icons[L"free4chat"] = Skin_LoadIcon(SKINICON_STATUS_FREE4CHAT);
+ icons[L"invisible"] = Skin_LoadIcon(SKINICON_STATUS_INVISIBLE);
+ icons[L"onthephone"] = Skin_LoadIcon(SKINICON_STATUS_ONTHEPHONE);
+ icons[L"outtolunch"] = Skin_LoadIcon(SKINICON_STATUS_OUTTOLUNCH);
+
+ icons[L"message"] = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ icons[L"url"] = Skin_LoadIcon(SKINICON_EVENT_URL);
+ icons[L"file"] = Skin_LoadIcon(SKINICON_EVENT_FILE);
}
std::map<std::tstring, HICON>::iterator i = icons.find(name);
@@ -204,7 +204,7 @@ HICON getIcon(const std::tstring &name) std::tstring rname(file.c_str(), p + 1);
if (rname.empty()) {
- dbg_msg(_T("No resource name given."), SM_WARNING);
+ dbg_msg(L"No resource name given.", SM_WARNING);
return deficon;
}
@@ -220,7 +220,7 @@ HICON getIcon(const std::tstring &name) info.found = false;
info.nr = _ttoi(rname.c_str());
if (info.nr <= 0) {
- dbg_msg(_T("Icon indices start at 1."), SM_WARNING);
+ dbg_msg(L"Icon indices start at 1.", SM_WARNING);
return deficon;
}
@@ -232,7 +232,7 @@ HICON getIcon(const std::tstring &name) return deficon;
}
}
- dbg_msg(_T("Could not find the requested icon."), SM_WARNING);
+ dbg_msg(L"Could not find the requested icon.", SM_WARNING);
return deficon;
}
resname = info.name;
@@ -265,18 +265,18 @@ bool getNext(std::tstring &out, std::tstring &in, TCHAR sep) in.erase(0, 1);
size_t p = in.find('\"');
if (p == in.npos)
- throw _T("Unterminated quote: \"") + in;
+ throw L"Unterminated quote: \"" + in;
out += '"';
out.append(in, 0, p);
out += '"';
in.erase(0, p + 1);
return true;
}
- if (!in.compare(0, 3, _T("<[["))) {
+ if (!in.compare(0, 3, L"<[[")) {
in.erase(0, 3);
- size_t p = in.find(_T("]]>"));
+ size_t p = in.find(L"]]>");
if (p == in.npos)
- throw _T("Unterminated \"<[[\": <[[") + in;
+ throw L"Unterminated \"<[[\": <[[" + in;
out.append(in, 0, p);
in.erase(0, p + 3);
return true;
@@ -315,20 +315,20 @@ const TCHAR *decode_se_arg(std::tstring &str) void processSingleAction(const std::tstring &what, bool &closeflag)
{
- if (!what.compare(0, 7, _T("system:"))) {
+ if (!what.compare(0, 7, L"system:")) {
if (!g_settings.allow_execute) {
- dbg_msg(_T("Application launching is disabled."), SM_WARNING);
+ dbg_msg(L"Application launching is disabled.", SM_WARNING);
return;
}
std::tstring argstr(what, 7);
if (_tsystem(argstr.c_str()) == -1)
- dbg_msg(_T("Failed to execute: ") + argstr, SM_WARNING);
+ dbg_msg(L"Failed to execute: " + argstr, SM_WARNING);
}
- else if (!what.compare(0, 4, _T("cmd:"))) {
+ else if (!what.compare(0, 4, L"cmd:")) {
if (!g_settings.allow_execute) {
- dbg_msg(_T("Application launching is disabled."), SM_WARNING);
+ dbg_msg(L"Application launching is disabled.", SM_WARNING);
return;
}
@@ -338,7 +338,7 @@ void processSingleAction(const std::tstring &what, bool &closeflag) getAll(args, argstr, ' ', true);
if (args.empty())
- throw _T("Insufficient arguments: ") + what;
+ throw L"Insufficient arguments: " + what;
std::vector<const TCHAR *> cargs;
for (std::vector<std::tstring>::iterator i = args.begin(), e = args.end(); i != e; ++i)
@@ -346,12 +346,12 @@ void processSingleAction(const std::tstring &what, bool &closeflag) cargs.push_back(0);
if (_tspawnvp(_P_DETACH, cargs[0], &cargs[0]) == -1)
- dbg_msg(_T("Failed to execute: ") + what.substr(4), SM_WARNING);
+ dbg_msg(L"Failed to execute: " + what.substr(4), SM_WARNING);
}
- else if (!what.compare(0, 5, _T("open:"))) {
+ else if (!what.compare(0, 5, L"open:")) {
if (!g_settings.allow_execute) {
- dbg_msg(_T("Application launching is disabled."), SM_WARNING);
+ dbg_msg(L"Application launching is disabled.", SM_WARNING);
return;
}
@@ -359,19 +359,19 @@ void processSingleAction(const std::tstring &what, bool &closeflag) std::tstring file, args;
if (!getNext(file, argstr, ' '))
- throw _T("No filename provided: ") + what;
+ throw L"No filename provided: " + what;
file = strip(file);
args = strip(argstr);
const TCHAR *cargs = decode_se_arg(args);
- if ((INT_PTR)ShellExecute(0, _T("open"), file.c_str(), cargs, 0, SW_SHOWNORMAL) <= 32)
- throw _T("Failed to open: ") + file + _T(" ") + args;
+ if ((INT_PTR)ShellExecute(0, L"open", file.c_str(), cargs, 0, SW_SHOWNORMAL) <= 32)
+ throw L"Failed to open: " + file + L" " + args;
}
- else if (!what.compare(0, 6, _T("shell:"))) {
+ else if (!what.compare(0, 6, L"shell:")) {
if (!g_settings.allow_execute) {
- dbg_msg(_T("Application launching is disabled."), SM_WARNING);
+ dbg_msg(L"Application launching is disabled.", SM_WARNING);
return;
}
@@ -379,9 +379,9 @@ void processSingleAction(const std::tstring &what, bool &closeflag) std::tstring verb, file, args, dir;
if (!getNext(verb, argstr, ':'))
- throw _T("No verb provided: ") + what;
+ throw L"No verb provided: " + what;
if (!getNext(file, argstr, ','))
- throw _T("No filename provided: ") + what;
+ throw L"No filename provided: " + what;
getNext(args, argstr, ',');
getNext(dir, argstr, ',');
verb = unquote(strip(verb));
@@ -390,12 +390,12 @@ void processSingleAction(const std::tstring &what, bool &closeflag) dir = /*unquote(*/strip(dir)/*)*/;
if ((INT_PTR)ShellExecute(0, decode_se_arg(verb), decode_se_arg(file), decode_se_arg(args), decode_se_arg(dir), SW_SHOWNORMAL) <= 32)
- throw _T("Failed: ") + what;
+ throw L"Failed: " + what;
}
- else if (what == _T("close"))
+ else if (what == L"close")
closeflag = true;
else
- throw _T("Action not recognized: ") + what;
+ throw L"Action not recognized: " + what;
}
void processAction(const std::tstring &what, bool &closeflag)
@@ -588,29 +588,29 @@ void loadDefaults(popup_t &msg, char ch) msg.delay = 0;
switch (ch) {
case '%':
- msg.icon = _T("message");
+ msg.icon = L"message";
msg.background = RGB(173, 206, 247);
msg.foreground = RGB(0, 0, 0);
- msg.contact = _T("Message");
+ msg.contact = L"Message";
msg.beep = true;
- msg.sound = _T("Message");
+ msg.sound = L"Message";
return;
case '!':
- msg.icon = _T("exclamation");
+ msg.icon = L"exclamation";
msg.background = RGB(191, 0, 0);
msg.foreground = RGB(255, 245, 225);
- msg.contact = _T("Error");
+ msg.contact = L"Error";
msg.beep = true;
- msg.sound = _T("Error");
+ msg.sound = L"Error";
return;
case ' ':
default:
- msg.icon = _T("information");
+ msg.icon = L"information";
msg.background = RGB(255, 245, 225);
msg.foreground = RGB(0, 0, 0);
- msg.contact = _T("Notice");
+ msg.contact = L"Notice";
msg.beep = true;
- msg.sound = _T("Notice");
+ msg.sound = L"Notice";
return;
}
}
@@ -642,7 +642,7 @@ bool parseComplexMessage(const std::tstring &buf, popup_t &msg, char sep) if (!wend || npos && npos < wend)
wend = npos;
if (!wend) {
- dbg_msg(_T("Unterminated option."), SM_WARNING);
+ dbg_msg(L"Unterminated option.", SM_WARNING);
return false;
}
@@ -656,7 +656,7 @@ bool parseComplexMessage(const std::tstring &buf, popup_t &msg, char sep) arg = cpos + 1;
if (!g_settings.password.empty() && !passok) {
- if (what == _T("passwd") && arg == g_settings.password) {
+ if (what == L"passwd" && arg == g_settings.password) {
passok = true;
continue;
}
@@ -664,35 +664,35 @@ bool parseComplexMessage(const std::tstring &buf, popup_t &msg, char sep) return false;
}
- if (what == _T("passwd"))
+ if (what == L"passwd")
;
- else if (what == _T("icon"))
+ else if (what == L"icon")
msg.icon = arg;
- else if (what == _T("msg")) {
+ else if (what == L"msg") {
if (!cpos) {
- dbg_msg(_T("No argument given to msg option."), SM_WARNING);
+ dbg_msg(L"No argument given to msg option.", SM_WARNING);
return false;
}
else if (msg.replace != xno && msg.id.empty()) {
- dbg_msg(_T("ID is required for replacement."), SM_WARNING);
+ dbg_msg(L"ID is required for replacement.", SM_WARNING);
return false;
}
msg.message = arg;
return true;
}
- else if (what == _T("replace")) {
- if (arg == _T("yes"))
+ else if (what == L"replace") {
+ if (arg == L"yes")
msg.replace = xreplace;
- else if (arg == _T("append"))
+ else if (arg == L"append")
msg.replace = xappend;
- else if (arg == _T("prepend"))
+ else if (arg == L"prepend")
msg.replace = xprepend;
- else if (arg == _T("no"))
+ else if (arg == L"no")
msg.replace = xno;
else
- dbg_msg(_T("Invalid argument for replace option: ") + arg, SM_WARNING);
+ dbg_msg(L"Invalid argument for replace option: " + arg, SM_WARNING);
}
- else if (what == _T("sound")) {
+ else if (what == L"sound") {
if (arg.empty())
msg.beep = false;
else {
@@ -701,54 +701,54 @@ bool parseComplexMessage(const std::tstring &buf, popup_t &msg, char sep) registerSound(arg);
}
}
- else if (what == _T("left")) {
+ else if (what == L"left") {
msg.left = arg;
}
- else if (what == _T("right")) {
+ else if (what == L"right") {
msg.right = arg;
}
- else if (what == _T("opened")) {
+ else if (what == L"opened") {
msg.opened = arg;
}
- else if (what == _T("closed")) {
+ else if (what == L"closed") {
msg.closed = arg;
}
- else if (what == _T("delay")) {
+ else if (what == L"delay") {
msg.delay = _ttoi(arg.c_str());
}
- else if (what == _T("id")) {
+ else if (what == L"id") {
msg.id = arg;
}
- else if (what == _T("bg")) {
+ else if (what == L"bg") {
bool ok;
msg.background = parseColor(arg, ok);
if (!ok)
- dbg_msg(_T("Invalid color: ") + arg, SM_WARNING);
+ dbg_msg(L"Invalid color: " + arg, SM_WARNING);
}
- else if (what == _T("fg")) {
+ else if (what == L"fg") {
bool ok;
msg.foreground = parseColor(arg, ok);
if (!ok)
- dbg_msg(_T("Invalid color: ") + arg, SM_WARNING);
+ dbg_msg(L"Invalid color: " + arg, SM_WARNING);
}
- else if (what == _T("from"))
+ else if (what == L"from")
msg.contact = arg;
- else if (what == _T("sep")) {
+ else if (what == L"sep") {
if (arg.size() == 1)
sep = arg[0];
else
- dbg_msg(_T("Invalid argument for sep option: ") + arg, SM_WARNING);
+ dbg_msg(L"Invalid argument for sep option: " + arg, SM_WARNING);
}
- else if (what == _T("beep")) {
- if (arg == _T("1"))
+ else if (what == L"beep") {
+ if (arg == L"1")
msg.beep = true;
- else if (arg == _T("0"))
+ else if (arg == L"0")
msg.beep = false;
else
- dbg_msg(_T("Invalid argument for beep option: ") + arg, SM_WARNING);
+ dbg_msg(L"Invalid argument for beep option: " + arg, SM_WARNING);
}
else
- dbg_msg(_T("Unknown option: ") + what, SM_NOTIFY);
+ dbg_msg(L"Unknown option: " + what, SM_NOTIFY);
}
return true;
}
@@ -756,7 +756,7 @@ bool parseComplexMessage(const std::tstring &buf, popup_t &msg, char sep) bool parseMessage(const std::tstring &abuf, popup_t &msg)
{
if (abuf.empty()) {
- dbg_msg(_T("Empty message ignored."), SM_NOTIFY);
+ dbg_msg(L"Empty message ignored.", SM_NOTIFY);
return false;
}
@@ -767,7 +767,7 @@ bool parseMessage(const std::tstring &abuf, popup_t &msg) buf.erase(0, 3);
}
- if (_tcschr(_T("*!%"), buf[0]) && sep != buf[0]) {
+ if (_tcschr(L"*!%", buf[0]) && sep != buf[0]) {
if (buf.size() < 2) return false;
loadDefaults(msg, buf[0]);
buf.erase(0, 1);
@@ -789,16 +789,16 @@ void processMessage(std::tstring buf) time_t t_;
time(&t_);
tm *t = localtime(&t_);
- FILE *f = _tfopen(g_settings.log_filename.c_str(), _T("a"));
+ FILE *f = _tfopen(g_settings.log_filename.c_str(), L"a");
if (f) {
- bool err = _ftprintf(f, _T("[%04i-%02i-%02i %02i:%02i:%02i] %s\n"),
+ bool err = _ftprintf(f, L"[%04i-%02i-%02i %02i:%02i:%02i] %s\n",
int(t->tm_year + 1900), int(t->tm_mon + 1), int(t->tm_mday),
int(t->tm_hour), int(t->tm_min), int(t->tm_sec), buf.c_str()) < 0;
if (fclose(f) == EOF || err)
- dbg_msg(_T("Failed to write to log file."), SM_WARNING);
+ dbg_msg(L"Failed to write to log file.", SM_WARNING);
}
else
- dbg_msg(_T("Failed to open log file."), SM_WARNING);
+ dbg_msg(L"Failed to open log file.", SM_WARNING);
}
popup_t msg;
@@ -822,7 +822,7 @@ void processMessage(std::tstring buf) if (g_settings.use_pcspeaker)
Beep(650, 50);
else {
- std::tstring sname = _T("NotifyAnything_") + msg.sound;
+ std::tstring sname = L"NotifyAnything_" + msg.sound;
SkinPlaySound(_T2A(sname.c_str()));
}
}
@@ -982,12 +982,12 @@ extern "C" int __declspec(dllexport) Load() mir_getLP(&pluginInfo);
TCHAR buf[MAX_PATH + 1];
- mir_tstrcpy(buf, _T("."));
+ mir_tstrcpy(buf, L".");
g_mirandaDir = _tgetcwd(buf, MAX_PATH);
- registerSound(_T("Notice"));
- registerSound(_T("Message"));
- registerSound(_T("Error"));
+ registerSound(L"Notice");
+ registerSound(L"Message");
+ registerSound(L"Error");
load_settings();
diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 589c0f79f0..238354357b 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -69,7 +69,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara CallService(MS_DB_GETPROFILEPATHT, (WPARAM)MAX_PATH, (LPARAM)szProfileDir);
ofn.lpstrInitialDir = szProfileDir;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
- ofn.lpstrDefExt = _T("log");
+ ofn.lpstrDefExt = L"log";
if (GetOpenFileName(&ofn)) {
PathToRelativeT(szTemp, szTemp1);
SetDlgItemText(hwndDlg, NA_LOG_FILENAME, szTemp1);
@@ -166,7 +166,7 @@ void load_settings() db_free(&dbv);
}
else
- g_settings.log_filename = g_mirandaDir + _T("\\") + _T(LOG_ID) + _T(".log");
+ g_settings.log_filename = g_mirandaDir + L"\\" + _T(LOG_ID) + L".log";
}
int OptionsInitialize(WPARAM wParam, LPARAM)
diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp index 57c3da1c79..eca4c9d061 100644 --- a/plugins/Nudge/src/options.cpp +++ b/plugins/Nudge/src/options.cpp @@ -94,14 +94,14 @@ static INT_PTR CALLBACK DlgProcShakeOpt(HWND hwnd,UINT msg,WPARAM wParam,LPARAM TranslateDialogDefault(hwnd);
{
TCHAR szBuf[20];
- mir_sntprintf(szBuf, _T("%d"), shake.nMoveClist);
+ mir_sntprintf(szBuf, L"%d", shake.nMoveClist);
SetDlgItemText(hwnd, IDC_LNUMBER_CLIST, szBuf);
- mir_sntprintf(szBuf, _T("%d"), shake.nMoveChat);
+ mir_sntprintf(szBuf, L"%d", shake.nMoveChat);
SetDlgItemText(hwnd, IDC_LNUMBER_CHAT, szBuf);
- mir_sntprintf(szBuf, _T("%d"), shake.nScaleClist);
+ mir_sntprintf(szBuf, L"%d", shake.nScaleClist);
SetDlgItemText(hwnd, IDC_LSCALE_CLIST, szBuf);
- mir_sntprintf(szBuf, _T("%d"), shake.nScaleChat);
+ mir_sntprintf(szBuf, L"%d", shake.nScaleChat);
SetDlgItemText(hwnd, IDC_LSCALE_CHAT, szBuf);
}
@@ -132,7 +132,7 @@ static INT_PTR CALLBACK DlgProcShakeOpt(HWND hwnd,UINT msg,WPARAM wParam,LPARAM {
TCHAR szBuf[20];
DWORD dwPos = SendMessage((HWND)lParam, TBM_GETPOS, 0, 0);
- mir_sntprintf(szBuf, _T("%d"), dwPos);
+ mir_sntprintf(szBuf, L"%d", dwPos);
if ((HWND)lParam == GetDlgItem(hwnd, IDC_SNUMBER_CLIST))
SetDlgItemText(hwnd, IDC_LNUMBER_CLIST, szBuf);
if ((HWND)lParam == GetDlgItem(hwnd, IDC_SNUMBER_CHAT))
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index 77e99ac8c0..ed9cb35cf4 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -36,9 +36,9 @@ static INT_PTR MenuCommand_OpenFolder(WPARAM, LPARAM) p[1] = 0;
if ( GetAsyncKeyState( VK_CONTROL ) & 0x8000 )
- ShellExecute(0, _T("explore"), szMirandaPath, 0, 0, SW_SHOWNORMAL);
+ ShellExecute(0, L"explore", szMirandaPath, 0, 0, SW_SHOWNORMAL);
else
- ShellExecute(0, _T("open"), szMirandaPath, 0, 0, SW_SHOWNORMAL);
+ ShellExecute(0, L"open", szMirandaPath, 0, 0, SW_SHOWNORMAL);
return 0;
}
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp index 12858dec6e..ad126ec69b 100644 --- a/plugins/PackUpdater/Src/Events.cpp +++ b/plugins/PackUpdater/Src/Events.cpp @@ -58,12 +58,12 @@ INT_PTR EmptyFolder(WPARAM, LPARAM lParam) NULL,
FO_DELETE,
tszRoot,
- _T(""),
+ L"",
FOF_NOERRORUI |
FOF_SILENT,
false,
0,
- _T("") };
+ L"" };
if (lParam)
file_op.fFlags |= FOF_NOCONFIRMATION;
SHFileOperation(&file_op);
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index d1c9a532a3..9bb3df6958 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -307,7 +307,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam EnableWindow(hwOk, enableOk ? TRUE : FALSE);
}
if (nmlv->uNewState & LVIS_SELECTED) {
- if (mir_tstrcmp(todo[lvI.iItem].tszInfoURL, _T("")))
+ if (mir_tstrcmp(todo[lvI.iItem].tszInfoURL, L""))
EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE);
else
EnableWindow(GetDlgItem(hDlg, IDC_INFO), FALSE);
@@ -349,37 +349,37 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam if (todo[i].enabled) {
switch (todo[i].FileType) {
case 1:
- mir_sntprintf(tszFileDest, _T("%s\\Pack"), tszRoot);
+ mir_sntprintf(tszFileDest, L"%s\\Pack", tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 2:
- mir_sntprintf(tszFileDest, _T("%s\\Plugins"), tszRoot);
+ mir_sntprintf(tszFileDest, L"%s\\Plugins", tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 3:
- mir_sntprintf(tszFileDest, _T("%s\\Icons"), tszRoot);
+ mir_sntprintf(tszFileDest, L"%s\\Icons", tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 4:
- mir_sntprintf(tszFileDest, _T("%s\\Others"), tszRoot);
+ mir_sntprintf(tszFileDest, L"%s\\Others", tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
case 5:
- mir_sntprintf(tszFileDest, _T("%s\\Others"), tszRoot);
+ mir_sntprintf(tszFileDest, L"%s\\Others", tszRoot);
CreateDirectory(tszFileDest, NULL);
break;
default:
mir_tstrncpy(tszFileDest, tszRoot, _countof(tszFileDest));
break;
}
- mir_sntprintf(tszBuff, _T("%s\\Backups"), tszRoot);
+ mir_sntprintf(tszBuff, L"%s\\Backups", tszRoot);
CreateDirectory(tszBuff, NULL);
mir_tstrncpy(tszFileName, todo[i].File.tszDiskPath, _countof(tszFileName));
- mir_sntprintf(todo[i].File.tszDiskPath, _T("%s\\%s"), tszFileDest, tszFileName);
+ mir_sntprintf(todo[i].File.tszDiskPath, L"%s\\%s", tszFileDest, tszFileName);
UpdatesCount++;
tszExt = &todo[i].File.tszDownloadURL[mir_tstrlen(todo[i].File.tszDownloadURL) - 5];
- if (mir_tstrcmp(tszExt, _T(".html")) == 0) {
+ if (mir_tstrcmp(tszExt, L".html") == 0) {
char* szUrl = mir_t2a(todo[i].File.tszDownloadURL);
Utils_OpenUrl(szUrl);
mir_free(szUrl);
@@ -412,11 +412,11 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam }
}
- if (UpdatesCount > 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0)
+ if (UpdatesCount > 1 && mir_tstrcmp(arExt[0].c_str(), L".html") != 0)
mir_tstrncpy(tszBuff, TranslateT("Downloads complete. Start updating? All your data will be saved and Miranda NG will be closed."), _countof(tszBuff));
- else if (UpdatesCount == 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0)
+ else if (UpdatesCount == 1 && mir_tstrcmp(arExt[0].c_str(), L".html") != 0)
mir_tstrncpy(tszBuff, TranslateT("Download complete. Start updating? All your data will be saved and Miranda NG will be closed."), _countof(tszBuff));
- if (UpdatesCount > 0 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0) {
+ if (UpdatesCount > 0 && mir_tstrcmp(arExt[0].c_str(), L".html") != 0) {
INT rc = -1;
Title = TranslateT("Pack Updater");
Text = tszBuff;
@@ -445,17 +445,17 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam TCHAR *p = _tcsrchr(tszCurrentDir, '\\');
if (p) *p = 0;
}
- CreateProcess(arFilePath[i].c_str(), _T(""), NULL, NULL, FALSE, NULL, NULL, tszCurrentDir, &si, &pi);
+ CreateProcess(arFilePath[i].c_str(), L"", NULL, NULL, FALSE, NULL, NULL, tszCurrentDir, &si, &pi);
i = UpdatesCount;
CallFunctionAsync(ExitMe, 0);
break;
case 2:
- tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins"));
- if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootPlug, arFileName[i].c_str());
+ tszUtilRootPlug = Utils_ReplaceVarsT(L"%miranda_path%\\Plugins");
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRootPlug, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, L"%s\\Backups\\%s", tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRootPlug);
@@ -463,12 +463,12 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam CallFunctionAsync(RestartMe, 0);
break;
case 3:
- tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons"));
- if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootIco, arFileName[i].c_str());
+ tszUtilRootIco = Utils_ReplaceVarsT(L"%miranda_path%\\Icons");
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRootIco, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, L"%s\\Backups\\%s", tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRootIco);
@@ -476,12 +476,12 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam CallFunctionAsync(RestartMe, 0);
break;
case 4:
- tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
- if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
+ tszUtilRoot = Utils_ReplaceVarsT(L"%miranda_path%");
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRoot, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, L"%s\\Backups\\%s", tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRoot);
@@ -489,12 +489,12 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam CallFunctionAsync(RestartMe, 0);
break;
case 5:
- tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%"));
- if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str());
+ tszUtilRoot = Utils_ReplaceVarsT(L"%miranda_path%");
+ if (mir_tstrcmp(arAdvFolder[i].c_str(), L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRoot, arFileName[i].c_str());
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
- mir_sntprintf(tszFilePathBack, _T("%s\\Backups\\%s"), tszRoot, arFileName[i].c_str());
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str());
+ mir_sntprintf(tszFilePathBack, L"%s\\Backups\\%s", tszRoot, arFileName[i].c_str());
MoveFile(tszFilePathDest, tszFilePathBack);
MoveFile(arFilePath[i].c_str(), tszFilePathDest);
mir_free(tszUtilRoot);
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index 2977472d72..c4e3a97cad 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -54,12 +54,12 @@ extern "C" __declspec(dllexport) int Load(void) {
mir_getLP(&pluginInfoEx);
- TCHAR* tszFolder = Utils_ReplaceVarsT(_T("%miranda_userdata%\\" DEFAULT_UPDATES_FOLDER));
+ TCHAR *tszFolder = Utils_ReplaceVarsT(L"%miranda_userdata%\\" DEFAULT_UPDATES_FOLDER);
mir_tstrncpy(tszRoot, tszFolder, _countof(tszRoot));
- hPackUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Pack Updater"), MIRANDA_USERDATAT _T("\\")DEFAULT_UPDATES_FOLDER);
+ hPackUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Pack Updater"), MIRANDA_USERDATAT L"\\" DEFAULT_UPDATES_FOLDER);
if (hPackUpdaterFolder)
- FoldersGetCustomPathT(hPackUpdaterFolder, tszRoot, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hPackUpdaterFolder, tszRoot, MAX_PATH, L"");
mir_free(tszFolder);
LoadOptions();
diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index b9c3506225..622ee25cab 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -173,7 +173,7 @@ BOOL IsPluginDisabled(TCHAR* filename) size_t getVer(const TCHAR* verStr)
{
int v1 = 0, v2 = 0, v3 = 0, v4 = 0;
- _stscanf(verStr, _T("%d.%d.%d.%d"), &v1, &v2, &v3, &v4);
+ _stscanf(verStr, L"%d.%d.%d.%d", &v1, &v2, &v3, &v4);
return v1 * 10000000 + v2 * 100000 + v3 * 1000 + v4;
}
@@ -206,7 +206,7 @@ static void CheckUpdates(void *) // Download version info
pFileUrl = (FILEURL *)mir_alloc(sizeof(*pFileUrl));
mir_tstrncpy(pFileUrl->tszDownloadURL, tszDownloadURL, _countof(pFileUrl->tszDownloadURL));
- mir_sntprintf(tszBuff, _T("%s\\tmp.ini"), tszRoot);
+ mir_sntprintf(tszBuff, L"%s\\tmp.ini", tszRoot);
mir_tstrncpy(pFileUrl->tszDiskPath, tszBuff, _countof(pFileUrl->tszDiskPath));
mir_tstrncpy(tszTmpIni, tszBuff, _countof(tszTmpIni));
Title = TranslateT("Pack Updater");
@@ -219,34 +219,34 @@ static void CheckUpdates(void *) }
for (CurrentFile = 0; CurrentFile < FileCount; CurrentFile++) {
- FILEINFO FileInfo = { _T(""), _T(""), _T(""), _T(""), _T(""), _T(""), _T(""), { _T(""), _T("") } };
+ FILEINFO FileInfo = { L"", L"", L"", L"", L"", L"", L"", { L"", L"" } };
mir_snprintf(szKey, "File_%d_CurrentVersion", CurrentFile + 1);
ptrT tszCurVer(db_get_tsa(NULL, MODNAME, szKey));
if (tszCurVer)
mir_tstrncpy(FileInfo.tszCurVer, tszCurVer, _countof(FileInfo.tszCurVer));
else
- mir_tstrncpy(FileInfo.tszCurVer, _T(""), _countof(FileInfo.tszCurVer));
+ mir_tstrncpy(FileInfo.tszCurVer, L"", _countof(FileInfo.tszCurVer));
mir_snprintf(szKey, "File_%d_LastVersion", CurrentFile + 1);
ptrT tszLastVer(db_get_tsa(NULL, MODNAME, szKey));
if (tszLastVer)
mir_tstrncpy(FileInfo.tszLastVer, tszLastVer, _countof(FileInfo.tszLastVer));
else
- mir_tstrncpy(FileInfo.tszLastVer, _T(""), _countof(FileInfo.tszLastVer));
+ mir_tstrncpy(FileInfo.tszLastVer, L"", _countof(FileInfo.tszLastVer));
Files.push_back(FileInfo);
// Read version info
- mir_sntprintf(tszFileInfo, _T("FileInfo_%d"), CurrentFile + 1);
- GetPrivateProfileString(tszFileInfo, _T("FileVersion"), _T(""), Files[CurrentFile].tszNewVer, _countof(Files[CurrentFile].tszNewVer), tszTmpIni);
- GetPrivateProfileString(tszFileInfo, _T("Message"), _T(""), Files[CurrentFile].tszMessage, _countof(Files[CurrentFile].tszMessage), tszTmpIni);
- GetPrivateProfileString(tszFileInfo, _T("DownloadURL"), _T(""), Files[CurrentFile].File.tszDownloadURL, _countof(Files[CurrentFile].File.tszDownloadURL), tszTmpIni);
- GetPrivateProfileString(tszFileInfo, _T("AdvFolder"), _T(""), Files[CurrentFile].tszAdvFolder, _countof(Files[CurrentFile].tszAdvFolder), tszTmpIni);
- GetPrivateProfileString(tszFileInfo, _T("Descr"), _T(""), Files[CurrentFile].tszDescr, _countof(Files[CurrentFile].tszDescr), tszTmpIni);
- GetPrivateProfileString(tszFileInfo, _T("DiskFileName"), _T(""), tszBuff, MAX_PATH, tszTmpIni);
-
- if (_tcsstr(tszBuff, _T("\\"))) { //check update name
+ mir_sntprintf(tszFileInfo, L"FileInfo_%d", CurrentFile + 1);
+ GetPrivateProfileString(tszFileInfo, L"FileVersion", L"", Files[CurrentFile].tszNewVer, _countof(Files[CurrentFile].tszNewVer), tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"Message", L"", Files[CurrentFile].tszMessage, _countof(Files[CurrentFile].tszMessage), tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"DownloadURL", L"", Files[CurrentFile].File.tszDownloadURL, _countof(Files[CurrentFile].File.tszDownloadURL), tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"AdvFolder", L"", Files[CurrentFile].tszAdvFolder, _countof(Files[CurrentFile].tszAdvFolder), tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"Descr", L"", Files[CurrentFile].tszDescr, _countof(Files[CurrentFile].tszDescr), tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"DiskFileName", L"", tszBuff, MAX_PATH, tszTmpIni);
+
+ if (_tcsstr(tszBuff, L"\\")) { //check update name
Title = TranslateT("Pack Updater");
Text = TranslateT("Name of Update's file is not supported.");
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1) && db_get_b(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED)) {
@@ -258,16 +258,16 @@ static void CheckUpdates(void *) continue;
} // end check update name
mir_tstrncpy(Files[CurrentFile].File.tszDiskPath, tszBuff, _countof(Files[CurrentFile].File.tszDiskPath));
- GetPrivateProfileString(tszFileInfo, _T("InfoURL"), _T(""), Files[CurrentFile].tszInfoURL, _countof(Files[CurrentFile].tszInfoURL), tszTmpIni);
- Files[CurrentFile].FileType = GetPrivateProfileInt(tszFileInfo, _T("FileType"), 0, tszTmpIni);
- Files[CurrentFile].Force = GetPrivateProfileInt(tszFileInfo, _T("Force"), 0, tszTmpIni);
+ GetPrivateProfileString(tszFileInfo, L"InfoURL", L"", Files[CurrentFile].tszInfoURL, _countof(Files[CurrentFile].tszInfoURL), tszTmpIni);
+ Files[CurrentFile].FileType = GetPrivateProfileInt(tszFileInfo, L"FileType", 0, tszTmpIni);
+ Files[CurrentFile].Force = GetPrivateProfileInt(tszFileInfo, L"Force", 0, tszTmpIni);
Files[CurrentFile].FileNum = CurrentFile + 1;
if (Files[CurrentFile].FileType == 2) {
- if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
- mir_sntprintf(tszBuff, _T("Plugins\\%s"), Files[CurrentFile].File.tszDiskPath);
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
+ mir_sntprintf(tszBuff, L"Plugins\\%s", Files[CurrentFile].File.tszDiskPath);
else
- mir_sntprintf(tszBuff, _T("Plugins\\%s\\%s"), Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
+ mir_sntprintf(tszBuff, L"Plugins\\%s\\%s", Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
TCHAR pluginFolderName[MAX_PATH];
PathToAbsoluteT(tszBuff, pluginFolderName);
if (!Files[CurrentFile].Force && (IsPluginDisabled(Files[CurrentFile].File.tszDiskPath) || !Exists(pluginFolderName))) //check if plugin disabled or not exists
@@ -275,8 +275,8 @@ static void CheckUpdates(void *) }
// Compare versions
if (getVer(Files[CurrentFile].tszCurVer) < getVer(Files[CurrentFile].tszNewVer)) { // Yeah, we've got new version.
- VARST tszSysRoot(_T("%SystemRoot%"));
- VARST tszProgFiles(_T("%ProgramFiles%"));
+ VARST tszSysRoot(L"%SystemRoot%");
+ VARST tszProgFiles(L"%ProgramFiles%");
if (Files[CurrentFile].FileType != 1 && !IsUserAnAdmin() && (_tcsstr(tszRoot, tszSysRoot) || _tcsstr(tszRoot, tszProgFiles))) {
MessageBox(NULL, TranslateT("Update is not possible!\nYou have no Administrator's rights.\nPlease run Miranda NG with Administrator's rights."), Title, MB_ICONINFORMATION);
@@ -292,28 +292,28 @@ static void CheckUpdates(void *) case 1:
break;
case 2: {
- VARST tszUtilRootPlug(_T("%miranda_path%\\Plugins"));
- if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath);
+ VARST tszUtilRootPlug(L"%miranda_path%\\Plugins");
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath);
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootPlug, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRootPlug, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
}
break;
case 3: {
- VARST tszUtilRootIco(_T("%miranda_path%\\Icons"));
- if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRootIco, Files[CurrentFile].File.tszDiskPath);
+ VARST tszUtilRootIco(L"%miranda_path%\\Icons");
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRootIco, Files[CurrentFile].File.tszDiskPath);
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRootIco, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRootIco, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
}
break;
case 4:
case 5: {
- TCHAR *tszUtilRoot = VARST(_T("%miranda_path%"));
- if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0)
- mir_sntprintf(tszFilePathDest, _T("%s\\%s"), tszUtilRoot, Files[CurrentFile].File.tszDiskPath);
+ TCHAR *tszUtilRoot = VARST(L"%miranda_path%");
+ if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, L"") == 0)
+ mir_sntprintf(tszFilePathDest, L"%s\\%s", tszUtilRoot, Files[CurrentFile].File.tszDiskPath);
else
- mir_sntprintf(tszFilePathDest, _T("%s\\%s\\%s"), tszUtilRoot, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
+ mir_sntprintf(tszFilePathDest, L"%s\\%s\\%s", tszUtilRoot, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath);
}
break;
}//end* switch (Files[CurrentFile].FileType)
diff --git a/plugins/PasteIt/src/Options.cpp b/plugins/PasteIt/src/Options.cpp index 24405b97de..61d4c27130 100644 --- a/plugins/PasteIt/src/Options.cpp +++ b/plugins/PasteIt/src/Options.cpp @@ -206,7 +206,7 @@ void GetPagesSettings(HWND hwndDlg, OptsPagesData* optsPagesData) }
if (optsPagesData->webOptions[selected]->isPublicPaste) {
if (IsDlgButtonChecked(hwndDlg, IDC_GUEST)) {
- optsPagesData->webOptions[selected]->pastebinUserKey = _T("");
+ optsPagesData->webOptions[selected]->pastebinUserKey = L"";
}
else {
TCHAR buf[100];
@@ -646,7 +646,7 @@ void Options::InitCodepageCB(HWND hwndCB, unsigned int codepage) if (selCpIdx == -1) {
TCHAR buf[10];
- mir_sntprintf(buf, _T("%d"), codepage);
+ mir_sntprintf(buf, L"%d", codepage);
ComboBox_SetText(hwndCB, buf);
}
else {
@@ -667,7 +667,7 @@ void Options::SetCodepageCB(HWND hwndCB, unsigned int codepage) if (selCpIdx == -1) {
TCHAR buf[10];
- mir_sntprintf(buf, _T("%d"), codepage);
+ mir_sntprintf(buf, L"%d", codepage);
ComboBox_SetText(hwndCB, buf);
}
else {
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index a9f1a47ece..d852b79f42 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -72,7 +72,7 @@ std::wstring GetFile() {
TCHAR filter[512];
mir_tstrncpy(filter, TranslateT("All Files (*.*)"), _countof(filter));
- memcpy(filter + mir_tstrlen(filter), _T("\0*.*\0"), 6 * sizeof(TCHAR));
+ memcpy(filter + mir_tstrlen(filter), L"\0*.*\0", 6 * sizeof(TCHAR));
TCHAR stzFilePath[1024];
stzFilePath[0] = 0;
stzFilePath[1] = 0;
diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp index 6c5ad07296..8e0cecb447 100644 --- a/plugins/PasteIt/src/PasteToWeb.cpp +++ b/plugins/PasteIt/src/PasteToWeb.cpp @@ -148,7 +148,7 @@ void RecodeDlg(HWND hwndDlg) }
else
{
- SetDlgItemText(hwndDlg, IDC_FILE_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_FILE_DATA, L"");
}
fromFileData->codepage = cp;
diff --git a/plugins/PasteIt/src/PasteToWeb1.cpp b/plugins/PasteIt/src/PasteToWeb1.cpp index c301b00b6e..73b4b77667 100644 --- a/plugins/PasteIt/src/PasteToWeb1.cpp +++ b/plugins/PasteIt/src/PasteToWeb1.cpp @@ -267,18 +267,18 @@ void PasteToWeb1::SendToServer(std::wstring str, std::wstring fileName, std::wst {
std::map<std::string, std::string> headers;
headers["Content-Type"] = "application/x-www-form-urlencoded";
- std::wstring content = _T("api_option=paste&api_paste_private=");
- content += Options::instance->webOptions[pageIndex]->publicPaste ? _T("0") : _T("1");
- content += _T("&api_paste_expire_date=");
- content += Options::instance->webOptions[pageIndex]->combo1.empty() ? _T("1M") : Options::instance->webOptions[pageIndex]->combo1;
- content += _T("&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd&api_paste_format=");
+ std::wstring content = L"api_option=paste&api_paste_private=";
+ content += Options::instance->webOptions[pageIndex]->publicPaste ? L"0" : L"1";
+ content += L"&api_paste_expire_date=";
+ content += Options::instance->webOptions[pageIndex]->combo1.empty() ? L"1M" : Options::instance->webOptions[pageIndex]->combo1;
+ content += L"&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd&api_paste_format=";
content += format;
if (!Options::instance->webOptions[pageIndex]->pastebinUserKey.empty())
{
- content += _T("&api_user_key=");
+ content += L"&api_user_key=";
content += Options::instance->webOptions[pageIndex]->pastebinUserKey;
}
- content += _T("&api_paste_code=");
+ content += L"&api_paste_code=";
for (std::wstring::iterator it = str.begin(); it != str.end(); ++it)
{
if (*it == L'%')
@@ -325,11 +325,11 @@ std::wstring PasteToWeb1::GetUserKey(std::wstring& user, std::wstring& password) {
std::map<std::string, std::string> headers;
headers["Content-Type"] = "application/x-www-form-urlencoded";
- std::wstring content = _T("api_user_name=");
+ std::wstring content = L"api_user_name=";
content += user;
- content += _T("&api_user_password=");
+ content += L"&api_user_password=";
content += password;
- content += _T("&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd");
+ content += L"&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd";
wchar_t* resCont = SendToWeb("http://pastebin.com/api/api_login.php", headers, content);
std::wstring toRet;
if (resCont != NULL)
diff --git a/plugins/PasteIt/src/PasteToWeb1.h b/plugins/PasteIt/src/PasteToWeb1.h index b1611855d6..79c9f7dc06 100644 --- a/plugins/PasteIt/src/PasteToWeb1.h +++ b/plugins/PasteIt/src/PasteToWeb1.h @@ -30,7 +30,7 @@ public: virtual ~PasteToWeb1();
virtual TCHAR* GetName()
{
- return _T("pastebin.com");
+ return L"pastebin.com";
}
virtual void ConfigureSettings();
virtual std::list<PasteFormat> GetFormats();
diff --git a/plugins/PasteIt/src/PasteToWeb2.cpp b/plugins/PasteIt/src/PasteToWeb2.cpp index 36e168a922..f9645ee447 100644 --- a/plugins/PasteIt/src/PasteToWeb2.cpp +++ b/plugins/PasteIt/src/PasteToWeb2.cpp @@ -54,15 +54,15 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst {
std::map<std::string, std::string> headers;
headers["Content-Type"] = "text/xml";
- std::wstring content = _T("<?xml version=\"1.0\"?>\r\n<methodCall><methodName>create_paste</methodName><params><param><value>");
+ std::wstring content = L"<?xml version=\"1.0\"?>\r\n<methodCall><methodName>create_paste</methodName><params><param><value>";
if (fileName == L"")
{
content += format;
- content += _T("</value></param><param><value>");
+ content += L"</value></param><param><value>";
}
else
{
- content += _T("</value></param><param><value>");
+ content += L"</value></param><param><value>";
}
for (std::wstring::iterator it = str.begin(); it != str.end(); ++it)
{
@@ -80,7 +80,7 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst }
}
- content += _T("</value></param><param><value></value></param><param><value>");
+ content += L"</value></param><param><value></value></param><param><value>";
if (fileName != L"")
{
for (std::wstring::iterator it = fileName.begin(); it != fileName.end(); ++it)
@@ -99,25 +99,25 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst }
}
}
- content += _T("</value></param><param><value></value></param><param><value><double>1.5</double></value></param></params></methodCall>");
+ content += L"</value></param><param><value></value></param><param><value><double>1.5</double></value></param></params></methodCall>";
wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content);
error = TranslateT("Error during sending text to web page");
if (resCont != NULL)
{
- HXML hXml = xmlParseString(resCont, NULL, _T("methodResponse"));
+ HXML hXml = xmlParseString(resCont, NULL, L"methodResponse");
if (hXml != NULL)
{
- HXML node = xmlGetChildByPath(hXml, _T("params/param/value/array/data/value/int"), 0);
- if (node != NULL && !mir_tstrcmp(xmlGetText(node), _T("1")))
+ HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
+ if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1"))
{
- node = xmlGetChildByPath(hXml, _T("params/param/value/array/data"), 0);
+ node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
if (node != NULL)
{
- node = xmlGetNthChild(node, _T("value"), 1);
+ node = xmlGetNthChild(node, L"value", 1);
if (node != NULL)
{
- node = xmlGetChildByPath(node, _T("string"), 0);
+ node = xmlGetChildByPath(node, L"string", 0);
if (node != NULL)
{
char* s = mir_t2a_cp(xmlGetText(node), CP_ACP);
@@ -140,24 +140,24 @@ std::list<PasteFormat> PasteToWeb2::GetFormats() std::map<std::string, std::string> headers;
headers["Content-Type"] = "text/xml";
- std::wstring content = _T("<?xml version=\"1.0\"?>\r\n<methodCall><methodName>types</methodName></methodCall>");
+ std::wstring content = L"<?xml version=\"1.0\"?>\r\n<methodCall><methodName>types</methodName></methodCall>";
wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content);
if (resCont != NULL)
{
- HXML hXml = xmlParseString(resCont, NULL, _T("methodResponse"));
+ HXML hXml = xmlParseString(resCont, NULL, L"methodResponse");
if (hXml != NULL)
{
- HXML node = xmlGetChildByPath(hXml, _T("params/param/value/array/data/value/int"), 0);
- if (node != NULL && !mir_tstrcmp(xmlGetText(node), _T("1")))
+ HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0);
+ if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1"))
{
- node = xmlGetChildByPath(hXml, _T("params/param/value/array/data"), 0);
+ node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0);
if (node != NULL)
{
- node = xmlGetNthChild(node, _T("value"), 1);
+ node = xmlGetNthChild(node, L"value", 1);
if (node != NULL)
{
- node = xmlGetChildByPath(node, _T("string"), 0);
+ node = xmlGetChildByPath(node, L"string", 0);
if (node != NULL)
{
std::wstring str = xmlGetText(node);
diff --git a/plugins/PasteIt/src/PasteToWeb2.h b/plugins/PasteIt/src/PasteToWeb2.h index 364c6eb4e4..6bbee7b455 100644 --- a/plugins/PasteIt/src/PasteToWeb2.h +++ b/plugins/PasteIt/src/PasteToWeb2.h @@ -29,7 +29,7 @@ public: virtual ~PasteToWeb2();
virtual TCHAR* GetName()
{
- return _T("wklej.to");
+ return L"wklej.to";
}
virtual void ConfigureSettings();
virtual std::list<PasteFormat> GetFormats();
diff --git a/plugins/Ping/src/log.cpp b/plugins/Ping/src/log.cpp index cce8d2e61c..59538f577e 100644 --- a/plugins/Ping/src/log.cpp +++ b/plugins/Ping/src/log.cpp @@ -15,13 +15,13 @@ INT_PTR Log(WPARAM wParam, LPARAM) { TCHAR *line = (TCHAR *)wParam;
- FILE *f = _tfopen(buf, _T("a+"));
+ FILE *f = _tfopen(buf, L"a+");
if (f) {
if (options.log_csv) {
- _ftprintf(f, _T("%s, %s, %s\n"), dbuf, tbuf, line);
+ _ftprintf(f, L"%s, %s, %s\n", dbuf, tbuf, line);
}
else {
- _ftprintf(f, _T("%s, %s: %s\n"), dbuf, tbuf, line);
+ _ftprintf(f, L"%s, %s: %s\n", dbuf, tbuf, line);
}
fclose(f);
}
@@ -34,7 +34,7 @@ INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) { TCHAR *filename = (TCHAR *)lParam;
if (db_get_ts(0, PLUG, "LogFilename", &dbv)) {
CallService(MS_DB_GETPROFILEPATHT, wParam, (LPARAM)filename);
- mir_tstrncat(filename, _T("\\ping_log.txt"), wParam - mir_tstrlen(filename));
+ mir_tstrncat(filename, L"\\ping_log.txt", wParam - mir_tstrlen(filename));
}
else {
mir_tstrncpy(filename, dbv.ptszVal, wParam);
@@ -54,6 +54,6 @@ INT_PTR SetLogFilename(WPARAM, LPARAM lParam) { INT_PTR ViewLogData(WPARAM wParam, LPARAM) {
TCHAR buf[MAX_PATH];
CallService(PLUG "/GetLogFilename", (WPARAM)MAX_PATH, (LPARAM)buf);
- return (INT_PTR)ShellExecute((HWND)wParam, _T("edit"), buf, _T(""), _T(""), SW_SHOW);
+ return (INT_PTR)ShellExecute((HWND)wParam, L"edit", buf, L"", L"", SW_SHOW);
}
diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp index 6d270c713a..56e501ee40 100644 --- a/plugins/Ping/src/options.cpp +++ b/plugins/Ping/src/options.cpp @@ -82,7 +82,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_BTN_LOGBROWSE:
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.txt%c%s%c*.*%c"), TranslateT("Text Files (*.txt)"), 0, 0, TranslateT("All Files"), 0, 0);
+ mir_sntprintf(filter, L"%s%c*.txt%c%s%c*.*%c", TranslateT("Text Files (*.txt)"), 0, 0, TranslateT("All Files"), 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
ofn.lpstrFile = options.log_filename;
@@ -150,7 +150,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA RefreshWindow(0, 0);
- if (options.logging) CallService(PLUG "/Log", (WPARAM)_T("options changed"), 0);
+ if (options.logging) CallService(PLUG "/Log", (WPARAM)L"options changed", 0);
if (hWakeEvent) SetEvent(hWakeEvent);
return TRUE;
}
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 63972b536f..9533ff3d83 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -115,7 +115,7 @@ int OnModulesLoaded(WPARAM, LPARAM) graphs_init();
- if (options.logging) CallService(PLUG "/Log", (WPARAM)_T("start"), 0);
+ if (options.logging) CallService(PLUG "/Log", (WPARAM)L"start", 0);
return 0;
}
@@ -137,7 +137,7 @@ extern "C" __declspec(dllexport) int Load(void) db_set_b(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping);
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0);
- hWakeEvent = CreateEvent(NULL, FALSE, FALSE, _T("Local\\ThreadWaitEvent"));
+ hWakeEvent = CreateEvent(NULL, FALSE, FALSE, L"Local\\ThreadWaitEvent");
// create services before loading options - so we can have the 'getlogfilename' service!
CreatePluginServices();
@@ -166,7 +166,7 @@ extern "C" __declspec(dllexport) int Unload(void) CloseHandle(mainThread);
- if (options.logging) CallService(PLUG "/Log", (WPARAM)_T("stop"), 0);
+ if (options.logging) CallService(PLUG "/Log", (WPARAM)L"stop", 0);
return 0;
}
diff --git a/plugins/Ping/src/pinggraph.cpp b/plugins/Ping/src/pinggraph.cpp index 5cf5d38093..bb9b2f94b3 100644 --- a/plugins/Ping/src/pinggraph.cpp +++ b/plugins/Ping/src/pinggraph.cpp @@ -45,11 +45,11 @@ LRESULT CALLBACK GraphWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar WindowData *wd = (WindowData *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (wd->hwnd_chk_grid == 0) {
- wd->hwnd_chk_grid = CreateWindow(_T("BUTTON"), TranslateT("Show grid lines"), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 0, 0, 0, 0, hwnd, 0, hInst, 0);
+ wd->hwnd_chk_grid = CreateWindow(L"BUTTON", TranslateT("Show grid lines"), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 0, 0, 0, 0, hwnd, 0, hInst, 0);
SendMessage(wd->hwnd_chk_grid, BM_SETCHECK, wd->show_grid ? BST_CHECKED : BST_UNCHECKED, 0);
}
if (wd->hwnd_chk_stat == 0) {
- wd->hwnd_chk_stat = CreateWindow(_T("BUTTON"), TranslateT("Show stats"), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 0, 0, 0, 0, hwnd, 0, hInst, 0);
+ wd->hwnd_chk_stat = CreateWindow(L"BUTTON", TranslateT("Show stats"), WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, 0, 0, 0, 0, hwnd, 0, hInst, 0);
SendMessage(wd->hwnd_chk_stat, BM_SETCHECK, wd->show_stat ? BST_CHECKED : BST_UNCHECKED, 0);
}
KillTimer(hwnd, ID_REPAINT_TIMER);
@@ -272,18 +272,18 @@ INT_PTR ShowGraph(WPARAM wParam, LPARAM lParam) { wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T(PLUG) _T("GraphWindow");
+ wndclass.lpszClassName = _T(PLUG) L"GraphWindow";
RegisterClass(&wndclass);
TCHAR title[256];
mir_tstrncpy(title, TranslateT("Ping Graph"), _countof(title));
if (lParam) {
- mir_tstrncat(title, _T(" - "), _countof(title) - mir_tstrlen(title));
+ mir_tstrncat(title, L" - ", _countof(title) - mir_tstrlen(title));
mir_tstrncat(title, (TCHAR *)lParam, _countof(title) - mir_tstrlen(title));
}
HWND parent = 0;
- hGraphWnd = CreateWindowEx(0, _T(PLUG) _T("GraphWindow"), title,
+ hGraphWnd = CreateWindowEx(0, _T(PLUG) L"GraphWindow", title,
(WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN) & ~CS_VREDRAW & ~CS_HREDRAW,
0, 0, 800, 600, parent, NULL, hInst, NULL);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 1a09b4feb8..16a160387b 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -259,7 +259,7 @@ int FillList(WPARAM, LPARAM) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("ping address list reload"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"ping address list reload", 0);
PINGLIST pl;
CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
@@ -308,9 +308,9 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) if (frame_id != -1 && ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
TCHAR TBcapt[255];
if (total > 0)
- mir_sntprintf(TBcapt, _T("Ping (%d/%d)"), upCount, total);
+ mir_sntprintf(TBcapt, L"Ping (%d/%d)", upCount, total);
else
- mir_sntprintf(TBcapt, _T("Ping"));
+ mir_sntprintf(TBcapt, L"Ping");
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt);
@@ -395,7 +395,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar TextOut(dis->hDC, dis->rcItem.right - textSize.cx - 2, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, buf, (int)mir_tstrlen(buf));
}
else if (itemData.miss_count > 0) {
- mir_sntprintf(buf, _T("[%d]"), itemData.miss_count);
+ mir_sntprintf(buf, L"[%d]", itemData.miss_count);
GetTextExtentPoint32(dis->hDC, buf, (int)mir_tstrlen(buf), &textSize);
TextOut(dis->hDC, dis->rcItem.right - textSize.cx - 2, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, buf, (int)mir_tstrlen(buf));
}
@@ -477,7 +477,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar return DefWindowProc(hwnd, msg, wParam, lParam);
case WM_CREATE:
- list_hwnd = CreateWindow(_T("LISTBOX"), _T(""),
+ list_hwnd = CreateWindow(L"LISTBOX", L"",
//(WS_VISIBLE | WS_CHILD | LBS_NOINTEGRALHEIGHT| LBS_STANDARD | WS_CLIPCHILDREN | LBS_OWNERDRAWVARIABLE | LBS_NOTIFY)
(WS_VISIBLE | WS_CHILD | LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_NOTIFY)
& ~WS_BORDER, 0, 0, 0, 0, hwnd, NULL, hInst, 0);
@@ -717,7 +717,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (options.logging) {
TCHAR buf[1024];
- mir_sntprintf(buf, _T("%s - %s"), pItemData->pszLabel, (wake ? TranslateT("enabled") : TranslateT("double clicked")));
+ mir_sntprintf(buf, L"%s - %s", pItemData->pszLabel, (wake ? TranslateT("enabled") : TranslateT("double clicked")));
CallService(PLUG "/Log", (WPARAM)buf, 0);
}
}
@@ -875,11 +875,11 @@ void InitList() wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T(PLUG) _T("WindowClass");
+ wndclass.lpszClassName = _T(PLUG) L"WindowClass";
RegisterClass(&wndclass);
if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- hpwnd = CreateWindow(_T(PLUG) _T("WindowClass"), _T("Ping"), (WS_BORDER | WS_CHILD | WS_CLIPCHILDREN), 0, 0, 0, 0, hwnd_clist, NULL, hInst, NULL);
+ hpwnd = CreateWindow(_T(PLUG) L"WindowClass", L"Ping", (WS_BORDER | WS_CHILD | WS_CLIPCHILDREN), 0, 0, 0, 0, hwnd_clist, NULL, hInst, NULL);
CLISTFrame frame = { 0 };
frame.name = PLUG;
@@ -893,7 +893,7 @@ void InitList() frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
}
else {
- hpwnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T(PLUG) _T("WindowClass"), _T("Ping"),
+ hpwnd = CreateWindowEx(WS_EX_TOOLWINDOW, _T(PLUG) L"WindowClass", L"Ping",
(WS_POPUPWINDOW | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPCHILDREN),
0, 0, 400, 300, hwnd_clist, NULL, hInst, NULL);
@@ -921,21 +921,21 @@ void InitList() mir_tstrncpy(font_id.name, LPGENT("List"), _countof(font_id.name));
mir_strncpy(font_id.dbSettingsGroup, "PING", _countof(font_id.dbSettingsGroup));
mir_strncpy(font_id.prefix, "Font", _countof(font_id.prefix));
- mir_tstrncpy(font_id.backgroundGroup, _T("Ping"), _countof(font_id.backgroundGroup));
- mir_tstrncpy(font_id.backgroundName, _T("Background"), _countof(font_id.backgroundName));
+ mir_tstrncpy(font_id.backgroundGroup, L"Ping", _countof(font_id.backgroundGroup));
+ mir_tstrncpy(font_id.backgroundName, L"Background", _countof(font_id.backgroundName));
font_id.order = 0;
font_id.flags = FIDF_DEFAULTVALID;
font_id.deffontsettings.charset = DEFAULT_CHARSET;
font_id.deffontsettings.size = -14;
font_id.deffontsettings.style = 0;
font_id.deffontsettings.colour = RGB(255, 255, 255);
- mir_tstrncpy(font_id.deffontsettings.szFace, _T("Tahoma"), _countof(font_id.deffontsettings.szFace));
+ mir_tstrncpy(font_id.deffontsettings.szFace, L"Tahoma", _countof(font_id.deffontsettings.szFace));
FontRegisterT(&font_id);
bk_col_id.cbSize = sizeof(ColourIDT);
- mir_tstrncpy(bk_col_id.group, _T("Ping"), _countof(bk_col_id.group));
- mir_tstrncpy(bk_col_id.name, _T("Background"), _countof(bk_col_id.name));
+ mir_tstrncpy(bk_col_id.group, L"Ping", _countof(bk_col_id.group));
+ mir_tstrncpy(bk_col_id.name, L"Background", _countof(bk_col_id.name));
mir_strncpy(bk_col_id.dbSettingsGroup, "PING", _countof(bk_col_id.dbSettingsGroup));
mir_strncpy(bk_col_id.setting, "BgColor", _countof(bk_col_id.setting));
bk_col_id.defcolour = RGB(0, 0, 0);
diff --git a/plugins/Ping/src/rawping.cpp b/plugins/Ping/src/rawping.cpp index 8b7918280a..bc7de84224 100644 --- a/plugins/Ping/src/rawping.cpp +++ b/plugins/Ping/src/rawping.cpp @@ -95,7 +95,7 @@ extern int raw_ping(char *host, int timeout) }
else {
// Not a recognized hostname either!
- if (options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: unrecognised host"), 0);
+ if (options.logging) CallService(PLUG "/Log", (WPARAM)L"rawping error: unrecognised host", 0);
return -1;
}
}
@@ -119,7 +119,7 @@ extern int raw_ping(char *host, int timeout) // send packet
int bwrote = sendto(sd, (char*)packet, sizeof(ICMPHeader), 0, (sockaddr*)&dest, sizeof(dest));
if (bwrote == SOCKET_ERROR) {
- if (options.logging) CallService(PLUG "/Log", (WPARAM)_T("rawping error: unable to send"), 0);
+ if (options.logging) CallService(PLUG "/Log", (WPARAM)L"rawping error: unable to send", 0);
return -1;
}
@@ -151,39 +151,39 @@ extern int raw_ping(char *host, int timeout) if (bread == SOCKET_ERROR) {
if (WSAGetLastError() != WSAETIMEDOUT) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: socket error...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: socket error...cycling", 0);
}
continue;
}
if (reply_header->proto != ICMP_PROTO) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: packet not ICMP...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: packet not ICMP...cycling", 0);
continue;
}
if (reply_header->tos != 0) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: TOS not 0...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: TOS not 0...cycling", 0);
continue;
}
reply = (ICMPHeader *)(recv_buff + reply_header->h_len * 4);
if ((unsigned)bread < reply_header->h_len * 4 + sizeof(ICMPHeader)) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: short header"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: short header", 0);
continue;
}
if (reply->id != (USHORT)GetCurrentProcessId()) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong ID...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: wrong ID...cycling", 0);
continue;
}
if (reply->type != PT_ICMP_ECHO_REPLY && reply->type != PT_ICMP_SOURCE_QUENCH) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong type...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: wrong type...cycling", 0);
continue;
}
@@ -191,7 +191,7 @@ extern int raw_ping(char *host, int timeout) //if(reply->seq > seq_no) return -1;
if (reply->seq != seq_no) {
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: wrong sequence number...cycling"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: wrong sequence number...cycling", 0);
continue;
}
@@ -210,7 +210,7 @@ extern int raw_ping(char *host, int timeout) return current_time - send_time;
}
if (options.logging)
- CallService(PLUG "/Log", (WPARAM)_T("rawping error: timeout"), 0);
+ CallService(PLUG "/Log", (WPARAM)L"rawping error: timeout", 0);
return -1;
}
diff --git a/plugins/Ping/src/stdafx.h b/plugins/Ping/src/stdafx.h index 34b45bfdef..746a2d596b 100644 --- a/plugins/Ping/src/stdafx.h +++ b/plugins/Ping/src/stdafx.h @@ -46,7 +46,7 @@ #define DEFAULT_SHOW_POPUP2 false
#define DEFAULT_BLOCK_REPS true
#define DEFAULT_LOGGING_ENABLED false
-#define DEFAULT_LOG_FILENAME _T("ping_log.txt")
+#define DEFAULT_LOG_FILENAME L"ping_log.txt"
#define DEFAULT_NO_TEST_ICON true
#define DEFAULT_ATTACH_TO_CLIST false
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index 5421275577..dedd9cf470 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -51,7 +51,7 @@ void __stdcall ShowPopup(TCHAR *line1, TCHAR *line2, int flags) QueueUserAPC(sttMainThreadCallback, mainThread, (ULONG_PTR)ppd);
}
else{
- MessageBox(NULL, line2, _T(PLUG) _T(" Message"), MB_OK | MB_ICONINFORMATION);
+ MessageBox(NULL, line2, _T(PLUG) L" Message", MB_OK | MB_ICONINFORMATION);
return;
}
}
@@ -206,7 +206,7 @@ INT_PTR DblClick(WPARAM wParam, LPARAM) { for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
if (i->item_id == (DWORD)wParam) {
if (mir_tstrlen(i->pszCommand)) {
- ShellExecute(0, _T("open"), i->pszCommand, i->pszParams, 0, SW_SHOW);
+ ShellExecute(0, L"open", i->pszCommand, i->pszParams, 0, SW_SHOW);
}
else {
return CallService(PLUG "/ToggleEnabled", wParam, 0);
diff --git a/plugins/PluginUpdater/pu_stub/pu_stub.cpp b/plugins/PluginUpdater/pu_stub/pu_stub.cpp index 8b3e25896d..8167c32d83 100644 --- a/plugins/PluginUpdater/pu_stub/pu_stub.cpp +++ b/plugins/PluginUpdater/pu_stub/pu_stub.cpp @@ -66,9 +66,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR lpCmdLine, int) TCHAR tszPipeName[MAX_PATH];
#if _MSC_VER < 1400
- _stprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine);
+ _stprintf(tszPipeName, L"\\\\.\\pipe\\Miranda_Pu_%s", lpCmdLine);
#else
- _stprintf_s(tszPipeName, MAX_PATH, _T("\\\\.\\pipe\\Miranda_Pu_%s"), lpCmdLine);
+ _stprintf_s(tszPipeName, MAX_PATH, L"\\\\.\\pipe\\Miranda_Pu_%s", lpCmdLine);
#endif
log( L"Opening pipe %s...", tszPipeName);
HANDLE hPipe = CreateFile(tszPipeName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
diff --git a/plugins/PluginUpdater/src/Compat/compat.cpp b/plugins/PluginUpdater/src/Compat/compat.cpp index 35533ffd6a..4d46cca5fc 100644 --- a/plugins/PluginUpdater/src/Compat/compat.cpp +++ b/plugins/PluginUpdater/src/Compat/compat.cpp @@ -106,8 +106,8 @@ void __stdcall RestartMe(void*) TCHAR mirandaPath[MAX_PATH], cmdLine[MAX_PATH];
GetModuleFileName(NULL, mirandaPath, SIZEOF(mirandaPath));
- TCHAR *profilename = Utils_ReplaceVarsT(_T("%miranda_profilename%"));
- mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), profilename);
+ TCHAR *profilename = Utils_ReplaceVarsT(L"%miranda_profilename%");
+ mir_sntprintf(cmdLine, SIZEOF(cmdLine), L"\"%s\" /restart:%d /profile=%s", mirandaPath, GetCurrentProcessId(), profilename);
mir_free(profilename);
CallService("CloseAction", 0, 0);
@@ -139,5 +139,5 @@ void InitIcoLib() }
TCHAR *GetDefaultUrl() {
- return mir_tstrdup(_T("http://miranda-ng.org/distr/deprecated/0.94.9/x%platform%"));
+ return mir_tstrdup(L"http://miranda-ng.org/distr/deprecated/0.94.9/x%platform%");
}
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index 6ad434754f..3d6b7ed772 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -55,13 +55,13 @@ static void ApplyDownloads(void *param) //create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); ++i) {
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
// Running Windows Vista or later (major version >= 6).
@@ -230,7 +230,7 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) int groupId = 4;
if (_tcschr(todo[i].tszOldName, L'\\') != NULL)
- groupId = (_tcsstr(todo[i].tszOldName, _T("Plugins")) != NULL) ? 1 : ((_tcsstr(todo[i].tszOldName, _T("Languages")) != NULL) ? 3 : 2);
+ groupId = (_tcsstr(todo[i].tszOldName, L"Plugins") != NULL) ? 1 : ((_tcsstr(todo[i].tszOldName, L"Languages") != NULL) ? 3 : 2);
lvi.iItem = i;
lvi.lParam = (LPARAM)&todo[i];
@@ -362,13 +362,13 @@ static FILEINFO* ServerEntryToFileInfo(const ServListEntry &hash, const TCHAR* t tp = _tcschr(tszRelFileName, L'\\'); if (tp) tp++; else tp = tszRelFileName;
_tcslwr(tp);
- mir_sntprintf(FileInfo->File.tszDiskPath, _T("%s\\Temp\\%s.zip"), g_tszRoot, tszFileName);
- mir_sntprintf(FileInfo->File.tszDownloadURL, _T("%s/%s.zip"), tszBaseUrl, tszRelFileName);
+ mir_sntprintf(FileInfo->File.tszDiskPath, L"%s\\Temp\\%s.zip", g_tszRoot, tszFileName);
+ mir_sntprintf(FileInfo->File.tszDownloadURL, L"%s/%s.zip", tszBaseUrl, tszRelFileName);
for (tp = _tcschr(FileInfo->File.tszDownloadURL, '\\'); tp != 0; tp = _tcschr(tp, '\\'))
*tp++ = '/';
FileInfo->File.CRCsum = hash.m_crc;
// Load list of checked Plugins from database
- Netlib_LogfT(hNetlibUser, _T("File %s found"), FileInfo->tszOldName);
+ Netlib_LogfT(hNetlibUser, L"File %s found", FileInfo->tszOldName);
FileInfo->bEnabled = db_get_b(NULL, DB_MODULE_NEW_FILES, _T2A(FileInfo->tszOldName)) != 0;
return FileInfo;
}
@@ -393,13 +393,13 @@ static void GetList(void *) }
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(_T("%miranda_path%"));
+ VARST dirname(L"%miranda_path%");
for (int i=0; i < hashes.getCount(); i++) {
ServListEntry &hash = hashes[i];
TCHAR tszPath[MAX_PATH];
- mir_sntprintf(tszPath, _T("%s\\%s"), dirname, hash.m_name);
+ mir_sntprintf(tszPath, L"%s\\%s", dirname, hash.m_name);
if (GetFileAttributes(tszPath) == INVALID_FILE_ATTRIBUTES) {
FILEINFO *FileInfo = ServerEntryToFileInfo(hash, baseUrl, tszPath);
@@ -480,9 +480,9 @@ static INT_PTR ParseUriService(WPARAM, LPARAM lParam) if (hash == NULL)
return 0;
- VARST dirName(_T("%miranda_path%"));
+ VARST dirName(L"%miranda_path%");
TCHAR tszPath[MAX_PATH];
- mir_sntprintf(tszPath, _T("%s\\%s"), dirName, hash->m_name);
+ mir_sntprintf(tszPath, L"%s\\%s", dirName, hash->m_name);
FILEINFO *fileInfo = ServerEntryToFileInfo(*hash, baseUrl, tszPath);
FILELIST *fileList = new FILELIST(1);
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 2b636c5a2a..38e3646421 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -61,9 +61,9 @@ static void ApplyUpdates(void *param) HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
//create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
// 2) Download all plugins
@@ -96,14 +96,14 @@ static void ApplyUpdates(void *param) Netlib_CloseHandle(nlc);
// 3) Unpack all zips
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < todo.getCount(); i++) {
FILEINFO& p = todo[i];
if (p.bEnabled) {
if (p.bDeleteOnly) {
// we need only to backup the old file
TCHAR *ptszRelPath = p.tszNewName + _tcslen(tszMirandaPath) + 1, tszBackFile[MAX_PATH];
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, ptszRelPath);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, ptszRelPath);
BackupFile(p.tszNewName, tszBackFile);
}
else {
@@ -111,8 +111,8 @@ static void ApplyUpdates(void *param) // otherwise it would be replaced by unzip
if ( _tcsicmp(p.tszOldName, p.tszNewName)) {
TCHAR tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
- mir_sntprintf(tszSrcPath, _T("%s\\%s"), tszMirandaPath, p.tszOldName);
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, p.tszOldName);
+ mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
BackupFile(tszSrcPath, tszBackFile);
}
@@ -126,8 +126,8 @@ static void ApplyUpdates(void *param) #if MIRANDA_VER < 0x0A00
// 4) Change title of clist
ptrT title(db_get_tsa(NULL, "CList", "TitleText"));
- if (!lstrcmpi(title, _T("Miranda IM")))
- db_set_ts(NULL, "CList", "TitleText", _T("Miranda NG"));
+ if (!lstrcmpi(title, L"Miranda IM"))
+ db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
#endif
db_set_b(NULL, MODNAME, DB_SETTING_RESTART_COUNT, 5);
@@ -165,9 +165,9 @@ static void ApplyUpdates(void *param) TCHAR mirstartpath[MAX_PATH];
#ifdef _WIN64
- mir_sntprintf(mirstartpath, _T("%s\\miranda32.exe"), tszMirandaPath);
+ mir_sntprintf(mirstartpath, L"%s\\miranda32.exe", tszMirandaPath);
#else
- mir_sntprintf(mirstartpath, _T("%s\\miranda64.exe"), tszMirandaPath);
+ mir_sntprintf(mirstartpath, L"%s\\miranda64.exe", tszMirandaPath);
#endif
CallServiceSync(MS_SYSTEM_RESTART, bRestartCurrentProfile, (LPARAM)mirstartpath);
}
@@ -210,7 +210,7 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
// Running Windows Vista or later (major version >= 6).
@@ -268,9 +268,9 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM for (int i = 0; i < todo.getCount(); ++i) {
LVITEM lvI = {0};
lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_GROUPID | LVIF_NORECOMPUTE;
- lvI.iGroupId = (_tcsstr(todo[i].tszOldName, _T("Plugins")) != NULL) ? 1 :
- ((_tcsstr(todo[i].tszOldName, _T("Languages")) != NULL) ? 3 :
- ((_tcsstr(todo[i].tszOldName, _T("Icons")) != NULL) ? 4 : 2));
+ lvI.iGroupId = (_tcsstr(todo[i].tszOldName, L"Plugins") != NULL) ? 1 :
+ ((_tcsstr(todo[i].tszOldName, L"Languages") != NULL) ? 3 :
+ ((_tcsstr(todo[i].tszOldName, L"Icons") != NULL) ? 4 : 2));
lvI.iSubItem = 0;
lvI.lParam = (LPARAM)&todo[i];
lvI.pszText = todo[i].tszOldName;
@@ -412,10 +412,10 @@ static void DlgUpdateSilent(void *param) //create needed folders after escalating priviledges. Folders creates when we actually install updates
TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
- mir_sntprintf(tszFileBack, _T("%s\\Backups"), g_tszRoot);
+ mir_sntprintf(tszFileBack, L"%s\\Backups", g_tszRoot);
SafeCreateDirectory(tszFileBack);
- mir_sntprintf(tszFileTemp, _T("%s\\Temp"), g_tszRoot);
+ mir_sntprintf(tszFileTemp, L"%s\\Temp", g_tszRoot);
SafeCreateDirectory(tszFileTemp);
// 2) Download all plugins
@@ -446,14 +446,14 @@ static void DlgUpdateSilent(void *param) }
// 3) Unpack all zips
- VARST tszMirandaPath(_T("%miranda_path%"));
+ VARST tszMirandaPath(L"%miranda_path%");
for (int i = 0; i < UpdateFiles.getCount(); i++) {
FILEINFO& p = UpdateFiles[i];
if (p.bEnabled) {
if (p.bDeleteOnly) {
// we need only to backup the old file
TCHAR *ptszRelPath = p.tszNewName + _tcslen(tszMirandaPath) + 1, tszBackFile[MAX_PATH];
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, ptszRelPath);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, ptszRelPath);
BackupFile(p.tszNewName, tszBackFile);
}
else {
@@ -461,8 +461,8 @@ static void DlgUpdateSilent(void *param) // otherwise it would be replaced by unzip
if (_tcsicmp(p.tszOldName, p.tszNewName)) {
TCHAR tszSrcPath[MAX_PATH], tszBackFile[MAX_PATH];
- mir_sntprintf(tszSrcPath, _T("%s\\%s"), tszMirandaPath, p.tszOldName);
- mir_sntprintf(tszBackFile, _T("%s\\%s"), tszFileBack, p.tszOldName);
+ mir_sntprintf(tszSrcPath, L"%s\\%s", tszMirandaPath, p.tszOldName);
+ mir_sntprintf(tszBackFile, L"%s\\%s", tszFileBack, p.tszOldName);
BackupFile(tszSrcPath, tszBackFile);
}
@@ -478,8 +478,8 @@ static void DlgUpdateSilent(void *param) #if MIRANDA_VER < 0x0A00
// 4) Change title of clist
ptrT title = db_get_tsa(NULL, "CList", "TitleText");
- if (!_tcsicmp(title, _T("Miranda IM")))
- db_set_ts(NULL, "CList", "TitleText", _T("Miranda NG"));
+ if (!_tcsicmp(title, L"Miranda IM"))
+ db_set_ts(NULL, "CList", "TitleText", L"Miranda NG");
#endif
opts.bForceRedownload = false;
@@ -515,7 +515,7 @@ static void DlgUpdateSilent(void *param) if (!notified) {
// Error, let's try to show MessageBox as last way to inform user about successful update
TCHAR tszText[200];
- mir_sntprintf(tszText, _T("%s\n\n%s"), TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
+ mir_sntprintf(tszText, L"%s\n\n%s", TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
if (MessageBox(NULL, tszText, tszTitle, MB_ICONINFORMATION | MB_YESNO) == IDYES)
#if MIRANDA_VER >= 0x0A00
@@ -544,61 +544,61 @@ struct }
static renameTable[] =
{
- { _T("svc_dbepp.dll"), _T("Plugins\\dbeditorpp.dll") },
- { _T("svc_crshdmp.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashdmp.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashrpt.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("attache.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("svc_vi.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("crashrpt.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("versioninfo.dll"), _T("Plugins\\crashdumper.dll") },
- { _T("advsplashscreen.dll"), _T("Plugins\\splashscreen.dll") },
- { _T("import_sa.dll"), _T("Plugins\\import.dll") },
- { _T("newnr.dll"), _T("Plugins\\notesreminders.dll") },
- { _T("dbtool.exe"), _T("Plugins\\dbchecker.dll") },
- { _T("dbtool_sa.exe"), _T("Plugins\\dbchecker.dll") },
- { _T("clist_mw.dll"), _T("Plugins\\clist_nicer.dll") },
- { _T("bclist.dll"), _T("Plugins\\clist_blind.dll") },
- { _T("otr.dll"), _T("Plugins\\mirotr.dll") },
- { _T("ttnotify.dll"), _T("Plugins\\tooltipnotify.dll") },
- { _T("newstatusnotify.dll"), _T("Plugins\\newxstatusnotify.dll") },
- { _T("rss.dll"), _T("Plugins\\newsaggregator.dll") },
- { _T("dbx_3x.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("actman30.dll"), _T("Plugins\\actman.dll") },
- { _T("skype.dll"), _T("Plugins\\skypeweb.dll") },
- { _T("skypeclassic.dll"), _T("Plugins\\skypeweb.dll") },
- { _T("historysweeper.dll"), _T("Plugins\\historysweeperlight.dll") },
+ { L"svc_dbepp.dll", L"Plugins\\dbeditorpp.dll" },
+ { L"svc_crshdmp.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashdmp.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
+ { L"attache.dll", L"Plugins\\crashdumper.dll" },
+ { L"svc_vi.dll", L"Plugins\\crashdumper.dll" },
+ { L"crashrpt.dll", L"Plugins\\crashdumper.dll" },
+ { L"versioninfo.dll", L"Plugins\\crashdumper.dll" },
+ { L"advsplashscreen.dll", L"Plugins\\splashscreen.dll" },
+ { L"import_sa.dll", L"Plugins\\import.dll" },
+ { L"newnr.dll", L"Plugins\\notesreminders.dll" },
+ { L"dbtool.exe", L"Plugins\\dbchecker.dll" },
+ { L"dbtool_sa.exe", L"Plugins\\dbchecker.dll" },
+ { L"clist_mw.dll", L"Plugins\\clist_nicer.dll" },
+ { L"bclist.dll", L"Plugins\\clist_blind.dll" },
+ { L"otr.dll", L"Plugins\\mirotr.dll" },
+ { L"ttnotify.dll", L"Plugins\\tooltipnotify.dll" },
+ { L"newstatusnotify.dll", L"Plugins\\newxstatusnotify.dll" },
+ { L"rss.dll", L"Plugins\\newsaggregator.dll" },
+ { L"dbx_3x.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"actman30.dll", L"Plugins\\actman.dll" },
+ { L"skype.dll", L"Plugins\\skypeweb.dll" },
+ { L"skypeclassic.dll", L"Plugins\\skypeweb.dll" },
+ { L"historysweeper.dll", L"Plugins\\historysweeperlight.dll" },
#if MIRANDA_VER >= 0x0A00
- { _T("dbx_mmap_sa.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("dbx_tree.dll"), _T("Plugins\\dbx_mmap.dll") },
- { _T("rc4.dll"), NULL },
- { _T("athena.dll"), NULL },
- { _T("skypekit.exe"), NULL },
+ { L"dbx_mmap_sa.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"dbx_tree.dll", L"Plugins\\dbx_mmap.dll" },
+ { L"rc4.dll", NULL },
+ { L"athena.dll", NULL },
+ { L"skypekit.exe", NULL },
#endif
- { _T("proto_newsaggr.dll"), _T("Icons\\proto_newsaggregator.dll") },
- { _T("clienticons_*.dll"), _T("Icons\\fp_icons.dll") },
- { _T("fp_*.dll"), _T("Icons\\fp_icons.dll") },
-
- { _T("langpack_*.txt"), _T("Languages\\*") },
-
- { _T("mir_app.dll"), NULL },
- { _T("mir_core.dll"), NULL },
- { _T("zlib.dll"), NULL },
- { _T("pcre16.dll"), NULL },
- { _T("clist_classic.dll"), NULL },
- { _T("chat.dll"), NULL },
- { _T("srmm.dll"), NULL },
- { _T("stdurl.dll"), NULL },
- { _T("extraicons.dll"), NULL },
- { _T("firstrun.dll"), NULL },
- { _T("flashavatars.dll"), NULL },
- { _T("gender.dll"), NULL },
- { _T("langman.dll"), NULL },
- { _T("metacontacts.dll"), NULL },
- { _T("xfire.dll"), NULL },
- { _T("WART-*.exe"), NULL },
+ { L"proto_newsaggr.dll", L"Icons\\proto_newsaggregator.dll" },
+ { L"clienticons_*.dll", L"Icons\\fp_icons.dll" },
+ { L"fp_*.dll", L"Icons\\fp_icons.dll" },
+
+ { L"langpack_*.txt", L"Languages\\*" },
+
+ { L"mir_app.dll", NULL },
+ { L"mir_core.dll", NULL },
+ { L"zlib.dll", NULL },
+ { L"pcre16.dll", NULL },
+ { L"clist_classic.dll", NULL },
+ { L"chat.dll", NULL },
+ { L"srmm.dll", NULL },
+ { L"stdurl.dll", NULL },
+ { L"extraicons.dll", NULL },
+ { L"firstrun.dll", NULL },
+ { L"flashavatars.dll", NULL },
+ { L"gender.dll", NULL },
+ { L"langman.dll", NULL },
+ { L"metacontacts.dll", NULL },
+ { L"xfire.dll", NULL },
+ { L"WART-*.exe", NULL },
};
// Checks if file needs to be renamed and copies it in pNewName
@@ -629,34 +629,34 @@ static bool isValidExtension(const TCHAR *ptszFileName) {
const TCHAR *pExt = _tcsrchr(ptszFileName, '.');
- return (pExt != NULL) && (!_tcsicmp(pExt, _T(".dll")) || !_tcsicmp(pExt, _T(".exe")) || !_tcsicmp(pExt, _T(".txt")));
+ return (pExt != NULL) && (!_tcsicmp(pExt, L".dll") || !_tcsicmp(pExt, L".exe") || !_tcsicmp(pExt, L".txt"));
}
// We only scan subfolders "Plugins", "Icons", "Languages", "Libs", "Core"
static bool isValidDirectory(const TCHAR *ptszDirName)
{
- return !_tcsicmp(ptszDirName, _T("Plugins")) || !_tcsicmp(ptszDirName, _T("Icons")) || !_tcsicmp(ptszDirName, _T("Languages")) || !_tcsicmp(ptszDirName, _T("Libs")) || !_tcsicmp(ptszDirName, _T("Core"));
+ return !_tcsicmp(ptszDirName, L"Plugins") || !_tcsicmp(ptszDirName, L"Icons") || !_tcsicmp(ptszDirName, L"Languages") || !_tcsicmp(ptszDirName, L"Libs") || !_tcsicmp(ptszDirName, L"Core");
}
// Scans folders recursively
static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tszBaseUrl, SERVLIST& hashes, OBJLIST<FILEINFO> *UpdateFiles, int level = 0)
{
TCHAR tszBuf[MAX_PATH];
- mir_sntprintf(tszBuf, _T("%s\\*"), tszFolder);
+ mir_sntprintf(tszBuf, L"%s\\*", tszFolder);
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(tszBuf, &ffd);
if (hFind == INVALID_HANDLE_VALUE)
return 0;
- Netlib_LogfT(hNetlibUser,_T("Scanning folder %s"), tszFolder);
+ Netlib_LogfT(hNetlibUser,L"Scanning folder %s", tszFolder);
int count = 0;
do {
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// Scan recursively all subfolders
if (isValidDirectory(ffd.cFileName)) {
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
count += ScanFolder(tszBuf, cbBaseLen, tszBaseUrl, hashes, UpdateFiles, level + 1);
}
}
@@ -664,19 +664,19 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz // calculate the current file's relative name and store it into tszNewName
TCHAR tszNewName[MAX_PATH];
if (CheckFileRename(ffd.cFileName, tszNewName)) {
- Netlib_LogfT(hNetlibUser, _T("File %s will be renamed to %s."), ffd.cFileName, tszNewName);
+ Netlib_LogfT(hNetlibUser, L"File %s will be renamed to %s.", ffd.cFileName, tszNewName);
// Yes, we need the old file name, because this will be hashed later
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
}
else {
if (level == 0) {
// Rename Miranda*.exe
_tcsncpy_s(tszNewName, opts.bChangePlatform && !mir_tstrcmpi(ffd.cFileName, OLD_FILENAME) ? NEW_FILENAME : ffd.cFileName, _TRUNCATE);
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, tszNewName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, tszNewName);
}
else {
- mir_sntprintf(tszNewName, _T("%s\\%s"), tszFolder + cbBaseLen, ffd.cFileName);
- mir_sntprintf(tszBuf, _T("%s\\%s"), tszFolder, ffd.cFileName);
+ mir_sntprintf(tszNewName, L"%s\\%s", tszFolder + cbBaseLen, ffd.cFileName);
+ mir_sntprintf(tszBuf, L"%s\\%s", tszFolder, ffd.cFileName);
}
}
@@ -692,7 +692,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz if (item == NULL) {
TCHAR *p = _tcsrchr(tszNewName, '.');
if (p[-1] != 'w' && p[-1] != 'W') {
- Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -700,7 +700,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz int iPos = int(p - tszNewName) - 1;
strdelt(p - 1, 1);
if ((item = hashes.find((ServListEntry*)&pName)) == NULL) {
- Netlib_LogfT(hNetlibUser, _T("File %s: Not found on server, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Not found on server, skipping", ffd.cFileName);
continue;
}
@@ -716,11 +716,11 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz CalculateModuleHash(tszBuf, szMyHash);
// hashes are the same, skipping
if (strcmp(szMyHash, item->m_szHash) == 0) {
- Netlib_LogfT(hNetlibUser, _T("File %s: Already up-to-date, skipping"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Already up-to-date, skipping", ffd.cFileName);
continue;
}
else
- Netlib_LogfT(hNetlibUser, _T("File %s: Update available"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Update available", ffd.cFileName);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
@@ -728,7 +728,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz }
}
else
- Netlib_LogfT(hNetlibUser, _T("File %s: Forcing redownload"), ffd.cFileName);
+ Netlib_LogfT(hNetlibUser, L"File %s: Forcing redownload", ffd.cFileName);
#endif
ptszUrl = item->m_name;
@@ -736,8 +736,8 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz }
else {
// file was marked for deletion, add it to the list anyway
- Netlib_LogfT(hNetlibUser, _T("File %s: Marked for deletion"), ffd.cFileName);
- ptszUrl = _T("");
+ Netlib_LogfT(hNetlibUser, L"File %s: Marked for deletion", ffd.cFileName);
+ ptszUrl = L"";
MyCRC = 0;
}
@@ -761,8 +761,8 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz p = (p) ? p + 1 : tszBuf;
_tcslwr(p);
- mir_sntprintf(FileInfo->File.tszDiskPath, _T("%s\\Temp\\%s.zip"), g_tszRoot, p);
- mir_sntprintf(FileInfo->File.tszDownloadURL, _T("%s/%s.zip"), tszBaseUrl, tszBuf);
+ mir_sntprintf(FileInfo->File.tszDiskPath, L"%s\\Temp\\%s.zip", g_tszRoot, p);
+ mir_sntprintf(FileInfo->File.tszDownloadURL, L"%s/%s.zip", tszBaseUrl, tszBuf);
for (p = _tcschr(FileInfo->File.tszDownloadURL, '\\'); p != 0; p = _tcschr(p, '\\'))
*p++ = '/';
@@ -786,7 +786,7 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, const TCHAR *tsz // Thread checks for updates
static void CheckUpdates(void *)
{
- Netlib_LogfT(hNetlibUser, _T("Checking for updates"));
+ Netlib_LogfT(hNetlibUser, L"Checking for updates");
Thread_SetName("PluginUpdater: CheckUpdates");
TCHAR tszTempPath[MAX_PATH];
@@ -802,7 +802,7 @@ static void CheckUpdates(void *) bool success = ParseHashes(updateUrl, baseUrl, hashes);
if (success) {
FILELIST *UpdateFiles = new FILELIST(20);
- VARST dirname(_T("%miranda_path%"));
+ VARST dirname(L"%miranda_path%");
int count = ScanFolder(dirname, lstrlen(dirname) + 1, baseUrl, hashes, UpdateFiles);
// Show dialog
@@ -849,7 +849,7 @@ void UninitCheck() // menu item command
static INT_PTR MenuCommand(WPARAM, LPARAM)
{
- Netlib_LogfT(hNetlibUser, _T("Update started manually!"));
+ Netlib_LogfT(hNetlibUser, L"Update started manually!");
DoCheck(false);
return 0;
}
@@ -875,7 +875,7 @@ void CheckUpdateOnStartup() if ((now - was) < 86400)
return;
}
- Netlib_LogfT(hNetlibUser, _T("Update on startup started!"));
+ Netlib_LogfT(hNetlibUser, L"Update on startup started!");
DoCheck();
}
}
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp index 41e730b449..1afbe741cc 100644 --- a/plugins/PluginUpdater/src/Events.cpp +++ b/plugins/PluginUpdater/src/Events.cpp @@ -23,7 +23,7 @@ HANDLE hPluginUpdaterFolder; int OnFoldersChanged(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hPluginUpdaterFolder, g_tszRoot, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hPluginUpdaterFolder, g_tszRoot, MAX_PATH, L"");
size_t len = _tcslen(g_tszRoot);
if (g_tszRoot[len-1] == '\\' || g_tszRoot[len-1] == '/')
g_tszRoot[len-1] = 0;
@@ -36,21 +36,21 @@ void EmptyFolder() NULL,
FO_DELETE,
g_tszRoot,
- _T(""),
+ L"",
FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION,
false,
0,
- _T("") };
+ L"" };
SHFileOperation(&file_op);
}
int ModulesLoaded(WPARAM, LPARAM)
{
- if (hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Plugin Updater"), MIRANDA_PATHT _T("\\")DEFAULT_UPDATES_FOLDER)) {
+ if (hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, LPGEN("Plugin Updater"), MIRANDA_PATHW L"\\" DEFAULT_UPDATES_FOLDER)) {
HookEvent(ME_FOLDERS_PATH_CHANGED, OnFoldersChanged);
OnFoldersChanged(0, 0);
}
- else lstrcpyn(g_tszRoot, VARST( _T("%miranda_path%\\" DEFAULT_UPDATES_FOLDER)), _countof(g_tszRoot));
+ else lstrcpyn(g_tszRoot, VARST(L"%miranda_path%\\" DEFAULT_UPDATES_FOLDER), _countof(g_tszRoot));
#if MIRANDA_VER >= 0x0A00
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp index d2cae3353b..f21dd3481f 100644 --- a/plugins/PluginUpdater/src/Notifications.cpp +++ b/plugins/PluginUpdater/src/Notifications.cpp @@ -71,7 +71,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hPopup, UINT uMsg, WPARAM wParam, LPAR static void _stdcall RestartPrompt(void *)
{
TCHAR tszText[200];
- mir_sntprintf(tszText, _T("%s\n\n%s"), TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
+ mir_sntprintf(tszText, L"%s\n\n%s", TranslateT("You need to restart your Miranda to apply installed updates."), TranslateT("Would you like to restart it now?"));
if (MessageBox(0, tszText, TranslateT("Plugin Updater"), MB_YESNO | MB_ICONQUESTION | MB_TOPMOST) == IDYES)
CallService(MS_SYSTEM_RESTART, db_get_b(NULL, MODNAME, "RestartCurrentProfile", 1) ? 1 : 0, 0);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 74554870cd..4a07853828 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -142,7 +142,7 @@ extern "C" __declspec(dllexport) int Load(void) db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
- else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD)_T("/"))) {
+ else if (!_tcscmp(dbvUpdateURL, _T(DEFAULT_UPDATE_URL_TRUNK_SYMBOLS_OLD)L"/")) {
db_set_b(0, MODNAME, DB_SETTING_UPDATE_MODE, UPDATE_MODE_TRUNK_SYMBOLS);
db_unset(0, MODNAME, DB_SETTING_UPDATE_URL);
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index ca31724626..2d3923b7cd 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -132,19 +132,19 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes) {
REPLACEVARSARRAY vars[2];
#if MIRANDA_VER >=0x0A00
- vars[0].key.t = _T("platform");
+ vars[0].key.t = L"platform";
#ifdef _WIN64
- vars[0].value.t = _T("64");
+ vars[0].value.t = L"64";
#else
- vars[0].value.t = _T("32");
+ vars[0].value.t = L"32";
#endif
vars[1].key.t = vars[1].value.t = 0;
#else
- vars[0].lptzKey = _T("platform");
+ vars[0].lptzKey = L"platform";
#ifdef _WIN64
- vars[0].lptzValue = _T("64");
+ vars[0].lptzValue = L"64";
#else
- vars[0].lptzValue = _T("32");
+ vars[0].lptzValue = L"32";
#endif
vars[1].lptzKey = vars[1].lptzValue = 0;
#endif
@@ -152,8 +152,8 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes) // Download version info
FILEURL pFileUrl;
- mir_sntprintf(pFileUrl.tszDownloadURL, _T("%s/hashes.zip"), baseUrl);
- mir_sntprintf(pFileUrl.tszDiskPath, _T("%s\\hashes.zip"), g_tszTempPath);
+ mir_sntprintf(pFileUrl.tszDownloadURL, L"%s/hashes.zip", baseUrl);
+ mir_sntprintf(pFileUrl.tszDiskPath, L"%s\\hashes.zip", g_tszTempPath);
pFileUrl.CRCsum = 0;
HANDLE nlc;
@@ -161,14 +161,14 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes) Netlib_CloseHandle(nlc);
if (!ret) {
- Netlib_LogfT(hNetlibUser,_T("Downloading list of available updates from %s failed"),baseUrl);
+ Netlib_LogfT(hNetlibUser,L"Downloading list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
SkinPlaySound("updatefailed");
return false;
}
if(!unzip(pFileUrl.tszDiskPath, g_tszTempPath, NULL,true)) {
- Netlib_LogfT(hNetlibUser,_T("Unzipping list of available updates from %s failed"),baseUrl);
+ Netlib_LogfT(hNetlibUser,L"Unzipping list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
SkinPlaySound("updatefailed");
return false;
@@ -177,10 +177,10 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes) DeleteFile(pFileUrl.tszDiskPath);
TCHAR tszTmpIni[MAX_PATH] = {0};
- mir_sntprintf(tszTmpIni, _T("%s\\hashes.txt"), g_tszTempPath);
- FILE *fp = _tfopen(tszTmpIni, _T("r"));
+ mir_sntprintf(tszTmpIni, L"%s\\hashes.txt", g_tszTempPath);
+ FILE *fp = _tfopen(tszTmpIni, L"r");
if (!fp) {
- Netlib_LogfT(hNetlibUser,_T("Opening %s failed"), g_tszTempPath);
+ Netlib_LogfT(hNetlibUser,L"Opening %s failed", g_tszTempPath);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
return false;
}
@@ -258,7 +258,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) bool ret = false;
for (int i = 0; !ret && i < MAX_RETRIES; i++) {
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s to %s (attempt %d)"),pFileURL->tszDownloadURL,pFileURL->tszDiskPath, i+1);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s to %s (attempt %d)",pFileURL->tszDownloadURL,pFileURL->tszDiskPath, i+1);
NETLIBHTTPREQUEST *pReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
if (pReply) {
nlc = pReply->nlc;
@@ -269,7 +269,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) int crc = Get_CRC((unsigned char*)pReply->pData, pReply->dataLength);
if (crc != pFileURL->CRCsum) {
// crc check failed, try again
- Netlib_LogfT(hNetlibUser,_T("crc check failed for file %s"),pFileURL->tszDiskPath);
+ Netlib_LogfT(hNetlibUser,L"crc check failed for file %s",pFileURL->tszDiskPath);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
continue;
}
@@ -285,7 +285,7 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) else {
// try to write it via PU stub
TCHAR tszTempFile[MAX_PATH];
- mir_sntprintf(tszTempFile, _T("%s\\pulocal.tmp"), g_tszTempPath);
+ mir_sntprintf(tszTempFile, L"%s\\pulocal.tmp", g_tszTempPath);
hFile = CreateFile(tszTempFile, GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_VALUE) {
DWORD dwBytes;
@@ -297,16 +297,16 @@ bool DownloadFile(FILEURL *pFileURL, HANDLE &nlc) ret = true;
}
else
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed with error %d"),pFileURL->tszDownloadURL,pReply->resultCode);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed with error %d",pFileURL->tszDownloadURL,pReply->resultCode);
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pReply);
}
else {
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed, host is propably temporary down."),pFileURL->tszDownloadURL);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed, host is propably temporary down.",pFileURL->tszDownloadURL);
nlc = NULL;
}
}
if(!ret)
- Netlib_LogfT(hNetlibUser,_T("Downloading file %s failed, giving up"),pFileURL->tszDownloadURL);
+ Netlib_LogfT(hNetlibUser,L"Downloading file %s failed, giving up",pFileURL->tszDownloadURL);
mir_free(szUrl);
mir_free(nlhr.headers);
@@ -487,7 +487,7 @@ bool PrepareEscalation() TCHAR *ext = _tcsrchr(szPath, '.');
if (ext != NULL)
*ext = '\0';
- _tcscat(szPath, _T(".test"));
+ _tcscat(szPath, L".test");
HANDLE hFile = CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_VALUE) {
// we are admins or UAC is disable, cool
@@ -502,7 +502,7 @@ bool PrepareEscalation() else {
// Elevate the process. Create a pipe for a stub first
TCHAR tszPipeName[MAX_PATH];
- mir_sntprintf(tszPipeName, _T("\\\\.\\pipe\\Miranda_Pu_%d"), GetCurrentProcessId());
+ mir_sntprintf(tszPipeName, L"\\\\.\\pipe\\Miranda_Pu_%d", GetCurrentProcessId());
hPipe = CreateNamedPipe(tszPipeName, PIPE_ACCESS_DUPLEX, PIPE_READMODE_BYTE | PIPE_WAIT, 1, 1024, 1024, NMPWAIT_USE_DEFAULT_WAIT, NULL);
if (hPipe == INVALID_HANDLE_VALUE) {
hPipe = NULL;
@@ -511,8 +511,8 @@ bool PrepareEscalation() TCHAR cmdLine[100], *p;
GetModuleFileName(NULL, szPath, ARRAYSIZE(szPath));
if ((p = _tcsrchr(szPath, '\\')) != 0)
- _tcscpy(p+1, _T("pu_stub.exe"));
- mir_sntprintf(cmdLine, _T("%d"), GetCurrentProcessId());
+ _tcscpy(p+1, L"pu_stub.exe");
+ mir_sntprintf(cmdLine, L"%d", GetCurrentProcessId());
// Launch a stub
SHELLEXECUTEINFO sei = { sizeof(sei) };
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h index 872a7d372b..501363d3e2 100644 --- a/plugins/PluginUpdater/src/stdafx.h +++ b/plugins/PluginUpdater/src/stdafx.h @@ -109,8 +109,8 @@ extern struct PlugOptions #define DEFAULT_UPDATE_URL_TRUNK_SYMBOLS "http://miranda-ng.org/distr/pdb_x%d"
-#define FILENAME_X64 _T("miranda64.exe")
-#define FILENAME_X32 _T("miranda32.exe")
+#define FILENAME_X64 L"miranda64.exe"
+#define FILENAME_X32 L"miranda32.exe"
#ifdef _WIN64
#define DEFAULT_BITS 64
@@ -124,7 +124,7 @@ extern struct PlugOptions #define NEW_FILENAME FILENAME_X64
#endif
-#define PLUGIN_INFO_URL _T("http://miranda-ng.org/p/%s")
+#define PLUGIN_INFO_URL L"http://miranda-ng.org/p/%s"
#define DEFAULT_UPDATE_URL_OLD "http://miranda-ng.org/distr/stable/x%platform%"
#define DEFAULT_UPDATE_URL_TRUNK_OLD "http://miranda-ng.org/distr/x%platform%"
diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp index c4696096aa..2a64019ada 100644 --- a/plugins/PluginUpdater/src/unzipfile.cpp +++ b/plugins/PluginUpdater/src/unzipfile.cpp @@ -32,7 +32,7 @@ extern "C" static void PrepareFileName(TCHAR *dest, size_t destSize, const TCHAR *ptszPath, const TCHAR *ptszFileName)
{
- mir_sntprintf(dest, destSize, _T("%s\\%s"), ptszPath, ptszFileName);
+ mir_sntprintf(dest, destSize, L"%s\\%s", ptszPath, ptszFileName);
for (TCHAR *p = dest; *p; ++p)
if (*p == '/')
@@ -83,7 +83,7 @@ bool extractCurrentFile(unzFile uf, TCHAR *ptszDestPath, TCHAR *ptszBackPath, bo else {
TCHAR tszTempPath[MAX_PATH];
GetTempPath( _countof(tszTempPath), tszTempPath);
- GetTempFileName(tszTempPath, _T("PUtemp"), GetCurrentProcessId(), tszBackFile);
+ GetTempFileName(tszTempPath, L"PUtemp", GetCurrentProcessId(), tszBackFile);
ptszFile2unzip = tszBackFile;
}
diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp index 4af7fe944a..4f278f3572 100644 --- a/plugins/Popup/src/avatars.cpp +++ b/plugins/Popup/src/avatars.cpp @@ -29,7 +29,7 @@ PopupAvatar *PopupAvatar::create(MCONTACT hContact) if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (av && (mir_tstrlen(av->szFilename) > 4))
- if (!mir_tstrcmpi(av->szFilename + mir_tstrlen(av->szFilename) - 4, _T(".gif")))
+ if (!mir_tstrcmpi(av->szFilename + mir_tstrlen(av->szFilename) - 4, L".gif"))
if (db_get_b(NULL, MODULNAME, "EnableGifAnimation", 1) && GDIPlus_IsAnimatedGIF(av->szFilename))
return new GifAvatar(hContact);
}
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index a4f87e9c28..547ab99a0f 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -680,7 +680,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn) {
allocate(1, 1);
int r, g, b, a = 255;
- const TCHAR *p = fn + mir_tstrlen(_T("pixel:"));
+ const TCHAR *p = fn + mir_tstrlen(L"pixel:");
r = (hex2dec(p[0]) << 4) + hex2dec(p[1]);
g = (hex2dec(p[2]) << 4) + hex2dec(p[3]);
b = (hex2dec(p[4]) << 4) + hex2dec(p[5]);
@@ -690,7 +690,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn) bool MyBitmap::loadFromFile_gradient(const TCHAR *fn)
{
- const TCHAR *p = fn + mir_tstrlen(_T("gradient:"));
+ const TCHAR *p = fn + mir_tstrlen(L"gradient:");
if (*p == 'h') allocate(256, 1);
else allocate(1, 256);
@@ -724,10 +724,10 @@ bool MyBitmap::loadFromFile(const TCHAR *fn) {
if (bits) freemem();
- if (!_tcsncmp(fn, _T("pixel:"), mir_tstrlen(_T("pixel:"))))
+ if (!_tcsncmp(fn, L"pixel:", mir_tstrlen(L"pixel:")))
return loadFromFile_pixel(fn);
- if (!_tcsncmp(fn, _T("gradient:"), mir_tstrlen(_T("gradient:"))))
+ if (!_tcsncmp(fn, L"gradient:", mir_tstrlen(L"gradient:")))
return loadFromFile_gradient(fn);
SIZE sz;
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index df079a3c9d..28eac5417f 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -42,7 +42,7 @@ inline void GetBmpSize(HBITMAP hbm, SIZE *sz) inline void DebugMsg(LPTSTR msg){
if (PopupOptions.debug){
- MessageBox(NULL, msg, _T("debug"), MB_OK);
+ MessageBox(NULL, msg, L"debug", MB_OK);
}
}
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index 9a256efe23..5c76722063 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -37,7 +37,7 @@ void InitFonts() fid.deffontsettings.size = -11;
mir_tstrncpy(fid.backgroundGroup, _T(PU_FNT_AND_COLOR), _countof(fid.backgroundGroup));
mir_tstrncpy(fid.backgroundName, PU_COL_BACK_NAME, _countof(fid.backgroundName));
- mir_tstrncpy(fid.deffontsettings.szFace, _T("Tahoma"), _countof(fid.deffontsettings.szFace));
+ mir_tstrncpy(fid.deffontsettings.szFace, L"Tahoma", _countof(fid.deffontsettings.szFace));
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TITLE), _countof(fid.name));
mir_snprintf(fid.prefix, PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h index 7be33d1d23..a73908dd77 100644 --- a/plugins/Popup/src/formula.h +++ b/plugins/Popup/src/formula.h @@ -79,7 +79,7 @@ private: int eval_atom(TCHAR *&s, Args *args, bool *vars) const;
public:
- Formula() :m_str(mir_tstrdup(_T(""))) {}
+ Formula() :m_str(mir_tstrdup(L"")) {}
Formula(TCHAR *s) :m_str(mir_tstrdup(s)) {}
~Formula() { mir_free(m_str); }
void set(TCHAR *s){ mir_free(m_str); m_str = mir_tstrdup(s); }
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index e341bc103b..daf8e90a73 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -128,7 +128,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara oldWidth = 0;
HWND hwndList = GetDlgItem(hwnd, IDC_POPUP_LIST);
for (int i = 0; i < arPopupHistory.getCount(); ++i)
- ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, _T("")), 0);
+ ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, L""), 0);
Window_SetIcon_IcoLib(hwnd, GetIconHandle(IDI_HISTORY));
@@ -392,7 +392,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara PostMessage(hwnd, UM_RESIZELIST, 0, 0);
return TRUE;
}
- ListBox_SetItemData(hwndLog, ListBox_AddString(hwndLog, _T("")), 0);
+ ListBox_SetItemData(hwndLog, ListBox_AddString(hwndLog, L""), 0);
}
return TRUE;
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 793b33f097..39e20dae06 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -259,7 +259,7 @@ static int ModulesLoaded(WPARAM, LPARAM) // hook TopToolBar
HookEvent(ME_TTB_MODULELOADED, TTBLoaded);
// Folder plugin support
- folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT _T("\\Skins\\Popup"));
+ folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT L"\\Skins\\Popup");
// load skin
skins.load();
const PopupSkin *skin;
@@ -331,7 +331,7 @@ MIRAPI int Load(void) LoadGDIPlus();
// Transparent and animation routines
- hDwmapiDll = LoadLibrary(_T("dwmapi.dll"));
+ hDwmapiDll = LoadLibrary(L"dwmapi.dll");
MyDwmEnableBlurBehindWindow = 0;
if (hDwmapiDll)
MyDwmEnableBlurBehindWindow = (HRESULT(WINAPI *)(HWND, DWM_BLURBEHIND *))GetProcAddress(hDwmapiDll, "DwmEnableBlurBehindWindow");
@@ -429,7 +429,7 @@ MIRAPI int Unload(void) SrmmMenu_Unload();
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupWnd2), hInst);
- UnregisterClass(_T("PopupEditBox"), hInst);
+ UnregisterClass(L"PopupEditBox", hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupMenuHostWnd), hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupThreadManagerWnd), hInst);
UnregisterClass(MAKEINTATOM(g_wndClass.cPopupPreviewBoxWndclass), hInst);
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 461aa3d278..48c3c75b59 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -161,7 +161,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETPOS, TRUE, PopupOptions.Alpha);
mir_subclassWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER), AlphaTrackBarWndProc);
- mir_sntprintf(tstr, _T("%d%%"), Byte2Percentile(PopupOptions.Alpha));
+ mir_sntprintf(tstr, L"%d%%", Byte2Percentile(PopupOptions.Alpha));
SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr);
CheckDlgButton(hwnd, IDC_TRANS_OPAQUEONHOVER, PopupOptions.OpaqueOnHover ? BST_CHECKED : BST_UNCHECKED);
{
@@ -341,7 +341,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int iEffect = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
PopupOptions.UseEffect = (iEffect != -2) ? TRUE : FALSE;
mir_free(PopupOptions.Effect);
- PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : _T(""));
+ PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : L"");
BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1), enable);
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 8c6a1943a9..abfb394d88 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -191,11 +191,11 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (p->typ == 1) { // Treeview part for typ 1 (notification)
iconIndex = ImageList_ReplaceIcon(hImgLst, -1, IcoLib_GetIconByHandle(p->hIcoLib));
- mir_sntprintf(itemName, _T("%s/%s"), p->pszTreeRoot, p->pszDescription);
+ mir_sntprintf(itemName, L"%s/%s", p->pszTreeRoot, p->pszDescription);
}
else { // Treeview part typ 2 (popup class api)
iconIndex = ImageList_ReplaceIcon(hImgLst, -1, p->pupClass.hIcon);
- mir_sntprintf(itemName, _T("%s/%s"), LPGENT("CLASS Plugins"), p->pszDescription);
+ mir_sntprintf(itemName, L"%s/%s", LPGENT("CLASS Plugins"), p->pszDescription);
}
OptTree_AddItem(hwndTree, itemName, (LPARAM)p, iconIndex);
}
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 200a2c6467..d10a95f507 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -52,7 +52,7 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) options[pos].iconIndex = 0;
mir_tstrcpy(options[pos].pszOptionName, prefix);
- mir_tstrcat(options[pos].pszOptionName, _T("/"));
+ mir_tstrcat(options[pos].pszOptionName, L"/");
switch (flag)
{
case PF2_IDLE: mir_tstrcat(options[pos].pszOptionName, LPGENT("Offline")); break;
@@ -181,7 +181,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup area"), BATF_TCHAR);
+ SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)L"Popup area", BATF_TCHAR);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_RESIZE));
}
// Spreading combobox
@@ -225,7 +225,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM continue;
TCHAR prefix[128];
- mir_sntprintf(prefix, LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(prefix, LPGENT("Protocol Status")L"/%s", protocols[i]->tszAccountName);
pos = AddStatusModes(statusOptions, pos, prefix, protoFlags);
}
}
@@ -243,7 +243,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM mir_snprintf(prefix, "Protocol Status/%s", protocols[i]->szModuleName);
TCHAR pszSettingName[256];
- mir_sntprintf(pszSettingName, LPGENT("Protocol Status")_T("/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(pszSettingName, LPGENT("Protocol Status")L"/%s", protocols[i]->tszAccountName);
OptTree_SetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, db_get_dw(NULL, MODULNAME, prefix, 0), pszSettingName);
}
}
@@ -529,11 +529,11 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM mir_snprintf(prefix, "Protocol Status/%s", protocols[i]->szModuleName);
TCHAR pszSettingName[256];
- mir_sntprintf(pszSettingName, _T("Protocol Status/%s"), protocols[i]->tszAccountName);
+ mir_sntprintf(pszSettingName, L"Protocol Status/%s", protocols[i]->tszAccountName);
db_set_dw(NULL, MODULNAME, prefix, OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, pszSettingName));
}
}
- db_set_dw(NULL, MODULNAME, "Global Status", OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, _T("Global Status")));
+ db_set_dw(NULL, MODULNAME, "Global Status", OptTree_GetOptions(hwnd, IDC_STATUSES, statusOptions, statusOptionsCount, L"Global Status"));
}
return TRUE;
}
@@ -626,11 +626,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, IDC_TITLE, WM_SETFONT, (WPARAM)hFontTitle, TRUE);
SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)_T("OK"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)L"OK", BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_OK));
SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)_T("Cancel"), BATF_TCHAR);
+ SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)L"Cancel", BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx(IDI_ACT_CLOSE));
SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 70284a3f37..867d70319b 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -54,9 +54,9 @@ void RegisterOptPrevBox() // register custom class for dialog box with drop-shadow attribute
// "#32770" stays for class name of default system dialog box
- GetClassInfoEx(hInst, _T("#32770"), &wcl);
+ GetClassInfoEx(hInst, L"#32770", &wcl);
wcl.hInstance = hInst;
- wcl.lpszClassName = _T("PopupPlusDlgBox");
+ wcl.lpszClassName = L"PopupPlusDlgBox";
wcl.style |= CS_DROPSHADOW;
g_wndClass.cPopupPlusDlgBox = RegisterClassEx(&wcl);
err = GetLastError();
@@ -184,11 +184,11 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos options[pos].dwFlag = (DWORD)(1 << (i - 1));
options[pos].groupId = OPTTREE_CHECK;
options[pos].iconIndex = 0;
- options[pos].pszSettingName = mir_tstrdup(_T("Skin options"));
+ options[pos].pszSettingName = mir_tstrdup(L"Skin options");
options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
mir_tstrlen(options[pos].pszSettingName) +
mir_strlen(skin->getFlagName(i)) + 10));
- wsprintf(options[pos].pszOptionName, _T("%s/%hs"), options[pos].pszSettingName, skin->getFlagName(i)); // !!!!!!!!!!!!!
+ wsprintf(options[pos].pszOptionName, L"%s/%hs", options[pos].pszSettingName, skin->getFlagName(i)); // !!!!!!!!!!!!!
options[pos].bState = skin->getFlag(i) ? TRUE : FALSE;
options[pos].Data = i; // skin flag index
*dwGlobalOptions |= skin->getFlag(i) ? (1 << (i - 1)) : 0;
@@ -203,7 +203,7 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos static LPTSTR mainOption[] = {
LPGENT("Show clock"),
LPGENT("Drop shadow effect"),
- LPGENT("Drop shadow effect") _T("/") LPGENT("non rectangular"),
+ LPGENT("Drop shadow effect") L"/" LPGENT("non rectangular"),
LPGENT("Enable Aero Glass (Vista+)"),
LPGENT("Use Windows colors"),
LPGENT("Use advanced text render") };
@@ -249,7 +249,7 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
mir_tstrlen(options[pos].pszSettingName) +
mir_tstrlen(mainOption[i]) + 10));
- wsprintf(options[pos].pszOptionName, _T("%s/%s"), options[pos].pszSettingName, mainOption[i]); // !!!!!!!!!!!!!
+ wsprintf(options[pos].pszOptionName, L"%s/%s", options[pos].pszSettingName, mainOption[i]); // !!!!!!!!!!!!!
options[pos].bState = bCheck;
pos++;
}
@@ -282,11 +282,11 @@ bool SkinOptionList_Update(OPTTREE_OPTION* &options, int *OptionsCount, HWND hwn char prefix[128];
mir_snprintf(prefix, "skin.%S", PopupOptions.SkinPack);
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
- db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
+ db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), L"Skin options");
// check "Global Settings"
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
- dwGlobalOptions, _T("Global settings"));
+ dwGlobalOptions, L"Global settings");
return true;
}
@@ -314,13 +314,13 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int index = -1;
OptTree_ProcessMessage(hwndDlg, msg, wParam, lParam, &index, IDC_SKIN_LIST_OPT, skinOptions, skinOptionsCount);
if (index != -1) {
- if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
+ if (mir_tstrcmp(skinOptions[index].pszSettingName, L"Skin options") == 0) {
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack)) {
skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false);
}
}
- else if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
+ else if (mir_tstrcmp(skinOptions[index].pszSettingName, L"Global settings") == 0) {
switch (skinOptions[index].dwFlag) {
case (1 << 0) :
PopupOptions.DisplayTime = skinOptions[index].bState;
diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index 0a0c468aaa..6b2a5e70bd 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -226,7 +226,7 @@ static unsigned __stdcall PopupThread(void *) wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("PopupThreadManagerWnd");
+ wcl.lpszClassName = L"PopupThreadManagerWnd";
wcl.hIconSm = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
g_wndClass.cPopupThreadManagerWnd = RegisterClassEx(&wcl);
err = GetLastError();
@@ -236,7 +236,7 @@ static unsigned __stdcall PopupThread(void *) MSGERROR(msg);
}
- gHwndManager = CreateWindow(_T("PopupThreadManagerWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
+ gHwndManager = CreateWindow(L"PopupThreadManagerWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowPos(gHwndManager, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
MSG msg;
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index d0db367d5a..1527c641de 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -67,10 +67,10 @@ bool LoadPopupWnd2() WNDCLASSEX wclw = { 0 };
wclw.cbSize = sizeof(wclw);
- if (!GetClassInfoEx(NULL, _T("EDIT"), &wclw))
+ if (!GetClassInfoEx(NULL, L"EDIT", &wclw))
MSGERROR(TranslateT("Failed to GetClassInfoExW from EDIT class."));
wclw.hInstance = hInst;
- wclw.lpszClassName = _T("PopupEditBox");
+ wclw.lpszClassName = L"PopupEditBox";
wclw.style |= CS_DROPSHADOW;
g_wndClass.cPopupEditBox = RegisterClassEx(&wclw);
err = GetLastError();
@@ -94,7 +94,7 @@ bool LoadPopupWnd2() wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("PopupMenuHostWnd");
+ wcl.lpszClassName = L"PopupMenuHostWnd";
wcl.hIconSm = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
g_wndClass.cPopupMenuHostWnd = RegisterClassEx(&wcl);
err = GetLastError();
@@ -105,7 +105,7 @@ bool LoadPopupWnd2() MSGERROR(msg);
}
- ghwndMenuHost = CreateWindow(_T("PopupMenuHostWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
+ ghwndMenuHost = CreateWindow(L"PopupMenuHostWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowPos(ghwndMenuHost, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
INITCOMMONCONTROLSEX iccex;
@@ -697,7 +697,7 @@ void PopupWnd2::updateData(POPUPDATAW_V2 *ppd) m_PluginWindowProc = ppd->PluginWindowProc;
if (m_options->DisplayTime)
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), m_time, _countof(m_time));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", m_time, _countof(m_time));
else m_time[0] = 0;
fixDefaults();
@@ -737,9 +737,9 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd) if (m_options->DisplayTime) {
if (ppd->dwTimestamp)
- TimeZone_ToStringT(ppd->dwTimestamp, _T("t"), m_time, _countof(m_time));
+ TimeZone_ToStringT(ppd->dwTimestamp, L"t", m_time, _countof(m_time));
else
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("HH':'mm"), m_time, _countof(m_time));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, L"HH':'mm", m_time, _countof(m_time));
}
else m_time[0] = 0;
@@ -919,7 +919,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara GetWindowRect(m_hwnd, &rc);
{
HWND hwndEditBox = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
- g_wndClass.cPopupEditBox ? _T("PopupEditBox") : _T("EDIT"),
+ g_wndClass.cPopupEditBox ? L"PopupEditBox" : L"EDIT",
NULL,
WS_BORDER | WS_POPUP | WS_VISIBLE | ES_AUTOVSCROLL | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL | ES_WANTRETURN,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInst, NULL);
@@ -977,9 +977,9 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case ACT_DEF_COPY:
if (m_lptzText || m_lptzTitle) {
- CMString tszText(FORMAT, _T("%s\n\n%s"),
- (m_lptzTitle) ? m_lptzTitle : _T(""),
- (m_lptzText) ? m_lptzText : _T(""));
+ CMString tszText(FORMAT, L"%s\n\n%s",
+ (m_lptzTitle) ? m_lptzTitle : L"",
+ (m_lptzText) ? m_lptzText : L"");
if (OpenClipboard(m_hwnd)) {
EmptyClipboard();
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index 4be78c8a12..ce5b1da030 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -381,12 +381,12 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
FontIDT fid = { 0 };
fid.cbSize = sizeof(FontIDT);
- mir_sntprintf(fid.group, _T(PU_FNT_AND_COLOR)_T("/%S"), ptd->pupClass.pszName);
+ mir_sntprintf(fid.group, _T(PU_FNT_AND_COLOR)L"/%S", ptd->pupClass.pszName);
mir_strncpy(fid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup) - 1);
fid.flags = FIDF_DEFAULTVALID;
fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
- mir_tstrncpy(fid.deffontsettings.szFace, _T("Verdana"), _countof(fid.deffontsettings.szFace) - 1);
+ mir_tstrncpy(fid.deffontsettings.szFace, L"Verdana", _countof(fid.deffontsettings.szFace) - 1);
mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TEXT), _countof(fid.name) - 1);
mir_strncpy(fid.prefix, setting, _countof(fid.prefix));
mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
@@ -399,7 +399,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
ColourIDT cid = { 0 };
cid.cbSize = sizeof(ColourIDT);
- mir_sntprintf(cid.group, _T(PU_FNT_AND_COLOR)_T("/%S"), ptd->pupClass.pszName);
+ mir_sntprintf(cid.group, _T(PU_FNT_AND_COLOR)L"/%S", ptd->pupClass.pszName);
mir_strncpy(cid.dbSettingsGroup, PU_MODULCLASS, _countof(fid.dbSettingsGroup));
mir_tstrncpy(cid.name, PU_COL_BACK_NAME, _countof(cid.name));
mir_snprintf(cid.setting, "%s/BgCol", ptd->pupClass.pszName);
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index f2d1e715de..96913d57cf 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -65,7 +65,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const TCHAR *str = TranslateTS(wname);
GetTextExtentPoint32(hdc, str, (int)mir_tstrlen(str), &szText);
mir_free(wname);
- GetTextExtentPoint32(hdc, _T(" "), 1, &szSpace);
+ GetTextExtentPoint32(hdc, L" ", 1, &szSpace);
sz.cy = max(sz.cy, szText.cy);
sz.cx += szSpace.cx;
@@ -122,7 +122,7 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h SetTextColor(bmp->getDC(), hover ? fonts.clActionHover : fonts.clAction);
SetBkMode(bmp->getDC(), TRANSPARENT);
- GetTextExtentPoint32(bmp->getDC(), _T(" "), 1, &szSpace);
+ GetTextExtentPoint32(bmp->getDC(), L" ", 1, &szSpace);
LPTSTR wname = mir_a2t(name);
TCHAR *str = TranslateTS(wname);
@@ -748,7 +748,7 @@ void PopupSkin::loadOptions(std::wistream &f) f.ignore(1024, '\n');
continue;
}
- if (!mir_tstrcmp(buf, _T("option"))) {
+ if (!mir_tstrcmp(buf, L"option")) {
int id, val;
f >> id >> val;
f.getline(buf, 1024);
@@ -767,7 +767,7 @@ void PopupSkin::loadOptions(std::wistream &f) else
m_flags &= ~(1 << id);
}
- else if (!mir_tstrcmp(buf, _T("end")))
+ else if (!mir_tstrcmp(buf, L"end"))
break;
}
delete[] buf;
@@ -783,8 +783,8 @@ bool PopupSkin::load(LPCTSTR dir) }
m_flags = 0;
- if (!_tcsncmp(_T("res:"), dir, 4)) // resource
- loadSkin(dir + 4, _T("Skin"));
+ if (!_tcsncmp(L"res:", dir, 4)) // resource
+ loadSkin(dir + 4, L"Skin");
else { // filesystem
// skin info
TCHAR dir_save[1024];
@@ -799,7 +799,7 @@ bool PopupSkin::load(LPCTSTR dir) }
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.popupskin"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.popupskin", &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
loadSkin(ffd.cFileName);
if (!FindNextFile(hFind, &ffd))
@@ -840,40 +840,40 @@ void PopupSkin::loadSkin(std::wistream &f) continue;
}
- if (!mir_tstrcmp(buf, _T("popup-version"))) {
+ if (!mir_tstrcmp(buf, L"popup-version")) {
f >> m_popup_version;
m_popup_version = PLUGIN_MAKE_VERSION((m_popup_version / 1000000) % 100, (m_popup_version / 10000) % 100, (m_popup_version / 100) % 100, (m_popup_version / 1) % 100);
if (!isCompatible())
break;
}
- else if (!mir_tstrcmp(buf, _T("padding-right"))) {
+ else if (!mir_tstrcmp(buf, L"padding-right")) {
f >> m_right_gap;
}
- else if (!mir_tstrcmp(buf, _T("padding-bottom"))) {
+ else if (!mir_tstrcmp(buf, L"padding-bottom")) {
f >> m_bottom_gap;
}
- else if (!mir_tstrcmp(buf, _T("shadow-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, L"shadow-region-opacity")) {
f >> m_shadow_region_opacity;
}
- else if (!mir_tstrcmp(buf, _T("legacy-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, L"legacy-region-opacity")) {
f >> m_legacy_region_opacity;
}
- else if (!mir_tstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, L"w")) {
f.getline(buf, 1024);
m_fw.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, L"h")) {
f.getline(buf, 1024);
m_fh.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("object"))) {
+ else if (!mir_tstrcmp(buf, L"object")) {
head->next = loadObject(f);
if (head->next && ((head->next->type & ST_TYPEMASK) == ST_CLOCK))
m_internalClock = false;
head = head->next;
head->next = NULL;
}
- else if (!mir_tstrcmp(buf, _T("options"))) {
+ else if (!mir_tstrcmp(buf, L"options")) {
loadOptions(f);
}
}
@@ -928,76 +928,76 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) continue;
}
- if (!mir_tstrcmp(buf, _T("type"))) {
+ if (!mir_tstrcmp(buf, L"type")) {
f >> buf;
- if (!mir_tstrcmp(buf, _T("icon")))
+ if (!mir_tstrcmp(buf, L"icon"))
element->type = (element->type & ~ST_TYPEMASK) | ST_ICON;
- else if (!mir_tstrcmp(buf, _T("bitmap")))
+ else if (!mir_tstrcmp(buf, L"bitmap"))
element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP;
- else if (!mir_tstrcmp(buf, _T("text"))) {
+ else if (!mir_tstrcmp(buf, L"text")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!mir_tstrcmp(buf, _T("title"))) {
+ else if (!mir_tstrcmp(buf, L"title")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!mir_tstrcmp(buf, _T("avatar"))) {
+ else if (!mir_tstrcmp(buf, L"avatar")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR;
}
- else if (!mir_tstrcmp(buf, _T("clock"))) {
+ else if (!mir_tstrcmp(buf, L"clock")) {
element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
}
- else if (!mir_tstrcmp(buf, _T("source"))) {
+ else if (!mir_tstrcmp(buf, L"source")) {
f >> buf;
if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK))
element->myBmp = new MyBitmap(buf);
}
- else if (!mir_tstrcmp(buf, _T("mono"))) {
+ else if (!mir_tstrcmp(buf, L"mono")) {
element->type |= ST_MONO;
}
- else if (!mir_tstrcmp(buf, _T("layer"))) {
+ else if (!mir_tstrcmp(buf, L"layer")) {
element->type |= ST_BLEND;
}
- else if (!mir_tstrcmp(buf, _T("proportional"))) {
+ else if (!mir_tstrcmp(buf, L"proportional")) {
f >> element->proportional;
}
- else if (!mir_tstrcmp(buf, _T("x"))) {
+ else if (!mir_tstrcmp(buf, L"x")) {
f.getline(buf, 1024);
element->fx.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!mir_tstrcmp(buf, _T("y"))) {
+ else if (!mir_tstrcmp(buf, L"y")) {
f.getline(buf, 1024);
element->fy.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!mir_tstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, L"w")) {
f.getline(buf, 1024);
element->fw.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, L"h")) {
f.getline(buf, 1024);
element->fh.set(buf);
}
- else if (!mir_tstrcmp(buf, _T("ifset"))) {
+ else if (!mir_tstrcmp(buf, L"ifset")) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags |= 1 << id;
}
- else if (!mir_tstrcmp(buf, _T("ifnotset"))) {
+ else if (!mir_tstrcmp(buf, L"ifnotset")) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags &= ~(1 << id);
}
- else if (!mir_tstrcmp(buf, _T("color"))) {
+ else if (!mir_tstrcmp(buf, L"color")) {
if (((element->type & ST_TYPEMASK) != ST_TEXT) &&
((element->type & ST_TYPEMASK) != ST_TITLE) &&
((element->type & ST_TYPEMASK) != ST_CLOCK)) continue;
@@ -1006,7 +1006,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> r >> g >> b;
element->textColor = RGB(r, g, b);
}
- else if (!mir_tstrcmp(buf, _T("clocksize"))) {
+ else if (!mir_tstrcmp(buf, L"clocksize")) {
element->clockstart[0] = 0;
f >> element->clocksize[0];
for (int i = 1; i < CLOCK_ITEMS; i++) {
@@ -1014,7 +1014,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> element->clocksize[i];
}
}
- else if (!mir_tstrcmp(buf, _T("end"))) {
+ else if (!mir_tstrcmp(buf, L"end")) {
break;
}
}
@@ -1086,9 +1086,9 @@ bool Skins::load() SKINLIST *skin = new SKINLIST;
skin->next = m_skins;
m_skins = skin;
- m_skins->name = mir_tstrdup(_T("* Popup Classic"));
+ m_skins->name = mir_tstrdup(L"* Popup Classic");
m_skins->dir = new TCHAR[1024];
- mir_tstrcpy(m_skins->dir, _T("res:classic.popupskin"));
+ mir_tstrcpy(m_skins->dir, L"res:classic.popupskin");
m_skins->skin = 0;
TCHAR dir[1024] = { '\0' };
@@ -1098,7 +1098,7 @@ bool Skins::load() return false;
}
else {
- mir_tstrncpy(dir, VARST(_T("%miranda_path%\\skins\\popup")), _countof(dir));
+ mir_tstrncpy(dir, VARST(L"%miranda_path%\\skins\\popup"), _countof(dir));
DWORD fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;
@@ -1109,9 +1109,9 @@ bool Skins::load() SetCurrentDirectory(dir);
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.*", &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName)) {
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(L".", ffd.cFileName) && mir_tstrcmp(L"..", ffd.cFileName)) {
SetCurrentDirectory(ffd.cFileName);
skin = new SKINLIST;
@@ -1122,7 +1122,7 @@ bool Skins::load() GetCurrentDirectory(1024, m_skins->dir);
m_skins->skin = 0;
- SetCurrentDirectory(_T(".."));
+ SetCurrentDirectory(L"..");
}
if (!FindNextFile(hFind, &ffd))
@@ -1139,7 +1139,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) {
SKINLIST *any = 0;
for (SKINLIST *p = m_skins; p; p = p->next) {
- if (!mir_tstrcmp(p->name, _T("* Popup Classic")) || !any)
+ if (!mir_tstrcmp(p->name, L"* Popup Classic") || !any)
any = p;
if (!mir_tstrcmpi(p->name, name)) {
any = p;
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp index c8c4b30b93..39346ae714 100644 --- a/plugins/ProfileManager/src/pmanagerEx.cpp +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -50,7 +50,7 @@ static INT_PTR ChangePM(WPARAM, LPARAM) {
TCHAR fn[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), fn, _countof(fn));
- ShellExecute(0, _T("open"), fn, _T("/ForceShowPM"), _T(""), 1);
+ ShellExecute(0, L"open", fn, L"/ForceShowPM", L"", 1);
CallService("CloseAction", 0, 0);
return 0;
}
@@ -59,7 +59,7 @@ static INT_PTR LoadPM(WPARAM, LPARAM) {
TCHAR fn[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), fn, _countof(fn));
- ShellExecute(0, _T("open"), fn, _T("/ForceShowPM"), _T(""), 1);
+ ShellExecute(0, L"open", fn, L"/ForceShowPM", L"", 1);
return 0;
}
@@ -71,7 +71,7 @@ static INT_PTR CheckDb(WPARAM, LPARAM) STARTUPINFO si = { 0 };
si.cb = sizeof(si);
GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
- mir_sntprintf(cmdLine, _T("\"%s\" /restart:%d /svc:dbchecker"), mirandaPath, GetCurrentProcessId());
+ mir_sntprintf(cmdLine, L"\"%s\" /restart:%d /svc:dbchecker", mirandaPath, GetCurrentProcessId());
CallService("CloseAction", 0, 0);
CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
}
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index fe0b5db968..5d2e988a71 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -249,7 +249,7 @@ TCHAR *GetListName(c_struct *cs) {
if (opts.group_append && cs->szgroup[0] != _T('\0'))
{
- mir_sntprintf(tmp_list_name, _T("%s (%s)"), cs->szname, cs->szgroup);
+ mir_sntprintf(tmp_list_name, L"%s (%s)", cs->szname, cs->szgroup);
return tmp_list_name;
}
else
@@ -527,7 +527,7 @@ MCONTACT GetSelectedContact(HWND hwndDlg) }
// Now try the name
- TCHAR cname[120] = _T("");
+ TCHAR cname[120] = L"";
GetDlgItemText(hwndDlg, IDC_USERNAME, cname, _countof(cname));
@@ -562,7 +562,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (wparam<32 && wparam != VK_BACK)
break;
- TCHAR sztext[120] = _T("");
+ TCHAR sztext[120] = L"";
DWORD start;
DWORD end;
@@ -597,7 +597,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) }
case WM_KEYUP:
{
- TCHAR sztext[120] = _T("");
+ TCHAR sztext[120] = L"";
if (wparam == VK_RETURN)
{
@@ -716,7 +716,7 @@ static void FillButton(HWND hwndDlg, int dlgItem, TCHAR *name, TCHAR *key, HICON if (key == NULL)
full = TranslateTS(name);
else
- mir_sntprintf(tmp, _T("%s (%s)"), TranslateTS(name), key);
+ mir_sntprintf(tmp, L"%s (%s)", TranslateTS(name), key);
SendDlgItemMessage(hwndDlg, dlgItem, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, dlgItem, BUTTONADDTOOLTIP, (LPARAM)full, BATF_TCHAR);
@@ -732,7 +732,7 @@ static void FillCheckbox(HWND hwndDlg, int dlgItem, TCHAR *name, TCHAR *key) if (key == NULL)
full = TranslateTS(name);
else
- mir_sntprintf(tmp, _T("%s (%s)"), TranslateTS(name), key);
+ mir_sntprintf(tmp, L"%s (%s)", TranslateTS(name), key);
SetDlgItemText(hwndDlg, dlgItem, full);
}
@@ -748,7 +748,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA GetWindowRect(GetDlgItem(hwndDlg, IDC_USERNAME), &rc);
ScreenToClient(hwndDlg, &rc);
- CreateWindow(_T("STATIC"), _T(""), WS_CHILD | WS_VISIBLE | SS_ICON | SS_CENTERIMAGE,
+ CreateWindow(L"STATIC", L"", WS_CHILD | WS_VISIBLE | SS_ICON | SS_CENTERIMAGE,
rc.left - 20, rc.top + (rc.bottom - rc.top - 16) / 2, 16, 16, hwndDlg, (HMENU) IDC_ICO,
hInst, NULL);
@@ -762,13 +762,13 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA mir_subclassWindow(GetWindow(GetDlgItem(hwndDlg, IDC_USERNAME),GW_CHILD), EditProc);
// Buttons
- FillCheckbox(hwndDlg, IDC_SHOW_ALL_CONTACTS, LPGENT("Show all contacts"), hasNewHotkeyModule ? NULL : _T("Ctrl+A"));
+ FillCheckbox(hwndDlg, IDC_SHOW_ALL_CONTACTS, LPGENT("Show all contacts"), hasNewHotkeyModule ? NULL : L"Ctrl+A");
FillButton(hwndDlg, IDC_MESSAGE, LPGENT("Send message"), NULL, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
- FillButton(hwndDlg, IDC_FILE, LPGENT("Send file"), hasNewHotkeyModule ? NULL : _T("Ctrl+F"), Skin_LoadIcon(SKINICON_EVENT_FILE));
- FillButton(hwndDlg, IDC_URL, LPGENT("Send URL"), hasNewHotkeyModule ? NULL : _T("Ctrl+U"), Skin_LoadIcon(SKINICON_EVENT_URL));
- FillButton(hwndDlg, IDC_USERINFO, LPGENT("Open user info"), hasNewHotkeyModule ? NULL : _T("Ctrl+I"), Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
- FillButton(hwndDlg, IDC_HISTORY, LPGENT("Open history"), hasNewHotkeyModule ? NULL : _T("Ctrl+H"), Skin_LoadIcon(SKINICON_OTHER_HISTORY));
- FillButton(hwndDlg, IDC_MENU, LPGENT("Open contact menu"), hasNewHotkeyModule ? NULL : _T("Ctrl+M"), Skin_LoadIcon(SKINICON_OTHER_DOWNARROW));
+ FillButton(hwndDlg, IDC_FILE, LPGENT("Send file"), hasNewHotkeyModule ? NULL : L"Ctrl+F", Skin_LoadIcon(SKINICON_EVENT_FILE));
+ FillButton(hwndDlg, IDC_URL, LPGENT("Send URL"), hasNewHotkeyModule ? NULL : L"Ctrl+U", Skin_LoadIcon(SKINICON_EVENT_URL));
+ FillButton(hwndDlg, IDC_USERINFO, LPGENT("Open user info"), hasNewHotkeyModule ? NULL : L"Ctrl+I", Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
+ FillButton(hwndDlg, IDC_HISTORY, LPGENT("Open history"), hasNewHotkeyModule ? NULL : L"Ctrl+H", Skin_LoadIcon(SKINICON_OTHER_HISTORY));
+ FillButton(hwndDlg, IDC_MENU, LPGENT("Open contact menu"), hasNewHotkeyModule ? NULL : L"Ctrl+M", Skin_LoadIcon(SKINICON_OTHER_DOWNARROW));
SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_SETEXTENDEDUI, TRUE, 0);
@@ -816,7 +816,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -838,7 +838,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -860,7 +860,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -882,7 +882,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -904,7 +904,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -926,7 +926,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
- SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
+ SetDlgItemText(hwndDlg, IDC_USERNAME, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_USERNAME));
break;
}
@@ -956,10 +956,10 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA {
// Get old text
HWND hEdit = GetWindow(GetWindow(hwndDlg,GW_CHILD),GW_CHILD);
- TCHAR sztext[120] = _T("");
+ TCHAR sztext[120] = L"";
if (SendMessage(hEdit, EM_GETSEL, 0, 0) != -1)
- SendMessage(hEdit, EM_REPLACESEL, 0, (LPARAM)_T(""));
+ SendMessage(hEdit, EM_REPLACESEL, 0, (LPARAM)L"");
GetWindowText(hEdit, sztext, _countof(sztext));
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp index 78574ebcd0..83eca17bda 100644 --- a/plugins/QuickMessages/src/main.cpp +++ b/plugins/QuickMessages/src/main.cpp @@ -110,7 +110,7 @@ static int InputMenuPopup(WPARAM, LPARAM lParam) SendMessage(mwpd->hwnd, EM_GETSELTEXT, 0, (LPARAM)pszText);
}
if (qd->ptszValue) {
- ptszQValue = ParseString(mwpd->hContact, qd->ptszValue, pszText ? pszText : _T(""), pszCBText ? pszCBText : _T(""), (int)mir_tstrlen(qd->ptszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(mwpd->hContact, qd->ptszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(qd->ptszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
if ((bIsService = qd->bIsService) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)mwpd->hContact, 0);
@@ -195,7 +195,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) switch (state) {
case 1:
if (ButtonsList[cbcd->dwButtonId]->ptszQValue)
- ptszQValue = ParseString(cbcd->hContact, ButtonsList[cbcd->dwButtonId]->ptszQValue, pszText ? pszText : _T(""), pszCBText ? pszCBText : _T(""), (int)mir_tstrlen(ButtonsList[cbcd->dwButtonId]->ptszQValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, ButtonsList[cbcd->dwButtonId]->ptszQValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(ButtonsList[cbcd->dwButtonId]->ptszQValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
if ((bIsService = ButtonsList[cbcd->dwButtonId]->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
break;
@@ -204,7 +204,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) {
ButtonData *bd = (ButtonData *)sl->items[0];
if (bd && bd->pszValue) {
- ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : _T(""), pszCBText ? pszCBText : _T(""), (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
if ((bIsService = bd->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
}
@@ -246,7 +246,7 @@ static int CustomButtonPressed(WPARAM, LPARAM lParam) ButtonData *bd = (ButtonData *)sl->items[res - 1];
bCTRL = (GetKeyState(VK_CONTROL) & 0x8000) ? 1 : 0;
if (bd->pszValue) {
- ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : _T(""), pszCBText ? pszCBText : _T(""), (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
+ ptszQValue = ParseString(cbcd->hContact, bd->pszValue, pszText ? pszText : L"", pszCBText ? pszCBText : L"", (int)mir_tstrlen(bd->pszValue), textlenght, pszCBText ? (int)mir_tstrlen(pszCBText) : 0);
if ((bIsService = bd->bIsServName) && ptszQValue)
CallService(mir_u2a(ptszQValue), (WPARAM)cbcd->hContact, 0);
}
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp index 63570bb4a3..412d57f2cb 100644 --- a/plugins/QuickMessages/src/options.cpp +++ b/plugins/QuickMessages/src/options.cpp @@ -750,14 +750,14 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) hwndEdit = NULL;
if (!mir_tstrlen(szLabel)) break;
if (bd = (ButtonData*)tvi.lParam) {
- if (!mir_tstrcmp(szLabel, _T("---"))) {
+ if (!mir_tstrcmp(szLabel, L"---")) {
if (TreeView_GetChild(hMenuTree, tvi.hItem))
break;
else {
bd->fEntryOpType = QMF_EX_SEPARATOR;
EnableWindow(GetDlgItem(hdlg, IDC_MENUVALUE), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME), FALSE);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
}
}
else {
@@ -839,7 +839,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME), FALSE);
if (!(bd->fEntryOpType&QMF_EX_SEPARATOR))
EnableWindow(GetDlgItem(hdlg, IDC_INQMENU), FALSE);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
}
CheckDlgButton(hdlg, IDC_INQMENU, bd->bOpInQMenu ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hdlg, IDC_ISSERVNAME, bd->bIsOpServName ? BST_CHECKED : BST_UNCHECKED);
@@ -899,7 +899,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_INQMENU), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME2), FALSE);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
break;
}
@@ -912,7 +912,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) BuildMenuTree(hMenuTree, (SortedList *)((ListData*)tvi.lParam)->sl);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
EnableWindow(GetDlgItem(hdlg, IDC_RCLICKVALUE), TRUE);
EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME2), TRUE);
CheckDlgButton(hdlg, IDC_ISSERVNAME2, ((ListData*)tvi.lParam)->bIsOpServName ? BST_CHECKED : BST_UNCHECKED);
@@ -920,7 +920,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) if (((ListData*)tvi.lParam)->ptszOPQValue)
SetDlgItemText(hdlg, IDC_RCLICKVALUE, ((ListData*)tvi.lParam)->ptszOPQValue);
else
- SetDlgItemText(hdlg, IDC_RCLICKVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_RCLICKVALUE, L"");
}
break;
}
@@ -992,8 +992,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_INQMENU), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME2), FALSE);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
- SetDlgItemText(hdlg, IDC_RCLICKVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
+ SetDlgItemText(hdlg, IDC_RCLICKVALUE, L"");
}
}break;
@@ -1016,7 +1016,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) bd->dwOPPos = TreeView_GetCount(hMenuTree) - 1;
bd->pszOpName = mir_tstrlen(namebuff) ? mir_tstrdup(namebuff) : mir_tstrdup(TranslateT("New Menu Entry"));
bd->pszOpValue = mir_tstrdup(bd->pszOpName);
- bd->fEntryOpType = !mir_tstrcmp(namebuff, _T("---")) ? QMF_EX_SEPARATOR : 0;
+ bd->fEntryOpType = !mir_tstrcmp(namebuff, L"---") ? QMF_EX_SEPARATOR : 0;
bd->dwOPFlags = QMF_NEW;
bd->pszName = NULL;
bd->pszValue = NULL;
@@ -1074,7 +1074,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam) EnableWindow(GetDlgItem(hdlg, IDC_MENUVALUE), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_ISSERVNAME), FALSE);
EnableWindow(GetDlgItem(hdlg, IDC_INQMENU), FALSE);
- SetDlgItemText(hdlg, IDC_MENUVALUE, _T(""));
+ SetDlgItemText(hdlg, IDC_MENUVALUE, L"");
}
}break;
}
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index 2935b52655..2a6cf0a8b2 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -112,11 +112,11 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) wchar_t *value = db_get_wsa(NULL, MODULE, key);
if (!value)
- replyList.insert(mir_wstrdup(_T("")));
+ replyList.insert(mir_wstrdup(L""));
else
replyList.insert(variables_parsedup(value, 0, wParam));
- if (!mir_tstrcmp(value, _T("---")))
+ if (!mir_tstrcmp(value, L"---"))
AppendMenu((HMENU)hMenu, MF_SEPARATOR, i + 1, NULL);
else
AppendMenu((HMENU)hMenu, MF_STRING, i + 1, replyList[i]);
@@ -129,7 +129,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) int index = TrackPopupMenu(hMenu, TPM_RETURNCMD, cbcd->pt.x, cbcd->pt.y, 0, cbcd->hwndFrom, NULL);
if (index > 0)
{
- if (mir_tstrcmp(replyList[index - 1], _T("")))
+ if (mir_tstrcmp(replyList[index - 1], L""))
{
HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE);
if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE);
diff --git a/plugins/QuickReplies/src/options.cpp b/plugins/QuickReplies/src/options.cpp index a12a86ea19..fb52965cb2 100644 --- a/plugins/QuickReplies/src/options.cpp +++ b/plugins/QuickReplies/src/options.cpp @@ -84,7 +84,7 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR if (value)
{
replies.Append(value);
- replies.Append(_T("\r\n"));
+ replies.Append(L"\r\n");
}
mir_free(value);
}
@@ -132,12 +132,12 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR tszReplies[length] = '\0';
{
CMString replies = tszReplies;
- if (replies.Right(2) != _T("\r\n"))
- replies.Append(_T("\r\n"));
+ if (replies.Right(2) != L"\r\n")
+ replies.Append(L"\r\n");
count = 0;
int pos = -1, prev = 0;
- while ((pos = replies.Find(_T("\r\n"), prev)) != -1)
+ while ((pos = replies.Find(L"\r\n", prev)) != -1)
{
mir_snprintf(key, "Reply_%x_%x", iNumber, count++);
db_set_ws(NULL, MODULE, key, replies.Mid(prev, pos - prev).GetBuffer());
diff --git a/plugins/Quotes/src/ComHelper.cpp b/plugins/Quotes/src/ComHelper.cpp index 57cf21b15a..6228ae9526 100644 --- a/plugins/Quotes/src/ComHelper.cpp +++ b/plugins/Quotes/src/ComHelper.cpp @@ -7,7 +7,7 @@ tstring ComException2Msg(_com_error& e, const tstring& rsAdditionalInfo) if (false == rsAdditionalInfo.empty())
o << rsAdditionalInfo << "\n";
- o << e.ErrorMessage() << _T(" (") << std::hex << hError << _T(")");
+ o << e.ErrorMessage() << L" (" << std::hex << hError << L")";
IErrorInfo* p = e.ErrorInfo();
CComPtr<IErrorInfo> pErrorInfo(p);
@@ -15,7 +15,7 @@ tstring ComException2Msg(_com_error& e, const tstring& rsAdditionalInfo) p->Release();
if (pErrorInfo)
- o << _T("\n") << e.Description();
+ o << L"\n" << e.Description();
return o.str();
}
diff --git a/plugins/Quotes/src/CreateFilePath.cpp b/plugins/Quotes/src/CreateFilePath.cpp index ef728791d3..4e2c47a96c 100644 --- a/plugins/Quotes/src/CreateFilePath.cpp +++ b/plugins/Quotes/src/CreateFilePath.cpp @@ -28,6 +28,6 @@ tstring CreateFilePath(const tstring& rsName) tstring s(rsName);
prepare_name(s);
tostringstream o;
- o << szPath << _T("\\Quotes\\") << s;
+ o << szPath << L"\\Quotes\\" << s;
return o.str();
}
\ No newline at end of file diff --git a/plugins/Quotes/src/CurrencyConverter.cpp b/plugins/Quotes/src/CurrencyConverter.cpp index 9836b1e365..45f5628890 100644 --- a/plugins/Quotes/src/CurrencyConverter.cpp +++ b/plugins/Quotes/src/CurrencyConverter.cpp @@ -122,7 +122,7 @@ INT_PTR CALLBACK CurrencyConverterDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM const IQuotesProvider::CProviderInfo& pi = pProvider->GetInfo();
tostringstream o;
- o << TranslateT("Info provided by") << _T(" <a href=\"") << pi.m_sURL << _T("\">") << pi.m_sName << _T("</a>");
+ o << TranslateT("Info provided by") << L" <a href=\"" << pi.m_sURL << L"\">" << pi.m_sName << L"</a>";
::SetDlgItemText(hDlg, IDC_SYSLINK_PROVIDER, o.str().c_str());
@@ -242,7 +242,7 @@ INT_PTR CALLBACK CurrencyConverterDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM case NM_CLICK:
if (IDC_SYSLINK_PROVIDER == wp) {
PNMLINK pNMLink = reinterpret_cast<PNMLINK>(pNMHDR);
- ::ShellExecute(hDlg, _T("open"), pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
+ ::ShellExecute(hDlg, L"open", pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
}
break;
}
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 29b5f0f8e6..9e7d15d711 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -1,19 +1,19 @@ #include "StdAfx.h"
-LPCTSTR g_pszXmlValue = _T("Value");
-LPCTSTR g_pszXmlName = _T("Name");
-LPCTSTR g_pszXmlSetting = _T("Setting");
-LPCTSTR g_pszXmlModule = _T("Module");
-LPCTSTR g_pszXmlContact = _T("Contact");
-LPCTSTR g_pszXmlContacts = _T("Contacts");
-LPCTSTR g_pszXmlType = _T("type");
-LPCTSTR g_pszXmlTypeByte = _T("byte");
-LPCTSTR g_pszXmlTypeWord = _T("word");
-LPCTSTR g_pszXmlTypeDword = _T("dword");
-LPCTSTR g_pszXmlTypeAsciiz = _T("asciiz");
-LPCTSTR g_pszXmlTypeWchar = _T("wchar");
-LPCTSTR g_pszXmlTypeUtf8 = _T("utf8");
-LPCTSTR g_pszXmlTypeBlob = _T("blob");
+LPCTSTR g_pszXmlValue = L"Value";
+LPCTSTR g_pszXmlName = L"Name";
+LPCTSTR g_pszXmlSetting = L"Setting";
+LPCTSTR g_pszXmlModule = L"Module";
+LPCTSTR g_pszXmlContact = L"Contact";
+LPCTSTR g_pszXmlContacts = L"Contacts";
+LPCTSTR g_pszXmlType = L"type";
+LPCTSTR g_pszXmlTypeByte = L"byte";
+LPCTSTR g_pszXmlTypeWord = L"word";
+LPCTSTR g_pszXmlTypeDword = L"dword";
+LPCTSTR g_pszXmlTypeAsciiz = L"asciiz";
+LPCTSTR g_pszXmlTypeWchar = L"wchar";
+LPCTSTR g_pszXmlTypeUtf8 = L"utf8";
+LPCTSTR g_pszXmlTypeBlob = L"blob";
struct CEnumContext
{
@@ -144,7 +144,7 @@ LPCTSTR prepare_filter(LPTSTR pszBuffer, size_t cBuffer) size_t nLen = mir_tstrlen(pszXml) + 1;
p += nLen;
if (nLen < cBuffer) {
- mir_tstrncpy(p, _T("*.xml"), (int)(cBuffer - nLen));
+ mir_tstrncpy(p, L"*.xml", (int)(cBuffer - nLen));
p += 6;
nLen += 6;
}
@@ -158,7 +158,7 @@ LPCTSTR prepare_filter(LPTSTR pszBuffer, size_t cBuffer) }
if (nLen < cBuffer) {
- mir_tstrncpy(p, _T("*.*"), (int)(cBuffer - nLen));
+ mir_tstrncpy(p, L"*.*", (int)(cBuffer - nLen));
p += 4;
nLen += 4;
}
@@ -181,7 +181,7 @@ bool show_open_file_dialog(bool bOpen, tstring& rsFile) ofn.hwndOwner = NULL;
ofn.lpstrFilter = prepare_filter(szFilter, MAX_PATH);
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_EXPLORER;
- ofn.lpstrDefExt = _T("xml");
+ ofn.lpstrDefExt = L"xml";
if (bOpen)
ofn.Flags |= OFN_FILEMUSTEXIST;
else
@@ -255,7 +255,7 @@ bool handle_module(MCONTACT hContact, const IXMLNode::TXMLNodePtr& pXmlModule) std::string s = quotes_t2a(sModuleName.c_str());
dbs.szModule = s.c_str();//T2CA(sModuleName.c_str());
- bool bCListModule = 0 == mir_tstrcmpi(sModuleName.c_str(), _T("CList"));
+ bool bCListModule = 0 == mir_tstrcmpi(sModuleName.c_str(), L"CList");
size_t cChild = pXmlModule->GetChildCount();
for (size_t i = 0; i < cChild; ++i) {
@@ -348,7 +348,7 @@ bool handle_module(MCONTACT hContact, const IXMLNode::TXMLNodePtr& pXmlModule) }
}
- if ((true == bCListModule) && (0 == mir_tstrcmpi(sName.c_str(), _T("Group"))))
+ if ((true == bCListModule) && (0 == mir_tstrcmpi(sName.c_str(), L"Group")))
Clist_GroupCreate(NULL, sValue.c_str());
}
}
diff --git a/plugins/Quotes/src/Locale.cpp b/plugins/Quotes/src/Locale.cpp index 4e72558cff..07c9f1a105 100644 --- a/plugins/Quotes/src/Locale.cpp +++ b/plugins/Quotes/src/Locale.cpp @@ -10,7 +10,7 @@ tstring get_int_registry_value(LPCTSTR pszValueName) tstring sResult;
HKEY hKey = NULL;
LONG lResult = ::RegOpenKeyEx(HKEY_CURRENT_USER,
- _T("Control Panel\\International"), 0, KEY_QUERY_VALUE, &hKey);
+ L"Control Panel\\International", 0, KEY_QUERY_VALUE, &hKey);
if ((ERROR_SUCCESS == lResult) && (NULL != hKey)) {
DWORD dwType = 0;
DWORD dwSize = 0;
@@ -33,27 +33,27 @@ tstring get_int_registry_value(LPCTSTR pszValueName) LPCTSTR date_win_2_boost(const tstring& sFrmt)
{
- if (sFrmt == _T("dd/MM/yy"))
- return _T("%d/%m/%y");
- if (sFrmt == _T("yyyy-MM-dd"))
- return _T("%y-%m-%d");
- return _T("%d.%m.%y");
+ if (sFrmt == L"dd/MM/yy")
+ return L"%d/%m/%y";
+ if (sFrmt == L"yyyy-MM-dd")
+ return L"%y-%m-%d";
+ return L"%d.%m.%y";
}
LPCTSTR time_win_2_boost(const tstring& sFrmt)
{
- if (sFrmt == _T("H:mm") || sFrmt == _T("HH:mm"))
- return _T("%H:%M");
+ if (sFrmt == L"H:mm" || sFrmt == L"HH:mm")
+ return L"%H:%M";
- return _T("%H:%M:%S");
+ return L"%H:%M:%S";
}
LPCTSTR Quotes_GetDateFormat(bool bShort)
{
- return date_win_2_boost(get_int_registry_value(bShort ? _T("sShortDate") : _T("sLongDate")));
+ return date_win_2_boost(get_int_registry_value(bShort ? L"sShortDate" : L"sLongDate"));
}
LPCTSTR Quotes_GetTimeFormat(bool bShort)
{
- return time_win_2_boost(get_int_registry_value(bShort ? _T("sShortTime") : _T("sTimeFormat")));
+ return time_win_2_boost(get_int_registry_value(bShort ? L"sShortTime" : L"sTimeFormat"));
}
diff --git a/plugins/Quotes/src/Log.cpp b/plugins/Quotes/src/Log.cpp index fea13ef91b..055fb22937 100644 --- a/plugins/Quotes/src/Log.cpp +++ b/plugins/Quotes/src/Log.cpp @@ -6,7 +6,7 @@ namespace tstring get_log_file_name()
{
- return CreateFilePath(_T("Quotes.log"));
+ return CreateFilePath(L"Quotes.log");
}
bool is_log_enabled()
@@ -26,7 +26,7 @@ namespace {
TCHAR szTime[20];
_tstrtime_s(szTime);
- file << szTime << _T(" ================================>\n") << rsMsg << _T("\n\n");
+ file << szTime << L" ================================>\n" << rsMsg << L"\n\n";
}
}
}
diff --git a/plugins/Quotes/src/QuoteChart.cpp b/plugins/Quotes/src/QuoteChart.cpp index 48938faef2..47dca6bfce 100644 --- a/plugins/Quotes/src/QuoteChart.cpp +++ b/plugins/Quotes/src/QuoteChart.cpp @@ -3,7 +3,7 @@ #ifdef CHART_IMPLEMENT
#define WINDOW_PREFIX "Quotes Chart_"
-#define CHART_CTRL_CLASS _T("DioksinChart")
+#define CHART_CTRL_CLASS L"DioksinChart"
struct CTimeConvert
{
@@ -15,7 +15,7 @@ struct CTimeConvert static tstring ToString(const boost::posix_time::ptime& v)
{
tostringstream k;
- k.imbue(std::locale(GetSystemLocale(), new ttime_facet(_T("%d/%m/%y %H:%M:%S"))));
+ k.imbue(std::locale(GetSystemLocale(), new ttime_facet(L"%d/%m/%y %H:%M:%S")));
k << v;
return k.str();
}
@@ -33,7 +33,7 @@ bool read_log_file(MCONTACT hContact, TChart& rChart) {
tstring sLogFileName = GetContactLogFileName(hContact);
if (false == sLogFileName.empty()) {
- std::locale loc(GetSystemLocale(), new ttime_input_facet(_T("%d.%m.%y %H:%M:%S")));
+ std::locale loc(GetSystemLocale(), new ttime_input_facet(L"%d.%m.%y %H:%M:%S"));
boost::posix_time::ptime oDateTime;
double dRate;
@@ -195,7 +195,7 @@ INT_PTR CALLBACK ChartDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp) MCONTACT hContact = reinterpret_cast<HANDLE>(lp);
tstring sName = get_window_text(hDlg);
- sName += _T(" - ");
+ sName += L" - ";
sName += GetContactName(hContact);
::SetWindowText(hDlg, sName.c_str());
@@ -290,7 +290,7 @@ INT_PTR CALLBACK ChartDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp) case NM_CLICK:
if (IDC_SYSLINK_PROVIDER == wp) {
PNMLINK pNMLink = reinterpret_cast<PNMLINK>(pNMHDR);
- ::ShellExecute(hDlg, _T("open"), pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
+ ::ShellExecute(hDlg, L"open", pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
}
break;
}
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index fdb60d15ab..da74285271 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -70,7 +70,7 @@ INT_PTR CALLBACK QuoteInfoDlgProcImpl(MCONTACT hContact, HWND hdlg, UINT msg, WP const IQuotesProvider::CProviderInfo& pi = pProvider->GetInfo();
tostringstream o;
- o << TranslateT("Info provided by") << _T(" <a href=\"") << pi.m_sURL << _T("\">") << pi.m_sName << _T("</a>");
+ o << TranslateT("Info provided by") << L" <a href=\"" << pi.m_sURL << L"\">" << pi.m_sName << L"</a>";
::SetDlgItemText(hdlg, IDC_SYSLINK_PROVIDER, o.str().c_str());
}
@@ -82,7 +82,7 @@ INT_PTR CALLBACK QuoteInfoDlgProcImpl(MCONTACT hContact, HWND hdlg, UINT msg, WP case NM_CLICK:
if (IDC_SYSLINK_PROVIDER == wParam) {
PNMLINK pNMLink = reinterpret_cast<PNMLINK>(pNMHDR);
- ::ShellExecute(hdlg, _T("open"), pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
+ ::ShellExecute(hdlg, L"open", pNMLink->item.szUrl, NULL, NULL, SW_SHOWNORMAL);
}
break;
}
@@ -144,7 +144,7 @@ INT_PTR QuotesMenu_OpenLogFile(WPARAM wp, LPARAM) tstring sLogFileName;
if ((true == get_log_file(hContact, sLogFileName)) && (false == sLogFileName.empty()))
- ::ShellExecute(NULL, _T("open"), sLogFileName.c_str(), NULL, NULL, SW_SHOWNORMAL);
+ ::ShellExecute(NULL, L"open", sLogFileName.c_str(), NULL, NULL, SW_SHOWNORMAL);
return 0;
}
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp index 204e4a7d4a..b98dd35d51 100644 --- a/plugins/Quotes/src/QuotesProviderBase.cpp +++ b/plugins/Quotes/src/QuotesProviderBase.cpp @@ -5,7 +5,7 @@ extern HANDLE g_hEventWorkThreadStop; struct CQuotesProviderBase::CXMLFileInfo
{
- CXMLFileInfo() : m_qs(_T("Unknown")) {}
+ CXMLFileInfo() : m_qs(L"Unknown") {}
IQuotesProvider::CProviderInfo m_pi;
CQuotesProviderBase::CQuoteSection m_qs;
tstring m_sURL;
@@ -26,15 +26,15 @@ bool parse_quote(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuote& for (size_t i = 0; i < cChild; ++i) {
IXMLNode::TXMLNodePtr pNode = pTop->GetChildNode(i);
tstring sName = pNode->GetName();
- if (0 == mir_tstrcmpi(_T("symbol"), sName.c_str())) {
+ if (0 == mir_tstrcmpi(L"symbol", sName.c_str())) {
sSymbol = pNode->GetText();
if (true == sSymbol.empty())
return false;
}
- else if (0 == mir_tstrcmpi(_T("description"), sName.c_str())) {
+ else if (0 == mir_tstrcmpi(L"description", sName.c_str())) {
sDescription = pNode->GetText();
}
- else if (0 == mir_tstrcmpi(_T("id"), sName.c_str())) {
+ else if (0 == mir_tstrcmpi(L"id", sName.c_str())) {
sID = pNode->GetText();
if (true == sID.empty())
return false;
@@ -55,17 +55,17 @@ bool parse_section(const IXMLNode::TXMLNodePtr& pTop, CQuotesProviderBase::CQuot for (size_t i = 0; i < cChild; ++i) {
IXMLNode::TXMLNodePtr pNode = pTop->GetChildNode(i);
tstring sName = pNode->GetName();
- if (0 == mir_tstrcmpi(_T("section"), sName.c_str())) {
+ if (0 == mir_tstrcmpi(L"section", sName.c_str())) {
CQuotesProviderBase::CQuoteSection qs1;
if (true == parse_section(pNode, qs1))
aSections.push_back(qs1);
}
- else if (0 == mir_tstrcmpi(_T("quote"), sName.c_str())) {
+ else if (0 == mir_tstrcmpi(L"quote", sName.c_str())) {
CQuotesProviderBase::CQuote q;
if (true == parse_quote(pNode, q))
aQuotes.push_back(q);
}
- else if (0 == mir_tstrcmpi(_T("name"), sName.c_str())) {
+ else if (0 == mir_tstrcmpi(L"name", sName.c_str())) {
sSectionName = pNode->GetText();
if (true == sSectionName.empty())
return false;
@@ -83,7 +83,7 @@ IXMLNode::TXMLNodePtr find_provider(const IXMLNode::TXMLNodePtr& pRoot) for (size_t i = 0; i < cChild; ++i) {
IXMLNode::TXMLNodePtr pNode = pRoot->GetChildNode(i);
tstring sName = pNode->GetName();
- if (0 == mir_tstrcmpi(_T("Provider"), sName.c_str())) {
+ if (0 == mir_tstrcmpi(L"Provider", sName.c_str())) {
pProvider = pNode;
break;
}
@@ -111,16 +111,16 @@ CQuotesProviderBase::CXMLFileInfo parse_ini_file(const tstring& rsXMLFile, bool& for (size_t i = 0; i < cChild; ++i) {
IXMLNode::TXMLNodePtr pNode = pProvider->GetChildNode(i);
tstring sName = pNode->GetName();
- if (0 == mir_tstrcmpi(_T("section"), sName.c_str())) {
+ if (0 == mir_tstrcmpi(L"section", sName.c_str())) {
CQuotesProviderBase::CQuoteSection qs;
if (true == parse_section(pNode, qs))
aSections.push_back(qs);
}
- else if (0 == mir_tstrcmpi(_T("Name"), sName.c_str()))
+ else if (0 == mir_tstrcmpi(L"Name", sName.c_str()))
res.m_pi.m_sName = pNode->GetText();
- else if (0 == mir_tstrcmpi(_T("ref"), sName.c_str()))
+ else if (0 == mir_tstrcmpi(L"ref", sName.c_str()))
res.m_pi.m_sURL = pNode->GetText();
- else if (0 == mir_tstrcmpi(_T("url"), sName.c_str()))
+ else if (0 == mir_tstrcmpi(L"url", sName.c_str()))
res.m_sURL = pNode->GetText();
}
}
@@ -384,10 +384,10 @@ tstring format_rate(const IQuotesProvider *pProvider, MCONTACT hContact, const t if (i != rsFrmt.end()) {
TCHAR t = *i;
switch (t) {
- case _T('%'): sResult += _T("%"); break;
- case _T('t'): sResult += _T("\t"); break;
- case _T('n'): sResult += _T("\n"); break;
- case _T('\\'): sResult += _T("\\"); break;
+ case _T('%'): sResult += L"%"; break;
+ case _T('t'): sResult += L"\t"; break;
+ case _T('n'): sResult += L"\n"; break;
+ case _T('\\'): sResult += L"\\"; break;
default: sResult += chr; sResult += t; break;
}
++i;
diff --git a/plugins/Quotes/src/QuotesProviderBase.h b/plugins/Quotes/src/QuotesProviderBase.h index b7f226fab3..7370318b3d 100644 --- a/plugins/Quotes/src/QuotesProviderBase.h +++ b/plugins/Quotes/src/QuotesProviderBase.h @@ -7,7 +7,7 @@ public: class CQuote
{
public:
- CQuote(const tstring& rsID = _T(""), const tstring& rsSymbol = _T(""), const tstring& rsName = _T(""))
+ CQuote(const tstring& rsID = L"", const tstring& rsSymbol = L"", const tstring& rsName = L"")
: m_sSymbol(rsSymbol), m_sName(rsName), m_sID(rsID){}
const tstring& GetSymbol()const{ return m_sSymbol; }
@@ -27,7 +27,7 @@ public: typedef std::vector<CQuote> TQuotes;
public:
- CQuoteSection(const tstring& rsName = _T(""), const TSections& raSections = TSections(), const TQuotes& raQuotes = TQuotes())
+ CQuoteSection(const tstring& rsName = L"", const TSections& raSections = TSections(), const TQuotes& raQuotes = TQuotes())
: m_sName(rsName), m_aSections(raSections), m_aQuotes(raQuotes){}
const tstring& GetName()const
@@ -89,7 +89,7 @@ protected: MCONTACT CreateNewContact(const tstring& rsName);
static bool IsOnline();
static void SetContactStatus(MCONTACT hContact, int nNewStatus);
- void WriteContactRate(MCONTACT hContact, double dRate, const tstring& rsSymbol = _T(""));
+ void WriteContactRate(MCONTACT hContact, double dRate, const tstring& rsSymbol = L"");
private:
virtual void RefreshQuotes(TContracts& anContacts) = 0;
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp index 3fafe3423d..e010f98577 100644 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp +++ b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp @@ -67,7 +67,7 @@ tstring CQuotesProviderDukasCopy::BuildHTTPURL()const MCONTACT hContact = *i;
tstring sID = get_quote_id(hContact);
if (false == sID.empty())
- sURL << sID << _T(",");
+ sURL << sID << L",";
}
}
@@ -103,18 +103,18 @@ bool string2double(const TCHAR* pszText, double& rValue) void parse_row(const THTMLNodePtr& pRow, TEconomicRates& raRates)
{
CEconomicRateInfo ri;
- ri.m_sID = pRow->GetAttribute(_T("sid"));
+ ri.m_sID = pRow->GetAttribute(L"sid");
if (false == ri.m_sID.empty()) {
unsigned short cColsHandled = 0;
tostringstream sSidID;
- sSidID << _T("id") << ri.m_sID;
+ sSidID << L"id" << ri.m_sID;
size_t cNodes = pRow->GetChildCount();
for (size_t i = 0; i < cNodes && cColsHandled < 2; ++i) {
THTMLNodePtr pCol = pRow->GetChildPtr(i);
if (pCol) {
- tstring sColID = pCol->GetAttribute(_T("id"));
+ tstring sColID = pCol->GetAttribute(L"id");
if (false == sColID.empty()) {
- if (0 == mir_tstrcmpi(sColID.c_str(), _T("stock"))) {
+ if (0 == mir_tstrcmpi(sColID.c_str(), L"stock")) {
ri.m_sName = pCol->GetText();
if (false == ri.m_sName.empty()) {
++cColsHandled;
@@ -125,7 +125,7 @@ void parse_row(const THTMLNodePtr& pRow, TEconomicRates& raRates) if ((false == sRate.empty()) && (true == string2double(sRate.c_str(), ri.m_dCurRate))) {
ri.m_dPrevRate = ri.m_dCurRate;
++cColsHandled;
- tstring sOldRate = pCol->GetAttribute(_T("oldPrice"));
+ tstring sOldRate = pCol->GetAttribute(L"oldPrice");
if (false == sOldRate.empty()) {
string2double(sOldRate.c_str(), ri.m_dPrevRate);
}
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp index 4dd036fe3e..b200715fa5 100644 --- a/plugins/Quotes/src/QuotesProviderFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderFinance.cpp @@ -159,7 +159,7 @@ namespace if (LB_ERR == is_quote_added(hwndList, sQuoteSymbol)) {
CQuotesProviderBase::CQuote quote(sQuoteSymbol, sQuoteSymbol);
if (add_quote_to_wnd(quote, hwndList) >= 0) {
- SetDlgItemText(hDlg, IDC_EDIT_QUOTE, _T(""));
+ SetDlgItemText(hDlg, IDC_EDIT_QUOTE, L"");
SetFocus(hEdit);
PropSheet_Changed(::GetParent(hDlg), hDlg);
}
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp index a91f71fc27..096def469d 100644 --- a/plugins/Quotes/src/QuotesProviderGoogle.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp @@ -11,7 +11,7 @@ CQuotesProviderGoogle::~CQuotesProviderGoogle() inline tstring make_contact_name(const tstring& rsSymbolFrom, const tstring& rsSymbolTo)
{
tostringstream o;
- o << rsSymbolFrom << _T("/") << rsSymbolTo;
+ o << rsSymbolFrom << L"/" << rsSymbolTo;
return o.str();
}
@@ -86,7 +86,7 @@ bool CQuotesProviderGoogle::GetWatchedRateInfo(size_t nIndex, CRateInfo& rRateIn static tstring build_url(const tstring& rsURL, const tstring& from, const tstring& to, double dAmount)
{
tostringstream o;
- o << rsURL << _T("?a=") << std::fixed << dAmount << _T("&from=") << from << _T("&to=") << to;
+ o << rsURL << L"?a=" << std::fixed << dAmount << L"&from=" << from << L"&to=" << to;
return o.str();
}
@@ -101,8 +101,8 @@ typedef IHTMLNode::THTMLNodePtr THTMLNodePtr; bool parse_html_node(const THTMLNodePtr& pNode, double& rdRate)
{
- tstring sID = pNode->GetAttribute(_T("id"));
- if ((false == sID.empty()) && (0 == mir_tstrcmpi(sID.c_str(), _T("currency_converter_result")))) {
+ tstring sID = pNode->GetAttribute(L"id");
+ if ((false == sID.empty()) && (0 == mir_tstrcmpi(sID.c_str(), L"currency_converter_result"))) {
size_t cChild = pNode->GetChildCount();
// assert(1 == cChild);
if (cChild > 0) {
diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp index 25efbdfc55..8219497148 100644 --- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp @@ -11,7 +11,7 @@ CQuotesProviderGoogleFinance::~CQuotesProviderGoogleFinance() static tstring build_url(MCONTACT hContact, const tstring& rsURL)
{
tostringstream o;
- o << rsURL << _T("?q=") << Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
+ o << rsURL << L"?q=" << Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
return o.str();
}
@@ -41,18 +41,18 @@ struct CGoogleInfo tstring make_rate_id_value(const tstring& rsCmpID, int nFlags)
{
tostringstream o;
- o << _T("ref_") << rsCmpID;
+ o << L"ref_" << rsCmpID;
switch (nFlags) {
default:
assert(!"Unknown type of value");
case CGoogleInfo::giRate:
- o << _T("_l");
+ o << L"_l";
break;
case CGoogleInfo::giPercentChangeAfterHours:
- o << _T("_ecp");
+ o << L"_ecp";
break;
case CGoogleInfo::giPercentChangeToYesterdayClose:
- o << _T("_cp");
+ o << L"_cp";
break;
}
@@ -79,7 +79,7 @@ tstring get_var_value(const tstring& rsHTML, LPCTSTR pszVarName, size_t cVarName tstring get_company_id(const tstring& rsHTML)
{
- static LPCTSTR pszVarName = _T("setCompanyId(");
+ static LPCTSTR pszVarName = L"setCompanyId(";
static size_t cVarNameLength = mir_tstrlen(pszVarName);
tstring sResult;
@@ -99,7 +99,7 @@ tstring get_company_id(const tstring& rsHTML) tstring get_company_name(const tstring& rsHTML)
{
- static LPCTSTR pszVarName = _T("var _companyName = ");
+ static LPCTSTR pszVarName = L"var _companyName = ";
static size_t cVarNameLength = mir_tstrlen(pszVarName);
tstring s = get_var_value(rsHTML, pszVarName, cVarNameLength);
@@ -151,7 +151,7 @@ bool get_inline_data(const IHTMLNode::THTMLNodePtr& pNode, CGoogleInfo& rInfo) IHTMLNode::THTMLNodePtr pName = pChild->GetChildPtr(0);
tstring sName = pName->GetText();
- if (0 == mir_tstrcmpi(sName.c_str(), _T("Open"))) {
+ if (0 == mir_tstrcmpi(sName.c_str(), L"Open")) {
IHTMLNode::THTMLNodePtr pValue = pChild->GetChildPtr(1);
tstring sValue = pValue->GetText();
if (true == get_double_value(sValue, rInfo.m_dOpenValue)) {
@@ -210,7 +210,7 @@ bool parse_responce(const tstring& rsHTML, CGoogleInfo& rInfo) if (pRate && get_rate(pRate, rInfo)) {
rInfo.m_sCmpName = get_company_name(rsHTML);
- IHTMLNode::THTMLNodePtr pInline = pRoot->GetElementByID(_T("snap-data"));
+ IHTMLNode::THTMLNodePtr pInline = pRoot->GetElementByID(L"snap-data");
if (pInline) {
get_inline_data(pInline, rInfo);
}
diff --git a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp index b8c2a7c68a..c1cd208545 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp @@ -26,7 +26,7 @@ CQuotesProviderVisitorDbSettings::CQuotesProviderVisitorDbSettings() m_pszDbPopupDelayTimeout(NULL),
m_pszDbPopupHistoryFlag(NULL),
m_pszDbTendencyFormat(nullptr),
- m_pszDefTendencyFormat(_T("%r>%p"))
+ m_pszDefTendencyFormat(L"%r>%p")
{
}
@@ -36,9 +36,9 @@ CQuotesProviderVisitorDbSettings::~CQuotesProviderVisitorDbSettings() void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderBase&/* rProvider*/)
{
- m_pszDefLogFileFormat = _T("%s\\t%t\\t%r\\n");
- m_pszDefHistoryFormat = _T("%s %r");
- m_pszDefPopupFormat = _T("\\nCurrent = %r\\nPrevious = %p");
+ m_pszDefLogFileFormat = L"%s\\t%t\\t%r\\n";
+ m_pszDefHistoryFormat = L"%s %r";
+ m_pszDefPopupFormat = L"\\nCurrent = %r\\nPrevious = %p";
}
void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderDukasCopy&/* rProvider*/)
@@ -46,8 +46,8 @@ void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderDukasCopy&/* r m_pszDbRefreshRateType = DB_STR_REFRESH_RATE_TYPE;
m_pszDbRefreshRateValue = DB_STR_REFRESH_RATE_VALUE;
m_pszDbDisplayNameFormat = DB_STR_DC_DISPLAY_NAME_FORMAT;
- m_pszDefDisplayFormat = _T("%s %r");
- m_pszXMLIniFileName = _T("Dukascopy.xml");
+ m_pszDefDisplayFormat = L"%s %r";
+ m_pszXMLIniFileName = L"Dukascopy.xml";
m_pszDbStatusMsgFormat = "DC_StatusMessageFormat";
m_pszDbLogMode = "DC_LogMode";
@@ -73,8 +73,8 @@ void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderGoogle&/* rPro m_pszDbRefreshRateType = DB_STR_GOOGLE_REFRESH_RATE_TYPE;
m_pszDbRefreshRateValue = DB_STR_GOOGLE_REFRESH_RATE_VALUE;
m_pszDbDisplayNameFormat = DB_STR_GOOGLE_DISPLAY_NAME_FORMAT;
- m_pszDefDisplayFormat = _T("1 %f = %r %i");
- m_pszXMLIniFileName = _T("Google.xml");
+ m_pszDefDisplayFormat = L"1 %f = %r %i";
+ m_pszXMLIniFileName = L"Google.xml";
m_pszDbStatusMsgFormat = "Google_StatusMessageFormat";
m_pszDbLogMode = "Google_LogMode";
@@ -101,8 +101,8 @@ void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderGoogleFinance& m_pszDbRefreshRateType = "GoogleFinance_RefreshRateType";
m_pszDbRefreshRateValue = "GoogleFinance_RefreshRateValue";
m_pszDbDisplayNameFormat = "GoogleFinance_DspNameFrmt";
- m_pszDefDisplayFormat = _T("%s %r");
- m_pszXMLIniFileName = _T("GoogleFinance.xml");
+ m_pszDefDisplayFormat = L"%s %r";
+ m_pszXMLIniFileName = L"GoogleFinance.xml";
m_pszDbStatusMsgFormat = "GoogleFinance_StatusMessageFormat";
m_pszDbLogMode = "GoogleFinance_LogMode";
@@ -129,8 +129,8 @@ void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderYahoo&) m_pszDbRefreshRateType = "Yahoo_RefreshRateType";
m_pszDbRefreshRateValue = "Yahoo_RefreshRateValue";
m_pszDbDisplayNameFormat = "Yahoo_DspNameFrmt";
- m_pszDefDisplayFormat = _T("%s %r");
- m_pszXMLIniFileName = _T("Yahoo.xml");
+ m_pszDefDisplayFormat = L"%s %r";
+ m_pszXMLIniFileName = L"Yahoo.xml";
m_pszDbStatusMsgFormat = "Yahoo_StatusMessageFormat";
m_pszDbLogMode = "Yahoo_LogMode";
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.cpp index 26cfef3cfa..5dc1bd1848 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.cpp @@ -10,39 +10,39 @@ CQuotesProviderVisitorFormatSpecificator::~CQuotesProviderVisitorFormatSpecifica void CQuotesProviderVisitorFormatSpecificator::Visit(const CQuotesProviderDukasCopy&/* rProvider*/)
{
- m_aSpecificators.push_back(CFormatSpecificator(_T("%s"), TranslateT("Quote Symbol")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%d"), TranslateT("Quote Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%s", TranslateT("Quote Symbol")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%d", TranslateT("Quote Name")));
}
void CQuotesProviderVisitorFormatSpecificator::Visit(const CQuotesProviderGoogle&/* rProvider*/)
{
- m_aSpecificators.push_back(CFormatSpecificator(_T("%F"), TranslateT("From Currency Full Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%f"), TranslateT("From Currency Short Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%I"), TranslateT("Into Currency Full Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%i"), TranslateT("Into Currency Short Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%s"), TranslateT("Short notation for \"%f/%i\"")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%F", TranslateT("From Currency Full Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%f", TranslateT("From Currency Short Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%I", TranslateT("Into Currency Full Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%i", TranslateT("Into Currency Short Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%s", TranslateT("Short notation for \"%f/%i\"")));
}
void CQuotesProviderVisitorFormatSpecificator::Visit(const CQuotesProviderBase&/* rProvider*/)
{
- m_aSpecificators.push_back(CFormatSpecificator(_T("%S"), TranslateT("Source of Information")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%r"), TranslateT("Rate Value")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%p"), TranslateT("Previous Rate Value")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%X"), TranslateT("Fetch Time")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%x"), TranslateT("Fetch Date")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%t"), TranslateT("Fetch Time and Date")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("\\%"), TranslateT("Percentage Character (%)")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("\\t"), TranslateT("Tabulation")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("\\\\"), TranslateT("Left slash (\\)")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%S", TranslateT("Source of Information")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%r", TranslateT("Rate Value")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%p", TranslateT("Previous Rate Value")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%X", TranslateT("Fetch Time")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%x", TranslateT("Fetch Date")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%t", TranslateT("Fetch Time and Date")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"\\%", TranslateT("Percentage Character (%)")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"\\t", TranslateT("Tabulation")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"\\\\", TranslateT("Left slash (\\)")));
}
void CQuotesProviderVisitorFormatSpecificator::Visit(const CQuotesProviderGoogleFinance&/* rProvider*/)
{
- m_aSpecificators.push_back(CFormatSpecificator(_T("%s"), TranslateT("Quote Symbol")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%n"), TranslateT("Quote Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%o"), TranslateT("Open Price")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%d"), TranslateT("Percent Change to After Hours")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%y"), TranslateT("Percent Change to Yesterday Close")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%s", TranslateT("Quote Symbol")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%n", TranslateT("Quote Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%o", TranslateT("Open Price")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%d", TranslateT("Percent Change to After Hours")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%y", TranslateT("Percent Change to Yesterday Close")));
}
const CQuotesProviderVisitorFormatSpecificator::TFormatSpecificators& CQuotesProviderVisitorFormatSpecificator::GetSpecificators()const
@@ -52,11 +52,11 @@ const CQuotesProviderVisitorFormatSpecificator::TFormatSpecificators& CQuotesPro void CQuotesProviderVisitorFormatSpecificator::Visit(const CQuotesProviderYahoo&)
{
- m_aSpecificators.push_back(CFormatSpecificator(_T("%s"), TranslateT("Quote Symbol")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%n"), TranslateT("Quote Name")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%o"), TranslateT("Open Price")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%h"), TranslateT("Day's High")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%g"), TranslateT("Day's Low")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%P"), TranslateT("Previous Close")));
- m_aSpecificators.push_back(CFormatSpecificator(_T("%c"), TranslateT("Change")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%s", TranslateT("Quote Symbol")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%n", TranslateT("Quote Name")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%o", TranslateT("Open Price")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%h", TranslateT("Day's High")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%g", TranslateT("Day's Low")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%P", TranslateT("Previous Close")));
+ m_aSpecificators.push_back(CFormatSpecificator(L"%c", TranslateT("Change")));
}
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.h b/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.h index 0d5fc265fd..25bb88b15e 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.h +++ b/plugins/Quotes/src/QuotesProviderVisitorFormatSpecificator.h @@ -6,7 +6,7 @@ class CQuotesProviderVisitorFormatSpecificator : public CQuotesProviderVisitor public:
struct CFormatSpecificator
{
- CFormatSpecificator(const tstring& rsSymbol = _T(""), const tstring& rsDec = _T(""))
+ CFormatSpecificator(const tstring& rsSymbol = L"", const tstring& rsDec = L"")
: m_sSymbol(rsSymbol), m_sDesc(rsDec){}
tstring m_sSymbol;
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp index b6bb075b88..04d3fe7662 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp @@ -87,7 +87,7 @@ void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderBase& rProvider) case _T('t'):
{
tstring sFrmt = Quotes_GetDateFormat(true);
- sFrmt += _T(" ");
+ sFrmt += L" ";
sFrmt += Quotes_GetTimeFormat(true);
m_sResult = format_fetch_time(rProvider, m_hContact, sFrmt);
}
@@ -109,10 +109,10 @@ void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderGoogleFinance&/* FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_OPEN_VALUE);
break;
case _T('d'):
- FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_DIFF, _T("0"));
+ FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_DIFF, L"0");
break;
case _T('y'):
- FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, _T("0"));
+ FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, L"0");
break;
case _T('n'):
m_sResult = Quotes_DBGetStringT(m_hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
@@ -134,7 +134,7 @@ tstring format_double(double dValue, int nWidth) }
void CQuotesProviderVisitorFormater::FormatDoubleHelper(LPCSTR pszDbSet,
- const tstring sInvalid/* = _T("-")*/)
+ const tstring sInvalid/* = L"-"*/)
{
double d = 0.0;
if (true == Quotes_DBReadDouble(m_hContact, QUOTES_MODULE_NAME, pszDbSet, d))
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.h b/plugins/Quotes/src/QuotesProviderVisitorFormater.h index dc7481fa44..9ae3408d6a 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.h +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.h @@ -17,7 +17,7 @@ private: virtual void Visit(const CQuotesProviderYahoo& rProvider);
private:
- void FormatDoubleHelper(LPCSTR pszDbSet, const tstring sInvalid = _T("-"));
+ void FormatDoubleHelper(LPCSTR pszDbSet, const tstring sInvalid = L"-");
// void FormatChangeValueHelper(bool bPercentage);
private:
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.cpp b/plugins/Quotes/src/QuotesProviderYahoo.cpp index 9b9ad36c4f..e590472834 100644 --- a/plugins/Quotes/src/QuotesProviderYahoo.cpp +++ b/plugins/Quotes/src/QuotesProviderYahoo.cpp @@ -43,7 +43,7 @@ bool get_double_from_parsed_line(MCONTACT hContact, const TStrings& rasParsedLin return Quotes_DBWriteDouble(hContact, QUOTES_MODULE_NAME, pszDbName, d);
}
- db_set_ts(hContact, QUOTES_MODULE_NAME, pszDbName, _T(""));
+ db_set_ts(hContact, QUOTES_MODULE_NAME, pszDbName, L"");
return false;
}
@@ -55,7 +55,7 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts) typedef std::map<tstring, MCONTACT> TQuoteID2ContractHandles;
TQuoteID2ContractHandles aQuoteID2Handles;
tostringstream oURL;
- oURL << sURL << _T("dioksin.txt?s=");
+ oURL << sURL << L"dioksin.txt?s=";
for (TContracts::const_iterator i = anContacts.begin(); i != anContacts.end() && IsOnline(); ++i) {
MCONTACT hContact = *i;
if (bUseExtendedStatus)
@@ -64,13 +64,13 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts) tstring sQuoteID = Quotes_DBGetStringT(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_ID);
aQuoteID2Handles[sQuoteID] = hContact;
if (i != anContacts.begin())
- oURL << _T("+");
+ oURL << L"+";
oURL << sQuoteID;
}
if (true == IsOnline()) {
- oURL << _T("&f=snl1ohgpc1");
+ oURL << L"&f=snl1ohgpc1";
CHTTPSession http;
if ((true == http.OpenURL(oURL.str())) && (true == IsOnline())) {
tstring sFile;
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp index e58f70833f..ee548a211e 100644 --- a/plugins/Quotes/src/SettingsDlg.cpp +++ b/plugins/Quotes/src/SettingsDlg.cpp @@ -2,8 +2,8 @@ #define WINDOW_PREFIX_SETTINGS "Edit Settings_"
-LPCTSTR g_pszVariableQuoteName = _T("%quotename%");
-LPCTSTR g_pszVariableUserProfile = _T("%miranda_userdata%");
+LPCTSTR g_pszVariableQuoteName = L"%quotename%";
+LPCTSTR g_pszVariableUserProfile = L"%miranda_userdata%";
void update_file_controls(HWND hDlg)
{
@@ -85,7 +85,7 @@ void update_all_controls(HWND hDlg) std::vector<TCHAR> get_filter()
{
std::vector<TCHAR> aFilter;
- LPCTSTR pszFilterParts[] = { LPGENT("Log Files (*.txt,*.log)"), _T("*.txt;*.log"), LPGENT("All files (*.*)"), _T("*.*") };
+ LPCTSTR pszFilterParts[] = { LPGENT("Log Files (*.txt,*.log)"), L"*.txt;*.log", LPGENT("All files (*.*)"), L"*.*" };
for (int i = 0; i < sizeof(pszFilterParts) / sizeof(pszFilterParts[0]); ++i) {
tstring sPart = TranslateTS(pszFilterParts[i]);
std::copy(sPart.begin(), sPart.end(), std::back_inserter(aFilter));
@@ -111,7 +111,7 @@ void select_log_file(HWND hDlg) ofn.lpstrFilter = pszFilter;
ofn.nFilterIndex = 1;
ofn.hInstance = g_hInstance;
- ofn.lpstrDefExt = _T("log");
+ ofn.lpstrDefExt = L"log";
ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_EXPLORER;
BOOL b = GetOpenFileName(&ofn);
@@ -663,9 +663,9 @@ CAdvProviderSettings::CAdvProviderSettings(const IQuotesProvider* pQuotesProvide m_sLogFileName = Quotes_DBGetStringT(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFile);
if (true == m_sLogFileName.empty()) {
m_sLogFileName = g_pszVariableUserProfile;
- m_sLogFileName += _T("\\Quotes\\");
+ m_sLogFileName += L"\\Quotes\\";
m_sLogFileName += g_pszVariableQuoteName;
- m_sLogFileName += _T(".log");
+ m_sLogFileName += L".log";
}
m_sFormatLogFile = Quotes_DBGetStringT(NULL, QUOTES_PROTOCOL_NAME, visitor.m_pszDbLogFormat, visitor.m_pszDefLogFileFormat);
diff --git a/plugins/Quotes/src/WinCtrlHelper.cpp b/plugins/Quotes/src/WinCtrlHelper.cpp index 9ca18a6811..18662cb0cd 100644 --- a/plugins/Quotes/src/WinCtrlHelper.cpp +++ b/plugins/Quotes/src/WinCtrlHelper.cpp @@ -15,7 +15,7 @@ static INT_PTR CALLBACK VariableListDlgProc(HWND hWnd, UINT msg, WPARAM wp, LPAR std::for_each(raSpec.begin(), raSpec.end(),
[&o](const CQuotesProviderVisitorFormatSpecificator::CFormatSpecificator& spec)
{
- o << spec.m_sSymbol << _T('\t') << spec.m_sDesc << _T("\r\n");
+ o << spec.m_sSymbol << _T('\t') << spec.m_sDesc << L"\r\n";
});
::SetDlgItemText(hWnd, IDC_EDIT_VARIABLE, o.str().c_str());
}
diff --git a/plugins/Quotes/src/XMLEngineMI.cpp b/plugins/Quotes/src/XMLEngineMI.cpp index 59c76ed58f..5f694a31d0 100644 --- a/plugins/Quotes/src/XMLEngineMI.cpp +++ b/plugins/Quotes/src/XMLEngineMI.cpp @@ -99,7 +99,7 @@ IXMLNode::TXMLNodePtr CXMLEngineMI::LoadFile(const tstring& rsFileName)const {
IXMLNode::TXMLNodePtr pResult;
FILE *stream;
- if (0 == ::_tfopen_s(&stream, rsFileName.c_str(), _T("r"))) {
+ if (0 == ::_tfopen_s(&stream, rsFileName.c_str(), L"r")) {
struct _stat st;
if (-1 != ::_fstat(::_fileno(stream), &st)) {
std::vector<char> aBuffer(st.st_size + 1);
@@ -139,10 +139,10 @@ bool CXMLEngineMI::SaveFile(const tstring& rsFileName, const IXMLNode::TXMLNodeP if (pXML) {
tofstream file(rsFileName.c_str());
if (file.good()) {
- IXMLNode::TXMLNodePtr pRoot(create_node(_T("xml"), tstring(), true));
+ IXMLNode::TXMLNodePtr pRoot(create_node(L"xml", tstring(), true));
if (pRoot) {
- pRoot->AddAttribute(_T("version"), _T("1.0"));
- pRoot->AddAttribute(_T("encoding"), _T("UTF-8"));
+ pRoot->AddAttribute(L"version", L"1.0");
+ pRoot->AddAttribute(L"encoding", L"UTF-8");
file << *pRoot;
}
diff --git a/plugins/SMS/src/SMSConstans.h b/plugins/SMS/src/SMSConstans.h index 710aed57ba..b347620cbf 100644 --- a/plugins/SMS/src/SMSConstans.h +++ b/plugins/SMS/src/SMSConstans.h @@ -39,7 +39,7 @@ struct FontOptionsList }
static fontOptionsList[] = {
- { RGB(106, 106, 106), _T("Arial"), 0, -12},
+ { RGB(106, 106, 106), L"Arial", 0, -12},
};
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index bfd3dd5968..a2a231e20e 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -197,7 +197,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s hIcon = (HICON)LoadImage(ssSMSSettings.hInstance, MAKEINTRESOURCE(iIcon), IMAGE_ICON, 0, 0, LR_SHARED);
break;
default:
- lpwszTitlepart = _T("Unknown event type");
+ lpwszTitlepart = L"Unknown event type";
hIcon = 0;
}
@@ -210,7 +210,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s }
lpwszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
- mir_sntprintf(wszTitle, _T("%s - %s"), lpwszContactDisplayName, lpwszTitlepart);
+ mir_sntprintf(wszTitle, L"%s - %s", lpwszContactDisplayName, lpwszTitlepart);
MultiByteToWideChar(CP_UTF8, 0, lpszMessage, (int)dwMessageSize, lpwszMessage, (int)dwMessageSize + MAX_PATH);
SetWindowText(prswdWindowData->hWnd, wszTitle);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index f43e280559..66f7581eeb 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -154,7 +154,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hWndDlg, IDOK), dwSignLen != 0);
}
- mir_sntprintf(tszSign, _T("%d/%d"), dwSignLen, GetSMSMessageLenMax(hWndDlg));
+ mir_sntprintf(tszSign, L"%d/%d", dwSignLen, GetSMSMessageLenMax(hWndDlg));
SetDlgItemText(hWndDlg, IDC_COUNT, tszSign);
}
@@ -386,7 +386,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA size_t dwMessageSize = GET_DLG_ITEM_TEXT_LENGTH(hWndDlg, IDC_MESSAGE);
EnableWindow(GetDlgItem(hWndDlg, IDOK), dwMessageSize != 0);
- mir_sntprintf(tszBuff, _T("%d/%d"), dwMessageSize, GetSMSMessageLenMax(hWndDlg));
+ mir_sntprintf(tszBuff, L"%d/%d", dwMessageSize, GetSMSMessageLenMax(hWndDlg));
SetDlgItemText(hWndDlg, IDC_COUNT, tszBuff);
}
break;
@@ -400,7 +400,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARA size_t dwPhoneSize = GetDlgItemText(hWndDlg, IDC_ADDRESS, tszPhone, (_countof(tszPhone) - 4));
if (IsPhoneW(tszPhone, dwPhoneSize)) {
if (IsContactPhone(psswdWindowData->hMyContact, tszPhone, dwPhoneSize) == FALSE) {
- mir_tstrcat(tszPhone, _T(" SMS"));
+ mir_tstrcat(tszPhone, L" SMS");
for (DWORD i = 0; bCont; i++) {
mir_snprintf(szBuff, "MyPhone%d", i);
if (db_get(psswdWindowData->hMyContact, "UserInfo", szBuff, &dbv)) bCont = FALSE;
@@ -559,7 +559,7 @@ HWND SendSMSWindowAdd(MCONTACT hContact) LPTSTR lptszContactDisplayName = pcli->pfnGetContactDisplayName(hContact, 0);
TCHAR tszTitle[MAX_PATH];
- mir_sntprintf(tszTitle, _T("%s - %s"), lptszContactDisplayName, TranslateT("Send SMS"));
+ mir_sntprintf(tszTitle, L"%s - %s", lptszContactDisplayName, TranslateT("Send SMS"));
SetWindowText(psswdWindowData->hWnd, tszTitle);
SendDlgItemMessage(psswdWindowData->hWnd, IDC_NAME, CB_ADDSTRING, 0, (LPARAM)lptszContactDisplayName);
SendDlgItemMessage(psswdWindowData->hWnd, IDC_NAME, CB_SETCURSEL, 0, 0);
diff --git a/plugins/Scriver/src/chat/chat.h b/plugins/Scriver/src/chat/chat.h index 53ed0d2758..949202712a 100644 --- a/plugins/Scriver/src/chat/chat.h +++ b/plugins/Scriver/src/chat/chat.h @@ -100,5 +100,5 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex); //////////////////////////////////////////////////////////////////////////////////
-#define DEFLOGFILENAME _T("%miranda_logpath%\\%proto%\\%userid%.log")
+#define DEFLOGFILENAME L"%miranda_logpath%\\%proto%\\%userid%.log"
#endif
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 27644f6e03..29b88790d4 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -154,7 +154,7 @@ static void OnLoadSettings() int Chat_Load()
{
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Messaging") _T("/") LPGENT("Group chats"), FONTMODE_SKIP };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Messaging") L"/" LPGENT("Group chats"), FONTMODE_SKIP };
mir_getCI(&data);
saveCI = *pci;
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index f922a731f2..db8d646289 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa SendMessage(hwndDlg, OPT_FIXHEADINGS, 0, 0);
{
TCHAR* pszGroup = NULL;
- InitSetting(&pszGroup, "AddToGroup", _T("Chat rooms"));
+ InitSetting(&pszGroup, "AddToGroup", L"Chat rooms");
SetDlgItemText(hwndDlg, IDC_CHAT_GROUP, pszGroup);
mir_free(pszGroup);
}
@@ -366,36 +366,36 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa RECT rect;
mir_sntprintf(tszTooltipText,
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
// contact vars
- _T("%nick%"), TranslateT("nick of current contact (if defined)"),
- _T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
- _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
- _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
+ L"%nick%", TranslateT("nick of current contact (if defined)"),
+ L"%proto%", TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
+ L"%accountname%", TranslateT("user-defined account name of current contact (if defined)."),
+ L"%userid%", TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
// global vars
- _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
- _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
- _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
- _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
- _T("%miranda_logpath%"), TranslateT("will return parsed string %miranda_userdata%\\Logs"),
- _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
- _T("%username%"), TranslateT("username for currently logged-on Windows user"),
- _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
- _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
- _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
+ L"%miranda_path%", TranslateT("path to Miranda root folder"),
+ L"%miranda_profilesdir%", TranslateT("path to folder containing Miranda profiles"),
+ L"%miranda_profilename%", TranslateT("name of current Miranda profile (filename, without extension)"),
+ L"%miranda_userdata%", TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
+ L"%miranda_logpath%", TranslateT("will return parsed string %miranda_userdata%\\Logs"),
+ L"%appdata%", TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ L"%username%", TranslateT("username for currently logged-on Windows user"),
+ L"%mydocuments%", TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ L"%desktop%", TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ L"%xxxxxxx%", TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
// date/time vars
- _T("%d%"), TranslateT("day of month, 1-31"),
- _T("%dd%"), TranslateT("day of month, 01-31"),
- _T("%m%"), TranslateT("month number, 1-12"),
- _T("%mm%"), TranslateT("month number, 01-12"),
- _T("%mon%"), TranslateT("abbreviated month name"),
- _T("%month%"), TranslateT("full month name"),
- _T("%yy%"), TranslateT("year without century, 01-99"),
- _T("%yyyy%"), TranslateT("year with century, 1901-9999"),
- _T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name"));
+ L"%d%", TranslateT("day of month, 1-31"),
+ L"%dd%", TranslateT("day of month, 01-31"),
+ L"%m%", TranslateT("month number, 1-12"),
+ L"%mm%", TranslateT("month number, 01-12"),
+ L"%mon%", TranslateT("abbreviated month name"),
+ L"%month%", TranslateT("full month name"),
+ L"%yy%", TranslateT("year without century, 01-99"),
+ L"%yyyy%", TranslateT("year with century, 1901-9999"),
+ L"%wday%", TranslateT("abbreviated weekday name"),
+ L"%weekday%", TranslateT("full weekday name"));
GetClientRect(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), &rect);
rect.left = -85;
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"), &rect);
@@ -464,7 +464,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa LPITEMIDLIST idList = SHBrowseForFolder(&bi);
if (idList) {
SHGetPathFromIDList(idList, tszDirectory);
- mir_tstrcat(tszDirectory, _T("\\"));
+ mir_tstrcat(tszDirectory, L"\\");
PathToRelativeT(tszDirectory, tszTemp);
SetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, mir_tstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
}
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index 1fab1ef1f8..1a9be6ca87 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -68,7 +68,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s mir_tstrncpy(szTemp, TranslateT("&Message"), _countof(szTemp) - 1);
if (mir_tstrlen(szTemp) > 40)
- mir_tstrncpy(szTemp + 40, _T("..."), 4);
+ mir_tstrncpy(szTemp + 40, L"...", 4);
ModifyMenu(*hMenu, ID_MESS, MF_STRING | MF_BYCOMMAND, ID_MESS, szTemp);
gcmi.Type = MENU_ON_NICKLIST;
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index cfb41abe37..53eaba0c5a 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -237,7 +237,7 @@ LBL_SkipEnd: int topicStart = start;
while (topicStart >0 && (pszText[topicStart - 1] == ' ' || pszText[topicStart - 1] == 13 || pszText[topicStart - 1] == VK_TAB))
topicStart--;
- if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], _T("/topic")) == &pszText[topicStart - 6])
+ if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], L"/topic") == &pszText[topicStart - 6])
isTopic = true;
}
@@ -274,7 +274,7 @@ LBL_SkipEnd: if (!isRoom && !isTopic && g_Settings.bAddColonToAutoComplete && start == 0) {
szReplace = (TCHAR*)mir_alloc((mir_tstrlen(pszName) + 4) * sizeof(TCHAR));
mir_tstrcpy(szReplace, pszName);
- mir_tstrcat(szReplace, _T(": "));
+ mir_tstrcat(szReplace, L": ");
pszName = szReplace;
}
SendMessage(hwnd, EM_SETSEL, start, end);
@@ -706,7 +706,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case IDM_CLEAR:
if (si) {
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
pci->LM_RemoveAll(&si->pLog, &si->pLogEnd);
si->iEventCount = 0;
si->LastTime = 0;
@@ -795,7 +795,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO * p }
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(parentdat->pStatuses, ui->Status));
@@ -1147,8 +1147,8 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
// nicklist
- int ih = GetTextPixelSize(_T("AQG_glo'"), g_Settings.UserListFont, FALSE);
- int ih2 = GetTextPixelSize(_T("AQG_glo'"), g_Settings.UserListHeadingsFont, FALSE);
+ int ih = GetTextPixelSize(L"AQG_glo'", g_Settings.UserListFont, FALSE);
+ int ih2 = GetTextPixelSize(L"AQG_glo'", g_Settings.UserListHeadingsFont, FALSE);
int height = db_get_b(NULL, CHAT_MODULE, "NicklistRowDist", 12);
int font = ih > ih2 ? ih : ih2;
// make sure we have space for icon!
@@ -1187,7 +1187,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, 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;
}
tbd.iFlags = TBDF_TEXT | TBDF_ICON;
@@ -1200,7 +1200,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR {
MODULEINFO *mi = pci->MM_FindModule(si->pszModule);
hIcon = si->wStatus == ID_STATUS_ONLINE ? mi->hOnlineIcon : mi->hOfflineIcon;
- mir_sntprintf(szTemp, _T("%s : %s"), mi->ptszModDispName, si->ptszStatusbarText ? si->ptszStatusbarText : _T(""));
+ mir_sntprintf(szTemp, L"%s : %s", mi->ptszModDispName, si->ptszStatusbarText ? si->ptszStatusbarText : L"");
StatusBarData sbd;
sbd.iItem = 0;
@@ -1211,7 +1211,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR sbd.iItem = 1;
sbd.hIcon = NULL;
- sbd.pszText = _T("");
+ sbd.pszText = L"";
SendMessage(GetParent(hwndDlg), CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)hwndDlg);
StatusIconData sid = { sizeof(sid) };
@@ -1345,7 +1345,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR case GC_ACKMESSAGE:
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L"");
return TRUE;
case WM_CTLCOLORLISTBOX:
@@ -1358,8 +1358,8 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, 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);
// make sure we have space for icon!
@@ -1428,7 +1428,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR char szIndicator = SM_GetStatusIndicator(si, ui);
if (szIndicator > '\0') {
static TCHAR ptszBuf[128];
- mir_sntprintf(ptszBuf, _T("%c%s"), szIndicator, ui->pszNick);
+ mir_sntprintf(ptszBuf, L"%c%s", szIndicator, ui->pszNick);
SendDlgItemMessage(hwndDlg, IDC_CHAT_LIST, LB_ADDSTRING, 0, (LPARAM)ptszBuf);
}
else SendDlgItemMessage(hwndDlg, IDC_CHAT_LIST, LB_ADDSTRING, 0, (LPARAM)ui->pszNick);
@@ -1456,7 +1456,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR return TRUE;
case WINDOW_CLEARLOG:
- SetDlgItemText(hwndDlg, IDC_CHAT_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_CHAT_LOG, L"");
return TRUE;
case SESSION_TERMINATE:
@@ -1637,7 +1637,7 @@ LABEL_SHOWWINDOW: 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));
@@ -1670,9 +1670,9 @@ LABEL_SHOWWINDOW: size_t dwNameLenMax = (mir_tstrlen(ui->pszUID) + 4);
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_CHAT_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)pszName);
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
@@ -1709,13 +1709,13 @@ LABEL_SHOWWINDOW: 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_CHAT_MESSAGE), FALSE);
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, TRUE, 0);
}
- else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T(""));
+ else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L"");
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp index 83c7fc074b..c8485ed218 100644 --- a/plugins/Scriver/src/infobar.cpp +++ b/plugins/Scriver/src/infobar.cpp @@ -86,7 +86,7 @@ void RefreshInfobar(InfobarWindowData* idat) TCHAR szText[2048];
SETTEXTEX st;
if (szXStatusMsg && *szXStatusMsg)
- mir_sntprintf(szText, _T("%s (%s)"), TranslateTS(szXStatusName), szXStatusMsg);
+ mir_sntprintf(szText, L"%s (%s)", TranslateTS(szXStatusName), szXStatusMsg);
else
_tcsncpy_s(szText, TranslateTS(szXStatusName), _TRUNCATE);
st.flags = ST_DEFAULT;
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 563c2803da..fcc305a9f4 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -109,7 +109,7 @@ void InputAreaContextMenu(HWND hwnd, WPARAM, LPARAM lParam, MCONTACT hContact) SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&all);
break;
case IDM_CLEAR:
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
break;
}
DestroyMenu(hMenu);
@@ -224,7 +224,7 @@ int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, Common if (windowData->cmdListCurrent->next != NULL)
cmdListNew = windowData->cmdListCurrent->next;
else if (!windowData->cmdListCurrent->temporary)
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
}
}
if (cmdListNew != NULL) {
@@ -376,7 +376,7 @@ BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK * SendMessage(lParam->nmhdr.hwndFrom, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (_tcschr(tr.lpstrText, _T('@')) != NULL && _tcschr(tr.lpstrText, _T(':')) == NULL && _tcschr(tr.lpstrText, _T('/')) == NULL) {
memmove(tr.lpstrText + 7, tr.lpstrText, sizeof(TCHAR)*(tr.chrg.cpMax - tr.chrg.cpMin + 1));
- memcpy(tr.lpstrText, _T("mailto:"), sizeof(TCHAR) * 7);
+ memcpy(tr.lpstrText, L"mailto:", sizeof(TCHAR) * 7);
}
BOOL bOpenLink = TRUE;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 22b05043b8..34637e2010 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -165,12 +165,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));
FindClose(hFind);
@@ -552,7 +552,7 @@ static void UpdateReadChars(HWND hwndDlg, SrmmWindowData *dat) sbd.iFlags = SBDF_TEXT | SBDF_ICON;
sbd.hIcon = NULL;
sbd.pszText = szText;
- mir_sntprintf(szText, _T("%d"), len);
+ mir_sntprintf(szText, L"%d", len);
SendMessage(dat->hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)hwndDlg);
}
}
@@ -1099,7 +1099,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_OFFSET;
pf2.dxOffset = (g_dat.flags & SMF_INDENTTEXT) ? g_dat.indentSize * 1440 / g_dat.logPixelSX : 0;
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETLANGOPTIONS, 0, (LPARAM)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETLANGOPTIONS, 0, 0) & ~(IMF_AUTOKEYBOARD | IMF_AUTOFONTSIZEADJUST));
@@ -1361,12 +1361,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
else if (dat->lastMessage) {
TCHAR date[64], time[64];
- 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(szText, TranslateT("Last message received on %s at %s."), date, time);
sbd.pszText = szText;
}
- else sbd.pszText = _T("");
+ else sbd.pszText = L"";
SendMessage(dat->hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)hwndDlg);
UpdateReadChars(hwndDlg, dat);
@@ -1397,7 +1397,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&evt);
}
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
dat->hDbEventFirst = NULL;
dat->lastEventType = -1;
break;
@@ -1609,7 +1609,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON)
NotifyTyping(dat, PROTOTYPE_SELFTYPING_OFF);
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
if (db_get_b(NULL, SRMMMOD, SRMSGSET_AUTOMIN, SRMSGDEFSET_AUTOMIN))
ShowWindow(dat->hwndParent, SW_MINIMIZE);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 137ff6ead7..43a81f12b8 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -366,25 +366,25 @@ TCHAR* TimestampToString(DWORD dwFlags, time_t check, int mode) if (dwFlags & SMF_RELATIVEDATE && check >= today) {
mir_tstrcpy(szResult, TranslateT("Today"));
if (mode == 0)
- mir_tstrcat(szResult, _T(","));
+ mir_tstrcat(szResult, L",");
}
else if (dwFlags & SMF_RELATIVEDATE && check > (today - 86400)) {
mir_tstrcpy(szResult, TranslateT("Yesterday"));
if (mode == 0)
- mir_tstrcat(szResult, _T(","));
+ mir_tstrcat(szResult, L",");
}
else {
if (dwFlags & SMF_LONGDATE)
- mir_tstrcpy(format, _T("D"));
+ mir_tstrcpy(format, L"D");
else
- mir_tstrcpy(format, _T("d"));
+ mir_tstrcpy(format, L"d");
}
}
if (mode == 0 || mode == 2) {
if (mode == 0 && (dwFlags & SMF_SHOWDATE))
- mir_tstrcat(format, _T(" "));
+ mir_tstrcat(format, L" ");
- mir_tstrcat(format, (dwFlags & SMF_SHOWSECONDS) ? _T("s") : _T("t"));
+ mir_tstrcat(format, (dwFlags & SMF_SHOWSECONDS) ? L"s" : L"t");
}
if (format[0] != '\0') {
TimeZone_PrintTimeStamp(NULL, check, format, str, _countof(str), 0);
@@ -642,16 +642,16 @@ static char* CreateRTFFromEvent(SrmmWindowData *dat, EventData *evt, GlobalMessa AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, TranslateT("File sent"));
else
AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, TranslateT("File received"));
- AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, _T(":"));
+ AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, L":");
}
else if (evt->eventType == EVENTTYPE_URL) {
if (evt->dwFlags & IEEDF_SENT)
AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, TranslateT("URL sent"));
else
AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, TranslateT("URL received"));
- AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, _T(":"));
+ AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, L":");
}
- AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, _T(" "));
+ AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, L" ");
if (evt->pszTextW != NULL) {
if (evt->dwFlags & IEEDF_UNICODE_TEXT)
@@ -661,12 +661,12 @@ static char* CreateRTFFromEvent(SrmmWindowData *dat, EventData *evt, GlobalMessa }
if (evt->pszText2W != NULL) {
- AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, _T(" ("));
+ AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, L" (");
if (evt->dwFlags & IEEDF_UNICODE_TEXT2)
AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, evt->pszText2W);
else
AppendAnsiToBuffer(buffer, bufferEnd, bufferAlloced, evt->pszText2);
- AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, _T(")"));
+ AppendUnicodeToBuffer(buffer, bufferEnd, bufferAlloced, L")");
}
break;
default:
@@ -822,7 +822,7 @@ void StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend) }
else {
SendDlgItemMessage(hwndDlg, IDC_LOG, WM_SETREDRAW, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
sel.cpMin = 0;
sel.cpMax = GetRichTextLength(GetDlgItem(hwndDlg, IDC_LOG), 1200, FALSE);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 75afb7337d..41e9ebd30b 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -60,20 +60,20 @@ typedef struct FontOptionsListStruct } FontOptionsList;
static const FontOptionsList fontOptionsList[] = {
- { LPGENT("Outgoing messages"), RGB(106, 106, 106), _T("Arial"), 0, -12, LPGENT("Outgoing background")},
- { LPGENT("Incoming messages"), RGB(0, 0, 0), _T("Arial"), 0, -12, LPGENT("Incoming background")},
- { LPGENT("Outgoing name"), RGB(89, 89, 89), _T("Arial"), FONTF_BOLD, -12, LPGENT("Outgoing background")},
- { LPGENT("Outgoing time"), RGB(0, 0, 0), _T("Terminal"), FONTF_BOLD, -9, LPGENT("Outgoing background")},
- { LPGENT("Outgoing colon"), RGB(89, 89, 89), _T("Arial"), 0, -11, LPGENT("Outgoing background")},
- { LPGENT("Incoming name"), RGB(215, 0, 0), _T("Arial"), FONTF_BOLD, -12, LPGENT("Incoming background")},
- { LPGENT("Incoming time"), RGB(0, 0, 0), _T("Terminal"), FONTF_BOLD, -9, LPGENT("Incoming background")},
- { LPGENT("Incoming colon"), RGB(215, 0, 0), _T("Arial"), 0, -11, LPGENT("Incoming background")},
- { LPGENT("Message area"), RGB(0, 0, 0), _T("Arial"), 0, -12, LPGENT("Input area background")},
- { LPGENT("Notices"), RGB(90, 90, 160), _T("Arial"), 0, -12, LPGENT("Incoming background")},
- { LPGENT("Outgoing URL"), RGB(0, 0, 255), _T("Arial"), 0, -12, LPGENT("Outgoing background")},
- { LPGENT("Incoming URL"), RGB(0, 0, 255), _T("Arial"), 0, -12, LPGENT("Incoming background")},
- { LPGENT("Info bar contact name"), RGB(0, 0, 0), _T("Arial"), FONTF_BOLD, -19, LPGENT("Info bar background")},
- { LPGENT("Info bar status message"), RGB(50, 50, 50), _T("Arial"), FONTF_ITALIC, -11, LPGENT("Info bar background")}
+ { LPGENT("Outgoing messages"), RGB(106, 106, 106), L"Arial", 0, -12, LPGENT("Outgoing background")},
+ { LPGENT("Incoming messages"), RGB(0, 0, 0), L"Arial", 0, -12, LPGENT("Incoming background")},
+ { LPGENT("Outgoing name"), RGB(89, 89, 89), L"Arial", FONTF_BOLD, -12, LPGENT("Outgoing background")},
+ { LPGENT("Outgoing time"), RGB(0, 0, 0), L"Terminal", FONTF_BOLD, -9, LPGENT("Outgoing background")},
+ { LPGENT("Outgoing colon"), RGB(89, 89, 89), L"Arial", 0, -11, LPGENT("Outgoing background")},
+ { LPGENT("Incoming name"), RGB(215, 0, 0), L"Arial", FONTF_BOLD, -12, LPGENT("Incoming background")},
+ { LPGENT("Incoming time"), RGB(0, 0, 0), L"Terminal", FONTF_BOLD, -9, LPGENT("Incoming background")},
+ { LPGENT("Incoming colon"), RGB(215, 0, 0), L"Arial", 0, -11, LPGENT("Incoming background")},
+ { LPGENT("Message area"), RGB(0, 0, 0), L"Arial", 0, -12, LPGENT("Input area background")},
+ { LPGENT("Notices"), RGB(90, 90, 160), L"Arial", 0, -12, LPGENT("Incoming background")},
+ { LPGENT("Outgoing URL"), RGB(0, 0, 255), L"Arial", 0, -12, LPGENT("Outgoing background")},
+ { LPGENT("Incoming URL"), RGB(0, 0, 255), L"Arial", 0, -12, LPGENT("Incoming background")},
+ { LPGENT("Info bar contact name"), RGB(0, 0, 0), L"Arial", FONTF_BOLD, -19, LPGENT("Info bar background")},
+ { LPGENT("Info bar status message"), RGB(50, 50, 50), L"Arial", FONTF_ITALIC, -11, LPGENT("Info bar background")}
};
int fontOptionsListSize = _countof(fontOptionsList);
@@ -622,7 +622,7 @@ static void ShowPreview(HWND hwndDlg) pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_OFFSET;
pf2.dxOffset = (gdat.flags & SMF_INDENTTEXT) ? gdat.indentSize * 1440 / g_dat.logPixelSX : 0;
- SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOG, L"");
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
StreamInTestEvents(GetDlgItem(hwndDlg, IDC_LOG), &gdat);
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index e007c45e79..d397964eae 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -370,7 +370,7 @@ static INT_PTR SetStatusText(WPARAM hContact, LPARAM lParam) }
SendMessage(pdat->hwndStatus, SB_SETICON, 0, (LPARAM)(st == NULL ? 0 : st->hIcon));
- SendMessage(pdat->hwndStatus, SB_SETTEXT, 0, (LPARAM)(st == NULL ? _T("") : st->tszText));
+ SendMessage(pdat->hwndStatus, SB_SETTEXT, 0, (LPARAM)(st == NULL ? L"" : st->tszText));
return 0;
}
@@ -520,7 +520,7 @@ int OnUnloadModule(void) int OnLoadModule(void)
{
- hMsftEdit = LoadLibrary(_T("Msftedit.dll"));
+ hMsftEdit = LoadLibrary(L"Msftedit.dll");
if (hMsftEdit == NULL) {
if (IDYES != MessageBox(0,
TranslateT
@@ -648,7 +648,7 @@ STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEU STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
{
TCHAR sztName[64];
- mir_sntprintf(sztName, _T("s%u"), nextStgId++);
+ mir_sntprintf(sztName, L"s%u", nextStgId++);
if (pictStg == NULL)
return STG_E_MEDIUMFULL;
return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
diff --git a/plugins/Scriver/src/msgtimedout.cpp b/plugins/Scriver/src/msgtimedout.cpp index b7e8ae4ebb..e50504a340 100644 --- a/plugins/Scriver/src/msgtimedout.cpp +++ b/plugins/Scriver/src/msgtimedout.cpp @@ -50,7 +50,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar SendDlgItemMessage(hwndDlg, IDC_MSGTEXT, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)ewd->szText);
}
if (ewd->szName)
- mir_sntprintf(szText, _T("%s - %s"), TranslateT("Send error"), ewd->szName);
+ mir_sntprintf(szText, L"%s - %s", TranslateT("Send error"), ewd->szName);
else
_tcsncpy_s(szText, TranslateT("Send error"), _TRUNCATE);
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index e58601d3f4..53348f2bdb 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -33,7 +33,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar /////////////////////////////////////////////////////////////////////////////////////////
-static const TCHAR *titleTokenNames[] = { _T("%name%"), _T("%status%"), _T("%statusmsg%"), _T("%account%") };
+static const TCHAR *titleTokenNames[] = { L"%name%", L"%status%", L"%statusmsg%", L"%account%" };
TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto)
{
@@ -46,7 +46,7 @@ TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto) tokens[1] = pcli->pfnGetStatusModeDescription(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
tszStatus = ptrT(db_get_tsa(hContact, "CList", "StatusMsg"));
- tszStatus.Replace(_T("\r\n"), _T(" "));
+ tszStatus.Replace(L"\r\n", L" ");
tokens[2] = tszStatus;
char *accModule = Proto_GetBaseAccountName(hContact);
@@ -61,9 +61,9 @@ TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto) tszTemplate = tmplt;
else {
if (g_dat.flags & SMF_STATUSICON)
- tszTemplate = _T("%name% - ");
+ tszTemplate = L"%name% - ";
else
- tszTemplate = _T("%name% (%status%) : ");
+ tszTemplate = L"%name% (%status%) : ";
}
}
@@ -280,7 +280,7 @@ static void AddChild(ParentWindowData *dat, HWND hwnd, MCONTACT hContact) tci.mask = TCIF_PARAM | TCIF_IMAGE | TCIF_TEXT;
tci.lParam = (LPARAM)mwtd;
tci.iImage = -1;
- tci.pszText = _T("");
+ tci.pszText = L"";
TabCtrl_InsertItem(dat->hwndTabs, dat->childrenCount - 1, &tci);
SetWindowPos(mwtd->hwnd, HWND_TOP, dat->childRect.left, dat->childRect.top, dat->childRect.right - dat->childRect.left, dat->childRect.bottom - dat->childRect.top, SWP_HIDEWINDOW);
SendMessage(dat->hwnd, WM_SIZE, 0, 0);
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 8cc13d209b..43461d070b 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -142,7 +142,7 @@ char* GetRichTextRTF(HWND hwnd) void rtrimText(TCHAR *text)
{
- static TCHAR szTrimString[] = _T(":;,.!?\'\"><()[]- \r\n");
+ static TCHAR szTrimString[] = L":;,.!?\'\"><()[]- \r\n";
size_t iLen = mir_tstrlen(text) - 1;
while (_tcschr(szTrimString, text[iLen])) {
text[iLen] = _T('\0');
@@ -156,7 +156,7 @@ TCHAR* limitText(TCHAR *text, int limit) if (len > g_dat.limitNamesLength) {
TCHAR *ptszTemp = (TCHAR*)mir_alloc(sizeof(TCHAR) * (limit + 4));
_tcsncpy(ptszTemp, text, limit + 1);
- _tcsncpy(ptszTemp + limit, _T("..."), 4);
+ _tcsncpy(ptszTemp + limit, L"...", 4);
return ptszTemp;
}
return text;
diff --git a/plugins/SecureIM/src/loadlib.cpp b/plugins/SecureIM/src/loadlib.cpp index ebe2fab802..640f464ce4 100644 --- a/plugins/SecureIM/src/loadlib.cpp +++ b/plugins/SecureIM/src/loadlib.cpp @@ -5,9 +5,9 @@ CRYPTOPP_INFO cpp; HMODULE h;
BOOL loadlib(void)
{
- h = LoadLibrary(_T("plugins/cryptopp.dll"));
+ h = LoadLibrary("plugins/cryptopp.dll");
if (h == NULL) {
- h = LoadLibrary(_T("cryptopp.dll"));
+ h = LoadLibrary("cryptopp.dll");
if (h == NULL) return 0;
}
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index dc695ce9b7..5a02a2cf66 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -304,7 +304,7 @@ extern "C" __declspec(dllexport) int __cdecl Load(void) // check for support TrueColor Icons
BOOL bIsComCtl6 = FALSE;
- HMODULE hComCtlDll = LoadLibrary(_T("comctl32.dll"));
+ HMODULE hComCtlDll = LoadLibrary("comctl32.dll");
if (hComCtlDll) {
typedef HRESULT(CALLBACK *PFNDLLGETVERSION)(DLLVERSIONINFO*);
PFNDLLGETVERSION pfnDllGetVersion = (PFNDLLGETVERSION)GetProcAddress(hComCtlDll, "DllGetVersion");
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index cef386ddbf..6c05088389 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -806,7 +806,7 @@ INT_PTR CALLBACK DlgProcOptionsGPG(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l GetDlgItemText(hDlg, IDC_GPGEXECUTABLE_EDIT, gpgexe, _countof(gpgexe));
// filter zusammensetzen
- mir_snprintf(filter, _T("%s (*.exe)%c*.exe%c%c"), Translate("Executable Files"), 0, 0, 0);
+ mir_snprintf(filter, "%s (*.exe)%c*.exe%c%c", Translate("Executable Files"), 0, 0, 0);
// OPENFILENAME initialisieren
OPENFILENAME ofn = { sizeof(ofn) };
@@ -1020,8 +1020,8 @@ void RefreshProtoDlg(HWND hDlg) ListView_SetCheckState(hLV, itemNum, arProto[i]->inspecting);
}
- SetDlgItemText(hDlg, IDC_SPLITON, _T("0"));
- SetDlgItemText(hDlg, IDC_SPLITOFF, _T("0"));
+ SetDlgItemText(hDlg, IDC_SPLITON, "0");
+ SetDlgItemText(hDlg, IDC_SPLITOFF, "0");
EnableWindow(GetDlgItem(hDlg, IDC_SPLITON), false);
EnableWindow(GetDlgItem(hDlg, IDC_SPLITOFF), false);
@@ -1154,8 +1154,8 @@ void RefreshGPGDlg(HWND hDlg, BOOL iInit) void ResetGeneralDlg(HWND hDlg)
{
- SetDlgItemText(hDlg, IDC_KET, _T("10"));
- SetDlgItemText(hDlg, IDC_OKT, _T("2"));
+ SetDlgItemText(hDlg, IDC_KET, "10");
+ SetDlgItemText(hDlg, IDC_OKT, "2");
CheckDlgButton(hDlg, IDC_SFT, BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_SOM, BST_UNCHECKED);
@@ -1571,7 +1571,7 @@ BOOL ShowSelectKeyDlg(HWND hParent, LPSTR KeyPath) ofn.lpstrFile = KeyPath;
char temp[MAX_PATH];
- mir_snprintf(temp, _T("%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c"), Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
+ mir_snprintf(temp, "%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c", Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrTitle = TranslateT("Open Key File");
if (!GetOpenFileName(&ofn)) return FALSE;
@@ -1622,13 +1622,13 @@ LPSTR LoadKeys(LPCSTR file, BOOL priv) BOOL SaveExportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv)
{
- TCHAR szFile[MAX_PATH] = _T("rsa_pub.asc");
+ TCHAR szFile[MAX_PATH] = "rsa_pub.asc";
if (priv)
- mir_tstrcpy(szFile, _T("rsa_priv.asc"));
+ mir_tstrcpy(szFile, "rsa_priv.asc");
OPENFILENAME ofn = { sizeof(ofn) };
char temp[MAX_PATH];
- mir_snprintf(temp, _T("%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c"), Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
+ mir_snprintf(temp, "%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c", Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.hwndOwner = hParent;
ofn.nMaxFile = MAX_PATH;
@@ -1639,7 +1639,7 @@ BOOL SaveExportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) if (!GetSaveFileName(&ofn))
return FALSE;
- FILE *f = _tfopen(szFile, _T("wb"));
+ FILE *f = _tfopen(szFile, "wb");
if (!f)
return FALSE;
fwrite(key, mir_strlen(key), 1, f);
@@ -1650,9 +1650,9 @@ BOOL SaveExportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) BOOL LoadImportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv)
{
- TCHAR szFile[MAX_PATH] = _T("rsa_pub.asc");
+ TCHAR szFile[MAX_PATH] = "rsa_pub.asc";
if (priv)
- mir_tstrcpy(szFile, _T("rsa_priv.asc"));
+ mir_tstrcpy(szFile, "rsa_priv.asc");
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -1661,13 +1661,13 @@ BOOL LoadImportRSAKeyDlg(HWND hParent, LPSTR key, BOOL priv) ofn.Flags = OFN_EXPLORER | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT | OFN_NOREADONLYRETURN;
ofn.lpstrFile = szFile;
char temp[MAX_PATH];
- mir_snprintf(temp, _T("%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c"), Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
+ mir_snprintf(temp, "%s (*.asc)%c*.asc%c%s (*.*)%c*.*%c%c", Translate("ASC files"), 0, 0, Translate("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrTitle = (priv) ? TranslateT("Load Private Key File") : TranslateT("Load Public Key File");
if (!GetOpenFileName(&ofn))
return FALSE;
- FILE *f = _tfopen(szFile, _T("rb"));
+ FILE *f = _tfopen(szFile, "rb");
if (!f)
return FALSE;
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp index adbea85e83..3417e06dd2 100644 --- a/plugins/SeenPlugin/src/file.cpp +++ b/plugins/SeenPlugin/src/file.cpp @@ -55,7 +55,7 @@ void UninitFileOutput() void FileWrite(MCONTACT hcontact)
{
- FILE *log = _tfopen(ParseString(g_ptszFileName, hcontact), _T("a"));
+ FILE *log = _tfopen(ParseString(g_ptszFileName, hcontact), L"a");
if (log != NULL) {
_fputts(ParseString(g_ptszFileStamp, hcontact), log);
fputs("\r\n", log);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index fd214f674c..7d589a95c8 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -92,7 +92,7 @@ void LoadHistoryList(MCONTACT hContact, HWND hwnd, int nList) SendDlgItemMessage(hwnd, nList, LB_ADDSTRING, 0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
- else SendDlgItemMessage(hwnd, nList, LB_ADDSTRING, 0, (LPARAM)_T(""));
+ else SendDlgItemMessage(hwnd, nList, LB_ADDSTRING, 0, (LPARAM)L"");
}
}
@@ -174,7 +174,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA TranslateDialogDefault(hwndDlg);
hContact = (MCONTACT)lparam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lparam);
- mir_sntprintf(sztemp, _T("%s: %s"),
+ mir_sntprintf(sztemp, L"%s: %s",
pcli->pfnGetContactDisplayName(hContact, 0),
TranslateT("last seen history"));
SetWindowText(hwndDlg, sztemp);
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 7403d10827..e3d6c714e6 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -44,8 +44,8 @@ PLUGININFOEX pluginInfo = { #define TRANSNUMBER 2
DBVTranslation idleTr[TRANSNUMBER] = {
- { any_to_IdleNotidleUnknown, _T("Any to Idle/Not Idle/Unknown"), 0 },
- { any_to_Idle, _T("Any to /Idle or empty"), 0 }
+ { any_to_IdleNotidleUnknown, L"Any to Idle/Not Idle/Unknown", 0 },
+ { any_to_Idle, L"Any to /Idle or empty", 0 }
};
static int CompareProtos(const char *p1, const char *p2)
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index 07f5c52fac..eeb15431f4 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -109,11 +109,11 @@ int ShowMissed(void) for (int loop = 0; loop < mcs.count; loop++) {
mir_tstrncat(sztemp, (TCHAR*)pcli->pfnGetContactDisplayName(mcs.wpcontact[loop], 0), _countof(sztemp) - mir_tstrlen(sztemp));
if (db_get_b(NULL, S_MOD, "MissedOnes_Count", 0)) {
- mir_sntprintf(szcount, _T(" [%i]"), mcs.times[loop]);
+ mir_sntprintf(szcount, L" [%i]", mcs.times[loop]);
mir_tstrcat(sztemp, szcount);
}
- mir_tstrcat(sztemp, _T("\n"));
+ mir_tstrcat(sztemp, L"\n");
}
CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_MISSED), NULL, MissedDlgProc, (LPARAM)sztemp);
diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index c1371e94ed..48999ed4c2 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -61,7 +61,7 @@ WCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setti //#define UM_CHECKHOOKS (WM_USER+1)
-#define debug(a) MessageBox(NULL,a,_T("Debug"),MB_OK)
+#define debug(a) MessageBox(NULL,a,L"Debug",MB_OK)
#define IDI_USERDETAILS 160
#define IDI_DOWNARROW 264
@@ -78,13 +78,13 @@ WCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setti #define WM_REFRESH_UI (WM_USER+10)
-#define DEFAULT_MENUSTAMP _T("%d.%m.%Y - %H:%M [%s]")
+#define DEFAULT_MENUSTAMP L"%d.%m.%Y - %H:%M [%s]"
#define DEFAULT_POPUPSTAMP TranslateT("%n is %s (%u)")
#define DEFAULT_POPUPSTAMPTEXT TranslateT("%i(%r)%bWas %o")
#define DEFAULT_USERSTAMP TranslateT("Name:%t%N%bStatus:%t%s%bDay:%t%d.%m.%Y%bTime:%t%H:%M:%S%bPrevious Status:%t%o%b%b%P ID:%t%u%bExternal IP:%t%i%bInternal IP:%t%r%bClient ID: %t%C%b%bStatus Message:%t%T")
-#define DEFAULT_FILESTAMP _T("%d.%m.%Y %H:%M:%S%t%n%t%s%t%u%t%r | %i%t%N")
-#define DEFAULT_FILENAME _T("%miranda_logpath%\\LastSeen\\%P.txt")
-#define DEFAULT_HISTORYSTAMP _T("%d.%m.%Y - %H:%M [%s]")
+#define DEFAULT_FILESTAMP L"%d.%m.%Y %H:%M:%S%t%n%t%s%t%u%t%r | %i%t%N"
+#define DEFAULT_FILENAME L"%miranda_logpath%\\LastSeen\\%P.txt"
+#define DEFAULT_HISTORYSTAMP L"%d.%m.%Y - %H:%M [%s]"
#define DEFAULT_WATCHEDPROTOCOLS ""
typedef struct{
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index f902e34484..8b281dd3f9 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -182,18 +182,18 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) switch (*++p) {
case 'Y':
if (!st.wYear) goto LBL_noData;
- d += _stprintf(d, _T("%04i"), st.wYear); //!!!!!!!!!!!!
+ d += _stprintf(d, L"%04i", st.wYear); //!!!!!!!!!!!!
break;
case 'y':
if (!st.wYear) goto LBL_noData;
- d += _stprintf(d, _T("%02i"), st.wYear % 100); //!!!!!!!!!!!!
+ d += _stprintf(d, L"%02i", st.wYear % 100); //!!!!!!!!!!!!
break;
case 'm':
if (!(isetting = st.wMonth)) goto LBL_noData;
LBL_2DigNum:
- d += _stprintf(d, _T("%02i"), isetting); //!!!!!!!!!!!!
+ d += _stprintf(d, L"%02i", isetting); //!!!!!!!!!!!!
break;
case 'd':
@@ -204,12 +204,12 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) isetting = st.wDayOfWeek;
if (isetting == -1) {
LBL_noData:
- charPtr = wantempty ? _T("") : TranslateT("<unknown>");
+ charPtr = wantempty ? L"" : TranslateT("<unknown>");
goto LBL_charPtr;
}
charPtr = TranslateTS(weekdays[isetting]);
LBL_charPtr:
- d += mir_sntprintf(d, MAXSIZE - (d - sztemp), _T("%s"), charPtr);
+ d += mir_sntprintf(d, MAXSIZE - (d - sztemp), L"%s", charPtr);
break;
case 'w':
@@ -240,7 +240,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) case 'p':
if ((isetting = st.wHour) == -1) goto LBL_noData;
- charPtr = (isetting >= 12) ? _T("PM") : _T("AM");
+ charPtr = (isetting >= 12) ? L"PM" : L"AM";
goto LBL_charPtr;
case 'M':
@@ -252,7 +252,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) goto LBL_2DigNum;
case 'n':
- charPtr = hcontact ? (TCHAR*)pcli->pfnGetContactDisplayName(hcontact, 0) : (wantempty ? _T("") : _T("---"));
+ charPtr = hcontact ? (TCHAR*)pcli->pfnGetContactDisplayName(hcontact, 0) : (wantempty ? L"" : L"---");
goto LBL_charPtr;
case 'N':
@@ -282,7 +282,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "StatusTriger" : courProtoName, 0)) {
_tcsncpy(szdbsetting, pcli->pfnGetStatusModeDescription(isetting | 0x8000, 0), _countof(szdbsetting));
if (!(isetting & 0x8000)) {
- mir_tstrncat(szdbsetting, _T("/"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, L"/", _countof(szdbsetting) - mir_tstrlen(szdbsetting));
mir_tstrncat(szdbsetting, TranslateT("Idle"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
@@ -294,7 +294,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) if (db_get_ts(hcontact, "CList", "StatusMsg", &dbv))
goto LBL_noData;
- d += mir_sntprintf(d, MAXSIZE - (d - sztemp), _T("%s"), dbv.ptszVal);
+ d += mir_sntprintf(d, MAXSIZE - (d - sztemp), L"%s", dbv.ptszVal);
db_free(&dbv);
break;
@@ -302,7 +302,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "OldStatus" : courProtoName, 0)) {
_tcsncpy(szdbsetting, pcli->pfnGetStatusModeDescription(isetting, 0), _countof(szdbsetting));
if (includeIdle && hcontact && db_get_b(hcontact, S_MOD, "OldIdle", 0)) {
- mir_tstrncat(szdbsetting, _T("/"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
+ mir_tstrncat(szdbsetting, L"/", _countof(szdbsetting) - mir_tstrlen(szdbsetting));
mir_tstrncat(szdbsetting, TranslateT("Idle"), _countof(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
@@ -331,12 +331,12 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) goto LBL_charPtr;
case 'P':
- _tcsncpy(szdbsetting, szProto ? _A2T(szProto) : (wantempty ? _T("") : _T("ProtoUnknown")), _countof(szdbsetting));
+ _tcsncpy(szdbsetting, szProto ? _A2T(szProto) : (wantempty ? L"" : L"ProtoUnknown"), _countof(szdbsetting));
charPtr = szdbsetting;
goto LBL_charPtr;
case 'b':
- charPtr = _T("\x0D\x0A");
+ charPtr = L"\x0D\x0A";
goto LBL_charPtr;
case 'C': // Get Client Info
@@ -347,7 +347,7 @@ TCHAR* ParseString(TCHAR *szstring, MCONTACT hcontact) goto LBL_noData;
case 't':
- charPtr = _T("\t");
+ charPtr = L"\t";
goto LBL_charPtr;
case 'A':
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 01daca3cd9..eb4b9dcc61 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -166,16 +166,16 @@ INT_PTR CALLBACK CSend::ResultDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, size_t len; if (bbc) { if (bbc == 1) { - memcpy(tmp, _T("[img]"), 5 * sizeof(TCHAR)); len = 5; + memcpy(tmp, L"[img]", 5 * sizeof(TCHAR)); len = 5; len += GetDlgItemText(hwndDlg, edtID, tmp + len, 2048 - 11); - memcpy(tmp + len, _T("[/img]"), 7 * sizeof(TCHAR)); len += 7; + memcpy(tmp + len, L"[/img]", 7 * sizeof(TCHAR)); len += 7; } else { - memcpy(tmp, _T("[url="), 5 * sizeof(TCHAR)); len = 5; + memcpy(tmp, L"[url=", 5 * sizeof(TCHAR)); len = 5; len += GetDlgItemText(hwndDlg, ID_edtURL, tmp + len, 1024); - memcpy(tmp + len, _T("][img]"), 6 * sizeof(TCHAR)); len += 6; + memcpy(tmp + len, L"][img]", 6 * sizeof(TCHAR)); len += 6; len += GetDlgItemText(hwndDlg, edtID, tmp + len, 1024); - memcpy(tmp + len, _T("[/img][/url]"), 13 * sizeof(TCHAR)); len += 12; + memcpy(tmp + len, L"[/img][/url]", 13 * sizeof(TCHAR)); len += 12; } } else @@ -217,7 +217,7 @@ void CSend::svcSendMsgExit(const char* szMessage) if (m_ChatRoom) { TCHAR* tmp = mir_a2t(szMessage); if (m_pszFileDesc) { - mir_tstradd(tmp, _T("\r\n")); + mir_tstradd(tmp, L"\r\n"); mir_tstradd(tmp, m_pszFileDesc); } GC_INFO gci = { 0 }; @@ -399,7 +399,7 @@ void CSend::Error(LPCTSTR pszFormat, ...) { TCHAR tszMsg[MAX_SECONDLINE]; - mir_sntprintf(tszMsg, _T("%s - %s"), _T(SZ_SENDSS), TranslateT("Error")); + mir_sntprintf(tszMsg, L"%s - %s", _T(SZ_SENDSS), TranslateT("Error")); mir_free(m_ErrorTitle), m_ErrorTitle = mir_tstrdup(tszMsg); va_list vl; @@ -436,18 +436,18 @@ void CSend::Exit(unsigned int Result) break; case ACKRESULT_DENIED: SkinPlaySound("FileDenied"); - Error(_T("%s (%i):\nFile transfer denied."), TranslateTS(m_pszSendTyp), Result); + Error(L"%s (%i):\nFile transfer denied.", TranslateTS(m_pszSendTyp), Result); MsgBoxService(NULL, (LPARAM)&m_box); err = false; break; case GC_RESULT_WRONGVER: //.You appear to be using the wrong version of GC API. - Error(_T("%s (%i):\nYou appear to be using the wrong version of GC API"), TranslateT("GCHAT error"), Result); + Error(L"%s (%i):\nYou appear to be using the wrong version of GC API", TranslateT("GCHAT error"), Result); break; case GC_RESULT_ERROR: // An internal GC error occurred. - Error(_T("%s (%i):\nAn internal GC error occurred."), TranslateT("GCHAT error"), Result); + Error(L"%s (%i):\nAn internal GC error occurred.", TranslateT("GCHAT error"), Result); break; case GC_RESULT_NOSESSION: // contact has no open GC session - Error(_T("%s (%i):\nContact has no open GC session."), TranslateT("GCHAT error"), Result); + Error(L"%s (%i):\nContact has no open GC session.", TranslateT("GCHAT error"), Result); break; case ACKRESULT_FAILED: default: @@ -754,7 +754,7 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr, int requestType, char* url, H } if (!fp) { HTTPFormDestroy(nlhr); - Error(_T("Error occurred when opening local file.\nAborting file upload...")); + Error(L"Error occurred when opening local file.\nAborting file upload..."); Exit(ACKRESULT_FAILED); return 1; } diff --git a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp index 2bcebe5287..62203d6ccd 100644 --- a/plugins/SendScreenshotPlus/src/CSendDropbox.cpp +++ b/plugins/SendScreenshotPlus/src/CSendDropbox.cpp @@ -56,7 +56,7 @@ void CSendDropbox::SendThread() { /// @todo : SS_DLG_DESCRIPTION and SS_DLG_DELETEAFTERSSEND are of no use as of now since we don't track upload progress - DropboxUploadInfo ui = { m_pszFile, _T("SendSS") }; + DropboxUploadInfo ui = { m_pszFile, L"SendSS" }; if (CallService(MS_DROPBOX_UPLOAD, (WPARAM)&m_URL, (LPARAM)&ui)) { diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp index c674e13186..99fa9304ea 100644 --- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp +++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp @@ -86,7 +86,7 @@ void CSendEmail::SendThread() MapiMessage Msg; MAPIFUNC lpMAPISendMail; - HINSTANCE hMAPILib = ::LoadLibrary(_T("MAPI32.DLL")); + HINSTANCE hMAPILib = ::LoadLibrary(L"MAPI32.DLL"); if (hMAPILib == NULL) { //return -1; Error(SS_ERR_INIT, m_pszSendTyp); diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp index 3294909b10..cb5abc8e20 100644 --- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp @@ -106,7 +106,7 @@ void CSendHost_ImageShack::SendThread() mir_free(err); err = mir_a2t(reply->pData); } - Error(_T("%s"), err); + Error(L"%s", err); mir_free(err); } } diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp index e1c44a831a..6d210953b0 100644 --- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp @@ -95,7 +95,7 @@ void CSendHost_UploadPie::SendThread(void* obj) TCHAR* werr; if (err) werr = mir_a2t(err); else werr = mir_a2t(reply->pData); - self->Error(_T("%s"), werr); + self->Error(L"%s", werr); mir_free(werr); } } diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 62ee37e261..fa4d8277e4 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -70,7 +70,7 @@ IconItem ICONS_BTN[ICO_BTN_END_] = static HANDLE m_hFolderScreenshot = 0; TCHAR* GetCustomPath() { - TCHAR* pszPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\Screenshots")); + TCHAR* pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\Screenshots"); if (m_hFolderScreenshot) { TCHAR szPath[1024] = { 0 }; FoldersGetCustomPathT(m_hFolderScreenshot, szPath, 1024, pszPath); @@ -78,14 +78,14 @@ TCHAR* GetCustomPath() pszPath = mir_tstrdup(szPath); } if (!pszPath) { - MessageBox(NULL, _T("Can not retrieve screenshot path."), _T("SendSS"), MB_OK | MB_ICONERROR | MB_APPLMODAL); + MessageBox(NULL, L"Can not retrieve screenshot path.", L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL); return 0; } int result = CreateDirectoryTreeT(pszPath); if (result) { TCHAR szError[MAX_PATH]; mir_sntprintf(szError, MAX_PATH, TranslateT("Could not create screenshot folder (error code: %d):\n%s\nDo you have write permissions?"), result, pszPath); - MessageBox(NULL, szError, _T("SendSS"), MB_OK | MB_ICONERROR | MB_APPLMODAL); + MessageBox(NULL, szError, L"SendSS", MB_OK | MB_ICONERROR | MB_APPLMODAL); mir_free(pszPath); return 0; } @@ -240,7 +240,7 @@ int hook_ModulesLoaded(WPARAM, LPARAM) CtrlButtonLoadModule(); // Folders plugin support m_hFolderScreenshot = FoldersRegisterCustomPathT(LPGEN("SendSS"), LPGEN("Screenshots"), - _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots")); + PROFILE_PATHW L"\\" CURRENT_PROFILEW L"\\Screenshots"); return 0; } int hook_SystemPreShutdown(WPARAM, LPARAM) @@ -310,7 +310,7 @@ DLL_EXPORT int Load(void) HOTKEYDESC hkd = { sizeof(hkd) }; hkd.pszName = "Open SendSS+"; hkd.ptszDescription = LPGENT("Open SendSS+"); - hkd.ptszSection = _T("SendSS+"); + hkd.ptszSection = L"SendSS+"; hkd.pszService = MS_SENDSS_OPENDIALOG; //hkd.DefHotKey=HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL; hkd.lParam = 0xFFFF; diff --git a/plugins/SendScreenshotPlus/src/UAboutForm.cpp b/plugins/SendScreenshotPlus/src/UAboutForm.cpp index f11938d868..6d7e0a57a6 100644 --- a/plugins/SendScreenshotPlus/src/UAboutForm.cpp +++ b/plugins/SendScreenshotPlus/src/UAboutForm.cpp @@ -95,9 +95,9 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM) { TCHAR* pszText = NULL; mir_tstradd(pszText, _T(__COPYRIGHT)); - mir_tstradd(pszText, _T("\r\n\r\n")); + mir_tstradd(pszText, L"\r\n\r\n"); - HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), _T("TEXT")); + HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_LICENSE), L"TEXT"); DWORD size = SizeofResource(g_hSendSS, hRes); char* data = (char*)mir_alloc(size + 1); memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size); @@ -112,7 +112,7 @@ LRESULT TfrmAbout::wmInitdialog(WPARAM, LPARAM) //Credit { - HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_CREDIT), _T("TEXT")); + HRSRC hRes = FindResource(g_hSendSS, MAKEINTRESOURCE(IDR_CREDIT), L"TEXT"); DWORD size = SizeofResource(g_hSendSS, hRes); char* data = (char*)mir_alloc(size + 1); memcpy(data, LockResource(LoadResource(g_hSendSS, hRes)), size); @@ -205,7 +205,7 @@ void TfrmAbout::btnPageClick() TCHAR newTitle[128]; TCHAR* pszPlug = mir_a2t(__PLUGIN_NAME); TCHAR* pszVer = mir_a2t(__VERSION_STRING_DOTS); - mir_sntprintf(newTitle, _T("%s - %s\nv%s"), pszPlug, title, pszVer); + mir_sntprintf(newTitle, L"%s - %s\nv%s", pszPlug, title, pszVer); mir_free(pszPlug); mir_free(pszVer); SetDlgItemText(m_hWnd, IDC_HEADERBAR, newTitle); diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 2832444bef..92e894894c 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -75,7 +75,7 @@ INT_PTR CALLBACK TfrmMain::DlgProc_CaptureTabPage(HWND hDlg, UINT uMsg, WPARAM w GetDlgItemText(hDlg, ID_edtSize, filename, _countof(filename)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = hDlg; - ofn.lpstrFilter = _T("Images\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tif;*.tiff\0"); + ofn.lpstrFilter = L"Images\0*.png;*.jpg;*.jpeg;*.bmp;*.gif;*.tif;*.tiff\0"; ofn.nFilterIndex = 1; ofn.lpstrFile = filename; ofn.nMaxFile = MAX_PATH; @@ -240,9 +240,9 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) if (m_MonitorCount > 1) { TCHAR tszTemp[120]; for (size_t mon = 0; mon < m_MonitorCount; ++mon) { /// @todo : fix format for non MSVC compilers - mir_sntprintf(tszTemp, _T("%Iu. %s%s"), + mir_sntprintf(tszTemp, L"%Iu. %s%s", mon + 1, TranslateT("Monitor"), - (m_Monitors[mon].dwFlags & MONITORINFOF_PRIMARY) ? TranslateT(" (primary)") : _T("") + (m_Monitors[mon].dwFlags & MONITORINFOF_PRIMARY) ? TranslateT(" (primary)") : L"" ); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, tszTemp), mon + 1); } @@ -278,11 +278,11 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) { hCtrl = GetDlgItem(m_hWnd, ID_cboxFormat); ComboBox_ResetContent(hCtrl); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("PNG")), 0); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("JPG")), 1); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("BMP")), 2); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("TIF")), 3); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("GIF")), 4); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"PNG"), 0); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"JPG"), 1); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"BMP"), 2); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"TIF"), 3); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"GIF"), 4); ComboBox_SelectItemData(hCtrl, m_opt_cboxFormat); //use Workaround for MS bug ComboBox_SelectItemData } /// init SendBy combo box @@ -294,7 +294,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("File Transfer")), SS_FILESEND); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("E-mail")), SS_EMAIL); if (g_myGlobals.PluginHTTPExist) { - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("HTTP Server")), SS_HTTPSERVER); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"HTTP Server"), SS_HTTPSERVER); } else if (m_opt_cboxSendBy == SS_HTTPSERVER) { m_opt_cboxSendBy = SS_IMAGESHACK; @@ -310,16 +310,16 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) m_opt_cboxSendBy = SS_IMAGESHACK; } if (g_myGlobals.PluginDropboxExist) { - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("Dropbox")), SS_DROPBOX); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"Dropbox"), SS_DROPBOX); } else if (m_opt_cboxSendBy == SS_DROPBOX) { m_opt_cboxSendBy = SS_IMAGESHACK; } - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("ImageShack")), SS_IMAGESHACK); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"ImageShack"), SS_IMAGESHACK); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (30m)")), SS_UPLOADPIE_30M); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1d)")), SS_UPLOADPIE_1D); ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Upload Pie (1w)")), SS_UPLOADPIE_1W); - ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, _T("imgur")), SS_IMGUR); + ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, L"imgur"), SS_IMGUR); ComboBox_SelectItemData(hCtrl, m_opt_cboxSendBy); //use Workaround for MS bug ComboBox_SelectItemData } /// init footer options @@ -329,21 +329,21 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) SendDlgItemMessage(m_hWnd, ID_btnAbout, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Information"), MBBF_TCHAR); HICON hIcon = GetIconBtn(ICO_BTN_HELP); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - SetWindowText(hCtrl, hIcon ? _T("") : _T("?")); + SetWindowText(hCtrl, hIcon ? L"" : L"?"); } if (hCtrl = GetDlgItem(m_hWnd, ID_btnExplore)) { SendDlgItemMessage(m_hWnd, ID_btnExplore, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open Folder"), MBBF_TCHAR); HICON hIcon = GetIconBtn(ICO_BTN_FOLDER); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - SetWindowText(hCtrl, hIcon ? _T("") : _T("...")); + SetWindowText(hCtrl, hIcon ? L"" : L"..."); } if (hCtrl = GetDlgItem(m_hWnd, ID_chkDesc)) { SendDlgItemMessage(m_hWnd, ID_chkDesc, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Fill description textbox."), MBBF_TCHAR); HICON hIcon = GetIconBtn(m_opt_btnDesc ? ICO_BTN_DESCON : ICO_BTN_DESC); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - SetWindowText(hCtrl, hIcon ? _T("") : _T("D")); + SetWindowText(hCtrl, hIcon ? L"" : L"D"); SendMessage(hCtrl, BM_SETCHECK, m_opt_btnDesc ? BST_CHECKED : BST_UNCHECKED, NULL); } @@ -351,7 +351,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) SendDlgItemMessage(m_hWnd, ID_chkDeleteAfterSend, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete after send"), MBBF_TCHAR); HICON hIcon = GetIconBtn(m_opt_btnDeleteAfterSend ? ICO_BTN_DELON : ICO_BTN_DEL); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - SetWindowText(hCtrl, hIcon ? _T("") : _T("X")); + SetWindowText(hCtrl, hIcon ? L"" : L"X"); SendMessage(hCtrl, BM_SETCHECK, m_opt_btnDeleteAfterSend ? BST_CHECKED : BST_UNCHECKED, NULL); } @@ -359,7 +359,7 @@ void TfrmMain::wmInitdialog(WPARAM, LPARAM) SendDlgItemMessage(m_hWnd, ID_chkEditor, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open editor before sending"), MBBF_TCHAR); HICON hIcon = GetIconBtn(m_opt_chkEditor ? ICO_BTN_EDITON : ICO_BTN_EDIT); SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - SetWindowText(hCtrl, hIcon ? _T("") : _T("E")); + SetWindowText(hCtrl, hIcon ? L"" : L"E"); SendMessage(hCtrl, BM_SETCHECK, m_opt_chkEditor ? BST_CHECKED : BST_UNCHECKED, NULL); } @@ -803,7 +803,7 @@ void TfrmMain::btnCaptureClick() else if (m_opt_tabCapture == 2) { TCHAR filename[MAX_PATH]; GetDlgItemText(m_hwndTabPage, ID_edtSize, filename, _countof(filename)); - FILE* fp = _wfopen(filename, _T("rb")); + FILE* fp = _wfopen(filename, L"rb"); if (!fp) { TCHAR *err = TranslateT("Select a file"); MessageBox(m_hWnd, err, ERROR_TITLE, MB_OK | MB_ICONWARNING); @@ -919,7 +919,7 @@ void TfrmMain::btnAboutOnCloseWindow(HWND) void TfrmMain::btnExploreClick() { if (m_FDestFolder) - ShellExecute(NULL, _T("explore"), m_FDestFolder, NULL, NULL, SW_SHOW); + ShellExecute(NULL, L"explore", m_FDestFolder, NULL, NULL, SW_SHOW); } //--------------------------------------------------------------------------- @@ -944,7 +944,7 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl _itot(rect.right - rect.left, B, 10); // _itot_s(rect.bottom - rect.top, H, 16, 10); _itot(rect.bottom - rect.top, H, 10); - mir_tstrncat(B, _T("x"), _countof(B) - mir_tstrlen(B)); + mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B)); mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B)); SetDlgItemText(hTarget, Ctrl, B); } @@ -956,7 +956,7 @@ void TfrmMain::edtSizeUpdate(RECT rect, HWND hTarget, UINT Ctrl) _itot(ABS(rect.right - rect.left), B, 10); // _itot_s(ABS(rect.bottom - rect.top), H, 16, 10); _itot(ABS(rect.bottom - rect.top), H, 10); - mir_tstrncat(B, _T("x"), _countof(B) - mir_tstrlen(B)); + mir_tstrncat(B, L"x", _countof(B) - mir_tstrlen(B)); mir_tstrncat(B, H, _countof(B) - mir_tstrlen(B)); SetDlgItemText(hTarget, Ctrl, B); } @@ -975,8 +975,8 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) if (FileNumber > 99999) FileNumber = 1; //Generate FileName mir_tstradd(path, m_FDestFolder); - if (path[mir_tstrlen(path) - 1] != _T('\\')) mir_tstradd(path, _T("\\")); - mir_tstradd(path, _T("shot%.5u"));//on format change, adapt "len" below + if (path[mir_tstrlen(path) - 1] != _T('\\')) mir_tstradd(path, L"\\"); + mir_tstradd(path, L"shot%.5u");//on format change, adapt "len" below size_t len = mir_tstrlen(path) + 2; pszFilename = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len)); mir_sntprintf(pszFilename, len, path, FileNumber); @@ -1034,7 +1034,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) HWND hwndCombo = GetDlgItem(m_hWnd, ID_cboxFormat); switch (ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo))) { case 0: //PNG - ret = SaveImage(fif, dib_new, pszFilename, _T("png")); + ret = SaveImage(fif, dib_new, pszFilename, L"png"); break; case 1: //JPG @@ -1049,16 +1049,16 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL); dib24 = FIP->FI_ConvertTo24Bits(dib32); FIP->FI_Unload(dib32); - ret = SaveImage(fif, dib24, pszFilename, _T("jpg")); + ret = SaveImage(fif, dib24, pszFilename, L"jpg"); FIP->FI_Unload(dib24); break; case 2: //BMP - // ret = SaveImage(FIF_BMP,dib_new, pszFilename, _T("bmp")); //32bit alpha BMP + // ret = SaveImage(FIF_BMP,dib_new, pszFilename, L"bmp"); //32bit alpha BMP dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL); dib24 = FIP->FI_ConvertTo24Bits(dib32); FIP->FI_Unload(dib32); - ret = SaveImage(FIF_BMP, dib24, pszFilename, _T("bmp")); + ret = SaveImage(FIF_BMP, dib24, pszFilename, L"bmp"); FIP->FI_Unload(dib24); break; @@ -1066,7 +1066,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) { TCHAR* pszFile = NULL; mir_tstradd(pszFile, pszFilename); - mir_tstradd(pszFile, _T(".tif")); + mir_tstradd(pszFile, L".tif"); dib32 = FIP->FI_Composite(dib_new, FALSE, &m_AlphaColor, NULL); dib24 = FIP->FI_ConvertTo24Bits(dib32); @@ -1083,11 +1083,11 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) case 4: //GIF { //dib24 = FIP->FI_ConvertTo8Bits(dib_new); - //ret = SaveImage(FIF_GIF,dib24, pszFilename, _T("gif")); + //ret = SaveImage(FIF_GIF,dib24, pszFilename, L"gif"); //FIP->FI_Unload(dib24); TCHAR* pszFile = NULL; mir_tstradd(pszFile, pszFilename); - mir_tstradd(pszFile, _T(".gif")); + mir_tstradd(pszFile, L".gif"); HBITMAP hBmp = FIP->FI_CreateHBITMAPFromDIB(dib_new); SaveGIF(hBmp, pszFile); ret = pszFile; @@ -1103,7 +1103,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) //TCHAR* pszFormat = (TCHAR*)ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo)); TCHAR pszFormat[6]; ComboBox_GetText(hwndCombo, pszFormat, 6); - if(ret && (mir_tstrcmpi (pszFormat,_T("png")) != 0)) { + if(ret && (mir_tstrcmpi (pszFormat,L"png") != 0)) { fif = FIP->FI_GetFIFFromFilenameU(ret); dib_new = FIP->FI_LoadU(fif, ret,0); @@ -1130,7 +1130,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) } else { mir_free(pszFileDesc); - m_pszFileDesc = mir_tstrdup(_T("")); + m_pszFileDesc = mir_tstrdup(L""); } if (m_cSend) { @@ -1168,7 +1168,7 @@ void TfrmMain::FormClose() if (m_opt_chkEditor) { SHELLEXECUTEINFO shex = { sizeof(SHELLEXECUTEINFO) }; shex.fMask = SEE_MASK_NOCLOSEPROCESS; - shex.lpVerb = _T("edit"); + shex.lpVerb = L"edit"; shex.lpFile = m_pszFile; shex.nShow = SW_SHOWNORMAL; ShellExecuteEx(&shex); @@ -1197,7 +1197,7 @@ void TfrmMain::FormClose() } while (res == WAIT_OBJECT_0 + 1); CloseHandle(shex.hProcess); } - if (MessageBox(m_hWnd, TranslateT("Send screenshot?"), _T("SendSS"), MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL) != IDYES) + if (MessageBox(m_hWnd, TranslateT("Send screenshot?"), L"SendSS", MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL) != IDYES) send = false; } diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp index 8df226f0dc..d36a4a9cc6 100644 --- a/plugins/SendScreenshotPlus/src/Utils.cpp +++ b/plugins/SendScreenshotPlus/src/Utils.cpp @@ -149,7 +149,7 @@ FIBITMAP* CaptureMonitor(const TCHAR* szDevice, const RECT* cropRect/*=NULL*/) FIBITMAP* dib; /// get screen resolution if (!szDevice) { - hScrDC = CreateDC(_T("DISPLAY"), NULL, NULL, NULL); + hScrDC = CreateDC(L"DISPLAY", NULL, NULL, NULL); rect.left = GetSystemMetrics(SM_XVIRTUALSCREEN); rect.top = GetSystemMetrics(SM_YVIRTUALSCREEN); rect.right = GetSystemMetrics(SM_XVIRTUALSCREEN) + GetSystemMetrics(SM_CXVIRTUALSCREEN); @@ -316,7 +316,7 @@ TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, const TCHAR* pszFilename, if (!FileExt) { if (!pszExt) return NULL; mir_tstradd(pszFile, pszFilename); - mir_tstradd(pszFile, _T(".")); + mir_tstradd(pszFile, L"."); mir_tstradd(pszFile, pszExt); } else { diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index 324bdb6d09..5801dcd7fb 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -700,7 +700,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...) { TCHAR tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE]; - mir_sntprintf(tszTitle, _T("%s - %s"), _T(MODNAME), TranslateT("Error")); + mir_sntprintf(tszTitle, L"%s - %s", _T(MODNAME), TranslateT("Error")); va_list vl; va_start(vl, pszFormat); diff --git a/plugins/SendScreenshotPlus/src/stdafx.h b/plugins/SendScreenshotPlus/src/stdafx.h index 201458b30d..2b003979e8 100644 --- a/plugins/SendScreenshotPlus/src/stdafx.h +++ b/plugins/SendScreenshotPlus/src/stdafx.h @@ -97,8 +97,8 @@ using namespace std; #define UM_EVENT WM_USER+2 // Generic Message Box for Errors -#define MSGERROR(text) MessageBox(NULL, text, _T("SendSS"), MB_OK | MB_ICONERROR) -#define MSGINFO (text) MessageBox(NULL, text, _T("SendSS"), MB_OK | MB_ICONINFORMATION) +#define MSGERROR(text) MessageBox(NULL, text, L"SendSS", MB_OK | MB_ICONERROR) +#define MSGINFO (text) MessageBox(NULL, text, L"SendSS", MB_OK | MB_ICONINFORMATION) typedef struct _MGLOBAL { DWORD mirandaVersion; // mirandaVersion diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index f691a86397..91e1ac7203 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -161,7 +161,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l dy = 20;
dx = 150;
dd = 5;
- hClistControl = CreateWindowEx(WS_EX_CLIENTEDGE, _T(CLISTCONTROL_CLASS), _T(""),
+ hClistControl = CreateWindowEx(WS_EX_CLIENTEDGE, _T(CLISTCONTROL_CLASS), L"",
WS_TABSTOP | WS_VISIBLE | WS_CHILD,
x, y, dx, dy, hdlg, (HMENU)IDC_CLIST, g_hInst, 0);
@@ -485,7 +485,7 @@ int SaveSessionDate() GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szDateBuf, DateSize);
int lenn = (DateSize + TimeSize + 5);
TCHAR *szSessionTime = (TCHAR*)mir_alloc(lenn*sizeof(TCHAR));
- mir_sntprintf(szSessionTime, lenn, _T("%s - %s"), szTimeBuf, szDateBuf);
+ mir_sntprintf(szSessionTime, lenn, L"%s - %s", szTimeBuf, szDateBuf);
char szSetting[256];
mir_snprintf(szSetting, "%s_%d", "SessionDate", 0);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index f9bd00bb8a..7df7a2b1f9 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -334,7 +334,7 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l EnableWindow(GetDlgItem(hdlg, IDC_DEL), FALSE);
//EnableWindow(GetDlgItem(hdlg,IDC_SAVE),TRUE);
SetDlgItemText(hdlg, IDC_EDIT, TranslateT("View"));
- hOpClistControl = CreateWindowEx(WS_EX_STATICEDGE, _T(CLISTCONTROL_CLASS), _T(""),
+ hOpClistControl = CreateWindowEx(WS_EX_STATICEDGE, _T(CLISTCONTROL_CLASS), L"",
WS_TABSTOP | WS_VISIBLE | WS_CHILD,
14, 198, 161, 163, hdlg, (HMENU)IDC_EMCLIST, g_hInst, 0);
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp index b4d4b09ef1..83d5842fb2 100644 --- a/plugins/ShellExt/src/main.cpp +++ b/plugins/ShellExt/src/main.cpp @@ -28,7 +28,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID) bIsVistaPlus = GetProcAddress( GetModuleHandleA("kernel32.dll"), "GetProductInfo") != NULL;
GetTempPath(_countof(tszLogPath), tszLogPath);
- _tcscat_s(tszLogPath, _countof(tszLogPath), _T("shlext.log"));
+ _tcscat_s(tszLogPath, _countof(tszLogPath), L"shlext.log");
hInst = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
@@ -102,7 +102,7 @@ char str4[] = "Apartment"; STDAPI DllRegisterServer()
{
- HRegKey k1(HKEY_CLASSES_ROOT, _T("miranda.shlext"));
+ HRegKey k1(HKEY_CLASSES_ROOT, L"miranda.shlext");
if (k1 == NULL)
return E_FAIL;
@@ -114,7 +114,7 @@ STDAPI DllRegisterServer() //////////////////////////////////////////////////////////////////////////////////////
- HRegKey kClsid(HKEY_CLASSES_ROOT, _T("CLSID\\{72013A26-A94C-11d6-8540-A5E62932711D}"));
+ HRegKey kClsid(HKEY_CLASSES_ROOT, L"CLSID\\{72013A26-A94C-11d6-8540-A5E62932711D}");
if (kClsid == NULL)
return E_FAIL;
@@ -123,7 +123,7 @@ STDAPI DllRegisterServer() if ( RegSetValueA(kClsid, "ProgID", REG_SZ, str3, sizeof(str3)))
return E_FAIL;
- HRegKey kInprocServer(kClsid, _T("InprocServer32"));
+ HRegKey kInprocServer(kClsid, L"InprocServer32");
if (kInprocServer == NULL)
return E_FAIL;
@@ -143,7 +143,7 @@ STDAPI DllRegisterServer() //////////////////////////////////////////////////////////////////////////////////////
- HRegKey k2(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"));
+ HRegKey k2(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved");
if (k2 == NULL)
return E_FAIL;
if ( RegSetValueExA(k2, str2, 0, REG_SZ, (PBYTE)str1, str1len))
diff --git a/plugins/ShellExt/src/options.cpp b/plugins/ShellExt/src/options.cpp index 9fdb3d2204..0a0c837ee4 100644 --- a/plugins/ShellExt/src/options.cpp +++ b/plugins/ShellExt/src/options.cpp @@ -30,7 +30,7 @@ static void InitControls(HWND hwndDlg) int comReg = IsCOMRegistered();
TCHAR szBuf[MAX_PATH];
- mir_sntprintf(szBuf, _T("%s (%s)"),
+ mir_sntprintf(szBuf, L"%s (%s)",
TranslateTS(COM_OKSTR[(comReg & COMREG_OK) != 0]),
TranslateTS(COM_APPROVEDSTR[(comReg & COMREG_APPROVED) != 0]));
SetDlgItemText(hwndDlg, IDC_STATUS, szBuf);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 07b74efd20..17915853ec 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -27,14 +27,14 @@ int IsCOMRegistered() int res = 0;
// these arent the BEST checks in the world
- if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("miranda.shlext"), 0, KEY_READ, &hRegKey)) {
+ if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"miranda.shlext", 0, KEY_READ, &hRegKey)) {
res += COMREG_OK;
RegCloseKey(hRegKey);
}
- if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), 0, KEY_READ, &hRegKey)) {
+ if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, KEY_READ, &hRegKey)) {
DWORD lpType = REG_SZ;
- if (!RegQueryValueEx(hRegKey, _T("{72013A26-A94C-11d6-8540-A5E62932711D}"), NULL, &lpType, 0, 0))
+ if (!RegQueryValueEx(hRegKey, L"{72013A26-A94C-11d6-8540-A5E62932711D}", NULL, &lpType, 0, 0))
res += COMREG_APPROVED;
RegCloseKey(hRegKey);
}
@@ -509,33 +509,33 @@ void InvokeThreadServer() HRESULT RemoveCOMRegistryEntries()
{
HKEY hRootKey;
- if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("miranda.shlext"), 0, KEY_READ, &hRootKey)) {
+ if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"miranda.shlext", 0, KEY_READ, &hRootKey)) {
// need to delete the subkey before the parent key is deleted under NT/2000/XP
- RegDeleteKey(hRootKey, _T("CLSID"));
+ RegDeleteKey(hRootKey, L"CLSID");
// close the key
RegCloseKey(hRootKey);
// delete it
- if (RegDeleteKey(HKEY_CLASSES_ROOT, _T("miranda.shlext")) != ERROR_SUCCESS)
+ if (RegDeleteKey(HKEY_CLASSES_ROOT, L"miranda.shlext") != ERROR_SUCCESS)
MessageBox(0,
TranslateT("Unable to delete registry key for 'shlext COM', this key may already be deleted or you may need admin rights."),
TranslateT("Problem"), MB_ICONERROR);
}
- if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("\\*\\shellex\\ContextMenuHandlers"), 0, KEY_ALL_ACCESS, &hRootKey)) {
- if (RegDeleteKey(hRootKey, _T("miranda.shlext")) != ERROR_SUCCESS)
+ if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"\\*\\shellex\\ContextMenuHandlers", 0, KEY_ALL_ACCESS, &hRootKey)) {
+ if (RegDeleteKey(hRootKey, L"miranda.shlext") != ERROR_SUCCESS)
MessageBox(0,
TranslateT("Unable to delete registry key for 'File context menu handlers', this key may already be deleted or you may need admin rights."),
TranslateT("Problem"), MB_ICONERROR);
RegCloseKey(hRootKey);
}
- if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("Directory\\shellex\\ContextMenuHandlers"), 0, KEY_ALL_ACCESS, &hRootKey)) {
- if (RegDeleteKey(hRootKey, _T("miranda.shlext")) != ERROR_SUCCESS)
+ if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"Directory\\shellex\\ContextMenuHandlers", 0, KEY_ALL_ACCESS, &hRootKey)) {
+ if (RegDeleteKey(hRootKey, L"miranda.shlext") != ERROR_SUCCESS)
MessageBox(0,
TranslateT("Unable to delete registry key for 'Directory context menu handlers', this key may already be deleted or you may need admin rights."),
TranslateT("Problem"), MB_ICONERROR);
RegCloseKey(hRootKey);
}
- if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), 0, KEY_ALL_ACCESS, &hRootKey)) {
- if (RegDeleteValue(hRootKey, _T("{72013A26-A94C-11d6-8540-A5E62932711D}")) != ERROR_SUCCESS) {
+ if (!RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, KEY_ALL_ACCESS, &hRootKey)) {
+ if (RegDeleteValue(hRootKey, L"{72013A26-A94C-11d6-8540-A5E62932711D}") != ERROR_SUCCESS) {
MessageBox(0,
TranslateT("Unable to delete registry entry for 'Approved context menu handlers', this key may already be deleted or you may need admin rights."),
TranslateT("Problem"), MB_ICONERROR);
@@ -552,11 +552,11 @@ void CheckUnregisterServer() // launches regsvr to remove the dll under admin.
TCHAR szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
GetModuleFileName(hInst, szFileName, _countof(szFileName));
- mir_sntprintf(szBuf, _T("/s /u \"%s\""), szFileName);
+ mir_sntprintf(szBuf, L"/s /u \"%s\"", szFileName);
SHELLEXECUTEINFO sei = { sizeof(sei) };
- sei.lpVerb = _T("runas");
- sei.lpFile = _T("regsvr32");
+ sei.lpVerb = L"runas";
+ sei.lpFile = L"regsvr32";
sei.lpParameters = szBuf;
if (ShellExecuteEx(&sei) == TRUE)
return;
@@ -573,7 +573,7 @@ void CheckRegisterServer() TCHAR szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
HKEY hRegKey;
- if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("miranda.shlext"), 0, KEY_READ, &hRegKey))
+ if (!RegOpenKeyEx(HKEY_CLASSES_ROOT, L"miranda.shlext", 0, KEY_READ, &hRegKey))
RegCloseKey(hRegKey);
else if (bIsVistaPlus) {
MessageBox(0,
@@ -581,11 +581,11 @@ void CheckRegisterServer() TranslateT("Miranda NG - Shell context menus (shellext.dll)"), MB_OK | MB_ICONINFORMATION);
// /s = silent
GetModuleFileName(hInst, szFileName, _countof(szFileName));
- mir_sntprintf(szBuf, _T("/s \"%s\""), szFileName);
+ mir_sntprintf(szBuf, L"/s \"%s\"", szFileName);
SHELLEXECUTEINFO sei = { sizeof(sei) };
- sei.lpVerb = _T("runas");
- sei.lpFile = _T("regsvr32");
+ sei.lpVerb = L"runas";
+ sei.lpFile = L"regsvr32";
sei.lpParameters = szBuf;
ShellExecuteEx(&sei);
}
diff --git a/plugins/ShellExt/src/utils.cpp b/plugins/ShellExt/src/utils.cpp index 22e033fb42..834850073d 100644 --- a/plugins/ShellExt/src/utils.cpp +++ b/plugins/ShellExt/src/utils.cpp @@ -5,7 +5,7 @@ extern TCHAR tszLogPath[]; void logA(const char *format, ...)
{
- FILE *out = _tfopen(tszLogPath, _T("a+"));
+ FILE *out = _tfopen(tszLogPath, L"a+");
if (out) {
va_list args;
va_start(args, format);
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index 5ec1972ca5..917ab2ae7d 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -201,13 +201,13 @@ INT addEvent(WPARAM hContact, LPARAM hDBEvent) TCHAR *ptszHead = db_get_tsa(NULL, protocolname, KEY_HEADING);
if (ptszHead != NULL) {
ptszTemp = ptszHead;
- ptszTemp.Replace(_T("%user%"), ptszNick);
+ ptszTemp.Replace(L"%user%", ptszNick);
msgLen += mir_tstrlen(ptszTemp);
mir_free(ptszHead);
}
TCHAR *ptszTemp2 = (TCHAR*)mir_alloc(sizeof(TCHAR) * (msgLen + 5));
- mir_sntprintf(ptszTemp2, msgLen + 5, _T("%s\r\n\r\n%s"), ptszTemp.c_str(), ptszVal);
+ mir_sntprintf(ptszTemp2, msgLen + 5, L"%s\r\n\r\n%s", ptszTemp.c_str(), ptszVal);
if (ServiceExists(MS_VARS_FORMATSTRING)) {
ptszTemp = variables_parse(ptszTemp2, 0, hContact);
}
@@ -257,13 +257,13 @@ extern "C" int __declspec(dllexport)Load(void) SET_UID(mi, 0xac1c64a, 0x82ca, 0x4845, 0x86, 0x89, 0x59, 0x76, 0x12, 0x74, 0x72, 0x7b);
mi.position = 500090000;
- mi.name.t = _T("");
+ mi.name.t = L"";
mi.pszService = protocolname"/ToggleEnable";
hEnableMenu = Menu_AddMainMenuItem(&mi);
SET_UID(mi, 0xb290cccd, 0x4ecc, 0x475e, 0x87, 0xcb, 0x51, 0xf4, 0x3b, 0xc3, 0x44, 0x9c);
mi.position = -0x7FFFFFFF;
- mi.name.t = _T("");
+ mi.name.t = L"";
mi.pszService = protocolname"/ToggleAutoanswer";
hToggle = Menu_AddContactMenuItem(&mi);
@@ -272,7 +272,7 @@ extern "C" int __declspec(dllexport)Load(void) HookEvent(ME_DB_EVENT_ADDED, addEvent);
HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);
- Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));
+ Icon_RegisterT(hinstance, L"Simple Auto Replier", iconList, _countof(iconList));
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 6e89652e1f..5bcc8ea109 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -93,11 +93,11 @@ void log2file(const char *fmt, ...) static TCHAR *GetWinampSong(void)
{
TCHAR *szTitle, *pstr, *res = NULL;
- HWND hwndWinamp = FindWindow(_T("STUDIO"), NULL);
+ HWND hwndWinamp = FindWindow(L"STUDIO", NULL);
int iTitleLen;
if (hwndWinamp == NULL)
- hwndWinamp = FindWindow(_T("Winamp v1.x"), NULL);
+ hwndWinamp = FindWindow(L"Winamp v1.x", NULL);
if (hwndWinamp == NULL)
return NULL;
@@ -113,7 +113,7 @@ static TCHAR *GetWinampSong(void) return NULL;
}
- pstr = _tcsstr(szTitle, _T(" - Winamp"));
+ pstr = _tcsstr(szTitle, L" - Winamp");
if (pstr == NULL)
{
mir_free(szTitle);
@@ -123,7 +123,7 @@ static TCHAR *GetWinampSong(void) if (pstr < szTitle + (iTitleLen / 2))
{
memmove(szTitle, pstr + 9, mir_tstrlen(pstr + 9) * sizeof(TCHAR));
- pstr = _tcsstr(pstr + 1, _T(" - Winamp"));
+ pstr = _tcsstr(pstr + 1, L" - Winamp");
if (pstr == NULL)
{
mir_free(szTitle);
@@ -177,7 +177,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) if (msg[i] != '%')
continue;
- if (!_tcsnicmp(msg+i, _T("%winampsong%"), 12))
+ if (!_tcsnicmp(msg+i, L"%winampsong%", 12))
{
TCHAR *ptszWinampTitle = GetWinampSong();
@@ -186,7 +186,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) mir_free(g_ptszWinampSong);
g_ptszWinampSong = mir_tstrdup(ptszWinampTitle);
}
- else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg"))
+ else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, L"SimpleStatusMsg")
&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
{
ptszWinampTitle = mir_tstrdup(g_ptszWinampSong);
@@ -202,7 +202,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) mir_free(ptszWinampTitle);
}
- else if (!_tcsnicmp(msg + i, _T("%time%"), 6))
+ else if (!_tcsnicmp(msg + i, L"%time%", 6))
{
MIRANDA_IDLE_INFO mii = {0};
mii.cbSize = sizeof(mii);
@@ -235,7 +235,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
}
- else if (!_tcsnicmp(msg + i, _T("%date%"), 6))
+ else if (!_tcsnicmp(msg + i, L"%date%", 6))
{
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, substituteStr, _countof(substituteStr));
@@ -245,20 +245,20 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 6, (mir_tstrlen(msg) - i - 5) * sizeof(TCHAR));
memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
}
- else if (!_tcsnicmp(msg+i, _T("%rand("), 6))
+ else if (!_tcsnicmp(msg+i, L"%rand(", 6))
{
TCHAR *temp, *token;
int ran_from, ran_to, k;
temp = mir_tstrdup(msg + i + 6);
- token = _tcstok(temp, _T(",)"));
+ token = _tcstok(temp, L",)");
ran_from = _ttoi(token);
- token = _tcstok(NULL, _T(",)%%"));
+ token = _tcstok(NULL, L",)%%");
ran_to = _ttoi(token);
if (ran_to > ran_from)
{
- mir_sntprintf(substituteStr, _T("%d"), GetRandom(ran_from, ran_to));
+ mir_sntprintf(substituteStr, L"%d", GetRandom(ran_from, ran_to));
for (k = i + 1; msg[k]; k++) if (msg[k] == '%') { k++; break; }
if (mir_tstrlen(substituteStr) > k - i)
@@ -269,7 +269,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) }
mir_free(temp);
}
- else if (!_tcsnicmp(msg+i, _T("%randmsg%"), 9))
+ else if (!_tcsnicmp(msg+i, L"%randmsg%", 9))
{
char buff[16];
int k, k2 = 0;
@@ -299,14 +299,14 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) if (!mir_tstrlen(substituteStr))
continue;
- if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL)
+ if (_tcsstr(substituteStr, L"%randmsg%") != NULL || _tcsstr(substituteStr, L"%randdefmsg%") != NULL)
{
if (k == maxk) maxk--;
}
else rmark[0] = TRUE;
}
- if (k2 == maxk || k2 > maxk) mir_tstrcpy(substituteStr, _T(""));
+ if (k2 == maxk || k2 > maxk) mir_tstrcpy(substituteStr, L"");
if (mir_tstrlen(substituteStr) > 9)
msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg) + 1 + mir_tstrlen(substituteStr) - 9) * sizeof(TCHAR));
@@ -314,7 +314,7 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) memmove(msg + i + mir_tstrlen(substituteStr), msg + i + 9, (mir_tstrlen(msg) - i - 8) * sizeof(TCHAR));
memcpy(msg + i, substituteStr, mir_tstrlen(substituteStr) * sizeof(TCHAR));
}
- else if (!_tcsnicmp(msg+i, _T("%randdefmsg%"), 12))
+ else if (!_tcsnicmp(msg+i, L"%randdefmsg%", 12))
{
char buff[16];
int k, k2 = 0;
@@ -344,14 +344,14 @@ TCHAR* InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int) if (!mir_tstrlen(substituteStr))
continue;
- if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL)
+ if (_tcsstr(substituteStr, L"%randmsg%") != NULL || _tcsstr(substituteStr, L"%randdefmsg%") != NULL)
{
if (k == maxk) maxk--;
}
else rmark[0] = TRUE;
}
- if (k2 == maxk || k2 > maxk) mir_tstrcpy(substituteStr, _T(""));
+ if (k2 == maxk || k2 > maxk) mir_tstrcpy(substituteStr, L"");
if (mir_tstrlen(substituteStr) > 12)
msg = (TCHAR *)mir_realloc(msg, (mir_tstrlen(msg)+1+mir_tstrlen(substituteStr)-12) * sizeof(TCHAR));
@@ -404,7 +404,7 @@ static TCHAR *GetAwayMessageFormat(int iStatus, const char *szProto) if (flags & STATUS_EMPTY_MSG)
{
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
else if (flags & STATUS_LAST_STATUS_MSG)
{
@@ -424,7 +424,7 @@ static TCHAR *GetAwayMessageFormat(int iStatus, const char *szProto) char *szLastMsg = db_get_sa(NULL, "SimpleStatusMsg", szSetting);
if (szLastMsg == NULL)
- return NULL; //mir_tstrdup(_T(""));
+ return NULL; //mir_tstrdup(L"");
format = db_get_tsa(NULL, "SimpleStatusMsg", szLastMsg);
mir_free(szLastMsg);
@@ -438,7 +438,7 @@ static TCHAR *GetAwayMessageFormat(int iStatus, const char *szProto) format = db_get_tsa(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting));
if (format == NULL)
- format = mir_tstrdup(_T(""));
+ format = mir_tstrdup(L"");
}
else
format = mir_tstrdup(GetDefaultMessage(iStatus));
@@ -527,7 +527,7 @@ static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, //if (flags & PROTO_NO_MSG)
//{
- // format = mir_tstrdup(_T(""));
+ // format = mir_tstrdup(L"");
//}
//else
if (flags & PROTO_THIS_MSG)
@@ -535,7 +535,7 @@ static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, mir_snprintf(szSetting, "Proto%sDefault", szProto);
format = db_get_tsa(NULL, "SimpleStatusMsg", szSetting);
if (format == NULL)
- format = mir_tstrdup(_T(""));
+ format = mir_tstrdup(L"");
}
else if (flags & PROTO_NOCHANGE && szProto)
{
@@ -606,7 +606,7 @@ static void Proto_SetStatus(const char *szProto, int iInitialStatus, int iStatus return;
}
- Proto_SetAwayMsgT(szProto, iStatus, tszMsg /* ? tszMsg : _T("")*/);
+ Proto_SetAwayMsgT(szProto, iStatus, tszMsg /* ? tszMsg : L""*/);
if (iStatus != iInitialStatus)
CallProtoService(szProto, PS_SETSTATUS, iStatus, 0);
}
@@ -639,9 +639,9 @@ int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus }
else
{
- Proto_SetStatus(szProto, iInitialStatus, iStatus, _T(""));
- SaveMessageToDB(szProto, _T(""), TRUE);
- SaveMessageToDB(szProto, _T(""), FALSE);
+ Proto_SetStatus(szProto, iInitialStatus, iStatus, L"");
+ SaveMessageToDB(szProto, L"", TRUE);
+ SaveMessageToDB(szProto, L"", FALSE);
}
return 1;
}
@@ -689,7 +689,7 @@ INT_PTR SetStatusModeFromExtern(WPARAM wParam, LPARAM lParam) SaveMessageToDB(accounts->pa[i]->szModuleName, (TCHAR *)lParam, TRUE);
SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE);
- Proto_SetStatus(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus, msg /*? msg : _T("")*/);
+ Proto_SetStatus(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus, msg /*? msg : L""*/);
mir_free(msg);
}
else
@@ -1177,7 +1177,7 @@ int SetStartupStatus(int i) if (fmsg)
mir_free(fmsg);
- Proto_SetStatus(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus, msg /*? msg : _T("")*/);
+ Proto_SetStatus(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus, msg /*? msg : L""*/);
mir_free(msg);
return 0;
@@ -1580,7 +1580,7 @@ static TCHAR *ParseWinampSong(ARGUMENTSINFO *ai) mir_free(g_ptszWinampSong);
g_ptszWinampSong = mir_tstrdup(ptszWinampTitle);
}
- else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
+ else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, L"SimpleStatusMsg") && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))
ptszWinampTitle = mir_tstrdup(g_ptszWinampSong);
return ptszWinampTitle;
@@ -1705,13 +1705,13 @@ static int OnModulesLoaded(WPARAM, LPARAM) tr.cbSize = sizeof(TOKENREGISTER);
tr.memType = TR_MEM_MIRANDA;
tr.flags = TRF_FREEMEM | TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC;
- tr.tszTokenString = _T("winampsong");
+ tr.tszTokenString = L"winampsong";
tr.parseFunctionT = ParseWinampSong;
tr.szHelpText = LPGEN("External Applications") "\t" LPGEN("retrieves song name of the song currently playing in Winamp (Simple Status Message compatible)");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
if (db_get_b(NULL, "SimpleStatusMsg", "ExclDateToken", 0) != 0) {
- tr.tszTokenString = _T("date");
+ tr.tszTokenString = L"date";
tr.parseFunctionT = ParseDate;
tr.szHelpText = LPGEN("Miranda Related") "\t" LPGEN("get the date (Simple Status Message compatible)");
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr);
@@ -1720,7 +1720,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) g_ptszWinampSong = db_get_tsa(NULL, "SimpleStatusMsg", "AmpLastTitle");
if (g_ptszWinampSong == NULL)
- g_ptszWinampSong = mir_tstrdup(_T("SimpleStatusMsg"));
+ g_ptszWinampSong = mir_tstrdup(L"SimpleStatusMsg");
if (db_get_b(NULL, "SimpleStatusMsg", "UpdateMsgOn", 1))
g_uUpdateMsgTimer = SetTimer(NULL, 0, db_get_w(NULL, "SimpleStatusMsg", "UpdateMsgInt", 10) * 1000, UpdateMsgTimerProc);
@@ -1769,7 +1769,7 @@ static int OnOkToExit(WPARAM, LPARAM) db_set_w(NULL, "SimpleStatusMsg", szSetting, (WORD)CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0));
}
- if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/)
+ if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, L"SimpleStatusMsg") /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/)
DBWriteMessage("AmpLastTitle", g_ptszWinampSong);
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 13b3da336a..c6099f9aef 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -279,7 +279,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) cbei.iSelectedImage = I_ICON_CLEAR; } else { - mir_sntprintf(text, _T("## %s ##"), TranslateT("Clear history")); + mir_sntprintf(text, L"## %s ##", TranslateT("Clear history")); cbei.iIndent = 1; } cbei.iItem = -1; @@ -296,7 +296,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) cbei.iSelectedImage = I_ICON_ADD; } else { - mir_sntprintf(text, _T("## %s ##"), TranslateT("Add to predefined")); + mir_sntprintf(text, L"## %s ##", TranslateT("Add to predefined")); cbei.iIndent = 1; } cbei.pszText = (LPTSTR)text; @@ -311,7 +311,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) } else { cbei.iIndent = 1; - mir_sntprintf(text, _T("## %s ##"), TranslateT("Delete selected")); + mir_sntprintf(text, L"## %s ##", TranslateT("Delete selected")); } cbei.iItem = -1; cbei.pszText = (LPTSTR)text; @@ -436,7 +436,7 @@ VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control) break; case IDM_DELETE: - SetWindowText(edit_control, _T("")); + SetWindowText(edit_control, L""); SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_EDIT1, EN_CHANGE), (LPARAM)edit_control); break; @@ -640,7 +640,7 @@ void ClearHistory(struct MsgBoxData *data, int cur_sel) for (i = 1; i <= data->max_hist_msgs; i++) { mir_snprintf(text, "SMsg%d", i); - db_set_ts(NULL, "SimpleStatusMsg", text, _T("")); + db_set_ts(NULL, "SimpleStatusMsg", text, L""); } db_set_s(NULL, "SimpleStatusMsg", "LastMsg", ""); for (i = 0; i < accounts->count; i++) { @@ -1131,7 +1131,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA db_set_s(NULL, "SimpleStatusMsg", szSetting, ""); mir_snprintf(szSetting, "%sMsg", msgbox_data->m_szProto); - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), _T("")); + db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), L""); } else { db_set_s(NULL, "SimpleStatusMsg", "LastMsg", ""); @@ -1153,10 +1153,10 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA mir_snprintf(szSetting, "%sMsg", accounts->pa[j]->szModuleName); iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), _T("")); + db_set_ts(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), L""); } - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), _T("")); // for compatibility with some plugins + db_set_ts(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), L""); // for compatibility with some plugins } if (bCurrentStatus) @@ -1386,7 +1386,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (LOWORD(histitem.lParam) == HISTORY_MSG) { char szSetting[16]; mir_snprintf(szSetting, "SMsg%d", (int)HIWORD(histitem.lParam)); - db_set_ts(NULL, "SimpleStatusMsg", szSetting, _T("")); + db_set_ts(NULL, "SimpleStatusMsg", szSetting, L""); SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); } if (LOWORD(histitem.lParam) == PREDEFINED_MSG) { @@ -1504,7 +1504,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (LOWORD(histitem.lParam) == HISTORY_MSG) { mir_snprintf(buff, "SMsg%d", (int)HIWORD(histitem.lParam)); - db_set_ts(NULL, "SimpleStatusMsg", buff, _T("")); + db_set_ts(NULL, "SimpleStatusMsg", buff, L""); } else if (LOWORD(histitem.lParam) == PREDEFINED_MSG) msgbox_data->m_bPredefChanged = TRUE; diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp index 22658d55d8..e990901469 100644 --- a/plugins/SimpleStatusMsg/src/options.cpp +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -244,7 +244,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (hIcon != NULL)
SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
else
- SetDlgItemText(hwndDlg, IDC_VARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_VARSHELP, L"V");
if (szTipInfo == NULL)
SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open string formatting help"), 0);
@@ -421,13 +421,13 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (data->proto_msg[i].msg)
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg);
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
}
else
{
if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG)
{
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1);
@@ -447,7 +447,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l else
mir_snprintf(setting, "LastMsg");
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting)
{
@@ -496,7 +496,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l mir_free(tszStatusMsg);
}
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
@@ -543,7 +543,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (data->proto_msg[i].msg)
SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg);
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE);
@@ -577,7 +577,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l {
if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG)
{
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1);
@@ -598,7 +598,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l else
mir_snprintf(setting, "LastMsg");
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
@@ -646,7 +646,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l mir_free(tszStatusMsg);
}
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
@@ -673,7 +673,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (data->status_msg[j].flags[i] & STATUS_EMPTY_MSG)
{
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1);
@@ -693,7 +693,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l else
mir_snprintf(setting, "LastMsg");
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
if (szSetting != NULL)
{
@@ -733,7 +733,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l mir_free(tszStatusMsg);
}
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
@@ -780,7 +780,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l if (LOWORD(wParam) == IDC_ROPTMSG1)
{
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
data->status_msg[j].flags[i] |= STATUS_EMPTY_MSG;
@@ -801,7 +801,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l else
mir_snprintf(setting, "LastMsg");
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
char *szSetting = db_get_sa(NULL, "SimpleStatusMsg", setting);
@@ -844,7 +844,7 @@ INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l mir_free(tszStatusMsg);
}
else
- SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OPTEDIT1, L"");
EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE);
@@ -1235,7 +1235,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w if (!ServiceExists(MS_SS_GETPROFILECOUNT)) {
TCHAR szText[100];
- mir_sntprintf(szText, _T("%s *"), TranslateT("Show status profiles in status list"));
+ mir_sntprintf(szText, L"%s *", TranslateT("Show status profiles in status list"));
SetDlgItemText(hwndDlg, IDC_CPROFILES, szText);
EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_NOTE1), SW_SHOW);
@@ -1330,7 +1330,7 @@ static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM w for (int i = 1; i <= max_hist_msgs; i++) {
char text[8];
mir_snprintf(text, "SMsg%d", i);
- db_set_ts(NULL, "SimpleStatusMsg", text, _T(""));
+ db_set_ts(NULL, "SimpleStatusMsg", text, L"");
}
db_set_s(NULL, "SimpleStatusMsg", "LastMsg", "");
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp index 33e6baa20a..fe36751074 100644 --- a/plugins/SkypeStatusChange/src/main.cpp +++ b/plugins/SkypeStatusChange/src/main.cpp @@ -45,20 +45,20 @@ enum SKYPECONTROLAPI_ATTACH_API_AVAILABLE = 0x8001
};
-LPCTSTR g_pszSkypeWndClassName = _T("SkypeHelperWindow{155198f0-8749-47b7-ac53-58f2ac70844c}");
+LPCTSTR g_pszSkypeWndClassName = L"SkypeHelperWindow{155198f0-8749-47b7-ac53-58f2ac70844c}";
const CMirandaStatus2SkypeStatus g_aStatusCode[10] =
{
- {ID_STATUS_AWAY, "AWAY",_T("Away")},
- {ID_STATUS_NA, "AWAY",_T("Not available")}, // removed in Skype 5
- {ID_STATUS_DND, "DND",_T("Do not disturb")},
- {ID_STATUS_ONLINE, "ONLINE",_T("Online")},
- {ID_STATUS_FREECHAT, "ONLINE",_T("Free for chat")}, // SKYPEME status doesn't work in Skype 4!
- {ID_STATUS_OFFLINE, "OFFLINE",_T("Offline")},
- {ID_STATUS_INVISIBLE, "INVISIBLE",_T("Invisible")},
- {ID_STATUS_OCCUPIED,"DND",_T("Occupied")},
- {ID_STATUS_ONTHEPHONE,"DND",_T("On the phone")},
- {ID_STATUS_OUTTOLUNCH,"DND",_T("Out to lunch")}
+ {ID_STATUS_AWAY, "AWAY",L"Away"},
+ {ID_STATUS_NA, "AWAY",L"Not available"}, // removed in Skype 5
+ {ID_STATUS_DND, "DND",L"Do not disturb"},
+ {ID_STATUS_ONLINE, "ONLINE",L"Online"},
+ {ID_STATUS_FREECHAT, "ONLINE",L"Free for chat"}, // SKYPEME status doesn't work in Skype 4!
+ {ID_STATUS_OFFLINE, "OFFLINE",L"Offline"},
+ {ID_STATUS_INVISIBLE, "INVISIBLE",L"Invisible"},
+ {ID_STATUS_OCCUPIED,"DND",L"Occupied"},
+ {ID_STATUS_ONTHEPHONE,"DND",L"On the phone"},
+ {ID_STATUS_OUTTOLUNCH,"DND",L"Out to lunch"}
};
enum { INVALID_INDEX = 0xFFFFFFFF };
@@ -277,8 +277,8 @@ extern "C" int __declspec(dllexport) Load() {
mir_getLP(&g_pluginInfo);
- g_MsgIDSkypeControlAPIAttach = ::RegisterWindowMessage(_T("SkypeControlAPIAttach"));
- g_MsgIDSkypeControlAPIDiscover = ::RegisterWindowMessage(_T("SkypeControlAPIDiscover"));
+ g_MsgIDSkypeControlAPIAttach = ::RegisterWindowMessage(L"SkypeControlAPIAttach");
+ g_MsgIDSkypeControlAPIDiscover = ::RegisterWindowMessage(L"SkypeControlAPIDiscover");
if ((0 == g_MsgIDSkypeControlAPIAttach) || (0 == g_MsgIDSkypeControlAPIDiscover))
return 1;
@@ -291,7 +291,7 @@ extern "C" int __declspec(dllexport) Load() return 1;
g_wndMainWindow = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
- g_pszSkypeWndClassName, _T(""), WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX,
+ g_pszSkypeWndClassName, L"", WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX,
CW_USEDEFAULT, CW_USEDEFAULT, 128, 128, NULL, 0, g_hModule, 0);
if (g_wndMainWindow == NULL)
return 1;
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index 0a6be1ca46..97480911f6 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -96,7 +96,7 @@ bool SmileyCType::CreateTriggerText(char *text) bool SmileyPackCType::LoadSmileyDir(TCHAR *dir)
{
CMString dirs = dir;
- dirs += _T("\\*.*");
+ dirs += L"\\*.*";
_tfinddata_t c_file;
INT_PTR hFile = _tfindfirst((TCHAR*)dirs.c_str(), &c_file);
@@ -104,7 +104,7 @@ bool SmileyPackCType::LoadSmileyDir(TCHAR *dir) do {
if (c_file.name[0] != '.') {
CMString fullpath = dir;
- fullpath = fullpath + _T("\\") + c_file.name;
+ fullpath = fullpath + L"\\" + c_file.name;
TCHAR *div = _tcsrchr(c_file.name, '.');
if (div) {
*div = 0;
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index fa5d09face..70f5082737 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -113,7 +113,7 @@ public: hSmlButton = CreateWindowEx(
WS_EX_LEFT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST,
MIRANDABUTTONCLASS,
- _T("S"),
+ L"S",
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
rect.left,
rect.top,
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 5c39cc3844..b015c34603 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -158,13 +158,13 @@ void __cdecl SmileyDownloadThread(void*) bool GetSmileyFile(CMString &url, const CMString &packstr)
{
- _TPattern *urlsplit = _TPattern::compile(_T(".*/(.*)"));
+ _TPattern *urlsplit = _TPattern::compile(L".*/(.*)");
_TMatcher *m0 = urlsplit->createTMatcher(url);
m0->findFirstMatch();
CMString filename;
- filename.AppendFormat(_T("%s\\%s\\"), cachepath, packstr.c_str());
+ filename.AppendFormat(L"%s\\%s\\", cachepath, packstr.c_str());
int pathpos = filename.GetLength();
filename += m0->getGroup(1);
@@ -173,7 +173,7 @@ bool GetSmileyFile(CMString &url, const CMString &packstr) bool needext = filename.Find('.') == -1;
if (needext)
- filename += _T(".*");
+ filename += L".*";
_tfinddata_t c_file;
INT_PTR hFile = _tfindfirst((TCHAR*)filename.c_str(), &c_file);
@@ -202,18 +202,18 @@ bool GetSmileyFile(CMString &url, const CMString &packstr) int FolderChanged(WPARAM, LPARAM)
{
- FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, L"");
return 0;
}
void GetSmileyCacheFolder(void)
{
- hFolder = FoldersRegisterCustomPathT(LPGEN("SmileyAdd"), LPGEN("Smiley cache"), MIRANDA_USERDATAT _T("\\SmileyCache"));
+ hFolder = FoldersRegisterCustomPathT(LPGEN("SmileyAdd"), LPGEN("Smiley cache"), MIRANDA_USERDATAT L"\\SmileyCache");
if (hFolder) {
- FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hFolder, cachepath, MAX_PATH, L"");
HookEvent(ME_FOLDERS_PATH_CHANGED, FolderChanged);
}
- else mir_tstrncpy(cachepath, VARST(_T("%miranda_userdata%\\SmileyCache")), MAX_PATH);
+ else mir_tstrncpy(cachepath, VARST(L"%miranda_userdata%\\SmileyCache"), MAX_PATH);
}
void DownloadInit(void)
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index f09ccbb30e..5a6b94ca63 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -38,7 +38,7 @@ int CalculateTextHeight(HDC hdc, CHARFORMAT2 *chf) SelectObject(hcdc, hFont);
SIZE fontSize;
- GetTextExtentPoint32(hcdc, _T(")"), 1, &fontSize);
+ GetTextExtentPoint32(hcdc, L")", 1, &fontSize);
DeleteObject(hFont);
DeleteDC(hcdc);
@@ -61,7 +61,7 @@ HICON GetDefaultIcon(bool copy) const TCHAR* GetImageExt(CMString &fname)
{
- const TCHAR *ext = _T("");
+ const TCHAR *ext = L"";
int fileId = _topen(fname.c_str(), O_RDONLY | _O_BINARY);
if (fileId != -1) {
@@ -70,13 +70,13 @@ const TCHAR* GetImageExt(CMString &fname) int bytes = _read(fileId, buf, sizeof(buf));
if (bytes > 4) {
if (*(unsigned short*)buf == 0xd8ff)
- ext = _T("jpg");
+ ext = L"jpg";
else if (*(unsigned short*)buf == 0x4d42)
- ext = _T("bmp");
+ ext = L"bmp";
else if (*(unsigned*)buf == 0x474e5089)
- ext = _T("png");
+ ext = L"png";
else if (*(unsigned*)buf == 0x38464947)
- ext = _T("gif");
+ ext = L"gif";
}
_close(fileId);
}
@@ -186,8 +186,8 @@ bool InitGdiPlus(void) {
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
- static const TCHAR errmsg[] = _T("GDI+ not installed.\n")
- _T("GDI+ can be downloaded here: http://www.microsoft.com/downloads");
+ static const TCHAR errmsg[] = L"GDI+ not installed.\n"
+ L"GDI+ can be downloaded here: http://www.microsoft.com/downloads";
__try {
if (g_gdiplusToken == 0 && !gdiPlusFail)
@@ -229,7 +229,7 @@ bool IsSmileyProto(char *proto) void ReportError(const TCHAR *errmsg)
{
- static const TCHAR title[] = _T("Miranda SmileyAdd");
+ static const TCHAR title[] = L"Miranda SmileyAdd";
POPUPDATAT pd = { 0 };
mir_tstrcpy(pd.lpwzContactName, title);
diff --git a/plugins/SmileyAdd/src/imagecache.cpp b/plugins/SmileyAdd/src/imagecache.cpp index 755c2b8165..1592a858fc 100644 --- a/plugins/SmileyAdd/src/imagecache.cpp +++ b/plugins/SmileyAdd/src/imagecache.cpp @@ -527,7 +527,7 @@ void DestroyImageCache(void) ImageBase* AddCacheImage(const CMString &file, int index)
{
- CMString tmpfile(file); tmpfile.AppendFormat(_T("#%d"), index);
+ CMString tmpfile(file); tmpfile.AppendFormat(L"#%d", index);
unsigned id = mir_hash(tmpfile.c_str(), tmpfile.GetLength() * sizeof(TCHAR));
WaitForSingleObject(g_hMutexIm, 3000);
@@ -541,15 +541,15 @@ ImageBase* AddCacheImage(const CMString &file, int index) CMString ext = file.Mid(ind + 1);
ext.MakeLower();
- if (ext == _T("dll") || ext == _T("exe"))
+ if (ext == L"dll" || ext == L"exe")
img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoDll) : (ImageBase*)new IconType(id, file, index, icoDll);
- else if (ext == _T("ico"))
+ else if (ext == L"ico")
img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, 0, icoFile) : (ImageBase*)new IconType(id, file, 0, icoFile);
- else if (ext == _T("icl"))
+ else if (ext == L"icl")
img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoIcl) : (ImageBase*)new IconType(id, file, index, icoIcl);
- else if (ext == _T("gif"))
+ else if (ext == L"gif")
img = new ImageType(id, file, NULL);
- else if (fei == NULL || ext == _T("tif") || ext == _T("tiff"))
+ else if (fei == NULL || ext == L"tif" || ext == L"tiff")
img = new ImageType(id, file, NULL);
else
img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, NULL) : (ImageBase*)new ImageFType(id, file);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index e2cf526a9f..86264d591a 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -286,7 +286,7 @@ void OptionsDialogType::UpdateVisibleSmPackList(void) bool visible = useOne ? !smc[i].IsProto() : visiblecat;
if (!visible && smc[i].IsAcc() && !useOne) {
- CMString PhysProtoName = _T("AllProto");
+ CMString PhysProtoName = L"AllProto";
CMString ProtoName = smc[i].GetName();
DBVARIANT dbv;
if (db_get_ts(NULL, _T2A(ProtoName.GetBuffer()), "AM_BaseProto", &dbv) == 0) {
@@ -463,14 +463,14 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) {
OPENFILENAME ofn = { 0 };
- TCHAR filename[MAX_PATH] = _T("");
+ TCHAR filename[MAX_PATH] = L"";
ofn.lpstrFile = filename;
ofn.nMaxFile = _countof(filename);
CMString inidir;
SmileyCategoryType *smc = tmpsmcat.GetSmileyCategory(item);
if (smc->GetFilename().IsEmpty())
- pathToAbsolute(_T("Smileys"), inidir);
+ pathToAbsolute(L"Smileys", inidir);
else {
pathToAbsolute(smc->GetFilename(), inidir);
inidir.Truncate(inidir.ReverseFind('\\'));
@@ -482,21 +482,21 @@ bool OptionsDialogType::BrowseForSmileyPacks(int item) TCHAR filter[512], *pfilter;
mir_tstrcpy(filter, TranslateT("Smiley packs"));
- mir_tstrcat(filter, _T(" (*.msl;*.asl;*.xep)"));
+ mir_tstrcat(filter, L" (*.msl;*.asl;*.xep)");
pfilter = filter + mir_tstrlen(filter) + 1;
- mir_tstrcpy(pfilter, _T("*.msl;*.asl;*.xep"));
+ mir_tstrcpy(pfilter, L"*.msl;*.asl;*.xep");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
mir_tstrcpy(pfilter, TranslateT("All files"));
- mir_tstrcat(pfilter, _T(" (*.*)"));
+ mir_tstrcat(pfilter, L" (*.*)");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, _T("*.*"));
+ mir_tstrcpy(pfilter, L"*.*");
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_READONLY |
OFN_EXPLORER | OFN_LONGNAMES | OFN_NOCHANGEDIR;
- ofn.lpstrDefExt = _T("msl");
+ ofn.lpstrDefExt = L"msl";
if (GetOpenFileName(&ofn)) {
CMString relpath;
@@ -590,7 +590,7 @@ void OptionsType::Load(void) void OptionsType::ReadPackFileName(CMString &filename, const CMString &name, const CMString &defaultFilename)
{
- CMString settingKey = name + _T("-filename");
+ CMString settingKey = name + L"-filename";
ptrT tszValue(db_get_tsa(NULL, "SmileyAdd", _T2A(settingKey.c_str())));
filename = (tszValue != NULL) ? (TCHAR*)tszValue : defaultFilename;
@@ -598,7 +598,7 @@ void OptionsType::ReadPackFileName(CMString &filename, const CMString &name, con void OptionsType::WritePackFileName(const CMString &filename, const CMString &name)
{
- CMString settingKey = name + _T("-filename");
+ CMString settingKey = name + L"-filename";
db_set_ts(NULL, "SmileyAdd", _T2A(settingKey.c_str()), filename.c_str());
}
diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index 7354488309..9e994418ea 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -109,7 +109,7 @@ static void SetTooltip(long x, long y, HWND hwnd, RichEditData *rdt) if (needtip != -1) {
if (rdt->tipActive == -1) {
- rdt->hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), TTS_NOPREFIX | WS_POPUP,
+ rdt->hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", TTS_NOPREFIX | WS_POPUP,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, NULL, g_hInst, NULL);
SendMessage(rdt->hToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti);
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index a8a8a20ee5..c0d453624c 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -36,7 +36,7 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT CMString categoryName;
if (hContact != NULL) {
opt.ReadContactCategory(hContact, categoryName);
- if (categoryName == _T("<None>")) return NULL;
+ if (categoryName == L"<None>") return NULL;
if (!categoryName.IsEmpty() && g_SmileyCategories.GetSmileyCategory(categoryName) == NULL) {
categoryName.Empty();
opt.WriteContactCategory(hContact, categoryName);
@@ -51,10 +51,10 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT db_free(&dbv);
}
else if (opt.UsePhysProto && db_get_ts(NULL, protonam, "AM_BaseProto", &dbv) == 0) {
- categoryName = _T("AllProto");
+ categoryName = L"AllProto";
categoryName += dbv.ptszVal;
db_free(&dbv);
- CMString categoryFileName = g_SmileyCategories.GetSmileyCategory(categoryName) ? g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename() : _T("");
+ CMString categoryFileName = g_SmileyCategories.GetSmileyCategory(categoryName) ? g_SmileyCategories.GetSmileyCategory(categoryName)->GetFilename() : L"";
if (categoryFileName.IsEmpty())
categoryName = _A2T(protonam);
}
@@ -66,13 +66,13 @@ SmileyPackType* GetSmileyPack(const char *proto, MCONTACT hContact, SmileyPackCT if (categoryName.IsEmpty()) {
if (proto == NULL || proto[0] == 0)
- categoryName = _T("Standard");
+ categoryName = L"Standard";
else {
categoryName = _A2T(proto);
if (opt.UseOneForAll) {
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName);
if (smc == NULL || smc->IsProto())
- categoryName = _T("Standard");
+ categoryName = L"Standard";
}
}
}
@@ -250,7 +250,7 @@ INT_PTR CustomCatMenu(WPARAM hContact, LPARAM lParam) opt.WriteContactCategory(hContact, smct->GetName());
else {
CMString empty;
- if (lParam == 1) empty = _T("<None>");
+ if (lParam == 1) empty = L"<None>";
opt.WriteContactCategory(hContact, empty);
}
NotifyEventHooks(hEvent1, hContact, 0);
@@ -315,8 +315,8 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) }
mi.position = 1;
- mi.name.t = _T("<None>");
- if (cat == _T("<None>")) {
+ mi.name.t = L"<None>";
+ if (cat == L"<None>") {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
}
@@ -382,7 +382,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) switch (wParam) {
case PRAC_ADDED:
if (acc != NULL) {
- CMString catname(_T("Standard"));
+ CMString catname(L"Standard");
const CMString &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
@@ -406,7 +406,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) case PRAC_CHECKED:
if (acc != NULL) {
if (acc->bIsEnabled) {
- CMString catname(_T("Standard"));
+ CMString catname(L"Standard");
const CMString &defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename();
g_SmileyCategories.AddAccountAsCategory(acc, defaultFile);
}
@@ -427,7 +427,7 @@ int DbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
if (strcmp(cws->szSetting, "Transport") == 0) {
- CMString catname(_T("Standard"));
+ CMString catname(L"Standard");
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname);
if (smc != NULL)
g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename());
diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp index 554ca0e492..d71a91fed0 100644 --- a/plugins/SmileyAdd/src/smileyroutines.cpp +++ b/plugins/SmileyAdd/src/smileyroutines.cpp @@ -223,7 +223,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType *smp, SmileyPackCType *smcp, const TCHAR classname[20];
GetClassName(hwnd, classname, _countof(classname));
- bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0) || fireView;
+ bool ishpp = (_tcsncmp(classname, L"THppRichEdit", 12) == 0) || fireView;
SetRichCallback(hwnd, NULL, false, true);
@@ -261,7 +261,7 @@ void ReplaceSmileys(HWND hwnd, SmileyPackType *smp, SmileyPackCType *smcp, const unsigned numBTBSm = 0;
- BSTR spaceb = SysAllocString(_T(" "));
+ BSTR spaceb = SysAllocString(L" ");
// Replace smileys specified in the list in RichEdit
for (int j = smllist.getCount()-1; j >= 0; j--) {
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 716b74572c..97c63f00a5 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -35,7 +35,7 @@ static void CALLBACK timerProc(HWND, UINT, UINT_PTR param, DWORD) static void CALLBACK sttStartTimer(PVOID obj)
{
if (hwndHidden == NULL)
- hwndHidden = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
+ hwndHidden = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SmileyType *pType = (SmileyType*)obj;
pType->SetFrameDelay();
@@ -212,7 +212,7 @@ static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const TCHAR *param) {
if (param == NULL)
return 0;
- if (mir_tstrcmpi(_T("hContact"), param) == 0)
+ if (mir_tstrcmpi(L"hContact", param) == 0)
return hContact;
if (_istdigit(*param))
return _ttoi(param);
@@ -222,7 +222,7 @@ static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const TCHAR *param) void SmileyType::CallSmileyService(MCONTACT hContact)
{
- _TPattern *srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)"));
+ _TPattern *srvsplit = _TPattern::compile(L"(.*)\\|(.*)\\|(.*)");
_TMatcher *m0 = srvsplit->createTMatcher(GetTriggerText());
m0->findFirstMatch();
@@ -254,13 +254,13 @@ SmileyPackType::~SmileyPackType() }
static const TCHAR urlRegEx[] =
-_T("(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*");
-static const TCHAR pathRegEx[] = _T("[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*");
-static const TCHAR timeRegEx[] = _T("\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}");
+L"(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*";
+static const TCHAR pathRegEx[] = L"[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*";
+static const TCHAR timeRegEx[] = L"\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}";
void SmileyPackType::AddTriggersToSmileyLookup(void)
{
- _TPattern *p = _TPattern::compile(_T("\\s+"));
+ _TPattern *p = _TPattern::compile(L"\\s+");
{
CMString emptystr;
m_SmileyLookup.insert(new SmileyLookup(urlRegEx, true, -1, emptystr));
@@ -322,8 +322,8 @@ void SmileyPackType::AddTriggersToSmileyLookup(void) void SmileyPackType::ReplaceAllSpecials(const CMString &Input, CMString &Output)
{
- Output = _TPattern::replace(_T("%%_{1,2}%%"), Input, _T(" "));
- Output = _TPattern::replace(_T("%%''%%"), Output, _T("\""));
+ Output = _TPattern::replace(L"%%_{1,2}%%", Input, L" ");
+ Output = _TPattern::replace(L"%%''%%", Output, L"\"");
}
void SmileyPackType::Clear(void)
@@ -346,7 +346,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa Clear();
if (filename.IsEmpty()) {
- m_Name = _T("Nothing loaded");
+ m_Name = L"Nothing loaded";
return false;
}
@@ -363,7 +363,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa ReportError(msgtxt);
}
- m_Name = _T("Nothing loaded");
+ m_Name = L"Nothing loaded";
return false;
}
@@ -394,7 +394,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString &filename, const CMString &pa delete[] buf;
bool res;
- if (filename.Find(_T(".xep")) == -1)
+ if (filename.Find(L".xep") == -1)
res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath);
else
res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath);
@@ -409,7 +409,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & {
CMString pathstr, packstr;
{
- _TPattern *pathsplit = _TPattern::compile(_T("(.*\\\\)(.*)\\.|$"));
+ _TPattern *pathsplit = _TPattern::compile(L"(.*\\\\)(.*)\\.|$");
_TMatcher *m0 = pathsplit->createTMatcher(modpath);
m0->findFirstMatch();
pathstr = m0->getGroup(1);
@@ -419,16 +419,16 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & }
{
_TPattern *otherf = _TPattern::compile(
- _T("^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\""),
+ L"^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\"",
_TPattern::MULTILINE_MATCHING);
_TMatcher *m0 = otherf->createTMatcher(tbuf);
while (m0->findNextMatch()) {
- if (m0->getGroup(1) == _T("Name")) m_Name = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Author")) m_Author = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Date")) m_Date = m0->getGroup(2);
- if (m0->getGroup(1) == _T("Version")) m_Version = m0->getGroup(2);
- if (m0->getGroup(1) == _T("ButtonSmiley")) m_ButtonSmiley = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Name") m_Name = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Author") m_Author = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Date") m_Date = m0->getGroup(2);
+ if (m0->getGroup(1) == L"Version") m_Version = m0->getGroup(2);
+ if (m0->getGroup(1) == L"ButtonSmiley") m_ButtonSmiley = m0->getGroup(2);
}
delete m0;
delete otherf;
@@ -438,7 +438,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & selec.x = selec.y = win.x = win.y = 0;
{
_TPattern *pat = _TPattern::compile(
- _T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"),
+ L"^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)",
_TPattern::MULTILINE_MATCHING);
_TMatcher *m0 = pat->createTMatcher(tbuf);
while (m0->findNextMatch()) {
@@ -446,9 +446,9 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & tpt.x = _ttol(m0->getGroup(2).c_str());
tpt.y = _ttol(m0->getGroup(3).c_str());
- if (m0->getGroup(1) == _T("Selection"))
+ if (m0->getGroup(1) == L"Selection")
selec = tpt;
- else if (m0->getGroup(1) == _T("Window"))
+ else if (m0->getGroup(1) == L"Window")
win = tpt;
}
delete m0;
@@ -456,12 +456,12 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & }
_TPattern *smiley = _TPattern::compile(
- _T("^\\s*Smiley(\\*)?\\s*=") // Is Hidden
- _T("(?:\\s*\"(.*)\")") // Smiley file name
- _T("(?:[\\s,]+(\\-?\\d+))") // Icon resource id
- _T("(?:[\\s,]+(R|S)?\"(.*?)\")") // Trigger text
- _T("(?:[\\s,]+\"(.*?)\")?") // Tooltip or insert text
- _T("(?:[\\s,]+\"(.*?)\")?"), // Tooltip text
+ L"^\\s*Smiley(\\*)?\\s*=" // Is Hidden
+ L"(?:\\s*\"(.*)\")" // Smiley file name
+ L"(?:[\\s,]+(\\-?\\d+))" // Icon resource id
+ L"(?:[\\s,]+(R|S)?\"(.*?)\")" // Trigger text
+ L"(?:[\\s,]+\"(.*?)\"?)" // Tooltip or insert text
+ L"(?:[\\s,]+\"(.*?)\"?)", // Tooltip text
_TPattern::MULTILINE_MATCHING);
SmileyVectorType hiddenSmileys;
@@ -470,7 +470,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & _TMatcher *m0 = smiley->createTMatcher(tbuf);
while (m0->findNextMatch()) {
CMString resname = m0->getGroup(2);
- if (resname.Find(_T("http://")) != -1) {
+ if (resname.Find(L"http://") != -1) {
if (GetSmileyFile(resname, packstr))
continue;
}
@@ -483,8 +483,8 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & dat->SetHidden(m0->getStartingIndex(1) >= 0);
if (m0->getStartingIndex(4) >= 0) {
- dat->SetRegEx(m0->getGroup(4) == _T("R"));
- dat->SetService(m0->getGroup(4) == _T("S"));
+ dat->SetRegEx(m0->getGroup(4) == L"R");
+ dat->SetService(m0->getGroup(4) == L"S");
}
dat->m_TriggerText = m0->getGroup(5);
if (dat->IsRegEx()) {
@@ -543,8 +543,8 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString &tbuf, bool onlyInfo, CMString & static void DecodeHTML(CMString &str)
{
if (str.Find('&') != -1) {
- str = _TPattern::replace(CMString(_T("<")), str, CMString(_T("<")));
- str = _TPattern::replace(CMString(_T(">")), str, CMString(_T(">")));
+ str = _TPattern::replace(CMString(L"<"), str, CMString(L"<"));
+ str = _TPattern::replace(CMString(L">"), str, CMString(L">"));
}
}
@@ -575,11 +575,11 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&) {
_TMatcher *m0, *m1, *m2;
- _TPattern *dbname_re = _TPattern::compile(_T("<DataBaseName>\\s*\"(.*?)\"\\s*</DataBaseName>"),
+ _TPattern *dbname_re = _TPattern::compile(L"<DataBaseName>\\s*\"(.*?)\"\\s*</DataBaseName>",
_TPattern::MULTILINE_MATCHING);
- _TPattern *author_re = _TPattern::compile(_T("<PackageAuthor>\\s*\"(.*?)\"\\s*</PackageAuthor>"),
+ _TPattern *author_re = _TPattern::compile(L"<PackageAuthor>\\s*\"(.*?)\"\\s*</PackageAuthor>",
_TPattern::MULTILINE_MATCHING);
- _TPattern *settings_re = _TPattern::compile(_T("<settings>(.*?)</settings>"),
+ _TPattern *settings_re = _TPattern::compile(L"<settings>(.*?)</settings>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
m0 = settings_re->createTMatcher(tbuf);
@@ -607,17 +607,17 @@ bool SmileyPackType::LoadSmileyFileXEP(CMString &tbuf, bool onlyInfo, CMString&) delete settings_re;
if (!onlyInfo) {
- _TPattern *record_re = _TPattern::compile(_T("<record.*?ImageIndex=\"(.*?)\".*?>(?:\\s*\"(.*?)\")?(.*?)</record>"),
+ _TPattern *record_re = _TPattern::compile(L"<record.*?ImageIndex=\"(.*?)\".*?>(?:\\s*\"(.*?)\"?(.*?)</record>)",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern *expression_re = _TPattern::compile(_T("<Expression>\\s*\"(.*?)\"\\s*</Expression>"),
+ _TPattern *expression_re = _TPattern::compile(L"<Expression>\\s*\"(.*?)\"\\s*</Expression>",
_TPattern::MULTILINE_MATCHING);
- _TPattern *pastetext_re = _TPattern::compile(_T("<PasteText>\\s*\"(.*?)\"\\s*</PasteText>"),
+ _TPattern *pastetext_re = _TPattern::compile(L"<PasteText>\\s*\"(.*?)\"\\s*</PasteText>",
_TPattern::MULTILINE_MATCHING);
- _TPattern *images_re = _TPattern::compile(_T("<images>(.*?)</images>"),
+ _TPattern *images_re = _TPattern::compile(L"<images>(.*?)</images>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern *image_re = _TPattern::compile(_T("<Image>(.*?)</Image>"),
+ _TPattern *image_re = _TPattern::compile(L"<Image>(.*?)</Image>",
_TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL);
- _TPattern *imagedt_re = _TPattern::compile(_T("<!\\[CDATA\\[(.*?)\\]\\]>"),
+ _TPattern *imagedt_re = _TPattern::compile(L"<!\\[CDATA\\[(.*?)\\]\\]>",
_TPattern::MULTILINE_MATCHING);
m0 = images_re->createTMatcher(tbuf);
@@ -875,13 +875,13 @@ void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStr DBVARIANT dbv;
if (db_get_ts(NULL, acc->szModuleName, "AM_BaseProto", &dbv) == 0) {
- PhysProtoName = _T("AllProto");
+ PhysProtoName = L"AllProto";
PhysProtoName += dbv.ptszVal;
db_free(&dbv);
}
if (!PhysProtoName.IsEmpty())
- paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName) ? g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename() : _T("");
+ paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName) ? g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename() : L"";
if (paths.IsEmpty()) {
const char *packnam = acc->szProtoName;
@@ -1009,7 +1009,7 @@ void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, co void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
{
CMString displayName = TranslateT("Standard");
- CMString tname = _T("Standard");
+ CMString tname = L"Standard";
AddCategory(tname, displayName, smcStd);
const CMString &defaultFile = GetSmileyCategory(tname)->GetFilename();
@@ -1059,7 +1059,7 @@ SmileyLookup::SmileyLookup(const CMString &str, const bool regexs, const int ind m_ind = ind;
if (regexs) {
- static const CMString testString(_T("Test String"));
+ static const CMString testString(L"Test String");
m_pattern = _TPattern::compile(str);
m_valid = m_pattern != NULL;
if (m_valid) {
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h index e61cd50920..765480e123 100644 --- a/plugins/SmileyAdd/src/smileys.h +++ b/plugins/SmileyAdd/src/smileys.h @@ -306,7 +306,7 @@ public: int NumberOfSmileyCategories(void) { return m_SmileyCategories.getCount(); }
void AddCategory(const CMString& name, const CMString& displayName, SmcType typ,
- const CMString& defaultFilename = CMString(_T("Smileys\\nova\\default.msl")));
+ const CMString& defaultFilename = CMString(L"Smileys\\nova\\default.msl"));
void AddAndLoad(const CMString& name, const CMString& displayName);
void AddAllProtocolsAsCategory(void);
void AddAccountAsCategory(PROTOACCOUNT *acc, const CMString& defaultFile);
diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp index c310abdbd6..d427c47644 100644 --- a/plugins/SmileyAdd/src/smltool.cpp +++ b/plugins/SmileyAdd/src/smltool.cpp @@ -525,7 +525,7 @@ void SmileyToolWindowType::InitDialog(LPARAM lParam) if (opt.AnimateSel) SetTimer(m_hwndDialog, 1, 100, NULL);
//add tooltips
- m_hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""),
+ m_hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"",
TTS_NOPREFIX | WS_POPUP, 0, 0, 0, 0, m_hwndDialog, NULL, g_hInst, NULL);
TOOLINFO ti = { 0 };
ti.cbSize = sizeof(ti);
@@ -728,11 +728,11 @@ void __cdecl SmileyToolThread(void *arg) wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = CreateSolidBrush(opt.SelWndBkgClr);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T("SmileyTool");
+ wndclass.lpszClassName = L"SmileyTool";
wndclass.hIconSm = NULL;
RegisterClassEx(&wndclass);
- CreateWindowEx(WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY, _T("SmileyTool"), NULL,
+ CreateWindowEx(WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY, L"SmileyTool", NULL,
WS_BORDER | WS_POPUP | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
((SmileyToolWindowParam*)arg)->hWndParent, NULL, g_hInst, arg);
@@ -744,7 +744,7 @@ void __cdecl SmileyToolThread(void *arg) TranslateMessage(&msg);
DispatchMessage(&msg);
}
- UnregisterClass(_T("SmileyTool"), g_hInst);
+ UnregisterClass(L"SmileyTool", g_hInst);
}
delete stwp;
}
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 6c65d556c4..5bf7c8a4d6 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -129,8 +129,8 @@ INT_PTR CALLBACK DlgProcOptionsMain(HWND optDlg, UINT msg, WPARAM wParam, LPARAM for (i = 0, j = 0; i < numProtocols; i++)
{
lvi.iItem = i;
- _getMOptS(pName, 200*sizeof(TCHAR), pd[i]->szModuleName, "AM_BaseProto", _T(""));
- if (mir_tstrcmp(pName, _T("ICQ")) != 0)
+ _getMOptS(pName, 200*sizeof(TCHAR), pd[i]->szModuleName, "AM_BaseProto", L"");
+ if (mir_tstrcmp(pName, L"ICQ") != 0)
continue;
lvi.pszText = mir_a2u(pd[i]->szModuleName);
ListView_InsertItem(hProtocolsList, &lvi);
@@ -332,7 +332,7 @@ INT_PTR CALLBACK DlgProcOptionsQuestion(HWND optDlg, UINT msg, WPARAM wParam, LP return FALSE;
break;
case IDC_DEFAULTS:
- SetDlgItemText(optDlg, IDC_STATIC_MODEMSG, _T(""));
+ SetDlgItemText(optDlg, IDC_STATIC_MODEMSG, L"");
ShowWindow(GetDlgItem(optDlg, IDC_OPT_MATH_RESPONSE), 0);
ShowWindow(GetDlgItem(optDlg, IDC_OPT_RESPONSE), 1);
EnableWindow(GetDlgItem(optDlg, IDC_OPT_RESPONSE), TRUE);
@@ -436,17 +436,17 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA EnableControlsBayes(optDlg, bEnabled);
- mir_sntprintf(buf, _T("%0.02f"), (double)_getOptD("BayesSpamScore", defaultBayesSpamScore)*SCORE_C);
+ mir_sntprintf(buf, L"%0.02f", (double)_getOptD("BayesSpamScore", defaultBayesSpamScore)*SCORE_C);
SetDlgItemText(optDlg, IDC_OPT_BAYES_SPAM_SCORE, buf);
- mir_sntprintf(buf, _T("%.02f"), (double)_getOptD("BayesHamScore", defaultBayesHamScore)*SCORE_C);
+ mir_sntprintf(buf, L"%.02f", (double)_getOptD("BayesHamScore", defaultBayesHamScore)*SCORE_C);
SetDlgItemText(optDlg, IDC_OPT_BAYES_HAM_SCORE, buf);
- mir_sntprintf(buf, _T("%d"), _getOptD("BayesWaitApprove", defaultBayesWaitApprove));
+ mir_sntprintf(buf, L"%d", _getOptD("BayesWaitApprove", defaultBayesWaitApprove));
SetDlgItemText(optDlg, IDC_OPT_BAYES_WAIT_APPROVE, buf);
if (bEnabled) {
- mir_sntprintf(buf, _T("%d"), get_msg_count(SPAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(SPAM));
SetDlgItemText(optDlg, IDC_STATIC_SPAM_COUNT, buf);
- mir_sntprintf(buf, _T("%d"), get_msg_count(HAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(HAM));
SetDlgItemText(optDlg, IDC_STATIC_HAM_COUNT, buf);
}
@@ -487,12 +487,12 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA return FALSE;
GetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, dbuf, len);
learn_ham(dbuf);
- SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, _T(""));
+ SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, L"");
free(dbuf);
- mir_sntprintf(buf, _T("%d"), get_msg_count(SPAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(SPAM));
SetDlgItemText(optDlg, IDC_STATIC_SPAM_COUNT, buf);
- mir_sntprintf(buf, _T("%d"), get_msg_count(HAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(HAM));
SetDlgItemText(optDlg, IDC_STATIC_HAM_COUNT, buf);
return FALSE;
@@ -504,12 +504,12 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA return FALSE;
GetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, dbuf, len);
learn_spam(dbuf);
- SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, _T(""));
+ SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, L"");
free(dbuf);
- mir_sntprintf(buf, _T("%d"), get_msg_count(SPAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(SPAM));
SetDlgItemText(optDlg, IDC_STATIC_SPAM_COUNT, buf);
- mir_sntprintf(buf, _T("%d"), get_msg_count(HAM));
+ mir_sntprintf(buf, L"%d", get_msg_count(HAM));
SetDlgItemText(optDlg, IDC_STATIC_HAM_COUNT, buf);
return FALSE;
@@ -520,7 +520,7 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA return FALSE;
GetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, dbuf, len);
mir_snprintf(cbuf, "%0.04f", get_msg_score(dbuf));
- SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, _T(""));
+ SetDlgItemText(optDlg, IDC_OPT_BAYES_LEARNBOX, L"");
MessageBoxA(NULL, cbuf, Translate("Message score"), MB_OK);
free(dbuf);
return FALSE;
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index c007f71d43..dceac13a6e 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -239,7 +239,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) if (_dbei != NULL) {
memcpy(&_dbei->cbBlob, _dbv.pbVal, sizeof(DWORD));
_dbei->eventType = EVENTTYPE_AUTHREQUEST;
- _getCOptS(AuthEventModule, 100, hContact, "AuthEventModule", _T("ICQ"));
+ _getCOptS(AuthEventModule, 100, hContact, "AuthEventModule", L"ICQ");
szAuthEventModule = mir_u2a(AuthEventModule);
_dbei->szModule = szAuthEventModule;
_dbei->timestamp = dbei->timestamp;
@@ -290,7 +290,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // Completely reject if duplicate incoming message found
if (_getOptD("MaxSameMsgCountPerDay", defaultMaxSameMsgCountPerDay) > 0 &&
_getCOptD(hContact, "SameMsgCount", 0) >= _getOptD("MaxSameMsgCountPerDay", defaultMaxSameMsgCountPerDay) &&
- mir_tstrcmp(message, _getCOptS(buf, buflen, hContact, "LastInMsg", _T(""))) == 0) {
+ mir_tstrcmp(message, _getCOptS(buf, buflen, hContact, "LastInMsg", L"")) == 0) {
_notify(hContact, POPUP_BLOCKED, TranslateT("Message from %s rejected because it reached a maximum for same responses per day."), message);
if (bayesEnabled)
queue_message(hContact, dbei->timestamp, message);
@@ -388,12 +388,12 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) case SPAMOTRON_MODE_MATH:
a = (rand() % 10) + 1;
b = (rand() % 10) + 1;
- mir_sntprintf(mexpr, _T("%d + %d"), a, b);
+ mir_sntprintf(mexpr, L"%d + %d", a, b);
if (dbei->eventType == EVENTTYPE_AUTHREQUEST)
_getOptS(challengeW, maxmsglen, "AuthChallengeMath", defaultAuthChallengeMath);
else
_getOptS(challengeW, maxmsglen, "ChallengeMath", defaultChallengeMath);
- ReplaceVar(challengeW, maxmsglen, _T("%mathexpr%"), mexpr);
+ ReplaceVar(challengeW, maxmsglen, L"%mathexpr%", mexpr);
_setCOptD(hContact, "ResponseMath", a + b);
ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(challengeW));
_notify(hContact, POPUP_CHALLENGE, TranslateT("Sending math expression challenge to %s."), message);
@@ -423,7 +423,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // Save Last Msg and update SameMsgCount
if (message != NULL) {
- if (mir_tstrcmp(_getCOptS(buf, buflen, hContact, "LastInMsg", _T("")), message) == 0)
+ if (mir_tstrcmp(_getCOptS(buf, buflen, hContact, "LastInMsg", L""), message) == 0)
_setCOptD(hContact, "SameMsgCount", 1+_getCOptD(hContact, "SameMsgCount", 0));
else
_setCOptD(hContact, "SameMsgCount", 1);
diff --git a/plugins/Spamotron/src/stdafx.h b/plugins/Spamotron/src/stdafx.h index 5e438adadd..2d584589ba 100644 --- a/plugins/Spamotron/src/stdafx.h +++ b/plugins/Spamotron/src/stdafx.h @@ -49,7 +49,7 @@ TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, MCONTACT hContact, const char* #define defaultMode SPAMOTRON_MODE_PLAIN
#define defaultChallenge TranslateT("Spam-o-tron needs to verify you're not a bot. Reply with \"%response%\" without quotes.")
#define defaultChallengeMath TranslateT("Spam-o-tron needs to verify you're not a bot. Reply with a result of expression %mathexpr%.")
-#define defaultResponse _T("no-spam")
+#define defaultResponse L"no-spam"
#define defaultResponseCC TRUE
#define defaultSuccessResponse TranslateT("Verified.")
#define defaultAuthChallenge TranslateT("Spam-o-tron delayed authorization request. First reply with \"%response%\" without quotes.")
@@ -67,8 +67,8 @@ TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, MCONTACT hContact, const char* #define defaultNotifyPopup FALSE
#define defaultDontReplySameMsg TRUE
#define defaultDontReplyMsg TRUE
-#define defaultApproveOnMsgInWordlist _T("")
-#define defaultDontReplyMsgWordlist _T("Spam-o-tron, StopSpam, Anti-Spam")
+#define defaultApproveOnMsgInWordlist L""
+#define defaultDontReplyMsgWordlist L"Spam-o-tron, StopSpam, Anti-Spam"
#define defaultMaxMsgContactCountPerDay 3
#define defaultMaxSameMsgCountPerDay 2
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 20d0b0bd2e..7a9bf2fe3e 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -31,7 +31,7 @@ BOOL _isregex(TCHAR* strSearch) const char *error; int erroroffs, rc; TCHAR *regex; - TCHAR regex_parse[] = _T("/(.*)/([igsm]*)"); + TCHAR regex_parse[] = L"/(.*)/([igsm]*)"; int ovector[9]; if (strSearch == NULL) @@ -60,7 +60,7 @@ BOOL _isvalidregex(TCHAR* strSearch) int erroroffs, rc; TCHAR *regex, *regexp, *mod; int opts = 0; - TCHAR regex_parse[] = _T("/(.*)/([igsm]*)"); + TCHAR regex_parse[] = L"/(.*)/([igsm]*)"; int ovector[9]; if (strSearch == NULL) @@ -82,11 +82,11 @@ BOOL _isvalidregex(TCHAR* strSearch) mod = regex + ovector[4]; mod[ovector[5] - ovector[4]] = 0; - if (_tcsstr(mod, _T("i"))) + if (_tcsstr(mod, L"i")) opts |= PCRE_CASELESS; - if (_tcsstr(mod, _T("m"))) + if (_tcsstr(mod, L"m")) opts |= PCRE_MULTILINE; - if (_tcsstr(mod, _T("s"))) + if (_tcsstr(mod, L"s")) opts |= PCRE_DOTALL; re = pcre16_compile(regexp, opts, &error, &erroroffs, NULL); @@ -108,7 +108,7 @@ BOOL _regmatch(TCHAR* str, TCHAR* strSearch) int erroroffs, rc; TCHAR *regex, *regexp, *data = NULL, *mod; int opts = 0; - TCHAR regex_parse[] = _T("^/(.*)/([igsm]*)"); + TCHAR regex_parse[] = L"^/(.*)/([igsm]*)"; int ovector[9]; if (str == NULL || strSearch == NULL) @@ -133,11 +133,11 @@ BOOL _regmatch(TCHAR* str, TCHAR* strSearch) data = mir_tstrdup(str); if (data == NULL) goto err_out; - if (_tcsstr(mod, _T("i"))) + if (_tcsstr(mod, L"i")) opts |= PCRE_CASELESS; - if (_tcsstr(mod, _T("m"))) + if (_tcsstr(mod, L"m")) opts |= PCRE_MULTILINE; - if (_tcsstr(mod, _T("s"))) + if (_tcsstr(mod, L"s")) opts |= PCRE_DOTALL; re = pcre16_compile(regexp, opts, &error, &erroroffs, NULL); @@ -161,7 +161,7 @@ int get_response_id(const TCHAR* strvar) const char *error; int erroroffs, rc; TCHAR *_str, *_strvar; - TCHAR regex[] = _T("^%response([#-_]([0-9]+))?%$"); + TCHAR regex[] = L"^%response([#-_]([0-9]+))?%$"; int ovector[9]; if (strvar == NULL) @@ -198,10 +198,10 @@ int get_response_num(const TCHAR *str) strc = mir_tstrdup(str); if (strc == NULL) return 0; - tmp = _tcstok(strc, _T("\r\n")); + tmp = _tcstok(strc, L"\r\n"); while (tmp) { i ++; - tmp = _tcstok(NULL, _T("\r\n")); /* Move next. */ + tmp = _tcstok(NULL, L"\r\n"); /* Move next. */ } mir_free(strc); @@ -219,7 +219,7 @@ TCHAR* get_response(TCHAR* dst, unsigned int dstlen, int num) if (src == NULL) goto err_out; _getOptS(src, MAX_BUFFER_LENGTH, "Response", defaultResponse); - tmp = _tcstok(src, _T("\r\n")); + tmp = _tcstok(src, L"\r\n"); while (tmp) { if (i == num) { mir_tstrcpy(dst, tmp); @@ -227,7 +227,7 @@ TCHAR* get_response(TCHAR* dst, unsigned int dstlen, int num) return dst; } i ++; - tmp = _tcstok(NULL, _T("\r\n")); /* Move next. */ + tmp = _tcstok(NULL, L"\r\n"); /* Move next. */ } mir_free(src); err_out: @@ -274,10 +274,10 @@ BOOL Contains(TCHAR* dst, TCHAR* src) // Checks for occurence of substring from goto err_out; tdst = _tcstoupper(tdst); dst_len = mir_tstrlen(tdst); - token = _tcstok(tsrc, _T(",")); + token = _tcstok(tsrc, L","); while (token) { token_end = (token + mir_tstrlen(token)); - while (!_tcsncmp(token, _T(" "), 1)) { /* Skeep spaces at start. */ + while (!_tcsncmp(token, L" ", 1)) { /* Skeep spaces at start. */ token ++; } /* Skeep spaces at end. */ @@ -291,7 +291,7 @@ BOOL Contains(TCHAR* dst, TCHAR* src) // Checks for occurence of substring from ret = TRUE; break; } - token = _tcstok(NULL, _T(",")); /* Move next. */ + token = _tcstok(NULL, L","); /* Move next. */ } err_out: mir_free(tsrc); @@ -363,7 +363,7 @@ TCHAR* ReplaceVarsNum(TCHAR *dst, unsigned int len, int num) const char *error; int erroroffs, rc; TCHAR *_str, *tmp, **r = NULL, **tr, *ttmp, *dstcopy; - TCHAR regex[] = _T("%response([#-_]([0-9]+))?%"); + TCHAR regex[] = L"%response([#-_]([0-9]+))?%"; int ovector[9]; re = pcre16_compile(regex, 0, &error, &erroroffs, NULL); @@ -371,14 +371,14 @@ TCHAR* ReplaceVarsNum(TCHAR *dst, unsigned int len, int num) return FALSE; // [TODO] and log some error _getOptS(response, _countof(response), "Response", defaultResponse); - ttmp = _tcstok(response, _T("\r\n")); + ttmp = _tcstok(response, L"\r\n"); for (i = 0; ttmp != NULL; i ++) { tr = (TCHAR**)mir_realloc(r, ((i + 1) * sizeof(TCHAR*))); if (tr == NULL) goto err_out; r = tr; r[i] = ttmp; - ttmp = _tcstok(NULL, _T("\r\n")); /* Move next. */ + ttmp = _tcstok(NULL, L"\r\n"); /* Move next. */ } do { diff --git a/plugins/SpellChecker/src/RichEdit.cpp b/plugins/SpellChecker/src/RichEdit.cpp index a7827bfce0..ea5846a42a 100644 --- a/plugins/SpellChecker/src/RichEdit.cpp +++ b/plugins/SpellChecker/src/RichEdit.cpp @@ -201,14 +201,14 @@ TCHAR* RichEdit::GetText(int start, int end) const if (m_textDocument != NULL) {
ITextRange *range;
if (m_textDocument->Range(start, end, &range) != S_OK)
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
BSTR text = NULL;
if (FAILED(range->GetText(&text))) {
if (text)
::SysFreeString(text);
range->Release();
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
TCHAR *res = mir_u2t(text);
@@ -281,7 +281,7 @@ int RichEdit::Delete(int start, int end) CHARRANGE replace_sel = { start, end };
SetSel(replace_sel);
- ReplaceSel(_T(""));
+ ReplaceSel(L"");
int dif = FixSel(&sel, replace_sel, 0);
SetSel(sel);
diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp index e897d7e84c..899146ffdf 100644 --- a/plugins/SpellChecker/src/autoreplace.cpp +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -39,7 +39,7 @@ AutoReplaceMap::AutoReplaceMap(TCHAR *aFilename, Dictionary *dict) void AutoReplaceMap::loadAutoReplaceMap()
{
- FILE *file = _tfopen(m_filename, _T("rb"));
+ FILE *file = _tfopen(m_filename, L"rb");
if (file == NULL)
return;
@@ -96,7 +96,7 @@ void AutoReplaceMap::writeAutoReplaceMap() }
// Write it
- FILE *file = _tfopen(m_filename, _T("wb"));
+ FILE *file = _tfopen(m_filename, L"wb");
if (file != NULL) {
map<tstring, AutoReplacement>::iterator it = m_replacements.begin();
for (; it != m_replacements.end(); it++) {
@@ -120,7 +120,7 @@ BOOL AutoReplaceMap::isWordChar(TCHAR c) if (IsNumber(c))
return TRUE;
- if (_tcschr(_T("-_.!@#$%&*()[]{}<>:?/\\=+"), c) != NULL)
+ if (_tcschr(L"-_.!@#$%&*()[]{}<>:?/\\=+", c) != NULL)
return TRUE;
return m_dict->isWordChar(c);
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 371b934d01..58218fc2b1 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -19,8 +19,8 @@ Boston, MA 02111-1307, USA. #include "stdafx.h" -#define APPPATH _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s") -#define MUICACHE _T("Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache") +#define APPPATH L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s" +#define MUICACHE L"Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache" // Additional languages that i could not find in Windows @@ -28,16 +28,16 @@ struct { TCHAR *language; TCHAR *localized_name; } aditionalLanguages[] = { - { _T("tl_PH"), LPGENT("Tagalog (Philippines)") }, - { _T("de_frami_neu"), LPGENT("German (Germany)") } + { L"tl_PH", LPGENT("Tagalog (Philippines)") }, + { L"de_frami_neu", LPGENT("German (Germany)") } }; struct { TCHAR *name; TCHAR *key; } otherHunspellApps[] = { - { _T("Thunderbird"), _T("thunderbird.exe") }, - { _T("Firefox"), _T("firefox.exe") } + { L"Thunderbird", L"thunderbird.exe" }, + { L"Firefox", L"firefox.exe" } }; struct { @@ -365,9 +365,9 @@ protected: void loadCustomDict() { TCHAR filename[1024]; - mir_sntprintf(filename, _T("%s\\%s.cdic"), userPath, language); + mir_sntprintf(filename, L"%s\\%s.cdic", userPath, language); - FILE *file = _tfopen(filename, _T("rb")); + FILE *file = _tfopen(filename, L"rb"); if (file != NULL) { char tmp[1024]; int c, pos = 0; @@ -393,9 +393,9 @@ protected: CreateDirectoryTreeT(userPath); TCHAR filename[1024]; - mir_sntprintf(filename, _T("%s\\%s.cdic"), userPath, language); + mir_sntprintf(filename, L"%s\\%s.cdic", userPath, language); - FILE *file = _tfopen(filename, _T("ab")); + FILE *file = _tfopen(filename, L"ab"); if (file != NULL) { char tmp[1024]; toHunspell(tmp, word, _countof(tmp)); @@ -734,7 +734,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, _countof(end)); TCHAR name[64]; - mir_sntprintf(name, _T("%s_%s"), ini, end); + mir_sntprintf(name, L"%s_%s", ini, end); for (int i = 0; i < tmp_dicts->getCount(); i++) { Dictionary *dict = (*tmp_dicts)[i]; @@ -752,7 +752,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) TCHAR localName[1024]; if (country[0] != 0) - mir_sntprintf(localName, _T("%s (%s)"), dict->english_name, country); + mir_sntprintf(localName, L"%s (%s)", dict->english_name, country); else mir_tstrncpy(localName, dict->english_name, _countof(localName)); @@ -760,7 +760,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) } if (dict->localized_name[0] != 0) { - mir_sntprintf(dict->full_name, _T("%s [%s]"), dict->localized_name, dict->language); + mir_sntprintf(dict->full_name, L"%s [%s]", dict->localized_name, dict->language); } break; } @@ -798,7 +798,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) } if (dict->localized_name[0] != _T('\0')) { - mir_sntprintf(dict->full_name, _T("%s [%s]"), dict->localized_name, dict->language); + mir_sntprintf(dict->full_name, L"%s [%s]", dict->localized_name, dict->language); } else { mir_tstrncpy(dict->full_name, dict->language, _countof(dict->full_name)); @@ -812,7 +812,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH { // Load the language files and create an array with then TCHAR file[1024] = { 0 }; - mir_sntprintf(file, _T("%s\\*.dic"), path); + mir_sntprintf(file, L"%s\\*.dic", path); BOOL found = FALSE; @@ -820,7 +820,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH HANDLE hFFD = FindFirstFile(file, &ffd); if (hFFD != INVALID_HANDLE_VALUE) { do { - mir_sntprintf(file, _T("%s\\%s"), path, ffd.cFileName); + mir_sntprintf(file, L"%s\\%s", path, ffd.cFileName); // Check .dic DWORD attrib = GetFileAttributes(file); @@ -828,7 +828,7 @@ void GetHunspellDictionariesFromFolder(LIST<Dictionary> &dicts, TCHAR *path, TCH continue; // See if .aff exists too - mir_tstrcpy(&file[mir_tstrlen(file) - 4], _T(".aff")); + mir_tstrcpy(&file[mir_tstrlen(file) - 4], L".aff"); attrib = GetFileAttributes(file); if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) continue; @@ -876,7 +876,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa LONG lResult = 0; if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE, &hKey)) { DWORD size = _countof(key); - lResult = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)key, &size); + lResult = RegQueryValueEx(hKey, L"Path", NULL, NULL, (LPBYTE)key, &size); RegCloseKey(hKey); } else { @@ -908,7 +908,7 @@ void GetAvaibleDictionaries(LIST<Dictionary> &dicts, TCHAR *path, TCHAR *user_pa if (ERROR_SUCCESS == lResult) { TCHAR folder[1024]; - mir_sntprintf(folder, _T("%s\\Dictionaries"), key); + mir_sntprintf(folder, L"%s\\Dictionaries", key); GetHunspellDictionariesFromFolder(languages, folder, user_path, otherHunspellApps[i].name); } diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index e35670841a..7d12a021f5 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -80,7 +80,7 @@ static int IconsChanged(WPARAM, LPARAM) sid.dwId = i; TCHAR tmp[128]; - mir_sntprintf(tmp, _T("%s - %s"), TranslateT("Spell Checker"), languages[i]->full_name); + mir_sntprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name); sid.tszTooltip = tmp; HICON hIcon = (opts.use_flags) ? IcoLib_GetIconByHandle(languages[i]->hIcolib) : IcoLib_GetIcon("spellchecker_enabled"); @@ -109,19 +109,19 @@ static int ModulesLoaded(WPARAM, LPARAM) // Folders plugin support if (hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER)) { dictionariesFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, L"."); } else dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); if (hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER)) { customDictionariesFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, L"."); } else customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); if (hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER)) { flagsDllFolder = (TCHAR *)mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, _T(".")); + FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, L"."); } else flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); @@ -134,7 +134,7 @@ static int ModulesLoaded(WPARAM, LPARAM) if (opts.use_flags) { // Load flags dll TCHAR flag_file[MAX_PATH]; - mir_sntprintf(flag_file, _T("%s\\flags_icons.dll"), flagsDllFolder); + mir_sntprintf(flag_file, L"%s\\flags_icons.dll", flagsDllFolder); HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); TCHAR path[MAX_PATH]; @@ -142,7 +142,7 @@ static int ModulesLoaded(WPARAM, LPARAM) SKINICONDESC sid = { 0 }; sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.section.t = LPGENT("Spell Checker") _T("/") LPGENT("Flags"); + sid.section.t = LPGENT("Spell Checker") L"/" LPGENT("Flags"); // Get language flags for (int i = 0; i < languages.getCount(); i++) { @@ -184,7 +184,7 @@ static int ModulesLoaded(WPARAM, LPARAM) Dictionary *dict = languages[j]; TCHAR filename[MAX_PATH]; - mir_sntprintf(filename, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); + mir_sntprintf(filename, L"%s\\%s.ar", customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); if (mir_tstrcmp(dict->language, opts.default_language) == 0) @@ -205,7 +205,7 @@ static int ModulesLoaded(WPARAM, LPARAM) sid.dwId = i; TCHAR tmp[128]; - mir_sntprintf(tmp, _T("%s - %s"), TranslateT("Spell Checker"), languages[i]->full_name); + mir_sntprintf(tmp, L"%s - %s", TranslateT("Spell Checker"), languages[i]->full_name); sid.tszTooltip = tmp; sid.hIcon = (opts.use_flags) ? IcoLib_GetIconByHandle(languages[i]->hIcolib) : IcoLib_GetIcon("spellchecker_enabled"); Srmm_AddIcon(&sid); diff --git a/plugins/SpellChecker/src/stdafx.h b/plugins/SpellChecker/src/stdafx.h index fa10f3dbfe..66e5e39f3f 100644 --- a/plugins/SpellChecker/src/stdafx.h +++ b/plugins/SpellChecker/src/stdafx.h @@ -70,9 +70,9 @@ using namespace std; #define MODULE_NAME "SpellChecker"
-#define FLAGS_DLL_FOLDER _T("%miranda_path%\\Icons")
-#define CUSTOM_DICTIONARIES_FOLDER _T("%miranda_userdata%\\Dictionaries")
-#define DICTIONARIES_FOLDER _T("%miranda_path%\\Dictionaries")
+#define FLAGS_DLL_FOLDER L"%miranda_path%\\Icons"
+#define CUSTOM_DICTIONARIES_FOLDER L"%miranda_userdata%\\Dictionaries"
+#define DICTIONARIES_FOLDER L"%miranda_path%\\Dictionaries"
// Global Variables
extern HINSTANCE hInst;
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 15fe69f0e7..7242f0c98c 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -440,7 +440,7 @@ void ToLocaleID(TCHAR *szKLName, size_t size) GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO639LANGNAME, ini, _countof(ini));
GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, _countof(end));
- mir_sntprintf(szKLName, size, _T("%s_%s"), ini, end);
+ mir_sntprintf(szKLName, size, L"%s_%s", ini, end);
}
void LoadDictFromKbdl(Dialog *dlg)
@@ -449,7 +449,7 @@ void LoadDictFromKbdl(Dialog *dlg) // Use default input language
HKL hkl = GetKeyboardLayout(0);
- mir_sntprintf(szKLName, _T("%x"), (int)LOWORD(hkl));
+ mir_sntprintf(szKLName, L"%x", (int)LOWORD(hkl));
ToLocaleID(szKLName, _countof(szKLName));
int d = GetClosestLanguage(szKLName);
diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index e90ec277d1..33ef919c64 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -134,7 +134,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn) HBITMAP hBmpLoaded = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)fn, IMGL_TCHAR);
if (!hBmpLoaded) {
#ifdef _DEBUG
- logMessage(_T("MyBitmap::loadFromFile"), _T("Bitmap load failed"));
+ logMessage(L"MyBitmap::loadFromFile", L"Bitmap load failed");
#endif
return false;
}
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 5a475e9286..3132433ccb 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -41,7 +41,7 @@ int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...) int inline initLog()
{
- fclose(_tfopen(szLogFile, _T("w")));
+ fclose(_tfopen(szLogFile, L"w"));
return 0;
}
@@ -51,8 +51,8 @@ int inline initLog() void inline logMessage(TCHAR *func, TCHAR *msg)
{
- FILE *f = _tfopen(szLogFile, _T("a"));
- _ftprintf(f, _T("%s:\t\t%s\n"), func, msg);
+ FILE *f = _tfopen(szLogFile, L"a");
+ _ftprintf(f, L"%s:\t\t%s\n", func, msg);
fclose(f);
}
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index b73c27c053..74eeb0ff7c 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -64,18 +64,18 @@ void SplashMain() {
if (bstartup) {
// Retrive path to exe of current running Miranda is located
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
- mir_sntprintf(szhAdvaimgPath, _T("%s\\plugins\\advaimg.dll"), szMirDir);
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
+ mir_sntprintf(szhAdvaimgPath, L"%s\\plugins\\advaimg.dll", szMirDir);
CallService(MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, (LPARAM)szVersion);
#ifdef _DEBUG
- mir_sntprintf(szLogFile, _T("%s\\%s.log"), szMirDir, _T(__PLUGIN_NAME));
+ mir_sntprintf(szLogFile, L"%s\\%s.log", szMirDir, _T(__PLUGIN_NAME));
initLog();
TCHAR *mirandaVerString = mir_a2t(szVersion);
- logMessage(_T("Miranda version"), mirandaVerString);
+ logMessage(L"Miranda version", mirandaVerString);
mir_free(mirandaVerString);
- logMessage(_T("Dll Name"), _T(__FILENAME));
- logMessage(_T("Advaimg path"), szhAdvaimgPath);
+ logMessage(L"Dll Name", _T(__FILENAME));
+ logMessage(L"Advaimg path", szhAdvaimgPath);
#endif
ReadDbConfig();
@@ -88,14 +88,14 @@ void SplashMain() db_free(&dbv);
}
else
- mir_tstrcpy(szPrefix, _T(""));
+ mir_tstrcpy(szPrefix, L"");
if (!db_get_ts(NULL, MODNAME, "Path", &dbv)) {
mir_tstrcpy(inBuf, dbv.ptszVal);
db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("splash\\splash.png"));
+ mir_tstrcpy(inBuf, L"splash\\splash.png");
TCHAR szExpandedSplashFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSplashFile, _countof(szExpandedSplashFile));
@@ -104,7 +104,7 @@ void SplashMain() TCHAR *pos3 = 0;
pos3 = _tcsrchr(inBuf, _T(':'));
if (pos3 == NULL)
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szMirDir, inBuf);
else
mir_tstrcpy(szSplashFile, inBuf);
@@ -113,7 +113,7 @@ void SplashMain() db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("sounds\\startup.wav"));
+ mir_tstrcpy(inBuf, L"sounds\\startup.wav");
TCHAR szExpandedSoundFile[MAX_PATH];
ExpandEnvironmentStrings(inBuf, szExpandedSoundFile, _countof(szExpandedSoundFile));
@@ -122,12 +122,12 @@ void SplashMain() TCHAR *pos2;
pos2 = _tcschr(inBuf, _T(':'));
if (pos2 == NULL)
- mir_sntprintf(szSoundFile, _T("%s\\%s"), szMirDir, inBuf);
+ mir_sntprintf(szSoundFile, L"%s\\%s", szMirDir, inBuf);
else
mir_tstrcpy(szSoundFile, inBuf);
#ifdef _DEBUG
- logMessage(_T("SoundFilePath"), szSoundFile);
+ logMessage(L"SoundFilePath", szSoundFile);
#endif
TCHAR szOldPath[MAX_PATH] = { 0 };
@@ -145,7 +145,7 @@ void SplashMain() p = _tcsrchr(szSplashDir, _T('\\'));
if (p) *p = 0;
// create the search filter
- mir_sntprintf(szSearch, _T("%s\\*.*"), szSplashDir);
+ mir_sntprintf(szSearch, L"%s\\*.*", szSplashDir);
// FFFN will return filenames
HANDLE hFind = INVALID_HANDLE_VALUE;
WIN32_FIND_DATA ffd;
@@ -154,7 +154,7 @@ void SplashMain() do {
if (!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) {
#ifdef _DEBUG
- logMessage(_T("Found file"), ffd.cFileName);
+ logMessage(L"Found file", ffd.cFileName);
#endif
//files = new char[mir_strlen(ffd.cFileName)];
//files[filescount] = new char[mir_strlen(ffd.cFileName)];
@@ -162,14 +162,14 @@ void SplashMain() wmemcpy(ext, ffd.cFileName + (mir_tstrlen(ffd.cFileName) - 4), 5);
#ifdef _DEBUG
- logMessage(_T("Extention"), ext);
+ logMessage(L"Extention", ext);
#endif
- if (mir_tstrcmpi(ext, _T(".png")) & mir_tstrcmpi(ext, _T(".bmp")))
+ if (mir_tstrcmpi(ext, L".png") & mir_tstrcmpi(ext, L".bmp"))
continue;
#ifdef _DEBUG
- logMessage(_T("File has valid ext"), ext);
+ logMessage(L"File has valid ext", ext);
#endif
mir_tstrcpy(files[filescount++], ffd.cFileName);
} //if
@@ -179,10 +179,10 @@ void SplashMain() int r = 0;
if (filescount) r = (rand() % filescount) + 1;
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szSplashDir, files[r - 1]);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szSplashDir, files[r - 1]);
#ifdef _DEBUG
- logMessage(_T("final file"), szSplashFile);
+ logMessage(L"final file", szSplashFile);
#endif
FindClose(hFind);
} //if
@@ -204,20 +204,20 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "Skin") && !strcmp(cws->szSetting, "UseSound")) {
db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal);
#ifdef _DEBUG
- cws->value.bVal ? _DebugPopup(NULL, _T("Sounds enabled."), _T("")) : _DebugPopup(NULL, _T("Sounds disabled."), _T(""));
- logMessage(_T("Module"), _A2T(cws->szModule));
- logMessage(_T("Setting"), _A2T(cws->szSetting));
- logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
+ cws->value.bVal ? _DebugPopup(NULL, L"Sounds enabled.", L"") : _DebugPopup(NULL, L"Sounds disabled.", L"");
+ logMessage(L"Module", _A2T(cws->szModule));
+ logMessage(L"Setting", _A2T(cws->szSetting));
+ logMessage(L"Value", _itot(cws->value.bVal, buf, 10));
#endif
}
if (!strcmp(cws->szModule, "PluginDisable") && !strcmp(cws->szSetting, _T2A(szDllName))) {
db_set_b(NULL, MODNAME, "Active", cws->value.bVal);
#ifdef _DEBUG
- cws->value.bVal ? _DebugPopup(NULL, _T("Disabled."), "") : _DebugPopup(NULL, _T("Enabled."), _T(""));
- logMessage(_T("PlugDisableHook"), _T("Triggered"));
- logMessage(_T("Module"), _A2T(cws->szModule));
- logMessage(_T("Setting"), _A2T(cws->szSetting));
- logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10));
+ cws->value.bVal ? _DebugPopup(NULL, L"Disabled.", "") : _DebugPopup(NULL, L"Enabled.", L"");
+ logMessage(L"PlugDisableHook", L"Triggered");
+ logMessage(L"Module", _A2T(cws->szModule));
+ logMessage(L"Setting", _A2T(cws->szSetting));
+ logMessage(L"Value", _itot(cws->value.bVal, buf, 10));
#endif
}
}
@@ -232,7 +232,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) if (hwndSplash) {
if (PostMessage(hwndSplash, WM_LOADED, 0, 0)) {
#ifdef _DEBUG
- logMessage(_T("Posted WM_LOADED message"), _T("done"));
+ logMessage(L"Posted WM_LOADED message", L"done");
#endif
}
}
@@ -245,7 +245,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CreateServiceFunction(MS_SHOWSPLASH, ShowSplashService);
#ifdef _DEBUG
- logMessage(_T("Loading modules"), _T("done"));
+ logMessage(L"Loading modules", L"done");
#endif
return 0;
@@ -278,7 +278,7 @@ extern "C" int __declspec(dllexport) Unload(void) FreeLibrary(hAdvaimg);
#ifdef _DEBUG
- logMessage(_T("Unload"), _T("Job done"));
+ logMessage(L"Unload", L"Job done");
#endif
return 0;
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 536af1505a..845a016ab4 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -73,7 +73,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("splash\\splash.png"));
+ mir_tstrcpy(inBuf, L"splash\\splash.png");
SetDlgItemText(hwndDlg, IDC_SPLASHPATH, inBuf);
if (!db_get_ts(NULL, MODNAME, "Sound", &dbv)) {
@@ -81,7 +81,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T("sounds\\startup.wav"));
+ mir_tstrcpy(inBuf, L"sounds\\startup.wav");
SetDlgItemText(hwndDlg, IDC_SNDPATH, inBuf);
if (!db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv)) {
@@ -89,7 +89,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv);
}
else
- mir_tstrcpy(inBuf, _T(""));
+ mir_tstrcpy(inBuf, L"");
SetDlgItemText(hwndDlg, IDC_VERSIONPREFIX, inBuf);
if (options.active)
@@ -175,13 +175,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP *pos = 0;
}
else {
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
mir_tstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, _T("%s (*.png, *.bmp)%c*.png;*.bmp%c%c"), TranslateT("Graphic files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.png, *.bmp)%c*.png;*.bmp%c%c", TranslateT("Graphic files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
@@ -192,13 +192,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = initDir;
*szTempPath = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn)) {
mir_tstrcpy(szSplashFile, szTempPath);
#ifdef _DEBUG
- logMessage(_T("Set path"), szSplashFile);
+ logMessage(L"Set path", szSplashFile);
#endif
// Make path relative
int result = PathToRelativeT(szTempPath, szPath2Spash);
@@ -207,7 +207,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR *pos = _tcsrchr(szPath2Spash, _T('\\'));
if (pos != NULL) {
*pos = 0;
- mir_tstrcat(szPath2Spash, _T("\\"));
+ mir_tstrcat(szPath2Spash, L"\\");
}
}
@@ -231,7 +231,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (pos != NULL) *pos = 0;
}
else {
- szMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ szMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
mir_tstrcpy(initDir, szMirDir);
mir_free(szMirDir);
}
@@ -239,7 +239,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
TCHAR tmp[MAX_PATH];
- mir_sntprintf(tmp, _T("%s (*.wav, *.mp3)%c*.wav;*.mp3%c%c"), TranslateT("Sound Files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.wav, *.mp3)%c*.wav;*.mp3%c%c", TranslateT("Sound Files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = szTempPath;
@@ -248,13 +248,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ofn.Flags = OFN_HIDEREADONLY;
ofn.lpstrInitialDir = initDir;
*szTempPath = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn)) {
mir_tstrcpy(szSoundFile, szTempPath);
#ifdef _DEBUG
- logMessage(_T("Set sound path"), szSoundFile);
+ logMessage(L"Set sound path", szSoundFile);
#endif
// Make path relative
diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp index b89daaa23d..e7aa6c7a66 100644 --- a/plugins/SplashScreen/src/services.cpp +++ b/plugins/SplashScreen/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR ShowSplashService(WPARAM wparam, LPARAM lparam) TCHAR *pos = _tcsrchr(filename, _T(':'));
if (pos == NULL)
- mir_sntprintf(szSplashFile, _T("%s\\%s"), szMirDir, filename);
+ mir_sntprintf(szSplashFile, L"%s\\%s", szMirDir, filename);
else
mir_tstrcpy(szSplashFile, filename);
diff --git a/plugins/SplashScreen/src/splash.cpp b/plugins/SplashScreen/src/splash.cpp index cab40ef640..9e209b906a 100644 --- a/plugins/SplashScreen/src/splash.cpp +++ b/plugins/SplashScreen/src/splash.cpp @@ -27,7 +27,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM switch (message) {
case WM_LOADED:
#ifdef _DEBUG
- logMessage(_T("WM_LOADED"), _T("called"));
+ logMessage(L"WM_LOADED", L"called");
#endif
if (!options.showtime)
@@ -42,17 +42,17 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM #ifdef _DEBUG
TCHAR b[40];
- mir_sntprintf(b, _T("%d"), wParam);
- logMessage(_T("Timer ID"), b);
- mir_sntprintf(b, _T("%d"), options.showtime);
- logMessage(_T("ShowTime value"), b);
+ mir_sntprintf(b, L"%d", wParam);
+ logMessage(L"Timer ID", b);
+ mir_sntprintf(b, L"%d", options.showtime);
+ logMessage(L"ShowTime value", b);
#endif
if (options.showtime > 0) { // TimeToShow enabled
if (wParam == 6) {
PostMessage(hwnd, WM_CLOSE, 0, 0);
#ifdef _DEBUG
- logMessage(_T("Showtime timer"), _T("triggered"));
+ logMessage(L"Showtime timer", L"triggered");
#endif
}
}
@@ -60,7 +60,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM PostMessage(hwnd, WM_CLOSE, 0, 0);
if (wParam == 7) {
#ifdef _DEBUG
- logMessage(_T("On Modules Loaded timer"), _T("triggered"));
+ logMessage(L"On Modules Loaded timer", L"triggered");
#endif
}
}
@@ -108,7 +108,7 @@ LRESULT CALLBACK SplashWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_DESTROY:
#ifdef _DEBUG
- logMessage(_T("WM_DESTROY"), _T("called"));
+ logMessage(L"WM_DESTROY", L"called");
#endif
ShowWindow(hwndSplash, SW_HIDE);
DestroyWindow(hwndSplash);
@@ -229,11 +229,11 @@ void __cdecl SplashThread(void *arg) TCHAR verString[256] = { 0 };
TCHAR *mirandaVerString = mir_a2t(szVersion);
- mir_sntprintf(verString, _T("%s%s"), szPrefix, mirandaVerString);
+ mir_sntprintf(verString, L"%s%s", szPrefix, mirandaVerString);
mir_free(mirandaVerString);
LOGFONT lf = { 0 };
lf.lfHeight = 14;
- mir_tstrcpy(lf.lfFaceName, _T("Verdana"));
+ mir_tstrcpy(lf.lfFaceName, L"Verdana");
SelectObject(SplashBmp->getDC(), CreateFontIndirect(&lf));
if (!splashWithMarkers) {
SIZE v_sz = { 0, 0 };
@@ -266,7 +266,7 @@ void __cdecl SplashThread(void *arg) if (DWORD_PTR(arg) > 0) {
if (SetTimer(hwndSplash, 6, DWORD_PTR(arg), 0)) {
#ifdef _DEBUG
- logMessage(_T("Timer TimeToShow"), _T("set"));
+ logMessage(L"Timer TimeToShow", L"set");
#endif
}
}
@@ -274,7 +274,7 @@ void __cdecl SplashThread(void *arg) if (bmodulesloaded) {
if (SetTimer(hwndSplash, 8, 2000, 0)) {
#ifdef _DEBUG
- logMessage(_T("Timer Modules loaded"), _T("set"));
+ logMessage(L"Timer Modules loaded", L"set");
#endif
}
}
@@ -304,14 +304,14 @@ BOOL ShowSplash(BOOL bpreview) SplashBmp = new MyBitmap;
#ifdef _DEBUG
- logMessage(_T("Loading splash file"), szSplashFile);
+ logMessage(L"Loading splash file", szSplashFile);
#endif
if (!SplashBmp->loadFromFile(szSplashFile))
return 0;
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("start"));
+ logMessage(L"Thread", L"start");
#endif
if (bpreview) {
@@ -320,22 +320,22 @@ BOOL ShowSplash(BOOL bpreview) timeout = 2000;
#ifdef _DEBUG
- logMessage(_T("Preview"), _T("yes"));
+ logMessage(L"Preview", L"yes");
#endif
}
else {
timeout = options.showtime;
#ifdef _DEBUG
TCHAR b[40];
- mir_sntprintf(b, _T("%d"), options.showtime);
- logMessage(_T("Timeout"), b);
+ mir_sntprintf(b, L"%d", options.showtime);
+ logMessage(L"Timeout", b);
#endif
}
mir_forkthread(SplashThread, (void*)timeout);
#ifdef _DEBUG
- logMessage(_T("Thread"), _T("end"));
+ logMessage(L"Thread", L"end");
#endif
return 1;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp index 5c896b8c11..0ae73b66d0 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp @@ -128,7 +128,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, settings[i]->msg);
else {
ptrT msg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, settings[i]->status, 0));
- SetDlgItemText(hwndDlg, IDC_STATUSMSG, (msg != NULL) ? msg : _T(""));
+ SetDlgItemText(hwndDlg, IDC_STATUSMSG, (msg != NULL) ? msg : L"");
}
if (settings[i]->useCustom) {
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 017b1d07de..6f76de23d5 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -146,7 +146,7 @@ int LoadMainOptions() hCSStatusChangeExHook = HookEvent(ME_CS_STATUSCHANGEEX, CSStatusChangeEx); if (db_get_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, 0) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000)) { if (!IsWindow(hMessageWindow)) { - hMessageWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); + hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc); } } @@ -932,7 +932,7 @@ static int ProcessPopup(int reason, LPARAM lParam) TCHAR protoInfoLine[512], protoInfo[MAX_SECONDLINE]; memset(protoInfoLine, '\0', sizeof(protoInfoLine)); memset(protoInfo, '\0', sizeof(protoInfo)); - mir_tstrcpy(protoInfo, _T("\r\n")); + mir_tstrcpy(protoInfo, L"\r\n"); for (int i = 0; i < connectionSettings.getCount(); i++) { if (mir_tstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 33c3c126b4..f50907a46f 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -165,7 +165,7 @@ HRESULT CreateLink(TSettingsList& protoSettings) if (SHGetSpecialFolderPath(NULL, savePath, 0x10, FALSE))
_tcsncat_s(savePath, SHORTCUT_FILENAME, _countof(savePath) - mir_tstrlen(savePath));
else
- mir_sntprintf(savePath, _T(".\\%s"), SHORTCUT_FILENAME);
+ mir_sntprintf(savePath, L".\\%s", SHORTCUT_FILENAME);
// Get a pointer to the IShellLink interface.
IShellLink *psl;
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 0eeb6d5225..cfc69ce732 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -272,7 +272,7 @@ static int UnregisterHotKeys() // assumes UnregisterHotKeys was called before static int RegisterHotKeys() { - hMessageWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); + hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc); int count = GetProfileCount(0, 0); diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 2efe6d8466..e592da5e71 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -416,7 +416,7 @@ int CSModuleLoaded(WPARAM wParam, LPARAM lParam) HookEvent(ME_SYSTEM_OKTOEXIT, OnOkToExit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
/* message window for poweroff */
- hMessageWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
+ hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc);
GetProfile(-1, startupSettings);
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.h b/plugins/StatusPlugins/StartupStatus/startupstatus.h index 500454a654..0346567861 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.h +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.h @@ -122,8 +122,8 @@ typedef struct { #define SETTING_SETPROFILEDELAY "SetStatusDelay"
#define SETTING_DLGTIMEOUT "DialogTimeout"
-#define SHORTCUT_DESC _T("Miranda NG")
-#define SHORTCUT_FILENAME _T("\\Miranda NG.lnk")
+#define SHORTCUT_DESC L"Miranda NG"
+#define SHORTCUT_FILENAME L"\\Miranda NG.lnk"
#define DOCKED_NONE 0
#define DOCKED_LEFT 1
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index 9221754198..4f78f829d1 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -177,9 +177,9 @@ static void SetStatusMsg(PROTOCOLSETTINGEX *ps, int newstatus) continue;
TCHAR substituteStr[128];
- if (!_tcsnicmp(tszMsg + j, _T("%time%"), 6))
+ if (!_tcsnicmp(tszMsg + j, L"%time%", 6))
GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, 0, 0, substituteStr, _countof(substituteStr));
- else if (!_tcsnicmp(tszMsg + j, _T("%date%"), 6))
+ else if (!_tcsnicmp(tszMsg + j, L"%date%", 6))
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, 0, 0, substituteStr, _countof(substituteStr));
else
continue;
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 1b1f5b03fc..ac622de347 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -127,11 +127,11 @@ static int SetStatusList(HWND hwndDlg) TCHAR* status = pcli->pfnGetStatusModeDescription(actualStatus, 0);
switch ((*confirmSettings)[i].status) {
case ID_STATUS_LAST:
- mir_sntprintf(buf, _T("%s (%s)"), TranslateT("<last>"), status);
+ mir_sntprintf(buf, L"%s (%s)", TranslateT("<last>"), status);
ListView_SetItemText(hList, lvItem.iItem, 1, buf);
break;
case ID_STATUS_CURRENT:
- mir_sntprintf(buf, _T("%s (%s)"), TranslateT("<current>"), status);
+ mir_sntprintf(buf, L"%s (%s)", TranslateT("<current>"), status);
ListView_SetItemText(hList, lvItem.iItem, 1, buf);
break;
default:
@@ -269,7 +269,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // LAST STATUS
if (proto->status == ID_STATUS_LAST) {
TCHAR last[80];
- mir_sntprintf(last, _T("%s (%s)"), TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
+ mir_sntprintf(last, L"%s (%s)", TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, last);
actualStatus = proto->lastStatus;
}
@@ -278,7 +278,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else if (proto->status == ID_STATUS_CURRENT) {
int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0);
TCHAR current[80];
- mir_sntprintf(current, _T("%s (%s)"), TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
+ mir_sntprintf(current, L"%s (%s)", TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, current);
actualStatus = currentStatus;
}
@@ -344,7 +344,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // last
TCHAR buf[100];
- mir_sntprintf(buf, _T("%s (%s)"), TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
+ mir_sntprintf(buf, L"%s (%s)", TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
int item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)buf);
SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, ID_STATUS_LAST);
if (proto->status == ID_STATUS_LAST) {
@@ -354,7 +354,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // current
int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0);
- mir_sntprintf(buf, _T("%s (%s)"), TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
+ mir_sntprintf(buf, L"%s (%s)", TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)buf);
SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, ID_STATUS_CURRENT);
if (proto->status == ID_STATUS_CURRENT) {
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 44f1bea69a..4b8ef5167e 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -43,8 +43,8 @@ BOOL gbMathExpression = 0; HANDLE hStopSpamLogDirH=0;
-tstring gbSpammersGroup = _T("Spammers");
-tstring gbAutoAuthGroup = _T("NotSpammers");
+tstring gbSpammersGroup = L"Spammers";
+tstring gbAutoAuthGroup = L"NotSpammers";
tstring gbQuestion;
tstring gbAnswer;
@@ -79,17 +79,17 @@ extern tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szMo void InitVars()
{
- gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("Spammers"));
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
- gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message."));
+ gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", L"Spammers");
+ gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", L"nospam");
+ gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", L"Congratulations! You just passed human/robot test. Now you can write me a message.");
gbInfTalkProtection = db_get_b(NULL, pluginName, "infTalkProtection", 0);
gbAddPermanent = db_get_b(NULL, pluginName, "addPermanent", 0);
gbMaxQuestCount = db_get_dw(NULL, pluginName, "maxQuestCount", 5);
gbHandleAuthReq = db_get_b(NULL, pluginName, "handleAuthReq", 1);
gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion);
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
- gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", _T("Congratulations! You just passed human/robot test. Now you can write me a message."));
- gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", _T("StopSpam: send a message and reply to an anti-spam bot question."));
+ gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", L"nospam");
+ gbCongratulation = DBGetContactSettingStringPAN(NULL, pluginName, "congratulation", L"Congratulations! You just passed human/robot test. Now you can write me a message.");
+ gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", L"StopSpam: send a message and reply to an anti-spam bot question.");
gbSpecialGroup = db_get_b(NULL, pluginName, "SpecialGroup", 0);
gbHideContacts = db_get_b(NULL, pluginName, "HideContacts", 0);
gbIgnoreContacts = db_get_b(NULL, pluginName, "IgnoreContacts", 0);
@@ -100,7 +100,7 @@ void InitVars() gbRegexMatch = db_get_b(NULL, pluginName, "RegexMatch", 0);
gbInvisDisable = db_get_b(NULL, pluginName, "DisableInInvis", 0);
gbIgnoreURL = db_get_b(NULL, pluginName, "IgnoreURL", 0);
- gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", _T("Not Spammers"));
+ gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", L"Not Spammers");
gbAutoAuth = db_get_b(NULL, pluginName, "AutoAuth", 0);
gbAutoAddToServerList = db_get_b(NULL, pluginName, "AutoAddToServerList", 0);
gbAutoReqAuth = db_get_b(NULL, pluginName, "AutoReqAuth", 0);
diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp index 5878c9ce40..7c4e557c06 100755 --- a/plugins/StopSpamMod/src/options.cpp +++ b/plugins/StopSpamMod/src/options.cpp @@ -91,7 +91,7 @@ INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case ID_RESTOREDEFAULTS:
SetDlgItemText(hwnd, ID_QUESTION, defQuestion);
- SetDlgItemText(hwnd, ID_ANSWER, _T("nospam"));
+ SetDlgItemText(hwnd, ID_ANSWER, L"nospam");
SetDlgItemText(hwnd, ID_AUTHREPL, TranslateT("StopSpam: send a message and reply to an anti-spam bot question."));
SetDlgItemText(hwnd, ID_CONGRATULATION, TranslateT("Congratulations! You just passed human/robot test. Now you can write me a message."));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
@@ -111,7 +111,7 @@ INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar db_set_ws(NULL, pluginName, "question", GetDlgItemString(hwnd, ID_QUESTION).c_str());
gbQuestion = DBGetContactSettingStringPAN(NULL, pluginName, "question", defQuestion);
db_set_ws(NULL, pluginName, "answer", GetDlgItemString(hwnd, ID_ANSWER).c_str());
- gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", _T("nospam"));
+ gbAnswer = DBGetContactSettingStringPAN(NULL, pluginName, "answer", L"nospam");
db_set_ws(NULL, pluginName, "authrepl", GetDlgItemString(hwnd, ID_AUTHREPL).c_str());
gbAuthRepl = DBGetContactSettingStringPAN(NULL, pluginName, "authrepl", TranslateT("StopSpam: send a message and reply to an anti-spam bot question."));
db_set_ws(NULL, pluginName, "congratulation", GetDlgItemString(hwnd, ID_CONGRATULATION).c_str());
@@ -272,11 +272,11 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar {
static tstring NewGroupName, CurrentGroupName;
NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
- CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0"));
+ CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", L"0");
if (mir_wstrcmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0) {
bool GroupExist = Clist_GroupExists(NewGroupName.c_str()) != NULL;
db_set_ws(NULL, pluginName, "SpammersGroup", NewGroupName.c_str());
- gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("Spammers"));
+ gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", L"Spammers");
if (!GroupExist && gbSpecialGroup)
Clist_GroupCreate(0, gbSpammersGroup.c_str());
}
@@ -296,11 +296,11 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar {
static tstring NewAGroupName, CurrentAGroupName;
NewAGroupName = GetDlgItemString(hwnd, IDC_AUTOADDGROUP);
- CurrentAGroupName = gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", _T("0"));
+ CurrentAGroupName = gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", L"0");
if (mir_wstrcmp(CurrentAGroupName.c_str(), NewAGroupName.c_str()) != 0) {
bool GroupExist = Clist_GroupExists(NewAGroupName.c_str()) != NULL;
db_set_ws(NULL, pluginName, "AutoAuthGroup", NewAGroupName.c_str());
- gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", _T("Not Spammers"));
+ gbAutoAuthGroup = DBGetContactSettingStringPAN(NULL, pluginName, "AutoAuthGroup", L"Not Spammers");
if (!GroupExist && gbAutoAddToServerList)
Clist_GroupCreate(0, gbAutoAuthGroup.c_str());
}
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index 81a31bda8e..918ec129aa 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -173,15 +173,15 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // send congratulation if (bSendMsg) { - tstring prot = DBGetContactSettingStringPAN(NULL, dbei->szModule, "AM_BaseProto", _T("")); + tstring prot = DBGetContactSettingStringPAN(NULL, dbei->szModule, "AM_BaseProto", L""); // for notICQ protocols or disable auto auth. reqwest - if ((Stricmp(_T("ICQ"), prot.c_str())) || (!gbAutoReqAuth)) { + if ((Stricmp(L"ICQ", prot.c_str())) || (!gbAutoReqAuth)) { char * buf = mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str()); ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf); mir_free(buf); } // Note: For ANSI can be not work - if (!Stricmp(_T("ICQ"), prot.c_str())) { + if (!Stricmp(L"ICQ", prot.c_str())) { // grand auth. if (gbAutoAuth) CallProtoService(dbei->szModule, "/GrantAuth", w, 0); @@ -203,22 +203,22 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // if message message does not contain infintite talk protection prefix // and question count for this contact is less then maximum if (bSendMsg) { - if ((!gbInfTalkProtection || tstring::npos == message.find(_T("StopSpam automatic message:\r\n"))) + if ((!gbInfTalkProtection || tstring::npos == message.find(L"StopSpam automatic message:\r\n")) && (!gbMaxQuestCount || db_get_dw(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount)) { // send question tstring q; if (gbInfTalkProtection) - q += _T("StopSpam automatic message:\r\n"); + q += L"StopSpam automatic message:\r\n"; if (gbMathExpression) { //parse math expression in question tstring tmp_question = gbQuestion; std::list<int> args; std::list<TCHAR> actions; - tstring::size_type p1 = gbQuestion.find(_T("X")), p2 = 0; - const tstring expr_chars = _T("X+-/*"), expr_acts = _T("+-/*"); + tstring::size_type p1 = gbQuestion.find(L"X"), p2 = 0; + const tstring expr_chars = L"X+-/*", expr_acts = L"+-/*"; while (p1 < gbQuestion.length() && p1 != tstring::npos && expr_chars.find(gbQuestion[p1]) != tstring::npos) { std::string arg; p2 = p1; - for (p1 = gbQuestion.find(_T("X"), p1); (p1 < gbQuestion.length()) && (gbQuestion[p1] == L'X'); ++p1) + for (p1 = gbQuestion.find(L"X", p1); (p1 < gbQuestion.length()) && (gbQuestion[p1] == L'X'); ++p1) arg += get_random_num(1); tmp_question.replace(p2, arg.size(), toUTF16(arg)); diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 16265231d2..bfa076de6a 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -192,7 +192,7 @@ tstring GetContactUid(MCONTACT hContact, tstring Protocol) {
char *szProto = mir_utf8encodeW(Protocol.c_str());
ptrT uid(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
- return (uid) ? uid : _T("");
+ return (uid) ? uid : L"";
}
void LogSpamToFile(MCONTACT hContact, tstring message)
@@ -204,12 +204,12 @@ void LogSpamToFile(MCONTACT hContact, tstring message) TCHAR pszName[MAX_PATH];
if (hStopSpamLogDirH)
- FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, _T(""));
+ FoldersGetCustomPathT(hStopSpamLogDirH, pszName, MAX_PATH, L"");
else
- mir_tstrncpy(pszName, VARST(_T("%miranda_logpath%")), _countof(pszName));
+ mir_tstrncpy(pszName, VARST(L"%miranda_logpath%"), _countof(pszName));
tstring filename = pszName;
- filename += _T("\\stopspam_mod.log");
+ filename += L"\\stopspam_mod.log";
file.open(filename.c_str(), std::ios::out | std::ios::app);
// Time Log line
@@ -221,16 +221,16 @@ void LogSpamToFile(MCONTACT hContact, tstring message) // Time Log line
// Name, UID and Protocol Log line
- LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", _T(""));
+ LogProtocol = DBGetContactSettingStringPAN(hContact, "Protocol", "p", L"");
LogContactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0);
- LogContactId = (LogProtocol == _T("")) ? _T("") : GetContactUid(hContact, LogProtocol);
+ LogContactId = (LogProtocol == L"") ? L"" : GetContactUid(hContact, LogProtocol);
// Name, UID and Protocol Log line
- LogStrW = _T("[") + LogTime.substr(0, LogTime.length() - 1) + _T("] ") +
- LogContactId + _T(" - ") +
- LogContactName + _T(" (") +
- LogProtocol + _T("): ") +
- message + _T("\n");
+ LogStrW = L"[" + LogTime.substr(0, LogTime.length() - 1) + L"] " +
+ LogContactId + L" - " +
+ LogContactName + L" (" +
+ LogProtocol + L"): " +
+ message + L"\n";
char *buf = mir_u2a(LogStrW.c_str());
file.write(buf, LogStrW.length());
@@ -252,14 +252,14 @@ void CleanProtocolTmpThread(std::string proto) std::list<MCONTACT> contacts;
for (MCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
- if (db_get_b(hContact, "CList", "NotOnList", 0) || (_T("Not In List") == DBGetContactSettingStringPAN(hContact, "CList", "Group", _T(""))))
+ if (db_get_b(hContact, "CList", "NotOnList", 0) || (L"Not In List" == DBGetContactSettingStringPAN(hContact, "CList", "Group", L"")))
contacts.push_back(hContact);
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
std::list<MCONTACT>::iterator end = contacts.end();
for (std::list<MCONTACT>::iterator i = contacts.begin(); i != end; ++i) {
- LogSpamToFile(*i, _T("Deleted"));
+ LogSpamToFile(*i, L"Deleted");
HistoryLogFunc(*i, "Deleted");
CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
}
@@ -284,7 +284,7 @@ void CleanProtocolExclThread(std::string proto) clean_mutex.lock();
std::list<MCONTACT>::iterator end = contacts.end();
for (std::list<MCONTACT>::iterator i = contacts.begin(); i != end; ++i) {
- LogSpamToFile(*i, _T("Deleted"));
+ LogSpamToFile(*i, L"Deleted");
HistoryLogFunc(*i, "Deleted");
CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
}
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 0310bb6c13..9b821b1aa3 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -27,7 +27,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam) MCONTACT hNext = db_find_next(hContact);
ptrT szGroup(db_get_tsa(hContact, "CList", "Group"));
- if (db_get_b(hContact, "CList", "NotOnList", 0) || (szGroup != NULL && (_tcsstr(szGroup, _T("Not In List")) || _tcsstr(szGroup, TranslateT("Not In List"))))) {
+ if (db_get_b(hContact, "CList", "NotOnList", 0) || (szGroup != NULL && (_tcsstr(szGroup, L"Not In List") || _tcsstr(szGroup, TranslateT("Not In List"))))) {
char *szProto = GetContactProto(hContact);
if (szProto != NULL) {
// Check if protocol uses server side lists
diff --git a/plugins/StopSpamPlus/src/settings.h b/plugins/StopSpamPlus/src/settings.h index 9f2fbb8fbb..22c005649e 100644 --- a/plugins/StopSpamPlus/src/settings.h +++ b/plugins/StopSpamPlus/src/settings.h @@ -61,21 +61,21 @@ public: db_setting<bool> RemTmpAll;
db_setting<bool> HistLog;
- Settings():Question("Question",TranslateTS(_T("Spammers made me to install small anti-spam system you are now speaking with. ")
- _T("Please reply \"nospam\" without quotes and spaces if you want to contact me.\r\n")
- _T("Âíèìàíèå! Àíòèñïàì çàùèòà. Îòâåòüòå \"nospam\" áåç êàâû÷åê è ïðîáåëîâ, åñëè õîòèòå ñâÿçàòüñÿ ñî ìíîé.")))
- ,AuthRepl("AuthReply",TranslateTS(_T("StopSpam: send a message and reply to a anti-spam bot question.\r\n")
- _T("Àíòèñïàì: îòïðàâüòå ñîîáùåíèå è îòâåòüòå íà âîïðîñ àíòèñïàì ñèñòåìû.")))
- ,Answer("Answer",_T("nospam"))
- ,Congratulation("Congratulation",TranslateTS(_T("Congratulations! You just passed human/robot test. Now you can write me a message.\r\n")
- _T("Ïîçäðàâëÿþ! Âû ïðîøëè àíòèñïàì ïðîâåðêó. Òåïåðü âû ìîæåòå ïèñàòü ìíå.")))
+ Settings():Question("Question",TranslateTS(L"Spammers made me to install small anti-spam system you are now speaking with. "
+ L"Please reply \"nospam\" without quotes and spaces if you want to contact me.\r\n"
+ L"Âíèìàíèå! Àíòèñïàì çàùèòà. Îòâåòüòå \"nospam\" áåç êàâû÷åê è ïðîáåëîâ, åñëè õîòèòå ñâÿçàòüñÿ ñî ìíîé."))
+ ,AuthRepl("AuthReply",TranslateTS(L"StopSpam: send a message and reply to a anti-spam bot question.\r\n"
+ L"Àíòèñïàì: îòïðàâüòå ñîîáùåíèå è îòâåòüòå íà âîïðîñ àíòèñïàì ñèñòåìû."))
+ ,Answer("Answer",L"nospam")
+ ,Congratulation("Congratulation",TranslateTS(L"Congratulations! You just passed human/robot test. Now you can write me a message.\r\n"
+ L"Ïîçäðàâëÿþ! Âû ïðîøëè àíòèñïàì ïðîâåðêó. Òåïåðü âû ìîæåòå ïèñàòü ìíå."))
,DisabledProtoList("DisabledProtoList","MetaContacts RSSNews")
,InfTalkProtection("InfTalkProtection", 1)
,AddPermanent("AddPermanent", 0)
,HandleAuthReq("HandleAuthReq", 0)
,MaxQuestCount("MaxQuestCount", 2)
,AnswNotCaseSens("AnswNotCaseSens", 1)
- ,AnswSplitString("AnswSplitString",_T("|"))
+ ,AnswSplitString("AnswSplitString",L"|")
,RemTmpAll("RemTmpAll", 1)
,HistLog("HistLog", 0)
{
diff --git a/plugins/StopSpamPlus/src/stdafx.h b/plugins/StopSpamPlus/src/stdafx.h index 1b2ac5b2e1..b22afebe4d 100644 --- a/plugins/StopSpamPlus/src/stdafx.h +++ b/plugins/StopSpamPlus/src/stdafx.h @@ -50,7 +50,7 @@ void SetDlgItemString(HWND hwndDlg, UINT idItem, std::wstring const &str); tstring &GetDlgItemString(HWND hwnd, int id);
bool IsExistMyMessage(MCONTACT hContact);
tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact);
-tstring trim(tstring const &tstr, tstring const &trimChars = _T(" \f\n\r\t\v"));
+tstring trim(tstring const &tstr, tstring const &trimChars = L" \f\n\r\t\v");
INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/);
INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam);
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp index e9fa955ba7..0b617519da 100644 --- a/plugins/StopSpamPlus/src/utils.cpp +++ b/plugins/StopSpamPlus/src/utils.cpp @@ -68,7 +68,7 @@ tstring trim(const tstring &tstr, const tstring& trimChars) size_t e = tstr.find_last_not_of(trimChars);
if ((tstring::npos == s) || (tstring::npos == e))
- return _T("");
+ return L"";
else
return tstr.substr(s, e - s + 1);
}
\ No newline at end of file diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 5f882b5faa..adb7c964c5 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -349,7 +349,7 @@ static void BB_RegisterSeparators() } } -#define MIDDLE_SEPARATOR _T(">-------M-------<") +#define MIDDLE_SEPARATOR L">-------M-------<" static int SaveTree(HWND hToolBarTree) { @@ -1070,7 +1070,7 @@ void BB_InitDlgButtons(TWindowData *dat) if (!cbd->m_bHidden && !cbd->m_bCanBeHidden) dat->iButtonBarReallyNeeds += cbd->m_iButtonWidth + gap; if (!cbd->m_bSeparator && !GetDlgItem(hdlg, cbd->m_dwButtonCID)) { - hwndBtn = CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.right - rwidth + gap, splitterY, cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL); + hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.right - rwidth + gap, splitterY, cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL); CustomizeButton(hwndBtn); } if (!cbd->m_bSeparator && hwndBtn) @@ -1092,7 +1092,7 @@ void BB_InitDlgButtons(TWindowData *dat) CustomButtonData *cbd = LButtonsList[i]; if (((dat->bType == SESSIONTYPE_IM && cbd->m_bIMButton) || (dat->bType == SESSIONTYPE_CHAT && cbd->m_bChatButton))) { if (!cbd->m_bSeparator && !GetDlgItem(hdlg, cbd->m_dwButtonCID)) { - hwndBtn = CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 2 + lwidth, splitterY, + hwndBtn = CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 2 + lwidth, splitterY, cbd->m_iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU)cbd->m_dwButtonCID, g_hInst, NULL); CustomizeButton(hwndBtn); } diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h index a9a6f92ff9..536f837528 100644 --- a/plugins/TabSRMM/src/chat/chat.h +++ b/plugins/TabSRMM/src/chat/chat.h @@ -160,6 +160,6 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce); extern char szIndicators[];
-#define DEFLOGFILENAME _T("%miranda_logpath%\\%proto%\\%userid%.log")
+#define DEFLOGFILENAME L"%miranda_logpath%\\%proto%\\%userid%.log"
#endif
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 33121fd580..a7894b3e37 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -115,7 +115,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** szTemp3[1] = line[2];
szTemp3[2] = '\0';
col = _ttoi(szTemp3);
- mir_sntprintf(szTemp, _T("%%%c#%02X%02X%02X"), c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
+ mir_sntprintf(szTemp, L"%%%c#%02X%02X%02X", c, GetRValue(mi->crColors[col]), GetGValue(mi->crColors[col]), GetBValue(mi->crColors[col]));
}
}
line += 2;
@@ -123,7 +123,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** case 'C':
case 'F':
if (!g_Settings.bStripFormat && !streamData->bStripFormat) {
- mir_sntprintf(szTemp, _T("%%%c"), *line);
+ mir_sntprintf(szTemp, L"%%%c", *line);
}
break;
case 'b':
@@ -134,7 +134,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** case 'I':
case 'r':
if (!streamData->bStripFormat) {
- mir_sntprintf(szTemp, _T("%%%c"), *line);
+ mir_sntprintf(szTemp, L"%%%c", *line);
}
break;
}
@@ -161,7 +161,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** static void AddEventTextToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAlloced, LOGSTREAMDATA *streamData)
{
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
}
static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAlloced, LOGSTREAMDATA *streamData, TCHAR *pszNick)
@@ -178,14 +178,14 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl ptszText = ptszTemp = a2tcp(aText, streamData->dat->codePage);
mir_free(aText);
}
- Log_AppendIEView(streamData, FALSE, str, _T("%s"), ptszText);
+ Log_AppendIEView(streamData, FALSE, str, L"%s", ptszText);
mir_free(ptszTemp);
}
break;
case GC_EVENT_ACTION:
if (pszNick && streamData->lin->ptszText) {
- Log_AppendIEView(streamData, TRUE, str, _T("%s "), streamData->lin->ptszNick);
- Log_AppendIEView(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, TRUE, str, L"%s ", streamData->lin->ptszNick);
+ Log_AppendIEView(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_JOIN:
@@ -227,7 +227,7 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl break;
case GC_EVENT_TOPIC:
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, _T("%r"));
+ Log_AppendIEView(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, L"%r");
if (pszNick)
Log_AppendIEView(streamData, TRUE, str,
streamData->lin->ptszUserInfo ? TranslateT(" (set by %s on %s)") : TranslateT(" (set by %s)"),
@@ -235,7 +235,7 @@ static void AddEventToBufferIEView(TCHAR **buffer, int *bufferEnd, int *bufferAl break;
case GC_EVENT_INFORMATION:
if (streamData->lin->ptszText)
- Log_AppendIEView(streamData, FALSE, str, (streamData->lin->bIsMe) ? _T("--> %s") : _T("%s"), streamData->lin->ptszText);
+ Log_AppendIEView(streamData, FALSE, str, (streamData->lin->bIsMe) ? L"--> %s" : L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ADDSTATUS:
if (pszNick && streamData->lin->ptszText && streamData->lin->ptszStatus)
@@ -532,17 +532,17 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) if (streamData->lin->ptszNick) {
if (g_Settings.bLogLimitNames && mir_tstrlen(streamData->lin->ptszNick) > 20) {
_tcsncpy_s(szTemp, 20, streamData->lin->ptszNick, _TRUNCATE);
- _tcsncpy_s(szTemp + 20, 4, _T("..."), _TRUNCATE);
+ _tcsncpy_s(szTemp + 20, 4, L"...", _TRUNCATE);
}
else _tcsncpy_s(szTemp, streamData->lin->ptszNick, _TRUNCATE);
if (g_Settings.bClickableNicks)
- mir_sntprintf(szTemp2, _T("~~++#%s#++~~"), szTemp);
+ mir_sntprintf(szTemp2, L"~~++#%s#++~~", szTemp);
else
_tcsncpy_s(szTemp2, szTemp, _TRUNCATE);
if (streamData->lin->ptszUserInfo && streamData->lin->iType != GC_EVENT_TOPIC)
- mir_sntprintf(szTemp, _T("%s (%s)"), szTemp2, streamData->lin->ptszUserInfo);
+ mir_sntprintf(szTemp, L"%s (%s)", szTemp2, streamData->lin->ptszUserInfo);
else
_tcsncpy_s(szTemp, szTemp2, _TRUNCATE);
pszNick = szTemp;
@@ -551,12 +551,12 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) switch (streamData->lin->iType) {
case GC_EVENT_MESSAGE:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ACTION:
if (streamData->lin->ptszNick && streamData->lin->ptszText) {
- Log_AppendRTF(streamData, TRUE, str, _T("%s "), streamData->lin->ptszNick);
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, TRUE, str, L"%s ", streamData->lin->ptszNick);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_JOIN:
@@ -572,13 +572,13 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) if (pszNick)
Log_AppendRTF(streamData, TRUE, str, TranslateT("%s has left"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_QUIT:
if (pszNick)
Log_AppendRTF(streamData, TRUE, str, TranslateT("%s has disconnected"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NICK:
if (pszNick && streamData->lin->ptszText) {
@@ -594,17 +594,17 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) TranslateT("%s kicked %s"), streamData->lin->ptszStatus, pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NOTICE:
if (pszNick && streamData->lin->ptszText) {
Log_AppendRTF(streamData, TRUE, str, TranslateT("Notice from %s: "), pszNick);
- Log_AppendRTF(streamData, FALSE, str, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_TOPIC:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, _T("%r"));
+ Log_AppendRTF(streamData, FALSE, str, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, L"%r");
if (pszNick)
Log_AppendRTF(streamData, TRUE, str,
(streamData->lin->ptszUserInfo) ? TranslateT(" (set by %s on %s)") :
@@ -613,7 +613,7 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) break;
case GC_EVENT_INFORMATION:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, str, (streamData->lin->bIsMe) ? _T("--> %s") : _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, str, (streamData->lin->bIsMe) ? L"--> %s" : L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ADDSTATUS:
if (pszNick && streamData->lin->ptszText && streamData->lin->ptszStatus)
@@ -776,7 +776,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) _tcsncpy_s(szOldTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, streamData->si->LastTime), _TRUNCATE);
if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) {
streamData->si->LastTime = lin->time;
- Log_AppendRTF(streamData, TRUE, str, _T("%s"), szTimeStamp);
+ Log_AppendRTF(streamData, TRUE, str, L"%s", szTimeStamp);
}
str.Append("\\tab ");
}
@@ -796,10 +796,10 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) str.Append(pszIndicator);
CMString pszTemp(lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick);
- pszTemp.Replace(_T("%n"), _T("%s"));
+ pszTemp.Replace(L"%n", L"%s");
if (!lin->bIsMe) {
if (g_Settings.bClickableNicks)
- pszTemp.Replace(_T("%s"), _T("~~++#%s#++~~"));
+ pszTemp.Replace(L"%s", L"~~++#%s#++~~");
if (g_Settings.bColorizeNicksInLog && pszIndicator[0])
str.AppendFormat("\\cf%u ", OPTIONS_FONTCOUNT + streamData->crCount + crNickIndex);
@@ -935,10 +935,10 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra memset(&cf2, 0, sizeof(CHARFORMAT2));
cf2.cbSize = sizeof(cf2);
- fi2.lpstrText = _T("#++~~");
+ fi2.lpstrText = L"#++~~";
fi.chrg.cpMin = bRedraw ? 0 : sel.cpMin;
fi.chrg.cpMax = -1;
- fi.lpstrText = _T("~~++#");
+ fi.lpstrText = L"~~++#";
while (SendMessage(hwndRich, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) > -1) {
fi2.chrg.cpMin = fi.chrgText.cpMin;
@@ -947,11 +947,11 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra if (SendMessage(hwndRich, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi2) > -1) {
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&fi.chrgText);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
fi2.chrgText.cpMin -= fi.chrgText.cpMax - fi.chrgText.cpMin;
fi2.chrgText.cpMax -= fi.chrgText.cpMax - fi.chrgText.cpMin;
SendMessage(hwndRich, EM_EXSETSEL, 0, (LPARAM)&fi2.chrgText);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
fi2.chrgText.cpMax = fi2.chrgText.cpMin;
fi2.chrgText.cpMin = fi.chrgText.cpMin;
@@ -985,7 +985,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra // this uses hidden marks in the rich text to find the events which should be deleted
if (si->bTrimmed) {
TCHAR szPattern[50];
- mir_sntprintf(szPattern, _T("~-+%d+-~"), si->pLogEnd);
+ mir_sntprintf(szPattern, L"~-+%d+-~", si->pLogEnd);
FINDTEXTEX fi;
fi.lpstrText = szPattern;
@@ -996,7 +996,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedra rng.cpMin = 0;
rng.cpMax = 20;
SendMessage(hwndRich, EM_SETSEL, 0, fi.chrgText.cpMax + 1);
- SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)_T(""));
+ SendMessage(hwndRich, EM_REPLACESEL, TRUE, (LPARAM)L"");
}
si->bTrimmed = FALSE;
}
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp index a158607a14..eee0f6823d 100644 --- a/plugins/TabSRMM/src/chat/main.cpp +++ b/plugins/TabSRMM/src/chat/main.cpp @@ -181,8 +181,8 @@ static void OnLoadSettings() pci->LoadMsgDlgFont(5, &lf, NULL);
g_Settings.UserListFonts[CHAT_STATUS_OFFLINE] = CreateFontIndirect(&lf);
- int ih = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFonts[CHAT_STATUS_NORMAL], false);
- int ih2 = GetTextPixelSize(_T("AQGglo"), g_Settings.UserListFonts[CHAT_STATUS_AWAY], false);
+ int ih = GetTextPixelSize(L"AQGglo", g_Settings.UserListFonts[CHAT_STATUS_NORMAL], false);
+ int ih2 = GetTextPixelSize(L"AQGglo", g_Settings.UserListFonts[CHAT_STATUS_AWAY], false);
g_Settings.iNickListFontHeight = max(M.GetByte(CHAT_MODULE, "NicklistRowDist", 12), (ih > ih2 ? ih : ih2));
for (int i = 0; i < 5; i++) {
@@ -269,7 +269,7 @@ int Chat_Load() {
CheckUpdate();
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Message Sessions") _T("/") LPGENT("Group chats"), FONTMODE_ALTER };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Message Sessions") L"/" LPGENT("Group chats"), FONTMODE_ALTER };
mir_getCI(&data);
saveCI = *pci;
pci->OnCreateModule = OnCreateModule;
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index c28cc51af0..36c9ec9d29 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -60,32 +60,32 @@ struct ColorOptionsList static ColorOptionsList _clrs[] = {
{ 0, LPGENT("Message Sessions"), LPGENT("Input area background"), "inputbg", SRMSGDEFSET_BKGCOLOUR },
{ 1, LPGENT("Message Sessions"), LPGENT("Log background"), SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
- { 5, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), LPGENT("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), LPGENT("Panel background low"), "ipfieldsbg", 0x62caff },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), LPGENT("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Toolbar background high"), "tbBgHigh", 0 },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Toolbar background low"), "tbBgLow", 0 },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Window fill color"), "fillColor", 0 },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Text area borders"), "cRichBorders", 0 },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Common colors"), LPGENT("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Outgoing background"), "outbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Incoming background"), "inbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Status background"), "statbg", SRMSGDEFSET_BKGCOLOUR },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Incoming background(old)"), "oldinbg", SRMSGDEFSET_BKGINCOLOUR },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Outgoing background(old)"), "oldoutbg", SRMSGDEFSET_BKGOUTCOLOUR },
+ { 5, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), LPGENT("Horizontal Grid Lines"), "hgrid", RGB(224, 224, 224) },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), LPGENT("Panel background low"), "ipfieldsbg", 0x62caff },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), LPGENT("Panel background high"), "ipfieldsbgHigh", 0xf0f0f0 },
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Toolbar background high"), "tbBgHigh", 0 },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Toolbar background low"), "tbBgLow", 0 },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Window fill color"), "fillColor", 0 },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Text area borders"), "cRichBorders", 0 },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Aero glow effect"), "aeroGlow", RGB(40, 40, 255) },
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Common colors"), LPGENT("Generic text color (only when fill color is set)"), "genericTxtClr", 0xff000000 | COLOR_BTNTEXT },
};
static ColorOptionsList _tabclrs[] = {
- { 0, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
- { 1, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
- { 2, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
- { 3, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
-
- { 4, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
- { 5, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
- { 6, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
- { 7, LPGENT("Message Sessions") _T("/") LPGENT("Tabs"), LPGENT("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
+ { 0, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Normal text"), "tab_txt_normal", 0xff000000 | COLOR_BTNTEXT },
+ { 1, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Active text"), "tab_txt_active", 0xff000000 | COLOR_BTNTEXT },
+ { 2, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Hovered text"), "tab_txt_hottrack", 0xff000000 | COLOR_HOTLIGHT },
+ { 3, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Unread text"), "tab_txt_unread", 0xff000000 | COLOR_HOTLIGHT },
+
+ { 4, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Normal background"), "tab_bg_normal", 0xff000000 | COLOR_3DFACE },
+ { 5, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Active background"), "tab_bg_active", 0xff000000 | COLOR_3DFACE },
+ { 6, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Hovered background"), "tab_bg_hottrack", 0xff000000 | COLOR_3DFACE },
+ { 7, LPGENT("Message Sessions") L"/" LPGENT("Tabs"), LPGENT("Unread background"), "tab_bg_unread", 0xff000000 | COLOR_3DFACE }
};
extern LOGFONT lfDefault;
@@ -111,8 +111,8 @@ static FontOptionsList IM_fontOptionsList[] = { { LPGENT("* Status changes"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("* Dividers"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("* Error and warning messages"), RGB(50, 50, 50), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
- { LPGENT("* Symbols (incoming)"), RGB(50, 50, 50), _T("Webdings"), SYMBOL_CHARSET, 0, -12 },
- { LPGENT("* Symbols (outgoing)"), RGB(50, 50, 50), _T("Webdings"), SYMBOL_CHARSET, 0, -12 },
+ { LPGENT("* Symbols (incoming)"), RGB(50, 50, 50), L"Webdings", SYMBOL_CHARSET, 0, -12 },
+ { LPGENT("* Symbols (outgoing)"), RGB(50, 50, 50), L"Webdings", SYMBOL_CHARSET, 0, -12 },
};
static FontOptionsList IP_fontOptionsList[] = {
@@ -222,7 +222,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM mir_snprintf(str, "Font%d", i);
if ((i == 17 && !mir_strcmp(szMod, CHATFONT_MODULE)) || ((i == 20 || i == 21) && !mir_strcmp(szMod, FONTMODULE))) {
lf->lfCharSet = SYMBOL_CHARSET;
- _tcsncpy_s(lf->lfFaceName, _T("Webdings"), _TRUNCATE);
+ _tcsncpy_s(lf->lfFaceName, L"Webdings", _TRUNCATE);
}
else {
ptrT tszDefFace(db_get_tsa(NULL, szMod, str));
@@ -411,7 +411,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM FillBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), hListHeading2, branch2, _countof(branch2), 0x0000);
TCHAR* pszGroup = NULL;
- InitSetting(pszGroup, "AddToGroup", _T("Chat rooms"));
+ InitSetting(pszGroup, "AddToGroup", L"Chat rooms");
SetDlgItemText(hwndDlg, IDC_GROUP, pszGroup);
mir_free(pszGroup);
}
@@ -444,7 +444,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM GetDlgItemText(hwndDlg, IDC_GROUP, pszText, iLen + 1);
db_set_ts(NULL, CHAT_MODULE, "AddToGroup", pszText);
}
- else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", _T(""));
+ else db_set_ts(NULL, CHAT_MODULE, "AddToGroup", L"");
mir_free(pszText);
@@ -509,8 +509,8 @@ void RegisterFontServiceFonts() fid.deffontsettings.charset = lf.lfCharSet;
fid.flags = fid.flags & ~FIDF_CLASSMASK | (fid.deffontsettings.style&FONTF_BOLD ? FIDF_CLASSHEADER : FIDF_CLASSGENERAL);
_tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), _countof(fid.backgroundGroup));
- _tcsncpy(fid.group, LPGENT("Message Sessions") _T("/") LPGENT("Single Messaging"), _countof(fid.group));
+ _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), _countof(fid.backgroundGroup));
+ _tcsncpy(fid.group, LPGENT("Message Sessions") L"/" LPGENT("Single Messaging"), _countof(fid.group));
switch (i) {
case MSGFONTID_MYMSG:
case 1:
@@ -546,7 +546,7 @@ void RegisterFontServiceFonts() _tcsncpy(fid.backgroundName, LPGENT("Log background"), _countof(fid.backgroundName));
break;
case 19:
- _tcsncpy(fid.backgroundName, _T(""), _countof(fid.backgroundName));
+ _tcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
break;
default:
_tcsncpy(fid.backgroundName, LPGENT("Incoming background"), _countof(fid.backgroundName));
@@ -557,8 +557,8 @@ void RegisterFontServiceFonts() fontOptionsList = IP_fontOptionsList;
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
- _tcsncpy(fid.group, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), _countof(fid.group));
- _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") _T("/") LPGENT("Info Panel"), _countof(fid.backgroundGroup));
+ _tcsncpy(fid.group, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), _countof(fid.group));
+ _tcsncpy(fid.backgroundGroup, LPGENT("Message Sessions") L"/" LPGENT("Info Panel"), _countof(fid.backgroundGroup));
_tcsncpy(fid.backgroundName, LPGENT("Fields background"), _countof(fid.backgroundName));
for (int i = 0; i < IPFONTCOUNT; i++) {
LoadMsgDlgFont(FONTSECTION_IP, i + 100, &lf, &fontOptionsList[i].colour, FONTMODULE);
@@ -574,14 +574,14 @@ void RegisterFontServiceFonts() fid.deffontsettings.charset = lf.lfCharSet;
_tcsncpy(fid.deffontsettings.szFace, lf.lfFaceName, LF_FACESIZE);
if (i == IPFONTCOUNT - 1) {
- _tcsncpy(fid.backgroundGroup, _T(""), _countof(fid.backgroundGroup));
- _tcsncpy(fid.backgroundName, _T(""), _countof(fid.backgroundName));
+ _tcsncpy(fid.backgroundGroup, L"", _countof(fid.backgroundGroup));
+ _tcsncpy(fid.backgroundName, L"", _countof(fid.backgroundName));
_tcsncpy(fid.group, LPGENT("Message Sessions"), _countof(fid.group));
}
FontRegisterT(&fid);
}
- _tcsncpy(cid.group, LPGENT("Message Sessions") _T("/") LPGENT("Group chats"), _countof(cid.group));
+ _tcsncpy(cid.group, LPGENT("Message Sessions") L"/" LPGENT("Group chats"), _countof(cid.group));
strncpy(cid.dbSettingsGroup, CHAT_MODULE, _countof(cid.dbSettingsGroup));
for (int i = 0; i <= 7; i++) {
mir_snprintf(szTemp, "NickColor%d", i);
@@ -692,36 +692,36 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM TCHAR tszTooltipText[2048];
mir_sntprintf(tszTooltipText,
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
- _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n"
+ L"%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s",
// contact vars
- _T("%nick%"), TranslateT("nick of current contact (if defined)"),
- _T("%proto%"), TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
- _T("%accountname%"), TranslateT("user-defined account name of current contact (if defined)."),
- _T("%userid%"), TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
+ L"%nick%", TranslateT("nick of current contact (if defined)"),
+ L"%proto%", TranslateT("protocol name of current contact (if defined). Account name is used when protocol supports multiple accounts"),
+ L"%accountname%", TranslateT("user-defined account name of current contact (if defined)."),
+ L"%userid%", TranslateT("user ID of current contact (if defined). It is like UIN for ICQ, JID for Jabber, etc."),
// global vars
- _T("%miranda_path%"), TranslateT("path to Miranda root folder"),
- _T("%miranda_profilesdir%"), TranslateT("path to folder containing Miranda profiles"),
- _T("%miranda_profilename%"), TranslateT("name of current Miranda profile (filename, without extension)"),
- _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
- _T("%miranda_logpath%"), TranslateT("will return parsed string %miranda_userdata%\\Logs"),
- _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
- _T("%username%"), TranslateT("username for currently logged-on Windows user"),
- _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
- _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
- _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
+ L"%miranda_path%", TranslateT("path to Miranda root folder"),
+ L"%miranda_profilesdir%", TranslateT("path to folder containing Miranda profiles"),
+ L"%miranda_profilename%", TranslateT("name of current Miranda profile (filename, without extension)"),
+ L"%miranda_userdata%", TranslateT("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"),
+ L"%miranda_logpath%", TranslateT("will return parsed string %miranda_userdata%\\Logs"),
+ L"%appdata%", TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ L"%username%", TranslateT("username for currently logged-on Windows user"),
+ L"%mydocuments%", TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ L"%desktop%", TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ L"%xxxxxxx%", TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)"),
// date/time vars
- _T("%d%"), TranslateT("day of month, 1-31"),
- _T("%dd%"), TranslateT("day of month, 01-31"),
- _T("%m%"), TranslateT("month number, 1-12"),
- _T("%mm%"), TranslateT("month number, 01-12"),
- _T("%mon%"), TranslateT("abbreviated month name"),
- _T("%month%"), TranslateT("full month name"),
- _T("%yy%"), TranslateT("year without century, 01-99"),
- _T("%yyyy%"), TranslateT("year with century, 1901-9999"),
- _T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name"));
+ L"%d%", TranslateT("day of month, 1-31"),
+ L"%dd%", TranslateT("day of month, 01-31"),
+ L"%m%", TranslateT("month number, 1-12"),
+ L"%mm%", TranslateT("month number, 01-12"),
+ L"%mon%", TranslateT("abbreviated month name"),
+ L"%month%", TranslateT("full month name"),
+ L"%yy%", TranslateT("year without century, 01-99"),
+ L"%yyyy%", TranslateT("year with century, 1901-9999"),
+ L"%wday%", TranslateT("abbreviated weekday name"),
+ L"%weekday%", TranslateT("full weekday name"));
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"));
}
if (hPathTip)
@@ -757,12 +757,12 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM *p1 = 0;
TCHAR tszInitialDir[_MAX_DRIVE + _MAX_PATH + 10];
- mir_sntprintf(tszInitialDir, _T("%s%s"), M.getChatLogPath(), p);
+ mir_sntprintf(tszInitialDir, L"%s%s", M.getChatLogPath(), p);
if (!PathFileExists(tszInitialDir))
_tcsncpy_s(tszInitialDir, M.getChatLogPath(), _TRUNCATE);
TCHAR tszReturnName[MAX_PATH]; tszReturnName[0] = 0;
- mir_sntprintf(tszTemp, _T("%s%c*.*%c%c"), TranslateT("All files"), 0, 0, 0);
+ mir_sntprintf(tszTemp, L"%s%c*.*%c%c", TranslateT("All files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lpstrInitialDir = tszInitialDir;
@@ -772,7 +772,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
- ofn.lpstrDefExt = _T("log");
+ ofn.lpstrDefExt = L"log";
GetOpenFileName(&ofn);
}
break;
@@ -795,7 +795,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM if (idList) {
const TCHAR *szUserDir = M.getUserDir();
SHGetPathFromIDList(idList, tszDirectory);
- mir_tstrcat(tszDirectory, _T("\\"));
+ mir_tstrcat(tszDirectory, L"\\");
TCHAR tszTemp[MAX_PATH];
PathToRelativeT(tszDirectory, tszTemp, szUserDir);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 0215f305f7..d892fc66aa 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -34,10 +34,10 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT if (M.FindWindow(hContact) != 0)
return 0;
- if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6)) {
- if ((pContainer = FindMatchingContainer(_T("default"))) == NULL) {
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, L"default", 6)) {
+ if ((pContainer = FindMatchingContainer(L"default")) == NULL) {
TCHAR szName[CONTAINER_NAMELEN + 1];
- mir_sntprintf(szName, _T("default"));
+ mir_sntprintf(szName, L"default");
if ((pContainer = CreateContainer(szName, CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
}
@@ -59,7 +59,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT else
_tcsncpy_s(newcontactname, contactName, _TRUNCATE);
}
- else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE);
+ else _tcsncpy_s(newcontactname, L"_U_", _TRUNCATE);
newData.item.pszText = newcontactname;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
@@ -167,8 +167,8 @@ void ShowRoom(SESSION_INFO *si, WPARAM, BOOL) TContainerData *pContainer = si->pContainer;
if (pContainer == NULL) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
- if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, _T("default")))
- _tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
+ if (!g_Settings.bOpenInDefault && !mir_tstrcmp(szName, L"default"))
+ _tcsncpy(szName, L"Chat Rooms", CONTAINER_NAMELEN);
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index febc897b1b..98a3b8f603 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -113,7 +113,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa pd.lchIcon = LoadIconEx("window");
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
- mir_sntprintf(pd.lptzContactName, _T("%s - %s"), (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(pd.lptzContactName, L"%s - %s", (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, pcli->pfnGetContactDisplayName(hContact, 0));
_tcsncpy_s(pd.lptzText, TranslateTS(szBuf), _TRUNCATE);
pd.iSeconds = g_Settings.iPopupTimeout;
@@ -146,10 +146,10 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce) TCHAR *bbStart, *bbEnd;
if (g_Settings.bBBCodeInPopups) {
- bbStart = _T("[b]");
- bbEnd = _T("[/b]");
+ bbStart = L"[b]";
+ bbEnd = L"[/b]";
}
- else bbStart = bbEnd = _T("");
+ else bbStart = bbEnd = L"";
if (nen_options.iMUCDisable) // no popups at all. Period
return 0;
@@ -478,7 +478,7 @@ TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2) {
int i, j, k;
- _tsetlocale(LC_ALL, _T(""));
+ _tsetlocale(LC_ALL, L"");
for (i = 0; s1[i]; i++)
for (j = i, k = 0; _totlower(s1[j]) == _totlower(s2[k]); j++, k++)
if (!s2[k + 1])
@@ -546,7 +546,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO _tcsncpy_s(szTemp, TranslateT("&Message"), _TRUNCATE);
if (mir_tstrlen(szTemp) > 40)
- _tcsncpy_s(szTemp + 40, 4, _T("..."), _TRUNCATE);
+ _tcsncpy_s(szTemp + 40, 4, L"...", _TRUNCATE);
ModifyMenu(*hMenu, ID_MESS, MF_STRING | MF_BYCOMMAND, ID_MESS, szTemp);
gcmi.Type = MENU_ON_NICKLIST;
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 71bdd2811b..c633d50ee9 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -141,7 +141,7 @@ bool IsStringValidLink(TCHAR *pszText) if (_totlower(pszText[0]) == 'w' && _totlower(pszText[1]) == 'w' && _totlower(pszText[2]) == 'w' && pszText[3] == '.' && _istalnum(pszText[4])) return true; - return _tcsstr(pszText, _T("://")) != NULL; + return _tcsstr(pszText, L"://") != NULL; } ///////////////////////////////////////////////////////////////////////////////////////// @@ -471,7 +471,7 @@ LBL_SkipEnd: int topicStart = start; while (topicStart > 0 && (pszText[topicStart - 1] == ' ' || pszText[topicStart - 1] == 13 || pszText[topicStart - 1] == VK_TAB)) topicStart--; - if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], _T("/topic")) == &pszText[topicStart - 6]) + if (topicStart > 5 && _tcsstr(&pszText[topicStart - 6], L"/topic") == &pszText[topicStart - 6]) isTopic = TRUE; } if (dat->szSearchQuery == NULL) { @@ -843,7 +843,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, if (lpPrevCmd) SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&ste, (LPARAM)lpPrevCmd); else - SetWindowText(hwnd, _T("")); + SetWindowText(hwnd, L""); GETTEXTLENGTHEX gtl = { 0 }; gtl.flags = GTL_PRECISE; @@ -1321,7 +1321,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *pa } 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"), ui1->pszNick, TranslateT("Unique ID"), ui1->pszUID, TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui1->Status)); @@ -1671,7 +1671,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, } } if (tszBuf[0] == 0) - mir_sntprintf(tszBuf, _T("<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s"), + mir_sntprintf(tszBuf, L"<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s", TranslateT("Nick"), ui1->pszNick, TranslateT("Unique ID"), ui1->pszUID, TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui1->Status)); @@ -1813,7 +1813,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar GetMYUIN(dat); GetMyNick(dat); - CustomizeButton(CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20), + CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20), hwndDlg, (HMENU)IDC_CHAT_TOGGLESIDEBAR, g_hInst, NULL)); SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTHEMEDBTN, 1, 0); SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0); @@ -1905,7 +1905,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); mir_sntprintf(szTemp, (si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"), - szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : _T("")); + szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : L""); break; case GCW_PRIVMESS: hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); @@ -1915,7 +1915,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar mir_sntprintf(szTemp, TranslateT("%s: message session (%u users)"), szNick, si->nUsersInNicklist); break; case GCW_SERVER: - mir_sntprintf(szTemp, _T("%s: Server"), szNick); + mir_sntprintf(szTemp, L"%s: Server", szNick); hIcon = LoadIconEx("window"); break; } @@ -1988,7 +1988,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar } else { if (si->ptszStatusbarText) - mir_sntprintf(szFinalStatusBarText, _T("%s %s"), mi->ptszModDispName, si->ptszStatusbarText); + mir_sntprintf(szFinalStatusBarText, L"%s %s", mi->ptszModDispName, si->ptszStatusbarText); else _tcsncpy_s(szFinalStatusBarText, mi->ptszModDispName, _TRUNCATE); } @@ -2094,7 +2094,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case GC_ACKMESSAGE: SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, FALSE, 0); - SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T("")); + SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L""); return TRUE; case DM_TYPING: @@ -2263,7 +2263,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar return TRUE; case WINDOW_CLEARLOG: - SetDlgItemText(hwndDlg, IDC_CHAT_LOG, _T("")); + SetDlgItemText(hwndDlg, IDC_CHAT_LOG, L""); return TRUE; case SESSION_TERMINATE: @@ -2564,14 +2564,14 @@ LABEL_SHOWWINDOW: 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; @@ -2684,7 +2684,7 @@ LABEL_SHOWWINDOW: CHARRANGE chr; SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&chr); - TCHAR tszAplTmpl[] = _T("%s:"); + TCHAR tszAplTmpl[] = L"%s:"; size_t bufSize = mir_tstrlen(tr.lpstrText) + mir_tstrlen(tszAplTmpl) + 3; TCHAR *tszTmp = (TCHAR*)mir_alloc(bufSize * sizeof(TCHAR)), *tszAppeal = tszTmp; @@ -2791,9 +2791,9 @@ LABEL_SHOWWINDOW: int start = LOWORD(lResult); CMString tszName; if (start == 0) - tszName.Format(_T("%s: "), ui->pszNick); + tszName.Format(L"%s: ", ui->pszNick); else - tszName.Format(_T("%s "), ui->pszNick); + tszName.Format(L"%s ", ui->pszNick); SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)tszName.GetString()); PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0); @@ -2830,13 +2830,13 @@ LABEL_SHOWWINDOW: DoRtfToTags(si->dat, ptszText, mi->nColorCount, mi->crColors); ptszText.Trim(); - ptszText.Replace(_T("%"), _T("%%")); + ptszText.Replace(L"%", L"%%"); if (mi->bAckMsg) { Utils::enableDlgControl(hwndDlg, IDC_CHAT_MESSAGE, false); SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, TRUE, 0); } - else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, _T("")); + else SetDlgItemText(hwndDlg, IDC_CHAT_MESSAGE, L""); Utils::enableDlgControl(hwndDlg, IDOK, false); diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 62781bbc5b..9f7ccd8adc 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -120,7 +120,7 @@ bool CContactCache::updateNick() TCHAR *tszNick = pcli->pfnGetContactDisplayName(getActiveContact(), 0); if (tszNick && mir_tstrcmp(m_szNick, tszNick)) fChanged = true; - _tcsncpy_s(m_szNick, (tszNick ? tszNick : _T("<undef>")), _TRUNCATE); + _tcsncpy_s(m_szNick, (tszNick ? tszNick : L"<undef>"), _TRUNCATE); } return fChanged; } @@ -343,18 +343,18 @@ void CContactCache::inputHistoryEvent(WPARAM wParam) } if (m_iHistoryCurrent == m_iHistoryTop) { if (m_history[m_iHistorySize].szText != NULL) { // replace the temp buffer - ::SetWindowText(hwndEdit, _T("")); + ::SetWindowText(hwndEdit, L""); ::SendMessage(hwndEdit, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_history[m_iHistorySize].szText); ::SendMessage(hwndEdit, EM_SETSEL, -1, -1); } } else { if (m_history[m_iHistoryCurrent].szText != NULL) { - ::SetWindowText(hwndEdit, _T("")); + ::SetWindowText(hwndEdit, L""); ::SendMessage(hwndEdit, EM_SETTEXTEX, (WPARAM)&stx, (LPARAM)m_history[m_iHistoryCurrent].szText); ::SendMessage(hwndEdit, EM_SETSEL, -1, -1); } - else ::SetWindowText(hwndEdit, _T("")); + else ::SetWindowText(hwndEdit, L""); } ::SendMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(::GetDlgCtrlID(hwndEdit), EN_CHANGE), (LPARAM)hwndEdit); m_dat->dwFlags &= ~MWF_NEEDHISTORYSAVE; diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index 9f7913b297..4be30f678b 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -29,7 +29,7 @@ #ifndef __CONTACTCACHE_H
#define __CONTACTCACHE_H
-#define C_INVALID_ACCOUNT _T("<account error>")
+#define C_INVALID_ACCOUNT L"<account error>"
#define HISTORY_INITIAL_ALLOCSIZE 300
struct TInputHistory {
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 0fe93c40d7..57edcf6d1f 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -508,11 +508,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, HMENU hSysmenu = GetSystemMenu(hwndDlg, FALSE);
int iMenuItems = GetMenuItemCount(hSysmenu);
- InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, _T(""));
+ InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, L"");
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_STAYONTOP, TranslateT("Stay on top"));
if (!CSkin::m_frameSkins)
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_NOTITLE, TranslateT("Hide title bar"));
- InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, _T(""));
+ InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_SEPARATOR, 0, L"");
InsertMenu(hSysmenu, iMenuItems++ - 2, MF_BYPOSITION | MF_STRING, IDM_MOREOPTIONS, TranslateT("Container options..."));
SetWindowText(hwndDlg, TranslateT("Message session..."));
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)PluginConfig.g_iconContainer);
@@ -1428,7 +1428,7 @@ panel_found: }
}
else if (pContainer->hwndStatus == 0) {
- pContainer->hwndStatus = CreateWindowEx(0, _T("TSStatusBarClass"), NULL, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, NULL, g_hInst, NULL);
+ pContainer->hwndStatus = CreateWindowEx(0, L"TSStatusBarClass", NULL, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, NULL, g_hInst, NULL);
if (sBarHeight && bSkinned)
SendMessage(pContainer->hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
@@ -1759,7 +1759,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo _tcsncpy(pContainer->szName, name, CONTAINER_NAMELEN + 1);
AppendToContainerList(pContainer);
- if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, _T("default")))
+ if (M.GetByte("limittabs", 0) && !mir_tstrcmp(name, L"default"))
iTemp |= CNT_CREATEFLAG_CLONED;
// save container name to the db
@@ -1785,7 +1785,7 @@ TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hCo pContainer->iContainerIndex = i;
iFound = TRUE;
}
- else if (!_tcsncmp(tszName, _T("**mir_free**"), CONTAINER_NAMELEN))
+ else if (!_tcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
iFirstFree = i;
} while (++i && iFound == FALSE);
}
@@ -1880,7 +1880,7 @@ int TSAPI CutContactName(const TCHAR *oldname, TCHAR *newname, size_t size) _tcsncpy_s(newname, size, oldname, _TRUNCATE);
else {
TCHAR fmt[30];
- mir_sntprintf(fmt, _T("%%%d.%ds..."), PluginConfig.m_iTabNameLimit, PluginConfig.m_iTabNameLimit);
+ mir_sntprintf(fmt, L"%%%d.%ds...", PluginConfig.m_iTabNameLimit, PluginConfig.m_iTabNameLimit);
mir_sntprintf(newname, size, fmt, oldname);
}
return 0;
@@ -2010,7 +2010,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName {
// single window mode using cloned (temporary) containers
if (M.GetByte("singlewinmode", 0)) {
- _tcsncpy_s(szName, iNameLen, _T("Message Session"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"Message Session", _TRUNCATE);
return 0;
}
@@ -2018,7 +2018,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName if (M.GetByte("useclistgroups", 0)) {
ptrT tszGroup(db_get_tsa(hContact, "CList", "Group"));
if (tszGroup == NULL) {
- _tcsncpy_s(szName, iNameLen, _T("default"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
}
@@ -2028,7 +2028,7 @@ int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iName ptrT tszContainerName(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (tszContainerName == NULL) {
- _tcsncpy_s(szName, iNameLen, _T("default"), _TRUNCATE);
+ _tcsncpy_s(szName, iNameLen, L"default", _TRUNCATE);
return 0;
}
@@ -2044,7 +2044,7 @@ void TSAPI DeleteContainer(int iIndex) if (tszContainerName == NULL)
return;
- db_set_ts(NULL, CONTAINER_KEY, szIndex, _T("**mir_free**"));
+ db_set_ts(NULL, CONTAINER_KEY, szIndex, L"**mir_free**");
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
@@ -2109,8 +2109,8 @@ HMENU TSAPI BuildContainerMenu() if (tszName == NULL)
break;
- if (_tcsncmp(tszName, _T("**mir_free**"), CONTAINER_NAMELEN))
- AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_tstrcmp(tszName, _T("default")) ? TranslateT("Default container") : tszName);
+ if (_tcsncmp(tszName, L"**mir_free**", CONTAINER_NAMELEN))
+ AppendMenu(hMenu, MF_STRING, IDM_CONTAINERMENU + i, !mir_tstrcmp(tszName, L"default") ? TranslateT("Default container") : tszName);
i++;
}
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 3ada2917fa..edc4d321be 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -127,7 +127,7 @@ static void ShowPage(HWND hwndDlg, int iPage, BOOL fShow) if (o_pages[iPage].szDesc != NULL)
SetDlgItemText(hwndDlg, IDC_DESC, TranslateTS(o_pages[iPage].szDesc));
else
- SetDlgItemText(hwndDlg, IDC_DESC, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DESC, L"");
}
Utils::showDlgControl(hwndDlg, IDC_O_EXPLAINGLOBALNOTIFY, (iPage == 3 && nen_options.bWindowCheck) ? SW_SHOW : SW_HIDE);
@@ -153,7 +153,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, pContainer->hWndOptions = hwndDlg;
SetWindowText(hwndDlg, TranslateT("Container options"));
TCHAR szNewTitle[128];
- mir_sntprintf(szNewTitle, _T("%s"), !mir_tstrcmp(pContainer->szName, _T("default")) ?
+ mir_sntprintf(szNewTitle, L"%s", !mir_tstrcmp(pContainer->szName, L"default") ?
TranslateT("Default container") : pContainer->szName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index ebf4e0812f..629c9a6d11 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -433,7 +433,7 @@ static TCHAR* ShortenPreview(DBEVENTINFO* dbe) }
if (fAddEllipsis) {
buf = (TCHAR*)mir_realloc(buf, (mir_tstrlen(buf) + 5) * sizeof(TCHAR));
- mir_tstrcat(buf, _T("..."));
+ mir_tstrcat(buf, L"...");
}
return buf;
}
@@ -468,13 +468,13 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe) if (szDescr && Utils::safe_strlen(szDescr, dbe->cbBlob - sizeof(DWORD) - namelength - 1) > 0) {
ptrT tszDescr(DbGetEventStringT(dbe, szDescr));
if (tszFileName && tszDescr) {
- mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, tszDescr);
+ mir_sntprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName, tszDescr);
return mir_tstrdup(buf);
}
}
if (tszFileName) {
- mir_sntprintf(buf, _T("%s: %s (%s)"), TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
+ mir_sntprintf(buf, L"%s: %s (%s)", TranslateT("Incoming file"), tszFileName, TranslateT("No description given"));
return mir_tstrdup(buf);
}
}
@@ -500,7 +500,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) TCHAR szHeader[256];
if (pdata->pluginOptions->bShowHeaders)
- mir_sntprintf(szHeader, _T("%s %d\n"), TranslateT("New messages: "), pdata->nrMerged + 1);
+ mir_sntprintf(szHeader, L"%s %d\n", TranslateT("New messages: "), pdata->nrMerged + 1);
else
szHeader[0] = 0;
@@ -512,15 +512,15 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) db_event_get(hEvent, &dbe);
TCHAR timestamp[MAX_DATASIZE];
- _tcsftime(timestamp, MAX_DATASIZE, _T("%Y.%m.%d %H:%M"), _localtime32((__time32_t *)&dbe.timestamp));
- mir_sntprintf(pdata->eventData[pdata->nrMerged].tszText, _T("\n\n%s\n"), timestamp);
+ _tcsftime(timestamp, MAX_DATASIZE, L"%Y.%m.%d %H:%M", _localtime32((__time32_t *)&dbe.timestamp));
+ mir_sntprintf(pdata->eventData[pdata->nrMerged].tszText, L"\n\n%s\n", timestamp);
TCHAR *szPreview = GetPreviewT(dbe.eventType, &dbe);
if (szPreview) {
mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
mir_free(szPreview);
}
- else mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
+ else mir_tstrncat(pdata->eventData[pdata->nrMerged].tszText, L" ", _countof(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
pdata->eventData[pdata->nrMerged].tszText[MAX_SECONDLINE - 1] = 0;
@@ -622,7 +622,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve _tcsncpy_s(pud.lptzText, szPreview, _TRUNCATE);
mir_free(szPreview);
}
- else _tcsncpy(pud.lptzText, _T(" "), MAX_SECONDLINE);
+ else _tcsncpy(pud.lptzText, L" ", MAX_SECONDLINE);
pdata->eventData = (EVENT_DATAT *)mir_alloc(NR_MERGED * sizeof(EVENT_DATAT));
pdata->eventData[0].hEvent = hEvent;
@@ -670,8 +670,8 @@ void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced) PluginConfig.m_UnreadInTray -= (mii.dwItemData & 0x0000ffff);
if (mii.dwItemData > 0 || bForced) {
TCHAR szMenuEntry[80];
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszProto,
- dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : _T("(undef)"), mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszProto,
+ dat->cache->getNick(), dat->szStatus[0] ? dat->szStatus : L"(undef)", mii.dwItemData & 0x0000ffff);
if (!bForced)
mii.dwItemData = 0;
@@ -712,7 +712,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro if (fromEvent == 2) // from chat...
mii.dwItemData |= 0x10000000;
DeleteMenu(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND);
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
PluginConfig.m_UnreadInTray++;
if (PluginConfig.m_UnreadInTray)
@@ -722,7 +722,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro else {
szNick = pcli->pfnGetContactDisplayName(hContact, 0);
if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
mii.dwItemData = fromEvent ? 1 : 0;
PluginConfig.m_UnreadInTray += (mii.dwItemData & 0x0000ffff);
@@ -740,7 +740,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro mii.fMask |= MIIM_STRING;
if (fromEvent == 2)
mii.dwItemData |= 0x10000000;
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s) [%d]", tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
mii.cch = (int)mir_tstrlen(szMenuEntry) + 1;
mii.dwTypeData = (LPTSTR)szMenuEntry;
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 8faac1dc06..5f63d6c7e5 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -44,13 +44,13 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat) } else if (dat) { TCHAR szFilter[MAX_PATH], szFilename[MAX_PATH]; - mir_sntprintf(szFilter, _T("%s%c*.rtf%c%c"), TranslateT("Rich Edit file"), 0, 0, 0); - mir_sntprintf(szFilename, _T("%s.rtf"), dat->cache->getNick()); + mir_sntprintf(szFilter, L"%s%c*.rtf%c%c", TranslateT("Rich Edit file"), 0, 0, 0); + mir_sntprintf(szFilename, L"%s.rtf", dat->cache->getNick()); Utils::sanitizeFilename(szFilename); TCHAR szInitialDir[MAX_PATH + 2]; - mir_sntprintf(szInitialDir, _T("%s%s\\"), M.getDataPath(), _T("\\Saved message logs")); + mir_sntprintf(szInitialDir, L"%s%s\\", M.getDataPath(), L"\\Saved message logs"); CreateDirectoryTreeT(szInitialDir); OPENFILENAME ofn = { 0 }; @@ -61,7 +61,7 @@ void TSAPI DM_SaveLogAsRTF(const TWindowData *dat) ofn.lpstrInitialDir = szInitialDir; ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_HIDEREADONLY; - ofn.lpstrDefExt = _T("rtf"); + ofn.lpstrDefExt = L"rtf"; if (GetSaveFileName(&ofn)) { EDITSTREAM stream = { 0 }; stream.dwCookie = (DWORD_PTR)szFilename; @@ -538,7 +538,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, TCHAR *buf = (TCHAR*)mir_alloc((iLen + 2) * sizeof(TCHAR)); GetDlgItemText(hwndDlg, IDC_MESSAGE, buf, iLen + 1); db_set_ts(dat->hContact, "UserInfo", "MyNotes", buf); - SetDlgItemText(hwndDlg, IDC_MESSAGE, _T("")); + SetDlgItemText(hwndDlg, IDC_MESSAGE, L""); if (!dat->bIsAutosizingInput) { dat->splitterY = dat->iSplitterSaved; @@ -613,7 +613,7 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)&v); TCHAR tStr[80]; - mir_sntprintf(tStr, _T("%s %d.%d.%d.%d [build %d]"), + mir_sntprintf(tStr, L"%s %d.%d.%d.%d [build %d]", TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]); SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr); } @@ -792,7 +792,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat) if (!fIsChat && GetWindowTextLength(hwndEdit) > 0) szStreamOut = Message_GetFromStream(hwndEdit); - SetWindowText(hwndEdit, _T("")); + SetWindowText(hwndEdit, L""); SendMessage(hwndLog, EM_SETBKGNDCOLOR, 0, colour); SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->inputbg); @@ -862,7 +862,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat) pf2.dxOffset = dat->pContainer->theme.left_indent + 30; if (!fIsChat) { - SetWindowText(hwndLog, _T("")); + SetWindowText(hwndLog, L""); SendMessage(hwndLog, EM_SETPARAFORMAT, 0, (LPARAM)&pf2); SendMessage(hwndLog, EM_SETLANGOPTIONS, 0, (LPARAM)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD); // set the scrollbars etc to RTL/LTR (only for manual RTL mode) @@ -1004,7 +1004,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat) if (!PluginConfig.m_bDontUseDefaultKbd) { TCHAR szBuf[20]; GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, szBuf, 20); - mir_sntprintf(szKLName, _T("0000%s"), szBuf); + mir_sntprintf(szKLName, L"0000%s", szBuf); db_set_ts(dat->hContact, SRMSGMOD_T, "locale", szKLName); } else { @@ -1053,13 +1053,13 @@ void TSAPI DM_UpdateLastMessage(const TWindowData *dat) SendMessage(dat->pContainer->hwndStatus, SB_SETICON, 0, 0); if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR) - mir_sntprintf(szBuf, _T("UID: %s"), dat->cache->getUIN()); + mir_sntprintf(szBuf, L"UID: %s", dat->cache->getUIN()); else if (dat->lastMessage) { TCHAR date[64], time[64]; - TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("d"), date, _countof(date), 0); + TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"d", date, _countof(date), 0); if (dat->pContainer->dwFlags & CNT_UINSTATUSBAR && mir_tstrlen(date) > 6) date[mir_tstrlen(date) - 5] = 0; - TimeZone_PrintTimeStamp(NULL, dat->lastMessage, _T("t"), time, _countof(time), 0); + TimeZone_PrintTimeStamp(NULL, dat->lastMessage, L"t", time, _countof(time), 0); mir_sntprintf(szBuf, TranslateT("Last received: %s at %s"), date, time); } else szBuf[0] = 0; @@ -1744,11 +1744,11 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) if (mir_tstrlen(newcontactname) != 0) { if (PluginConfig.m_bStatusOnTabs) - mir_sntprintf(newtitle, _T("%s (%s)"), newcontactname, dat->szStatus); + mir_sntprintf(newtitle, L"%s (%s)", newcontactname, dat->szStatus); else _tcsncpy_s(newtitle, newcontactname, _TRUNCATE); } - else _tcsncpy_s(newtitle, _T("Forward"), _TRUNCATE); + else _tcsncpy_s(newtitle, L"Forward", _TRUNCATE); item.mask |= TCIF_TEXT; } @@ -1767,7 +1767,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR); } } - else _tcsncpy_s(newtitle, _T("Message Session"), _TRUNCATE); + else _tcsncpy_s(newtitle, L"Message Session", _TRUNCATE); if (dat->idle != dwOldIdle || lParam != 0) { if (item.mask & TCIF_TEXT) { diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index e3ea4f20e9..688a365f04 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -35,9 +35,9 @@ bool g_bShutdown = false; CGlobals PluginConfig;
-static TContainerSettings _cnt_default = { false, CNT_FLAGS_DEFAULT, CNT_FLAGSEX_DEFAULT, 255, CInfoPanel::DEGRADE_THRESHOLD, 60, _T("%n (%s)"), 1, 0 };
+static TContainerSettings _cnt_default = { false, CNT_FLAGS_DEFAULT, CNT_FLAGSEX_DEFAULT, 255, CInfoPanel::DEGRADE_THRESHOLD, 60, L"%n (%s)", 1, 0 };
-TCHAR* CGlobals::m_default_container_name = _T("default");
+TCHAR* CGlobals::m_default_container_name = L"default";
extern HANDLE hHookButtonPressedEvt;
extern HANDLE hHookToolBarLoadedEvt;
@@ -304,7 +304,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM) if (M.GetByte("avatarmode", -1) == -1)
db_set_b(0, SRMSGMOD_T, "avatarmode", 2);
- PluginConfig.g_hwndHotkeyHandler = CreateWindowEx(0, _T("TSHK"), _T(""), WS_POPUP,
+ PluginConfig.g_hwndHotkeyHandler = CreateWindowEx(0, L"TSHK", L"", WS_POPUP,
0, 0, 40, 40, 0, 0, g_hInst, NULL);
::CreateTrayMenus(TRUE);
@@ -502,11 +502,11 @@ int CGlobals::PreshutdownSendRecv(WPARAM, LPARAM) ::NEN_WriteOptions(&nen_options);
::DestroyWindow(PluginConfig.g_hwndHotkeyHandler);
- ::UnregisterClass(_T("TSStatusBarClass"), g_hInst);
- ::UnregisterClass(_T("SideBarClass"), g_hInst);
- ::UnregisterClass(_T("TSTabCtrlClass"), g_hInst);
- ::UnregisterClass(_T("RichEditTipClass"), g_hInst);
- ::UnregisterClass(_T("TSHK"), g_hInst);
+ ::UnregisterClass(L"TSStatusBarClass", g_hInst);
+ ::UnregisterClass(L"SideBarClass", g_hInst);
+ ::UnregisterClass(L"TSTabCtrlClass", g_hInst);
+ ::UnregisterClass(L"RichEditTipClass", g_hInst);
+ ::UnregisterClass(L"TSHK", g_hInst);
return 0;
}
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index eaa4785467..8d92bde883 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -30,12 +30,12 @@ TCHAR *xStatusDescr[] =
{
- _T("Angry"), _T("Duck"), _T("Tired"), _T("Party"), _T("Beer"), _T("Thinking"), _T("Eating"),
- _T("TV"), _T("Friends"), _T("Coffee"), _T("Music"), _T("Business"), _T("Camera"), _T("Funny"),
- _T("Phone"), _T("Games"), _T("College"), _T("Shopping"), _T("Sick"), _T("Sleeping"),
- _T("Surfing"), _T("@Internet"), _T("Engineering"), _T("Typing"), _T("Eating... yummy"),
- _T("Having fun"), _T("Chit chatting"), _T("Crashing"), _T("Going to toilet"), _T("<undef>"),
- _T("<undef>"), _T("<undef>")
+ L"Angry", L"Duck", L"Tired", L"Party", L"Beer", L"Thinking", L"Eating",
+ L"TV", L"Friends", L"Coffee", L"Music", L"Business", L"Camera", L"Funny",
+ L"Phone", L"Games", L"College", L"Shopping", L"Sick", L"Sleeping",
+ L"Surfing", L"@Internet", L"Engineering", L"Typing", L"Eating... yummy",
+ L"Having fun", L"Chit chatting", L"Crashing", L"Going to toilet", L"<undef>",
+ L"<undef>", L"<undef>"
};
TInfoPanelConfig CInfoPanel::m_ipConfig = { 0 };
@@ -422,7 +422,7 @@ void CInfoPanel::RenderIPNickname(const HDC hdc, RECT &rcItem) if (szStatusMsg) {
SIZE sStatusMsg, sMask;
::GetTextExtentPoint32(hdc, szTextToShow, (int)mir_tstrlen(szTextToShow), &m_szNick);
- ::GetTextExtentPoint32(hdc, _T("A"), 1, &sMask);
+ ::GetTextExtentPoint32(hdc, L"A", 1, &sMask);
::GetTextExtentPoint32(hdc, szStatusMsg, (int)mir_tstrlen(szStatusMsg), &sStatusMsg);
DWORD dtFlagsNick = DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_NOPREFIX;
@@ -543,7 +543,7 @@ void CInfoPanel::RenderIPStatus(const HDC hdc, RECT& rcItem) TCHAR szResult[80]; szResult[0] = 0;
if (m_dat->hTimeZone) {
- TimeZone_PrintDateTime(m_dat->hTimeZone, _T("t"), szResult, _countof(szResult), 0);
+ TimeZone_PrintDateTime(m_dat->hTimeZone, L"t", szResult, _countof(szResult), 0);
GetTextExtentPoint32(hdc, szResult, (int)mir_tstrlen(szResult), &sTime);
}
@@ -670,7 +670,7 @@ void CInfoPanel::Chat_RenderIPSecondLine(const HDC hdc, RECT& rcItem) SIZE szTitle;
TCHAR szPrefix[100];
- mir_sntprintf(szPrefix, TranslateT("Topic is: %s"), _T(""));
+ mir_sntprintf(szPrefix, TranslateT("Topic is: %s"), L"");
::GetTextExtentPoint32(hdc, szPrefix, (int)mir_tstrlen(szPrefix), &szTitle);
mapRealRect(rcItem, m_rcUIN, szTitle);
if (m_hoverFlags & HOVER_UIN)
@@ -899,8 +899,8 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam) if (tszXStatusName) {
str.Append(TranslateT("\\par\\par\\ul\\b Extended status information:\\ul0\\b0 \\par "));
- str.AppendFormat(_T("%s%s%s"), tszXStatusName, m_dat->cache->getXStatusMsg() ? _T(" / ") : _T(""),
- m_dat->cache->getXStatusMsg() ? m_dat->cache->getXStatusMsg() : _T(""));
+ str.AppendFormat(L"%s%s%s", tszXStatusName, m_dat->cache->getXStatusMsg() ? L" / " : L"",
+ m_dat->cache->getXStatusMsg() ? m_dat->cache->getXStatusMsg() : L"");
if (dbv.ptszVal)
mir_free(dbv.ptszVal);
@@ -917,7 +917,7 @@ void CInfoPanel::showTip(UINT ctrlId, const LPARAM lParam) str.AppendChar('}');
// convert line breaks to rtf
- str.Replace(_T("\n"), _T("\\line "));
+ str.Replace(L"\n", L"\\line ");
POINT pt;
RECT rc = { 0, 0, 400, 600 };
@@ -1311,10 +1311,10 @@ void CInfoPanel::dismissConfig(bool fForced) CTip::CTip(const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
{
- m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, _T("RichEditTipClass"), _T(""), (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, L"RichEditTipClass", L"", (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, 0, 0, g_hInst, this);
- m_hRich = ::CreateWindowEx(0, _T("RICHEDIT50W"), _T(""), WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,
+ m_hRich = ::CreateWindowEx(0, L"RICHEDIT50W", L"", WS_CHILD | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,
0, 0, 40, 40, m_hwnd, reinterpret_cast<HMENU>(1000), g_hInst, NULL);
::SendMessage(m_hRich, EM_AUTOURLDETECT, TRUE, 0);
@@ -1416,7 +1416,7 @@ void CTip::registerClass() {
WNDCLASSEX wc = { 0 };
wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("RichEditTipClass");
+ wc.lpszClassName = L"RichEditTipClass";
wc.lpfnWndProc = CTip::WndProcStub;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(CTip *);
@@ -1503,7 +1503,7 @@ INT_PTR CALLBACK CTip::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam LONG cy = rc.bottom;
HANDLE hTheme = 0;
- mir_sntprintf(szTitle, m_szTitle ? _T("%s (%s)") : _T("%s%s"), c->getNick(), m_szTitle ? m_szTitle : _T(""));
+ mir_sntprintf(szTitle, m_szTitle ? L"%s (%s)" : L"%s%s", c->getNick(), m_szTitle ? m_szTitle : L"");
if (m_panel) {
HDC hdcMem = ::CreateCompatibleDC(hdc);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 0e2f691201..193be84d7b 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -47,7 +47,7 @@ DURT CMimAPI::m_pfnDwmUnregisterThumbnail = 0; DSIT CMimAPI::m_pfnDwmSetIconicThumbnail = 0; DSILP CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap = 0; bool CMimAPI::m_shutDown = 0; -TCHAR CMimAPI::m_userDir[] = _T("\0"); +TCHAR CMimAPI::m_userDir[] = L"\0"; bool CMimAPI::m_haveBufferedPaint = false; @@ -138,7 +138,7 @@ const TCHAR* CMimAPI::getUserDir() if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) _tcsncpy_s(m_userDir, L"%miranda_userdata%", _TRUNCATE); else - _tcsncpy_s(m_userDir, VARST(_T("%miranda_userdata%")), _TRUNCATE); + _tcsncpy_s(m_userDir, VARST(L"%miranda_userdata%"), _TRUNCATE); Utils::ensureTralingBackslash(m_userDir); } @@ -149,14 +149,14 @@ void CMimAPI::InitPaths() { const TCHAR *szUserdataDir = getUserDir(); - mir_sntprintf(m_szProfilePath, _T("%stabSRMM"), szUserdataDir); + mir_sntprintf(m_szProfilePath, L"%stabSRMM", szUserdataDir); if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) { - _tcsncpy_s(m_szChatLogsPath, _T("%miranda_logpath%"), _TRUNCATE); - _tcsncpy_s(m_szSkinsPath, _T("%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE); + _tcsncpy_s(m_szChatLogsPath, L"%miranda_logpath%", _TRUNCATE); + _tcsncpy_s(m_szSkinsPath, L"%miranda_path%\\Skins\\TabSRMM", _TRUNCATE); } else { - _tcsncpy_s(m_szChatLogsPath, VARST(_T("%miranda_logpath%")), _TRUNCATE); - _tcsncpy_s(m_szSkinsPath, VARST(_T("%miranda_path%\\Skins\\TabSRMM")), _TRUNCATE); + _tcsncpy_s(m_szChatLogsPath, VARST(L"%miranda_logpath%"), _TRUNCATE); + _tcsncpy_s(m_szSkinsPath, VARST(L"%miranda_path%\\Skins\\TabSRMM"), _TRUNCATE); } Utils::ensureTralingBackslash(m_szChatLogsPath); @@ -164,7 +164,7 @@ void CMimAPI::InitPaths() Utils::ensureTralingBackslash(m_szSkinsPath); - mir_sntprintf(m_szSavedAvatarsPath, _T("%s\\Saved Contact Pictures"), m_szProfilePath); + mir_sntprintf(m_szSavedAvatarsPath, L"%s\\Saved Contact Pictures", m_szProfilePath); } bool CMimAPI::getAeroState() diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp index 85c849d16b..907f802484 100644 --- a/plugins/TabSRMM/src/modplus.cpp +++ b/plugins/TabSRMM/src/modplus.cpp @@ -74,7 +74,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) bbd.pszModuleName = "Tabmodplus";
CallService(MS_BB_GETBUTTONSTATE, wParam, (LPARAM)&bbd);
- TCHAR *pszText = _T("");
+ TCHAR *pszText = L"";
CHARRANGE cr;
cr.cpMin = cr.cpMax = 0;
SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_EXGETSEL, 0, (LPARAM)&cr);
@@ -128,7 +128,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) bufSize = textlenght + 12;
pszFormatedText = (TCHAR*)_alloca(bufSize*sizeof(TCHAR));
- mir_sntprintf(pszFormatedText, bufSize, _T("[img]%s[/img]"), pszText);
+ mir_sntprintf(pszFormatedText, bufSize, L"[img]%s[/img]", pszText);
bbd.ptszTooltip = 0;
bbd.hIcon = 0;
@@ -137,14 +137,14 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam) break;
case 3:
- pszFormatedText = _T("[img]");
+ pszFormatedText = L"[img]";
bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
break;
case 4:
- pszFormatedText = _T("[/img]");
+ pszFormatedText = L"[/img]";
bbd.ptszTooltip = LPGENT("Insert [img] tag / surround selected text with [img][/img]");
CallService(MS_BB_SETBUTTONSTATE, wParam, (LPARAM)&bbd);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 45bdb71c22..83be1cc69e 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -570,7 +570,7 @@ static LRESULT CALLBACK MessageEditSubclassProc(HWND hwnd, UINT msg, WPARAM wPar SendMessage(hwndParent, WM_COMMAND, MAKELONG(IDC_FONTUNDERLINE, IDC_MESSAGE), 0);
return 0;
case 0x0b:
- SetWindowText(hwnd, _T(""));
+ SetWindowText(hwnd, L"");
return 0;
}
}
@@ -1199,9 +1199,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l GetMYUIN(dat);
GetClientIcon(dat);
- CustomizeButton(CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
+ CustomizeButton(CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 0, 6, DPISCALEY_S(20),
hwndDlg, (HMENU)IDC_TOGGLESIDEBAR, g_hInst, NULL));
- dat->hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, _T("Static"), _T(""), SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, hwndDlg, (HMENU)6000, NULL, NULL);
+ dat->hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, L"Static", L"", SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, hwndDlg, (HMENU)6000, NULL, NULL);
mir_subclassWindow(dat->hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
dat->bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
@@ -1375,7 +1375,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SendMessage(hwndContainer, DM_QUERYCLIENTAREA, 0, (LPARAM)&rc);
{
WNDCLASS wndClass = { 0 };
- GetClassInfo(g_hInst, _T("RICHEDIT50W"), &wndClass);
+ GetClassInfo(g_hInst, L"RICHEDIT50W", &wndClass);
mir_subclassWindowFull(GetDlgItem(hwndDlg, IDC_LOG), MessageLogSubclassProc, wndClass.lpfnWndProc);
}
@@ -2361,7 +2361,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l dat->iCurrentQueueError = -1;
sendQueue->showErrorControls(dat, FALSE);
if (wParam != MSGERROR_CANCEL || (wParam == MSGERROR_CANCEL && lParam == 0))
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
sendQueue->checkQueue(dat);
int iNextFailed = sendQueue->findNextFailed(dat);
if (iNextFailed >= 0)
@@ -2390,7 +2390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l job->iStatus = SendQueue::SQ_INPROGRESS;
dat->iCurrentQueueError = -1;
sendQueue->showErrorControls(dat, FALSE);
- SetDlgItemText(hwndDlg, IDC_MESSAGE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_MESSAGE, L"");
sendQueue->checkQueue(dat);
int iNextFailed = sendQueue->findNextFailed(dat);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 2756aeef53..d50f9b4374 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -111,7 +111,7 @@ static UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM, LPARAM lP case WM_NOTIFY:
OPENFILENAMEA *ofn = (OPENFILENAMEA *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
HWND hwndParent = GetParent(hwnd);
- HWND hwndLv = FindWindowEx(hwndParent, NULL, _T("SHELLDLL_DefView"), NULL);
+ HWND hwndLv = FindWindowEx(hwndParent, NULL, L"SHELLDLL_DefView", NULL);
if (hwndLv != NULL && *((DWORD *)(ofn->lCustData))) {
SendMessage(hwndLv, WM_COMMAND, SHVIEW_THUMBNAIL, 0);
@@ -135,12 +135,12 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic) DWORD setView = 1;
TCHAR szTimestamp[100];
- mir_sntprintf(szTimestamp, _T("%04u %02u %02u_%02u%02u"), lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
+ mir_sntprintf(szTimestamp, L"%04u %02u %02u_%02u%02u", lt->tm_year + 1900, lt->tm_mon, lt->tm_mday, lt->tm_hour, lt->tm_min);
TCHAR *szProto = mir_a2t(dat->cache->getActiveProto());
TCHAR szFinalPath[MAX_PATH];
- mir_sntprintf(szFinalPath, _T("%s\\%s"), M.getSavedAvatarPath(), szProto);
+ mir_sntprintf(szFinalPath, L"%s\\%s", M.getSavedAvatarPath(), szProto);
mir_free(szProto);
if (CreateDirectory(szFinalPath, 0) == 0) {
@@ -153,20 +153,20 @@ static void SaveAvatarToFile(TWindowData *dat, HBITMAP hbm, int isOwnPic) TCHAR szBaseName[MAX_PATH];
if (isOwnPic)
- mir_sntprintf(szBaseName, _T("My Avatar_%s"), szTimestamp);
+ mir_sntprintf(szBaseName, L"My Avatar_%s", szTimestamp);
else
- mir_sntprintf(szBaseName, _T("%s_%s"), dat->cache->getNick(), szTimestamp);
+ mir_sntprintf(szBaseName, L"%s_%s", dat->cache->getNick(), szTimestamp);
- mir_sntprintf(szFinalFilename, _T("%s.png"), szBaseName);
+ mir_sntprintf(szFinalFilename, L"%s.png", szBaseName);
// do not allow / or \ or % in the filename
Utils::sanitizeFilename(szFinalFilename);
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.bmp;*.png;*.jpg;*.gif%c%c"), TranslateT("Image files"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.bmp;*.png;*.jpg;*.gif%c%c", TranslateT("Image files"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
- ofn.lpstrDefExt = _T("png");
+ ofn.lpstrDefExt = L"png";
ofn.lpstrFilter = filter;
ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLESIZING | OFN_ENABLEHOOK;
ofn.lpfnHook = OpenFileSubclass;
@@ -443,15 +443,15 @@ void TSAPI UpdateReadChars(const TWindowData *dat) TCHAR szBuf[20]; szBuf[0] = 0;
if (dat->fInsertMode)
- mir_tstrcat(szBuf, _T("O"));
+ mir_tstrcat(szBuf, L"O");
if (fCaps)
- mir_tstrcat(szBuf, _T("C"));
+ mir_tstrcat(szBuf, L"C");
if (fNum)
- mir_tstrcat(szBuf, _T("N"));
+ mir_tstrcat(szBuf, L"N");
if (dat->fInsertMode || fCaps || fNum)
- mir_tstrcat(szBuf, _T(" | "));
+ mir_tstrcat(szBuf, L" | ");
- mir_sntprintf(buf, _T("%s%s %d/%d"), szBuf, dat->lcID, dat->iOpenJobs, len);
+ mir_sntprintf(buf, L"%s%s %d/%d", szBuf, dat->lcID, dat->iOpenJobs, len);
SendMessage(dat->pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
if (PluginConfig.m_visualMessageSizeIndicator)
InvalidateRect(dat->pContainer->hwndStatus, NULL, FALSE);
@@ -555,7 +555,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) if (!bOwnAvatarMode) {
dat->bShowAvatar = (dat->hOwnPic && dat->hOwnPic != PluginConfig.g_hbmUnknown);
if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
}
switch (bAvatarMode) {
@@ -572,7 +572,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) }
if (!dat->hwndPanelPic) {
- dat->hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, dat->hwndPanelPicParent, (HMENU)7000, NULL, NULL);
+ dat->hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, dat->hwndPanelPicParent, (HMENU)7000, NULL, NULL);
if (dat->hwndPanelPic)
SendMessage(dat->hwndPanelPic, AVATAR_SETAEROCOMPATDRAWING, 0, TRUE);
}
@@ -598,7 +598,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) dat->bShowAvatar = true;
LBL_Check:
if (!dat->hwndContactPic)
- dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
+ dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, L"", WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
break;
case 2: // globally OFF
dat->bShowAvatar = false;
@@ -832,23 +832,23 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, DWORD dwPassedFlags) return pszText; // pszText contains the text
}
-static TCHAR tszRtfBreaks[] = _T(" \\\n\r");
+static TCHAR tszRtfBreaks[] = L" \\\n\r";
static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst)
{
const TCHAR *pszText = Text;
int iIndex = 1;
- static const TCHAR *lpszFmt = _T("\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];");
+ static const TCHAR *lpszFmt = L"\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];";
TCHAR szRed[10], szGreen[10], szBlue[10];
- const TCHAR *p1 = _tcsstr(pszText, _T("\\colortbl"));
+ const TCHAR *p1 = _tcsstr(pszText, L"\\colortbl");
if (!p1)
return;
const TCHAR *pEnd = _tcschr(p1, '}');
- const TCHAR *p2 = _tcsstr(p1, _T("\\red"));
+ const TCHAR *p2 = _tcsstr(p1, L"\\red");
for (int i = 0; i < iCount; i++)
pDst[i] = -1;
@@ -864,7 +864,7 @@ static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst p1 = p2;
p1++;
- p2 = _tcsstr(p1, _T("\\red"));
+ p2 = _tcsstr(p1, L"\\red");
}
}
@@ -895,9 +895,9 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors CreateColorMap(pszText, iNumColors, pColors, pIndex);
// scan the file for rtf commands and remove or parse them
- int idx = pszText.Find(_T("\\pard"));
+ int idx = pszText.Find(L"\\pard");
if (idx == -1) {
- if ((idx = pszText.Find(_T("\\ltrpar"))) == -1)
+ if ((idx = pszText.Find(L"\\ltrpar")) == -1)
return FALSE;
idx += 7;
}
@@ -919,71 +919,71 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors p += 2; break;
}
- if (!_tcsncmp(p, _T("\\cf"), 3)) { // foreground color
+ if (!_tcsncmp(p, L"\\cf", 3)) { // foreground color
int iCol = _ttoi(p + 3);
int iInd = GetRtfIndex(iCol, iNumColors, pIndex);
if (iCol && dat->bType != SESSIONTYPE_CHAT)
- res.AppendFormat((iInd > 0) ? (bInsideColor ? _T("[/color][color=%s]") : _T("[color=%s]")) : (bInsideColor ? _T("[/color]") : _T("")), Utils::rtf_ctable[iInd - 1].szName);
+ res.AppendFormat((iInd > 0) ? (bInsideColor ? L"[/color][color=%s]" : L"[color=%s]") : (bInsideColor ? L"[/color]" : L""), Utils::rtf_ctable[iInd - 1].szName);
bInsideColor = iInd > 0;
}
- else if (!_tcsncmp(p, _T("\\highlight"), 10)) { //background color
+ else if (!_tcsncmp(p, L"\\highlight", 10)) { //background color
TCHAR szTemp[20];
int iCol = _ttoi(p + 10);
- mir_sntprintf(szTemp, _T("%d"), iCol);
+ mir_sntprintf(szTemp, L"%d", iCol);
}
- else if (!_tcsncmp(p, _T("\\line"), 5)) { // soft line break;
+ else if (!_tcsncmp(p, L"\\line", 5)) { // soft line break;
res.AppendChar('\n');
}
- else if (!_tcsncmp(p, _T("\\endash"), 7)) {
+ else if (!_tcsncmp(p, L"\\endash", 7)) {
res.AppendChar(0x2013);
}
- else if (!_tcsncmp(p, _T("\\emdash"), 7)) {
+ else if (!_tcsncmp(p, L"\\emdash", 7)) {
res.AppendChar(0x2014);
}
- else if (!_tcsncmp(p, _T("\\bullet"), 7)) {
+ else if (!_tcsncmp(p, L"\\bullet", 7)) {
res.AppendChar(0x2022);
}
- else if (!_tcsncmp(p, _T("\\ldblquote"), 10)) {
+ else if (!_tcsncmp(p, L"\\ldblquote", 10)) {
res.AppendChar(0x201C);
}
- else if (!_tcsncmp(p, _T("\\rdblquote"), 10)) {
+ else if (!_tcsncmp(p, L"\\rdblquote", 10)) {
res.AppendChar(0x201D);
}
- else if (!_tcsncmp(p, _T("\\lquote"), 7)) {
+ else if (!_tcsncmp(p, L"\\lquote", 7)) {
res.AppendChar(0x2018);
}
- else if (!_tcsncmp(p, _T("\\rquote"), 7)) {
+ else if (!_tcsncmp(p, L"\\rquote", 7)) {
res.AppendChar(0x2019);
}
- else if (!_tcsncmp(p, _T("\\b"), 2)) { //bold
+ else if (!_tcsncmp(p, L"\\b", 2)) { //bold
if (!(lf.lfWeight == FW_BOLD)) // only allow bold if the font itself isn't a bold one, otherwise just strip it..
if (dat->SendFormat)
- res.Append((p[2] != '0') ? _T("[b]") : _T("[/b]"));
+ res.Append((p[2] != '0') ? L"[b]" : L"[/b]");
}
- else if (!_tcsncmp(p, _T("\\i"), 2)) { // italics
+ else if (!_tcsncmp(p, L"\\i", 2)) { // italics
if (!lf.lfItalic && dat->SendFormat)
- res.Append((p[2] != '0') ? _T("[i]") : _T("[/i]"));
+ res.Append((p[2] != '0') ? L"[i]" : L"[/i]");
}
- else if (!_tcsncmp(p, _T("\\strike"), 7)) { // strike-out
+ else if (!_tcsncmp(p, L"\\strike", 7)) { // strike-out
if (!lf.lfStrikeOut && dat->SendFormat)
- res.Append((p[7] != '0') ? _T("[s]") : _T("[/s]"));
+ res.Append((p[7] != '0') ? L"[s]" : L"[/s]");
}
- else if (!_tcsncmp(p, _T("\\ul"), 3)) { // underlined
+ else if (!_tcsncmp(p, L"\\ul", 3)) { // underlined
if (!lf.lfUnderline && dat->SendFormat) {
if (p[3] == 0 || _tcschr(tszRtfBreaks, p[3])) {
- res.Append(_T("[u]"));
+ res.Append(L"[u]");
bInsideUl = true;
}
- else if (!_tcsnccmp(p + 3, _T("none"), 4)) {
+ else if (!_tcsnccmp(p + 3, L"none", 4)) {
if (bInsideUl)
- res.Append(_T("[/u]"));
+ res.Append(L"[/u]");
bInsideUl = false;
}
}
}
- else if (!_tcsncmp(p, _T("\\tab"), 4)) { // tab
+ else if (!_tcsncmp(p, L"\\tab", 4)) { // tab
res.AppendChar('\t');
}
else if (p[1] == '\'') { // special character
@@ -1023,9 +1023,9 @@ BOOL TSAPI DoRtfToTags(const TWindowData *dat, CMString &pszText, int iNumColors }
if (bInsideColor && dat->bType != SESSIONTYPE_CHAT)
- res.Append(_T("[/color]"));
+ res.Append(L"[/color]");
if (bInsideUl)
- res.Append(_T("[/u]"));
+ res.Append(L"[/u]");
pszText = res;
return TRUE;
@@ -1271,8 +1271,8 @@ void TSAPI GetLocaleID(TWindowData *dat, const TCHAR *szKLName) TCHAR szKey[20];
DWORD dwLID = _tcstoul(szKLName, &stopped, 16);
- mir_sntprintf(szKey, _T("%04.04x"), LOWORD(dwLID));
- if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, _T("MIME\\Database\\Rfc1766"), 0, KEY_READ, &hKey)) {
+ mir_sntprintf(szKey, L"%04.04x", LOWORD(dwLID));
+ if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, L"MIME\\Database\\Rfc1766", 0, KEY_READ, &hKey)) {
DWORD dwLength = 255;
if (ERROR_SUCCESS == RegQueryValueEx(hKey, szKey, 0, 0, (unsigned char *)szLI, &dwLength)) {
TCHAR* p;
@@ -1741,7 +1741,7 @@ void TSAPI GetMyNick(TWindowData *dat) else
_tcsncpy_s(dat->szMyNickname, tszNick, _TRUNCATE);
}
- else _tcsncpy_s(dat->szMyNickname, _T("<undef>"), _TRUNCATE); // same here
+ else _tcsncpy_s(dat->szMyNickname, L"<undef>", _TRUNCATE); // same here
}
HICON TSAPI MY_GetContactIcon(const TWindowData *dat, LPCSTR szSetting)
@@ -1785,14 +1785,14 @@ void TSAPI ClearLog(TWindowData *dat) CallService(MS_HPP_EG_EVENT, 0, (LPARAM)&event);
}
}
- SetDlgItemText(dat->hwnd, IDC_LOG, _T(""));
+ SetDlgItemText(dat->hwnd, IDC_LOG, L"");
dat->hDbEventFirst = NULL;
}
else if (dat && dat->bType == SESSIONTYPE_CHAT && dat->si) {
SESSION_INFO *si = dat->si;
SESSION_INFO* s = pci->SM_FindSession(si->ptszID, si->pszModule);
if (s) {
- SetDlgItemText(dat->hwnd, IDC_CHAT_LOG, _T(""));
+ SetDlgItemText(dat->hwnd, IDC_CHAT_LOG, L"");
pci->LM_RemoveAll(&s->pLog, &s->pLogEnd);
s->iEventCount = 0;
s->LastTime = 0;
@@ -1917,7 +1917,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp) if (filename[0] == 0) { // prompting to save
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.jpg%c%c"), TranslateT("JPEG-compressed images"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.jpg%c%c", TranslateT("JPEG-compressed images"), 0, 0, 0);
OPENFILENAME dlg;
dlg.lStructSize = sizeof(dlg);
@@ -1926,7 +1926,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp) dlg.lpstrFile = filename;
dlg.nMaxFile = MAX_PATH;
dlg.Flags = OFN_NOREADONLYRETURN | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST;
- dlg.lpstrDefExt = _T("jpg");
+ dlg.lpstrDefExt = L"jpg";
if (!GetSaveFileName(&dlg))
return;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 7280b095f6..52d7273605 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -154,10 +154,10 @@ void TSAPI CacheLogFonts() HFONT hOldFont = (HFONT)SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_NICK]);
SIZE sz;
- GetTextExtentPoint32(hdc, _T("WMA"), 3, &sz);
+ GetTextExtentPoint32(hdc, L"WMA", 3, &sz);
CInfoPanel::m_ipConfig.height1 = sz.cy;
SelectObject(hdc, CInfoPanel::m_ipConfig.hFonts[IPFONTID_UIN]);
- GetTextExtentPoint32(hdc, _T("WMA"), 3, &sz);
+ GetTextExtentPoint32(hdc, L"WMA", 3, &sz);
CInfoPanel::m_ipConfig.height2 = sz.cy;
SelectObject(hdc, hOldFont);
@@ -358,13 +358,13 @@ static TCHAR* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, TCHAR co mir_tstrcpy(szResult, szYesterday);
else {
if (code == 'D' || code == 'R')
- szFormat = _T("D");
+ szFormat = L"D";
else if (code == 'T')
- szFormat = _T("s");
+ szFormat = L"s";
else if (code == 't')
- szFormat = _T("t");
+ szFormat = L"t";
else
- szFormat = _T("d");
+ szFormat = L"d";
TimeZone_PrintTimeStamp(hTimeZone, check, szFormat, szResult, _countof(szResult), 0);
}
@@ -831,7 +831,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, ptrT tszDescr(DbGetEventStringT(&dbei, szDescr));
TCHAR buf[1000];
- mir_sntprintf(buf, _T("%s (%s)"), tszFileName, tszDescr);
+ mir_sntprintf(buf, L"%s (%s)", tszFileName, tszDescr);
AppendUnicodeToBuffer(str, buf, 0);
}
else AppendUnicodeToBuffer(str, tszFileName, 0);
@@ -1044,7 +1044,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe FINDTEXTEX fi;
fi.chrg.cpMin = startAt;
if (dat->clr_added) {
- fi.lpstrText = _T("##col##");
+ fi.lpstrText = L"##col##";
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
memset(&cf2, 0, sizeof(cf2));
@@ -1061,7 +1061,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe cr.cpMin = fi.chrgText.cpMin;
cr.cpMax = cr.cpMin + 18;
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&cr);
- SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)L"");
UINT length = (unsigned int)_ttol(&trbuffer[7]);
int index = _ttol(&trbuffer[14]);
if (length > 0 && length < 20000 && index >= RTF_CTABLE_DEFSIZE && index < Utils::rtf_ctable_size) {
@@ -1078,7 +1078,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe if (dat->dwFlags & MWF_LOG_SHOWICONS) {
BYTE bIconIndex = 0;
char bDirection = 0;
- fi.lpstrText = _T("#~#");
+ fi.lpstrText = L"#~#";
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
@@ -1263,7 +1263,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
}
else {
- SetWindowText(hwndrtf, _T(""));
+ SetWindowText(hwndrtf, L"");
sel.cpMin = 0;
sel.cpMax = GetWindowTextLength(hwndrtf);
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
@@ -1291,7 +1291,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAp sel.cpMax = SendMessage(hwndrtf, EM_GETTEXTLENGTHEX, (WPARAM)>xl, 0);
sel.cpMin = sel.cpMax - 1;
SendMessage(hwndrtf, EM_EXSETSEL, 0, (LPARAM)&sel);
- SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
+ SendMessage(hwndrtf, EM_REPLACESEL, FALSE, (LPARAM)L"");
dat->isAutoRTL |= 2;
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 58b62f635d..9cb53d4b0c 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -97,12 +97,12 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox) {
bool fValid = false;
TCHAR tszMask[MAX_PATH];
- mir_sntprintf(tszMask, _T("%s*.*"), tszFolder);
+ mir_sntprintf(tszMask, L"%s*.*", tszFolder);
WIN32_FIND_DATA fd = { 0 };
HANDLE h = FindFirstFile(tszMask, &fd);
while (h != INVALID_HANDLE_VALUE) {
- if (mir_tstrlen(fd.cFileName) >= 5 && !_tcsnicmp(fd.cFileName + mir_tstrlen(fd.cFileName) - 4, _T(".tsk"), 4)) {
+ if (mir_tstrlen(fd.cFileName) >= 5 && !_tcsnicmp(fd.cFileName + mir_tstrlen(fd.cFileName) - 4, L".tsk", 4)) {
fValid = true;
break;
}
@@ -117,10 +117,10 @@ static int TSAPI ScanSkinDir(const TCHAR* tszFolder, HWND hwndCombobox) LRESULT lr;
TCHAR szBuf[255];
- mir_sntprintf(tszFinalName, _T("%s%s"), tszFolder, fd.cFileName);
+ mir_sntprintf(tszFinalName, L"%s%s", tszFolder, fd.cFileName);
- GetPrivateProfileString(_T("Global"), _T("Name"), _T("None"), szBuf, _countof(szBuf), tszFinalName);
- if (!mir_tstrcmp(szBuf, _T("None"))) {
+ GetPrivateProfileString(L"Global", L"Name", L"None", szBuf, _countof(szBuf), tszFinalName);
+ if (!mir_tstrcmp(szBuf, L"None")) {
fd.cFileName[mir_tstrlen(fd.cFileName) - 4] = 0;
_tcsncpy_s(szBuf, fd.cFileName, _TRUNCATE);
}
@@ -153,7 +153,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox) _tcsncpy_s(tszSkinRoot, M.getSkinPath(), _TRUNCATE);
SetDlgItemText(GetParent(hwndCombobox), IDC_SKINROOTFOLDER, tszSkinRoot);
- mir_sntprintf(tszFindMask, _T("%s*.*"), tszSkinRoot);
+ mir_sntprintf(tszFindMask, L"%s*.*", tszSkinRoot);
SendMessage(hwndCombobox, CB_RESETCONTENT, 0, 0);
SendMessage(hwndCombobox, CB_INSERTSTRING, -1, (LPARAM)TranslateT("<no skin>"));
@@ -163,7 +163,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox) while (h != INVALID_HANDLE_VALUE) {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && fd.cFileName[0] != '.') {
TCHAR tszSubDir[MAX_PATH];
- mir_sntprintf(tszSubDir, _T("%s%s\\"), tszSkinRoot, fd.cFileName);
+ mir_sntprintf(tszSubDir, L"%s%s\\", tszSkinRoot, fd.cFileName);
ScanSkinDir(tszSubDir, hwndCombobox);
}
if (FindNextFile(h, &fd) == 0)
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 8adcaadc52..657c3643ec 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -468,14 +468,14 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, MEVENT hdbEvent)
{
if (M.FindWindow(hContact) != 0) {
- _DebugPopup(hContact, _T("Warning: trying to create duplicate window"));
+ _DebugPopup(hContact, L"Warning: trying to create duplicate window");
return 0;
}
// if we have a max # of tabs/container set and want to open something in the default container...
- if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, _T("default"), 6))
- if ((pContainer = FindMatchingContainer(_T("default"))) == NULL)
- if ((pContainer = CreateContainer(_T("default"), CNT_CREATEFLAG_CLONED, hContact)) == NULL)
+ if (hContact != 0 && M.GetByte("limittabs", 0) && !_tcsncmp(pContainer->szName, L"default", 6))
+ if ((pContainer = FindMatchingContainer(L"default")) == NULL)
+ if ((pContainer = CreateContainer(L"default", CNT_CREATEFLAG_CLONED, hContact)) == NULL)
return 0;
TNewWindowData newData = { 0 };
@@ -499,14 +499,14 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, Utils::DoubleAmpersands(newcontactname, _countof(newcontactname));
}
- else _tcsncpy_s(newcontactname, _T("_U_"), _TRUNCATE);
+ else _tcsncpy_s(newcontactname, L"_U_", _TRUNCATE);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
if (M.GetByte("tabstatus", 1))
- mir_sntprintf(tabtitle, _T("%s (%s) "), newcontactname, szStatus);
+ mir_sntprintf(tabtitle, L"%s (%s) ", newcontactname, szStatus);
else
- mir_sntprintf(tabtitle, _T("%s "), newcontactname);
+ mir_sntprintf(tabtitle, L"%s ", newcontactname);
newData.item.pszText = tabtitle;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
@@ -621,10 +621,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName)
{
int iMaxTabs = M.GetDword("maxtabs", 0);
- if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, _T("default"), 6)) {
+ if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, L"default", 6)) {
// search a "default" with less than iMaxTabs opened...
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!_tcsncmp(p->szName, _T("default"), 6) && p->iChilds < iMaxTabs)
+ if (!_tcsncmp(p->szName, L"default", 6) && p->iChilds < iMaxTabs)
return p;
return NULL;
@@ -801,7 +801,7 @@ static int TSAPI SetupIconLibConfig() int j = 2, version = 0;
TCHAR szFilename[MAX_PATH];
- _tcsncpy(szFilename, _T("icons\\tabsrmm_icons.dll"), MAX_PATH);
+ _tcsncpy(szFilename, L"icons\\tabsrmm_icons.dll", MAX_PATH);
g_hIconDLL = LoadLibrary(szFilename);
if (g_hIconDLL == 0) {
CWarning::show(CWarning::WARN_ICONPACKMISSING, CWarning::CWF_NOALLOWHIDE | MB_ICONERROR | MB_OK);
@@ -838,7 +838,7 @@ static int TSAPI SetupIconLibConfig() sid.iDefaultIndex = -IDI_CLOCK;
IcoLib_AddIcon(&sid);
- _tcsncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH);
+ _tcsncpy(szFilename, L"plugins\\tabsrmm.dll", MAX_PATH);
sid.pszName = "tabSRMM_overlay_disabled";
sid.description.a = LPGEN("Feature disabled (used as overlay)");
@@ -1069,7 +1069,7 @@ STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEU STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
{
TCHAR sztName[64];
- mir_sntprintf(sztName, _T("s%u"), nextStgId++);
+ mir_sntprintf(sztName, L"s%u", nextStgId++);
if (pictStg == NULL)
return STG_E_MEDIUMFULL;
return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
diff --git a/plugins/TabSRMM/src/selectcontainer.cpp b/plugins/TabSRMM/src/selectcontainer.cpp index 7ac23266b2..b743ef8868 100644 --- a/plugins/TabSRMM/src/selectcontainer.cpp +++ b/plugins/TabSRMM/src/selectcontainer.cpp @@ -86,7 +86,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if ((iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETCURSEL, 0, 0)) != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETTEXT, (WPARAM)iItem, (LPARAM)szName);
- if (!_tcsncmp(szName, _T("default"), CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
+ if (!_tcsncmp(szName, L"default", CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
MessageBox(hwndDlg, TranslateT("You cannot delete the default container"), TranslateT("Error"), MB_OK | MB_ICONERROR);
else {
int iIndex = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETITEMDATA, (WPARAM)iItem, 0);
@@ -120,7 +120,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L }
if ((iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETCURSEL, 0, 0)) != LB_ERR) {
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETTEXT, (WPARAM)iItem, (LPARAM)szName);
- if (!_tcsncmp(szName, _T("default"), CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
+ if (!_tcsncmp(szName, L"default", CONTAINER_NAMELEN) || !_tcsncmp(szName, TranslateT("Default container"), CONTAINER_NAMELEN))
MessageBox(hwndDlg, TranslateT("You cannot rename the default container"), TranslateT("Error"), MB_OK | MB_ICONERROR);
else {
int iIndex = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_GETITEMDATA, (WPARAM)iItem, 0);
@@ -182,8 +182,8 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (db_get_ts(NULL, szKey, szValue, &dbv))
break; // end of list
if (dbv.type == DBVT_ASCIIZ || dbv.type == DBVT_WCHAR) {
- if (_tcsncmp(dbv.ptszVal, _T("**mir_free**"), CONTAINER_NAMELEN)) {
- iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_tstrcmp(dbv.ptszVal, _T("default")) ?
+ if (_tcsncmp(dbv.ptszVal, L"**mir_free**", CONTAINER_NAMELEN)) {
+ iItemNew = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_ADDSTRING, 0, (LPARAM)(!mir_tstrcmp(dbv.ptszVal, L"default") ?
TranslateT("Default container") : dbv.ptszVal));
if (iItemNew != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETITEMDATA, (WPARAM)iItemNew, (LPARAM)iCounter);
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (pContainer) {
LRESULT iItem;
- iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_tstrcmp(pContainer->szName, _T("default")) ?
+ iItem = SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_FINDSTRING, (WPARAM)-1, (LPARAM)(!mir_tstrcmp(pContainer->szName, L"default") ?
TranslateT("Default container") : pContainer->szName));
if (iItem != LB_ERR)
SendDlgItemMessage(hwndDlg, IDC_CNTLIST, LB_SETCURSEL, (WPARAM)iItem, 0);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 068c0baab7..1c74331fa1 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -495,7 +495,7 @@ LRESULT CSendLater::qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick) // filters by m_hFilter (contact handle)
void CSendLater::qMgrFillList(bool fClear)
{
- TCHAR *formatTime = _T("%Y.%m.%d - %H:%M");
+ TCHAR *formatTime = L"%Y.%m.%d - %H:%M";
if (fClear) {
::SendMessage(m_hwndList, LVM_DELETEALLITEMS, 0, 0);
@@ -523,7 +523,7 @@ void CSendLater::qMgrFillList(bool fClear) lvItem.mask = LVIF_TEXT | LVIF_PARAM;
TCHAR tszBuf[255];
- mir_sntprintf(tszBuf, _T("%s [%s]"), tszNick, c->getRealAccount());
+ mir_sntprintf(tszBuf, L"%s [%s]", tszNick, c->getRealAccount());
lvItem.pszText = tszBuf;
lvItem.cchTextMax = _countof(tszBuf);
lvItem.iItem = uIndex++;
@@ -575,14 +575,14 @@ void CSendLater::qMgrFillList(bool fClear) bCode = p->bCode;
TCHAR tszStatus[20];
- mir_sntprintf(tszStatus, _T("X/%s[%c] (%d)"), tszStatusText, bCode, p->iSendCount);
+ mir_sntprintf(tszStatus, L"X/%s[%c] (%d)", tszStatusText, bCode, p->iSendCount);
tszStatus[0] = p->szId[0];
lvItem.pszText = tszStatus;
lvItem.iSubItem = 3;
::SendMessage(m_hwndList, LVM_SETITEM, 0, LPARAM(&lvItem));
if (p->lastSent == 0)
- _tcsncpy_s(tszTimestamp, _T("Never"), _TRUNCATE);
+ _tcsncpy_s(tszTimestamp, L"Never", _TRUNCATE);
else {
_tcsftime(tszTimestamp, 30, formatTime, _localtime32((__time32_t *)&p->lastSent));
tszTimestamp[29] = 0;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 616f1e76c9..d04b2e621b 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -69,7 +69,7 @@ int SendQueue::addTo(TWindowData *dat, size_t iLen, int dwFlags) int iFound = NR_SENDJOBS; if (m_currentIndex >= NR_SENDJOBS) { - _DebugPopup(dat->hContact, _T("Send queue full")); + _DebugPopup(dat->hContact, L"Send queue full"); return 0; } @@ -90,7 +90,7 @@ int SendQueue::addTo(TWindowData *dat, size_t iLen, int dwFlags) } entry_found: if (iFound == NR_SENDJOBS) { - _DebugPopup(dat->hContact, _T("Send queue full")); + _DebugPopup(dat->hContact, L"Send queue full"); return 0; } @@ -104,7 +104,7 @@ entry_found: HWND hwndDlg = dat->hwnd; dat->cache->saveHistory(0, 0); - ::SetDlgItemText(hwndDlg, IDC_MESSAGE, _T("")); + ::SetDlgItemText(hwndDlg, IDC_MESSAGE, L""); ::SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE)); UpdateSaveAndSendButton(dat); @@ -682,11 +682,11 @@ int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, b if (fIsSendLater) { time_t now = time(0); TCHAR tszTimestamp[30]; - _tcsftime(tszTimestamp, _countof(tszTimestamp), _T("%Y.%m.%d - %H:%M"), _localtime32((__time32_t *)&now)); + _tcsftime(tszTimestamp, _countof(tszTimestamp), L"%Y.%m.%d - %H:%M", _localtime32((__time32_t *)&now)); mir_snprintf(szKeyName, "S%d", now); mir_sntprintf(tszHeader, TranslateT("\n(Sent delayed. Original timestamp %s)"), tszTimestamp); } - else mir_sntprintf(tszHeader, _T("M%d|"), time(0)); + else mir_sntprintf(tszHeader, L"M%d|", time(0)); T2Utf utf_header(tszHeader); size_t required = mir_strlen(utf_header) + mir_strlen(job->szSendBuffer) + 10; diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index 36e1066195..dfce840e74 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -94,7 +94,7 @@ void CSideBarButton::_create() m_isTopAligned = true;
m_sz.cx = m_sz.cy = 0;
- m_hwnd = ::CreateWindowEx(0, _T("MButtonClass"), _T(""), WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
+ m_hwnd = ::CreateWindowEx(0, L"MButtonClass", L"", WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, m_sideBar->getScrollWnd(), reinterpret_cast<HMENU>(m_id), g_hInst, NULL);
if (m_hwnd) {
CustomizeButton(m_hwnd);
@@ -390,7 +390,7 @@ void CSideBar::Init() if (m_pContainer->dwFlags & CNT_SIDEBAR) {
if (m_hwndScrollWnd == 0)
- m_hwndScrollWnd = ::CreateWindowEx(0, _T("TS_SideBarClass"), _T(""), WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
+ m_hwndScrollWnd = ::CreateWindowEx(0, L"TS_SideBarClass", L"", WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
0, 0, m_width, 40, m_pContainer->hwnd, reinterpret_cast<HMENU>(5000), g_hInst, this);
m_isActive = true;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index bf773cd2ea..9250052093 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -68,7 +68,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, extern "C" int __declspec(dllexport) Load(void) { if (WinVerMajor() < 5) { - MessageBox(0, TranslateT("This version of TabSRMM requires Windows 2000 or later."), _T("tabSRMM"), MB_OK | MB_ICONERROR); + MessageBox(0, TranslateT("This version of TabSRMM requires Windows 2000 or later."), L"tabSRMM", MB_OK | MB_ICONERROR); return 1; } diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index 2016d88fbb..99247998db 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -943,7 +943,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara {
WNDCLASSEX wcl = { 0 };
wcl.cbSize = sizeof(wcl);
- GetClassInfoEx(g_hInst, _T("SysTabControl32"), &wcl);
+ GetClassInfoEx(g_hInst, L"SysTabControl32", &wcl);
OldTabControlClassProc = wcl.lpfnWndProc;
tabdat = (TabControlData*)mir_calloc(sizeof(TabControlData));
@@ -979,7 +979,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara // it is sufficient to search it once. So this message is called, whenever
// a new tab is inserted
HWND hwndChild;
- if ((hwndChild = FindWindowEx(hwnd, 0, _T("msctls_updown32"), NULL)) != 0)
+ if ((hwndChild = FindWindowEx(hwnd, 0, L"msctls_updown32", NULL)) != 0)
DestroyWindow(hwndChild);
return 0;
@@ -1466,28 +1466,28 @@ int TSAPI RegisterTabCtrlClass(void) WNDCLASSEX wc = { 0 };
wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("TSTabCtrlClass");
+ wc.lpszClassName = L"TSTabCtrlClass";
wc.lpfnWndProc = TabControlSubclassProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(TabControlData*);
wc.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TSStatusBarClass");
+ wc.lpszClassName = L"TSStatusBarClass";
wc.lpfnWndProc = StatusBarSubclassProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
wc.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TS_SideBarClass");
+ wc.lpszClassName = L"TS_SideBarClass";
wc.lpfnWndProc = CSideBar::wndProcStub;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
wc.style = CS_GLOBALCLASS;// | CS_DBLCLKS; // | CS_PARENTDC;
RegisterClassEx(&wc);
- wc.lpszClassName = _T("TSHK");
+ wc.lpszClassName = L"TSHK";
wc.lpfnWndProc = HotkeyHandlerDlgProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(void*);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 1b2bb855d2..0ac8a44021 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -97,14 +97,14 @@ bool CTaskbarInteract::haveLargeIcons() * always returns S_OK, but the icon is simply ignored when using small taskbar icons.
* also, figure out the button grouping mode.
*/
- if (::RegOpenKey(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced"), &hKey) == ERROR_SUCCESS) {
- ::RegQueryValueEx(hKey, _T("TaskbarSmallIcons"), 0, &dwType, (LPBYTE)&val, &size);
+ if (::RegOpenKey(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", &hKey) == ERROR_SUCCESS) {
+ ::RegQueryValueEx(hKey, L"TaskbarSmallIcons", 0, &dwType, (LPBYTE)&val, &size);
size = 4;
dwType = REG_DWORD;
/*
* this is the "grouping mode" setting for the task bar. 0 = always combine, no labels
*/
- ::RegQueryValueEx(hKey, _T("TaskbarGlomLevel"), 0, &dwType, (LPBYTE)&valGrouping, &size);
+ ::RegQueryValueEx(hKey, L"TaskbarGlomLevel", 0, &dwType, (LPBYTE)&valGrouping, &size);
::RegCloseKey(hKey);
}
m_fHaveLargeicons = (val ? false : true); // small icons in use, revert to default icon feedback
@@ -230,11 +230,11 @@ CProxyWindow::CProxyWindow(TWindowData *dat) m_hBigIcon = 0;
m_thumb = 0;
- m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, _T(""),
+ m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, L"",
WS_POPUP | WS_BORDER | WS_SYSMENU | WS_CAPTION, -32000, -32000, 10, 10, NULL, NULL, g_hInst, (LPVOID)this);
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("create proxy object for: %s"), m_dat->cache->getNick());
+ _DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
#endif
Win7Taskbar->registerTab(m_hwndProxy, m_dat->pContainer->hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
@@ -252,7 +252,7 @@ CProxyWindow::~CProxyWindow() ::DestroyWindow(m_hwndProxy);
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("destroy proxy object for: %s"), m_dat->cache->getNick());
+ _DebugTraceW(L"destroy proxy object for: %s", m_dat->cache->getNick());
#endif
if (m_thumb) {
delete m_thumb;
@@ -621,7 +621,7 @@ void CThumbBase::renderBase() m_hOldFont = 0;
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("refresh base (background) with %d, %d"), m_width, m_height);
+ _DebugTraceW(L"refresh base (background) with %d, %d", m_width, m_height);
#endif
m_rc.right = m_width;
@@ -733,7 +733,7 @@ CThumbBase::~CThumbBase() m_isValid = false;
}
#if defined(__LOGDEBUG_)
- _DebugTraceW(_T("destroy CThumbBase"));
+ _DebugTraceW(L"destroy CThumbBase");
#endif
}
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h index e4068e2ebf..8a66d5a8ba 100644 --- a/plugins/TabSRMM/src/taskbar.h +++ b/plugins/TabSRMM/src/taskbar.h @@ -33,7 +33,7 @@ #ifndef __TASKBAR_H
#define __TASKBAR_H
-#define PROXYCLASSNAME _T("TabSRMM_DWMProxy")
+#define PROXYCLASSNAME L"TabSRMM_DWMProxy"
extern HINSTANCE g_hInst;
class CProxyWindow;
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index bdc20bb45e..64f4d77917 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -45,26 +45,26 @@ char *TemplateNames[] = { }; TTemplateSet LTR_Default = { TRUE, -_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"), -_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"), -_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"), -_T("%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M"), -_T("%S %T%|%M"), -_T("%S %T%|%M"), -_T("%I %S %&D, %&T, %N %M%! "), -_T("%I%S %D, %T, %e%l%M"), +L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M", +L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M", +L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M", +L"%I %S %N %?&D%\\&E%\\!, %\\T%\\!: %?n%?S %?T%?|%M", +L"%S %T%|%M", +L"%S %T%|%M", +L"%I %S %&D, %&T, %N %M%! ", +L"%I%S %D, %T, %e%l%M", "Default LTR" }; TTemplateSet RTL_Default = { TRUE, -_T("%I %S %N %D%n%S %T%|%M"), -_T("%I %S %N %D%n%S %T%|%M"), -_T("%I %S %N %D%n%S %T%|%M"), -_T("%I %S %N %D%n%S %T%|%M"), -_T("%S %T%|%M"), -_T("%S %T%|%M"), -_T("%I%S %D, %T, %N %M%! "), -_T("%I%S %D, %T, %e%l%M"), +L"%I %S %N %D%n%S %T%|%M", +L"%I %S %N %D%n%S %T%|%M", +L"%I %S %N %D%n%S %T%|%M", +L"%I %S %N %D%n%S %T%|%M", +L"%S %T%|%M", +L"%S %T%|%M", +L"%I%S %D, %T, %N %M%! ", +L"%I%S %D, %T, %e%l%M", "Default RTL" }; @@ -345,7 +345,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP dbei.eventType = (iIndex == 6) ? EVENTTYPE_STATUSCHANGE : EVENTTYPE_MESSAGE; dbei.eventType = (iIndex == 7) ? EVENTTYPE_ERRMSG : dbei.eventType; if (dbei.eventType == EVENTTYPE_ERRMSG) - dbei.szModule = (char *)_T("Sample error message"); + dbei.szModule = (char *)L"Sample error message"; dbei.cbSize = sizeof(dbei); dbei.pBlob = (iIndex == 6) ? (BYTE *)"is now offline (was online)" : (BYTE *)"The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog."; dbei.cbBlob = (int)mir_strlen((char *)dbei.pBlob) + 1; @@ -353,11 +353,11 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP dbei.flags |= (teInfo->rtl ? DBEF_RTL : 0); dat->lastEventTime = (iIndex == 4 || iIndex == 5) ? time(NULL) - 1 : 0; dat->iLastEventType = MAKELONG(dbei.flags, dbei.eventType); - SetDlgItemText(hwndDlg, IDC_PREVIEW, _T("")); + SetDlgItemText(hwndDlg, IDC_PREVIEW, L""); dat->dwFlags = MWF_LOG_ALL; dat->dwFlags = (teInfo->rtl ? dat->dwFlags | MWF_LOG_RTL : dat->dwFlags & ~MWF_LOG_RTL); dat->dwFlags = (iIndex == 0 || iIndex == 1) ? dat->dwFlags & ~MWF_LOG_GROUPMODE : dat->dwFlags | MWF_LOG_GROUPMODE; - mir_sntprintf(dat->szMyNickname, _T("My Nickname")); + mir_sntprintf(dat->szMyNickname, L"My Nickname"); StreamInEvents(hwndDlg, 0, 1, 0, &dbei); SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_SETSEL, -1, -1); if (teInfo->changed) diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index 84a0ddad47..204a1fa8f2 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -168,8 +168,8 @@ static struct _tagFontBlocks { int TSAPI CheckThemeVersion(const TCHAR *szIniFilename)
{
- int cookie = GetPrivateProfileInt(_T("TabSRMM Theme"), _T("Cookie"), 0, szIniFilename);
- int version = GetPrivateProfileInt(_T("TabSRMM Theme"), _T("Version"), 0, szIniFilename);
+ int cookie = GetPrivateProfileInt(L"TabSRMM Theme", L"Cookie", 0, szIniFilename);
+ int version = GetPrivateProfileInt(L"TabSRMM Theme", L"Version", 0, szIniFilename);
if (version >= CURRENT_THEME_VERSION && cookie == THEME_COOKIE)
return 1;
@@ -425,7 +425,7 @@ const TCHAR* TSAPI GetThemeFileName(int iMode) szFilename[0] = 0;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s%c*.tabsrmm%c%c"), TranslateT("TabSRMM themes"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s%c*.tabsrmm%c%c", TranslateT("TabSRMM themes"), 0, 0, 0);
ofn.lpstrFilter = filter;
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = 0;
@@ -434,7 +434,7 @@ const TCHAR* TSAPI GetThemeFileName(int iMode) ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
- ofn.lpstrDefExt = _T("tabsrmm");
+ ofn.lpstrDefExt = L"tabsrmm";
if (!iMode) {
if (GetOpenFileName(&ofn))
return szFilename;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index aea865c799..48c0a11bce 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -30,10 +30,10 @@ #include "stdafx.h"
static SKINDESC my_default_skin[] = {
- IDR_SKIN_AERO, _T("tabskin_aero.png"),
- IDR_SKIN_AERO_GLOW, _T("tabskin_aero_glow.png"),
- IDR_SKIN_AERO_SWITCHBAR, _T("tabskin_aero_button.png"),
- IDR_SKIN_LOGO, _T("unknown.png")
+ IDR_SKIN_AERO, L"tabskin_aero.png",
+ IDR_SKIN_AERO_GLOW, L"tabskin_aero_glow.png",
+ IDR_SKIN_AERO_SWITCHBAR, L"tabskin_aero_button.png",
+ IDR_SKIN_LOGO, L"unknown.png"
};
CSkin* Skin = 0;
@@ -190,103 +190,103 @@ AeroEffect CSkin::m_aeroEffects[AERO_EFFECT_LAST] = { // definition of the availbale skin items
CSkinItem SkinItems[] = {
- { _T("Container"), "TSKIN_Container", ID_EXTBKCONTAINER,
+ { L"Container", "TSKIN_Container", ID_EXTBKCONTAINER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Toolbar"), "TSKIN_Container", ID_EXTBKBUTTONBAR,
+ }, { L"Toolbar", "TSKIN_Container", ID_EXTBKBUTTONBAR,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("{-}Buttonpressed"), "TSKIN_BUTTONSPRESSED", ID_EXTBKBUTTONSPRESSED,
+ }, { L"{-}Buttonpressed", "TSKIN_BUTTONSPRESSED", ID_EXTBKBUTTONSPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Buttonnotpressed"), "TSKIN_BUTTONSNPRESSED", ID_EXTBKBUTTONSNPRESSED,
+ }, { L"Buttonnotpressed", "TSKIN_BUTTONSNPRESSED", ID_EXTBKBUTTONSNPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Buttonmouseover"), "TSKIN_BUTTONSMOUSEOVER", ID_EXTBKBUTTONSMOUSEOVER,
+ }, { L"Buttonmouseover", "TSKIN_BUTTONSMOUSEOVER", ID_EXTBKBUTTONSMOUSEOVER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Infopanelfield"), "TSKIN_INFOPANELFIELD", ID_EXTBKINFOPANEL,
+ }, { L"Infopanelfield", "TSKIN_INFOPANELFIELD", ID_EXTBKINFOPANEL,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebutton"), "TSKIN_TITLEBUTTON", ID_EXTBKTITLEBUTTON,
+ }, { L"Titlebutton", "TSKIN_TITLEBUTTON", ID_EXTBKTITLEBUTTON,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebuttonmouseover"), "TSKIN_TITLEBUTTONHOVER", ID_EXTBKTITLEBUTTONMOUSEOVER,
+ }, { L"Titlebuttonmouseover", "TSKIN_TITLEBUTTONHOVER", ID_EXTBKTITLEBUTTONMOUSEOVER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Titlebuttonpressed"), "TSKIN_TITLEBUTTONPRESSED", ID_EXTBKTITLEBUTTONPRESSED,
+ }, { L"Titlebuttonpressed", "TSKIN_TITLEBUTTONPRESSED", ID_EXTBKTITLEBUTTONPRESSED,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabpage"), "TSKIN_TABPAGE", ID_EXTBKTABPAGE,
+ }, { L"Tabpage", "TSKIN_TABPAGE", ID_EXTBKTABPAGE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem"), "TSKIN_TABITEM", ID_EXTBKTABITEM,
+ }, { L"Tabitem", "TSKIN_TABITEM", ID_EXTBKTABITEM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_active"), "TSKIN_TABITEMACTIVE", ID_EXTBKTABITEMACTIVE,
+ }, { L"Tabitem_active", "TSKIN_TABITEMACTIVE", ID_EXTBKTABITEMACTIVE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_bottom"), "TSKIN_TABITEMBOTTOM", ID_EXTBKTABITEMBOTTOM,
+ }, { L"Tabitem_bottom", "TSKIN_TABITEMBOTTOM", ID_EXTBKTABITEMBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_active_bottom"), "TSKIN_TABITEMACTIVEBOTTOM", ID_EXTBKTABITEMACTIVEBOTTOM,
+ }, { L"Tabitem_active_bottom", "TSKIN_TABITEMACTIVEBOTTOM", ID_EXTBKTABITEMACTIVEBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Frame"), "TSKIN_FRAME", ID_EXTBKFRAME,
+ }, { L"Frame", "TSKIN_FRAME", ID_EXTBKFRAME,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("MessageLog"), "TSKIN_MLOG", ID_EXTBKHISTORY,
+ }, { L"MessageLog", "TSKIN_MLOG", ID_EXTBKHISTORY,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("InputArea"), "TSKIN_INPUT", ID_EXTBKINPUTAREA,
+ }, { L"InputArea", "TSKIN_INPUT", ID_EXTBKINPUTAREA,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("FrameInactive"), "TSKIN_FRAMEINACTIVE", ID_EXTBKFRAMEINACTIVE,
+ }, { L"FrameInactive", "TSKIN_FRAMEINACTIVE", ID_EXTBKFRAMEINACTIVE,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_hottrack"), "TSKIN_TABITEMHOTTRACK", ID_EXTBKTABITEMHOTTRACK,
+ }, { L"Tabitem_hottrack", "TSKIN_TABITEMHOTTRACK", ID_EXTBKTABITEMHOTTRACK,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Tabitem_hottrack_bottom"), "TSKIN_TABITEMHOTTRACKBOTTOM", ID_EXTBKTABITEMHOTTRACKBOTTOM,
+ }, { L"Tabitem_hottrack_bottom", "TSKIN_TABITEMHOTTRACKBOTTOM", ID_EXTBKTABITEMHOTTRACKBOTTOM,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Statusbarpanel"), "TSKIN_STATUSBARPANEL", ID_EXTBKSTATUSBARPANEL,
+ }, { L"Statusbarpanel", "TSKIN_STATUSBARPANEL", ID_EXTBKSTATUSBARPANEL,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Statusbar"), "TSKIN_STATUSBAR", ID_EXTBKSTATUSBAR,
+ }, { L"Statusbar", "TSKIN_STATUSBAR", ID_EXTBKSTATUSBAR,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("Userlist"), "TSKIN_USERLIST", ID_EXTBKUSERLIST,
+ }, { L"Userlist", "TSKIN_USERLIST", ID_EXTBKUSERLIST,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
- }, { _T("InfoPanelBackground"), "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
+ }, { L"InfoPanelBackground", "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
8, CLCDEFAULT_CORNER,
0xf0f0f0, 0x42b1ff, 1, CLCDEFAULT_TEXTCOLOR, 40, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
- }, { _T("Sidebar Background"), "TSKIN_SIDEBARBG", ID_EXTBKSIDEBARBG,
+ }, { L"Sidebar Background", "TSKIN_SIDEBARBG", ID_EXTBKSIDEBARBG,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
0xb2e1ff, 0xb2e1ff, 1, CLCDEFAULT_TEXTCOLOR, 40, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
@@ -294,7 +294,7 @@ CSkinItem SkinItems[] = { };
static CSkinItem _defInfoPanel = {
- _T("InfoPanelBackground"), "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
+ L"InfoPanelBackground", "TSKIN_INFOPANELBG", ID_EXTBKINFOPANELBG,
8, CLCDEFAULT_CORNER,
0xf0f0f0, 0x62caff, 0, CLCDEFAULT_TEXTCOLOR, 255, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE, 0, 0
@@ -724,7 +724,7 @@ void __fastcall CImageItem::Render(const HDC hdc, const RECT *rc, bool fIgnoreGl }
static CSkinItem StatusItem_Default = {
- _T("Container"), "EXBK_Offline", ID_EXTBKCONTAINER,
+ L"Container", "EXBK_Offline", ID_EXTBKCONTAINER,
CLCDEFAULT_GRADIENT, CLCDEFAULT_CORNER,
CLCDEFAULT_COLOR, CLCDEFAULT_COLOR2, CLCDEFAULT_COLOR2_TRANSPARENT, CLCDEFAULT_TEXTCOLOR, CLCDEFAULT_ALPHA, CLCDEFAULT_MRGN_LEFT,
CLCDEFAULT_MRGN_TOP, CLCDEFAULT_MRGN_RIGHT, CLCDEFAULT_MRGN_BOTTOM, CLCDEFAULT_IGNORE
@@ -737,16 +737,16 @@ static struct unsigned int size;
int defaultval;
} _tagSettings[] = {
- _T("Global"), _T("SbarHeight"), "S_sbarheight", 1, 22,
- _T("ClientArea"), _T("Left"), "S_tborder_outer_left", 1, 0,
- _T("ClientArea"), _T("Right"), "S_tborder_outer_right", 1, 0,
- _T("ClientArea"), _T("Top"), "S_tborder_outer_top", 1, 0,
- _T("ClientArea"), _T("Bottom"), "S_tborder_outer_bottom", 1, 0,
- _T("ClientArea"), _T("Inner"), "S_tborder", 1, 0,
- _T("Global"), _T("TabTextNormal"), "S_tab_txt_normal", 5, 0,
- _T("Global"), _T("TabTextActive"), "S_tab_txt_active", 5, 0,
- _T("Global"), _T("TabTextUnread"), "S_tab_txt_unread", 5, 0,
- _T("Global"), _T("TabTextHottrack"), "S_tab_txt_hottrack", 5, 0,
+ L"Global", L"SbarHeight", "S_sbarheight", 1, 22,
+ L"ClientArea", L"Left", "S_tborder_outer_left", 1, 0,
+ L"ClientArea", L"Right", "S_tborder_outer_right", 1, 0,
+ L"ClientArea", L"Top", "S_tborder_outer_top", 1, 0,
+ L"ClientArea", L"Bottom", "S_tborder_outer_bottom", 1, 0,
+ L"ClientArea", L"Inner", "S_tborder", 1, 0,
+ L"Global", L"TabTextNormal", "S_tab_txt_normal", 5, 0,
+ L"Global", L"TabTextActive", "S_tab_txt_active", 5, 0,
+ L"Global", L"TabTextUnread", "S_tab_txt_unread", 5, 0,
+ L"Global", L"TabTextHottrack", "S_tab_txt_hottrack", 5, 0,
NULL, NULL, NULL, 0, 0
};
@@ -801,9 +801,9 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) TCHAR szDrive[MAX_PATH], szPath[MAX_PATH];
TCHAR *szFinalName = 0;
- GetPrivateProfileString(m_szName, _T("Glyph"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
- _stscanf(buffer, _T("%d,%d,%d,%d"), &m_glyphMetrics[0], &m_glyphMetrics[1],
+ GetPrivateProfileString(m_szName, L"Glyph", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
+ _stscanf(buffer, L"%d,%d,%d,%d", &m_glyphMetrics[0], &m_glyphMetrics[1],
&m_glyphMetrics[2], &m_glyphMetrics[3]);
if (m_glyphMetrics[2] > m_glyphMetrics[0] && m_glyphMetrics[3] > m_glyphMetrics[1]) {
m_dwFlags |= IMAGE_GLYPH;
@@ -812,25 +812,25 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) }
}
- GetPrivateProfileString(m_szName, _T("Image"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None")) || m_dwFlags & IMAGE_GLYPH) {
+ GetPrivateProfileString(m_szName, L"Image", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None") || m_dwFlags & IMAGE_GLYPH) {
szFinalName = new TCHAR[MAX_PATH];
//strncpy(m_szName, &m_szName[1], sizeof(m_szName));
//m_szName[sizeof(m_szName) - 1] = 0;
_tsplitpath(szFilename, szDrive, szPath, NULL, NULL);
- mir_sntprintf(szFinalName, MAX_PATH, _T("%s\\%s%s"), szDrive, szPath, buffer);
+ mir_sntprintf(szFinalName, MAX_PATH, L"%s\\%s%s", szDrive, szPath, buffer);
if (!PathFileExists(szFinalName)) {
delete[] szFinalName;
szFinalName = 0;
}
- m_alpha = GetPrivateProfileInt(m_szName, _T("Alpha"), 100, szFilename);
+ m_alpha = GetPrivateProfileInt(m_szName, L"Alpha", 100, szFilename);
m_alpha = min(m_alpha, 100);
m_alpha = (BYTE)((FLOAT)(((FLOAT)m_alpha) / 100) * 255);
m_bf.SourceConstantAlpha = m_alpha;
- m_bLeft = GetPrivateProfileInt(m_szName, _T("Left"), 0, szFilename);
- m_bRight = GetPrivateProfileInt(m_szName, _T("Right"), 0, szFilename);
- m_bTop = GetPrivateProfileInt(m_szName, _T("Top"), 0, szFilename);
- m_bBottom = GetPrivateProfileInt(m_szName, _T("Bottom"), 0, szFilename);
+ m_bLeft = GetPrivateProfileInt(m_szName, L"Left", 0, szFilename);
+ m_bRight = GetPrivateProfileInt(m_szName, L"Right", 0, szFilename);
+ m_bTop = GetPrivateProfileInt(m_szName, L"Top", 0, szFilename);
+ m_bBottom = GetPrivateProfileInt(m_szName, L"Bottom", 0, szFilename);
if (m_dwFlags & IMAGE_GLYPH) {
m_width = m_glyphMetrics[2];
m_height = m_glyphMetrics[3];
@@ -851,22 +851,22 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) return(szFinalName);
}
}
- GetPrivateProfileString(m_szName, _T("Fillcolor"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
+ GetPrivateProfileString(m_szName, L"Fillcolor", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
COLORREF fillColor = CSkin::HexStringToLong(buffer);
m_fillBrush = CreateSolidBrush(fillColor);
m_dwFlags |= IMAGE_FILLSOLID;
}
else
m_fillBrush = 0;
- GetPrivateProfileString(m_szName, _T("Colorkey"), _T("None"), buffer, 500, szFilename);
- if (mir_tstrcmp(buffer, _T("None"))) {
+ GetPrivateProfileString(m_szName, L"Colorkey", L"None", buffer, 500, szFilename);
+ if (mir_tstrcmp(buffer, L"None")) {
CSkin::m_ContainerColorKey = CSkin::HexStringToLong(buffer);
if (CSkin::m_ContainerColorKeyBrush)
DeleteObject(CSkin::m_ContainerColorKeyBrush);
CSkin::m_ContainerColorKeyBrush = CreateSolidBrush(CSkin::m_ContainerColorKey);
}
- GetPrivateProfileString(m_szName, _T("Stretch"), _T("None"), buffer, 500, szFilename);
+ GetPrivateProfileString(m_szName, L"Stretch", L"None", buffer, 500, szFilename);
if (buffer[0] == 'B' || buffer[0] == 'b')
m_bStretch = IMAGE_STRETCH_B;
else if (buffer[0] == 'h' || buffer[0] == 'H')
@@ -874,7 +874,7 @@ TCHAR* CImageItem::Read(const TCHAR *szFilename) else if (buffer[0] == 'w' || buffer[0] == 'W')
m_bStretch = IMAGE_STRETCH_H;
m_hbm = 0;
- if (GetPrivateProfileInt(m_szName, _T("Perpixel"), 0, szFilename))
+ if (GetPrivateProfileInt(m_szName, L"Perpixel", 0, szFilename))
m_dwFlags |= IMAGE_PERPIXEL_ALPHA;
return(szFinalName);
@@ -1201,14 +1201,14 @@ void CSkin::LoadIcon(const TCHAR *szSection, const TCHAR *name, HICON &hIcon) DestroyIcon(hIcon);
TCHAR buffer[512];
- GetPrivateProfileString(szSection, name, _T("none"), buffer, 250, m_tszFileName);
+ GetPrivateProfileString(szSection, name, L"none", buffer, 250, m_tszFileName);
buffer[500] = 0;
- if (mir_tstrcmpi(buffer, _T("none"))) {
+ if (mir_tstrcmpi(buffer, L"none")) {
TCHAR szDrive[MAX_PATH], szDir[MAX_PATH], szImagePath[MAX_PATH];
_tsplitpath(m_tszFileName, szDrive, szDir, NULL, NULL);
- mir_sntprintf(szImagePath, _T("%s\\%s\\%s"), szDrive, szDir, buffer);
+ mir_sntprintf(szImagePath, L"%s\\%s\\%s", szDrive, szDir, buffer);
hIcon = (HICON)LoadImage(0, szImagePath, IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
}
else hIcon = NULL;
@@ -1233,54 +1233,54 @@ void CSkin::ReadItem(const int id, const TCHAR *szItem) CSkinItem *this_item = &m_SkinItems[id];
- this_item->ALPHA = (int)GetPrivateProfileInt(szItem, _T("Alpha"), defaults->ALPHA, m_tszFileName);
+ this_item->ALPHA = (int)GetPrivateProfileInt(szItem, L"Alpha", defaults->ALPHA, m_tszFileName);
this_item->ALPHA = min(this_item->ALPHA, 100);
clr = RGB(GetBValue(defaults->COLOR), GetGValue(defaults->COLOR), GetRValue(defaults->COLOR));
- mir_sntprintf(def_color, _T("%6.6x"), clr);
- GetPrivateProfileString(szItem, _T("Color1"), def_color, buffer, 400, m_tszFileName);
+ mir_sntprintf(def_color, L"%6.6x", clr);
+ GetPrivateProfileString(szItem, L"Color1", def_color, buffer, 400, m_tszFileName);
this_item->COLOR = HexStringToLong(buffer);
clr = RGB(GetBValue(defaults->COLOR2), GetGValue(defaults->COLOR2), GetRValue(defaults->COLOR2));
- mir_sntprintf(def_color, _T("%6.6x"), clr);
- GetPrivateProfileString(szItem, _T("Color2"), def_color, buffer, 400, m_tszFileName);
+ mir_sntprintf(def_color, L"%6.6x", clr);
+ GetPrivateProfileString(szItem, L"Color2", def_color, buffer, 400, m_tszFileName);
this_item->COLOR2 = HexStringToLong(buffer);
- this_item->COLOR2_TRANSPARENT = (BYTE)GetPrivateProfileInt(szItem, _T("COLOR2_TRANSPARENT"), defaults->COLOR2_TRANSPARENT, m_tszFileName);
+ this_item->COLOR2_TRANSPARENT = (BYTE)GetPrivateProfileInt(szItem, L"COLOR2_TRANSPARENT", defaults->COLOR2_TRANSPARENT, m_tszFileName);
this_item->CORNER = defaults->CORNER & CORNER_ACTIVE ? defaults->CORNER : 0;
- GetPrivateProfileString(szItem, _T("Corner"), _T("None"), buffer, 400, m_tszFileName);
- if (_tcsstr(buffer, _T("tl")))
+ GetPrivateProfileString(szItem, L"Corner", L"None", buffer, 400, m_tszFileName);
+ if (_tcsstr(buffer, L"tl"))
this_item->CORNER |= CORNER_TL;
- if (_tcsstr(buffer, _T("tr")))
+ if (_tcsstr(buffer, L"tr"))
this_item->CORNER |= CORNER_TR;
- if (_tcsstr(buffer, _T("bl")))
+ if (_tcsstr(buffer, L"bl"))
this_item->CORNER |= CORNER_BL;
- if (_tcsstr(buffer, _T("br")))
+ if (_tcsstr(buffer, L"br"))
this_item->CORNER |= CORNER_BR;
if (this_item->CORNER)
this_item->CORNER |= CORNER_ACTIVE;
this_item->GRADIENT = defaults->GRADIENT & GRADIENT_ACTIVE ? defaults->GRADIENT : 0;
- GetPrivateProfileString(szItem, _T("Gradient"), _T("None"), buffer, 400, m_tszFileName);
- if (_tcsstr(buffer, _T("left")))
+ GetPrivateProfileString(szItem, L"Gradient", L"None", buffer, 400, m_tszFileName);
+ if (_tcsstr(buffer, L"left"))
this_item->GRADIENT = GRADIENT_RL;
- else if (_tcsstr(buffer, _T("right")))
+ else if (_tcsstr(buffer, L"right"))
this_item->GRADIENT = GRADIENT_LR;
- else if (_tcsstr(buffer, _T("up")))
+ else if (_tcsstr(buffer, L"up"))
this_item->GRADIENT = GRADIENT_BT;
- else if (_tcsstr(buffer, _T("down")))
+ else if (_tcsstr(buffer, L"down"))
this_item->GRADIENT = GRADIENT_TB;
if (this_item->GRADIENT)
this_item->GRADIENT |= GRADIENT_ACTIVE;
- this_item->MARGIN_LEFT = GetPrivateProfileInt(szItem, _T("Left"), defaults->MARGIN_LEFT, m_tszFileName);
- this_item->MARGIN_RIGHT = GetPrivateProfileInt(szItem, _T("Right"), defaults->MARGIN_RIGHT, m_tszFileName);
- this_item->MARGIN_TOP = GetPrivateProfileInt(szItem, _T("Top"), defaults->MARGIN_TOP, m_tszFileName);
- this_item->MARGIN_BOTTOM = GetPrivateProfileInt(szItem, _T("Bottom"), defaults->MARGIN_BOTTOM, m_tszFileName);
- this_item->BORDERSTYLE = GetPrivateProfileInt(szItem, _T("Radius"), defaults->BORDERSTYLE, m_tszFileName);
+ this_item->MARGIN_LEFT = GetPrivateProfileInt(szItem, L"Left", defaults->MARGIN_LEFT, m_tszFileName);
+ this_item->MARGIN_RIGHT = GetPrivateProfileInt(szItem, L"Right", defaults->MARGIN_RIGHT, m_tszFileName);
+ this_item->MARGIN_TOP = GetPrivateProfileInt(szItem, L"Top", defaults->MARGIN_TOP, m_tszFileName);
+ this_item->MARGIN_BOTTOM = GetPrivateProfileInt(szItem, L"Bottom", defaults->MARGIN_BOTTOM, m_tszFileName);
+ this_item->BORDERSTYLE = GetPrivateProfileInt(szItem, L"Radius", defaults->BORDERSTYLE, m_tszFileName);
- GetPrivateProfileString(szItem, _T("Textcolor"), _T("ffffffff"), buffer, 400, m_tszFileName);
+ GetPrivateProfileString(szItem, L"Textcolor", L"ffffffff", buffer, 400, m_tszFileName);
this_item->TEXTCOLOR = HexStringToLong(buffer);
this_item->IGNORED = 0;
}
@@ -1299,7 +1299,7 @@ void CSkin::ReadImageItem(const TCHAR *itemname) TCHAR *szImageFileName = tmpItem.Read(m_tszFileName);
- if (!mir_tstrcmpi(itemname, _T("$glyphs")) && szImageFileName != 0) { // the glyph item MUST have a valid image
+ if (!mir_tstrcmpi(itemname, L"$glyphs") && szImageFileName != 0) { // the glyph item MUST have a valid image
tmpItem.Create(szImageFileName);
if (tmpItem.getHbm()) {
m_glyphItem = tmpItem;
@@ -1312,9 +1312,9 @@ void CSkin::ReadImageItem(const TCHAR *itemname) // handle the assignments of image items to skin items
for (int n = 0;; n++) {
- mir_sntprintf(szItemNr, _T("Item%d"), n);
- GetPrivateProfileString(itemname, szItemNr, _T("None"), buffer, 500, m_tszFileName);
- if (!mir_tstrcmp(buffer, _T("None")))
+ mir_sntprintf(szItemNr, L"Item%d", n);
+ GetPrivateProfileString(itemname, szItemNr, L"None", buffer, 500, m_tszFileName);
+ if (!mir_tstrcmp(buffer, L"None"))
break;
for (int i = 0; i <= ID_EXTBK_LAST; i++) {
if (!mir_tstrcmpi(SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName, buffer)) {
@@ -1372,7 +1372,7 @@ void CSkin::Load(void) UINT data;
TCHAR buffer[500];
- if (!(GetPrivateProfileInt(_T("Global"), _T("Version"), 0, m_tszFileName) >= 1 && GetPrivateProfileInt(_T("Global"), _T("Signature"), 0, m_tszFileName) == 101))
+ if (!(GetPrivateProfileInt(L"Global", L"Version", 0, m_tszFileName) >= 1 && GetPrivateProfileInt(L"Global", L"Signature", 0, m_tszFileName) == 101))
return;
i = 0;
@@ -1391,7 +1391,7 @@ void CSkin::Load(void) db_set_w(NULL, SRMSGMOD_T, _tagSettings[i].szSetting, (WORD)data);
break;
case 5:
- GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, _T("000000"),
+ GetPrivateProfileString(_tagSettings[i].szIniKey, _tagSettings[i].szIniName, L"000000",
buffer, 10, m_tszFileName);
db_set_dw(0, SRMSGMOD_T, _tagSettings[i].szSetting, HexStringToLong(buffer));
break;
@@ -1426,84 +1426,84 @@ void CSkin::Load(void) M.getAeroState(); // refresh aero state (set to false when a skin is successfully loaded and active)
}
- GetPrivateProfileString(_T("Avatars"), _T("BorderColor"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Avatars", L"BorderColor", L"000000", buffer, 20, m_tszFileName);
m_avatarBorderClr = (COLORREF)HexStringToLong(buffer);
- GetPrivateProfileString(_T("Global"), _T("SideBarBG"), _T("None"), buffer, 20, m_tszFileName);
- if (mir_tstrcmp(buffer, _T("None")))
+ GetPrivateProfileString(L"Global", L"SideBarBG", L"None", buffer, 20, m_tszFileName);
+ if (mir_tstrcmp(buffer, L"None"))
m_sideBarContainerBG = (COLORREF)HexStringToLong(buffer);
else
m_sideBarContainerBG = SkinItems[ID_EXTBKSIDEBARBG].COLOR;
- m_bAvatarBorderType = GetPrivateProfileInt(_T("Avatars"), _T("BorderType"), 1, m_tszFileName);
+ m_bAvatarBorderType = GetPrivateProfileInt(L"Avatars", L"BorderType", 1, m_tszFileName);
- LoadIcon(_T("Global"), _T("CloseGlyph"), CSkin::m_closeIcon);
- LoadIcon(_T("Global"), _T("MaximizeGlyph"), CSkin::m_maxIcon);
- LoadIcon(_T("Global"), _T("MinimizeGlyph"), CSkin::m_minIcon);
+ LoadIcon(L"Global", L"CloseGlyph", CSkin::m_closeIcon);
+ LoadIcon(L"Global", L"MaximizeGlyph", CSkin::m_maxIcon);
+ LoadIcon(L"Global", L"MinimizeGlyph", CSkin::m_minIcon);
- m_frameSkins = GetPrivateProfileInt(_T("Global"), _T("framelessmode"), 0, m_tszFileName) ? true : false;
- m_DisableScrollbars = GetPrivateProfileInt(_T("Global"), _T("NoScrollbars"), 0, m_tszFileName) ? true : false;
+ m_frameSkins = GetPrivateProfileInt(L"Global", L"framelessmode", 0, m_tszFileName) ? true : false;
+ m_DisableScrollbars = GetPrivateProfileInt(L"Global", L"NoScrollbars", 0, m_tszFileName) ? true : false;
- m_SkinnedFrame_left = GetPrivateProfileInt(_T("WindowFrame"), _T("left"), 4, m_tszFileName);
- m_SkinnedFrame_right = GetPrivateProfileInt(_T("WindowFrame"), _T("right"), 4, m_tszFileName);
- m_SkinnedFrame_caption = GetPrivateProfileInt(_T("WindowFrame"), _T("Caption"), 24, m_tszFileName);
- m_SkinnedFrame_bottom = GetPrivateProfileInt(_T("WindowFrame"), _T("bottom"), 4, m_tszFileName);
+ m_SkinnedFrame_left = GetPrivateProfileInt(L"WindowFrame", L"left", 4, m_tszFileName);
+ m_SkinnedFrame_right = GetPrivateProfileInt(L"WindowFrame", L"right", 4, m_tszFileName);
+ m_SkinnedFrame_caption = GetPrivateProfileInt(L"WindowFrame", L"Caption", 24, m_tszFileName);
+ m_SkinnedFrame_bottom = GetPrivateProfileInt(L"WindowFrame", L"bottom", 4, m_tszFileName);
- m_titleBarButtonSize.cx = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonWidth"), 24, m_tszFileName);
- m_titleBarButtonSize.cy = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonHeight"), 12, m_tszFileName);
- m_titleButtonTopOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleButtonTopOffset"), 0, m_tszFileName);
+ m_titleBarButtonSize.cx = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonWidth", 24, m_tszFileName);
+ m_titleBarButtonSize.cy = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonHeight", 12, m_tszFileName);
+ m_titleButtonTopOff = GetPrivateProfileInt(L"WindowFrame", L"TitleButtonTopOffset", 0, m_tszFileName);
- m_titleBarRightOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleBarRightOffset"), 0, m_tszFileName);
- m_titleBarLeftOff = GetPrivateProfileInt(_T("WindowFrame"), _T("TitleBarLeftOffset"), 0, m_tszFileName);
+ m_titleBarRightOff = GetPrivateProfileInt(L"WindowFrame", L"TitleBarRightOffset", 0, m_tszFileName);
+ m_titleBarLeftOff = GetPrivateProfileInt(L"WindowFrame", L"TitleBarLeftOffset", 0, m_tszFileName);
- m_captionOffset = GetPrivateProfileInt(_T("WindowFrame"), _T("CaptionOffset"), 3, m_tszFileName);
- m_captionPadding = GetPrivateProfileInt(_T("WindowFrame"), _T("CaptionPadding"), 0, m_tszFileName);
- m_sidebarTopOffset = GetPrivateProfileInt(_T("ClientArea"), _T("SidebarTop"), -1, m_tszFileName);
- m_sidebarBottomOffset = GetPrivateProfileInt(_T("ClientArea"), _T("SidebarBottom"), -1, m_tszFileName);
+ m_captionOffset = GetPrivateProfileInt(L"WindowFrame", L"CaptionOffset", 3, m_tszFileName);
+ m_captionPadding = GetPrivateProfileInt(L"WindowFrame", L"CaptionPadding", 0, m_tszFileName);
+ m_sidebarTopOffset = GetPrivateProfileInt(L"ClientArea", L"SidebarTop", -1, m_tszFileName);
+ m_sidebarBottomOffset = GetPrivateProfileInt(L"ClientArea", L"SidebarBottom", -1, m_tszFileName);
- m_bClipBorder = GetPrivateProfileInt(_T("WindowFrame"), _T("ClipFrame"), 0, m_tszFileName) ? true : false;
+ m_bClipBorder = GetPrivateProfileInt(L"WindowFrame", L"ClipFrame", 0, m_tszFileName) ? true : false;
BYTE radius_tl, radius_tr, radius_bl, radius_br;
TCHAR szFinalName[MAX_PATH];
TCHAR szDrive[MAX_PATH], szPath[MAX_PATH];
- radius_tl = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusTL"), 0, m_tszFileName);
- radius_tr = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusTR"), 0, m_tszFileName);
- radius_bl = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusBL"), 0, m_tszFileName);
- radius_br = GetPrivateProfileInt(_T("WindowFrame"), _T("RadiusBR"), 0, m_tszFileName);
+ radius_tl = GetPrivateProfileInt(L"WindowFrame", L"RadiusTL", 0, m_tszFileName);
+ radius_tr = GetPrivateProfileInt(L"WindowFrame", L"RadiusTR", 0, m_tszFileName);
+ radius_bl = GetPrivateProfileInt(L"WindowFrame", L"RadiusBL", 0, m_tszFileName);
+ radius_br = GetPrivateProfileInt(L"WindowFrame", L"RadiusBR", 0, m_tszFileName);
CSkin::m_bRoundedCorner = radius_tl;
- GetPrivateProfileString(_T("Theme"), _T("File"), _T("None"), buffer, MAX_PATH, m_tszFileName);
+ GetPrivateProfileString(L"Theme", L"File", L"None", buffer, MAX_PATH, m_tszFileName);
_tsplitpath(m_tszFileName, szDrive, szPath, NULL, NULL);
- mir_sntprintf(szFinalName, _T("%s\\%s\\%s"), szDrive, szPath, buffer);
+ mir_sntprintf(szFinalName, L"%s\\%s\\%s", szDrive, szPath, buffer);
if (PathFileExists(szFinalName)) {
ReadThemeFromINI(szFinalName, 0, FALSE, m_fLoadOnStartup ? 0 : M.GetByte("skin_loadmode", 0));
CacheLogFonts();
CacheMsgLogIcons();
}
- GetPrivateProfileString(_T("Global"), _T("MenuBarBG"), _T("None"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"MenuBarBG", L"None", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
if (m_MenuBGBrush) {
DeleteObject(m_MenuBGBrush);
m_MenuBGBrush = 0;
}
- if (mir_tstrcmp(buffer, _T("None")))
+ if (mir_tstrcmp(buffer, L"None"))
m_MenuBGBrush = CreateSolidBrush(data);
- GetPrivateProfileString(_T("Global"), _T("LightShadow"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"LightShadow", L"000000", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
CSkin::m_SkinLightShadowPen = CreatePen(PS_SOLID, 1, RGB(GetRValue(data), GetGValue(data), GetBValue(data)));
- GetPrivateProfileString(_T("Global"), _T("DarkShadow"), _T("000000"), buffer, 20, m_tszFileName);
+ GetPrivateProfileString(L"Global", L"DarkShadow", L"000000", buffer, 20, m_tszFileName);
data = HexStringToLong(buffer);
CSkin::m_SkinDarkShadowPen = CreatePen(PS_SOLID, 1, RGB(GetRValue(data), GetGValue(data), GetBValue(data)));
SkinCalcFrameWidth();
- GetPrivateProfileString(_T("Global"), _T("FontColor"), _T("None"), buffer, 20, m_tszFileName);
- if (mir_tstrcmp(buffer, _T("None")))
+ GetPrivateProfileString(L"Global", L"FontColor", L"None", buffer, 20, m_tszFileName);
+ if (mir_tstrcmp(buffer, L"None"))
CSkin::m_DefaultFontColor = HexStringToLong(buffer);
else
CSkin::m_DefaultFontColor = GetSysColor(COLOR_BTNTEXT);
@@ -1535,7 +1535,7 @@ void CSkin::LoadItems() szSections = (TCHAR*)mir_alloc((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR));
memset(szSections, 0, ((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR)));
- GetPrivateProfileSection(_T("Icons"), szSections, SECT_BUFFER_SIZE, m_tszFileName);
+ GetPrivateProfileSection(L"Icons", szSections, SECT_BUFFER_SIZE, m_tszFileName);
szSections[SECT_BUFFER_SIZE] = 0;
p = szSections;
@@ -1544,7 +1544,7 @@ void CSkin::LoadItems() if (p1)
*p1 = 0;
if (m_nrSkinIcons < NR_MAXSKINICONS && p1) {
- LoadIcon(_T("Icons"), p, *(HICON*)&tmpIconDesc.uId);
+ LoadIcon(L"Icons", p, *(HICON*)&tmpIconDesc.uId);
if (tmpIconDesc.uId) {
memset(&m_skinIcons[m_nrSkinIcons], 0, sizeof(TIconDesc));
m_skinIcons[m_nrSkinIcons].uId = tmpIconDesc.uId;
@@ -1574,10 +1574,10 @@ void CSkin::LoadItems() p = szSections;
mir_free(szSections);
- g_ButtonSet.top = GetPrivateProfileInt(_T("ButtonArea"), _T("top"), 0, m_tszFileName);
- g_ButtonSet.bottom = GetPrivateProfileInt(_T("ButtonArea"), _T("bottom"), 0, m_tszFileName);
- g_ButtonSet.left = GetPrivateProfileInt(_T("ButtonArea"), _T("left"), 0, m_tszFileName);
- g_ButtonSet.right = GetPrivateProfileInt(_T("ButtonArea"), _T("right"), 0, m_tszFileName);
+ g_ButtonSet.top = GetPrivateProfileInt(L"ButtonArea", L"top", 0, m_tszFileName);
+ g_ButtonSet.bottom = GetPrivateProfileInt(L"ButtonArea", L"bottom", 0, m_tszFileName);
+ g_ButtonSet.left = GetPrivateProfileInt(L"ButtonArea", L"left", 0, m_tszFileName);
+ g_ButtonSet.right = GetPrivateProfileInt(L"ButtonArea", L"right", 0, m_tszFileName);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1669,13 +1669,13 @@ void CSkin::setupAeroSkins() TCHAR tszFilename[MAX_PATH], tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- mir_tstrcat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, L"\\");
// load unknown avatar..
if (0 == PluginConfig.g_hbmUnknown) {
- mir_sntprintf(tszFilename, _T("%scustom_unknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_unknown.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%sunknown.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%sunknown.png", tszBasePath);
PluginConfig.g_hbmUnknown = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
if (PluginConfig.g_hbmUnknown == 0) {
HDC dc = GetDC(0);
@@ -1684,9 +1684,9 @@ void CSkin::setupAeroSkins() }
}
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero.png", tszBasePath);
BOOL isOpaque = false;
if (CMimAPI::m_pfnDwmGetColorizationColor && M.isAero())
@@ -1771,9 +1771,9 @@ void CSkin::setupAeroSkins() m_tabBottom->setMetrics(bm.bmWidth, bm.bmHeight);
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero_glow.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero_glow.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero_glow.png", tszBasePath);
fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR | IMGL_RETURNDIB);
@@ -1804,9 +1804,9 @@ void CSkin::setupAeroSkins() m_tabGlowBottom->setMetrics(bm.bmWidth, bm.bmHeight);
// background item for the button switch bar
- mir_sntprintf(tszFilename, _T("%scustom_tabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%scustom_tabskin_aero_button.png", tszBasePath);
if (!PathFileExists(tszFilename))
- mir_sntprintf(tszFilename, _T("%stabskin_aero_button.png"), tszBasePath);
+ mir_sntprintf(tszFilename, L"%stabskin_aero_button.png", tszBasePath);
hbm = (HBITMAP)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_TCHAR);
@@ -2440,14 +2440,14 @@ void CSkin::extractSkinsAndLogo(bool fForceOverwrite) const TCHAR tszBasePath[MAX_PATH];
_tcsncpy_s(tszBasePath, M.getDataPath(), _TRUNCATE);
if (tszBasePath[mir_tstrlen(tszBasePath) - 1] != '\\')
- mir_tstrcat(tszBasePath, _T("\\"));
+ mir_tstrcat(tszBasePath, L"\\");
CreateDirectoryTreeT(tszBasePath);
m_fAeroSkinsValid = true;
for (int i = 0; i < _countof(my_default_skin); i++)
- if (!Utils::extractResource(g_hInst, my_default_skin[i].ulID, _T("SKIN_GLYPH"), tszBasePath, my_default_skin[i].tszName, fForceOverwrite))
+ if (!Utils::extractResource(g_hInst, my_default_skin[i].ulID, L"SKIN_GLYPH", tszBasePath, my_default_skin[i].tszName, fForceOverwrite))
m_fAeroSkinsValid = false;
}
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index caf9715dee..d27a5446ca 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -92,7 +92,7 @@ static void TrayAnimThread(LPVOID) void TSAPI CreateTrayMenus(int mode)
{
if (mode) {
- mir_sntprintf(g_eventName, _T("tsr_evt_%d"), GetCurrentThreadId());
+ mir_sntprintf(g_eventName, L"tsr_evt_%d", GetCurrentThreadId());
g_hEvent = CreateEvent(NULL, FALSE, FALSE, g_eventName);
isAnimThreadRunning = TRUE;
hTrayAnimThread = mir_forkthread(TrayAnimThread, NULL);
@@ -142,7 +142,7 @@ void TSAPI CreateSystrayIcon(int create) nim.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
nim.hIcon = PluginConfig.g_iconContainer;
nim.uCallbackMessage = DM_TRAYICONNOTIFY;
- _tcsncpy_s(nim.szTip, _T("tabSRMM"), _TRUNCATE);
+ _tcsncpy_s(nim.szTip, L"tabSRMM", _TRUNCATE);
if (create && !nen_options.bTrayExist) {
Shell_NotifyIcon(NIM_ADD, &nim);
nen_options.bTrayExist = TRUE;
@@ -217,7 +217,7 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, con if (acc && acc->tszAccountName) {
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(mii);
- mir_sntprintf(szMenuEntry, _T("%s: %s (%s)"), acc->tszAccountName, szFinalNick, szStatus);
+ mir_sntprintf(szMenuEntry, L"%s: %s (%s)", acc->tszAccountName, szFinalNick, szStatus);
if (mode) {
if (hMenu == PluginConfig.g_hMenuRecent) {
if (CheckMenuItem(hMenu, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == 0) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 44f123e657..674872b380 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -38,15 +38,15 @@ typedef std::basic_string<TCHAR> tstring; static TRTFColorTable _rtf_ctable[] =
{
- { _T("red"), RGB(255, 0, 0), ID_FONT_RED },
- { _T("blue"), RGB(0, 0, 255), ID_FONT_BLUE },
- { _T("green"), RGB(0, 255, 0), ID_FONT_GREEN },
- { _T("magenta"), RGB(255, 0, 255), ID_FONT_MAGENTA },
- { _T("yellow"), RGB(255, 255, 0), ID_FONT_YELLOW },
- { _T("cyan"), RGB(0, 255, 255), ID_FONT_CYAN },
- { _T("black"), 0, ID_FONT_BLACK },
- { _T("white"), RGB(255, 255, 255), ID_FONT_WHITE },
- { _T(""), 0, 0 }
+ { L"red", RGB(255, 0, 0), ID_FONT_RED },
+ { L"blue", RGB(0, 0, 255), ID_FONT_BLUE },
+ { L"green", RGB(0, 255, 0), ID_FONT_GREEN },
+ { L"magenta", RGB(255, 0, 255), ID_FONT_MAGENTA },
+ { L"yellow", RGB(255, 255, 0), ID_FONT_YELLOW },
+ { L"cyan", RGB(0, 255, 255), ID_FONT_CYAN },
+ { L"black", 0, ID_FONT_BLACK },
+ { L"white", RGB(255, 255, 255), ID_FONT_WHITE },
+ { L"", 0, 0 }
};
int Utils::rtf_ctable_size = 0;
@@ -54,11 +54,11 @@ TRTFColorTable* Utils::rtf_ctable = 0; MWindowList CWarning::hWindowList = 0;
-static TCHAR *w_bbcodes_begin[] = { _T("[b]"), _T("[i]"), _T("[u]"), _T("[s]"), _T("[color=") };
-static TCHAR *w_bbcodes_end[] = { _T("[/b]"), _T("[/i]"), _T("[/u]"), _T("[/s]"), _T("[/color]") };
+static TCHAR *w_bbcodes_begin[] = { L"[b]", L"[i]", L"[u]", L"[s]", L"[color=" };
+static TCHAR *w_bbcodes_end[] = { L"[/b]", L"[/i]", L"[/u]", L"[/s]", L"[/color]" };
-static TCHAR *formatting_strings_begin[] = { _T("b1 "), _T("i1 "), _T("u1 "), _T("s1 "), _T("c1 ") };
-static TCHAR *formatting_strings_end[] = { _T("b0 "), _T("i0 "), _T("u0 "), _T("s0 "), _T("c0 ") };
+static TCHAR *formatting_strings_begin[] = { L"b1 ", L"i1 ", L"u1 ", L"s1 ", L"c1 " };
+static TCHAR *formatting_strings_end[] = { L"b0 ", L"i0 ", L"u0 ", L"s0 ", L"c0 " };
#define NR_CODES 5
@@ -91,7 +91,7 @@ const TCHAR* Utils::FormatRaw(TWindowData *dat, const TCHAR *msg, int flags, BOO endindex = i;
endmark = message.find(w_bbcodes_end[i], beginmark);
if (endindex == 4) { // color
- size_t closing = message.find_first_of(_T("]"), beginmark);
+ size_t closing = message.find_first_of(L"]", beginmark);
was_added = false;
if (closing == message.npos) { // must be an invalid [color=] tag w/o closing bracket
@@ -107,19 +107,19 @@ search_again: closing = beginmark + 7 + mir_tstrlen(rtf_ctable[ii].szName);
if (endmark != message.npos) {
message.erase(endmark, 4);
- message.replace(endmark, 4, _T("c0 "));
+ message.replace(endmark, 4, L"c0 ");
}
message.erase(beginmark, (closing - beginmark));
TCHAR szTemp[5];
- message.insert(beginmark, _T("cxxx "));
- mir_sntprintf(szTemp, _T("%02d"), MSGDLGFONTCOUNT + 13 + ii);
+ message.insert(beginmark, L"cxxx ");
+ mir_sntprintf(szTemp, L"%02d", MSGDLGFONTCOUNT + 13 + ii);
message[beginmark + 3] = szTemp[0];
message[beginmark + 4] = szTemp[1];
clr_found = true;
if (was_added) {
TCHAR wszTemp[100];
- mir_sntprintf(wszTemp, _T("##col##%06u:%04u"), endmark - closing, ii);
+ mir_sntprintf(wszTemp, L"##col##%06u:%04u", endmark - closing, ii);
wszTemp[99] = 0;
message.insert(beginmark, wszTemp);
}
@@ -127,7 +127,7 @@ search_again: }
}
if (!clr_found) {
- size_t c_closing = colorname.find_first_of(_T("]"), 0);
+ size_t c_closing = colorname.find_first_of(L"]", 0);
if (c_closing == colorname.npos)
c_closing = colorname.length();
const TCHAR *wszColname = colorname.c_str();
@@ -153,17 +153,17 @@ invalid_code: }
if (endmark != message.npos)
message.replace(endmark, 4, formatting_strings_end[i]);
- message.insert(beginmark, _T(" "));
+ message.insert(beginmark, L" ");
message.replace(beginmark, 4, formatting_strings_begin[i]);
}
}
- if (!(dwFlags & MWF_LOG_TEXTFORMAT) || message.find(_T("://")) != message.npos) {
+ if (!(dwFlags & MWF_LOG_TEXTFORMAT) || message.find(L"://") != message.npos) {
dat->clr_added = clr_was_added ? TRUE : FALSE;
return(message.c_str());
}
- while ((beginmark = message.find_first_of(_T("*/_"), beginmark)) != message.npos) {
+ while ((beginmark = message.find_first_of(L"*/_", beginmark)) != message.npos) {
endmarker = message[beginmark];
if (LOWORD(flags)) {
if (beginmark > 0 && !_istspace(message[beginmark - 1]) && !_istpunct(message[beginmark - 1])) {
@@ -174,7 +174,7 @@ invalid_code: // search a corresponding endmarker which fulfills the criteria
INT_PTR mark = beginmark + 1;
while ((endmark = message.find(endmarker, mark)) != message.npos) {
- if (_istpunct(message[endmark + 1]) || _istspace(message[endmark + 1]) || message[endmark + 1] == 0 || _tcschr(_T("*/_"), message[endmark + 1]) != NULL)
+ if (_istpunct(message[endmark + 1]) || _istspace(message[endmark + 1]) || message[endmark + 1] == 0 || _tcschr(L"*/_", message[endmark + 1]) != NULL)
goto ok;
mark = endmark + 1;
}
@@ -221,9 +221,9 @@ ok: continue;
}
}
- message.insert(endmark, _T("%%%"));
+ message.insert(endmark, L"%%%");
message.replace(endmark, 4, formatting_strings_end[index]);
- message.insert(beginmark, _T("%%%"));
+ message.insert(beginmark, L"%%%");
message.replace(beginmark, 4, formatting_strings_begin[index]);
}
dat->clr_added = clr_was_added ? TRUE : FALSE;
@@ -271,7 +271,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat, CMStri break;
case 'c':
- dest.Append(!mir_tstrcmp(dat->pContainer->szName, _T("default")) ? TranslateT("Default container") : dat->pContainer->szName);
+ dest.Append(!mir_tstrcmp(dat->pContainer->szName, L"default") ? TranslateT("Default container") : dat->pContainer->szName);
break;
case 'o':
@@ -299,7 +299,7 @@ bool Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat, CMStri ptrT szXStatus(db_get_tsa(dat->hContact, dat->szProto, "XStatusName"));
dest.Append((szXStatus != NULL) ? Trunc500(szXStatus) : xStatusDescr[xStatus - 1]);
}
- else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : _T("(undef)"));
+ else dest.Append(dat->szStatus && dat->szStatus[0] ? dat->szStatus : L"(undef)");
}
break;
@@ -364,7 +364,7 @@ WCHAR* Utils::FilterEventMarkers(WCHAR *wszText) void Utils::DoubleAmpersands(TCHAR *pszText, size_t len)
{
CMString text(pszText);
- text.Replace(_T("&"), _T("&&"));
+ text.Replace(L"&", L"&&");
mir_tstrncpy(pszText, text.c_str(), len);
}
@@ -399,7 +399,7 @@ TCHAR* Utils::GetPreviewWithEllipsis(TCHAR *szText, size_t iMaxLen) uRequired = (p - szText) + 6;
}
TCHAR *szResult = reinterpret_cast<TCHAR *>(mir_alloc((uRequired + 1) * sizeof(TCHAR)));
- mir_sntprintf(szResult, (uRequired + 1), fEllipsis ? _T("%s...") : _T("%s"), szText);
+ mir_sntprintf(szResult, (uRequired + 1), fEllipsis ? L"%s..." : L"%s", szText);
if (p)
*p = cSaved;
@@ -457,7 +457,7 @@ void Utils::RTF_ColorAdd(const TCHAR *tszColname, size_t length) rtf_ctable_size++;
rtf_ctable = (TRTFColorTable *)mir_realloc(rtf_ctable, sizeof(TRTFColorTable) * rtf_ctable_size);
COLORREF clr = _tcstol(tszColname, &stopped, 16);
- mir_sntprintf(rtf_ctable[rtf_ctable_size - 1].szName, length + 1, _T("%06x"), clr);
+ mir_sntprintf(rtf_ctable[rtf_ctable_size - 1].szName, length + 1, L"%06x", clr);
rtf_ctable[rtf_ctable_size - 1].menuid = 0;
clr = _tcstol(tszColname, &stopped, 16);
@@ -800,7 +800,7 @@ bool Utils::extractResource(const HMODULE h, const UINT uID, const TCHAR *tszNam DWORD dwSize = SizeofResource(g_hInst, hRes), written = 0;
TCHAR szFilename[MAX_PATH];
- mir_sntprintf(szFilename, _T("%s%s"), tszPath, tszFilename);
+ mir_sntprintf(szFilename, L"%s%s", tszPath, tszFilename);
if (!fForceOverwrite)
if (PathFileExists(szFilename))
return true;
@@ -834,7 +834,7 @@ TCHAR* Utils::extractURLFromRichEdit(const ENLINK* _e, const HWND hwndRich) tr.lpstrText = (TCHAR*)mir_alloc(sizeof(TCHAR) * (tr.chrg.cpMax - tr.chrg.cpMin + 8));
::SendMessage(hwndRich, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
if (_tcschr(tr.lpstrText, '@') != NULL && _tcschr(tr.lpstrText, ':') == NULL && _tcschr(tr.lpstrText, '/') == NULL) {
- mir_tstrncpy(tr.lpstrText, _T("mailto:"), 7);
+ mir_tstrncpy(tr.lpstrText, L"mailto:", 7);
mir_tstrncpy(tr.lpstrText + 7, tr.lpstrText, tr.chrg.cpMax - tr.chrg.cpMin + 1);
}
return tr.lpstrText;
@@ -960,14 +960,14 @@ void Utils::AddToFileList(TCHAR ***pppFiles, int *totalCount, LPCTSTR szFilename WIN32_FIND_DATA fd;
TCHAR szPath[MAX_PATH];
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\*"));
+ mir_tstrcat(szPath, L"\\*");
HANDLE hFind = FindFirstFile(szPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
+ if (!mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L".."))
continue;
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
mir_tstrcat(szPath, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
} while (FindNextFile(hFind, &fd));
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index a4f27a61f7..a5bed3cef5 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -31,7 +31,7 @@ #define RTF_CTABLE_DEFSIZE 8
-#define RTF_DEFAULT_HEADER _T("{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u")
+#define RTF_DEFAULT_HEADER L"{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u"
#define CNT_KEYNAME "CNTW_Def"
#define CNT_BASEKEYNAME "CNTW_"
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 42fb11a362..4f07b1395d 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -218,7 +218,7 @@ void InitMessagePump() wcl.lpszClassName = POP_WIN_CLASS;
RegisterClassEx(&wcl);
- hDwmapiDll = LoadLibrary(_T("dwmapi.dll"));
+ hDwmapiDll = LoadLibrary(L"dwmapi.dll");
if (hDwmapiDll)
MyDwmEnableBlurBehindWindow = (HRESULT (WINAPI *)(HWND, DWM_BLURBEHIND *))GetProcAddress(hDwmapiDll, "DwmEnableBlurBehindWindow");
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 05095a2fea..3e2df38660 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -124,7 +124,7 @@ SIZE GetTextSize(HDC hdcMem, const TCHAR *szText, SMILEYPARSEINFO info, UINT uTe }
else {
// Get real height of the line
- text_height = DrawText(hdcMem, _T("A"), 1, &text_rc, DT_CALCRECT | uTextFormat);
+ text_height = DrawText(hdcMem, L"A", 1, &text_rc, DT_CALCRECT | uTextFormat);
// See each item of list
int i;
@@ -196,13 +196,13 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, SMIL i = 0;
// Get real height of the line
- text_height = DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat);
+ text_height = DrawText(hdcMem, L"A", 1, &tmp_rc, DT_CALCRECT | uTextFormat);
mir_ptr<COLOR32> pBits(SaveAlpha(&free_rc));
// Just draw ellipsis
if (free_rc.right <= free_rc.left)
- DrawText(hdcMem, _T("..."), 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
+ DrawText(hdcMem, L"...", 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS);
else {
// Draw text and smileys
RECT text_rc = free_rc;
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 2e8b94fdd8..63ca767e1e 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -49,8 +49,8 @@ void CreateDefaultItems() for (int i = 0; defaultItemList[i].szName; i++) {
if (defaultItemList[i].szName[0] == '-') {
DIListNode *di_node = (DIListNode *)mir_alloc(sizeof(DIListNode));
- _tcsncpy(di_node->di.swzLabel, _T(""), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T(""), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"", VALUE_LEN);
di_node->di.bLineAbove = true;
di_node->di.bIsVisible = true;
di_node->di.bParseTipperVarsFirst = false;
@@ -275,7 +275,7 @@ void SaveItems() opt.bWaitForStatusMsg = false;
while (di_node) {
SaveDI(&di_node->di, index);
- if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, _T("sys:status_msg")))
+ if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, L"sys:status_msg"))
opt.bWaitForStatusMsg = true;
di_node = di_node->next;
index++;
@@ -372,7 +372,7 @@ void LoadOptions() di_node->next = opt.diList;
opt.diList = di_node;
real_count++;
- if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, _T("sys:status_msg")))
+ if (di_node->di.bIsVisible && _tcsstr(di_node->di.swzValue, L"sys:status_msg"))
opt.bWaitForStatusMsg = true;
}
else
@@ -411,8 +411,8 @@ void LoadOptions() di_node = opt.diList;
}
- _tcsncpy(di_node->di.swzLabel, _T("Last message: (%sys:last_msg_reltime% ago)"), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T("%sys:last_msg%"), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"Last message: (%sys:last_msg_reltime% ago)", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"%sys:last_msg%", VALUE_LEN);
di_node->di.bLineAbove = di_node->di.bValueNewline = true;
di_node->next = 0;
opt.iDiCount++;
@@ -436,8 +436,8 @@ void LoadOptions() di_node = opt.diList;
}
- _tcsncpy(di_node->di.swzLabel, _T("Status message:"), LABEL_LEN);
- _tcsncpy(di_node->di.swzValue, _T("%sys:status_msg%"), VALUE_LEN);
+ _tcsncpy(di_node->di.swzLabel, L"Status message:", LABEL_LEN);
+ _tcsncpy(di_node->di.swzValue, L"%sys:status_msg%", VALUE_LEN);
di_node->di.bLineAbove = di_node->di.bValueNewline = true;
di_node->next = 0;
opt.iDiCount++;
@@ -741,7 +741,7 @@ static void SetTreeItemText(DIListNode *node, TCHAR **pszText) {
if (node->di.swzLabel[0] == 0) {
if (node->di.swzValue[0] == 0 && node->di.bLineAbove)
- *pszText = _T("--------------------------------------");
+ *pszText = L"--------------------------------------";
else
*pszText = TranslateT("<No Label>");
}
@@ -944,7 +944,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA tvi.item.stateMask = TVIS_STATEIMAGEMASK;
tvi.item.lParam = (LPARAM)di_value;
tvi.item.state = INDEXTOSTATEIMAGEMASK(2);
- tvi.item.pszText = _T("---------------------------------");
+ tvi.item.pszText = L"---------------------------------";
HTREEITEM hItem = TreeView_GetSelection(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS));
if (hItem)
@@ -2039,7 +2039,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
mir_tstrcat(swzProtos, buff);
- mir_tstrcat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, L" ");
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_FIRST_PROTOS), item.hItem);
@@ -2054,7 +2054,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA TreeView_GetItem(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), &item);
if (((item.state & TVIS_STATEIMAGEMASK) >> 12) == 2) {
mir_tstrcat(swzProtos, buff);
- mir_tstrcat(swzProtos, _T(" "));
+ mir_tstrcat(swzProtos, L" ");
}
item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_SECOND_PROTOS), item.hItem);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 0d57b32c73..1a238d7ba9 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -63,7 +63,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa SetTimer(hwnd, ID_TIMER_CHECKMOUSE, CHECKMOUSE_ELAPSE, 0); // register copy menu hotkey (CTRL+C) - pwd->iHotkeyId = GlobalAddAtom(_T("Tipper")); + pwd->iHotkeyId = GlobalAddAtom(L"Tipper"); RegisterHotKey(hwnd, pwd->iHotkeyId, MOD_CONTROL, 0x43); if (pwd->clcit.szProto) { @@ -99,7 +99,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // uid info TCHAR swzUid[256], swzUidName[256]; if (Uid(0, pwd->clcit.szProto, swzUid, 256) && UidName(pwd->clcit.szProto, swzUidName, 253)) { - mir_tstrcat(swzUidName, _T(": ")); + mir_tstrcat(swzUidName, L": "); AddRow(pwd, swzUidName, swzUid, NULL, false, false, false); } @@ -142,7 +142,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzAdvText(GetJabberAdvStatusText(pwd->clcit.szProto, "mood", "text")); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzAdvText, pwd->clcit.szProto, true, true, false); } } else { @@ -158,7 +158,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzAdvText(GetProtoExtraStatusMessage(pwd->clcit.szProto)); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzAdvText, pwd->clcit.szProto, true, true, false); } } } @@ -182,7 +182,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ptrT swzActText(GetJabberAdvStatusText(pwd->clcit.szProto, "activity", "text")); if (swzActText) { StripBBCodesInPlace(swzActText); - AddRow(pwd, _T(""), swzActText, pwd->clcit.szProto, true, true, false); + AddRow(pwd, L"", swzActText, pwd->clcit.szProto, true, true, false); } // listening to @@ -232,7 +232,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa buff[iBuffPos] = 0; if (iBuffPos) { - AddRow(pwd, _T(""), buff, NULL, false, true, false); + AddRow(pwd, L"", buff, NULL, false, true, false); bTopMessage = true; } @@ -771,7 +771,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (iLen > MAX_VALUE_LEN) { _tcsncpy(buff, pwd->rows[i].swzValue, MAX_VALUE_LEN); buff[MAX_VALUE_LEN] = 0; - mir_tstrcat(buff, _T("...")); + mir_tstrcat(buff, L"..."); } else mir_tstrcpy(buff, pwd->rows[i].swzValue); @@ -823,7 +823,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if ((pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) || (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0])) { if (pwd->rows[i].swzLabel && pwd->rows[i].swzLabel[0]) { mir_tstrcat(pchData, pwd->rows[i].swzLabel); - mir_tstrcat(pchData, _T(" ")); + mir_tstrcat(pchData, L" "); } else mir_tstrcat(pchData, TranslateT("<No Label>: ")); @@ -832,7 +832,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else mir_tstrcat(pchData, TranslateT("<No Value>")); - mir_tstrcat(pchData, _T("\r\n")); + mir_tstrcat(pchData, L"\r\n"); } } } @@ -840,7 +840,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa for (int i = 0; i < pwd->iRowCount; i++) { if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { mir_tstrcat(pchData, pwd->rows[i].swzValue); - mir_tstrcat(pchData, _T("\r\n")); + mir_tstrcat(pchData, L"\r\n"); } } } @@ -1210,7 +1210,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (pwd->rows[i].swzValue && pwd->rows[i].swzValue[0]) { if (!bStatusMsg && opt.bGetNewStatusMsg) { - if (!mir_tstrcmp(pwd->rows[i].swzValue, _T("%sys:status_msg%"))) + if (!mir_tstrcmp(pwd->rows[i].swzValue, L"%sys:status_msg%")) bStatusMsg = true; } @@ -1484,7 +1484,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa iCountOnline++; iCount++; } - mir_sntprintf(buff, _T("(%d/%d)"), iCountOnline, iCount); + mir_sntprintf(buff, L"(%d/%d)", iCountOnline, iCount); } else buff[0] = 0; @@ -1540,7 +1540,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzAdvText = GetJabberAdvStatusText(pa->szModuleName, "mood", "text"); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzAdvText, pa->szModuleName, true, true, false); mir_free(swzAdvText); } } @@ -1558,7 +1558,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzAdvText = GetProtoExtraStatusMessage(pa->szModuleName); if (swzAdvText) { StripBBCodesInPlace(swzAdvText); - AddRow(pwd, _T(""), swzAdvText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzAdvText, pa->szModuleName, true, true, false); mir_free(swzAdvText); } } @@ -1574,7 +1574,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzActText = GetJabberAdvStatusText(pa->szModuleName, "activity", "text"); if (swzActText) { StripBBCodesInPlace(swzActText); - AddRow(pwd, _T(""), swzActText, pa->szModuleName, true, true, false); + AddRow(pwd, L"", swzActText, pa->szModuleName, true, true, false); mir_free(swzActText); } } @@ -1621,7 +1621,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0); if (opt.iFavoriteContFlags & FAVCONT_APPEND_PROTO) { TCHAR *swzProto = a2t(proto); - mir_sntprintf(swzName, _T("%s (%s)"), swzNick, swzProto); + mir_sntprintf(swzName, L"%s (%s)", swzNick, swzProto); mir_free(swzProto); } else mir_tstrcpy(swzName, swzNick); @@ -1638,7 +1638,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa index -= iCount; if (index >= 0 && (dwItems & TRAYTIP_NUMCONTACTS) && !((opt.iFavoriteContFlags & FAVCONT_HIDE_OFFLINE) && iCountOnline == 0)) { - mir_sntprintf(buff, _T("(%d/%d)"), iCountOnline, iCount); + mir_sntprintf(buff, L"(%d/%d)", iCountOnline, iCount); pwd->rows[index].swzValue = mir_tstrdup(buff); } } @@ -1646,20 +1646,20 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_MIRANDA_UPTIME) { if (TimestampToTimeDifference(NULL, MODULE, "MirandaStartTS", buff, 64)) { - AddRow(pwd, TranslateT("Other"), _T(""), NULL, false, false, !bFirstItem, true, NULL); + AddRow(pwd, TranslateT("Other"), L"", NULL, false, false, !bFirstItem, true, NULL); AddRow(pwd, TranslateT("Miranda uptime:"), buff, NULL, false, false, false); } } if (dwItems & TRAYTIP_CLIST_EVENT && pwd->clcit.swzText) { TCHAR *pchBr = _tcschr(pwd->clcit.swzText, '\n'); - TCHAR *pchBold = _tcsstr(pwd->clcit.swzText, _T("<b>")); + TCHAR *pchBold = _tcsstr(pwd->clcit.swzText, L"<b>"); if (!pchBold || pchBold != pwd->clcit.swzText) { TCHAR swzText[256]; mir_tstrcpy(swzText, pwd->clcit.swzText); if (pchBr) swzText[pchBr - pwd->clcit.swzText] = 0; - AddRow(pwd, swzText, _T(""), NULL, false, true, false, true, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); + AddRow(pwd, swzText, L"", NULL, false, true, false, true, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); } } diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index 8ef1208a5f..92ac1e2855 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. #ifndef _POPWIN_INC
#define _POPWIN_INC
-#define POP_WIN_CLASS _T(MODULE) _T("MimTTClass")
+#define POP_WIN_CLASS _T(MODULE) L"MimTTClass"
#define PUM_GETHEIGHT (WM_USER + 0x020)
#define PUM_CALCPOS (WM_USER + 0x021)
diff --git a/plugins/TipperYM/src/preset_items.cpp b/plugins/TipperYM/src/preset_items.cpp index e079ebbf05..764264c42d 100644 --- a/plugins/TipperYM/src/preset_items.cpp +++ b/plugins/TipperYM/src/preset_items.cpp @@ -22,64 +22,64 @@ Boston, MA 02111-1307, USA. PRESETITEM presetItems[] =
{
- "account", LPGENT("Account"), LPGENT("Account:"), _T("%sys:account%"), 0, 0, 0,
- "birth", LPGENT("Birthday"), LPGENT("Birthday:"), _T("%birthday_date% (%birthday_age%) @ Next: %birthday_next%"), "birthdate", "birthage", "birthnext",
- "client", LPGENT("Client"), LPGENT("Client:"), _T("%raw:/MirVer%"), 0, 0, 0,
- "email", LPGENT("Email"), LPGENT("Email:"), _T("%raw:/e-mail%"), 0, 0, 0,
- "gender", LPGENT("Gender"), LPGENT("Gender:"), _T("%gender%"), 0, 0, 0,
- "homepage", LPGENT("Homepage"), LPGENT("Homepage:"), _T("%raw:/Homepage%"), 0, 0, 0,
- "id", LPGENT("Identifier"), _T("%sys:uidname|UID^!MetaContacts%:"), _T("%sys:uid%"), 0, 0, 0,
- "idle", LPGENT("Idle"), LPGENT("Idle:"), _T("%idle% (%idle_diff% ago)"), "idle", "idlediff", 0,
- "ip", _T("IP"), _T("IP:"), _T("%ip%"), "ip", 0, 0,
- "ipint", LPGENT("IP internal"), LPGENT("IP internal:"), _T("%ip_internal%"), "ipint", 0, 0,
- "lastmsg", LPGENT("Last message"), LPGENT("Last message: (%sys:last_msg_reltime% ago)"), _T("%sys:last_msg%"), 0, 0, 0,
- "listening", LPGENT("Listening to"), LPGENT("Listening to:"), _T("%raw:/ListeningTo%"), 0, 0, 0,
- "name", LPGENT("Name"), LPGENT("Name:"), _T("%raw:/FirstName|% %raw:/LastName%"), 0, 0, 0,
- "received", LPGENT("Number of received messages"), LPGENT("Number of msg [IN]:"), _T("%sys:msg_count_in%"), 0, 0, 0,
- "sended", LPGENT("Number of sent messages"), LPGENT("Number of msg [OUT]:"), _T("%sys:msg_count_out%"), 0, 0, 0,
- "status", LPGENT("Status"), LPGENT("Status:"), _T("%Status%"), "status", 0, 0,
- "statusmsg", LPGENT("Status message"), LPGENT("Status message:"), _T("%sys:status_msg%"), 0, 0, 0,
- "time", LPGENT("Contact time"), LPGENT("Time:"), _T("%sys:time%"), 0, 0, 0,
- "xtitle", LPGENT("xStatus title"), LPGENT("xStatus title:"), _T("%xsname%"), "xname", 0, 0,
- "xtext", LPGENT("xStatus text"), LPGENT("xStatus text:"), _T("%raw:/XStatusMsg%"), 0, 0, 0,
- "acttitle", LPGENT("[jabber.dll] Activity title"), LPGENT("Activity title:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/title%"), 0, 0, 0,
- "acttext", LPGENT("[jabber.dll] Activity text"), LPGENT("Activity text:"), _T("%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/text%"), 0, 0, 0,
- "lastseentime", LPGENT("[seenplugin.dll] Last seen time"), LPGENT("Last seen time:"), _T("%lastseen_date% @ %lastseen_time%"), "lsdate", "lstime", 0,
- "lastseenstatus", LPGENT("[seenplugin.dll] Last seen status"), LPGENT("Last seen status:"), _T("%lastseen_status% (%lastseen_ago% ago)"), "lsstatus", "lsago", 0,
- "cond", LPGENT("[weather.dll] Condition"), LPGENT("Condition:"), _T("%raw:Current/Condition%"), 0, 0, 0,
- "humidity", LPGENT("[weather.dll] Humidity"), LPGENT("Humidity:"), _T("%raw:Current/Humidity%"), 0, 0, 0,
- "minmaxtemp", LPGENT("[weather.dll] Max/Min temperature"), LPGENT("Max/Min:"), _T("%raw:Current/High%/%raw:Current/Low%"), 0, 0, 0,
- "moon", LPGENT("[weather.dll] Moon"), LPGENT("Moon:"), _T("%raw:Current/Moon%"), 0, 0, 0,
- "pressure", LPGENT("[weather.dll] Pressure"), LPGENT("Pressure:"), _T("%raw:Current/Pressure% (%raw:Current/Pressure Tendency%)"), 0, 0, 0,
- "sunrise", LPGENT("[weather.dll] Sunrise"), LPGENT("Sunrise:"), _T("%raw:Current/Sunrise%"), 0, 0, 0,
- "sunset", LPGENT("[weather.dll] Sunset"), LPGENT("Sunset:"), _T("%raw:Current/Sunset%"), 0, 0, 0,
- "temp", LPGENT("[weather.dll] Temperature"), LPGENT("Temperature:"), _T("%raw:Current/Temperature%"), 0, 0, 0,
- "uptime", LPGENT("[weather.dll] Update time"), LPGENT("Update time:"), _T("%raw:Current/Update%"), 0, 0, 0,
- "uvindex", LPGENT("[weather.dll] UV Index"), LPGENT("UV Index:"), _T("%raw:Current/UV% - %raw:Current/UVI%"), 0, 0, 0,
- "vis", LPGENT("[weather.dll] Visibility"), LPGENT("Visibility:"), _T("%raw:Current/Visibility%"), 0, 0, 0,
- "wind", LPGENT("[weather.dll] Wind"), LPGENT("Wind:"), _T("%raw:Current/Wind Direction% (%raw:Current/Wind Direction DEG%)/%raw:Current/Wind Speed%"), 0, 0, 0,
+ "account", LPGENT("Account"), LPGENT("Account:"), L"%sys:account%", 0, 0, 0,
+ "birth", LPGENT("Birthday"), LPGENT("Birthday:"), L"%birthday_date% (%birthday_age%) @ Next: %birthday_next%", "birthdate", "birthage", "birthnext",
+ "client", LPGENT("Client"), LPGENT("Client:"), L"%raw:/MirVer%", 0, 0, 0,
+ "email", LPGENT("Email"), LPGENT("Email:"), L"%raw:/e-mail%", 0, 0, 0,
+ "gender", LPGENT("Gender"), LPGENT("Gender:"), L"%gender%", 0, 0, 0,
+ "homepage", LPGENT("Homepage"), LPGENT("Homepage:"), L"%raw:/Homepage%", 0, 0, 0,
+ "id", LPGENT("Identifier"), L"%sys:uidname|UID^!MetaContacts%:", L"%sys:uid%", 0, 0, 0,
+ "idle", LPGENT("Idle"), LPGENT("Idle:"), L"%idle% (%idle_diff% ago)", "idle", "idlediff", 0,
+ "ip", L"IP", L"IP:", L"%ip%", "ip", 0, 0,
+ "ipint", LPGENT("IP internal"), LPGENT("IP internal:"), L"%ip_internal%", "ipint", 0, 0,
+ "lastmsg", LPGENT("Last message"), LPGENT("Last message: (%sys:last_msg_reltime% ago)"), L"%sys:last_msg%", 0, 0, 0,
+ "listening", LPGENT("Listening to"), LPGENT("Listening to:"), L"%raw:/ListeningTo%", 0, 0, 0,
+ "name", LPGENT("Name"), LPGENT("Name:"), L"%raw:/FirstName|% %raw:/LastName%", 0, 0, 0,
+ "received", LPGENT("Number of received messages"), LPGENT("Number of msg [IN]:"), L"%sys:msg_count_in%", 0, 0, 0,
+ "sended", LPGENT("Number of sent messages"), LPGENT("Number of msg [OUT]:"), L"%sys:msg_count_out%", 0, 0, 0,
+ "status", LPGENT("Status"), LPGENT("Status:"), L"%Status%", "status", 0, 0,
+ "statusmsg", LPGENT("Status message"), LPGENT("Status message:"), L"%sys:status_msg%", 0, 0, 0,
+ "time", LPGENT("Contact time"), LPGENT("Time:"), L"%sys:time%", 0, 0, 0,
+ "xtitle", LPGENT("xStatus title"), LPGENT("xStatus title:"), L"%xsname%", "xname", 0, 0,
+ "xtext", LPGENT("xStatus text"), LPGENT("xStatus text:"), L"%raw:/XStatusMsg%", 0, 0, 0,
+ "acttitle", LPGENT("[jabber.dll] Activity title"), LPGENT("Activity title:"), L"%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/title%", 0, 0, 0,
+ "acttext", LPGENT("[jabber.dll] Activity text"), LPGENT("Activity text:"), L"%raw:AdvStatus/?dbsetting(%subject%,Protocol,p)/activity/text%", 0, 0, 0,
+ "lastseentime", LPGENT("[seenplugin.dll] Last seen time"), LPGENT("Last seen time:"), L"%lastseen_date% @ %lastseen_time%", "lsdate", "lstime", 0,
+ "lastseenstatus", LPGENT("[seenplugin.dll] Last seen status"), LPGENT("Last seen status:"), L"%lastseen_status% (%lastseen_ago% ago)", "lsstatus", "lsago", 0,
+ "cond", LPGENT("[weather.dll] Condition"), LPGENT("Condition:"), L"%raw:Current/Condition%", 0, 0, 0,
+ "humidity", LPGENT("[weather.dll] Humidity"), LPGENT("Humidity:"), L"%raw:Current/Humidity%", 0, 0, 0,
+ "minmaxtemp", LPGENT("[weather.dll] Max/Min temperature"), LPGENT("Max/Min:"), L"%raw:Current/High%/%raw:Current/Low%", 0, 0, 0,
+ "moon", LPGENT("[weather.dll] Moon"), LPGENT("Moon:"), L"%raw:Current/Moon%", 0, 0, 0,
+ "pressure", LPGENT("[weather.dll] Pressure"), LPGENT("Pressure:"), L"%raw:Current/Pressure% (%raw:Current/Pressure Tendency%)", 0, 0, 0,
+ "sunrise", LPGENT("[weather.dll] Sunrise"), LPGENT("Sunrise:"), L"%raw:Current/Sunrise%", 0, 0, 0,
+ "sunset", LPGENT("[weather.dll] Sunset"), LPGENT("Sunset:"), L"%raw:Current/Sunset%", 0, 0, 0,
+ "temp", LPGENT("[weather.dll] Temperature"), LPGENT("Temperature:"), L"%raw:Current/Temperature%", 0, 0, 0,
+ "uptime", LPGENT("[weather.dll] Update time"), LPGENT("Update time:"), L"%raw:Current/Update%", 0, 0, 0,
+ "uvindex", LPGENT("[weather.dll] UV Index"), LPGENT("UV Index:"), L"%raw:Current/UV% - %raw:Current/UVI%", 0, 0, 0,
+ "vis", LPGENT("[weather.dll] Visibility"), LPGENT("Visibility:"), L"%raw:Current/Visibility%", 0, 0, 0,
+ "wind", LPGENT("[weather.dll] Wind"), LPGENT("Wind:"), L"%raw:Current/Wind Direction% (%raw:Current/Wind Direction DEG%)/%raw:Current/Wind Speed%", 0, 0, 0,
0, 0, 0, 0, 0, 0, 0
};
PRESETSUBST presetSubsts[] =
{
- "gender", _T("gender"), DVT_PROTODB, NULL, "Gender", 5,
- "status", _T("Status"), DVT_PROTODB, NULL, "Status", 1,
- "ip", _T("ip"), DVT_PROTODB, NULL, "IP", 7,
- "ipint", _T("ip_internal"), DVT_PROTODB, NULL, "RealIP", 7,
- "idle", _T("idle"), DVT_PROTODB, NULL, "IdleTS", 2,
- "idlediff", _T("idle_diff"), DVT_PROTODB, NULL, "IdleTS", 3,
- "xname", _T("xsname"), DVT_PROTODB, NULL, "XStatusName", 17,
- "lsdate", _T("lastseen_date"), DVT_DB, "SeenModule", NULL, 8,
- "lstime", _T("lastseen_time"), DVT_DB, "SeenModule", NULL, 10,
- "lsstatus", _T("lastseen_status"), DVT_DB, "SeenModule", "OldStatus", 1,
- "lsago", _T("lastseen_ago"), DVT_DB, "SeenModule", "seenTS", 3,
- "birthdate", _T("birthday_date"), DVT_PROTODB, NULL, "Birth", 8,
- "birthage", _T("birthday_age"), DVT_PROTODB, NULL, "Birth", 9,
- "birthnext", _T("birthday_next"), DVT_PROTODB, NULL, "Birth", 12,
- "logondate", _T("logon_date"), DVT_PROTODB, NULL, "LogonTS", 15,
- "logontime", _T("logon_time"), DVT_PROTODB, NULL, "LogonTS", 13,
- "logonago", _T("logon_ago"), DVT_PROTODB, NULL, "LogonTS", 3,
+ "gender", L"gender", DVT_PROTODB, NULL, "Gender", 5,
+ "status", L"Status", DVT_PROTODB, NULL, "Status", 1,
+ "ip", L"ip", DVT_PROTODB, NULL, "IP", 7,
+ "ipint", L"ip_internal", DVT_PROTODB, NULL, "RealIP", 7,
+ "idle", L"idle", DVT_PROTODB, NULL, "IdleTS", 2,
+ "idlediff", L"idle_diff", DVT_PROTODB, NULL, "IdleTS", 3,
+ "xname", L"xsname", DVT_PROTODB, NULL, "XStatusName", 17,
+ "lsdate", L"lastseen_date", DVT_DB, "SeenModule", NULL, 8,
+ "lstime", L"lastseen_time", DVT_DB, "SeenModule", NULL, 10,
+ "lsstatus", L"lastseen_status", DVT_DB, "SeenModule", "OldStatus", 1,
+ "lsago", L"lastseen_ago", DVT_DB, "SeenModule", "seenTS", 3,
+ "birthdate", L"birthday_date", DVT_PROTODB, NULL, "Birth", 8,
+ "birthage", L"birthday_age", DVT_PROTODB, NULL, "Birth", 9,
+ "birthnext", L"birthday_next", DVT_PROTODB, NULL, "Birth", 12,
+ "logondate", L"logon_date", DVT_PROTODB, NULL, "LogonTS", 15,
+ "logontime", L"logon_time", DVT_PROTODB, NULL, "LogonTS", 13,
+ "logonago", L"logon_ago", DVT_PROTODB, NULL, "LogonTS", 3,
0, 0, DVT_DB, 0, 0, 0
};
diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 5b0624a520..9f4416e51b 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -31,19 +31,19 @@ int RefreshSkinList(HWND hwndDlg) SetCurrentDirectory(SKIN_FOLDER);
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.*", &ffd);
while (hFind != INVALID_HANDLE_VALUE)
{
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName))
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(L".", ffd.cFileName) && mir_tstrcmp(L"..", ffd.cFileName))
{
SetCurrentDirectory(ffd.cFileName);
WIN32_FIND_DATA ffd2;
- HANDLE hFindFile = FindFirstFile(_T("*.tsf"), &ffd2);
+ HANDLE hFindFile = FindFirstFile(L"*.tsf", &ffd2);
if (hFindFile != INVALID_HANDLE_VALUE)
ListBox_AddString(hwndSkins, ffd.cFileName);
FindClose(hFindFile);
- SetCurrentDirectory(_T(".."));
+ SetCurrentDirectory(L"..");
}
if (!FindNextFile(hFind, &ffd))
@@ -83,12 +83,12 @@ void ParseAboutPart(FILE *fp, TCHAR *buff, TCHAR *szSkinName) if (pch)
{
- if (_tcsstr(buff, _T("author")))
+ if (_tcsstr(buff, L"author"))
{}
- else if (_tcsstr(buff, _T("preview")))
+ else if (_tcsstr(buff, L"preview"))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, szSkinName, pch);
+ mir_sntprintf(szImgPath, L"%s\\%s\\%s", SKIN_FOLDER, szSkinName, pch);
if (FileExists(szImgPath))
mir_tstrcpy(opt.szPreviewFile, szImgPath);
}
@@ -123,40 +123,40 @@ void ParseImagePart(FILE *fp, TCHAR *buff, int iPart) if (pch)
{
- if (_tcsstr(buff, _T("image")))
+ if (_tcsstr(buff, L"image"))
{
TCHAR szImgPath[1024];
- mir_sntprintf(szImgPath, _T("%s\\%s\\%s"), SKIN_FOLDER, opt.szSkinName, pch);
+ mir_sntprintf(szImgPath, L"%s\\%s\\%s", SKIN_FOLDER, opt.szSkinName, pch);
opt.szImgFile[iPart] = mir_tstrdup(szImgPath);
}
- else if (_tcsstr(buff, _T("tm")))
+ else if (_tcsstr(buff, L"tm"))
{
- if (!mir_tstrcmpi(pch, _T("TM_NONE")))
+ if (!mir_tstrcmpi(pch, L"TM_NONE"))
opt.transfMode[iPart] = TM_NONE;
- else if (!mir_tstrcmpi(pch, _T("TM_CENTRE")))
+ else if (!mir_tstrcmpi(pch, L"TM_CENTRE"))
opt.transfMode[iPart] = TM_CENTRE;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_ALL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_ALL"))
opt.transfMode[iPart] = TM_STRECH_ALL;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_HORIZONTAL"))
opt.transfMode[iPart] = TM_STRECH_HORIZONTAL;
- else if (!mir_tstrcmpi(pch, _T("TM_STRECH_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_STRECH_VERTICAL"))
opt.transfMode[iPart] = TM_STRECH_VERTICAL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_ALL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_ALL"))
opt.transfMode[iPart] = TM_TILE_ALL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_HORIZONTAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_HORIZONTAL"))
opt.transfMode[iPart] = TM_TILE_HORIZONTAL;
- else if (!mir_tstrcmpi(pch, _T("TM_TILE_VERTICAL")))
+ else if (!mir_tstrcmpi(pch, L"TM_TILE_VERTICAL"))
opt.transfMode[iPart] = TM_TILE_VERTICAL;
else
opt.transfMode[iPart] = TM_NONE;
}
- else if (_tcsstr(buff, _T("left")))
+ else if (_tcsstr(buff, L"left"))
opt.margins[iPart].left = _ttoi(pch);
- else if (_tcsstr(buff, _T("top")))
+ else if (_tcsstr(buff, L"top"))
opt.margins[iPart].top = _ttoi(pch);
- else if (_tcsstr(buff, _T("right")))
+ else if (_tcsstr(buff, L"right"))
opt.margins[iPart].right = _ttoi(pch);
- else if (_tcsstr(buff, _T("bottom")))
+ else if (_tcsstr(buff, L"bottom"))
opt.margins[iPart].bottom = _ttoi(pch);
}
}
@@ -171,15 +171,15 @@ char *GetSettingName(TCHAR *szValue, char *szPostfix, char *buff, size_t buffsiz {
buff[0] = 0;
- if (_tcsstr(szValue, _T("traytitle")))
+ if (_tcsstr(szValue, L"traytitle"))
mir_snprintf(buff, buffsize, "FontTrayTitle%s", szPostfix);
- else if (_tcsstr(szValue, _T("title")))
+ else if (_tcsstr(szValue, L"title"))
mir_snprintf(buff, buffsize, "FontFirst%s", szPostfix);
- else if (_tcsstr(szValue, _T("label")))
+ else if (_tcsstr(szValue, L"label"))
mir_snprintf(buff, buffsize, "FontLabels%s", szPostfix);
- else if (_tcsstr(szValue, _T("value")))
+ else if (_tcsstr(szValue, L"value"))
mir_snprintf(buff, buffsize, "FontValues%s", szPostfix);
- else if (_tcsstr(szValue, _T("divider")))
+ else if (_tcsstr(szValue, L"divider"))
mir_snprintf(buff, buffsize, "Divider%s", szPostfix);
return buff[0] ? buff : NULL;
@@ -202,7 +202,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("face")))
+ if (_tcsstr(buff, L"face"))
{
if (GetSettingName(buff, "", szSetting, sizeof(szSetting) - 1))
{
@@ -212,7 +212,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) db_set_ts(0, MODULE, szSetting, pch);
}
}
- else if (_tcsstr(buff, _T("color")))
+ else if (_tcsstr(buff, L"color"))
{
if (GetSettingName(buff, "Col", szSetting, sizeof(szSetting) - 1))
{
@@ -231,7 +231,7 @@ void ParseFontPart(FILE *fp, TCHAR *buff) }
}
}
- else if (_tcsstr(buff, _T("size")))
+ else if (_tcsstr(buff, L"size"))
{
if (GetSettingName(buff, "Size", szSetting, sizeof(szSetting) - 1))
{
@@ -241,16 +241,16 @@ void ParseFontPart(FILE *fp, TCHAR *buff) ReleaseDC(0, hdc);
}
}
- else if (_tcsstr(buff, _T("effect")))
+ else if (_tcsstr(buff, L"effect"))
{
if (GetSettingName(buff, "Sty", szSetting, sizeof(szSetting) - 1))
{
BYTE effect = 0;
- if (_tcsstr(pch, _T("font_bold")))
+ if (_tcsstr(pch, L"font_bold"))
effect |= DBFONTF_BOLD;
- if (_tcsstr(pch, _T("font_italic")))
+ if (_tcsstr(pch, L"font_italic"))
effect |= DBFONTF_ITALIC;
- if (_tcsstr(pch, _T("font_underline")))
+ if (_tcsstr(pch, L"font_underline"))
effect |= DBFONTF_UNDERLINE;
db_set_b(0, MODULE, szSetting, effect);
@@ -280,23 +280,23 @@ void ParseAppearancePart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("general-padding")))
+ if (_tcsstr(buff, L"general-padding"))
opt.iPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("title-indent")))
+ else if (_tcsstr(buff, L"title-indent"))
opt.iTitleIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("text-indent")))
+ else if (_tcsstr(buff, L"text-indent"))
opt.iTextIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("value-indent")))
+ else if (_tcsstr(buff, L"value-indent"))
opt.iValueIndent = _ttoi(pch);
- else if (_tcsstr(buff, _T("text-padding")))
+ else if (_tcsstr(buff, L"text-padding"))
opt.iTextPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("outer-avatar-padding")))
+ else if (_tcsstr(buff, L"outer-avatar-padding"))
opt.iOuterAvatarPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("inner-avatar-padding")))
+ else if (_tcsstr(buff, L"inner-avatar-padding"))
opt.iInnerAvatarPadding = _ttoi(pch);
- else if (_tcsstr(buff, _T("sidebar-width")))
+ else if (_tcsstr(buff, L"sidebar-width"))
opt.iSidebarWidth = _ttoi(pch);
- else if (_tcsstr(buff, _T("opacity")))
+ else if (_tcsstr(buff, L"opacity"))
opt.iOpacity = _ttoi(pch);
}
}
@@ -322,9 +322,9 @@ void ParseOtherPart(FILE *fp, TCHAR *buff) if (pch)
{
- if (_tcsstr(buff, _T("enable-coloring")))
+ if (_tcsstr(buff, L"enable-coloring"))
{
- if (_tcsstr(pch, _T("false")))
+ if (_tcsstr(pch, L"false"))
opt.iEnableColoring = -1;
}
}
@@ -351,10 +351,10 @@ void ParseSkinFile(TCHAR *szSkinName, bool bStartup, bool bOnlyPreview) SetCurrentDirectory(szSkinName);
WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(_T("*.tsf"), &ffd);
+ HANDLE hFind = FindFirstFile(L"*.tsf", &ffd);
if (hFind != INVALID_HANDLE_VALUE)
{
- FILE *fp = _tfopen(ffd.cFileName, _T("r"));
+ FILE *fp = _tfopen(ffd.cFileName, L"r");
if (fp)
{
myfgets(buff, 1024, fp);
@@ -362,34 +362,34 @@ void ParseSkinFile(TCHAR *szSkinName, bool bStartup, bool bOnlyPreview) {
if (buff[0] == '[')
{
- if (!mir_tstrcmp(_T("[about]"), buff))
+ if (!mir_tstrcmp(L"[about]", buff))
{
ParseAboutPart(fp, buff, szSkinName);
continue;
}
- else if (!mir_tstrcmp(_T("[other]"), buff))
+ else if (!mir_tstrcmp(L"[other]", buff))
{
ParseOtherPart(fp, buff);
continue;
}
else if (!bOnlyPreview)
{
- if (!mir_tstrcmp(_T("[background]"), buff))
+ if (!mir_tstrcmp(L"[background]", buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_BG);
continue;
}
- else if (!mir_tstrcmp(_T("[sidebar]"), buff))
+ else if (!mir_tstrcmp(L"[sidebar]", buff))
{
ParseImagePart(fp, buff, SKIN_ITEM_SIDEBAR);
continue;
}
- else if (!bStartup && opt.bLoadFonts && !mir_tstrcmp(_T("[fonts]"), buff))
+ else if (!bStartup && opt.bLoadFonts && !mir_tstrcmp(L"[fonts]", buff))
{
ParseFontPart(fp, buff);
continue;
}
- else if (!bStartup && opt.bLoadProportions && !mir_tstrcmp(_T("[appearance]"), buff))
+ else if (!bStartup && opt.bLoadProportions && !mir_tstrcmp(L"[appearance]", buff))
{
ParseAppearancePart(fp, buff);
continue;
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 070583c60b..fb0674de07 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -96,21 +96,21 @@ void StripBBCodesInPlace(TCHAR *ptszText) if (iRead > iLen) break; - if (iLen - iRead >= 3 && (_tcsnicmp(ptszText + iRead, _T("[b]"), 3) == 0 || _tcsnicmp(ptszText + iRead, _T("[i]"), 3) == 0)) + if (iLen - iRead >= 3 && (_tcsnicmp(ptszText + iRead, L"[b]", 3) == 0 || _tcsnicmp(ptszText + iRead, L"[i]", 3) == 0)) iRead += 3; - else if (iLen - iRead >= 4 && (_tcsnicmp(ptszText + iRead, _T("[/b]"), 4) == 0 || _tcsnicmp(ptszText + iRead, _T("[/i]"), 4) == 0)) + else if (iLen - iRead >= 4 && (_tcsnicmp(ptszText + iRead, L"[/b]", 4) == 0 || _tcsnicmp(ptszText + iRead, L"[/i]", 4) == 0)) iRead += 4; - else if (iLen - iRead >= 6 && (_tcsnicmp(ptszText + iRead, _T("[color"), 6) == 0)) { + else if (iLen - iRead >= 6 && (_tcsnicmp(ptszText + iRead, L"[color", 6) == 0)) { while (iRead < iLen && ptszText[iRead] != ']') iRead++; iRead++;// skip the ']' } - else if (iLen - iRead >= 8 && (_tcsnicmp(ptszText + iRead, _T("[/color]"), 8) == 0)) + else if (iLen - iRead >= 8 && (_tcsnicmp(ptszText + iRead, L"[/color]", 8) == 0)) iRead += 8; - else if (iLen - iRead >= 5 && (_tcsnicmp(ptszText + iRead, _T("[size"), 5) == 0)) { + else if (iLen - iRead >= 5 && (_tcsnicmp(ptszText + iRead, L"[size", 5) == 0)) { while (iRead < iLen && ptszText[iRead] != ']') iRead++; iRead++;// skip the ']' } - else if (iLen - iRead >= 7 && (_tcsnicmp(ptszText + iRead, _T("[/size]"), 7) == 0)) + else if (iLen - iRead >= 7 && (_tcsnicmp(ptszText + iRead, L"[/size]", 7) == 0)) iRead += 7; else { if (ptszText[iRead] != ptszText[iWrite]) ptszText[iWrite] = ptszText[iRead]; @@ -250,20 +250,20 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff { bool recv = false; - if (!mir_tstrcmp(swzRawSpec, _T("uid"))) + if (!mir_tstrcmp(swzRawSpec, L"uid")) return Uid(hContact, 0, buff, bufflen); - if (!mir_tstrcmp(swzRawSpec, _T("proto"))) { + if (!mir_tstrcmp(swzRawSpec, L"proto")) { char *szProto = GetContactProto(hContact); if (szProto) { a2t(szProto, buff, bufflen); return true; } } - else if (!mir_tstrcmp(swzRawSpec, _T("account"))) { + else if (!mir_tstrcmp(swzRawSpec, L"account")) { char *szProto = Proto_GetBaseAccountName(hContact); if ((INT_PTR)szProto == CALLSERVICE_NOTFOUND) { - return GetSysSubstText(hContact, _T("proto"), buff, bufflen); + return GetSysSubstText(hContact, L"proto", buff, bufflen); } else if (szProto) { PROTOACCOUNT *pa = Proto_GetAccount(szProto); @@ -272,18 +272,18 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } else - return GetSysSubstText(hContact, _T("proto"), buff, bufflen); + return GetSysSubstText(hContact, L"proto", buff, bufflen); } } - else if (!mir_tstrcmp(swzRawSpec, _T("time"))) { - if (!printDateTimeByContact(hContact, _T("t"), buff, bufflen, TZF_KNOWNONLY)) + else if (!mir_tstrcmp(swzRawSpec, L"time")) { + if (!printDateTimeByContact(hContact, L"t", buff, bufflen, TZF_KNOWNONLY)) return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("uidname"))) { + else if (!mir_tstrcmp(swzRawSpec, L"uidname")) { char *szProto = GetContactProto(hContact); return UidName(szProto, buff, bufflen); } - else if (!mir_tstrcmp(swzRawSpec, _T("status_msg"))) { + else if (!mir_tstrcmp(swzRawSpec, L"status_msg")) { TCHAR *swzMsg = GetStatusMessageText(hContact); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -291,7 +291,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out")) { TCHAR *swzMsg = GetLastMessageText(hContact, recv); if (swzMsg) { _tcsncpy(buff, swzMsg, bufflen); @@ -299,7 +299,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return true; } } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subname"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subname")) { // get contact list name of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact) @@ -310,32 +310,32 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff _tcsncpy(buff, swzNick, bufflen); return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subuid"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subuid")) { MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; return Uid(hSubContact, 0, buff, bufflen); } - else if (!mir_tstrcmp(swzRawSpec, _T("meta_subproto"))) { + else if (!mir_tstrcmp(swzRawSpec, L"meta_subproto")) { // get protocol of active subcontact MCONTACT hSubContact = db_mc_getMostOnline(hContact); if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND) return false; - return GetSysSubstText(hSubContact, _T("account"), buff, bufflen); + return GetSysSubstText(hSubContact, L"account", buff, bufflen); } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_time"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_time"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_time")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_time")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "t", buff, bufflen); return true; } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_date"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_date"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_date")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_date")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; FormatTimestamp(ts, "d", buff, bufflen); return true; } - else if ((recv = !mir_tstrcmp(swzRawSpec, _T("last_msg_reltime"))) || !mir_tstrcmp(swzRawSpec, _T("last_msg_out_reltime"))) { + else if ((recv = !mir_tstrcmp(swzRawSpec, L"last_msg_reltime")) || !mir_tstrcmp(swzRawSpec, L"last_msg_out_reltime")) { DWORD ts = LastMessageTimestamp(hContact, recv); if (ts == 0) return false; DWORD t = (DWORD)time(0); @@ -348,7 +348,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff else mir_sntprintf(buff, bufflen, TranslateT("%dm"), m); return true; } - else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_all")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_out")) || !mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) { + else if (!mir_tstrcmp(swzRawSpec, L"msg_count_all") || !mir_tstrcmp(swzRawSpec, L"msg_count_out") || !mir_tstrcmp(swzRawSpec, L"msg_count_in")) { DWORD dwCountOut, dwCountIn; DWORD dwMetaCountOut = 0, dwMetaCountIn = 0; DWORD dwLastTs, dwNewTs, dwRecountTs; @@ -406,12 +406,12 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff dwMetaCountIn += dwCountIn; } - if (!mir_tstrcmp(swzRawSpec, _T("msg_count_out"))) - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut); - else if (!mir_tstrcmp(swzRawSpec, _T("msg_count_in"))) - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountIn); + if (!mir_tstrcmp(swzRawSpec, L"msg_count_out")) + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountOut); + else if (!mir_tstrcmp(swzRawSpec, L"msg_count_in")) + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountIn); else - mir_sntprintf(buff, bufflen, _T("%d"), dwMetaCountOut + dwMetaCountIn); + mir_sntprintf(buff, bufflen, L"%d", dwMetaCountOut + dwMetaCountIn); return true; } @@ -533,7 +533,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (!last) last = p; while (p <= last + 1) { - len = (int)_tcscspn(p, _T(",")); + len = (int)_tcscspn(p, L","); t2a(p, sproto, len); sproto[len] = 0; p += len + 1; @@ -555,13 +555,13 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (p) { *p = 0; // clip swzAlt from swzVName p++; - if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("raw:"), 4) == 0) { // raw db substitution + if (mir_tstrlen(p) > 4 && _tcsncmp(p, L"raw:", 4) == 0) { // raw db substitution char raw_spec[LABEL_LEN]; p += 4; t2a(p, raw_spec, LABEL_LEN); GetRawSubstText(hContact, raw_spec, swzAlt, VALUE_LEN); } - else if (mir_tstrlen(p) > 4 && _tcsncmp(p, _T("sys:"), 4) == 0) { // 'system' substitution + else if (mir_tstrlen(p) > 4 && _tcsncmp(p, L"sys:", 4) == 0) { // 'system' substitution p += 4; GetSysSubstText(hContact, p, swzAlt, VALUE_LEN); } @@ -588,13 +588,13 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF } // get bSubst text - if (v > 4 && _tcsncmp(swzVName, _T("raw:"), 4) == 0) // raw db substitution + if (v > 4 && _tcsncmp(swzVName, L"raw:", 4) == 0) // raw db substitution { char raw_spec[LABEL_LEN]; t2a(&swzVName[4], raw_spec, LABEL_LEN); bSubst = GetRawSubstText(hContact, raw_spec, swzRep, VALUE_LEN); } - else if (v > 4 && _tcsncmp(swzVName, _T("sys:"), 4) == 0) // 'system' substitution + else if (v > 4 && _tcsncmp(swzVName, L"sys:", 4) == 0) // 'system' substitution { bSubst = GetSysSubstText(hContact, &swzVName[4], swzRep, VALUE_LEN); } @@ -679,7 +679,7 @@ void TruncateString(TCHAR *ptszText) if (ptszText && opt.iLimitCharCount > 3) { if ((int)mir_tstrlen(ptszText) > opt.iLimitCharCount) { ptszText[opt.iLimitCharCount - 3] = 0; - mir_tstrcat(ptszText, _T("...")); + mir_tstrcat(ptszText, L"..."); } } } diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index b660fb298a..125867150e 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -254,7 +254,7 @@ int ModulesLoaded(WPARAM, LPARAM) hFolderChanged = HookEvent(ME_FOLDERS_PATH_CHANGED, ReloadSkinFolder);
- hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Tipper"), MIRANDA_PATHT _T("\\") _T(DEFAULT_SKIN_FOLDER));
+ hSkinFolder = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Tipper"), MIRANDA_PATHT L"\\" _T(DEFAULT_SKIN_FOLDER));
FoldersGetCustomPathT(hSkinFolder, SKIN_FOLDER, _countof(SKIN_FOLDER), _T(DEFAULT_SKIN_FOLDER));
InitTipperSmileys();
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 8e85ebd902..b89c3c2b07 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -39,7 +39,7 @@ void AddTranslation(DBVTranslation *newTrans) char szSetting[256];
mir_snprintf(szSetting, sizeof(szSetting),"Trans_%s",szName);
- if (mir_tstrcmp(newTrans->swzName, _T("[No translation]")) == 0)
+ if (mir_tstrcmp(newTrans->swzName, L"[No translation]") == 0)
{
translations[iTransFuncsCount - 1].id = 0;
}
@@ -76,7 +76,7 @@ TCHAR* TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const c if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("d"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"d", buff, bufflen);
}
TCHAR* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -85,7 +85,7 @@ TCHAR* TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const ch if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("D"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"D", buff, bufflen);
}
TCHAR* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -94,7 +94,7 @@ TCHAR* TimestampToTime(MCONTACT hContact, const char *szModuleName, const char * if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("s"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"s", buff, bufflen);
}
TCHAR* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -103,7 +103,7 @@ TCHAR* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const if (ts == 0)
return 0;
- return TimeZone_ToStringT(ts, _T("t"), buff, bufflen);
+ return TimeZone_ToStringT(ts, L"t", buff, bufflen);
}
TCHAR* TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
@@ -158,9 +158,9 @@ TCHAR *ByteToYesNo(MCONTACT hContact, const char *szModuleName, const char *szSe if (dbv.type == DBVT_BYTE)
{
if (dbv.bVal != 0)
- _tcsncpy(buff, _T("Yes"), bufflen);
+ _tcsncpy(buff, L"Yes", bufflen);
else
- _tcsncpy(buff, _T("No"), bufflen);
+ _tcsncpy(buff, L"No", bufflen);
buff[bufflen - 1] = 0;
db_free(&dbv);
return buff;
@@ -204,7 +204,7 @@ TCHAR *DwordToIp(MCONTACT hContact, const char *szModuleName, const char *szSett DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
unsigned char *ipc = (unsigned char*)&ip;
- mir_sntprintf(buff, bufflen, _T("%u.%u.%u.%u"), ipc[3], ipc[2], ipc[1], ipc[0]);
+ mir_sntprintf(buff, bufflen, L"%u.%u.%u.%u", ipc[3], ipc[2], ipc[1], ipc[0]);
return buff;
}
return 0;
@@ -259,7 +259,7 @@ TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const cha time.tm_mon = month - 1;
time.tm_year = year - 1900;
- _tcsftime(buff, bufflen, _T("%x"), &time);
+ _tcsftime(buff, bufflen, L"%x", &time);
return buff;
@@ -306,7 +306,7 @@ TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char int age = now.wYear - year;
if (now.wMonth < month || (now.wMonth == month && now.wDay < day))
age--;
- mir_sntprintf(buff, bufflen, _T("%d"), age);
+ mir_sntprintf(buff, bufflen, L"%d", age);
return buff;
}
else
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 03c0dc287c..3aa449ad98 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -73,11 +73,11 @@ int OnPreShutdown(WPARAM, LPARAM) NULL,
FO_DELETE,
wszTempDir,
- _T(""),
+ L"",
FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION,
false,
0,
- _T("")
+ L""
};
SHFileOperation(&file_op);
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp index a62c758200..d023d19d67 100644 --- a/plugins/Toaster/src/options.cpp +++ b/plugins/Toaster/src/options.cpp @@ -46,7 +46,7 @@ void COptions::Enabled_OnChange(CCtrlCheck* chk) int OnOptionsInitialized(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.ptszTitle = _T("Popups"); //_T(MODULE);
+ odp.ptszTitle = L"Popups"; //_T(MODULE);
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.position = -790000000;
odp.ptszTab = _T(MODULE);
diff --git a/plugins/Toaster/src/utils.cpp b/plugins/Toaster/src/utils.cpp index 86062d2f4a..a46ea09cb4 100644 --- a/plugins/Toaster/src/utils.cpp +++ b/plugins/Toaster/src/utils.cpp @@ -7,7 +7,7 @@ using namespace Microsoft::WRL; wchar_t* GetShortcutPath()
{
wchar_t path[MAX_PATH];
- GetEnvironmentVariable(_T("APPDATA"), path, MAX_PATH);
+ GetEnvironmentVariable(L"APPDATA", path, MAX_PATH);
wcscat_s(path, _T(SHORTCUT_PATH));
return mir_wstrdup(path);
}
diff --git a/plugins/Toaster/src/utils.h b/plugins/Toaster/src/utils.h index 858d04f1be..85547164ab 100644 --- a/plugins/Toaster/src/utils.h +++ b/plugins/Toaster/src/utils.h @@ -11,7 +11,7 @@ class ToasterImage ptrT tszId;
public:
- __inline explicit ToasterImage(HICON hIcon) : _hBitmap(NULL), tszId(CMString(FORMAT, _T("%p"), hIcon).Detach())
+ __inline explicit ToasterImage(HICON hIcon) : _hBitmap(NULL), tszId(CMString(FORMAT, L"%p", hIcon).Detach())
{
ICONINFO icon = { 0 };
if (GetIconInfo(hIcon, &icon))
@@ -21,7 +21,7 @@ public: }
}
- __inline explicit ToasterImage(HBITMAP bmp) : _hBitmap(bmp), tszId(CMString(FORMAT, _T("%p"), bmp).Detach())
+ __inline explicit ToasterImage(HBITMAP bmp) : _hBitmap(bmp), tszId(CMString(FORMAT, L"%p", bmp).Detach())
{
}
diff --git a/plugins/TooltipNotify/src/Settings.h b/plugins/TooltipNotify/src/Settings.h index e248c8e245..cf99538f3e 100644 --- a/plugins/TooltipNotify/src/Settings.h +++ b/plugins/TooltipNotify/src/Settings.h @@ -29,7 +29,7 @@ #define DEF_SETTING_LDBLCLICK SHOW_HIDE_CLIST
#define DEF_SETTING_BGCOLOR GetSysColor(COLOR_INFOBK)
#define DEF_SETTING_TXTCOLOR GetSysColor(COLOR_INFOTEXT)
-#define DEF_SETTING_FONT_FACE _T("Tahoma")
+#define DEF_SETTING_FONT_FACE L"Tahoma"
#define DEF_SETTING_FONT_SIZE 8
#define DEF_SETTING_FONT_STYLE 0
#define DEF_SETTING_FONT_CHARSET DEFAULT_CHARSET
diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp index 8891a3dd21..2b5cc39063 100644 --- a/plugins/TooltipNotify/src/Tooltip.cpp +++ b/plugins/TooltipNotify/src/Tooltip.cpp @@ -4,7 +4,7 @@ #include "stdafx.h"
-/*static*/ const TCHAR *CTooltip::s_szTooltipClass = _T("MimTooltipNotify");
+/*static*/ const TCHAR *CTooltip::s_szTooltipClass = L"MimTooltipNotify";
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index a19eebc996..439ca55f58 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -537,7 +537,7 @@ BOOL CTooltipNotify::OptionsDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l case WM_VSCROLL:
case WM_HSCROLL:
TCHAR str[10];
- mir_sntprintf(str, _T("%d%%"), 100 * SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0) / 255);
+ mir_sntprintf(str, L"%d%%", 100 * SendDlgItemMessage(hDlg, IDC_TRANSPARENCY_SLIDER, TBM_GETPOS, 0, 0) / 255);
SetDlgItemText(hDlg, IDC_TRANSPERC, str);
if (wParam != 0x12345678)
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
@@ -828,7 +828,7 @@ TCHAR* CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR * StatusToString(iStatus, szStatus, _countof(szStatus));
// "proro: user is online"
- const TCHAR *szFormatString = m_sOptions.bPrefixProto ? _T("%s%s%s") : _T("%.0s%.0s%s");
+ const TCHAR *szFormatString = m_sOptions.bPrefixProto ? L"%s%s%s" : L"%.0s%.0s%s";
const TCHAR* szIs = TranslateT("is");
const char* szProto = hContact == 0 ? "Proto" : ::GetContactProto(hContact);
@@ -841,11 +841,11 @@ TCHAR* CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR * long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)mir_strlen(szProto), wszProto, _countof(wszProto));
wszProto[lLen] = _T('\0');
- mir_sntprintf(szString, iBufSize - 1, szFormatString, wszProto, _T(": "), szContactName);
+ mir_sntprintf(szString, iBufSize - 1, szFormatString, wszProto, L": ", szContactName);
TruncateWithDots(szString, iBufSize - 1 - mir_tstrlen(szStatus) - mir_tstrlen(szIs) - 2); // 2 spaces around szIs
- mir_sntprintf(szString + mir_tstrlen(szString), iBufSize - 1 - mir_tstrlen(szString), _T(" %s %s"), szIs, szStatus);
+ mir_sntprintf(szString + mir_tstrlen(szString), iBufSize - 1 - mir_tstrlen(szString), L" %s %s", szIs, szStatus);
return szString;
}
diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h index 85b32c1e60..babf433470 100644 --- a/plugins/TopToolBar/src/stdafx.h +++ b/plugins/TopToolBar/src/stdafx.h @@ -25,7 +25,7 @@ #include "version.h"
#include "BkgrCfg.h"
-#define TTB_BUTTON_CLASS _T("TopToolbarButtonClass")
+#define TTB_BUTTON_CLASS L"TopToolbarButtonClass"
#define TTB_REPOSBUTTONS (WM_USER+10)
#define TTB_UPDATEFRAMEVISIBILITY (WM_USER+11)
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index c4efd68b71..9b6f9721f0 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -79,7 +79,7 @@ void InsertLBut(int i) ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_RUN), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ISLBUTTON | TTBBF_INTERNAL;
ttb.name = LPGEN("Default");
- ttb.program = _T("Execute Path");
+ ttb.program = L"Execute Path";
ttb.wParamDown = i;
TTBAddButton((WPARAM)&ttb, 0);
}
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index 88e2442851..56577b4703 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -5,7 +5,7 @@ COLORREF bkColour; HBITMAP hBmpBackground, hBmpSeparator;
int backgroundBmpUse;
-static TCHAR pluginname[] = _T("TopToolBar");
+static TCHAR pluginname[] = L"TopToolBar";
/////////////////////////////////////////////////////////////////////////////////////////
// Toolbar window procedure
@@ -257,7 +257,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM) RegisterClass(&wndclass);
g_ctrl->pButtonList = (SortedList *)&Buttons;
- g_ctrl->hWnd = CreateWindow(pluginname, _T("Toolbar"),
+ g_ctrl->hWnd = CreateWindow(pluginname, L"Toolbar",
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
0, 0, 0, g_ctrl->nLastHeight, parent, NULL, hInst, NULL);
SetWindowLongPtr(g_ctrl->hWnd, 0, (LONG_PTR)g_ctrl);
@@ -273,7 +273,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM) // if there's no customized frames, create our own
if (g_ctrl->hFrame == NULL) {
CLISTFrame Frame = { sizeof(Frame) };
- Frame.tname = _T("Toolbar");
+ Frame.tname = L"Toolbar";
Frame.hWnd = g_ctrl->hWnd;
Frame.align = alTop;
Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR;
diff --git a/plugins/TopToolBar/src/topbutton.cpp b/plugins/TopToolBar/src/topbutton.cpp index 842553d2bb..1fe3eb2488 100644 --- a/plugins/TopToolBar/src/topbutton.cpp +++ b/plugins/TopToolBar/src/topbutton.cpp @@ -35,7 +35,7 @@ DWORD TopButtonInt::CheckFlags(DWORD Flags) }
if (BitChanged(TTBBF_SHOWTOOLTIP)) {
dwFlags ^= TTBBF_SHOWTOOLTIP;
- SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)((dwFlags & TTBBF_SHOWTOOLTIP) ? ptszTooltip : _T("")), BATF_TCHAR);
+ SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)((dwFlags & TTBBF_SHOWTOOLTIP) ? ptszTooltip : L""), BATF_TCHAR);
}
// next settings changing visual side, requires additional actions
if (BitChanged(TTBBF_VISIBLE)) {
@@ -53,7 +53,7 @@ DWORD TopButtonInt::CheckFlags(DWORD Flags) void TopButtonInt::CreateWnd()
{
if (!(dwFlags & TTBBF_ISSEPARATOR)) {
- hwnd = CreateWindow(TTB_BUTTON_CLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP | SS_NOTIFY, 0, 0, g_ctrl->nButtonWidth, g_ctrl->nButtonHeight, g_ctrl->hWnd, NULL, hInst, this);
+ hwnd = CreateWindow(TTB_BUTTON_CLASS, L"", BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP | SS_NOTIFY, 0, 0, g_ctrl->nButtonWidth, g_ctrl->nButtonHeight, g_ctrl->hWnd, NULL, hInst, this);
if (dwFlags & TTBBF_ASPUSHBUTTON)
SendMessage(hwnd, BUTTONSETASPUSHBTN, 1, 0);
@@ -65,7 +65,7 @@ void TopButtonInt::CreateWnd() }
// maybe SEPWIDTH, not g_ctrl->nButtonWidth?
else
- hwnd = CreateWindow(_T("STATIC"), _T(""), WS_CHILD | SS_NOTIFY, 0, 0, g_ctrl->nButtonWidth, g_ctrl->nButtonHeight, g_ctrl->hWnd, NULL, hInst, 0);
+ hwnd = CreateWindow(L"STATIC", L"", WS_CHILD | SS_NOTIFY, 0, 0, g_ctrl->nButtonWidth, g_ctrl->nButtonHeight, g_ctrl->hWnd, NULL, hInst, 0);
SetWindowLongPtr(hwnd, GWLP_USERDATA, id);
SetBitmap();
diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp index fd2e528c75..f048adfda3 100644 --- a/plugins/TopToolBar/src/ttbopt.cpp +++ b/plugins/TopToolBar/src/ttbopt.cpp @@ -21,7 +21,7 @@ static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST TCHAR* tmp;
if (b->dwFlags & TTBBF_ISSEPARATOR) {
- tvis.item.pszText = _T("------------------");
+ tvis.item.pszText = L"------------------";
index = -1;
tmp = 0;
}
@@ -251,7 +251,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("exe");
+ ofn.lpstrDefExt = L"exe";
if (!GetOpenFileName(&ofn))
break;
@@ -309,7 +309,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_RUN), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ISLBUTTON | TTBBF_INTERNAL | TTBBF_OPTIONAL;
ttb.name = LPGEN("Default");
- ttb.program = _T("Execute Path");
+ ttb.program = L"Execute Path";
TopButtonInt* b = CreateButton(&ttb);
// get selection for insert
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 0afa14a1e9..3dea6dd19d 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -42,7 +42,7 @@ _T("{I4}\x0D\x0A\x0A\ {L180}?if3(?tc_GetTime(%extratext%,now,hh:mm:ss),)\x0D\x0A\x0A\
{L230}?if3(?tc_GetTime(%extratext%,total,d hh:mm),)");
-TCHAR* TRAFFIC_COUNTER_WINDOW_CLASS = _T("TrafficCounterWnd");
+TCHAR* TRAFFIC_COUNTER_WINDOW_CLASS = L"TrafficCounterWnd";
/*-------------------------------------------------------------------------------------------------------------------*/
//TRAFFIC COUNTER
@@ -235,7 +235,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM) }
else //defaults here
{
- mir_tstrcpy(Traffic_TooltipFormat, _T("Traffic Counter"));
+ mir_tstrcpy(Traffic_TooltipFormat, L"Traffic Counter");
}
Traffic_AdditionSpace = db_get_b(NULL, TRAFFIC_SETTINGS_GROUP, SETTINGS_ADDITION_SPACE, 0);
@@ -254,7 +254,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM) TrafficFontID.deffontsettings.colour = GetSysColor(COLOR_BTNTEXT);
TrafficFontID.deffontsettings.size = 12;
TrafficFontID.deffontsettings.style = 0;
- mir_tstrcpy(TrafficFontID.deffontsettings.szFace, _T("Arial"));
+ mir_tstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
TrafficFontID.order = 0;
FontRegisterT(&TrafficFontID);
@@ -487,14 +487,14 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) if (unOptions.DrawTotalTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(ProtoList[i].Total.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(ProtoList[i].Total.Timer, L"h:mm:ss", bu, 32);
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
}
// Òåêóùåå âðåìÿ.
if (unOptions.DrawCurrentTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(ProtoList[i].Session.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(ProtoList[i].Session.Timer, L"h:mm:ss", bu, 32);
rect.right -= 50;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
rect.right += 50;
@@ -550,14 +550,14 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) if (unOptions.DrawTotalTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(OverallInfo.Total.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(OverallInfo.Total.Timer, L"h:mm:ss", bu, 32);
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
}
// Òåêóùåå âðåìÿ.
if (unOptions.DrawCurrentTimeCounter) {
TCHAR bu[32];
- GetDurationFormatM(OverallInfo.Session.Timer, _T("h:mm:ss"), bu, 32);
+ GetDurationFormatM(OverallInfo.Session.Timer, L"h:mm:ss", bu, 32);
rect.right -= 50;
TC_AlphaText(hdc, bu, &rect, DT_SINGLELINE | DT_RIGHT | DT_TOP, ClistModernPresent);
rect.right += 50;
diff --git a/plugins/TrafficCounter/src/misc.cpp b/plugins/TrafficCounter/src/misc.cpp index ef54ae6ed1..5c23fd4541 100644 --- a/plugins/TrafficCounter/src/misc.cpp +++ b/plugins/TrafficCounter/src/misc.cpp @@ -47,7 +47,7 @@ WORD GetRowItems(TCHAR *InputString, RowItemInfo **RowItemsList) *RowItemsList = (RowItemInfo*)mir_realloc(*RowItemsList, sizeof(RowItemInfo) * (c + 1));
// Ðàçáèðàåì òåã.
- _stscanf(begin + 1, _T("%c%hd"),
+ _stscanf(begin + 1, L"%c%hd",
&((*RowItemsList)[c].Alignment),
&((*RowItemsList)[c].Interval));
@@ -122,7 +122,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size) {
TCHAR Str1[32], szUnit[4] = { ' ', 0 };
DWORD Divider;
- NUMBERFMT nf = { 0, 1, 3, _T(","), _T(" "), 0 };
+ NUMBERFMT nf = { 0, 1, 3, L",", L" ", 0 };
TCHAR *Res; // Ïðîìåæóòî÷íûé ðåçóëüòàò.
switch (Unit) {
@@ -148,7 +148,7 @@ size_t GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, size_t Size) return 0;
}
- mir_sntprintf(Str1, _T("%d.%d"), Value / Divider, Value % Divider);
+ mir_sntprintf(Str1, L"%d.%d", Value / Divider, Value % Divider);
size_t l = GetNumberFormat(LOCALE_USER_DEFAULT, 0, Str1, &nf, NULL, 0);
if (!l) return 0;
l += mir_tstrlen(szUnit) + 1;
@@ -197,39 +197,39 @@ size_t GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, size_t S Token[TokenIndex] = 0;
// ×òî ïîëó÷èëè â àêêóìóëÿòîðå?
- if (!mir_tstrcmp(Token, _T("d"))) {
+ if (!mir_tstrcmp(Token, L"d")) {
q = Duration / (60 * 60 * 24);
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60 * 60 * 24;
}
- else if (!mir_tstrcmp(Token, _T("h"))) {
+ else if (!mir_tstrcmp(Token, L"h")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, _T("hh"))) {
+ else if (!mir_tstrcmp(Token, L"hh")) {
q = Duration / (60 * 60);
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q * 60 * 60;
}
- else if (!mir_tstrcmp(Token, _T("m"))) {
+ else if (!mir_tstrcmp(Token, L"m")) {
q = Duration / 60;
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, _T("mm"))) {
+ else if (!mir_tstrcmp(Token, L"mm")) {
q = Duration / 60;
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q * 60;
}
- else if (!mir_tstrcmp(Token, _T("s"))) {
+ else if (!mir_tstrcmp(Token, L"s")) {
q = Duration;
- mir_sntprintf(Token, _T("%d"), q);
+ mir_sntprintf(Token, L"%d", q);
Duration -= q;
}
- else if (!mir_tstrcmp(Token, _T("ss"))) {
+ else if (!mir_tstrcmp(Token, L"ss")) {
q = Duration;
- mir_sntprintf(Token, _T("%02d"), q);
+ mir_sntprintf(Token, L"%02d", q);
Duration -= q;
}
diff --git a/plugins/TrafficCounter/src/options.cpp b/plugins/TrafficCounter/src/options.cpp index 3a4c6e8532..81fc55b629 100644 --- a/plugins/TrafficCounter/src/options.cpp +++ b/plugins/TrafficCounter/src/options.cpp @@ -126,15 +126,15 @@ static INT_PTR CALLBACK DlgProcPopupsTraffic(HWND hwndDlg, UINT msg, WPARAM wPar static OPTTREE_OPTION options[] =
{
- {0, LPGENT("Display") _T("/") LPGENT("Icon"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoIcon"},
- {0, LPGENT("Display") _T("/") LPGENT("Account name"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoName"},
- {0, LPGENT("Display") _T("/") LPGENT("Current traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTraffic"},
- {0, LPGENT("Display") _T("/") LPGENT("Total traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTraffic"},
- {0, LPGENT("Display") _T("/") LPGENT("Current online"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTime"},
- {0, LPGENT("Display") _T("/") LPGENT("Total online"),OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTime"},
- {0, LPGENT("General") _T("/") LPGENT("Draw frame as skin element"), OPTTREE_CHECK, 1, NULL, "DrawFrmAsSkin"},
- {0, LPGENT("General") _T("/") LPGENT("Show tooltip in traffic window"), OPTTREE_CHECK, 1, NULL, "ShowTooltip"},
- {0, LPGENT("General") _T("/") LPGENT("\"Toggle traffic counter\" in main menu"), OPTTREE_CHECK, 1, NULL, "ShowMainMenuItem"},
+ {0, LPGENT("Display") L"/" LPGENT("Icon"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoIcon"},
+ {0, LPGENT("Display") L"/" LPGENT("Account name"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawProtoName"},
+ {0, LPGENT("Display") L"/" LPGENT("Current traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTraffic"},
+ {0, LPGENT("Display") L"/" LPGENT("Total traffic"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTraffic"},
+ {0, LPGENT("Display") L"/" LPGENT("Current online"), OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawCurrentTime"},
+ {0, LPGENT("Display") L"/" LPGENT("Total online"),OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, "DrawTotalTime"},
+ {0, LPGENT("General") L"/" LPGENT("Draw frame as skin element"), OPTTREE_CHECK, 1, NULL, "DrawFrmAsSkin"},
+ {0, LPGENT("General") L"/" LPGENT("Show tooltip in traffic window"), OPTTREE_CHECK, 1, NULL, "ShowTooltip"},
+ {0, LPGENT("General") L"/" LPGENT("\"Toggle traffic counter\" in main menu"), OPTTREE_CHECK, 1, NULL, "ShowMainMenuItem"},
// Ðåçåðâèðóåì ìåñòî ïîä àêòèâíûå è âèäèìûå ïðîòîêîëû
// Ìàêñèìóì 16 ïîçèöèé âèäèìûõ è 16 àêòèâíûõ
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
@@ -169,8 +169,8 @@ static OPTTREE_OPTION options[] = {0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
{0, NULL, OPTTREE_CHECK, OPTTREE_INVISIBLE, NULL, NULL},
- {0, LPGENT("Visible accounts")_T("/") LPGENT("Summary traffic for visible accounts"), OPTTREE_CHECK, 1, NULL, "ShowSummary"},
- {0, LPGENT("Visible accounts")_T("/") LPGENT("Overall traffic"), OPTTREE_CHECK, 1, NULL, "ShowOverall"},
+ {0, LPGENT("Visible accounts")L"/" LPGENT("Summary traffic for visible accounts"), OPTTREE_CHECK, 1, NULL, "ShowSummary"},
+ {0, LPGENT("Visible accounts")L"/" LPGENT("Overall traffic"), OPTTREE_CHECK, 1, NULL, "ShowOverall"},
};
static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -196,7 +196,7 @@ static INT_PTR CALLBACK DlgProcTCOptions(HWND hwndDlg, UINT msg, WPARAM wParam, mir_strcpy(options[i].szSettingName, ProtoList[j].name);
size_t l = 20 + mir_tstrlen(ProtoList[j].tszAccountName);
options[i].szOptionName = (TCHAR*)mir_alloc(sizeof(TCHAR) * l);
- mir_sntprintf(options[i].szOptionName, l, _T("Visible accounts/%s"), ProtoList[j].tszAccountName);
+ mir_sntprintf(options[i].szOptionName, l, L"Visible accounts/%s", ProtoList[j].tszAccountName);
options[i].dwFlag = (ProtoList[j++].Enabled ? 1 : OPTTREE_INVISIBLE) | OPTTREE_NOTRANSLATE;
}
Initialized = 1;
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index 6baaf37d9b..709d7e3724 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -36,7 +36,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA TranslateDialogDefault(hwndDlg);
// Ñîçäà¸ì ListBox c ïåðå÷íåì àêêàóíòîâ.
hListAccs = CreateWindowEx(WS_EX_CLIENTEDGE,
- _T("ListBox"),
+ L"ListBox",
NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | LBS_NOTIFY,
2, 20, 246, 112,
hwndDlg, NULL, NULL, NULL);
@@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA switch (unOptions.Stat_Tab) {
case 0: // Hourly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, _T("%s %02d:00 - %02d:59"),
+ mir_sntprintf(pdi->item.pszText, 32, L"%s %02d:00 - %02d:59",
szBufW,
ProtoList[EldestAcc].AllStatistics[Index].Hour,
ProtoList[EldestAcc].AllStatistics[Index].Hour);
@@ -206,13 +206,13 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA vartime += 6;
VariantTimeToSystemTime(vartime, &st);
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, szBufW, 32);
- mir_sntprintf(pdi->item.pszText, 32, _T("%s - %s"), pdi->item.pszText, szBufW);
+ mir_sntprintf(pdi->item.pszText, 32, L"%s - %s", pdi->item.pszText, szBufW);
break;
case 3: // Monthly
GetDateFormat(LOCALE_USER_DEFAULT, DATE_YEARMONTH, &st, NULL, pdi->item.pszText, 32);
break;
case 4: // Yearly
- mir_sntprintf(pdi->item.pszText, 32, _T("%d"), st.wYear);
+ mir_sntprintf(pdi->item.pszText, 32, L"%d", st.wYear);
break;
}
return 0;
@@ -229,7 +229,7 @@ INT_PTR CALLBACK DlgProcOptStatistics(HWND hwndDlg, UINT msg, WPARAM wParam, LPA break;
case 4: // Âðåìÿ
{
- TCHAR *Fmt[5] = { _T("m:ss"), _T("h:mm:ss"), _T("h:mm:ss"), _T("d hh:mm:ss"), _T("d hh:mm:ss") };
+ TCHAR *Fmt[5] = { L"m:ss", L"h:mm:ss", L"h:mm:ss", L"d hh:mm:ss", L"d hh:mm:ss" };
GetDurationFormatM(Value, Fmt[unOptions.Stat_Tab], pdi->item.pszText, 32);
}
break;
@@ -300,9 +300,9 @@ void Stat_ReadFile(BYTE n) TCHAR FileName[MAX_PATH], *pszPath;
SYSTEMTIME stNow;
- pszPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\statistics"));
+ pszPath = Utils_ReplaceVarsT(L"%miranda_userdata%\\statistics");
CreateDirectoryTreeT(pszPath);
- mir_sntprintf(FileName, _T("%s\\%S.stat"), pszPath, ProtoList[n].name);
+ mir_sntprintf(FileName, L"%s\\%S.stat", pszPath, ProtoList[n].name);
mir_free(pszPath);
GetLocalTime(&stNow);
ProtoList[n].hFile = CreateFile(FileName, GENERIC_READ | GENERIC_WRITE,
diff --git a/plugins/TrafficCounter/src/vars.cpp b/plugins/TrafficCounter/src/vars.cpp index 5f55778802..62da3f32f7 100644 --- a/plugins/TrafficCounter/src/vars.cpp +++ b/plugins/TrafficCounter/src/vars.cpp @@ -30,7 +30,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) if (ai->argc != 5) return NULL;
- if (!mir_tstrcmp(ai->targv[1], _T("overall")))
+ if (!mir_tstrcmp(ai->targv[1], L"overall"))
{
tmpsn = OverallInfo.CurrentSentTraffic;
tmprn = OverallInfo.CurrentRecvTraffic;
@@ -38,7 +38,7 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) tmprt = OverallInfo.TotalRecvTraffic;
}
else
- if (!mir_tstrcmp(ai->targv[1], _T("summary")))
+ if (!mir_tstrcmp(ai->targv[1], L"summary"))
{
for (ed = 0; ed < NumberOfAccounts; ed++)
if (ProtoList[ed].Visible)
@@ -68,34 +68,34 @@ static TCHAR* GetTraffic(ARGUMENTSINFO *ai) if (tmp != 0xAA) return NULL;
}
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
{
- if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpsn;
else
- if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprn;
+ if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprn;
else
- if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprn + tmpsn;
+ if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprn + tmpsn;
else return NULL;
}
else
- if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ if (!mir_tstrcmp(ai->targv[2], L"total"))
{
- if (!mir_tstrcmp(ai->targv[3], _T("sent"))) tmp = tmpst;
+ if (!mir_tstrcmp(ai->targv[3], L"sent")) tmp = tmpst;
else
- if (!mir_tstrcmp(ai->targv[3], _T("received"))) tmp = tmprt;
+ if (!mir_tstrcmp(ai->targv[3], L"received")) tmp = tmprt;
else
- if (!mir_tstrcmp(ai->targv[3], _T("both"))) tmp = tmprt + tmpst;
+ if (!mir_tstrcmp(ai->targv[3], L"both")) tmp = tmprt + tmpst;
else return NULL;
}
else return NULL;
- if (!mir_tstrcmp(ai->targv[4], _T("b"))) ed = 0;
+ if (!mir_tstrcmp(ai->targv[4], L"b")) ed = 0;
else
- if (!mir_tstrcmp(ai->targv[4], _T("k"))) ed = 1;
+ if (!mir_tstrcmp(ai->targv[4], L"k")) ed = 1;
else
- if (!mir_tstrcmp(ai->targv[4], _T("m"))) ed = 2;
+ if (!mir_tstrcmp(ai->targv[4], L"m")) ed = 2;
else
- if (!mir_tstrcmp(ai->targv[4], _T("d"))) ed = 3;
+ if (!mir_tstrcmp(ai->targv[4], L"d")) ed = 3;
else return NULL;
// Ïîëó÷àåì ôîðìàòèðîâàííóþ ñòðîêó è âîçâðàùàåì óêàçàòåëü íà íå¸.
@@ -126,21 +126,21 @@ static TCHAR* GetTime(ARGUMENTSINFO *ai) if (!mir_tstrcmp(buf, ai->targv[1]))
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
Duration = ProtoList[ed].Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], L"total"))
Duration = ProtoList[ed].Total.Timer;
else flag = 0;
break;
}
mir_free(buf);
}
- if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], _T("summary")) )
+ if ( (flag != 0xAA) && !mir_tstrcmp(ai->targv[1], L"summary") )
{
flag = 0xAA;
- if (!mir_tstrcmp(ai->targv[2], _T("now")))
+ if (!mir_tstrcmp(ai->targv[2], L"now"))
Duration = OverallInfo.Session.Timer;
- else if (!mir_tstrcmp(ai->targv[2], _T("total")))
+ else if (!mir_tstrcmp(ai->targv[2], L"total"))
Duration = OverallInfo.Total.Timer;
else flag = 0;
}
@@ -167,14 +167,14 @@ void RegisterVariablesTokens(void) trs.cbSize = sizeof(TOKENREGISTER);
// Ôóíêöèÿ, âîçâðàùàþùàÿ òðàôèê
- trs.tszTokenString = _T("tc_GetTraffic");
+ trs.tszTokenString = L"tc_GetTraffic";
trs.parseFunctionT = GetTraffic;
trs.szHelpText = "Traffic counter\t(A,B,C,D)\tGet traffic counter value. A: <ProtocolName> OR overall OR summary; B: now OR total; C: sent OR received OR both; D: b - in bytes, k - in kilobytes, m - in megabytes, d - dynamic";
trs.flags = TRF_TCHAR | TRF_PARSEFUNC | TRF_FUNCTION | TRF_FREEMEM;
trs.memType = TR_MEM_MIRANDA;
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&trs);
// Ôóíêöèÿ, âîçâðàùàþùàÿ âðåìÿ
- trs.tszTokenString = _T("tc_GetTime");
+ trs.tszTokenString = L"tc_GetTime";
trs.parseFunctionT = GetTime;
trs.szHelpText = "Traffic counter\t(A,B,C)\tGet time counter value. A: <ProtocolName> OR summary; B: now OR total; C: format";
CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&trs);
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index 9354fe6aec..74132b55d3 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -64,280 +64,280 @@ void Transliterate(TCHAR *&str) newStr[0] = 0;
for (; *str != 0; str++) {
switch (str[0]) {
- case _T('à'): mir_tstrcat(newStr, _T("a")); break;
- case _T('á'): mir_tstrcat(newStr, _T("b")); break;
- case _T('â'): mir_tstrcat(newStr, _T("v")); break;
- case _T('ã'): mir_tstrcat(newStr, _T("g")); break;
- case _T('ä'): mir_tstrcat(newStr, _T("d")); break;
- case _T('å'): mir_tstrcat(newStr, _T("e")); break;
- case _T('¸'): mir_tstrcat(newStr, _T("ye")); break;
- case _T('æ'): mir_tstrcat(newStr, _T("zh")); break;
- case _T('ç'): mir_tstrcat(newStr, _T("z")); break;
- case _T('è'): mir_tstrcat(newStr, _T("i")); break;
- case _T('é'): mir_tstrcat(newStr, _T("y")); break;
- case _T('ê'): mir_tstrcat(newStr, _T("k")); break;
- case _T('ë'): mir_tstrcat(newStr, _T("l")); break;
- case _T('ì'): mir_tstrcat(newStr, _T("m")); break;
- case _T('í'): mir_tstrcat(newStr, _T("n")); break;
- case _T('î'): mir_tstrcat(newStr, _T("o")); break;
- case _T('ï'): mir_tstrcat(newStr, _T("p")); break;
- case _T('ð'): mir_tstrcat(newStr, _T("r")); break;
- case _T('ñ'): mir_tstrcat(newStr, _T("s")); break;
- case _T('ò'): mir_tstrcat(newStr, _T("t")); break;
- case _T('ó'): mir_tstrcat(newStr, _T("u")); break;
- case _T('ô'): mir_tstrcat(newStr, _T("f")); break;
- case _T('õ'): mir_tstrcat(newStr, _T("kh")); break;
- case _T('ö'): mir_tstrcat(newStr, _T("ts")); break;
- case _T('÷'): mir_tstrcat(newStr, _T("ch")); break;
- case _T('ø'): mir_tstrcat(newStr, _T("sh")); break;
- case _T('ù'): mir_tstrcat(newStr, _T("sch")); break;
- case _T('ú'): mir_tstrcat(newStr, _T("'")); break;
- case _T('û'): mir_tstrcat(newStr, _T("yi")); break;
- case _T('ü'): mir_tstrcat(newStr, _T("")); break;
- case _T('ý'): mir_tstrcat(newStr, _T("e")); break;
- case _T('þ'): mir_tstrcat(newStr, _T("yu")); break;
- case _T('ÿ'): mir_tstrcat(newStr, _T("ya")); break;
- case _T('À'): mir_tstrcat(newStr, _T("A")); break;
- case _T('Á'): mir_tstrcat(newStr, _T("B")); break;
- case _T('Â'): mir_tstrcat(newStr, _T("V")); break;
- case _T('Ã'): mir_tstrcat(newStr, _T("G")); break;
- case _T('Ä'): mir_tstrcat(newStr, _T("D")); break;
- case _T('Å'): mir_tstrcat(newStr, _T("E")); break;
- case _T('¨'): mir_tstrcat(newStr, _T("Ye")); break;
- case _T('Æ'): mir_tstrcat(newStr, _T("Zh")); break;
- case _T('Ç'): mir_tstrcat(newStr, _T("Z")); break;
- case _T('È'): mir_tstrcat(newStr, _T("I")); break;
- case _T('É'): mir_tstrcat(newStr, _T("Y")); break;
- case _T('Ê'): mir_tstrcat(newStr, _T("K")); break;
- case _T('Ë'): mir_tstrcat(newStr, _T("L")); break;
- case _T('Ì'): mir_tstrcat(newStr, _T("M")); break;
- case _T('Í'): mir_tstrcat(newStr, _T("N")); break;
- case _T('Î'): mir_tstrcat(newStr, _T("O")); break;
- case _T('Ï'): mir_tstrcat(newStr, _T("P")); break;
- case _T('Ð'): mir_tstrcat(newStr, _T("R")); break;
- case _T('Ñ'): mir_tstrcat(newStr, _T("S")); break;
- case _T('Ò'): mir_tstrcat(newStr, _T("T")); break;
- case _T('Ó'): mir_tstrcat(newStr, _T("U")); break;
- case _T('Ô'): mir_tstrcat(newStr, _T("F")); break;
- case _T('Õ'): mir_tstrcat(newStr, _T("Kh")); break;
- case _T('Ö'): mir_tstrcat(newStr, _T("Ts")); break;
- case _T('×'): mir_tstrcat(newStr, _T("Ch")); break;
- case _T('Ø'): mir_tstrcat(newStr, _T("Sh")); break;
- case _T('Ù'): mir_tstrcat(newStr, _T("Sch")); break;
- case _T('Ú'): mir_tstrcat(newStr, _T("'")); break;
- case _T('Û'): mir_tstrcat(newStr, _T("Yi")); break;
- case _T('Ü'): mir_tstrcat(newStr, _T("")); break;
- case _T('Ý'): mir_tstrcat(newStr, _T("E")); break;
- case _T('Þ'): mir_tstrcat(newStr, _T("Yu")); break;
- case _T('ß'): mir_tstrcat(newStr, _T("Ya")); break;
-
- case _T('a'): mir_tstrcat(newStr, _T("à")); break;
- case _T('b'): mir_tstrcat(newStr, _T("á")); break;
- case _T('v'): mir_tstrcat(newStr, _T("â")); break;
- case _T('g'): mir_tstrcat(newStr, _T("ã")); break;
- case _T('d'): mir_tstrcat(newStr, _T("ä")); break;
- case _T('e'): mir_tstrcat(newStr, _T("å")); break;
+ case _T('à'): mir_tstrcat(newStr, L"a"); break;
+ case _T('á'): mir_tstrcat(newStr, L"b"); break;
+ case _T('â'): mir_tstrcat(newStr, L"v"); break;
+ case _T('ã'): mir_tstrcat(newStr, L"g"); break;
+ case _T('ä'): mir_tstrcat(newStr, L"d"); break;
+ case _T('å'): mir_tstrcat(newStr, L"e"); break;
+ case _T('¸'): mir_tstrcat(newStr, L"ye"); break;
+ case _T('æ'): mir_tstrcat(newStr, L"zh"); break;
+ case _T('ç'): mir_tstrcat(newStr, L"z"); break;
+ case _T('è'): mir_tstrcat(newStr, L"i"); break;
+ case _T('é'): mir_tstrcat(newStr, L"y"); break;
+ case _T('ê'): mir_tstrcat(newStr, L"k"); break;
+ case _T('ë'): mir_tstrcat(newStr, L"l"); break;
+ case _T('ì'): mir_tstrcat(newStr, L"m"); break;
+ case _T('í'): mir_tstrcat(newStr, L"n"); break;
+ case _T('î'): mir_tstrcat(newStr, L"o"); break;
+ case _T('ï'): mir_tstrcat(newStr, L"p"); break;
+ case _T('ð'): mir_tstrcat(newStr, L"r"); break;
+ case _T('ñ'): mir_tstrcat(newStr, L"s"); break;
+ case _T('ò'): mir_tstrcat(newStr, L"t"); break;
+ case _T('ó'): mir_tstrcat(newStr, L"u"); break;
+ case _T('ô'): mir_tstrcat(newStr, L"f"); break;
+ case _T('õ'): mir_tstrcat(newStr, L"kh"); break;
+ case _T('ö'): mir_tstrcat(newStr, L"ts"); break;
+ case _T('÷'): mir_tstrcat(newStr, L"ch"); break;
+ case _T('ø'): mir_tstrcat(newStr, L"sh"); break;
+ case _T('ù'): mir_tstrcat(newStr, L"sch"); break;
+ case _T('ú'): mir_tstrcat(newStr, L"'"); break;
+ case _T('û'): mir_tstrcat(newStr, L"yi"); break;
+ case _T('ü'): mir_tstrcat(newStr, L""); break;
+ case _T('ý'): mir_tstrcat(newStr, L"e"); break;
+ case _T('þ'): mir_tstrcat(newStr, L"yu"); break;
+ case _T('ÿ'): mir_tstrcat(newStr, L"ya"); break;
+ case _T('À'): mir_tstrcat(newStr, L"A"); break;
+ case _T('Á'): mir_tstrcat(newStr, L"B"); break;
+ case _T('Â'): mir_tstrcat(newStr, L"V"); break;
+ case _T('Ã'): mir_tstrcat(newStr, L"G"); break;
+ case _T('Ä'): mir_tstrcat(newStr, L"D"); break;
+ case _T('Å'): mir_tstrcat(newStr, L"E"); break;
+ case _T('¨'): mir_tstrcat(newStr, L"Ye"); break;
+ case _T('Æ'): mir_tstrcat(newStr, L"Zh"); break;
+ case _T('Ç'): mir_tstrcat(newStr, L"Z"); break;
+ case _T('È'): mir_tstrcat(newStr, L"I"); break;
+ case _T('É'): mir_tstrcat(newStr, L"Y"); break;
+ case _T('Ê'): mir_tstrcat(newStr, L"K"); break;
+ case _T('Ë'): mir_tstrcat(newStr, L"L"); break;
+ case _T('Ì'): mir_tstrcat(newStr, L"M"); break;
+ case _T('Í'): mir_tstrcat(newStr, L"N"); break;
+ case _T('Î'): mir_tstrcat(newStr, L"O"); break;
+ case _T('Ï'): mir_tstrcat(newStr, L"P"); break;
+ case _T('Ð'): mir_tstrcat(newStr, L"R"); break;
+ case _T('Ñ'): mir_tstrcat(newStr, L"S"); break;
+ case _T('Ò'): mir_tstrcat(newStr, L"T"); break;
+ case _T('Ó'): mir_tstrcat(newStr, L"U"); break;
+ case _T('Ô'): mir_tstrcat(newStr, L"F"); break;
+ case _T('Õ'): mir_tstrcat(newStr, L"Kh"); break;
+ case _T('Ö'): mir_tstrcat(newStr, L"Ts"); break;
+ case _T('×'): mir_tstrcat(newStr, L"Ch"); break;
+ case _T('Ø'): mir_tstrcat(newStr, L"Sh"); break;
+ case _T('Ù'): mir_tstrcat(newStr, L"Sch"); break;
+ case _T('Ú'): mir_tstrcat(newStr, L"'"); break;
+ case _T('Û'): mir_tstrcat(newStr, L"Yi"); break;
+ case _T('Ü'): mir_tstrcat(newStr, L""); break;
+ case _T('Ý'): mir_tstrcat(newStr, L"E"); break;
+ case _T('Þ'): mir_tstrcat(newStr, L"Yu"); break;
+ case _T('ß'): mir_tstrcat(newStr, L"Ya"); break;
+
+ case _T('a'): mir_tstrcat(newStr, L"à"); break;
+ case _T('b'): mir_tstrcat(newStr, L"á"); break;
+ case _T('v'): mir_tstrcat(newStr, L"â"); break;
+ case _T('g'): mir_tstrcat(newStr, L"ã"); break;
+ case _T('d'): mir_tstrcat(newStr, L"ä"); break;
+ case _T('e'): mir_tstrcat(newStr, L"å"); break;
case _T('z'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("æ"));
+ mir_tstrcat(newStr, L"æ");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("ç"));
+ mir_tstrcat(newStr, L"ç");
break;
}
}
- case _T('i'): mir_tstrcat(newStr, _T("è")); break;
+ case _T('i'): mir_tstrcat(newStr, L"è"); break;
case _T('y'):
{
if (str[1] == _T('a')) {
- mir_tstrcat(newStr, _T("ÿ"));
+ mir_tstrcat(newStr, L"ÿ");
str++;
break;
}
else if (str[1] == _T('e')) {
- mir_tstrcat(newStr, _T("¸"));
+ mir_tstrcat(newStr, L"¸");
str++;
break;
}
else if (str[1] == _T('u')) {
- mir_tstrcat(newStr, _T("þ"));
+ mir_tstrcat(newStr, L"þ");
str++;
break;
}
else if (str[1] == _T('i')) {
- mir_tstrcat(newStr, _T("û"));
+ mir_tstrcat(newStr, L"û");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("é"));
+ mir_tstrcat(newStr, L"é");
break;
}
}
case _T('k'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("õ"));
+ mir_tstrcat(newStr, L"õ");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("ê"));
+ mir_tstrcat(newStr, L"ê");
break;
}
}
- case _T('l'): mir_tstrcat(newStr, _T("ë")); break;
- case _T('m'): mir_tstrcat(newStr, _T("ì")); break;
- case _T('n'): mir_tstrcat(newStr, _T("í")); break;
- case _T('o'): mir_tstrcat(newStr, _T("î")); break;
- case _T('p'): mir_tstrcat(newStr, _T("ï")); break;
- case _T('r'): mir_tstrcat(newStr, _T("ð")); break;
+ case _T('l'): mir_tstrcat(newStr, L"ë"); break;
+ case _T('m'): mir_tstrcat(newStr, L"ì"); break;
+ case _T('n'): mir_tstrcat(newStr, L"í"); break;
+ case _T('o'): mir_tstrcat(newStr, L"î"); break;
+ case _T('p'): mir_tstrcat(newStr, L"ï"); break;
+ case _T('r'): mir_tstrcat(newStr, L"ð"); break;
case _T('s'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("ø"));
+ mir_tstrcat(newStr, L"ø");
str++;
break;
}
else if (str[1] == _T('c') && str[2] == _T('h')) {
- mir_tstrcat(newStr, _T("ù"));
+ mir_tstrcat(newStr, L"ù");
str += 2;
break;
}
else {
- mir_tstrcat(newStr, _T("ñ"));
+ mir_tstrcat(newStr, L"ñ");
break;
}
}
case _T('t'):
{
if (str[1] == _T('s')) {
- mir_tstrcat(newStr, _T("ö"));
+ mir_tstrcat(newStr, L"ö");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("ò"));
+ mir_tstrcat(newStr, L"ò");
break;
}
}
- case _T('u'): mir_tstrcat(newStr, _T("ó")); break;
- case _T('f'): mir_tstrcat(newStr, _T("ô")); break;
+ case _T('u'): mir_tstrcat(newStr, L"ó"); break;
+ case _T('f'): mir_tstrcat(newStr, L"ô"); break;
case _T('c'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("÷"));
+ mir_tstrcat(newStr, L"÷");
str++;
break;
}
}
- case _T('A'): mir_tstrcat(newStr, _T("À")); break;
- case _T('B'): mir_tstrcat(newStr, _T("Á")); break;
- case _T('V'): mir_tstrcat(newStr, _T("Â")); break;
- case _T('G'): mir_tstrcat(newStr, _T("Ã")); break;
- case _T('D'): mir_tstrcat(newStr, _T("Ä")); break;
- case _T('E'): mir_tstrcat(newStr, _T("Å")); break;
+ case _T('A'): mir_tstrcat(newStr, L"À"); break;
+ case _T('B'): mir_tstrcat(newStr, L"Á"); break;
+ case _T('V'): mir_tstrcat(newStr, L"Â"); break;
+ case _T('G'): mir_tstrcat(newStr, L"Ã"); break;
+ case _T('D'): mir_tstrcat(newStr, L"Ä"); break;
+ case _T('E'): mir_tstrcat(newStr, L"Å"); break;
case _T('Y'):
{
if (str[1] == _T('a')) {
- mir_tstrcat(newStr, _T("ß"));
+ mir_tstrcat(newStr, L"ß");
str++;
break;
}
else if (str[1] == _T('e')) {
- mir_tstrcat(newStr, _T("¨"));
+ mir_tstrcat(newStr, L"¨");
str++;
break;
}
else if (str[1] == _T('u')) {
- mir_tstrcat(newStr, _T("Þ"));
+ mir_tstrcat(newStr, L"Þ");
str++;
break;
}
else if (str[1] == _T('i')) {
- mir_tstrcat(newStr, _T("Û"));
+ mir_tstrcat(newStr, L"Û");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("É"));
+ mir_tstrcat(newStr, L"É");
break;
}
}
case _T('Z'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("Æ"));
+ mir_tstrcat(newStr, L"Æ");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("Ç"));
+ mir_tstrcat(newStr, L"Ç");
break;
}
}
- case _T('I'): mir_tstrcat(newStr, _T("È")); break;
+ case _T('I'): mir_tstrcat(newStr, L"È"); break;
case _T('K'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("Õ"));
+ mir_tstrcat(newStr, L"Õ");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("Ê"));
+ mir_tstrcat(newStr, L"Ê");
break;
}
}
- case _T('L'): mir_tstrcat(newStr, _T("Ë")); break;
- case _T('M'): mir_tstrcat(newStr, _T("Ì")); break;
- case _T('N'): mir_tstrcat(newStr, _T("Í")); break;
- case _T('O'): mir_tstrcat(newStr, _T("Î")); break;
- case _T('P'): mir_tstrcat(newStr, _T("Ï")); break;
- case _T('R'): mir_tstrcat(newStr, _T("Ð")); break;
+ case _T('L'): mir_tstrcat(newStr, L"Ë"); break;
+ case _T('M'): mir_tstrcat(newStr, L"Ì"); break;
+ case _T('N'): mir_tstrcat(newStr, L"Í"); break;
+ case _T('O'): mir_tstrcat(newStr, L"Î"); break;
+ case _T('P'): mir_tstrcat(newStr, L"Ï"); break;
+ case _T('R'): mir_tstrcat(newStr, L"Ð"); break;
case _T('S'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("Ø"));
+ mir_tstrcat(newStr, L"Ø");
str++;
break;
}
else if (str[1] == _T('c') && str[2] == _T('h')) {
- mir_tstrcat(newStr, _T("Ù"));
+ mir_tstrcat(newStr, L"Ù");
str += 2;
break;
}
else {
- mir_tstrcat(newStr, _T("Ñ"));
+ mir_tstrcat(newStr, L"Ñ");
break;
}
}
case _T('T'):
{
if (str[1] == _T('s')) {
- mir_tstrcat(newStr, _T("Ö"));
+ mir_tstrcat(newStr, L"Ö");
str++;
break;
}
else {
- mir_tstrcat(newStr, _T("Ò"));
+ mir_tstrcat(newStr, L"Ò");
break;
}
}
- case _T('U'): mir_tstrcat(newStr, _T("Ó")); break;
- case _T('F'): mir_tstrcat(newStr, _T("Ô")); break;
+ case _T('U'): mir_tstrcat(newStr, L"Ó"); break;
+ case _T('F'): mir_tstrcat(newStr, L"Ô"); break;
case _T('C'):
{
if (str[1] == _T('h')) {
- mir_tstrcat(newStr, _T("×"));
+ mir_tstrcat(newStr, L"×");
str++;
break;
}
}
- case _T('\''): mir_tstrcat(newStr, _T("ú")); break;
+ case _T('\''): mir_tstrcat(newStr, L"ú"); break;
default: { TCHAR Temp[2] = { str[0], 0 }; mir_tstrcat(newStr, &Temp[0]); }
}
@@ -376,9 +376,9 @@ void SwitchLayout(bool lastword) TCHAR szClassName[MAX_PATH];
GetClassName(hwnd2, szClassName, _countof(szClassName));
- if ((mir_tstrcmp(szClassName, _T("THppRichEdit.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("THistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("TExtHistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here
+ if ((mir_tstrcmp(szClassName, L"THppRichEdit.UnicodeClass") == 0 || mir_tstrcmp(szClassName, L"THistoryGrid.UnicodeClass") == 0 || mir_tstrcmp(szClassName, L"TExtHistoryGrid.UnicodeClass") == 0 || mir_tstrcmp(szClassName, L"Internet Explorer_Server") == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here
TCHAR buf[2048];
- if (mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) {
+ if (mir_tstrcmp(szClassName, L"Internet Explorer_Server") == 0) {
IEVIEWEVENT event;
HWND hwnd3 = GetParent(GetParent(hwnd2));
memset(&event, 0, sizeof(event));
@@ -434,7 +434,7 @@ void SwitchLayout(bool lastword) PUAddPopupT(&pd);
}
}
- else if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) {
+ else if (mir_tstrcmpi(szClassName, L"RichEdit50W") == 0) {
size_t i, start = 0, end = 0;
SHORT vks;
BYTE keys[256] = { 0 };
@@ -515,7 +515,7 @@ void TranslitLayout(bool lastword) TCHAR szClassName[16];
GetClassName(hwnd2, szClassName, _countof(szClassName));
- if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) != 0)
+ if (mir_tstrcmpi(szClassName, L"RichEdit50W") != 0)
return;
DWORD dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
@@ -583,7 +583,7 @@ void InvertCase(bool lastword) TCHAR szClassName[16];
GetClassName(hwnd2, szClassName, _countof(szClassName));
- if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) != 0)
+ if (mir_tstrcmpi(szClassName, L"RichEdit50W") != 0)
return;
DWORD dwStart, dwEnd, dwFlags = SF_TEXT | SF_UNICODE;
@@ -717,7 +717,7 @@ int OnButtonPressed(WPARAM, LPARAM lParam) SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
}
else if (sel) {
- CMString tszFinal(FORMAT, _T("%s %s"), tszSymbol, sel);
+ CMString tszFinal(FORMAT, L"%s %s", tszSymbol, sel);
SetWindowText(hEdit, tszFinal.GetString());
SendMessage(hEdit, EM_SETSEL, 0, tszFinal.GetLength());
SendMessage(cbcd->hwndFrom, WM_COMMAND, IDOK, 0);
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp index 1d86857b02..daf47f1298 100644 --- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp +++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp @@ -157,7 +157,7 @@ extern "C" __declspec(dllexport) int Load(void) hkd.dwFlags = HKD_TCHAR;
hkd.pszName = "TranslitSwitcher/ConvertAllOrSelected";
hkd.ptszDescription = LPGENT("Convert All / Selected");
- hkd.ptszSection = _T("TranslitSwitcher");
+ hkd.ptszSection = L"TranslitSwitcher";
hkd.pszService = MS_TS_SWITCHLAYOUT;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL + HKCOMB_A, 'R') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&hkd);
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index 24d1c2e716..9492c6896b 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -28,22 +28,22 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM) if (ptszHelpFile==0)
{
- mir_tstrcpy(pszDirName, _T("%miranda_path%\\Plugins"));
- mir_tstrcpy(pszFileName, _T("UserGuide.chm"));
+ mir_tstrcpy(pszDirName, L"%miranda_path%\\Plugins");
+ mir_tstrcpy(pszFileName, L"UserGuide.chm");
}
else
{
- if(!mir_tstrcmp(ptszHelpFile, _T("")))
+ if(!mir_tstrcmp(ptszHelpFile, L""))
{
- mir_tstrcpy(pszDirName, _T("%miranda_path%\\Plugins"));
- mir_tstrcpy(pszFileName, _T("UserGuide.chm"));
+ mir_tstrcpy(pszDirName, L"%miranda_path%\\Plugins");
+ mir_tstrcpy(pszFileName, L"UserGuide.chm");
}
else
{
LPTSTR pszDivider = _tcsrchr(ptszHelpFile, '\\');
if (pszDivider == NULL)
{
- mir_tstrcpy(pszDirName, _T(""));
+ mir_tstrcpy(pszDirName, L"");
_tcsncpy(pszFileName, ptszHelpFile, mir_tstrlen(ptszHelpFile));
}
else
@@ -60,7 +60,7 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM) pszDirNameEx = Utils_ReplaceVarsT(pszDirName);
mir_free(pszDirName);
- ShellExecute(NULL, _T("open"), pszFileName, NULL, pszDirNameEx, SW_SHOW);
+ ShellExecute(NULL, L"open", pszFileName, NULL, pszDirNameEx, SW_SHOW);
mir_free(pszFileName);
mir_free(pszDirNameEx);
return 0;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index cd6ef31f0d..d28f9fcd36 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -284,7 +284,7 @@ static INT_PTR ServiceCreateMergedFlagIcon(WPARAM wParam,LPARAM lParam) void InitIcons()
{
// all those flag icons storing in a large 24bit opaque bitmap to reduce file size
- FIBITMAP *dib = LoadResource(IDB_FLAGSPNG, _T("PNG"));
+ FIBITMAP *dib = LoadResource(IDB_FLAGSPNG, L"PNG");
if (dib == NULL)
return;
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 9a357172a3..8c2049b3d7 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -368,7 +368,7 @@ WORD MTime::DateFormatAlt(LPTSTR ptszTimeFormat, WORD cchTimeFormat) TCHAR * tszYear = _tcsstr(ptszTimeFormat, tszText);
if (tszYear && mir_tstrlen(tszYear) == 4)
- mir_tstrcpy(tszYear, _T("????"));
+ mir_tstrcpy(tszYear, L"????");
else {
*ptszTimeFormat = 0;
return 0;
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 05b88064ec..ca46d61dfa 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -31,7 +31,7 @@ BOOL CALLBACK BoldGroupTitlesEnumChildren(HWND hWnd, LPARAM lParam) {
TCHAR szClass[64];
GetClassName(hWnd, szClass, 64);
- if (!mir_tstrcmp(szClass, _T("Button")) && (GetWindowLongPtr(hWnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX)
+ if (!mir_tstrcmp(szClass, L"Button") && (GetWindowLongPtr(hWnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX)
SendMessage(hWnd, WM_SETFONT, lParam, NULL);
return TRUE;
}
@@ -403,13 +403,13 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_sntprintf(szTitle, _T("%s %d\\%s"), odp->ptszTitle, pPsh->_nSubContact+1, odp->ptszTab);
+ mir_sntprintf(szTitle, L"%s %d\\%s", odp->ptszTitle, pPsh->_nSubContact+1, odp->ptszTab);
else
- mir_sntprintf(szTitle, _T("%s %d"), odp->ptszTitle, pPsh->_nSubContact+1);
+ mir_sntprintf(szTitle, L"%s %d", odp->ptszTitle, pPsh->_nSubContact+1);
}
else {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_sntprintf(szTitle, _T("%s\\%s"), odp->ptszTitle, odp->ptszTab);
+ mir_sntprintf(szTitle, L"%s\\%s", odp->ptszTitle, odp->ptszTab);
else
mir_tstrcpy(szTitle, odp->ptszTitle);
}
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 18e1bda0e6..591df8f8b3 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -404,7 +404,7 @@ INT_PTR CAnnivEditCtrl::SetCurSel(WORD wIndex) }
else {
TCHAR szText[MAX_DESC];
- mir_sntprintf(szText, _T("'%s'"), TranslateT("Unspecified"));
+ mir_sntprintf(szText, L"'%s'", TranslateT("Unspecified"));
DateTime_SetSystemtime(_hwndDate, GDT_NONE, NULL);
DateTime_SetFormat(_hwndDate, szText);
}
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 262a180124..b37897793b 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -328,7 +328,7 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam GetDlgItemText(hDlg, EDIT_AREA, szArea, _countof(szArea));
GetDlgItemText(hDlg, EDIT_NUMBER, szData, _countof(szData));
- mir_sntprintf(szPhone, _T("+%u (%s) %s"), nCountry, szArea, szData);
+ mir_sntprintf(szPhone, L"+%u (%s) %s", nCountry, szArea, szData);
noRecursion = 1;
SetDlgItemText(hDlg, EDIT_PHONE, szPhone);
noRecursion = 0;
@@ -362,19 +362,19 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam }
}
if (isValid) {
- pArea = pText + _tcscspn(pText, _T("0123456789"));
- pText = pArea + _tcsspn(pArea, _T("0123456789"));
+ pArea = pText + _tcscspn(pText, L"0123456789");
+ pText = pArea + _tcsspn(pArea, L"0123456789");
if (*pText) {
*pText = '\0';
- pNumber = pText + 1 + _tcscspn(pText + 1, _T("0123456789"));
+ pNumber = pText + 1 + _tcscspn(pText + 1, L"0123456789");
SetDlgItemText(hDlg, EDIT_NUMBER, pNumber);
}
SetDlgItemText(hDlg, EDIT_AREA, pArea);
}
if (!isValid) {
SendDlgItemMessage(hDlg, EDIT_COUNTRY, CB_SETCURSEL, -1, 0);
- SetDlgItemText(hDlg, EDIT_AREA, _T(""));
- SetDlgItemText(hDlg, EDIT_NUMBER, _T(""));
+ SetDlgItemText(hDlg, EDIT_AREA, L"");
+ SetDlgItemText(hDlg, EDIT_NUMBER, L"");
}
}
noRecursion = 0;
@@ -443,7 +443,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (!(cbex->hBtnEdit = CreateWindowEx(WS_EX_NOPARENTNOTIFY,
UINFOBUTTONCLASS,
- _T("none"),
+ L"none",
WS_VISIBLE|WS_CHILD|WS_TABSTOP, 0, 0,
wWidth, wHeight,
hwnd,
@@ -470,7 +470,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L x += wWidth + 2;
wWidth = (WORD)(cbex->rect.right - cbex->rect.left - x - (2 * (wHeight + 2)));
if (!(cbex->hEdit = CreateWindowEx(WS_EX_CLIENTEDGE,
- _T("Edit"),
+ L"Edit",
NULL,
WS_VISIBLE|WS_CHILD|WS_TABSTOP|ES_AUTOHSCROLL,
x, 1,
@@ -582,11 +582,11 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L {
HICON hIcon = IcoLib_GetIcon(ICO_BTN_ADD);
SendMessage(cbex->hBtnAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(cbex->hBtnAdd, (hIcon ? _T("") : _T("+")));
+ SetWindowText(cbex->hBtnAdd, (hIcon ? L"" : L"+"));
hIcon = IcoLib_GetIcon(ICO_BTN_DELETE);
SendMessage(cbex->hBtnDel, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(cbex->hBtnDel, (hIcon ? _T("") : _T("-")));
+ SetWindowText(cbex->hBtnDel, (hIcon ? L"" : L"-"));
if (cbex->pItems && cbex->numItems > 0) {
for (int i = 0; i < cbex->numItems; i++)
@@ -796,7 +796,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // clear value for standard entry
if (cbex->pItems[cbex->iSelectedItem].wFlags & CBEXIF_CATREADONLY) {
MIR_FREE(cbex->pItems[cbex->iSelectedItem].pszVal);
- SetWindowText(cbex->hEdit, _T(""));
+ SetWindowText(cbex->hEdit, L"");
cbex->pItems[cbex->iSelectedItem].wFlags &= ~CBEXIF_SMS;
cbex->pItems[cbex->iSelectedItem].wFlags |= CTRLF_CHANGED;
}
@@ -885,7 +885,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if ((ccText = GetWindowTextLength(cbex->hEdit)) <= 0) {
if (cbex->pItems[cbex->iSelectedItem].wFlags & CBEXIF_CATREADONLY) {
MIR_FREE(cbex->pItems[cbex->iSelectedItem].pszVal);
- SetWindowText(cbex->hEdit, _T(""));
+ SetWindowText(cbex->hEdit, L"");
cbex->pItems[cbex->iSelectedItem].wFlags &= ~CBEXIF_SMS;
}
else
@@ -946,7 +946,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // set category string
if (!pItem->pszCat || !pItem->pszCat[0] || !mir_tstrncpy(cbex->pItems[cbex->numItems].szCat, pItem->pszCat, MAX_CAT)) {
- mir_sntprintf(cbex->pItems[cbex->numItems].szCat, _T("%s %d"), TranslateT("Other"), ++cbex->numOther);
+ mir_sntprintf(cbex->pItems[cbex->numItems].szCat, L"%s %d", TranslateT("Other"), ++cbex->numOther);
}
// set value string
@@ -986,7 +986,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (pItem->wMask & CBEXIM_CAT) {
// set category string
if (!pItem->pszCat || !pItem->pszCat[0] || !mir_tstrncpy(cbex->pItems[pItem->iItem].szCat, pItem->pszCat, _countof(cbex->pItems[pItem->iItem].szCat)))
- mir_sntprintf(cbex->pItems[pItem->iItem].szCat, _T("%s %d"), TranslateT("Other"), ++cbex->numOther);
+ mir_sntprintf(cbex->pItems[pItem->iItem].szCat, L"%s %d", TranslateT("Other"), ++cbex->numOther);
if (pItem->iItem == cbex->iSelectedItem)
SetWindowText(cbex->hBtnEdit, cbex->pItems[pItem->iItem].szCat);
}
@@ -996,7 +996,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (pItem->pszVal && pItem->pszVal[0])
cbex->pItems[pItem->iItem].pszVal = mir_tstrdup(pItem->pszVal);
if (pItem->iItem == cbex->iSelectedItem)
- SetWindowText(cbex->hEdit, cbex->pItems[pItem->iItem].pszVal ? cbex->pItems[pItem->iItem].pszVal : _T(""));
+ SetWindowText(cbex->hEdit, cbex->pItems[pItem->iItem].pszVal ? cbex->pItems[pItem->iItem].pszVal : L"");
}
// set icon
@@ -1111,8 +1111,8 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
cbex->numItems = 0;
cbex->iSelectedItem = -1;
- SetWindowText(cbex->hEdit, _T(""));
- SetWindowText(cbex->hBtnEdit, _T(""));
+ SetWindowText(cbex->hEdit, L"");
+ SetWindowText(cbex->hBtnEdit, L"");
SendMessage(cbex->hBtnEdit, WM_SETICON, NULL, NULL);
}
return TRUE;
@@ -1203,7 +1203,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
SetWindowText(cbex->hBtnEdit, cbex->pItems[cbex->iSelectedItem].szCat);
- SetWindowText(cbex->hEdit, cbex->pItems[cbex->iSelectedItem].pszVal ? cbex->pItems[cbex->iSelectedItem].pszVal : _T(""));
+ SetWindowText(cbex->hEdit, cbex->pItems[cbex->iSelectedItem].pszVal ? cbex->pItems[cbex->iSelectedItem].pszVal : L"");
SendMessage(cbex->hBtnEdit, BM_SETIMAGE, IMAGE_ICON, (LPARAM)cbex->pItems[cbex->iSelectedItem].hIcon);
CtrlContactWndProc(hwnd, CBEXM_ENABLEITEM, NULL, NULL);
cbex->bLocked = 0;
@@ -1297,7 +1297,7 @@ int CtrlContactAddItemFromDB( cbi.pszVal = NULL;
else { // check the database value
cbi.pszVal = dbv.ptszVal;
- if (LPTSTR sms = _tcsstr(cbi.pszVal, _T(" SMS"))) {
+ if (LPTSTR sms = _tcsstr(cbi.pszVal, L" SMS")) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
}
@@ -1377,7 +1377,7 @@ int CtrlContactAddMyItemsFromDB( dbv.ptszVal = NULL;
}
}
- if (sms = _tcsstr(cbi.pszVal, _T(" SMS"))) {
+ if (sms = _tcsstr(cbi.pszVal, L" SMS")) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
}
@@ -1428,7 +1428,7 @@ int CtrlContactWriteItemToDB( db_unset(hContact, pszModule, pszSetting);
else {
if (cbi.wFlags & CBEXIF_SMS)
- mir_tstrncat(szVal, _T(" SMS"), _countof(szVal) - mir_tstrlen(szVal));
+ mir_tstrncat(szVal, L" SMS", _countof(szVal) - mir_tstrlen(szVal));
if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1;
}
@@ -1478,7 +1478,7 @@ int CtrlContactWriteMyItemsToDB( while (CtrlContactWndProc(hCtrl, CBEXM_GETITEM, NULL, (LPARAM)&cbi) && cbi.iItem < 50) {
if (!(cbi.wFlags & CBEXIF_DELETED) && *szVal) {
if (cbi.wFlags & CBEXIF_SMS) {
- mir_tstrncat(szVal, _T(" SMS"), _countof(szVal) - mir_tstrlen(szVal));
+ mir_tstrncat(szVal, L" SMS", _countof(szVal) - mir_tstrlen(szVal));
}
mir_snprintf(pszSetting, szFormatCat, i);
if (*szCat && _tcsncmp(szCat, pszOther, ccOther)) {
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 20a5f23902..42f09717cf 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.h +++ b/plugins/UserInfoEx/src/ctrl_contact.h @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* contact control v0.1.0.6+
*/
-#define UINFOCOMBOEXCLASS _T("UInfoComboExWndClass")
+#define UINFOCOMBOEXCLASS L"UInfoComboExWndClass"
// messages
#define CBEXM_ADDITEM (WM_USER+4)
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index c67e39e0bd..77a3904eb6 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -144,7 +144,7 @@ BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto) } default: - SetWindowText(_hwnd, _T("")); + SetWindowText(_hwnd, L""); db_free(&dbv); break; } @@ -325,7 +325,7 @@ LRESULT CEditCtrl::LinkNotificationHandler(ENLINK* lnk) if (tr.lpstrText && (SendMessage(_hwnd, EM_GETTEXTRANGE, NULL, (LPARAM)&tr) > 0)) { 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))); } Utils_OpenUrlT(tr.lpstrText); diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp index 81922204ce..89028e9f55 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp @@ -224,5 +224,5 @@ void CTzCombo::OnChangedByUser(WORD wChangedMsg) **/
void CTzCombo::GetTime(LPTSTR szTime, int cchTime)
{
- TimeZone_PrintDateTime((HANDLE)ComboBox_GetItemData(_hwnd, _curSel), _T("t"), szTime, cchTime, 0);
+ TimeZone_PrintDateTime((HANDLE)ComboBox_GetItemData(_hwnd, _curSel), L"t", szTime, cchTime, 0);
}
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 1e9ad4ca9b..a1c3fb3be8 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -706,7 +706,7 @@ class CAnnivList if (ad.Age(&mtNow))
AddSubItem(iItem, COLUMN_AGE, _itot(ad.Age(&mtNow), szText, 10));
else
- AddSubItem(iItem, COLUMN_AGE, _T("???"));
+ AddSubItem(iItem, COLUMN_AGE, L"???");
// fifth line: anniversary
AddSubItem(iItem, COLUMN_DESC, (LPTSTR)ad.Description());
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index abc7596ccf..8cb11462e3 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -687,7 +687,7 @@ INT_PTR CALLBACK MsgBox(HWND hParent, UINT uType, LPCTSTR pszTitle, LPCTSTR pszI INT_PTR CALLBACK MsgErr(HWND hParent, LPCTSTR pszFormat, ...)
{
TCHAR tszTitle[MAX_SECONDLINE], tszMsg[MAX_SECONDLINE];
- mir_sntprintf(tszTitle, _T("%s - %s"), _T(MODNAME), TranslateT("Error"));
+ mir_sntprintf(tszTitle, L"%s - %s", _T(MODNAME), TranslateT("Error"));
va_list vl;
va_start(vl, pszFormat);
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 31d002e2d3..c03a5a75db 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -429,7 +429,7 @@ static int OnShutdown(WPARAM, LPARAM) static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProto = NULL)
{
TCHAR szTitle[MAX_PATH];
- const BYTE ofs = (pszProto) ? mir_sntprintf(szTitle, _T("%S\\"), pszProto) : 0;
+ const BYTE ofs = (pszProto) ? mir_sntprintf(szTitle, L"%S\\", pszProto) : 0;
odp.ptszTitle = szTitle;
@@ -444,21 +444,21 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt odp.position = 0x8000001;
odp.pfnDlgProc = PSPProcContactHome;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Contact (private)"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Contact (private)"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ORIGIN);
odp.position = 0x8000002;
odp.pfnDlgProc = PSPProcOrigin;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADVANCED);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Origin"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Origin"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ANNIVERSARY);
odp.position = 0x8000003;
odp.pfnDlgProc = PSPProcAnniversary;
odp.hIcon = (HICON)ICONINDEX(IDI_BIRTHDAY);
- mir_tstrncpy(szTitle + ofs, LPGENT("General") _T("\\") LPGENT("Anniversaries"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENT("General") L"\\" LPGENT("Anniversaries"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_COMPANY);
@@ -472,7 +472,7 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt odp.position = 0x8000005;
odp.pfnDlgProc = PSPProcContactWork;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_ADDRESS);
- mir_tstrncpy(szTitle + ofs, LPGENT("Work") _T("\\") LPGENT("Contact (work)"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENT("Work") L"\\" LPGENT("Contact (work)"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
@@ -486,7 +486,7 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt odp.position = 0x8000007;
odp.pfnDlgProc = PSPProcContactProfile;
odp.hIcon = (HICON)ICONINDEX(IDI_TREE_PROFILE);
- mir_tstrncpy(szTitle + ofs, LPGENT("About") _T("\\") LPGENT("Profile"), _countof(szTitle) - ofs);
+ mir_tstrncpy(szTitle + ofs, LPGENT("About") L"\\" LPGENT("Profile"), _countof(szTitle) - ofs);
AddPage(wParam, (LPARAM)&odp);
return 0;
}
@@ -514,7 +514,7 @@ static int InitDetails(WPARAM wParam, LPARAM lParam) // ignore common pages for weather contacts
if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) {
AddProtocolPages(odp, wParam);
- odp.ptszTitle = LPGENT("About") _T("\\") LPGENT("Notes");
+ odp.ptszTitle = LPGENT("About") L"\\" LPGENT("Notes");
}
else
odp.ptszTitle = LPGENT("Notes");
@@ -735,7 +735,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar GetObject(hNormalFont, sizeof(lf), &lf);
lf.lfHeight = 22;
- mir_tstrcpy(lf.lfFaceName, _T("Segoe UI"));
+ mir_tstrcpy(lf.lfFaceName, L"Segoe UI");
pPs->hCaptionFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)pPs->hCaptionFont, 0);
@@ -1101,7 +1101,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar HWND hName = GetDlgItem(hDlg, TXT_NAME);
SetWindowText(hName, pszName);
- SetWindowText(hDlg, CMString(FORMAT, _T("%s - %s"), pszName, TranslateT("edit contact information")));
+ SetWindowText(hDlg, CMString(FORMAT, L"%s - %s", pszName, TranslateT("edit contact information")));
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("View personal user details and more"));
// redraw the name control
@@ -1141,12 +1141,12 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (hCtrl = GetDlgItem(hDlg, BTN_IMPORT)) {
hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("I"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"I");
}
if (hCtrl = GetDlgItem(hDlg, BTN_EXPORT)) {
hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetWindowText(hCtrl, hIcon ? _T("") : _T("E"));
+ SetWindowText(hCtrl, hIcon ? L"" : L"E");
}
// update page icons
if (PtrIsValid(pPs) && (pPs->dwFlags & PSF_INITIALIZED))
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 870353bb72..39e31af3ab 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -687,7 +687,7 @@ int CExImContactXML::Import(BYTE keepMetaSubContact) // load all subcontacts
do {
// update progressbar and abort if user clicked cancel
- int result = _pXmlFile->_progress.UpdateContact(_T("Sub Contact: %s (%S)"),
+ int result = _pXmlFile->_progress.UpdateContact(L"Sub Contact: %s (%S)",
ptrT(mir_utf8decodeT(xContact->Attribute("nick"))), xContact->Attribute("proto"));
// user clicked abort button
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index e460672a2a..5c43c0a7f1 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -221,7 +221,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar }
TranslateDialogDefault(hDlg); //to translate oldTitle
GetWindowText(hDlg, oldTitle, _countof(oldTitle));
- mir_sntprintf(newTitle, _T("%s - %s"), name, oldTitle);
+ mir_sntprintf(newTitle, L"%s - %s", name, oldTitle);
SetWindowText(hDlg, newTitle);
}
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 5ccbaf537e..e54f06003b 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../stdafx.h"
-#define HKEY_MIRANDA_PLACESBAR _T("Software\\Miranda NG\\PlacesBar")
-#define HKEY_WINPOL_PLACESBAR _T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\ComDlg32\\PlacesBar")
+#define HKEY_MIRANDA_PLACESBAR L"Software\\Miranda NG\\PlacesBar"
+#define HKEY_WINPOL_PLACESBAR L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\ComDlg32\\PlacesBar"
/**
* This function maps the current users registry to a dummy key and
@@ -56,9 +56,9 @@ static void InitAlteredPlacesBar() CHAR szProfilePath[MAX_PATH];
// default places: Desktop, My Documents, My Computer
- dwFolderID = 0; RegSetValueEx(hkPlacesBar, _T("Place0"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
- dwFolderID = 5; RegSetValueEx(hkPlacesBar, _T("Place1"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
- dwFolderID = 17; RegSetValueEx(hkPlacesBar, _T("Place2"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 0; RegSetValueEx(hkPlacesBar, L"Place0", 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 5; RegSetValueEx(hkPlacesBar, L"Place1", 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 17; RegSetValueEx(hkPlacesBar, L"Place2", 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD));
// Miranda's installation path
GetModuleFileNameA(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index 4b403e195e..157094e89e 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -281,7 +281,7 @@ INT_PTR svcExIm_Group_Service(WPARAM wParam, LPARAM) if (SendMessage(hClist,CLM_GETITEMTYPE, (WPARAM)hItem, 0) == CLCIT_GROUP) {
SendMessage(hClist,CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)ptszItem);
LPTSTR temp = mir_tstrdup(ptszGroup);
- mir_sntprintf(tszGroup, _T("%s%s%s"), ptszItem, mir_tstrlen(temp)? _T("\\"):_T(""), temp);
+ mir_sntprintf(tszGroup, L"%s%s%s", ptszItem, mir_tstrlen(temp)? L"\\":L"", temp);
mir_free (temp);
}
hParent = SendMessage(hClist,CLM_GETNEXTITEM, (WPARAM)CLGN_PARENT, (LPARAM)hItem);
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 219f5b9193..7a829f360e 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -176,7 +176,7 @@ extern "C" int __declspec(dllexport) Load(void) result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP);
if (FIP == NULL || result != S_OK) {
- MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Flags module will be disabled."), _T("Error"), MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
+ MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Flags module will be disabled."), L"Error", MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
return 1;
}
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index 587da1a03e..9f39826acd 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -128,9 +128,9 @@ static ICODESC icoDesc[] = { LPTSTR IcoLib_GetDefaultIconFileName()
{
static LPTSTR path[] = {
- _T("Icons\\uinfoex_icons.dll"),
- _T("Plugins\\uinfoex_icons.dll"),
- _T("Customize\\Icons\\uinfoex_icons.dll")
+ L"Icons\\uinfoex_icons.dll",
+ L"Plugins\\uinfoex_icons.dll",
+ L"Customize\\Icons\\uinfoex_icons.dll"
};
TCHAR absolute[MAX_PATH];
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index da26528cb9..997df02d38 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -46,7 +46,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM PSGetBoldFont(hDlg, hBoldFont);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
- mir_sntprintf(szAddr, _T("%s (%s)"), TranslateT("Address"), TranslateT("home"));
+ mir_sntprintf(szAddr, L"%s (%s)", TranslateT("Address"), TranslateT("home"));
SetDlgItemText(hDlg, IDC_PAGETITLE, szAddr);
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
@@ -126,7 +126,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
HICON hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
SendDlgItemMessage(hDlg, BTN_GOTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetDlgItemText(hDlg, BTN_GOTO, hIcon ? _T("") : _T("->"));
+ SetDlgItemText(hDlg, BTN_GOTO, hIcon ? L"" : L"->");
hIcon = IcoLib_GetIcon(ICO_COMMON_ADDRESS);
SendDlgItemMessage(hDlg, ICO_ADDRESS, STM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
@@ -192,7 +192,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM PSGetBoldFont(hDlg, hBoldFont);
SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0);
- mir_sntprintf(szAddr, _T("%s (%s)"), TranslateT("Address and contact"), TranslateT("company"));
+ mir_sntprintf(szAddr, L"%s (%s)", TranslateT("Address and contact"), TranslateT("company"));
SetDlgItemText(hDlg, IDC_PAGETITLE, szAddr);
SendDlgItemMessage(hDlg, BTN_GOTO, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in browser"), MBBF_TCHAR);
TranslateDialogDefault(hDlg);
@@ -270,7 +270,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
HICON hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
SendDlgItemMessage(hDlg, BTN_GOTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SetDlgItemText(hDlg, BTN_GOTO, hIcon ? _T("") : _T("->"));
+ SetDlgItemText(hDlg, BTN_GOTO, hIcon ? L"" : L"->");
hIcon = IcoLib_GetIcon(ICO_COMMON_ADDRESS);
SendDlgItemMessage(hDlg, ICO_ADDRESS, STM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index 7e104fc3d4..a2c35c73b2 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -92,7 +92,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara mt.UTCToLocal();
mt.DateFormatLong(szTime, _countof(szTime));
- mir_tstrcat(szTime, _T(" - "));
+ mir_tstrcat(szTime, L" - ");
ptr = szTime + mir_tstrlen(szTime);
mt.TimeFormat(ptr, _countof(szTime) - (ptr - szTime));
SetDlgItemText(hDlg, TXT_DATEADDED, szTime);
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index 67bbeb3249..a2a6917b3c 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -331,12 +331,12 @@ static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, int iItem, int iSubItem }
// create the edit control
pList->labelEdit.hEdit = CreateWindowEx(WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE,
- _T("EDIT"),
+ L"EDIT",
(!iSubItem && pItem->idstrList && pItem->iListItem > 0 && pItem->iListItem < pItem->idstrListCount)
? pItem->idstrList[pItem->iListItem].ptszTranslated
: (iSubItem >= 0 && iSubItem < 2 && pItem->pszText[iSubItem] && *pItem->pszText[iSubItem])
? pItem->pszText[iSubItem]
- : _T(""),
+ : L"",
WS_VISIBLE | WS_CHILD | (iSubItem ? (WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL) : ES_AUTOHSCROLL),
pList->labelEdit.rcCombo.left, pList->labelEdit.rcCombo.top,
pList->labelEdit.rcCombo.right - pList->labelEdit.rcCombo.left,
@@ -933,7 +933,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa rc.bottom = rc.top + listHeight;
}
- pList->labelEdit.dropDown.hDrop = CreateWindowEx(0, _T("LISTBOX"), NULL,
+ pList->labelEdit.dropDown.hDrop = CreateWindowEx(0, L"LISTBOX", NULL,
WS_CHILD | WS_BORDER | WS_VSCROLL | LBS_COMBOBOX | LBS_HASSTRINGS,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
hwnd, NULL, ghInst, NULL);
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index c9b67be6e6..4833e52f12 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -427,7 +427,7 @@ public: _szText = mir_tstrdup(szTitle);
mir_tstrcpy(pd.lptzContactName, _szText);
- mir_tstrcpy(pd.lptzText, _T(" "));
+ mir_tstrcpy(pd.lptzText, L" ");
_pFnCallBack = pFnCallBack;
_hWnd = (HWND) CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &pd, APF_RETURN_HWND|APF_NEWDATA);
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 827a7840a7..de7ee4ee19 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -255,7 +255,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT if (hContact) {
ppd.lchContact = hContact;
- mir_sntprintf(ppd.lptzContactName, _T("%s - %s"), TranslateTS(pszDesc), DB::Contact::DisplayName(hContact));
+ mir_sntprintf(ppd.lptzContactName, L"%s - %s", TranslateTS(pszDesc), DB::Contact::DisplayName(hContact));
}
else mir_tstrncpy(ppd.lptzContactName, TranslateT("Reminder"), _countof(ppd.lptzContactName));
@@ -406,7 +406,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE tszMsg += TranslateT("She has the following anniversaries:");
break;
}
- tszMsg.Append(_T("\n- "));
+ tszMsg.Append(L"\n- ");
switch (Diff) {
case 0:
@@ -428,7 +428,7 @@ static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE if (numAnniversaries != 0 && bNotify) {
if (tszMsg.GetLength() >= MAX_SECONDLINE) {
tszMsg.Truncate(MAX_SECONDLINE - 5);
- tszMsg.Append(_T("\n..."));
+ tszMsg.Append(L"\n...");
}
NotifyWithPopup(hContact, CEvent::ANNIVERSARY, Diff, LPGENT("Anniversaries"), tszMsg);
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index fea63f3996..bd08054600 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -193,13 +193,13 @@ public: pTimeZone = new CTimeZone();
if (pTimeZone) {
cbData = sizeof(szDisplay);
- result |= RegQueryValueEx(hKeyTz, _T("Display"), 0, 0, (LPBYTE)szDisplay, &cbData);
+ result |= RegQueryValueEx(hKeyTz, L"Display", 0, 0, (LPBYTE)szDisplay, &cbData);
cbData = sizeof(REG_TZI_FORMAT);
- result |= RegQueryValueEx(hKeyTz, _T("TZI"), 0, 0, (LPBYTE)pTimeZone, &cbData);
+ result |= RegQueryValueEx(hKeyTz, L"TZI", 0, 0, (LPBYTE)pTimeZone, &cbData);
cbData = sizeof(DWORD);
- if (RegQueryValueEx(hKeyTz, _T("Index"), 0, 0, (LPBYTE)(UINT_PTR)pTimeZone->dwIndex, &cbData) != ERROR_SUCCESS)
+ if (RegQueryValueEx(hKeyTz, L"Index", 0, 0, (LPBYTE)(UINT_PTR)pTimeZone->dwIndex, &cbData) != ERROR_SUCCESS)
pTimeZone->dwIndex = TZINDEX_UNSPECIFIED;
if (result == ERROR_SUCCESS) {
@@ -313,56 +313,56 @@ static TZ_MAP MirTZ2WinTZ(const CHAR MirTz) * for retrieving information about daylight saving time and more.
**/
static const TZ_MAP TzMap[] = {
- { 0, _T("Dateline Standard Time")}, // GMT-12:00 Eniwetok; Kwajalein
- {-1, _T("")}, // GMT-11:30
- { 1, _T("Samoa Standard Time")}, // GMT-11:00 Midway Island; Samoa
- {-1, _T("")}, // GMT-10:30
- { 2, _T("Hawaiian Standard Time")}, // GMT-10:00 Hawaii
- {-1, _T("")}, // GMT-9:30
- { 3, _T("Alaskan Standard Time")}, // GMT-9:00 Alaska
- {-1, _T("")}, // GMT-8:30
- { 4, _T("Pacific Standard Time")}, // GMT-8:00 Pacific Time; Tijuana
- {-1, _T("")}, // GMT-7:30
- {15, _T("US Mountain Standard Time")}, // GMT-7:00 Arizona; Mountain Time
- {-1, _T("")}, // GMT-6:30
- {33, _T("Central America Standard Time")}, // GMT-6:00 Central Time; Central America; Saskatchewan
- {-1, _T("")}, // GMT-5:30
- {45, _T("SA Pacific Standard Time")}, // GMT-5:00 Eastern Time; Bogota; Lima; Quito
- {-1, _T("")}, // GMT-4:30
- {56, _T("Pacific SA Standard Time")}, // GMT-4:00 Atlantic Time; Santiago; Caracas; La Paz
- {60, _T("Newfoundland Standard Time")}, // GMT-3:30 Newfoundland
- {70, _T("SA Eastern Standard Time")}, // GMT-3:00 Greenland; Buenos Aires; Georgetown
- {-1, _T("")}, // GMT-2:30
- {75, _T("Mid-Atlantic Standard Time")}, // GMT-2:00 Mid-Atlantic
- {-1, _T("")}, // GMT-1:30
- {80, _T("Azores Standard Time")}, // GMT-1:00 Cape Verde Islands; Azores
- {-1, _T("")}, // GMT-0:30
- {85, _T("GMT Standard Time")}, // GMT+0:00 London; Dublin; Edinburgh; Lisbon; Casablanca
- {-1, _T("")}, // GMT+0:30
- {105, _T("Romance Standard Time")}, // GMT+1:00 Central European Time; West Central Africa; Warsaw
- {-1, _T("")}, // GMT+1:30
- {140, _T("South Africa Standard Time")}, // GMT+2:00 Jerusalem; Helsinki; Harare; Cairo; Bucharest; Athens
- {-1, _T("")}, // GMT+2:30
- {145, _T("Russian Standard Time")}, // GMT+3:00 Moscow; St. Petersburg; Nairobi; Kuwait; Baghdad
- {160, _T("Iran Standard Time")}, // GMT+3:30 Tehran
- {165, _T("Arabian Standard Time")}, // GMT+4:00 Baku; Tbilisi; Yerevan; Abu Dhabi; Muscat
- {175, _T("Afghanistan Standard Time")}, // GMT+4:30 Kabul
- {185, _T("West Asia Standard Time")}, // GMT+5:00 Calcutta; Chennai; Mumbai; New Delhi; Ekaterinburg
- {200, _T("Sri Lanka Standard Time")}, // GMT+5:30 Sri Jayawardenepura
- {201, _T("N. Central Asia Standard Time")}, // GMT+6:00 Astana; Dhaka; Almaty; Novosibirsk
- {203, _T("Myanmar Standard Time")}, // GMT+6:30 Rangoon
- {207, _T("North Asia Standard Time")}, // GMT+7:00 Bankok; Hanoi; Jakarta; Krasnoyarsk
- {-1, _T("")}, // GMT+7:30
- {210, _T("China Standard Time")}, // GMT+8:00 Perth; Taipei; Singapore; Hong Kong; Beijing
- {-1, _T("")}, // GMT+8:30
- {235, _T("Tokyo Standard Time")}, // GMT+9:00 Tokyo; Osaka; Seoul; Sapporo; Yakutsk
- {245, _T("AUS Central Standard Time")}, // GMT+9:30 Darwin; Adelaide
- {270, _T("Vladivostok Standard Time")}, // GMT+10:00 East Australia; Guam; Vladivostok
- {-1, _T("")}, // GMT+10:30
- {280, _T("Central Pacific Standard Time")}, // GMT+11:00 Magadan; Solomon Is.; New Caledonia
- {-1, _T("")}, // GMT+11:30
- {290, _T("New Zealand Standard Time")}, // GMT+12:00 Auckland; Wellington; Fiji; Kamchatka; Marshall Is.
- {-1, _T("")}
+ { 0, L"Dateline Standard Time"}, // GMT-12:00 Eniwetok; Kwajalein
+ {-1, L""}, // GMT-11:30
+ { 1, L"Samoa Standard Time"}, // GMT-11:00 Midway Island; Samoa
+ {-1, L""}, // GMT-10:30
+ { 2, L"Hawaiian Standard Time"}, // GMT-10:00 Hawaii
+ {-1, L""}, // GMT-9:30
+ { 3, L"Alaskan Standard Time"}, // GMT-9:00 Alaska
+ {-1, L""}, // GMT-8:30
+ { 4, L"Pacific Standard Time"}, // GMT-8:00 Pacific Time; Tijuana
+ {-1, L""}, // GMT-7:30
+ {15, L"US Mountain Standard Time"}, // GMT-7:00 Arizona; Mountain Time
+ {-1, L""}, // GMT-6:30
+ {33, L"Central America Standard Time"}, // GMT-6:00 Central Time; Central America; Saskatchewan
+ {-1, L""}, // GMT-5:30
+ {45, L"SA Pacific Standard Time"}, // GMT-5:00 Eastern Time; Bogota; Lima; Quito
+ {-1, L""}, // GMT-4:30
+ {56, L"Pacific SA Standard Time"}, // GMT-4:00 Atlantic Time; Santiago; Caracas; La Paz
+ {60, L"Newfoundland Standard Time"}, // GMT-3:30 Newfoundland
+ {70, L"SA Eastern Standard Time"}, // GMT-3:00 Greenland; Buenos Aires; Georgetown
+ {-1, L""}, // GMT-2:30
+ {75, L"Mid-Atlantic Standard Time"}, // GMT-2:00 Mid-Atlantic
+ {-1, L""}, // GMT-1:30
+ {80, L"Azores Standard Time"}, // GMT-1:00 Cape Verde Islands; Azores
+ {-1, L""}, // GMT-0:30
+ {85, L"GMT Standard Time"}, // GMT+0:00 London; Dublin; Edinburgh; Lisbon; Casablanca
+ {-1, L""}, // GMT+0:30
+ {105, L"Romance Standard Time"}, // GMT+1:00 Central European Time; West Central Africa; Warsaw
+ {-1, L""}, // GMT+1:30
+ {140, L"South Africa Standard Time"}, // GMT+2:00 Jerusalem; Helsinki; Harare; Cairo; Bucharest; Athens
+ {-1, L""}, // GMT+2:30
+ {145, L"Russian Standard Time"}, // GMT+3:00 Moscow; St. Petersburg; Nairobi; Kuwait; Baghdad
+ {160, L"Iran Standard Time"}, // GMT+3:30 Tehran
+ {165, L"Arabian Standard Time"}, // GMT+4:00 Baku; Tbilisi; Yerevan; Abu Dhabi; Muscat
+ {175, L"Afghanistan Standard Time"}, // GMT+4:30 Kabul
+ {185, L"West Asia Standard Time"}, // GMT+5:00 Calcutta; Chennai; Mumbai; New Delhi; Ekaterinburg
+ {200, L"Sri Lanka Standard Time"}, // GMT+5:30 Sri Jayawardenepura
+ {201, L"N. Central Asia Standard Time"}, // GMT+6:00 Astana; Dhaka; Almaty; Novosibirsk
+ {203, L"Myanmar Standard Time"}, // GMT+6:30 Rangoon
+ {207, L"North Asia Standard Time"}, // GMT+7:00 Bankok; Hanoi; Jakarta; Krasnoyarsk
+ {-1, L""}, // GMT+7:30
+ {210, L"China Standard Time"}, // GMT+8:00 Perth; Taipei; Singapore; Hong Kong; Beijing
+ {-1, L""}, // GMT+8:30
+ {235, L"Tokyo Standard Time"}, // GMT+9:00 Tokyo; Osaka; Seoul; Sapporo; Yakutsk
+ {245, L"AUS Central Standard Time"}, // GMT+9:30 Darwin; Adelaide
+ {270, L"Vladivostok Standard Time"}, // GMT+10:00 East Australia; Guam; Vladivostok
+ {-1, L""}, // GMT+10:30
+ {280, L"Central Pacific Standard Time"}, // GMT+11:00 Magadan; Solomon Is.; New Caledonia
+ {-1, L""}, // GMT+11:30
+ {290, L"New Zealand Standard Time"}, // GMT+12:00 Auckland; Wellington; Fiji; Kamchatka; Marshall Is.
+ {-1, L""}
};
return (MirTz >= -24 && MirTz <= 24) ? TzMap[24 - MirTz] : TzMap[49] ;
}
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index 88b93ea931..0ab768ffd4 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -199,7 +199,7 @@ MCONTACT getContactFromString(const TCHAR *tszContact, DWORD dwFlags, int nMatch for (hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// <_HANDLE_:hContact>
- tmp.Format(_T("<%s:%d>"), _T(PROTOID_HANDLE), hContact);
+ tmp.Format(L"<%s:%d>", _T(PROTOID_HANDLE), hContact);
bool bMatch = (tmp == tszContact);
char *szProto = GetContactProto(hContact);
@@ -210,7 +210,7 @@ MCONTACT getContactFromString(const TCHAR *tszContact, DWORD dwFlags, int nMatch if ((dwFlags & CI_PROTOID) && !bMatch) {
ptrT cInfo(getContactInfoT(CNF_UNIQUEID, hContact));
if (cInfo) {
- tmp.Format(_T("<%S:%s>"), szProto, cInfo);
+ tmp.Format(L"<%S:%s>", szProto, cInfo);
if (tmp == tszContact)
bMatch = true;
}
@@ -368,6 +368,6 @@ TCHAR* encodeContactToString(MCONTACT hContact) size_t size = mir_tstrlen(tszUniqueId) + mir_strlen(szProto) + 4;
TCHAR *tszResult = (TCHAR *)mir_calloc(size * sizeof(TCHAR));
if (tszResult)
- mir_sntprintf(tszResult, size, _T("<%S:%s>"), szProto, tszUniqueId);
+ mir_sntprintf(tszResult, size, L"<%S:%s>", szProto, tszUniqueId);
return tszResult;
}
diff --git a/plugins/Variables/src/contact.h b/plugins/Variables/src/contact.h index 3eacabbbee..55e292677c 100644 --- a/plugins/Variables/src/contact.h +++ b/plugins/Variables/src/contact.h @@ -17,52 +17,52 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define STR_FIRSTNAME _T("first")
-#define STR_LASTNAME _T("last")
-#define STR_NICK _T("nick")
-#define STR_CUSTOMNICK _T("cnick")
-#define STR_EMAIL _T("email")
-#define STR_CITY _T("city")
-#define STR_STATE _T("state")
-#define STR_COUNTRY _T("country")
-#define STR_PHONE _T("phone")
-#define STR_HOMEPAGE _T("homepage")
-#define STR_ABOUT _T("about")
-#define STR_GENDER _T("gender")
-#define STR_AGE _T("age")
-#define STR_FIRSTLAST _T("firstlast")
-#define STR_UNIQUEID _T("id")
-#define STR_DISPLAY _T("display")
+#define STR_FIRSTNAME L"first"
+#define STR_LASTNAME L"last"
+#define STR_NICK L"nick"
+#define STR_CUSTOMNICK L"cnick"
+#define STR_EMAIL L"email"
+#define STR_CITY L"city"
+#define STR_STATE L"state"
+#define STR_COUNTRY L"country"
+#define STR_PHONE L"phone"
+#define STR_HOMEPAGE L"homepage"
+#define STR_ABOUT L"about"
+#define STR_GENDER L"gender"
+#define STR_AGE L"age"
+#define STR_FIRSTLAST L"firstlast"
+#define STR_UNIQUEID L"id"
+#define STR_DISPLAY L"display"
-#define STR_FAX _T("fax")
-#define STR_CELLULAR _T("cellular")
-#define STR_TIMEZONE _T("timezone")
-#define STR_MYNOTES _T("mynotes")
-#define STR_BIRTHDAY _T("bday")
-#define STR_BIRTHMONTH _T("bmonth")
-#define STR_BIRTHYEAR _T("byear")
-#define STR_STREET _T("street")
-#define STR_ZIP _T("zip")
-#define STR_LANGUAGE1 _T("lang1")
-#define STR_LANGUAGE2 _T("lang2")
-#define STR_LANGUAGE3 _T("lang3")
-#define STR_CONAME _T("coname")
-#define STR_CODEPT _T("codept")
-#define STR_COPOSITION _T("copos")
-#define STR_COSTREET _T("costreet")
-#define STR_COCITY _T("cocity")
-#define STR_COSTATE _T("costate")
-#define STR_COZIP _T("cozip")
-#define STR_COCOUNTRY _T("cocountry")
-#define STR_COHOMEPAGE _T("cohomepage")
+#define STR_FAX L"fax"
+#define STR_CELLULAR L"cellular"
+#define STR_TIMEZONE L"timezone"
+#define STR_MYNOTES L"mynotes"
+#define STR_BIRTHDAY L"bday"
+#define STR_BIRTHMONTH L"bmonth"
+#define STR_BIRTHYEAR L"byear"
+#define STR_STREET L"street"
+#define STR_ZIP L"zip"
+#define STR_LANGUAGE1 L"lang1"
+#define STR_LANGUAGE2 L"lang2"
+#define STR_LANGUAGE3 L"lang3"
+#define STR_CONAME L"coname"
+#define STR_CODEPT L"codept"
+#define STR_COPOSITION L"copos"
+#define STR_COSTREET L"costreet"
+#define STR_COCITY L"cocity"
+#define STR_COSTATE L"costate"
+#define STR_COZIP L"cozip"
+#define STR_COCOUNTRY L"cocountry"
+#define STR_COHOMEPAGE L"cohomepage"
-#define STR_ACCOUNT _T("account")
-#define STR_PROTOCOL _T("protocol")
-#define STR_STATUS _T("status")
-#define STR_INTERNALIP _T("intip")
-#define STR_EXTERNALIP _T("extip")
-#define STR_GROUP _T("group")
-#define STR_PROTOID _T("protoid")
+#define STR_ACCOUNT L"account"
+#define STR_PROTOCOL L"protocol"
+#define STR_STATUS L"status"
+#define STR_INTERNALIP L"intip"
+#define STR_EXTERNALIP L"extip"
+#define STR_GROUP L"group"
+#define STR_PROTOID L"protoid"
#define CCNF_ACCOUNT 51 // CUSTOM, returns contact's account name (0.8.0+)
#define CCNF_PROTOCOL 50 // CUSTOM, returns the contact's protocol (human-readable)
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 1adaed553a..842695deb3 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -302,12 +302,12 @@ static TCHAR *getTokenDescription(TOKENREGISTEREX *tr) } if (tr->flags&TRF_FIELD) - mir_sntprintf(desc, len, _T("%c%s%c"), FIELD_CHAR, tr->szTokenString, FIELD_CHAR); + mir_sntprintf(desc, len, L"%c%s%c", FIELD_CHAR, tr->szTokenString, FIELD_CHAR); else { if (args != NULL) tArgs = mir_a2t(args); - mir_sntprintf(desc, len, _T("%c%s%s"), FUNC_CHAR, tr->tszTokenString, (tArgs!=NULL?tArgs:_T(""))); + mir_sntprintf(desc, len, L"%c%s%s", FUNC_CHAR, tr->tszTokenString, (tArgs!=NULL?tArgs:L"")); } mir_free(tArgs); @@ -400,7 +400,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA tszHelpDesc = getHelpDescription(tr); if (tszHelpDesc == NULL) - tszHelpDesc = mir_tstrdup(_T("unknown")); + tszHelpDesc = mir_tstrdup(L"unknown"); lvItem.iSubItem = 1; lvItem.pszText = TranslateTS(tszHelpDesc); @@ -434,7 +434,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA if (last != NULL) { mir_free(last); lvItem.iSubItem = 0; - lvItem.pszText = _T(""); + lvItem.pszText = L""; ListView_InsertItem(hList, &lvItem); } last = text; @@ -470,7 +470,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM, LPA break; memset(tokenString, 0, ((len + 1) * sizeof(TCHAR))); - mir_sntprintf(tokenString, len + 1, _T("%c%s%c"), (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '('); + mir_sntprintf(tokenString, len + 1, L"%c%s%c", (tr->flags & TRF_FIELD) ? FIELD_CHAR : FUNC_CHAR, tr->tszTokenString, (tr->flags & TRF_FIELD) ? FIELD_CHAR : '('); SendDlgItemMessage(hwndInputDlg, IDC_TESTSTRING, EM_REPLACESEL, TRUE, (LPARAM)tokenString); mir_free(tokenString); SetFocus(GetDlgItem(hwndInputDlg, IDC_TESTSTRING)); diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index f6f217dcbb..9a29840a18 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -162,7 +162,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) mir_tstrcat(szArgs, argv[i]);
if (i != argv.getCount() - 1)
- mir_tstrcat(szArgs, _T(","));
+ mir_tstrcat(szArgs, L",");
}
int res;
if (szArgs != NULL && argv.getCount() > 0) {
@@ -184,7 +184,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) mir_free(szArgs);
mir_free(szHelp);
argv.destroy();
- return (res == 0) ? mir_tstrdup(_T("")) : NULL;
+ return (res == 0) ? mir_tstrdup(L"") : NULL;
}
void registerAliasTokens()
diff --git a/plugins/Variables/src/parse_alias.h b/plugins/Variables/src/parse_alias.h index 5e708b32be..5876367aad 100644 --- a/plugins/Variables/src/parse_alias.h +++ b/plugins/Variables/src/parse_alias.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ADDALIAS _T("alias")
+#define ADDALIAS L"alias"
int isValidTokenChar(TCHAR tc);
diff --git a/plugins/Variables/src/parse_external.cpp b/plugins/Variables/src/parse_external.cpp index 19a0a6de61..4dca2905f2 100644 --- a/plugins/Variables/src/parse_external.cpp +++ b/plugins/Variables/src/parse_external.cpp @@ -21,9 +21,9 @@ static TCHAR *getFullWinampTitleText()
{
- HWND hwndWinamp = FindWindow(_T("STUDIO"), NULL);
+ HWND hwndWinamp = FindWindow(L"STUDIO", NULL);
if (hwndWinamp == NULL)
- hwndWinamp = FindWindow(_T("Winamp v1.x"), NULL);
+ hwndWinamp = FindWindow(L"Winamp v1.x", NULL);
if (hwndWinamp == NULL)
return NULL;
@@ -61,7 +61,7 @@ static TCHAR *parseWinampSong(ARGUMENTSINFO *ai) TCHAR *scur = _tcschr(szTitle, '.');
TCHAR *cur;
- if ((scur == NULL) || ((cur = _tcsstr(scur, _T(" - Winamp"))) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
+ if ((scur == NULL) || ((cur = _tcsstr(scur, L" - Winamp")) == NULL) || (scur >= cur) || (scur > (szTitle + mir_tstrlen(szTitle) - 2)) || (cur > (szTitle + mir_tstrlen(szTitle)))) {
mir_free(szTitle);
return NULL;
}
@@ -87,14 +87,14 @@ static TCHAR *parseWinampState(ARGUMENTSINFO *ai) TCHAR *scur = _tcschr(szTitle, '.');
TCHAR *cur;
- if (scur == NULL || (cur = _tcsstr(scur, _T(" - Winamp"))) == NULL)
+ if (scur == NULL || (cur = _tcsstr(scur, L" - Winamp")) == NULL)
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, _T("[Stopped]"), 9)))
+ else if ((!_tcsncmp(cur + 10, L"[Stopped]", 9)))
res = mir_tstrdup(TranslateT("Stopped"));
- else if ((!_tcsncmp(cur + 10, _T("[Paused]"), 8)))
+ else if ((!_tcsncmp(cur + 10, L"[Paused]", 8)))
res = mir_tstrdup(TranslateT("Paused"));
else
- res = mir_tstrdup(_T("Playing"));
+ res = mir_tstrdup(L"Playing");
mir_free(szTitle);
return res;
}
diff --git a/plugins/Variables/src/parse_external.h b/plugins/Variables/src/parse_external.h index 53b8673555..2aa33f3bbd 100644 --- a/plugins/Variables/src/parse_external.h +++ b/plugins/Variables/src/parse_external.h @@ -17,6 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define WINAMPSONG _T("winampsong")
-#define WINAMPSTATE _T("winampstate")
+#define WINAMPSONG L"winampsong"
+#define WINAMPSTATE L"winampstate"
#define DEF_WINAMPTITLE "Winamp3"
diff --git a/plugins/Variables/src/parse_inet.h b/plugins/Variables/src/parse_inet.h index 53c39a7152..f3c4b46175 100644 --- a/plugins/Variables/src/parse_inet.h +++ b/plugins/Variables/src/parse_inet.h @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define URLENC _T("urlenc")
-#define URLDEC _T("urldec")
-#define NTOA _T("ntoa")
-#define HTOA _T("htoa")
+#define URLENC L"urlenc"
+#define URLDEC L"urldec"
+#define NTOA L"ntoa"
+#define HTOA L"htoa"
diff --git a/plugins/Variables/src/parse_logic.cpp b/plugins/Variables/src/parse_logic.cpp index 08bdfa9c6c..c06d8445a9 100644 --- a/plugins/Variables/src/parse_logic.cpp +++ b/plugins/Variables/src/parse_logic.cpp @@ -32,11 +32,11 @@ static TCHAR *parseAnd(ARGUMENTSINFO *ai) if (fi.eCount > 0) {
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseFalse(ARGUMENTSINFO *ai)
@@ -45,7 +45,7 @@ static TCHAR *parseFalse(ARGUMENTSINFO *ai) return NULL;
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseIf(ARGUMENTSINFO *ai)
@@ -166,7 +166,7 @@ static TCHAR *parseFor(ARGUMENTSINFO *ai) if (ai->argc != 5)
return NULL;
- TCHAR *res = mir_tstrdup(_T(""));
+ TCHAR *res = mir_tstrdup(L"");
FORMATINFO fi;
memcpy(&fi, ai->fi, sizeof(fi));
@@ -209,7 +209,7 @@ static TCHAR *parseEqual(ARGUMENTSINFO *ai) if (ttoi(ai->targv[1]) != ttoi(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseGreater(ARGUMENTSINFO *ai)
@@ -220,7 +220,7 @@ static TCHAR *parseGreater(ARGUMENTSINFO *ai) if (ttoi(ai->targv[1]) <= ttoi(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseLonger(ARGUMENTSINFO *ai)
@@ -231,7 +231,7 @@ static TCHAR *parseLonger(ARGUMENTSINFO *ai) if (mir_tstrlen(ai->targv[1]) <= mir_tstrlen(ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseNot(ARGUMENTSINFO *ai)
@@ -248,7 +248,7 @@ static TCHAR *parseNot(ARGUMENTSINFO *ai) if (fi.eCount == 0)
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseOr(ARGUMENTSINFO *ai)
@@ -268,12 +268,12 @@ static TCHAR *parseOr(ARGUMENTSINFO *ai) ai->flags &= ~AIF_FALSE;
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseTrue(ARGUMENTSINFO *ai)
{
- return (ai->argc != 1) ? NULL : mir_tstrdup(_T(""));
+ return (ai->argc != 1) ? NULL : mir_tstrdup(L"");
}
static TCHAR *parseXor(ARGUMENTSINFO *ai)
@@ -293,7 +293,7 @@ static TCHAR *parseXor(ARGUMENTSINFO *ai) int val2 = fi.eCount == 0;
ai->flags |= ((val1 & AIF_FALSE) == !(val2 & AIF_FALSE)) ? 0 : AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerLogicTokens()
diff --git a/plugins/Variables/src/parse_logic.h b/plugins/Variables/src/parse_logic.h index 084c28e03a..6d6803ee7f 100644 --- a/plugins/Variables/src/parse_logic.h +++ b/plugins/Variables/src/parse_logic.h @@ -17,19 +17,19 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define AND _T("and")
-#define STR_FALSE _T("false")
-#define FOR _T("for")
-#define EQUAL _T("equal")
-#define GREATER _T("greater")
-#define IF _T("if")
-#define IF2 _T("if2")
-#define IF3 _T("if3")
-#define IFEQUAL _T("ifequal")
-#define IFGREATER _T("ifgreater")
-#define IFLONGER _T("iflonger")
-#define LONGER _T("longer")
-#define NOT _T("not")
-#define OR _T("or")
-#define STR_TRUE _T("true")
-#define XOR _T("xor")
+#define AND L"and"
+#define STR_FALSE L"false"
+#define FOR L"for"
+#define EQUAL L"equal"
+#define GREATER L"greater"
+#define IF L"if"
+#define IF2 L"if2"
+#define IF3 L"if3"
+#define IFEQUAL L"ifequal"
+#define IFGREATER L"ifgreater"
+#define IFLONGER L"iflonger"
+#define LONGER L"longer"
+#define NOT L"not"
+#define OR L"or"
+#define STR_TRUE L"true"
+#define XOR L"xor"
diff --git a/plugins/Variables/src/parse_math.cpp b/plugins/Variables/src/parse_math.cpp index d71296a93d..0e65e29da2 100644 --- a/plugins/Variables/src/parse_math.cpp +++ b/plugins/Variables/src/parse_math.cpp @@ -54,14 +54,14 @@ static TCHAR *parseHex(ARGUMENTSINFO *ai) int val = ttoi(ai->targv[1]);
int padding = ttoi(ai->targv[2]);
- mir_sntprintf(szVal, _T("%x"), val);
+ mir_sntprintf(szVal, L"%x", val);
unsigned int zeros = max(padding - (signed int)mir_tstrlen(szVal), 0);
TCHAR *res = (TCHAR*)mir_alloc((zeros + mir_tstrlen(szVal) + 3)*sizeof(TCHAR));
if (res == NULL)
return NULL;
memset(res, 0, ((zeros + mir_tstrlen(szVal) + 3) * sizeof(TCHAR)));
- mir_tstrcpy(res, _T("0x"));
+ mir_tstrcpy(res, L"0x");
for (i = 0; i < zeros; i++)
*(res + 2 + i) = '0';
diff --git a/plugins/Variables/src/parse_math.h b/plugins/Variables/src/parse_math.h index 36d3c3e04c..300e3604eb 100644 --- a/plugins/Variables/src/parse_math.h +++ b/plugins/Variables/src/parse_math.h @@ -17,14 +17,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define ADD _T("add")
-#define DIV _T("div")
-#define HEX _T("hex")
-#define MOD _T("mod")
-#define MUL _T("mul")
-#define MULDIV _T("muldiv")
-#define MIN _T("min")
-#define MAX _T("max")
-#define NUM _T("num")
-#define RAND _T("rand")
-#define SUB _T("sub")
+#define ADD L"add"
+#define DIV L"div"
+#define HEX L"hex"
+#define MOD L"mod"
+#define MUL L"mul"
+#define MULDIV L"muldiv"
+#define MIN L"min"
+#define MAX L"max"
+#define NUM L"num"
+#define RAND L"rand"
+#define SUB L"sub"
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp index 5e9c6a4db4..71ab1c08a6 100644 --- a/plugins/Variables/src/parse_metacontacts.cpp +++ b/plugins/Variables/src/parse_metacontacts.cpp @@ -40,11 +40,11 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai) if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static TCHAR *parseGetDefault(ARGUMENTSINFO *ai)
@@ -68,11 +68,11 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai) if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai)
@@ -96,11 +96,11 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai) if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
TCHAR tszID[40];
- mir_sntprintf(tszID, _T("%p"), hContact);
+ mir_sntprintf(tszID, L"%p", hContact);
szUniqueID = mir_tstrdup(tszID);
}
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
void registerMetaContactsTokens()
diff --git a/plugins/Variables/src/parse_metacontacts.h b/plugins/Variables/src/parse_metacontacts.h index 08b419d4d7..21ddd6bbeb 100644 --- a/plugins/Variables/src/parse_metacontacts.h +++ b/plugins/Variables/src/parse_metacontacts.h @@ -17,6 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define MC_GETPARENT _T("mc_getparent")
-#define MC_GETDEFAULT _T("mc_getdefault")
-#define MC_GETMOSTONLINE _T("mc_getmostonline")
+#define MC_GETPARENT L"mc_getparent"
+#define MC_GETDEFAULT L"mc_getdefault"
+#define MC_GETMOSTONLINE L"mc_getmostonline"
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 42a9762bd4..088fb00497 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -389,13 +389,13 @@ static TCHAR* parseSpecialContact(ARGUMENTSINFO *ai) szUniqueID = (TCHAR*)mir_alloc(40);
if (szUniqueID == NULL)
return NULL;
- mir_sntprintf(szUniqueID, 20, _T("%p"), ai->fi->hContact);
+ mir_sntprintf(szUniqueID, 20, L"%p", ai->fi->hContact);
}
if (szUniqueID == NULL)
return NULL;
- return CMString(FORMAT, _T("<%S:%s>"), szProto, szUniqueID).Detach();
+ return CMString(FORMAT, L"<%S:%s>", szProto, szUniqueID).Detach();
}
static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags)
@@ -624,7 +624,7 @@ static TCHAR *parseMirDateString(ARGUMENTSINFO *ai) ai->flags |= AIF_DONTPARSE;
TCHAR ret[128];
- return mir_tstrdup(TimeZone_ToStringT(time(NULL), _T("d s"), ret, _countof(ret)));
+ return mir_tstrdup(TimeZone_ToStringT(time(NULL), L"d s", ret, _countof(ret)));
}
static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai)
@@ -635,7 +635,7 @@ static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai) ai->flags |= AIF_DONTPARSE;
TCHAR corevar[MAX_PATH];
- mir_sntprintf(corevar, _T("%%%s%%"), ai->targv[0]);
+ mir_sntprintf(corevar, L"%%%s%%", ai->targv[0]);
return Utils_ReplaceVarsT(corevar);
}
@@ -647,24 +647,24 @@ static TCHAR *parseMirSrvExists(ARGUMENTSINFO *ai) if (!ServiceExists(_T2A(ai->targv[1])))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerMirandaTokens()
{
// global vars
- registerIntToken(_T("miranda_path"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to Miranda root folder"));
- registerIntToken(_T("miranda_profilesdir"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to folder containing Miranda profiles"));
- registerIntToken(_T("miranda_profilename"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("name of current Miranda profile (filename, without extension)"));
- registerIntToken(_T("miranda_userdata"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"));
- registerIntToken(_T("miranda_avatarcache"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\AvatarCache"));
- registerIntToken(_T("miranda_logpath"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\Logs"));
+ registerIntToken(L"miranda_path", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to Miranda root folder"));
+ registerIntToken(L"miranda_profilesdir", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("path to folder containing Miranda profiles"));
+ registerIntToken(L"miranda_profilename", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("name of current Miranda profile (filename, without extension)"));
+ registerIntToken(L"miranda_userdata", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%"));
+ registerIntToken(L"miranda_avatarcache", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\AvatarCache"));
+ registerIntToken(L"miranda_logpath", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core Global") "\t" LPGEN("will return parsed string %miranda_profilesdir%\\%miranda_profilename%\\Logs"));
// OS vars
- registerIntToken(_T("appdata"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("same as environment variable %APPDATA% for currently logged-on Windows user"));
- registerIntToken(_T("username"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("username for currently logged-on Windows user"));
- registerIntToken(_T("mydocuments"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"My Documents\" folder for currently logged-on Windows user"));
- registerIntToken(_T("desktop"), parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"Desktop\" folder for currently logged-on Windows user"));
+ registerIntToken(L"appdata", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("same as environment variable %APPDATA% for currently logged-on Windows user"));
+ registerIntToken(L"username", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("username for currently logged-on Windows user"));
+ registerIntToken(L"mydocuments", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"My Documents\" folder for currently logged-on Windows user"));
+ registerIntToken(L"desktop", parseMirandaCoreVar, TRF_FIELD, LPGEN("Miranda Core OS") "\t" LPGEN("\"Desktop\" folder for currently logged-on Windows user"));
registerIntToken(CODETOSTATUS, parseCodeToStatus, TRF_FUNCTION, LPGEN("Miranda Related") "\t(x)\t" LPGEN("translates status code x into a status description"));
registerIntToken(CONTACT, parseContact, TRF_FUNCTION, LPGEN("Miranda Related") "\t(x,y,z)\t" LPGEN("zth contact with property y described by x, example: (unregistered,nick) (z is optional)"));
diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h index 851b3963df..b5096cb4f0 100644 --- a/plugins/Variables/src/parse_miranda.h +++ b/plugins/Variables/src/parse_miranda.h @@ -17,27 +17,27 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define VERSIONSTRING _T("mirandaversion")
-#define CODETOSTATUS _T("code2status")
-#define CONTACT _T("contact")
-#define CONTACTCOUNT _T("ccount")
-#define MIR_CONTACTINFO _T("cinfo")
-#define DBPROFILENAME _T("dbprofile")
-#define DBPROFILEPATH _T("dbprofilepath")
-#define DBSETTING _T("dbsetting")
-#define LSDATE _T("lsdate")
-#define LSTIME _T("lstime")
-#define LSSTATUS _T("lsstatus")
+#define VERSIONSTRING L"mirandaversion"
+#define CODETOSTATUS L"code2status"
+#define CONTACT L"contact"
+#define CONTACTCOUNT L"ccount"
+#define MIR_CONTACTINFO L"cinfo"
+#define DBPROFILENAME L"dbprofile"
+#define DBPROFILEPATH L"dbprofilepath"
+#define DBSETTING L"dbsetting"
+#define LSDATE L"lsdate"
+#define LSTIME L"lstime"
+#define LSSTATUS L"lsstatus"
//#define SUBJECT "subject" // defined in variables.h
-#define MIRANDAPATH _T("mirandapath")
-#define MYSTATUS _T("mstatus")
-#define DBEVENT _T("message") // may be extended later
+#define MIRANDAPATH L"mirandapath"
+#define MYSTATUS L"mstatus"
+#define DBEVENT L"message" // may be extended later
//#define PROTONAME "protoname" // depreciated
-#define PROTOINFO _T("pinfo")
-#define TRANSLATE _T("translate")
-#define CONTACT_NAME _T("contactname")
-#define MIR_DATE _T("date")
-#define SRVEXISTS _T("srvexists")
+#define PROTOINFO L"pinfo"
+#define TRANSLATE L"translate"
+#define CONTACT_NAME L"contactname"
+#define MIR_DATE L"date"
+#define SRVEXISTS L"srvexists"
#define STR_PINAME "name"
#define STR_PIUIDTEXT "uidtext"
@@ -46,13 +46,13 @@ #define SEEN_MODULE "SeenModule"
-#define STR_PROTOID _T("protoid")
-#define STR_FIRST _T("first")
-#define STR_LAST _T("last")
-#define STR_SENT _T("sent")
-#define STR_RCVD _T("recv")
-#define STR_READ _T("read")
-#define STR_UNREAD _T("unread")
+#define STR_PROTOID L"protoid"
+#define STR_FIRST L"first"
+#define STR_LAST L"last"
+#define STR_SENT L"sent"
+#define STR_RCVD L"recv"
+#define STR_READ L"read"
+#define STR_UNREAD L"unread"
/* dbevent flags */
/* these flags must contain:
diff --git a/plugins/Variables/src/parse_regexp.cpp b/plugins/Variables/src/parse_regexp.cpp index fb5366329b..f3e968ddb2 100644 --- a/plugins/Variables/src/parse_regexp.cpp +++ b/plugins/Variables/src/parse_regexp.cpp @@ -46,7 +46,7 @@ static TCHAR *parseRegExpCheck(ARGUMENTSINFO *ai) return mir_a2t(szVal);
}
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
}
/*
@@ -84,7 +84,7 @@ static TCHAR *parseRegExpSubstr(ARGUMENTSINFO *ai) return tres;
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
void registerRegExpTokens()
diff --git a/plugins/Variables/src/parse_regexp.h b/plugins/Variables/src/parse_regexp.h index f5eb289844..6d058e646a 100644 --- a/plugins/Variables/src/parse_regexp.h +++ b/plugins/Variables/src/parse_regexp.h @@ -17,5 +17,5 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define REGEXPCHECK _T("regexp_check")
-#define REGEXPSUBSTR _T("regexp_substr")
+#define REGEXPCHECK L"regexp_check"
+#define REGEXPSUBSTR L"regexp_substr"
diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 27e6d324f1..23a18acc7e 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -67,7 +67,7 @@ static TCHAR *parseCaps2(ARGUMENTSINFO *ai) static TCHAR *parseCrlf(ARGUMENTSINFO *ai)
{
ai->flags |= AIF_DONTPARSE;
- return mir_tstrdup(_T("\r\n"));
+ return mir_tstrdup(L"\r\n");
}
static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai)
@@ -87,7 +87,7 @@ static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai) res = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + 2)*sizeof(TCHAR));
cur = res + loc;
memmove(cur + 2, cur + 1, (mir_tstrlen(cur + 1) + 1)*sizeof(TCHAR));
- memcpy(cur, _T("\r\n"), 2 * sizeof(TCHAR));
+ memcpy(cur, L"\r\n", 2 * sizeof(TCHAR));
cur += 2;
}
while (cur != NULL);
@@ -99,14 +99,14 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai) {
TCHAR *szReplacement;
if (ai->argc == 2)
- szReplacement = _T("(...)");
+ szReplacement = L"(...)";
else if (ai->argc == 3)
szReplacement = ai->targv[2];
else
return NULL;
TCHAR *cur = ai->targv[1];
- while (mir_tstrcmp(cur, _T("\r\n")) && *cur != '\n' && *cur != 0)
+ while (mir_tstrcmp(cur, L"\r\n") && *cur != '\n' && *cur != 0)
cur++;
if (*cur == '\0')
@@ -127,7 +127,7 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai) {
TCHAR *szReplacement;
switch (ai->argc) {
- case 2: szReplacement = _T(" "); break;
+ case 2: szReplacement = L" "; break;
case 3: szReplacement = ai->targv[2]; break;
default: return NULL;
}
@@ -136,11 +136,11 @@ static TCHAR *parseFixeol2(ARGUMENTSINFO *ai) for (size_t pos = 0; pos < mir_tstrlen(res); pos++) {
TCHAR *cur = res + pos;
TCHAR *szEol = NULL;
- if (!_tcsncmp(cur, _T("\r\n"), mir_tstrlen(_T("\r\n"))))
- szEol = _T("\r\n");
+ if (!_tcsncmp(cur, L"\r\n", mir_tstrlen(L"\r\n")))
+ szEol = L"\r\n";
if (*cur == '\n')
- szEol = _T("\n");
+ szEol = L"\n";
if (szEol != NULL) {
if (mir_tstrlen(szReplacement) > mir_tstrlen(szEol)) {
@@ -210,7 +210,7 @@ static TCHAR *parseLineCount(ARGUMENTSINFO *ai) int count = 1;
TCHAR *cur = ai->targv[1];
while (cur < (ai->targv[1] + mir_tstrlen(ai->targv[1]))) {
- if (!_tcsncmp(cur, _T("\r\n"), 2)) {
+ if (!_tcsncmp(cur, L"\r\n", 2)) {
count++;
cur++;
}
@@ -490,7 +490,7 @@ static TCHAR *parseStrchr(ARGUMENTSINFO *ai) memset(szVal, 0, sizeof(szVal));
TCHAR *c = _tcschr(ai->targv[1], *ai->targv[2]);
if (c == NULL || *c == 0)
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -503,7 +503,7 @@ static TCHAR *parseStrcmp(ARGUMENTSINFO *ai) if (mir_tstrcmp(ai->targv[1], ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrmcmp(ARGUMENTSINFO *ai)
@@ -519,7 +519,7 @@ static TCHAR *parseStrmcmp(ARGUMENTSINFO *ai) }
}
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrncmp(ARGUMENTSINFO *ai)
@@ -534,7 +534,7 @@ static TCHAR *parseStrncmp(ARGUMENTSINFO *ai) if (_tcsncmp(ai->targv[1], ai->targv[2], n))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStricmp(ARGUMENTSINFO *ai)
@@ -545,7 +545,7 @@ static TCHAR *parseStricmp(ARGUMENTSINFO *ai) if (mir_tstrcmpi(ai->targv[1], ai->targv[2]))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrnicmp(ARGUMENTSINFO *ai)
@@ -560,7 +560,7 @@ static TCHAR *parseStrnicmp(ARGUMENTSINFO *ai) if (_tcsnicmp(ai->targv[1], ai->targv[2], n))
ai->flags |= AIF_FALSE;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseStrrchr(ARGUMENTSINFO *ai)
@@ -570,7 +570,7 @@ static TCHAR *parseStrrchr(ARGUMENTSINFO *ai) TCHAR *c = _tcsrchr(ai->targv[1], *ai->targv[2]);
if ((c == NULL) || (*c == 0))
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -582,7 +582,7 @@ static TCHAR *parseStrstr(ARGUMENTSINFO *ai) TCHAR *c = _tcsstr(ai->targv[1], ai->targv[2]);
if ((c == NULL) || (*c == 0))
- return mir_tstrdup(_T("0"));
+ return mir_tstrdup(L"0");
return itot(c - ai->targv[1] + 1);
}
@@ -645,7 +645,7 @@ static TCHAR *parseTrim(ARGUMENTSINFO *ai) ecur--;
if (scur >= ecur)
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
TCHAR *res = (TCHAR*)mir_alloc((ecur - scur + 2)*sizeof(TCHAR));
if (res == NULL)
@@ -754,7 +754,7 @@ static TCHAR *parseWord(ARGUMENTSINFO *ai) TCHAR *pres = (TCHAR*)mir_realloc(res, (mir_tstrlen(res) + mir_tstrlen(szWord) + 2)*sizeof(TCHAR));
if (pres != NULL) {
res = pres;
- mir_tstrcat(res, _T(" "));
+ mir_tstrcat(res, L" ");
mir_tstrcat(res, szWord);
}
mir_free(szWord);
diff --git a/plugins/Variables/src/parse_str.h b/plugins/Variables/src/parse_str.h index cab3c017bc..3c7232a137 100644 --- a/plugins/Variables/src/parse_str.h +++ b/plugins/Variables/src/parse_str.h @@ -17,41 +17,41 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define MIR_CAPS _T("caps")
-#define MIR_CAPS2 _T("caps2")
-#define MIR_CRLF _T("crlf")
+#define MIR_CAPS L"caps"
+#define MIR_CAPS2 L"caps2"
+#define MIR_CRLF L"crlf"
//#define MIR_EXTRATEXT "extratext" // defined in variables.h
-#define MIR_EOL2CRLF _T("eol2crlf")
-#define MIR_FIXEOL _T("fix_eol")
-#define MIR_FIXEOL2 _T("fix_eol2")
-#define MIR_INSERT _T("insert")
-#define MIR_LEFT _T("left")
-#define MIR_LEN _T("len")
-#define MIR_LINECOUNT _T("linecount")
-#define MIR_LONGEST _T("longest")
-#define MIR_LOWER _T("lower")
-#define MIR_NOOP _T("noop")
-#define MIR_PAD _T("pad")
-#define MIR_PADRIGHT _T("pad_right")
-#define MIR_PADCUT _T("padcut")
-#define MIR_PADCUTRIGHT _T("padcut_right")
-#define MIR_REPEAT _T("repeat")
-#define MIR_REPLACE _T("replace")
-#define MIR_RIGHT _T("right")
-#define MIR_SCROLL _T("scroll")
-#define MIR_SHORTEST _T("shortest")
-#define MIR_STRCHR _T("strchr")
-#define MIR_STRRCHR _T("strrchr")
-#define MIR_STRSTR _T("strstr")
-#define MIR_STRCMP _T("strcmp")
-#define MIR_STRNCMP _T("strncmp")
-#define MIR_STRMCMP _T("strmcmp")
-#define MIR_STRICMP _T("stricmp")
-#define MIR_STRNICMP _T("strnicmp")
-#define MIR_SUBSTR _T("substr")
-#define MIR_SELECT _T("select")
-#define MIR_SWITCH _T("switch")
-#define MIR_TRIM _T("trim")
-#define MIR_TAB _T("tab")
-#define MIR_UPPER _T("upper")
-#define MIR_WORD _T("word")
+#define MIR_EOL2CRLF L"eol2crlf"
+#define MIR_FIXEOL L"fix_eol"
+#define MIR_FIXEOL2 L"fix_eol2"
+#define MIR_INSERT L"insert"
+#define MIR_LEFT L"left"
+#define MIR_LEN L"len"
+#define MIR_LINECOUNT L"linecount"
+#define MIR_LONGEST L"longest"
+#define MIR_LOWER L"lower"
+#define MIR_NOOP L"noop"
+#define MIR_PAD L"pad"
+#define MIR_PADRIGHT L"pad_right"
+#define MIR_PADCUT L"padcut"
+#define MIR_PADCUTRIGHT L"padcut_right"
+#define MIR_REPEAT L"repeat"
+#define MIR_REPLACE L"replace"
+#define MIR_RIGHT L"right"
+#define MIR_SCROLL L"scroll"
+#define MIR_SHORTEST L"shortest"
+#define MIR_STRCHR L"strchr"
+#define MIR_STRRCHR L"strrchr"
+#define MIR_STRSTR L"strstr"
+#define MIR_STRCMP L"strcmp"
+#define MIR_STRNCMP L"strncmp"
+#define MIR_STRMCMP L"strmcmp"
+#define MIR_STRICMP L"stricmp"
+#define MIR_STRNICMP L"strnicmp"
+#define MIR_SUBSTR L"substr"
+#define MIR_SELECT L"select"
+#define MIR_SWITCH L"switch"
+#define MIR_TRIM L"trim"
+#define MIR_TAB L"tab"
+#define MIR_UPPER L"upper"
+#define MIR_WORD L"word"
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 9e92647542..43695c7db0 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -52,14 +52,14 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai) return NULL;
if (mir_tstrlen(ai->targv[1]) == 0)
- szCounter = mir_tstrdup(_T("\\Processor(_Total)\\% Processor Time"));
+ szCounter = mir_tstrdup(L"\\Processor(_Total)\\% Processor Time");
else {
int size = (int)mir_tstrlen(ai->targv[1]) + 32;
szCounter = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (szCounter == NULL)
return NULL;
- mir_sntprintf(szCounter, size, _T("\\Process(%s)\\%% Processor Time"), ai->targv[1]);
+ mir_sntprintf(szCounter, size, L"\\Process(%s)\\%% Processor Time", ai->targv[1]);
}
PDH_STATUS pdhStatus = PdhValidatePath(szCounter);
if (pdhStatus != ERROR_SUCCESS) {
@@ -105,7 +105,7 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai) pdhStatus = PdhCloseQuery(hQuery);
return NULL;
}
- mir_sntprintf(szVal, _T("%.0f"), cValue.doubleValue);
+ mir_sntprintf(szVal, L"%.0f", cValue.doubleValue);
//PdhRemoveCounter(*hCounter);
PdhCloseQuery(hQuery);
mir_free(szCounter);
@@ -282,7 +282,7 @@ static TCHAR *parseDiffTime(ARGUMENTSINFO *ai) return NULL;
diff = difftime(mktime(&t1), mktime(&t0));
- mir_sntprintf(szTime, _T("%.0f"), diff);
+ mir_sntprintf(szTime, L"%.0f", diff);
return mir_tstrdup(szTime);
}
@@ -298,7 +298,7 @@ static TCHAR *parseDirExists(ARGUMENTSINFO *ai) else
CloseHandle(hFile);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseEnvironmentVariable(ARGUMENTSINFO *ai)
@@ -333,7 +333,7 @@ static TCHAR *parseFileExists(ARGUMENTSINFO *ai) else
CloseHandle(hFile);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseFindWindow(ARGUMENTSINFO *ai)
@@ -366,8 +366,8 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) TCHAR tszFirst[MAX_PATH], *tszRes, *tszSeperator, *tszFilter;
tszFirst[0] = 0;
- tszSeperator = _T("\r\n");
- tszFilter = _T("*");
+ tszSeperator = L"\r\n";
+ tszFilter = L"*";
tszRes = NULL;
if (ai->argc > 1)
@@ -389,7 +389,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) if (tszFirst[mir_tstrlen(tszFirst) - 1] == '\\')
mir_tstrncat(tszFirst, tszFilter, _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
else {
- mir_tstrncat(tszFirst, _T("\\"), _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
+ mir_tstrncat(tszFirst, L"\\", _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
mir_tstrncat(tszFirst, tszFilter, _countof(tszFirst) - mir_tstrlen(tszFirst) - 1);
}
@@ -410,7 +410,7 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) }
else {
tszRes = (TCHAR*)mir_alloc((mir_tstrlen(ffd.cFileName) + mir_tstrlen(tszSeperator) + 1)*sizeof(TCHAR));
- mir_tstrcpy(tszRes, _T(""));
+ mir_tstrcpy(tszRes, L"");
}
mir_tstrcat(tszRes, ffd.cFileName);
}
@@ -443,7 +443,7 @@ static TCHAR *parseProcessRunning(ARGUMENTSINFO *ai) ai->flags |= AIF_FALSE;
mir_free(ref);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
#endif
@@ -466,13 +466,13 @@ static TCHAR *parseRegistryValue(ARGUMENTSINFO *ai) *cur = 0;
HKEY hKey;
- if (!mir_tstrcmp(key, _T("HKEY_CLASSES_ROOT")))
+ if (!mir_tstrcmp(key, L"HKEY_CLASSES_ROOT"))
hKey = HKEY_CLASSES_ROOT;
- else if (!mir_tstrcmp(key, _T("HKEY_CURRENT_USER")))
+ else if (!mir_tstrcmp(key, L"HKEY_CURRENT_USER"))
hKey = HKEY_CURRENT_USER;
- else if (!mir_tstrcmp(key, _T("HKEY_LOCAL_MACHINE")))
+ else if (!mir_tstrcmp(key, L"HKEY_LOCAL_MACHINE"))
hKey = HKEY_LOCAL_MACHINE;
- else if (!mir_tstrcmp(key, _T("HKEY_USERS")))
+ else if (!mir_tstrcmp(key, L"HKEY_USERS"))
hKey = HKEY_USERS;
else {
mir_free(key);
@@ -659,7 +659,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) totalReadSz += readSz;
for (pCur = pBuf; *pCur != '\0'; pCur += csz) {
if (tUC) {
- if (!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) {
+ if (!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) {
lineCount++;
pCur += csz;
}
@@ -699,7 +699,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) linePos = (tUC ? csz : 0) + totalReadSz - readSz + pCur - pBuf;
if (tUC) {
- if (!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) {
+ if (!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) {
lineCount++;
pCur += csz;
}
@@ -738,7 +738,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) return NULL;
}
for (pCur = pBuf; (pCur < pBuf + readSz); pCur += csz) {
- if ((tUC) && ((!_tcsncmp((TCHAR*)pCur, _T("\r\n"), 2)) || (*(TCHAR*)pCur == '\n')) ||
+ if ((tUC) && ((!_tcsncmp((TCHAR*)pCur, L"\r\n", 2)) || (*(TCHAR*)pCur == '\n')) ||
((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n'))))) {
CloseHandle(hFile);
if (tUC)
@@ -798,7 +798,7 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai) return NULL;
HCOUNTER hCounter;
- pdhStatus = PdhAddCounter(hQuery, _T("\\System\\System Up Time"), 0, &hCounter);
+ pdhStatus = PdhAddCounter(hQuery, L"\\System\\System Up Time", 0, &hCounter);
if (pdhStatus != ERROR_SUCCESS) {
PdhCloseQuery(hQuery);
return NULL;
@@ -819,7 +819,7 @@ static TCHAR *parseUpTime(ARGUMENTSINFO *ai) }
TCHAR szVal[32];
- mir_sntprintf(szVal, _T("%u"), cValue.largeValue);
+ mir_sntprintf(szVal, L"%u", cValue.largeValue);
PdhRemoveCounter(hCounter);
PdhCloseQuery(hQuery);
return mir_tstrdup(szVal);
diff --git a/plugins/Variables/src/parse_system.h b/plugins/Variables/src/parse_system.h index 974d8b8cf6..b900f53488 100644 --- a/plugins/Variables/src/parse_system.h +++ b/plugins/Variables/src/parse_system.h @@ -17,26 +17,26 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COMPUTERNAME _T("computername")
-#define CPULOAD _T("cpuload")
-#define CDATE _T("cdate")
-#define CTIME _T("ctime")
-#define DIRECTORY _T("directory")
-#define DIRECTORY2 _T("directory2")
-#define DIFFTIME _T("difftime")
-#define DIREXISTS _T("direxists")
-#define ENVIRONMENTVARIABLE _T("env_var")
-#define FILEEXISTS _T("fileexists")
-#define FINDWINDOW _T("findwindow")
-#define LISTDIR _T("ls")
-#define PROCESSRUNNING _T("processrunning")
-#define REGISTRYVALUE _T("regvalue")
-#define TIMESTAMP2DATE _T("ts2date")
-#define TIMESTAMP2TIME _T("ts2time")
-#define TXTFILE _T("txtfile")
-#define UPTIME _T("uptime")
-#define USERNAME _T("username")
-#define CLIPBOARD _T("clipboard")
+#define COMPUTERNAME L"computername"
+#define CPULOAD L"cpuload"
+#define CDATE L"cdate"
+#define CTIME L"ctime"
+#define DIRECTORY L"directory"
+#define DIRECTORY2 L"directory2"
+#define DIFFTIME L"difftime"
+#define DIREXISTS L"direxists"
+#define ENVIRONMENTVARIABLE L"env_var"
+#define FILEEXISTS L"fileexists"
+#define FINDWINDOW L"findwindow"
+#define LISTDIR L"ls"
+#define PROCESSRUNNING L"processrunning"
+#define REGISTRYVALUE L"regvalue"
+#define TIMESTAMP2DATE L"ts2date"
+#define TIMESTAMP2TIME L"ts2time"
+#define TXTFILE L"txtfile"
+#define UPTIME L"uptime"
+#define USERNAME L"username"
+#define CLIPBOARD L"clipboard"
#define TXTFILEBUFSZ 4096
#define MAX_REGVALUE_LENGTH 1024
diff --git a/plugins/Variables/src/parse_variables.cpp b/plugins/Variables/src/parse_variables.cpp index d15e108817..bc19f44cfc 100644 --- a/plugins/Variables/src/parse_variables.cpp +++ b/plugins/Variables/src/parse_variables.cpp @@ -85,7 +85,7 @@ static TCHAR *parsePuts(ARGUMENTSINFO *ai) if (addToVariablesRegister(ai->targv[1], ai->targv[2]))
return NULL;
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
static TCHAR *parseGet(ARGUMENTSINFO *ai)
diff --git a/plugins/Variables/src/parse_variables.h b/plugins/Variables/src/parse_variables.h index ce22fd3618..b623f5a4c1 100644 --- a/plugins/Variables/src/parse_variables.h +++ b/plugins/Variables/src/parse_variables.h @@ -23,7 +23,7 @@ typedef struct { DWORD dwOwnerThread;
} VARIABLEREGISTER;
-#define PUT _T("put")
-#define PUTS _T("puts")
-#define GET _T("get")
+#define PUT L"put"
+#define PUTS L"puts"
+#define GET L"get"
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index 18d94c61ca..66570a7aa6 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -85,8 +85,8 @@ #define COMMENT_STRING "#"
// special tokens
-#define SUBJECT _T("subject")
-#define MIR_EXTRATEXT _T("extratext")
+#define SUBJECT L"subject"
+#define MIR_EXTRATEXT L"extratext"
#define VAR_HELP_TEXT LPGENT("--- Special characters ---\r\n\r\n\
The following characters have a special meaning in a formatting string:\r\n\r\n\
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp index 7cf2fb0300..b74465ce99 100644 --- a/plugins/Variables/src/tokenregister.cpp +++ b/plugins/Variables/src/tokenregister.cpp @@ -121,7 +121,7 @@ INT_PTR registerToken(WPARAM, LPARAM lParam) memcpy(&tre->tr, newVr, newVr->cbSize);
tre->nameHash = hash;
- if (!mir_tstrcmp(newVr->tszTokenString, _T("alias")))
+ if (!mir_tstrcmp(newVr->tszTokenString, L"alias"))
log_debugA("alias");
if (!(newVr->flags & TRF_PARSEFUNC) && newVr->szService != NULL)
diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 1111ddae0c..83c34b279a 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -78,7 +78,7 @@ TCHAR* getArguments(TCHAR *string, TArgList &argv) if (cur > scur) tszArg = mir_tstrndup(scur + 1, cur - (scur + 1)); if (tszArg == NULL) - tszArg = mir_tstrdup(_T("")); + tszArg = mir_tstrdup(L""); argv.insert(tszArg); bNewArg = false; @@ -145,7 +145,7 @@ static TCHAR* replaceDynVars(FORMATINFO *fi) continue; } // remove end of lines - else if ((!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL)) { + else if ((!_tcsncmp(cur, L"\r\n", 2)) && (gParseOpts.bStripEOL)) { memmove(cur, cur + 2, (mir_tstrlen(cur + 2) + 1)*sizeof(TCHAR)); pos = cur - string - 1; continue; @@ -158,7 +158,7 @@ static TCHAR* replaceDynVars(FORMATINFO *fi) // remove comments else if (!_tcsncmp(cur, _T(COMMENT_STRING), mir_tstrlen(_T(COMMENT_STRING)))) { TCHAR *scur = cur; - while (_tcsncmp(cur, _T("\r\n"), 2) && *cur != '\n' && *cur != 0) + while (_tcsncmp(cur, L"\r\n", 2) && *cur != '\n' && *cur != 0) cur++; if (*cur == 0) { diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp index d33cca945b..b93924c163 100755 --- a/plugins/Watrack_MPD/src/init.cpp +++ b/plugins/Watrack_MPD/src/init.cpp @@ -51,8 +51,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) void InitVars()
{
gbPort = db_get_w(NULL, szModuleName, "Port", 6600);
- gbHost = UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1"));
- gbPassword = UniGetContactSettingUtf(NULL, szModuleName, "Password", _T(""));
+ gbHost = UniGetContactSettingUtf(NULL, szModuleName, "Server", L"127.0.0.1");
+ gbPassword = UniGetContactSettingUtf(NULL, szModuleName, "Password", L"");
}
static int OnModulesLoaded(WPARAM, LPARAM)
diff --git a/plugins/Watrack_MPD/src/main.cpp b/plugins/Watrack_MPD/src/main.cpp index 7fac682f62..079718a0f9 100755 --- a/plugins/Watrack_MPD/src/main.cpp +++ b/plugins/Watrack_MPD/src/main.cpp @@ -137,7 +137,7 @@ int Parser() SongInfo.mfile = mir_utf8decodeT(tmp); } else - SongInfo.mfile = mir_tstrdup(_T("")); + SongInfo.mfile = mir_tstrdup(L""); if(ptr = strstr(buf, "Time:")) { ptr = &ptr[6]; @@ -167,7 +167,7 @@ int Parser() SongInfo.title = mir_utf8decodeT(tmp); } else - SongInfo.title = mir_tstrdup(_T("Unknown track")); + SongInfo.title = mir_tstrdup(L"Unknown track"); if(ptr = strstr(buf, "Artist:")) { ptr = &ptr[8]; @@ -177,7 +177,7 @@ int Parser() SongInfo.artist = mir_utf8decodeT(tmp); } else - SongInfo.artist = mir_tstrdup(_T("Unknown artist")); + SongInfo.artist = mir_tstrdup(L"Unknown artist"); if(ptr = strstr(buf, "Genre:")) { ptr = &ptr[7]; @@ -187,7 +187,7 @@ int Parser() SongInfo.genre = mir_utf8decodeT(tmp); } else - SongInfo.genre = mir_tstrdup(_T("Unknown genre")); + SongInfo.genre = mir_tstrdup(L"Unknown genre"); if(ptr = strstr(buf, "Album:")) { ptr = &ptr[7]; @@ -197,7 +197,7 @@ int Parser() SongInfo.album = mir_utf8decodeT(tmp); } else - SongInfo.album = mir_tstrdup(_T("Unknown album")); + SongInfo.album = mir_tstrdup(L"Unknown album"); if(ptr = strstr(buf, "Date:")) { ptr = &ptr[6]; @@ -207,7 +207,7 @@ int Parser() SongInfo.year = mir_utf8decodeT(tmp); } else - SongInfo.year = mir_tstrdup(_T("Unknown year")); + SongInfo.year = mir_tstrdup(L"Unknown year"); if(ptr = strstr(buf, "volume:")) { ptr = &ptr[8]; @@ -413,7 +413,7 @@ void RegisterPlayer() { PLAYERCELL player = {0}; player.Desc = "Music Player Daemon"; - player.Notes = _T("mpd is a nice music player for *nix which have not any gui, just daemon.\nuses very small amount of ram, cpu."); + player.Notes = L"mpd is a nice music player for *nix which have not any gui, just daemon.\nuses very small amount of ram, cpu."; player.URL = "http://www.musicpd.org"; player.Check = CheckPlayer; player.Init = Init; diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp index 6641d3ed30..54d0c2d6ce 100755 --- a/plugins/Watrack_MPD/src/options.cpp +++ b/plugins/Watrack_MPD/src/options.cpp @@ -24,10 +24,10 @@ static INT_PTR CALLBACK DlgProcWaMpdOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM { TranslateDialogDefault(hwndDlg); SetDlgItemInt(hwndDlg, IDC_PORT, db_get_w(NULL, szModuleName, "Port", 6600), FALSE); - TCHAR *tmp = UniGetContactSettingUtf(NULL, szModuleName, "Server", _T("127.0.0.1")); + TCHAR *tmp = UniGetContactSettingUtf(NULL, szModuleName, "Server", L"127.0.0.1"); SetDlgItemText(hwndDlg, IDC_SERVER, tmp); mir_free(tmp); - tmp = UniGetContactSettingUtf(NULL, szModuleName, "Password", _T("")); + tmp = UniGetContactSettingUtf(NULL, szModuleName, "Password", L""); SetDlgItemText(hwndDlg, IDC_PASSWORD, tmp); mir_free(tmp); return TRUE; diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h index a6b155d5f5..a0bced3797 100644 --- a/plugins/Weather/src/stdafx.h +++ b/plugins/Weather/src/stdafx.h @@ -145,7 +145,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 505 HTTP Version Not Supported
// defaults constants
-#define C_DEFAULT _T("%n [%t, %c]")
+#define C_DEFAULT L"%n [%t, %c]"
#define N_DEFAULT TranslateT("%c\\nTemperature: %t\\nFeel-Like: %f\\nPressure: %p\\nWind: %i %w\\nHumidity: %m\\nDew Point: %e\\nVisibility: %v\\n\\nSun Rise: %r\\nSun Set: %y\\n\\n5 Days Forecast:\\n%[Forecast Day 1]\\n%[Forecast Day 2]\\n%[Forecast Day 3]\\n%[Forecast Day 4]\\n%[Forecast Day 5]")
#define B_DEFAULT TranslateT("Feel-Like: %f\\nPressure: %p\\nWind: %i %w\\nHumidity: %m\\nDew Point: %e\\nVisibility: %v\\n\\nSun Rise: %r\\nSun Set: %y\\n\\n5 Days Forecast:\\n%[Forecast Day 1]\\n%[Forecast Day 2]\\n%[Forecast Day 3]\\n%[Forecast Day 4]\\n%[Forecast Day 5]")
#define b_DEFAULT TranslateT("Weather Condition for %n as of %u")
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 0e52a477e0..00d6b0baee 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -231,8 +231,8 @@ extern "C" int __declspec(dllexport) Load(void) // window needed for popup commands
TCHAR SvcFunc[100];
- mir_sntprintf(SvcFunc, _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
- hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
+ mir_sntprintf(SvcFunc, L"%s__PopupWindow", _T(WEATHERPROTONAME));
+ hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, L"static", SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
return 0;
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index 5ab2d661a5..304f1d2641 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -251,13 +251,13 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc, // give no station name but only ID if the search is unavailable
else _tcsncpy(str, TranslateT("<Enter station name here>"), MAX_DATA_LEN - 1);
- mir_sntprintf(newID, _T("%s/%s"), svc, sID);
+ mir_sntprintf(newID, L"%s/%s", svc, sID);
// set the search result and broadcast it
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = str;
- psr.firstName.t = _T(" ");
+ psr.firstName.t = L" ";
psr.lastName.t = svcname;
psr.email.t = newID;
ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)searchId, (LPARAM)&psr);
@@ -272,7 +272,7 @@ int IDSearchProc(TCHAR *sID, const int searchId, WIIDSEARCH *sData, TCHAR *svc, int IDSearch(TCHAR *sID, const int searchId)
{
// for a normal ID search (ID != #)
- if (mir_tstrcmp(sID, _T("#"))) {
+ if (mir_tstrcmp(sID, L"#")) {
WIDATALIST *Item = WIHead;
// search every weather service using the search station ID
@@ -288,8 +288,8 @@ int IDSearch(TCHAR *sID, const int searchId) PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = TranslateT("<Enter station name here>"); // to be entered
- psr.firstName.t = _T(" ");
- psr.lastName.t = _T("");
+ psr.firstName.t = L" ";
+ psr.lastName.t = L"";
psr.email.t = TranslateT("<Enter station ID here>"); // to be entered
ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)searchId, (LPARAM)&psr);
}
@@ -322,16 +322,16 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * // for single result
if (sData->Single.Available && (search != NULL || !sData->Multiple.Available)) { // single result
// if station ID appears first in the downloaded data
- if (!mir_tstrcmpi(sData->Single.First, _T("ID"))) {
+ if (!mir_tstrcmpi(sData->Single.First, L"ID")) {
GetDataValue(&sData->Single.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
GetDataValue(&sData->Single.Name, Name, &szInfo);
}
// if station name appears first in the downloaded data
- else if (!mir_tstrcmpi(sData->Single.First, _T("NAME"))) {
+ else if (!mir_tstrcmpi(sData->Single.First, L"NAME")) {
GetDataValue(&sData->Single.Name, Name, &szInfo);
GetDataValue(&sData->Single.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
}
else
str[0] = 0;
@@ -350,7 +350,7 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = Name;
- psr.firstName.t = _T(" ");
+ psr.firstName.t = L" ";
psr.lastName.t = svcname;
psr.email.t = sID;
psr.id.t = sID;
@@ -363,16 +363,16 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * // search for the next occurrence of the string
while (true) {
// if station ID appears first in the downloaded data
- if (!mir_tstrcmpi(sData->Multiple.First, _T("ID"))) {
+ if (!mir_tstrcmpi(sData->Multiple.First, L"ID")) {
GetDataValue(&sData->Multiple.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
GetDataValue(&sData->Multiple.Name, Name, &szInfo);
}
// if station name appears first in the downloaded data
- else if (!mir_tstrcmpi(sData->Multiple.First, _T("NAME"))) {
+ else if (!mir_tstrcmpi(sData->Multiple.First, L"NAME")) {
GetDataValue(&sData->Multiple.Name, Name, &szInfo);
GetDataValue(&sData->Multiple.ID, str, &szInfo);
- mir_sntprintf(sID, _T("%s/%s"), svc, str);
+ mir_sntprintf(sID, L"%s/%s", svc, str);
}
else
break;
@@ -388,7 +388,7 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
psr.nick.t = Name;
- psr.firstName.t = _T("");
+ psr.firstName.t = L"";
psr.lastName.t = svcname;
psr.email.t = sID;
psr.id.t = sID;
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index 60919e5b43..447837c76e 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
if (!db_get_ts(wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
- ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW);
+ ShellExecute((HWND)lParam, L"open", dbv.ptszVal, L"", L"", SW_SHOW);
db_free(&dbv);
}
else // display warning dialog if no path is specified
@@ -205,7 +205,7 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA // check if there are 2 parts in the ID (svc/id) seperated by "/"
// if not, don't let user change the setting
GetDlgItemText(hwndDlg, IDC_ID, str, _countof(str));
- chop = _tcsstr(str, _T("/"));
+ chop = _tcsstr(str, L"/");
if (chop == NULL)
EnableWindow(GetDlgItem(hwndDlg, IDC_CHANGE), FALSE);
else
@@ -272,14 +272,14 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ofn.nMaxFile = _countof(str);
// set filters
_tcsncpy(filter, TranslateT("Text Files"), _countof(filter) - 1);
- mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter));
pfilter = filter + mir_tstrlen(filter) + 1;
- _tcsncpy(pfilter, _T("*.txt"), _countof(filter) - 1);
+ _tcsncpy(pfilter, L"*.txt", _countof(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
_tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - 1);
- mir_tstrncat(pfilter, _T(" (*.*)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(pfilter, L" (*.*)", _countof(filter) - mir_tstrlen(filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
- _tcsncpy(pfilter, _T("*.*"), _countof(filter) - 1);
+ _tcsncpy(pfilter, L"*.*", _countof(filter) - 1);
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index bc3f523d8c..ec5cd06521 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -64,9 +64,9 @@ static void numToStr(double num, TCHAR *str, size_t strSize) if (i < 0 && (w || r)) w = -w;
if (r)
- mir_sntprintf(str, strSize, _T("%i.%i"), w, r);
+ mir_sntprintf(str, strSize, L"%i.%i", w, r);
else
- mir_sntprintf(str, strSize, _T("%i"), w);
+ mir_sntprintf(str, strSize, L"%i", w);
}
//============ UNIT CONVERSIONS ============
@@ -86,7 +86,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) memmove(&tempchar[1], &tempchar[2], sizeof(TCHAR)*(mir_tstrlen(&tempchar[2]) + 1));
// quit if the value obtained is N/A or not a number
- if (!mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, _T("N/A"))) {
+ if (!mir_tstrcmp(tempchar, NODATA) || !mir_tstrcmp(tempchar, L"N/A")) {
mir_tstrcpy(str, tempchar);
return;
}
@@ -99,8 +99,8 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) temp = _ttof(tempchar);
// convert all to F first
- if (!mir_tstrcmpi(unit, _T("C"))) temp = (temp * 9 / 5) + 32;
- else if (!mir_tstrcmpi(unit, _T("K"))) temp = ((temp - 273.15) * 9 / 5) + 32;
+ if (!mir_tstrcmpi(unit, L"C")) temp = (temp * 9 / 5) + 32;
+ else if (!mir_tstrcmpi(unit, L"K")) temp = ((temp - 273.15) * 9 / 5) + 32;
// convert to apporiate unit
switch (opt.tUnit) {
@@ -110,7 +110,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) if (opt.DoNotAppendUnit)
_tcsncpy_s(str, MAX_DATA_LEN, tstr, _TRUNCATE);
else
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s%sC"), tstr, opt.DegreeSign);
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s%sC", tstr, opt.DegreeSign);
break;
case 2:
@@ -118,7 +118,7 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) if (opt.DoNotAppendUnit)
_tcsncpy_s(str, MAX_DATA_LEN, tstr, _TRUNCATE);
else
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s%sF"), tstr, opt.DegreeSign);
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s%sF", tstr, opt.DegreeSign);
break;
}
}
@@ -142,36 +142,36 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) }
// convert all to mb first
- if (!mir_tstrcmpi(unit, _T("KPA")))
+ if (!mir_tstrcmpi(unit, L"KPA"))
tempunit = (double)output * 10;
- else if (!mir_tstrcmpi(unit, _T("HPA")))
+ else if (!mir_tstrcmpi(unit, L"HPA"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("MB")))
+ else if (!mir_tstrcmpi(unit, L"MB"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("IN")))
+ else if (!mir_tstrcmpi(unit, L"IN"))
tempunit = (double)output * 33.86388;
- else if (!mir_tstrcmpi(unit, _T("MM")))
+ else if (!mir_tstrcmpi(unit, L"MM"))
tempunit = (double)output * 1.33322;
- else if (!mir_tstrcmpi(unit, _T("TORR")))
+ else if (!mir_tstrcmpi(unit, L"TORR"))
tempunit = (double)output * 1.33322;
// convert to apporiate unit
switch (opt.pUnit) {
case 1:
intunit = (int)(tempunit + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("kPa"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("kPa"));
break;
case 2:
intunit = (int)(tempunit + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i %s"), intunit, opt.DoNotAppendUnit ? _T("") : TranslateT("mb"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i %s", intunit, opt.DoNotAppendUnit ? L"" : TranslateT("mb"));
break;
case 3:
intunit = (int)((tempunit * 10 / 33.86388) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("in"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("in"));
break;
case 4:
intunit = (int)((tempunit * 10 / 1.33322) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("mm"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("mm"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -199,32 +199,32 @@ void GetSpeed(TCHAR *tempchar, TCHAR *unit, TCHAR *str) return;
// convert all to m/s first
- if (!mir_tstrcmpi(unit, _T("KM/H")))
+ if (!mir_tstrcmpi(unit, L"KM/H"))
tempunit /= 3.6;
- // else if ( !mir_tstrcmpi(unit, _T("M/S"))
+ // else if ( !mir_tstrcmpi(unit, L"M/S")
// tempunit = tempunit;
- else if (!mir_tstrcmpi(unit, _T("MPH")))
+ else if (!mir_tstrcmpi(unit, L"MPH"))
tempunit *= 0.44704;
- else if (!mir_tstrcmpi(unit, _T("KNOTS")))
+ else if (!mir_tstrcmpi(unit, L"KNOTS"))
tempunit *= 0.514444;
// convert to apporiate unit
switch (opt.wUnit) {
case 1:
numToStr(tempunit * 3.6, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("km/h"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("km/h"));
break;
case 2:
numToStr(tempunit, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("m/s"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("m/s"));
break;
case 3:
numToStr(tempunit / 0.44704, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("mph"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("mph"));
break;
case 4:
numToStr(tempunit / 0.514444, tstr, _countof(tstr));
- mir_sntprintf(str, MAX_DATA_LEN, _T("%s %s"), tstr, opt.DoNotAppendUnit ? _T("") : TranslateT("knots"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%s %s", tstr, opt.DoNotAppendUnit ? L"" : TranslateT("knots"));
break;
}
}
@@ -248,20 +248,20 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) }
// convert all to km first
- if (!mir_tstrcmpi(unit, _T("KM")))
+ if (!mir_tstrcmpi(unit, L"KM"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("MILES")))
+ else if (!mir_tstrcmpi(unit, L"MILES"))
tempunit = (double)output * 1.609;
// convert to apporiate unit
switch (opt.vUnit) {
case 1:
intunit = (int)((tempunit * 10) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("km"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("km"));
break;
case 2:
intunit = (int)((tempunit * 10 / 1.609) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("miles"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("miles"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -288,20 +288,20 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) }
// convert all to m first
- if (!mir_tstrcmpi(unit, _T("M")))
+ if (!mir_tstrcmpi(unit, L"M"))
tempunit = (double)output;
- else if (!mir_tstrcmpi(unit, _T("FT")))
+ else if (!mir_tstrcmpi(unit, L"FT"))
tempunit = (double)output / 3.28;
// convert to apporiate unit
switch (opt.eUnit) {
case 1:
intunit = (int)((tempunit * 10 * 3.28) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("ft"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("ft"));
break;
case 2:
intunit = (int)((tempunit * 10) + 0.5);
- mir_sntprintf(str, MAX_DATA_LEN, _T("%i.%i %s"), intunit / 10, intunit % 10, opt.DoNotAppendUnit ? _T("") : TranslateT("m"));
+ mir_sntprintf(str, MAX_DATA_LEN, L"%i.%i %s", intunit / 10, intunit % 10, opt.DoNotAppendUnit ? L"" : TranslateT("m"));
break;
default:
mir_tstrcpy(str, tempchar);
@@ -316,7 +316,7 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) // cond = the string for weather condition
// return value = status for the icon (ONLINE, OFFLINE, etc)
-static const TCHAR *statusStr[10] = { _T("Lightning"), _T("Fog"), _T("Snow Shower"), _T("Snow"), _T("Rain Shower"), _T("Rain"), _T("Partly Cloudy"), _T("Cloudy"), _T("Sunny"), _T("N/A") };
+static const TCHAR *statusStr[10] = { L"Lightning", L"Fog", L"Snow Shower", L"Snow", L"Rain Shower", L"Rain", L"Partly Cloudy", L"Cloudy", L"Sunny", L"N/A" };
static const WORD statusValue[10] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
WORD GetIcon(const TCHAR* cond, WIDATA *Data)
@@ -328,58 +328,58 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data) // internal detection
if (
- _tcsstr(cond, _T("mainy sunny")) != NULL ||
- _tcsstr(cond, _T("mainy clear")) != NULL ||
- _tcsstr(cond, _T("partly cloudy")) != NULL ||
- _tcsstr(cond, _T("mostly")) != NULL ||
- _tcsstr(cond, _T("clouds")) != NULL) {
+ _tcsstr(cond, L"mainy sunny") != NULL ||
+ _tcsstr(cond, L"mainy clear") != NULL ||
+ _tcsstr(cond, L"partly cloudy") != NULL ||
+ _tcsstr(cond, L"mostly") != NULL ||
+ _tcsstr(cond, L"clouds") != NULL) {
return PCLOUDY;
}
else if (
- _tcsstr(cond, _T("sunny")) != NULL ||
- _tcsstr(cond, _T("clear")) != NULL ||
- _tcsstr(cond, _T("fair")) != NULL) {
+ _tcsstr(cond, L"sunny") != NULL ||
+ _tcsstr(cond, L"clear") != NULL ||
+ _tcsstr(cond, L"fair") != NULL) {
return SUNNY;
}
else if (
- _tcsstr(cond, _T("thunder")) != NULL ||
- _tcsstr(cond, _T("t-storm")) != NULL) {
+ _tcsstr(cond, L"thunder") != NULL ||
+ _tcsstr(cond, L"t-storm") != NULL) {
return LIGHT;
}
else if (
- _tcsstr(cond, _T("cloud")) != NULL ||
- _tcsstr(cond, _T("overcast")) != NULL) {
+ _tcsstr(cond, L"cloud") != NULL ||
+ _tcsstr(cond, L"overcast") != NULL) {
return CLOUDY;
}
else if (
- _tcsstr(cond, _T("fog")) != NULL ||
- _tcsstr(cond, _T("mist")) != NULL ||
- _tcsstr(cond, _T("smoke")) != NULL ||
- _tcsstr(cond, _T("sand")) != NULL ||
- _tcsstr(cond, _T("dust")) != NULL ||
- _tcsstr(cond, _T("haze")) != NULL) {
+ _tcsstr(cond, L"fog") != NULL ||
+ _tcsstr(cond, L"mist") != NULL ||
+ _tcsstr(cond, L"smoke") != NULL ||
+ _tcsstr(cond, L"sand") != NULL ||
+ _tcsstr(cond, L"dust") != NULL ||
+ _tcsstr(cond, L"haze") != NULL) {
return FOG;
}
else if (
- (_tcsstr(cond, _T("shower")) != NULL && _tcsstr(cond, _T("snow")) != NULL) ||
- _tcsstr(cond, _T("flurries")) != NULL) {
+ (_tcsstr(cond, L"shower") != NULL && _tcsstr(cond, L"snow") != NULL) ||
+ _tcsstr(cond, L"flurries") != NULL) {
return SSHOWER;
}
else if (
- _tcsstr(cond, _T("rain shower")) != NULL ||
- _tcsstr(cond, _T("shower")) != NULL) {
+ _tcsstr(cond, L"rain shower") != NULL ||
+ _tcsstr(cond, L"shower") != NULL) {
return RSHOWER;
}
else if (
- _tcsstr(cond, _T("snow")) != NULL ||
- _tcsstr(cond, _T("ice")) != NULL ||
- _tcsstr(cond, _T("freezing")) != NULL ||
- _tcsstr(cond, _T("wintry")) != NULL) {
+ _tcsstr(cond, L"snow") != NULL ||
+ _tcsstr(cond, L"ice") != NULL ||
+ _tcsstr(cond, L"freezing") != NULL ||
+ _tcsstr(cond, L"wintry") != NULL) {
return SNOW;
}
else if (
- _tcsstr(cond, _T("drizzle")) != NULL ||
- _tcsstr(cond, _T("rain")) != NULL) {
+ _tcsstr(cond, L"drizzle") != NULL ||
+ _tcsstr(cond, L"rain") != NULL) {
return RAIN;
}
@@ -390,7 +390,7 @@ WORD GetIcon(const TCHAR* cond, WIDATA *Data) do {
j++;
// using the format _T("# Weather <condition name> <counter> #"
- mir_sntprintf(LangPackStr, _T("# Weather %s %i #"), statusStr[i], j);
+ mir_sntprintf(LangPackStr, L"# Weather %s %i #", statusStr[i], j);
_tcsncpy_s(LangPackStr1, TranslateTS(LangPackStr), _TRUNCATE);
CharLowerBuff(LangPackStr1, (DWORD)mir_tstrlen(LangPackStr1));
if (_tcsstr(cond, LangPackStr1) != NULL)
@@ -470,7 +470,7 @@ char *GetSearchStr(char *dis) while (*pstr != 0) {
if (*pstr == ' ') {
memmove(pstr + 3, pstr + 1, len);
- memcpy(pstr, _T("%20"), 3);
+ memcpy(pstr, L"%20", 3);
pstr += 2;
}
pstr++;
@@ -502,10 +502,10 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) i++;
chr = dis[i];
switch (chr) {
- case '%': mir_tstrcat(str, _T("%")); break;
- case 't': mir_tstrcat(str, _T("\t")); break;
- case 'n': mir_tstrcat(str, _T("\r\n")); break;
- case '\\': mir_tstrcat(str, _T("\\")); break;
+ case '%': mir_tstrcat(str, L"%"); break;
+ case 't': mir_tstrcat(str, L"\t"); break;
+ case 'n': mir_tstrcat(str, L"\r\n"); break;
+ case '\\': mir_tstrcat(str, L"\\"); break;
}
}
@@ -538,7 +538,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) case 'v': mir_tstrcat(str, w->vis); break;
case 'w': mir_tstrcat(str, w->wind); break;
case 'y': mir_tstrcat(str, w->sunset); break;
- case '%': mir_tstrcat(str, _T("%")); break;
+ case '%': mir_tstrcat(str, L"%"); break;
case '[': // custom variables
i++;
name[0] = 0;
@@ -558,7 +558,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) }
// if the character is not a variable, write the original character to the new string
else {
- mir_sntprintf(lpzDate, _T("%c"), dis[i]);
+ mir_sntprintf(lpzDate, L"%c", dis[i]);
mir_tstrcat(str, lpzDate);
}
}
@@ -580,7 +580,7 @@ INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam) // pszID = original 2-part id, return the service internal name
void GetSvc(TCHAR *pszID)
{
- TCHAR *chop = _tcsstr(pszID, _T("/"));
+ TCHAR *chop = _tcsstr(pszID, L"/");
if (chop != NULL) *chop = '\0';
else pszID[0] = 0;
}
@@ -590,7 +590,7 @@ void GetSvc(TCHAR *pszID) // pszID = original 2-part id, return the single part id
void GetID(TCHAR *pszID)
{
- TCHAR *chop = _tcsstr(pszID, _T("/"));
+ TCHAR *chop = _tcsstr(pszID, L"/");
if (chop != NULL) mir_tstrcpy(pszID, chop + 1);
else pszID[0] = 0;
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 24554f2f4f..2fdd74ec15 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -185,54 +185,54 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) // convert the unit
if (mir_tstrcmp(Data, TranslateT("<Error>")) && mir_tstrcmp(Data, NODATA) && mir_tstrcmp(Data, TranslateTS(NODATA))) {
// temperature
- if (!mir_tstrcmp(UpdateData->Name, _T("Temperature")) || !mir_tstrcmp(UpdateData->Name, _T("High")) ||
- !mir_tstrcmp(UpdateData->Name, _T("Low")) || !mir_tstrcmp(UpdateData->Name, _T("Feel")) ||
- !mir_tstrcmp(UpdateData->Name, _T("Dewpoint")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("C")) || !mir_tstrcmpi(UpdateData->Unit, _T("F")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("K"))) {
+ if (!mir_tstrcmp(UpdateData->Name, L"Temperature") || !mir_tstrcmp(UpdateData->Name, L"High") ||
+ !mir_tstrcmp(UpdateData->Name, L"Low") || !mir_tstrcmp(UpdateData->Name, L"Feel") ||
+ !mir_tstrcmp(UpdateData->Name, L"Dewpoint") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"C") || !mir_tstrcmpi(UpdateData->Unit, L"F") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"K")) {
GetTemp(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// pressure
- else if (!mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !mir_tstrcmpi(UpdateData->Unit, _T("HPA")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("KPA")) || !mir_tstrcmpi(UpdateData->Unit, _T("MB")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("TORR")) || !mir_tstrcmpi(UpdateData->Unit, _T("IN")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("MM"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Pressure") || !mir_tstrcmpi(UpdateData->Unit, L"HPA") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"KPA") || !mir_tstrcmpi(UpdateData->Unit, L"MB") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"TORR") || !mir_tstrcmpi(UpdateData->Unit, L"IN") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"MM")) {
GetPressure(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// speed
- else if (!mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM/H")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("M/S")) || !mir_tstrcmpi(UpdateData->Unit, _T("MPH")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("KNOTS"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Wind Speed") || !mir_tstrcmpi(UpdateData->Unit, L"KM/H") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"M/S") || !mir_tstrcmpi(UpdateData->Unit, L"MPH") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"KNOTS")) {
GetSpeed(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// visibility
- else if (!mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("MILES"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Visibility") || !mir_tstrcmpi(UpdateData->Unit, L"KM") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"MILES")) {
GetDist(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// elevation
- else if (!mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !mir_tstrcmpi(UpdateData->Unit, _T("FT")) ||
- !mir_tstrcmpi(UpdateData->Unit, _T("M"))) {
+ else if (!mir_tstrcmp(UpdateData->Name, L"Elevation") || !mir_tstrcmpi(UpdateData->Unit, L"FT") ||
+ !mir_tstrcmpi(UpdateData->Unit, L"M")) {
GetElev(Data, UpdateData->Unit, str);
mir_tstrcpy(Data, str);
}
// converting case for condition to the upper+lower format
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("COND")))
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"COND"))
CaseConv(Data);
// degree sign
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("DEG"))) {
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"DEG")) {
if (!opt.DoNotAppendUnit) mir_tstrcat(Data, opt.DegreeSign);
}
// percent sign
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("%"))) {
- if (!opt.DoNotAppendUnit) mir_tstrcat(Data, _T("%"));
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"%")) {
+ if (!opt.DoNotAppendUnit) mir_tstrcat(Data, L"%");
}
// truncating strings for day/month to 2 or 3 characters
- else if (!mir_tstrcmpi(UpdateData->Unit, _T("DAY")) || !mir_tstrcmpi(UpdateData->Unit, _T("MONTH")))
+ else if (!mir_tstrcmpi(UpdateData->Unit, L"DAY") || !mir_tstrcmpi(UpdateData->Unit, L"MONTH"))
if (opt.dUnit > 1 && mir_tstrlen(Data) > opt.dUnit)
Data[opt.dUnit] = '\0';
}
@@ -270,7 +270,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData) if (UpdateData->End[0] != 0)
end = _tcsstr(szInfo, UpdateData->End);
else
- end = _tcsstr(szInfo, _T(" "));
+ end = _tcsstr(szInfo, L" ");
if (end != NULL) {
// set the ending location
@@ -291,7 +291,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData) (szInfo[startloc + 1] == ';' || szInfo[startloc + 2] == ';' || szInfo[startloc + 3] == ';' ||
szInfo[startloc + 4] == ';' || szInfo[startloc + 5] == ';' || szInfo[startloc + 6] == ';')) {
// ...but do NOT strip −
- if ((endloc - startloc) > 7 && _tcsncmp(szInfo + startloc, _T("−"), 7) == 0) {
+ if ((endloc - startloc) > 7 && _tcsncmp(szInfo + startloc, L"−", 7) == 0) {
Data[respos++] = '-';
startloc += 7;
continue;
@@ -315,7 +315,7 @@ void GetDataValue(WIDATAITEM *UpdateData, TCHAR *Data, TCHAR** szData) ++startloc;
// prevent crashes if the string go over maximun length -> generate an error
if (respos >= MAX_DATA_LEN) {
- if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, _T("Ignore"))) {
+ if (opt.ShowWarnings && UpdateData->Name[0] != 0 && mir_tstrcmp(UpdateData->Name, L"Ignore")) {
mir_sntprintf(Data, MAX_DATA_LEN, TranslateT("Error when obtaining data: %s"), UpdateData->Name);
WPShowMessage(Data, SM_WARNING);
}
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp index 4171440bc9..429f8f654c 100644 --- a/plugins/Weather/src/weather_http.cpp +++ b/plugins/Weather/src/weather_http.cpp @@ -79,7 +79,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD // if the data does not downloaded successfully (ie. disconnected), then return 1000 as error code
*szData = (TCHAR*)mir_alloc(512);
// store the error code in szData
- mir_tstrcpy(*szData, _T("NetLib error occurred!!"));
+ mir_tstrcpy(*szData, L"NetLib error occurred!!");
hNetlibHttp = NULL;
return NLHRF_REDIRECT;
}
@@ -137,7 +137,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD else {
*szData = (TCHAR*)mir_alloc(512);
// store the error code in szData
- mir_sntprintf(*szData, 512, _T("Error occured! HTTP Error: %i\n"), nlhrReply->resultCode);
+ mir_sntprintf(*szData, 512, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
result = nlhrReply->resultCode;
}
diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp index 1e5e982c9d..3372d4d3ce 100644 --- a/plugins/Weather/src/weather_info.cpp +++ b/plugins/Weather/src/weather_info.cpp @@ -56,14 +56,14 @@ static void INIInfo(HWND hwndDlg) ListView_SetItem(hIniList, &lvi);
lvi.iSubItem = 3;
switch (Item->Data.InternalVer) {
- case 1: lvi.pszText = _T("1.0"); break;
- case 2: lvi.pszText = _T("1.1"); break;
- case 3: lvi.pszText = _T("1.1a"); break;
- case 4: lvi.pszText = _T("1.2"); break;
- case 5: lvi.pszText = _T("1.3"); break;
- case 6: lvi.pszText = _T("1.4"); break;
- case 7: lvi.pszText = _T("1.5"); break;
- default: lvi.pszText = _T(""); break;
+ case 1: lvi.pszText = L"1.0"; break;
+ case 2: lvi.pszText = L"1.1"; break;
+ case 3: lvi.pszText = L"1.1a"; break;
+ case 4: lvi.pszText = L"1.2"; break;
+ case 5: lvi.pszText = L"1.3"; break;
+ case 6: lvi.pszText = L"1.4"; break;
+ case 7: lvi.pszText = L"1.5"; break;
+ default: lvi.pszText = L""; break;
}
ListView_SetItem(hIniList, &lvi);
lvi.iSubItem = 4;
@@ -153,47 +153,47 @@ void GetINIInfo(TCHAR *pszSvc) // if exist, get the information
else {
mir_sntprintf(str2, TranslateT("Weather INI information for \"%s\":"), pszSvc);
- mir_tstrncat(str2, _T("\n\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->DisplayName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Internal Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->InternalName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Author:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Author, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Version:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Version, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("INI Version:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
switch (sData->InternalVer) {
- case 1: mir_tstrncat(str2, _T("1.0"), _countof(str2) - mir_tstrlen(str2)); break;
- case 2: mir_tstrncat(str2, _T("1.1"), _countof(str2) - mir_tstrlen(str2)); break;
- case 3: mir_tstrncat(str2, _T("1.1a"), _countof(str2) - mir_tstrlen(str2)); break;
- case 4: mir_tstrncat(str2, _T("1.2"), _countof(str2) - mir_tstrlen(str2)); break;
- case 5: mir_tstrncat(str2, _T("1.3"), _countof(str2) - mir_tstrlen(str2)); break;
- case 6: mir_tstrncat(str2, _T("1.4"), _countof(str2) - mir_tstrlen(str2)); break;
- case 7: mir_tstrncat(str2, _T("1.5"), _countof(str2) - mir_tstrlen(str2)); break;
+ case 1: mir_tstrncat(str2, L"1.0", _countof(str2) - mir_tstrlen(str2)); break;
+ case 2: mir_tstrncat(str2, L"1.1", _countof(str2) - mir_tstrlen(str2)); break;
+ case 3: mir_tstrncat(str2, L"1.1a", _countof(str2) - mir_tstrlen(str2)); break;
+ case 4: mir_tstrncat(str2, L"1.2", _countof(str2) - mir_tstrlen(str2)); break;
+ case 5: mir_tstrncat(str2, L"1.3", _countof(str2) - mir_tstrlen(str2)); break;
+ case 6: mir_tstrncat(str2, L"1.4", _countof(str2) - mir_tstrlen(str2)); break;
+ case 7: mir_tstrncat(str2, L"1.5", _countof(str2) - mir_tstrlen(str2)); break;
}
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("File Name:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\t"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\t", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->ShortFileName, _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Item Count:"), _countof(str2) - mir_tstrlen(str2));
- mir_sntprintf(str2, _T("%s\t%i\n"), str2, sData->UpdateDataCount);
+ mir_sntprintf(str2, L"%s\t%i\n", str2, sData->UpdateDataCount);
mir_tstrncat(str2, TranslateT("Memory Used:"), _countof(str2) - mir_tstrlen(str2));
- mir_sntprintf(str2, _T("%s\t%i "), str2, sData->MemUsed);
+ mir_sntprintf(str2, L"%s\t%i ", str2, sData->MemUsed);
mir_tstrncat(str2, TranslateT("bytes"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, TranslateT("Description:"), _countof(str2) - mir_tstrlen(str2));
- mir_tstrncat(str2, _T("\n"), _countof(str2) - mir_tstrlen(str2));
+ mir_tstrncat(str2, L"\n", _countof(str2) - mir_tstrlen(str2));
mir_tstrncat(str2, sData->Description, _countof(str2) - mir_tstrlen(str2));
// display the message box and quit
@@ -211,20 +211,20 @@ void MoreVarList(void) // heading
_tcsncpy(str, VARS_LIST, _countof(str) - 1);
- mir_tstrncat(str, _T("\n\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n\n", _countof(str) - mir_tstrlen(str));
// loop through all weather services to find custom variables
for (WIDATALIST *Item = WIHead; Item != NULL; Item = Item->next) {
// loop through all update items in a service
for (WIDATAITEMLIST *WItem = Item->Data.UpdateData; WItem != NULL; WItem = WItem->Next) {
// the custom variable is defined as "%[<variable name>]"
// ignore the "hi" item and hidden items
- if (mir_tstrcmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') {
- mir_sntprintf(tempstr, _T("%c[%s]"), '%', WItem->Item.Name);
+ if (mir_tstrcmp(WItem->Item.Name, L"Ignore") && WItem->Item.Name[0] != '#') {
+ mir_sntprintf(tempstr, L"%c[%s]", '%', WItem->Item.Name);
TCHAR *find = _tcsstr(str, tempstr);
// if the custom variable does not exist in the list, add it to the list
if (find == NULL) {
mir_tstrncat(str, tempstr, _countof(str) - mir_tstrlen(str));
- mir_tstrncat(str, _T(", "), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L", ", _countof(str) - mir_tstrlen(str));
}
}
}
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 4bc8be70fe..df49fe4d80 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -79,11 +79,11 @@ void WIItemListAdd(WIDATAITEM *DataItem, WIDATA *Data) void ResetDataItem(WIDATAITEM *Item, const TCHAR *name)
{
Item->Name = mir_tstrdup(name);
- Item->Start = _T("");
- Item->End = _T("");
- Item->Unit = _T("");
+ Item->Start = L"";
+ Item->End = L"";
+ Item->Unit = L"";
Item->Url = "";
- Item->Break = _T("");
+ Item->Break = L"";
Item->Type = 0;
}
@@ -183,9 +183,9 @@ static INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR TCHAR *chop = _tcsrchr(szPath, '\\');
if (chop) {
*chop = '\0';
- mir_tstrncat(szPath, _T("\\Plugins\\weather\\"), _countof(szPath) - mir_tstrlen(szPath));
+ mir_tstrncat(szPath, L"\\Plugins\\weather\\", _countof(szPath) - mir_tstrlen(szPath));
if (_tmkdir(szPath) == 0)
- ShellExecute((HWND)lParam, _T("open"), szPath, _T(""), _T(""), SW_SHOW);
+ ShellExecute((HWND)lParam, L"open", szPath, L"", L"", SW_SHOW);
}
break;
}
@@ -247,7 +247,7 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) Data->Enabled = FALSE;
// open the ini file
- FILE *pfile = _tfsopen(pszFile, _T("rt"), _SH_DENYWR);
+ FILE *pfile = _tfsopen(pszFile, L"rt", _SH_DENYWR);
if (pfile != NULL) {
char Line[4096];
fgets(Line, _countof(Line), pfile);
@@ -279,13 +279,13 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) // initialize all data fields
Group = "";
- Data->DisplayName = _T("");
- Data->InternalName = _T("");
- Data->Description = _T("");
- Data->Author = _T("");
- Data->Version = _T("");
+ Data->DisplayName = L"";
+ Data->InternalName = L"";
+ Data->Description = L"";
+ Data->Author = L"";
+ Data->Version = L"";
Data->DefaultURL = "";
- Data->DefaultMap = _T("");
+ Data->DefaultMap = L"";
Data->UpdateURL = "";
Data->UpdateURL2 = "";
Data->UpdateURL3 = "";
@@ -293,30 +293,30 @@ static void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) Data->Cookie = "";
Data->UserAgent = "";
Data->IDSearch.SearchURL = "";
- Data->IDSearch.NotFoundStr = _T("");
+ Data->IDSearch.NotFoundStr = L"";
Data->NameSearch.SearchURL = "";
- Data->NameSearch.NotFoundStr = _T("");
- Data->NameSearch.SingleStr = _T("");
- Data->NameSearch.Single.First = _T("");
- Data->NameSearch.Multiple.First = _T("");
+ Data->NameSearch.NotFoundStr = L"";
+ Data->NameSearch.SingleStr = L"";
+ Data->NameSearch.Single.First = L"";
+ Data->NameSearch.Multiple.First = L"";
Data->IDSearch.Available = FALSE;
Data->NameSearch.Single.Available = FALSE;
Data->NameSearch.Multiple.Available = FALSE;
wSetData(&Data->FileName, pszFile);
wSetData(&Data->ShortFileName, pszShortFile);
- ResetDataItem(&Data->IDSearch.Name, _T("ID Search - Station Name"));
- ResetDataItem(&Data->NameSearch.Single.Name, _T("Name Search Single Result - Station Name"));
- ResetDataItem(&Data->NameSearch.Single.ID, _T("Name Search Single Result - Station ID"));
- ResetDataItem(&Data->NameSearch.Multiple.Name, _T("Name Search Multiple Result - Station Name"));
- ResetDataItem(&Data->NameSearch.Multiple.ID, _T("Name Search Multiple Result - Station ID"));
+ ResetDataItem(&Data->IDSearch.Name, L"ID Search - Station Name");
+ ResetDataItem(&Data->NameSearch.Single.Name, L"Name Search Single Result - Station Name");
+ ResetDataItem(&Data->NameSearch.Single.ID, L"Name Search Single Result - Station ID");
+ ResetDataItem(&Data->NameSearch.Multiple.Name, L"Name Search Multiple Result - Station Name");
+ ResetDataItem(&Data->NameSearch.Multiple.ID, L"Name Search Multiple Result - Station ID");
- DataItem.Name = _T("");
- DataItem.Start = _T("");
- DataItem.End = _T("");
- DataItem.Unit = _T("");
+ DataItem.Name = L"";
+ DataItem.Start = L"";
+ DataItem.End = L"";
+ DataItem.Unit = L"";
DataItem.Url = "";
- DataItem.Break = _T("");
+ DataItem.Break = L"";
DataItem.Type = 0;
Temp = "";
@@ -491,7 +491,7 @@ bool LoadWIData(bool dial) if (chop == NULL)
return false;
*chop = '\0';
- mir_tstrncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"), _countof(szSearchPath) - mir_tstrlen(szSearchPath));
+ mir_tstrncat(szSearchPath, L"\\Plugins\\Weather\\*.ini", _countof(szSearchPath) - mir_tstrlen(szSearchPath));
_tcsncpy(FileName, szSearchPath, MAX_PATH - 1);
WIN32_FIND_DATA fd;
@@ -504,7 +504,7 @@ bool LoadWIData(bool dial) chop = _tcsrchr(FileName, '\\');
chop[1] = '\0';
mir_tstrncat(FileName, fd.cFileName, _countof(FileName) - mir_tstrlen(FileName));
- if (mir_tstrcmpi(fd.cFileName, _T("SAMPLE_INI.INI"))) {
+ if (mir_tstrcmpi(fd.cFileName, L"SAMPLE_INI.INI")) {
WIDATA Data;
LoadStationData(FileName, fd.cFileName, &Data);
if (Data.Enabled)
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index bb57c61fa8..61f323d8d9 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -200,7 +200,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara TCHAR *nick = (TCHAR*)pcli->pfnGetContactDisplayName(data->hContact, 0);
SIZE fontSize;
- GetTextExtentPoint32(hdc, _T("|"), 1, &fontSize);
+ GetTextExtentPoint32(hdc, L"|", 1, &fontSize);
rc.top += 1;
rc.left += picSize + fontSize.cx;
@@ -242,10 +242,10 @@ static void addWindow(MCONTACT hContact) return;
TCHAR winname[512];
- mir_sntprintf(winname, _T("Weather: %s"), dbv.ptszVal);
+ mir_sntprintf(winname, L"Weather: %s", dbv.ptszVal);
db_free(&dbv);
- HWND hWnd = CreateWindow(_T("WeatherFrame"), _T(""), WS_CHILD | WS_VISIBLE,
+ HWND hWnd = CreateWindow(L"WeatherFrame", L"", WS_CHILD | WS_VISIBLE,
0, 0, 10, 10, pcli->hwndContactList, NULL, hInst, (void*)hContact);
WindowList_Add(hMwinWindowList, hWnd, hContact);
@@ -321,7 +321,7 @@ void InitMwin(void) wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = 0; //(HBRUSH)(COLOR_3DFACE+1);
wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = _T("WeatherFrame");
+ wndclass.lpszClassName = L"WeatherFrame";
RegisterClass(&wndclass);
ColourIDT colourid = { 0 };
@@ -346,7 +346,7 @@ void InitMwin(void) ReleaseDC(0, hdc);
fontid.deffontsettings.charset = DEFAULT_CHARSET;
- mir_tstrcpy(fontid.deffontsettings.szFace, _T("Verdana"));
+ mir_tstrcpy(fontid.deffontsettings.szFace, L"Verdana");
mir_tstrcpy(fontid.backgroundGroup, _T(WEATHERPROTONAME));
mir_tstrcpy(fontid.backgroundName, LPGENT("Frame Background"));
FontRegisterT(&fontid);
@@ -370,7 +370,7 @@ void DestroyMwin(void) if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
}
- UnregisterClass(_T("WeatherFrame"), hInst);
+ UnregisterClass(L"WeatherFrame", hInst);
WindowList_Destroy(hMwinWindowList);
UnhookEvent(hFontHook);
}
diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index 9377bf7339..48d275e12b 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -115,7 +115,7 @@ void LoadOptions(void) opt.eUnit = db_get_w(NULL, WEATHERPROTONAME, "eUnit", 2);
ptrT szValue(db_get_tsa(NULL, WEATHERPROTONAME, "DegreeSign"));
- _tcsncpy_s(opt.DegreeSign, (szValue == NULL) ? _T("") : szValue, _TRUNCATE);
+ _tcsncpy_s(opt.DegreeSign, (szValue == NULL) ? L"" : szValue, _TRUNCATE);
opt.DoNotAppendUnit = db_get_b(NULL, WEATHERPROTONAME, "DoNotAppendUnit", 0);
opt.NoFrac = db_get_b(NULL, WEATHERPROTONAME, "NoFractions", 0);
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 14583fb843..fcd891e70c 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -368,13 +368,13 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) case IDC_PD1:
// Popup delay setting from Popup plugin
- SetDlgItemText(hdlg, IDC_DELAY, _T("0"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"0");
CheckRadioButton(hdlg, IDC_PD1, IDC_PD3, IDC_PD1);
break;
case IDC_PD2:
// Popup delay = permanent
- SetDlgItemText(hdlg, IDC_DELAY, _T("-1"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"-1");
CheckRadioButton(hdlg, IDC_PD1, IDC_PD3, IDC_PD2);
break;
@@ -394,9 +394,9 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) case IDC_VAR3:
// display variable list
- _tcsncpy(str, _T(" \n"), _countof(str) - 1); // to make the message box wider
+ _tcsncpy(str, L" \n", _countof(str) - 1); // to make the message box wider
mir_tstrncat(str, VAR_LIST_POPUP, _countof(str) - mir_tstrlen(str));
- mir_tstrncat(str, _T("\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n", _countof(str) - mir_tstrlen(str));
mir_tstrncat(str, CUSTOM_VARS, _countof(str) - mir_tstrlen(str));
MessageBox(NULL, str, TranslateT("Variable List"), MB_OK | MB_ICONASTERISK | MB_TOPMOST);
break;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 5576693063..753c91c1e8 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -123,7 +123,7 @@ INT_PTR WeatherGetInfo(WPARAM, LPARAM lParam) }
// avatars
-static const TCHAR *statusStr[] = { _T("Light"), _T("Fog"), _T("SShower"), _T("Snow"), _T("RShower"), _T("Rain"), _T("PCloudy"), _T("Cloudy"), _T("Sunny"), _T("NA") };
+static const TCHAR *statusStr[] = { L"Light", L"Fog", L"SShower", L"Snow", L"RShower", L"Rain", L"PCloudy", L"Cloudy", L"Sunny", L"NA" };
static const WORD statusValue[] = { LIGHT, FOG, SSHOWER, SNOW, RSHOWER, RAIN, PCLOUDY, CLOUDY, SUNNY, NA };
INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam)
@@ -147,12 +147,12 @@ INT_PTR WeatherGetAvatarInfo(WPARAM, LPARAM lParam) return GAIR_NOAVATAR;
pai->format = PA_FORMAT_PNG;
- mir_sntprintf(pai->filename, _T("%s\\Plugins\\Weather\\%s.png"), szSearchPath, statusStr[i]);
+ mir_sntprintf(pai->filename, L"%s\\Plugins\\Weather\\%s.png", szSearchPath, statusStr[i]);
if (_taccess(pai->filename, 4) == 0)
return GAIR_SUCCESS;
pai->format = PA_FORMAT_GIF;
- mir_sntprintf(pai->filename, _T("%s\\Plugins\\Weather\\%s.gif"), szSearchPath, statusStr[i]);
+ mir_sntprintf(pai->filename, L"%s\\Plugins\\Weather\\%s.gif", szSearchPath, statusStr[i]);
if (_taccess(pai->filename, 4) == 0)
return GAIR_SUCCESS;
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index be95d9e56e..6a6403dbdd 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -44,10 +44,10 @@ int UpdateWeather(MCONTACT hContact) dbv.pszVal = "";
// log to netlib log for debug purpose
- Netlib_LogfT(hNetlibUser, _T("************************************************************************"));
+ Netlib_LogfT(hNetlibUser, L"************************************************************************");
int dbres = db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
- Netlib_LogfT(hNetlibUser, _T("<-- Start update for station -->"));
+ Netlib_LogfT(hNetlibUser, L"<-- Start update for station -->");
// download the info and parse it
// result are stored in database
@@ -58,15 +58,15 @@ int UpdateWeather(MCONTACT hContact) // show warnings by popup
mir_sntprintf(str, _countof(str) - 105,
TranslateT("Unable to retrieve weather information for %s"), dbv.ptszVal);
- mir_tstrncat(str, _T("\n"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L"\n", _countof(str) - mir_tstrlen(str));
TCHAR *tszError = GetError(code);
mir_tstrncat(str, tszError, _countof(str) - mir_tstrlen(str));
WPShowMessage(str, SM_WARNING);
mir_free(tszError);
}
// log to netlib
- Netlib_LogfT(hNetlibUser, _T("Error! Update cannot continue... Start to free memory"));
- Netlib_LogfT(hNetlibUser, _T("<-- Error occurs while updating station: %s -->"), dbv.ptszVal);
+ Netlib_LogfT(hNetlibUser, L"Error! Update cannot continue... Start to free memory");
+ Netlib_LogfT(hNetlibUser, L"<-- Error occurs while updating station: %s -->", dbv.ptszVal);
if (!dbres) db_free(&dbv);
return 1;
}
@@ -104,7 +104,7 @@ int UpdateWeather(MCONTACT hContact) if (!dbres && dbv.ptszVal[0] != 0) {
if (opt.AlertPopup && !db_get_b(hContact, WEATHERPROTONAME, "DPopUp", 0) && Ch) {
// display alert popup
- mir_sntprintf(str, _T("Alert for %s%c%s"), winfo.city, 255, dbv.ptszVal);
+ mir_sntprintf(str, L"Alert for %s%c%s", winfo.city, 255, dbv.ptszVal);
WPShowMessage(str, SM_WEATHERALERT);
}
// alert issued, set display to italic
@@ -172,7 +172,7 @@ int UpdateWeather(MCONTACT hContact) DeleteFile(dbv.ptszVal);
// open the file and set point to the end of file
- FILE *file = _tfopen(dbv.ptszVal, _T("a"));
+ FILE *file = _tfopen(dbv.ptszVal, L"a");
db_free(&dbv);
if (file != NULL) {
// write data to the file and close
@@ -203,8 +203,8 @@ int UpdateWeather(MCONTACT hContact) NotifyEventHooks(hHookWeatherUpdated, hContact, (LPARAM)Ch);
}
- Netlib_LogfT(hNetlibUser, _T("Update Completed - Start to free memory"));
- Netlib_LogfT(hNetlibUser, _T("<-- Update successful for station -->"));
+ Netlib_LogfT(hNetlibUser, L"Update Completed - Start to free memory");
+ Netlib_LogfT(hNetlibUser, L"<-- Update successful for station -->");
// Update frame data
UpdateMwinData(hContact);
@@ -437,7 +437,7 @@ int GetWeatherData(MCONTACT hContact) mir_free(szData);
return retval;
}
- if (_tcsstr(szData, _T("Document Not Found")) != NULL) {
+ if (_tcsstr(szData, L"Document Not Found") != NULL) {
mir_free(szData);
return DOC_NOT_FOUND;
}
@@ -458,7 +458,7 @@ int GetWeatherData(MCONTACT hContact) // if it is a normal item with start= and end=, then parse through the downloaded string
// to get a data value.
GetDataValue(&Item->Item, DataValue, &szInfo);
- if (mir_tstrcmp(Item->Item.Name, _T("Condition")) && mir_tstrcmpi(Item->Item.Unit, _T("Cond")))
+ if (mir_tstrcmp(Item->Item.Name, L"Condition") && mir_tstrcmpi(Item->Item.Unit, L"Cond"))
_tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1);
break;
@@ -476,7 +476,7 @@ int GetWeatherData(MCONTACT hContact) // go through each part of the operation string seperated by the & operator
do {
// the end of the string, last item
- chop = _tcsstr(str, _T(" & "));
+ chop = _tcsstr(str, L" & ");
if (chop == NULL)
chop = _tcschr(str, '\0');
@@ -543,17 +543,17 @@ int GetWeatherData(MCONTACT hContact) // don't store data if it is not available
if ((DataValue[0] != 0 && mir_tstrcmp(DataValue, NODATA) &&
- mir_tstrcmp(DataValue, TranslateTS(NODATA)) && mir_tstrcmp(Item->Item.Name, _T("Ignore"))) ||
- (!mir_tstrcmp(Item->Item.Name, _T("Alert")) && i == 0)) {
+ mir_tstrcmp(DataValue, TranslateTS(NODATA)) && mir_tstrcmp(Item->Item.Name, L"Ignore")) ||
+ (!mir_tstrcmp(Item->Item.Name, L"Alert") && i == 0)) {
// temporary workaround for mToolTip to show feel-like temperature
- if (!mir_tstrcmp(Item->Item.Name, _T("Feel")))
+ if (!mir_tstrcmp(Item->Item.Name, L"Feel"))
db_set_ts(hContact, WEATHERCONDITION, "Heat Index", DataValue);
GetStationID(hContact, Svc, _countof(Svc));
if (!mir_tstrcmp(Svc, opt.Default))
db_set_ts(NULL, DEFCURRENTWEATHER, _T2A(Item->Item.Name), DataValue);
- if (!mir_tstrcmp(Item->Item.Name, _T("Condition"))) {
+ if (!mir_tstrcmp(Item->Item.Name, L"Condition")) {
TCHAR buf[128], *cbuf;
- mir_sntprintf(buf, _T("#%s Weather"), DataValue);
+ mir_sntprintf(buf, L"#%s Weather", DataValue);
cbuf = TranslateTS(buf);
if (cbuf[0] == '#')
cbuf = TranslateTS(DataValue);
@@ -561,9 +561,9 @@ int GetWeatherData(MCONTACT hContact) CharLowerBuff(DataValue, (DWORD)mir_tstrlen(DataValue));
cond = GetIcon(DataValue, Data);
}
- else if (mir_tstrcmpi(Item->Item.Unit, _T("Cond")) == 0) {
+ else if (mir_tstrcmpi(Item->Item.Unit, L"Cond") == 0) {
TCHAR buf[128], *cbuf;
- mir_sntprintf(buf, _T("#%s Weather"), DataValue);
+ mir_sntprintf(buf, L"#%s Weather", DataValue);
cbuf = TranslateTS(buf);
if (cbuf[0] == '#')
cbuf = TranslateTS(DataValue);
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index 22b185c261..b1538f332e 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -67,7 +67,7 @@ static void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact) GetDisplay(&winfo, opt.bText, str);
SetDlgItemText(hwndDlg, IDC_MTEXT, str);
- GetDisplay(&winfo, _T("%c, %t"), str);
+ GetDisplay(&winfo, L"%c, %t", str);
SetWindowText(hwndDlg, winfo.city);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, str);
}
@@ -177,7 +177,7 @@ static INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, L LV_ITEM lvi = { 0 };
lvi.mask = LVIF_TEXT | LVIF_PARAM;
lvi.lParam = 1;
- lvi.pszText = _T("");
+ lvi.pszText = L"";
lvi.iItem = ListView_InsertItem(hList, &lvi);
lvi.pszText = TranslateT("Retrieving new data, please wait...");
ListView_SetItemText(hList, lvi.iItem, 1, lvi.pszText);
@@ -267,11 +267,11 @@ static INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPA SendDlgItemMessage(hwndDlg, IDC_INFO2, WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), 0);
}
// set the text for displaying other current weather conditions data
- GetDisplay(&w, _T("%c %t"), str);
+ GetDisplay(&w, L"%c %t", str);
SetDlgItemText(hwndDlg, IDC_INFO2, str);
SetDlgItemText(hwndDlg, IDC_INFO3, w.feel);
SetDlgItemText(hwndDlg, IDC_INFO4, w.pressure);
- GetDisplay(&w, _T("%i %w"), str);
+ GetDisplay(&w, L"%i %w", str);
SetDlgItemText(hwndDlg, IDC_INFO5, str);
SetDlgItemText(hwndDlg, IDC_INFO6, w.dewpoint);
SetDlgItemText(hwndDlg, IDC_INFO7, w.sunrise);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 337c5ff94a..fbdc6e9442 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -132,7 +132,7 @@ extern "C" int __declspec(dllexport) Load() HookEvent(ME_CLIST_DOUBLECLICKED, Doubleclick);
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- hRichEd = LoadLibrary(_T("Msftedit.dll"));
+ hRichEd = LoadLibrary(L"Msftedit.dll");
/*TIMERS*/
if ((db_get_dw(NULL, MODULENAME, REFRESH_KEY, TIME) != 0)) {
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 361afbba7c..74c4c28809 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -96,7 +96,7 @@ void TxtclrLoop() {
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, NULL, 1);
}
}
@@ -106,7 +106,7 @@ void BGclrLoop() {
for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
SendDlgItemMessage(hwndDlg, IDC_DATA, EM_SETBKGNDCOLOR, 0, BackgoundClr);
InvalidateRect(hwndDlg, NULL, 1);
}
@@ -222,7 +222,7 @@ int SendToRichEdit(HWND hWindow, char *truncated, COLORREF rgbText, COLORREF rgb DWORD italic = 0;
DWORD underline = 0;
- SetDlgItemText(hWindow, IDC_DATA, _T(""));
+ SetDlgItemText(hWindow, IDC_DATA, L"");
CHARFORMAT2 cfFM;
memset(&cfFM, 0, sizeof(cfFM));
diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h index c09e9f88b8..82a264fc1b 100644 --- a/plugins/WebView/src/webview.h +++ b/plugins/WebView/src/webview.h @@ -104,7 +104,7 @@ #define TIME 60
#define Def_color_bg 0x00ffffff
#define Def_color_txt 0x00000000
-#define Def_font_face _T("Courier")
+#define Def_font_face L"Courier"
#define Def_font_size 14
#define HK_SHOWHIDE 3001
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 706c6b8627..6397413cda 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -188,11 +188,11 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) TCHAR *ptszContactName = pcli->pfnGetContactDisplayName(hContact, 0);
if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_sntprintf(newdisplaytext, _T("%s\n%s"), ptszContactName, displaytext);
+ mir_sntprintf(newdisplaytext, L"%s\n%s", ptszContactName, displaytext);
PUShowMessageT(newdisplaytext, SM_WARNING);
}
else if ( ServiceExists("OSD/Announce") && db_get_b(NULL, MODULENAME, ERROR_POPUP_KEY, 0)) {
- mir_sntprintf(newdisplaytext, _T("%s: %s"), ptszContactName, TranslateTS(displaytext));
+ mir_sntprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateTS(displaytext));
CallService("OSD/Announce", (WPARAM)newdisplaytext, 0);
}
else if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) {
@@ -357,7 +357,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn //
if ((!notpresent)) {
if (alertIndex == 0) { // popup
- mir_sntprintf(displaystring, _T("%s \"%S\" %s."), Translate("The string"), alertstring, Translate("has been found on the web page"));
+ mir_sntprintf(displaystring, L"%s \"%S\" %s.", Translate("The string"), alertstring, Translate("has been found on the web page"));
WAlertPopup(hContact, displaystring);
// contactlist name//
@@ -397,7 +397,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
else if (alertIndex == 3) {
- mir_sntprintf(displaystring, _T("%s \"%s\" %s."), TranslateT("The string"), alertstring, TranslateT("has been found on the web page"));
+ mir_sntprintf(displaystring, L"%s \"%s\" %s.", TranslateT("The string"), alertstring, TranslateT("has been found on the web page"));
WAlertOSD(hContact, displaystring);
// contactlist name//
@@ -426,12 +426,12 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn cacheend++;
*cacheend = '\0';
- mir_sntprintf(cachedirectorypath, _T("%s%S%S"), cachepath, MODULENAME, "cache\\");
+ mir_sntprintf(cachedirectorypath, L"%s%S%S", cachepath, MODULENAME, "cache\\");
CreateDirectory(cachedirectorypath, NULL);
- mir_sntprintf(newcachepath, _T("%s%S%S%S%S"), cachepath, MODULENAME, "cache\\", contactname, ".txt");
+ mir_sntprintf(newcachepath, L"%s%S%S%S%S", cachepath, MODULENAME, "cache\\", contactname, ".txt");
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
- if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"r")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot read from file"));
else {
memset(&cachecompare, 0, sizeof(cachecompare));
@@ -440,7 +440,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
// write to cache
- if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"w")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 1"));
else {
fwrite(tempraw, mir_strlen(tempraw), 1, pcachefile); //smaller cache
@@ -638,12 +638,12 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn cacheend++;
*cacheend = '\0';
- mir_sntprintf(cachedirectorypath, _T("%s%S%S"), cachepath, MODULENAME, "cache\\");
+ mir_sntprintf(cachedirectorypath, L"%s%S%S", cachepath, MODULENAME, "cache\\");
CreateDirectory(cachedirectorypath, NULL);
- mir_sntprintf(newcachepath, _T("%s%S%S%S%S"), cachepath, MODULENAME, "cache\\", contactname, ".txt");
+ mir_sntprintf(newcachepath, L"%s%S%S%S%S", cachepath, MODULENAME, "cache\\", contactname, ".txt");
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
- if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"r")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot read from file"));
else {
memset(&cachecompare, 0, sizeof(cachecompare));
@@ -652,7 +652,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
// write to cache
- if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
+ if ((pcachefile = _tfopen(newcachepath, L"w")) == NULL)
WErrorPopup((UINT_PTR)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, mir_strlen(raw), 1, pcachefile); //smaller cache
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 78c8a99581..da1314d9a1 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -117,7 +117,7 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara /*****************************************************************************/
-static TCHAR tszSizeString[] = _T("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+static TCHAR tszSizeString[] = L"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
static MCONTACT FindContactByUrl(HWND hwndDlg)
{
@@ -212,7 +212,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA txtcolor = TextClr;
- SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
+ SetDlgItemText(hwndDlg, IDC_DATA, L"");
InvalidateRect(hwndDlg, NULL, 1);
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index b0a8f1bee3..dc894668fd 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -55,7 +55,7 @@ TCHAR* FixButtonText(TCHAR *url, size_t len) int posafter = (stringafter - buttontext) + 1;
strdelt(stringafter, 1);
_tcsncpy_s(stringbefore, pos, buttontext, _TRUNCATE);
- mir_sntprintf(newbuttontext, _T("%s!!%s"), stringbefore, stringafter);
+ mir_sntprintf(newbuttontext, L"%s!!%s", stringbefore, stringafter);
posafter = 0;
posbefore = 0;
@@ -170,11 +170,11 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) break;
case IDC_PD1:
- SetDlgItemText(hdlg, IDC_DELAY, _T("0"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"0");
break;
case IDC_PD2:
// Popup delay = permanent
- SetDlgItemText(hdlg, IDC_DELAY, _T("-1"));
+ SetDlgItemText(hdlg, IDC_DELAY, L"-1");
break;
case IDC_DELAY:
@@ -446,12 +446,12 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwndDlg;
ofn.hInstance = NULL;
- ofn.lpstrFilter = _T("TEXT Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0");
+ ofn.lpstrFilter = L"TEXT Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0\0";
ofn.lpstrFile = szFileName;
ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
ofn.nMaxFile = _countof(szFileName);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("txt");
+ ofn.lpstrDefExt = L"txt";
if (!GetSaveFileName(&ofn))
break;
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 088f65c69d..537c83fe86 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -85,16 +85,16 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) TCHAR *cacheend = _tcsrchr(cachepath, '\\'); cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\"), cachepath); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\", cachepath); CreateDirectory(cachedirectorypath, NULL); TCHAR newcachepath[MAX_PATH + 50], renamedcachepath[MAX_PATH + 50]; - mir_sntprintf(newcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, oldName); - mir_sntprintf(renamedcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, nick); + mir_sntprintf(newcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, oldName); + mir_sntprintf(renamedcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, nick); // file exists? if ( _taccess(newcachepath, 0) != -1) { - FILE *pcachefile = _tfopen(newcachepath, _T("r")); + FILE *pcachefile = _tfopen(newcachepath, L"r"); if (pcachefile != NULL) { fclose(pcachefile); if (mir_tstrcmp(newcachepath, renamedcachepath)) { @@ -124,12 +124,12 @@ int SiteDeleted(WPARAM wParam, LPARAM) cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\"), cachepath); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\", cachepath); CreateDirectory(cachedirectorypath, NULL); - mir_sntprintf(newcachepath, _T("%s")_T(MODULENAME)_T("cache\\%s.txt"), cachepath, contactName); + mir_sntprintf(newcachepath, L"%s" MODULENAME L"cache\\%s.txt", cachepath, contactName); // file exists? if ( _taccess(newcachepath, 0) != -1) { - FILE *pcachefile = _tfopen(newcachepath, _T("r")); + FILE *pcachefile = _tfopen(newcachepath, L"r"); if (pcachefile != NULL) { fclose(pcachefile); DeleteFile(newcachepath); @@ -149,12 +149,12 @@ INT_PTR OpenCacheDir(WPARAM, LPARAM) cacheend++; *cacheend = '\0'; - mir_sntprintf(cachedirectorypath, _T("%s")_T(MODULENAME)_T("cache\\%s"), cachepath, cacheend); + mir_sntprintf(cachedirectorypath, L"%s" MODULENAME L"cache\\%s", cachepath, cacheend); if( _taccess(cachedirectorypath, 0) != 0) WErrorPopup((UINT_PTR)"ERROR", TranslateT("Cache folder does not exist.")); else - ShellExecute(NULL, _T("open"), cachedirectorypath, NULL, NULL, SW_SHOWNORMAL); + ShellExecute(NULL, L"open", cachedirectorypath, NULL, NULL, SW_SHOWNORMAL); return 0; } @@ -173,7 +173,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM) TCHAR Cnick[200], *Oldnick; _tcsncpy(Cnick, url, _countof(Cnick)); - if ((Oldnick = _tcsstr(Cnick, _T("://"))) != 0) + if ((Oldnick = _tcsstr(Cnick, L"://")) != 0) Oldnick += 3; else Oldnick = Cnick; @@ -181,7 +181,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM) TCHAR *Nend = _tcschr(Oldnick, '/'); if (Nend) *Nend = '\0'; - ShellExecute(NULL, _T("open"), _T("psite.bat"), Oldnick, NULL, SW_HIDE); + ShellExecute(NULL, L"open", L"psite.bat", Oldnick, NULL, SW_HIDE); return 0; } @@ -384,17 +384,17 @@ INT_PTR AddToList(WPARAM, LPARAM lParam) else Cnick[0] = 0; - TCHAR *Oldnick = _tcsstr(Cnick, _T("://")); + TCHAR *Oldnick = _tcsstr(Cnick, L"://"); if (Oldnick != 0) Oldnick += 3; else Oldnick = Cnick; - TCHAR *Newnick = _tcsstr(Oldnick, _T("www.")); + TCHAR *Newnick = _tcsstr(Oldnick, L"www."); if (Newnick != 0) Newnick += 4; else { - Newnick = _tcsstr(Oldnick, _T("WWW.")); + Newnick = _tcsstr(Oldnick, L"WWW."); if (Newnick != 0) Newnick += 4; else diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index f7f3945f39..d3658eb3a8 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -195,7 +195,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara SetDlgItemText(hWnd, IDC_DAYS_IN_ADVANCE, buffer);
_itot(commonData.checkInterval, buffer, 10);
SetDlgItemText(hWnd, IDC_CHECK_INTERVAL, buffer);
- mir_sntprintf(buffer, _T("%d|%d"), commonData.popupTimeout, commonData.popupTimeoutToday);
+ mir_sntprintf(buffer, L"%d|%d", commonData.popupTimeout, commonData.popupTimeoutToday);
SetDlgItemText(hWnd, IDC_POPUP_TIMEOUT, buffer);
_itot(commonData.cSoundNearDays, buffer, 10);
SetDlgItemText(hWnd, IDC_SOUND_NEAR_DAYS_EDIT, buffer);
@@ -436,7 +436,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l switch (loc) {
case DOB_MBIRTHDAY:
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_MBIRTHDAY);
- szCurrentModuleTooltip = _T("mBirthday");
+ szCurrentModuleTooltip = L"mBirthday";
break;
case DOB_PROTOCOL:
@@ -447,17 +447,17 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l case DOB_BIRTHDAYREMINDER:
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_BIRTHDAYREMINDER);
- szCurrentModuleTooltip = _T("Birthday Reminder");
+ szCurrentModuleTooltip = L"Birthday Reminder";
break;
case DOB_USERINFO:
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_USERINFO);
- szCurrentModuleTooltip = _T("UserInfo");
+ szCurrentModuleTooltip = L"UserInfo";
break;
case DOB_MICQBIRTHDAY:
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_MICQBIRTHDAY);
- szCurrentModuleTooltip = _T("mICQBirthday");
+ szCurrentModuleTooltip = L"mICQBirthday";
break;
default:
@@ -519,11 +519,11 @@ void AddAnchorWindowToDeferList(HDWP &hdWnds, HWND window, RECT *rParent, WINDOW TCHAR* GetBirthdayModule(int module, MCONTACT)
{
switch (module) {
- case DOB_MBIRTHDAY: return _T("mBirthday");
+ case DOB_MBIRTHDAY: return L"mBirthday";
case DOB_PROTOCOL: return TranslateT("Protocol module");
- case DOB_BIRTHDAYREMINDER: return _T("Birthday Reminder");
- case DOB_USERINFO: return _T("UserInfo");
- case DOB_MICQBIRTHDAY: return _T("mICQBirthday");
+ case DOB_BIRTHDAYREMINDER: return L"Birthday Reminder";
+ case DOB_USERINFO: return L"UserInfo";
+ case DOB_MICQBIRTHDAY: return L"mICQBirthday";
}
return NA;
}
@@ -609,20 +609,20 @@ int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll, TCHAR buffer[2048];
if ((dtb <= 366) && (dtb >= 0))
- mir_sntprintf(buffer, _T("%d"), dtb);
+ mir_sntprintf(buffer, L"%d", dtb);
else
mir_sntprintf(buffer, NA);
ListView_SetItemText(hList, entry, 2, buffer);
if ((month != 0) && (day != 0))
- mir_sntprintf(buffer, _T("%04d-%02d-%02d"), year, month, day);
+ mir_sntprintf(buffer, L"%04d-%02d-%02d", year, month, day);
else
mir_sntprintf(buffer, NA);
ListView_SetItemText(hList, entry, 3, buffer);
if (age < 400 && age > 0) //hopefully noone lives longer than this :)
- mir_sntprintf(buffer, _T("%d"), age);
+ mir_sntprintf(buffer, L"%d", age);
else
mir_sntprintf(buffer, NA);
@@ -914,9 +914,9 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar ListView_InsertItem(hList, &item);
TCHAR buffer[512];
- mir_sntprintf(buffer, _T("%d"), data->age);
+ mir_sntprintf(buffer, L"%d", data->age);
ListView_SetItemText(hList, index, 1, buffer);
- mir_sntprintf(buffer, _T("%d"), data->dtb);
+ mir_sntprintf(buffer, L"%d", data->dtb);
ListView_SetItemText(hList, index, 2, buffer);
BirthdaysSortParams params = { 0 };
diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index f6d27f5a5f..8eeaf21b6a 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -217,7 +217,7 @@ INT_PTR ImportBirthdaysService(WPARAM, LPARAM) of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c"), TranslateT("Birthdays files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*" _T(BIRTHDAY_EXTENSION) L")%c*" _T(BIRTHDAY_EXTENSION) L"%c", TranslateT("Birthdays files"), 0, 0);
of.lpstrFilter = filter;
of.lpstrFile = fileName;
of.nMaxFile = _countof(fileName);
@@ -242,7 +242,7 @@ INT_PTR ExportBirthdaysService(WPARAM, LPARAM) of.lStructSize = sizeof(OPENFILENAME);
//of.hInstance = hInstance;
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*") _T(BIRTHDAY_EXTENSION) _T(")%c*") _T(BIRTHDAY_EXTENSION) _T("%c%s (*.*)%c*.*%c"), TranslateT("Birthdays files"), 0, 0, TranslateT("All Files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*" _T(BIRTHDAY_EXTENSION) L")%c*" _T(BIRTHDAY_EXTENSION) L"%c%s (*.*)%c*.*%c", TranslateT("Birthdays files"), 0, 0, TranslateT("All Files"), 0, 0);
of.lpstrFilter = filter;
of.lpstrFile = fileName;
of.nMaxFile = _countof(fileName);
@@ -265,7 +265,7 @@ INT_PTR ExportBirthdaysService(WPARAM, LPARAM) int DoImport(TCHAR *fileName)
{
- FILE *fin = _tfopen(fileName, _T("rt"));
+ FILE *fin = _tfopen(fileName, L"rt");
if (!fin) {
MessageBox(0, TranslateT("Could not open file to import birthdays"), TranslateT("Error"), MB_OK | MB_ICONERROR);
return 1;
@@ -279,7 +279,7 @@ int DoImport(TCHAR *fileName) if (buffer[0] == _T(COMMENT_CHAR))
continue;
- TCHAR *delAccount = _tcsstr(buffer, _T(" : "));
+ TCHAR *delAccount = _tcsstr(buffer, L" : ");
if (delAccount) {
int tmp = delAccount[0];
delAccount[0] = _T('\0');
@@ -295,7 +295,7 @@ int DoImport(TCHAR *fileName) delAccount[0] = tmp;
int year, month, day;
- _stscanf(delAccount, _T(" : %02d/%02d/%04d"), &day, &month, &year);
+ _stscanf(delAccount, L" : %02d/%02d/%04d", &day, &month, &year);
SaveBirthday(hContact, year, month, day, mode);
}
else {
@@ -312,14 +312,14 @@ int DoImport(TCHAR *fileName) int DoExport(TCHAR *fileName)
{
- FILE *fout = _tfopen(fileName, _T("wt"));
+ FILE *fout = _tfopen(fileName, L"wt");
if (!fout) {
MessageBox(0, TranslateT("Could not open file to export birthdays"), TranslateT("Error"), MB_OK | MB_ICONERROR);
return 1;
}
- _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("Please do not edit this file by hand. Use the export function of WhenWasIt plugin.\n"));
- _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
- _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
+ _ftprintf(fout, L"%c%s", _T(COMMENT_CHAR), TranslateT("Please do not edit this file by hand. Use the export function of WhenWasIt plugin.\n"));
+ _ftprintf(fout, L"%c%s", _T(COMMENT_CHAR), TranslateT("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
+ _ftprintf(fout, L"%c%s", _T(COMMENT_CHAR), TranslateT("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int year, month, day;
diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index b02d918ef1..2a1c189c9b 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -19,12 +19,12 @@ PWumf new_wumf( DWORD dwID, w->szUNC = mir_tstrdup(szUNC);
switch(dwPerm) {
- case PERM_FILE_READ: mir_tstrcpy(w->szPerm, _T("Read"));break;
- case PERM_FILE_WRITE: mir_tstrcpy(w->szPerm, _T("Write"));break;
- case PERM_FILE_CREATE: mir_tstrcpy(w->szPerm, _T("Create"));break;
- default: mir_tstrcpy(w->szPerm, _T("Execute"));
+ case PERM_FILE_READ: mir_tstrcpy(w->szPerm, L"Read");break;
+ case PERM_FILE_WRITE: mir_tstrcpy(w->szPerm, L"Write");break;
+ case PERM_FILE_CREATE: mir_tstrcpy(w->szPerm, L"Create");break;
+ default: mir_tstrcpy(w->szPerm, L"Execute");
}
- mir_sntprintf(w->szID, _T("%i"), dwID);
+ mir_sntprintf(w->szID, L"%i", dwID);
w->dwID = dwID;
w->dwSess = dwSess;
diff --git a/plugins/WhoUsesMyFiles/src/stdafx.h b/plugins/WhoUsesMyFiles/src/stdafx.h index a8b3772cc5..1369af3336 100644 --- a/plugins/WhoUsesMyFiles/src/stdafx.h +++ b/plugins/WhoUsesMyFiles/src/stdafx.h @@ -127,6 +127,6 @@ void process_session(SESSION_INFO_1 s_info); void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info);
void printError(DWORD res);
-#define msg(X) MessageBox(NULL, X, _T("WUMF"), MB_OK|MB_ICONSTOP)
+#define msg(X) MessageBox(NULL, X, L"WUMF", MB_OK|MB_ICONSTOP)
#define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup"
#define MS_WUMF_CONNECTIONSSHOW "WUMF/ShowConnections"
diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index 17e89fbc6b..730fbc152f 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -72,7 +72,7 @@ INT_PTR CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) lvc.mask = LVCF_TEXT|LVCF_FMT|LVCF_WIDTH;
lvc.fmt = LVCFMT_LEFT;
lvc.cx = 40;
- lvc.pszText = _T("ID");
+ lvc.pszText = L"ID";
ListView_InsertColumn(hList, 0, &lvc);
lvc.cx = 50;
lvc.pszText = TranslateT("User");
@@ -88,7 +88,7 @@ INT_PTR CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) if (IsUserAnAdmin())
SetTimer(NULL, 777, TIME, TimerProc);
else
- MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), _T("Miranda NG"), MB_OK);
+ MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), L"Miranda NG", MB_OK);
ShowList(lst, hList);
}
Utils_RestoreWindowPosition(hWnd, NULL, MODULENAME,"conn");
@@ -137,10 +137,10 @@ void LogWumf(PWumf w) if (!WumfOptions.LogFolders && (w->dwAttr & FILE_ATTRIBUTE_DIRECTORY)) return;
if (hLogger == NULL) {
- hLogger = mir_createLog("wumf", _T("WhoIsUsingMyFiles log file"), WumfOptions.LogFile, 0);
+ hLogger = mir_createLog("wumf", L"WhoIsUsingMyFiles log file", WumfOptions.LogFile, 0);
if (hLogger == NULL) {
TCHAR str[256];
- mir_sntprintf(str, _T("Can't open log file %s"), WumfOptions.LogFile);
+ mir_sntprintf(str, L"Can't open log file %s", WumfOptions.LogFile);
MessageBox(NULL, str, TranslateT("Error opening file"), MB_OK | MB_ICONSTOP);
WumfOptions.LogToFile = FALSE;
return;
@@ -153,7 +153,7 @@ void LogWumf(PWumf w) TCHAR lpDateStr[20], lpTimeStr[20];
GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &time, NULL, lpDateStr, 20);
GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &time, NULL, lpTimeStr, 20);
- mir_writeLogT(hLogger, _T("%s %s %20s\t%s\r\n"), lpDateStr, lpTimeStr, w->szUser, w->szPath);
+ mir_writeLogT(hLogger, L"%s %s %20s\t%s\r\n", lpDateStr, lpTimeStr, w->szUser, w->szPath);
}
BOOL wumf()
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 541ce7dfa6..5d9bfde86d 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -68,11 +68,11 @@ void ExecuteMenu(HWND hWnd) msg(TranslateT("Error creating menu"));
return;
}
- AppendMenu(hMenu, MF_STRING, IDM_ABOUT, _T("About\0"));
+ AppendMenu(hMenu, MF_STRING, IDM_ABOUT, L"About\0");
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);//------------------
- AppendMenu(hMenu, MF_STRING, IDM_SHOW, _T("Show connections\0"));
+ AppendMenu(hMenu, MF_STRING, IDM_SHOW, L"Show connections\0");
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);//------------------
- AppendMenu(hMenu, MF_STRING, IDM_EXIT, _T("Dismiss popup\0"));
+ AppendMenu(hMenu, MF_STRING, IDM_EXIT, L"Dismiss popup\0");
POINT point;
GetCursorPos(&point);
@@ -119,8 +119,8 @@ void ShowWumfPopup(PWumf w) TCHAR text[512], title[512];
if (!WumfOptions.AlertFolders && (w->dwAttr & FILE_ATTRIBUTE_DIRECTORY)) return;
- mir_sntprintf(title, _T("%s (%s)"), w->szComp, w->szUser);
- mir_sntprintf(text, _T("%s (%s)"), w->szPath, w->szPerm);
+ mir_sntprintf(title, L"%s (%s)", w->szComp, w->szUser);
+ mir_sntprintf(text, L"%s (%s)", w->szPath, w->szPerm);
ShowThePopup(w, title, text);
}
@@ -161,28 +161,28 @@ void ShowThePreview() }
if (WumfOptions.AlertFolders) {
- ShowThePopup(NULL, _T("Guest"), _T("C:\\My Share"));
+ ShowThePopup(NULL, L"Guest", L"C:\\My Share");
Sleep(300);
- ShowThePopup(NULL, _T("Guest"), _T("C:\\My Share\\Photos"));
+ ShowThePopup(NULL, L"Guest", L"C:\\My Share\\Photos");
Sleep(300);
}
- ShowThePopup(NULL, _T("Guest"), _T("C:\\Share\\My Photos\\photo.jpg"));
+ ShowThePopup(NULL, L"Guest", L"C:\\Share\\My Photos\\photo.jpg");
Sleep(300);
if (WumfOptions.AlertFolders) {
- ShowThePopup(NULL, _T("User"), _T("C:\\My Share"));
+ ShowThePopup(NULL, L"User", L"C:\\My Share");
Sleep(300);
- ShowThePopup(NULL, _T("User"), _T("C:\\My Share\\Movies"));
+ ShowThePopup(NULL, L"User", L"C:\\My Share\\Movies");
Sleep(300);
}
- ShowThePopup(NULL, _T("User"), _T("C:\\My Share\\Movies\\The Two Towers.avi"));
+ ShowThePopup(NULL, L"User", L"C:\\My Share\\Movies\\The Two Towers.avi");
Sleep(300);
if (WumfOptions.AlertFolders) {
- ShowThePopup(NULL, _T("Administrator"), _T("C:\\Distributives"));
+ ShowThePopup(NULL, L"Administrator", L"C:\\Distributives");
Sleep(300);
- ShowThePopup(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k"));
+ ShowThePopup(NULL, L"Administrator", L"C:\\Distributives\\Win2k");
Sleep(300);
}
- ShowThePopup(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k\\setup.exe"));
+ ShowThePopup(NULL, L"Administrator", L"C:\\Distributives\\Win2k\\setup.exe");
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
@@ -260,7 +260,7 @@ void ChooseFile(HWND hwndDlg) ofn.hwndOwner = hwndDlg;
ofn.lpstrFile = szFile;
ofn.nMaxFile = _countof(szFile);
- ofn.lpstrFilter = _T("All files (*.*)\0*.*\0Text files (*.txt)\0*.txt\0Log files (*.log)\0*.log\0\0");
+ ofn.lpstrFilter = L"All files (*.*)\0*.*\0Text files (*.txt)\0*.txt\0Log files (*.log)\0*.log\0\0";
ofn.nFilterIndex = 2;
ofn.Flags = OFN_CREATEPROMPT;
// Display the Open dialog box.
@@ -323,7 +323,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara CheckDlgButton(hwndDlg,IDC_LOG_INTO_FILE,BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SEL_FILE), FALSE);
- SetDlgItemText(hwndDlg, IDC_FILE, _T(""));
+ SetDlgItemText(hwndDlg, IDC_FILE, L"");
}
break;
@@ -358,7 +358,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara case IDC_ALERT_COMP:
case IDC_LOG_UNC:
case IDC_ALERT_UNC:
- MessageBox(NULL, TranslateT("Not implemented yet..."), _T("WUMF"), MB_OK | MB_ICONINFORMATION);
+ MessageBox(NULL, TranslateT("Not implemented yet..."), L"WUMF", MB_OK | MB_ICONINFORMATION);
break;
/* end */
case IDC_LOG_INTO_FILE:
@@ -516,7 +516,7 @@ extern "C" __declspec(dllexport) int Load(void) if (IsUserAnAdmin())
SetTimer(NULL, 777, TIME, TimerProc);
else
- MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), _T("Miranda NG"), MB_OK);
+ MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), L"Miranda NG", MB_OK);
return 0;
}
diff --git a/plugins/WinterSpeak/src/SpeechApi40a.cpp b/plugins/WinterSpeak/src/SpeechApi40a.cpp index 3afe7250b8..518e9ed602 100644 --- a/plugins/WinterSpeak/src/SpeechApi40a.cpp +++ b/plugins/WinterSpeak/src/SpeechApi40a.cpp @@ -19,7 +19,7 @@ #include <memory>
//------------------------------------------------------------------------------
-SpeechApi40a::SpeechApi40a() : m_tts_central(0), m_tts_attribs(0), m_state(TextToSpeech::State_Unloaded), m_voice(_T("")), m_volume(50), m_pitch(50), m_rate(50)
+SpeechApi40a::SpeechApi40a() : m_tts_central(0), m_tts_attribs(0), m_state(TextToSpeech::State_Unloaded), m_voice(L""), m_volume(50), m_pitch(50), m_rate(50)
{
}
@@ -212,7 +212,7 @@ bool SpeechApi40a::lexiconDialog(HWND window) //------------------------------------------------------------------------------
std::wstring SpeechApi40a::getDescription()
{
- return _T("Microsoft SAPI v4.0");
+ return L"Microsoft SAPI v4.0";
}
//------------------------------------------------------------------------------
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 072e063b65..34da7e7d13 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -79,7 +79,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDOK:
p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
- if (mir_tstrcmpi(p->path, _T(""))) {
+ if (mir_tstrcmpi(p->path, L"")) {
TCHAR shortpath[MAX_PATH];
PathToRelativeT(p->path, shortpath);
db_set_ts(hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
@@ -94,15 +94,15 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_CHOOSE_SOUND:
{
TCHAR FileName[MAX_PATH];
- TCHAR *tszMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ TCHAR *tszMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
TCHAR tmp[MAX_PATH];
- if (GetModuleHandle(_T("bass_interface.dll")))
- mir_sntprintf(tmp, _T("%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%c"), TranslateT("Sound files"), 0, 0, 0);
+ if (GetModuleHandle(L"bass_interface.dll"))
+ mir_sntprintf(tmp, L"%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%c", TranslateT("Sound files"), 0, 0, 0);
else
- mir_sntprintf(tmp, _T("%s (*.wav)%c*.wav%c%c"), TranslateT("WAV files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.wav)%c*.wav%c%c", TranslateT("WAV files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
@@ -111,7 +111,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
ofn.lpstrInitialDir = tszMirDir;
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(FileName));
@@ -173,7 +173,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0));
db_free(&dbv);
}
- else XSN_Users.insert(new XSN_Data(hContact, _T(""), IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0));
+ else XSN_Users.insert(new XSN_Data(hContact, L"", IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0));
}
else p->ignore = IsDlgButtonChecked(hwndDlg, IDC_CONT_IGNORE_SOUND) ? 1 : 0;
}
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index 45174298eb..6317a5ecb6 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -80,7 +80,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l TCHAR *nick = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
size_t value_max_len = (mir_tstrlen(uid) + mir_tstrlen(nick) + 4);
TCHAR *value = (TCHAR *)mir_alloc(sizeof(TCHAR) * value_max_len);
- mir_sntprintf(value, value_max_len, _T("%s (%s)"), nick, uid);
+ mir_sntprintf(value, value_max_len, L"%s (%s)", nick, uid);
SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_SETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_ADDSTRING, 0, (LPARAM)value), hContact);
mir_free(value);
db_free(&dbvuid);
@@ -116,15 +116,15 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_BUTTON_CHOOSE_SOUND:
{
TCHAR FileName[MAX_PATH];
- TCHAR *tszMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+ TCHAR *tszMirDir = Utils_ReplaceVarsT(L"%miranda_path%");
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
TCHAR tmp[MAX_PATH];
- if (GetModuleHandle(_T("bass_interface.dll")))
- mir_sntprintf(tmp, _T("%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%c"), TranslateT("Sound files"), 0, 0, 0);
+ if (GetModuleHandle(L"bass_interface.dll"))
+ mir_sntprintf(tmp, L"%s (*.wav, *.mp3, *.ogg)%c*.wav;*.mp3;*.ogg%c%c", TranslateT("Sound files"), 0, 0, 0);
else
- mir_sntprintf(tmp, _T("%s (*.wav)%c*.wav%c%c"), TranslateT("WAV files"), 0, 0, 0);
+ mir_sntprintf(tmp, L"%s (*.wav)%c*.wav%c%c", TranslateT("WAV files"), 0, 0, 0);
ofn.lpstrFilter = tmp;
ofn.hwndOwner = 0;
ofn.lpstrFile = FileName;
@@ -133,7 +133,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
ofn.lpstrInitialDir = tszMirDir;
*FileName = '\0';
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(FileName));
@@ -210,7 +210,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l XSN_Users.insert(new XSN_Data(hContact, longpath, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
db_free(&dbv);
}
- else XSN_Users.insert(new XSN_Data(hContact, _T(""), IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
+ else XSN_Users.insert(new XSN_Data(hContact, L"", IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
}
else p->ignore = IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -224,7 +224,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (hdr->code) {
case PSN_APPLY:
for (int i = 0; i < XSN_Users.getCount(); i++) {
- if (mir_tstrcmpi(XSN_Users[i]->path, _T(""))) {
+ if (mir_tstrcmpi(XSN_Users[i]->path, L"")) {
TCHAR shortpath[MAX_PATH];
PathToRelativeT(XSN_Users[i]->path, shortpath);
db_set_ts(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index d43eec86d3..d8ffcb9d97 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -77,7 +77,7 @@ void InitSelfSounds() mir_snprintf(namebuf, "%s%s", protos[i]->szModuleName, selfSounds[j].szName);
TCHAR infobuf[256];
- mir_sntprintf(infobuf, _T("%s [%s]"), TranslateT("Self status"), protos[i]->tszAccountName);
+ mir_sntprintf(infobuf, L"%s [%s]", TranslateT("Self status"), protos[i]->tszAccountName);
SkinAddNewSoundExT(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
}
}
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index 3d7648a76f..004dc1bd1b 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -224,8 +224,8 @@ DWORD ReadStringFromMemory(char **Parser,TCHAR *End,char **StoreTo,TCHAR *DebugS Finder=*Parser; while((*Finder != (TCHAR)0) && (Finder<=End)) Finder++; - mir_sntprintf(Debug, _T("%s: %s,length is %d, remaining %d chars"), DebugString, *Parser, Finder-*Parser, End-Finder); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"%s: %s,length is %d, remaining %d chars", DebugString, *Parser, Finder-*Parser, End-Finder); + MessageBox(NULL,Debug,L"debug",MB_OK); if (Finder>=End) return EACC_FILECOMPATIBILITY; if (Size=Finder-*Parser) @@ -335,8 +335,8 @@ static DWORD ReadNotificationFromMemory(char **Parser, char *End, YAMN_NOTIFICAT if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("NFlags: %04x, remaining %d chars"), Which->Flags, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"NFlags: %04x, remaining %d chars", Which->Flags, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->PopupB = *(COLORREF *)(*Parser); @@ -344,24 +344,24 @@ static DWORD ReadNotificationFromMemory(char **Parser, char *End, YAMN_NOTIFICAT if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("PopupB: %04x, remaining %d chars"), Which->PopupB, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"PopupB: %04x, remaining %d chars", Which->PopupB, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->PopupT = *(COLORREF *)(*Parser); (*Parser) += sizeof(COLORREF); if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("PopupT: %04x, remaining %d chars"), Which->PopupT, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"PopupT: %04x, remaining %d chars", Which->PopupT, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->PopupTime = *(DWORD *)(*Parser); (*Parser) += sizeof(DWORD); if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("PopupTime: %04x, remaining %d chars"), Which->PopupTime, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"PopupTime: %04x, remaining %d chars", Which->PopupTime, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif #ifdef DEBUG_FILEREAD @@ -388,7 +388,7 @@ DWORD ReadMessagesFromMemory(HACCOUNT Which, char **Parser, char *End) char *ReadString; #ifdef DEBUG_FILEREAD - MessageBox(NULL,_T("going to read messages, if any..."),_T("debug"),MB_OK); + MessageBox(NULL,L"going to read messages, if any...",L"debug",MB_OK); #endif do { @@ -412,7 +412,7 @@ DWORD ReadMessagesFromMemory(HACCOUNT Which, char **Parser, char *End) } items = NULL; #ifdef DEBUG_FILEREADMESSAGES - if (Stat=ReadStringFromMemory(Parser,End,&ActualMail->ID,_T("ID"))) + if (Stat=ReadStringFromMemory(Parser,End,&ActualMail->ID,L"ID")) #else if (Stat = ReadStringFromMemory(Parser, End, &ActualMail->ID)) #endif @@ -438,7 +438,7 @@ DWORD ReadMessagesFromMemory(HACCOUNT Which, char **Parser, char *End) do { #if defined(DEBUG_FILEREADMESSAGES) || defined(DEBUG_FILEREAD) - if (Stat=ReadStringFromMemory(Parser,End,&ReadString,_T("Name"))) + if (Stat=ReadStringFromMemory(Parser,End,&ReadString,L"Name")) #else if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) #endif @@ -462,7 +462,7 @@ DWORD ReadMessagesFromMemory(HACCOUNT Which, char **Parser, char *End) items->name = ReadString; #ifdef DEBUG_FILEREADMESSAGES - if (Stat=ReadStringFromMemory(Parser,End,&ReadString,_T("Value"))) + if (Stat=ReadStringFromMemory(Parser,End,&ReadString,L"Value")) #else if (Stat = ReadStringFromMemory(Parser, End, &ReadString)) #endif @@ -490,7 +490,7 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) //Read name of account #ifdef DEBUG_FILEREAD - if (Stat=ReadStringFromMemory(Parser,End,&Which->Name,_T("Name"))) + if (Stat=ReadStringFromMemory(Parser,End,&Which->Name,L"Name")) #else if (Stat = ReadStringFromMemory(Parser, End, &Which->Name)) #endif @@ -500,7 +500,7 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) //Read server parameters #ifdef DEBUG_FILEREAD - if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Name,_T("Server"))) + if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Name,L"Server")) #else if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Name)) #endif @@ -510,17 +510,17 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("Port: %d, remaining %d chars"), Which->Server->Port, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"Port: %d, remaining %d chars", Which->Server->Port, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif #ifdef DEBUG_FILEREAD - if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Login,_T("Login"))) + if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Login,L"Login")) #else if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Login)) #endif return Stat; #ifdef DEBUG_FILEREAD - if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Passwd,_T("Password"))) + if (Stat=ReadStringFromMemory(Parser,End,&Which->Server->Passwd,L"Password")) #else if (Stat = ReadStringFromMemory(Parser, End, &Which->Server->Passwd)) #endif @@ -533,20 +533,20 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("Flags: %04x, remaining %d chars"), Which->Flags, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"Flags: %04x, remaining %d chars", Which->Flags, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->StatusFlags = *(DWORD *)(*Parser); (*Parser) += sizeof(DWORD); #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("STFlags: %04x, remaining %d chars"), Which->StatusFlags, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"STFlags: %04x, remaining %d chars", Which->StatusFlags, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->PluginFlags = *(DWORD *)(*Parser); (*Parser) += sizeof(DWORD); #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("PFlags: %04x, remaining %d chars"), Which->PluginFlags, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"PFlags: %04x, remaining %d chars", Which->PluginFlags, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif //Read account miscellaneous parameters @@ -556,8 +556,8 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("Interval: %d, remaining %d chars"), Which->Interval, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"Interval: %d, remaining %d chars", Which->Interval, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif //Read notification parameters @@ -599,32 +599,32 @@ DWORD ReadAccountFromMemory(HACCOUNT Which, char **Parser, char *End) if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("LastChecked: %04x, remaining %d chars"), Which->LastChecked, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"LastChecked: %04x, remaining %d chars", Which->LastChecked, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->LastSChecked = *(SYSTEMTIME *)(*Parser); (*Parser) += sizeof(SYSTEMTIME); if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("LastSChecked: %04x, remaining %d chars"), Which->LastSChecked, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"LastSChecked: %04x, remaining %d chars", Which->LastSChecked, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->LastSynchronised = *(SYSTEMTIME *)(*Parser); (*Parser) += sizeof(SYSTEMTIME); if (*Parser >= End) return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("LastSynchronised: %04x, remaining %d chars"), Which->LastSynchronised, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"LastSynchronised: %04x, remaining %d chars", Which->LastSynchronised, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif Which->LastMail = *(SYSTEMTIME *)(*Parser); (*Parser) += sizeof(SYSTEMTIME); if (*Parser > End) //WARNING! There's only > at the end of testing return EACC_FILECOMPATIBILITY; #ifdef DEBUG_FILEREAD - mir_sntprintf(Debug, _T("LastMail: %04x, remaining %d chars"), Which->LastMail, End-*Parser); - MessageBox(NULL,Debug,_T("debug"),MB_OK); + mir_sntprintf(Debug, L"LastMail: %04x, remaining %d chars", Which->LastMail, End-*Parser); + MessageBox(NULL,Debug,L"debug",MB_OK); #endif if (*Parser == End) return EACC_ENDOFFILE; diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 68ce7fa9db..80816e0704 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -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, _T("%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 c9ec017cbc..ccd681a1d5 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -704,7 +704,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D nid.hIcon = g_LoadIconEx(2); nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.uCallbackMessage = WM_YAMN_NOTIFYICON; - mir_sntprintf(nid.szTip, _T("%S %s"), ActualAccount->Name, TranslateT("- new mail message(s)")); + mir_sntprintf(nid.szTip, L"%S %s", ActualAccount->Name, TranslateT("- new mail message(s)")); Shell_NotifyIcon(NIM_ADD, &nid); SetTimer(hDlg, TIMER_FLASHING, 500, NULL); } @@ -1575,8 +1575,8 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR if ((nReturnCmd == 1) && (ListView_GetItemState(hList, courRow, LVIS_SELECTED) == 0)) continue; ListView_GetItemText(hList, courRow, 0, headname, _countof(headname)); ListView_GetItemText(hList, courRow, 1, headvalue, _countof(headvalue)); - if (mir_tstrlen(headname)) courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, _T("%s:\t%s\r\n"), headname, headvalue); - else courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, _T("\t%s\r\n"), headvalue); + if (mir_tstrlen(headname)) courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, L"%s:\t%s\r\n", headname, headvalue); + else courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, L"\t%s\r\n", headvalue); } GlobalUnlock(hData); @@ -2256,7 +2256,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR ListView_GetItemText(hList, courRow, 1, subject, _countof(subject)); ListView_GetItemText(hList, courRow, 2, size, _countof(size)); ListView_GetItemText(hList, courRow, 3, date, _countof(date)); - courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, _T("%s\t%s\t%s\t%s\r\n"), from, subject, size, date); + courPos += mir_sntprintf(&buff[courPos], sizeNeeded + 1, L"%s\t%s\t%s\t%s\r\n", from, subject, size, date); } GlobalUnlock(hData); diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp index e074390fac..6655ebd3a9 100644 --- a/plugins/YAMN/src/debug.cpp +++ b/plugins/YAMN/src/debug.cpp @@ -14,21 +14,21 @@ //--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
-TCHAR DebugUserDirectory[MAX_PATH] = _T(".");
+TCHAR DebugUserDirectory[MAX_PATH] = L".";
CRITICAL_SECTION FileAccessCS;
#ifdef DEBUG_SYNCHRO
-TCHAR DebugSynchroFileName2[]=_T("%s\\yamn-debug.synchro.log");
+TCHAR DebugSynchroFileName2[]=L"%s\\yamn-debug.synchro.log";
HANDLE SynchroFile;
#endif
#ifdef DEBUG_COMM
-TCHAR DebugCommFileName2[]=_T("%s\\yamn-debug.comm.log");
+TCHAR DebugCommFileName2[]=L"%s\\yamn-debug.comm.log";
HANDLE CommFile;
#endif
#ifdef DEBUG_DECODE
-TCHAR DebugDecodeFileName2[]=_T("%s\\yamn-debug.decode.log");
+TCHAR DebugDecodeFileName2[]=L"%s\\yamn-debug.decode.log";
HANDLE DecodeFile;
#endif
diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp index bb1c420657..c768ae141f 100644 --- a/plugins/YAMN/src/mails/mime.cpp +++ b/plugins/YAMN/src/mails/mime.cpp @@ -579,7 +579,7 @@ void ParseAPart(APartDataType *data) }
catch(...)
{
- MessageBox(NULL, TranslateT("Translate header error"), _T(""), 0);
+ MessageBox(NULL, TranslateT("Translate header error"), L"", 0);
}
if (data->body) data->bodyLen = (int)mir_strlen(data->body);
}
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index b5cbb99264..bf60915d95 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -63,9 +63,9 @@ static void GetProfileDirectory(TCHAR *szPath, int cbPath) { TCHAR tszOldPath[MAX_PATH]; CallService(MS_DB_GETPROFILEPATHT, _countof(tszOldPath), (LPARAM)tszOldPath); - mir_tstrcat(tszOldPath, _T("\\*.book")); + mir_tstrcat(tszOldPath, L"\\*.book"); - VARST ptszNewPath( _T("%miranda_userdata%")); + VARST ptszNewPath( L"%miranda_userdata%"); SHFILEOPSTRUCT file_op = { NULL, @@ -75,7 +75,7 @@ static void GetProfileDirectory(TCHAR *szPath, int cbPath) FOF_NOERRORUI | FOF_NOCONFIRMATION | FOF_SILENT, false, 0, - _T("") }; + L"" }; SHFileOperation(&file_op); _tcsncpy(szPath, ptszNewPath, cbPath); @@ -126,7 +126,7 @@ BOOL CALLBACK EnumSystemCodePagesProc(LPTSTR cpStr) #ifdef _DEBUG if (!found) { mir_tstrcat(unknownCP, info.CodePageName); - mir_tstrcat(unknownCP, _T("\n")); + mir_tstrcat(unknownCP, L"\n"); } #endif } @@ -207,7 +207,7 @@ void WINAPI g_ReleaseIcon( HICON hIcon ) static void LoadPlugins() { TCHAR szSearchPath[MAX_PATH]; - mir_sntprintf(szSearchPath, _T("%s\\Plugins\\YAMN\\*.dll"), szMirandaDir); + mir_sntprintf(szSearchPath, L"%s\\Plugins\\YAMN\\*.dll", szMirandaDir); hDllPlugins = NULL; @@ -225,11 +225,11 @@ static void LoadPlugins() TCHAR* end = fd.cFileName+len; // get a pointer to the NULL int safe = (end-dot)-1; // figure out how many chars after the dot are "safe", not including NULL - if ((safe != 3) || (mir_tstrcmpi(dot+1, _T("dll")) != 0)) //not bound, however the "dll" string should mean only 3 chars are compared + if ((safe != 3) || (mir_tstrcmpi(dot+1, L"dll") != 0)) //not bound, however the "dll" string should mean only 3 chars are compared continue; TCHAR szPluginPath[MAX_PATH]; - mir_sntprintf(szPluginPath, _T("%s\\Plugins\\YAMN\\%s"), szMirandaDir, fd.cFileName); + mir_sntprintf(szPluginPath, L"%s\\Plugins\\YAMN\\%s", szMirandaDir, fd.cFileName); HINSTANCE hDll = LoadLibrary(szPluginPath); if (hDll == NULL) continue; @@ -265,7 +265,7 @@ extern "C" int __declspec(dllexport) Load(void) YAMN_STATUS = ID_STATUS_OFFLINE; // we get the Miranda Root Path - PathToAbsoluteT( _T("."), szMirandaDir); + PathToAbsoluteT( L".", szMirandaDir); // retrieve the current profile name CallService(MS_DB_GETPROFILENAMET, (WPARAM)_countof(ProfileName), (LPARAM)ProfileName); //not to pass entire array to fcn diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index f754263cc6..d4f06bed62 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -247,7 +247,7 @@ int RegisterPOP3Plugin(WPARAM, LPARAM) //You must first register account, before using this function as YAMN must use CreatePOP3Account function to add new accounts
//But if CreatePOP3Account is not implemented (equals to NULL), YAMN creates account as YAMN's standard HACCOUNT
if (FileName) CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0); //shoud not happen (only for secure)
- FileName = (TCHAR *)CallService(MS_YAMN_GETFILENAME, (WPARAM)_T("pop3"), 0);
+ FileName = (TCHAR *)CallService(MS_YAMN_GETFILENAME, (WPARAM)L"pop3", 0);
switch (CallService(MS_YAMN_READACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName)) {
case EACC_FILEVERSION:
@@ -269,7 +269,7 @@ int RegisterPOP3Plugin(WPARAM, LPARAM) if (ERROR_FILE_NOT_FOUND != GetLastError())
{
TCHAR temp[1024] = { 0 };
- mir_sntprintf(temp, _T("%s\n%s"), TranslateT("Reading file error. File already in use?"), FileName);
+ mir_sntprintf(temp, L"%s\n%s", TranslateT("Reading file error. File already in use?"), FileName);
MessageBox(NULL, temp, TranslateT("YAMN (internal POP3) read error"), MB_OK);
CallService(MS_YAMN_DELETEFILENAME, (WPARAM)FileName, 0);
FileName = NULL;
@@ -344,7 +344,7 @@ DWORD WINAPI WritePOP3Accounts() DWORD ReturnValue = CallService(MS_YAMN_WRITEACCOUNTS, (WPARAM)POP3Plugin, (LPARAM)FileName);
if (ReturnValue == EACC_SYSTEM) {
TCHAR temp[1024] = { 0 };
- mir_sntprintf(temp, _T("%s\n%s"), TranslateT("Error while copying data to disk occurred. Is file in use?"), FileName);
+ mir_sntprintf(temp, L"%s\n%s", TranslateT("Error while copying data to disk occurred. Is file in use?"), FileName);
MessageBox(NULL, temp, TranslateT("POP3 plugin - write file error"), MB_OK);
}
@@ -380,8 +380,8 @@ DWORD WINAPI ReadPOP3Options(HACCOUNT Which, char **Parser, char *End) if (*Parser >= End)
return EACC_FILECOMPATIBILITY;
#ifdef DEBUG_FILEREAD
- mir_sntprintf(Debug, _T("CodePage: %d, remaining %d chars"), ((HPOP3ACCOUNT)Which)->CP, End-*Parser);
- MessageBox(NULL,Debug,_T("debug"),MB_OK);
+ mir_sntprintf(Debug, L"CodePage: %d, remaining %d chars", ((HPOP3ACCOUNT)Which)->CP, End-*Parser);
+ MessageBox(NULL,Debug,L"debug",MB_OK);
#endif
return 0;
}
@@ -1544,12 +1544,12 @@ TCHAR* WINAPI GetErrorString(DWORD Code) mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, TranslateT("Error %d-%d-%d-%d:"), ErrorCode->AppError, ErrorCode->POP3Error, ErrorCode->NetError, ErrorCode->SystemError);
if (ErrorCode->POP3Error)
- mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, _T("%s\n%s"), ErrorString, TranslateTS(POP3Errors[ErrorCode->POP3Error - 1]));
+ mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(POP3Errors[ErrorCode->POP3Error - 1]));
if (ErrorCode->NetError) {
if (ErrorCode->SSL)
- mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, _T("%s\n%s"), ErrorString, TranslateTS(SSLErrors[ErrorCode->NetError - 1]));
+ mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(SSLErrors[ErrorCode->NetError - 1]));
else
- mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, _T("%s\n%s"), ErrorString, TranslateTS(NetlibErrors[ErrorCode->NetError - 4]));
+ mir_sntprintf(ErrorString, ERRORSTR_MAXLEN, L"%s\n%s", ErrorString, TranslateTS(NetlibErrors[ErrorCode->NetError - 4]));
}
return ErrorString;
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index 65730f6391..20ae0c8eac 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -830,7 +830,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP case IDC_BTNAPP:
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*.exe;*.bat;*.cmd;*.com)%c*.exe;*.bat;*.cmd;*.com%c%s (*.*)%c*.*%c"),
+ mir_sntprintf(filter, L"%s (*.exe;*.bat;*.cmd;*.com)%c*.exe;*.bat;*.cmd;*.com%c%s (*.*)%c*.*%c",
TranslateT("Executables"), 0, 0, TranslateT("All Files"), 0, 0);
OPENFILENAME OFNStruct = { 0 };
diff --git a/plugins/YAMN/src/protoplugin.cpp b/plugins/YAMN/src/protoplugin.cpp index 485286c4ea..e2a492d718 100644 --- a/plugins/YAMN/src/protoplugin.cpp +++ b/plugins/YAMN/src/protoplugin.cpp @@ -179,7 +179,7 @@ INT_PTR GetFileNameSvc(WPARAM wParam,LPARAM) if (FileName == NULL)
return NULL;
- mir_sntprintf(FileName, MAX_PATH, _T("%s\\yamn-accounts.%s.%s.book"), UserDirectory, wParam, ProfileName);
+ mir_sntprintf(FileName, MAX_PATH, L"%s\\yamn-accounts.%s.%s.book", UserDirectory, wParam, ProfileName);
return (INT_PTR)FileName;
}
diff --git a/plugins/YAPP/src/message_pump.cpp b/plugins/YAPP/src/message_pump.cpp index 34ff5cc468..000144acc3 100644 --- a/plugins/YAPP/src/message_pump.cpp +++ b/plugins/YAPP/src/message_pump.cpp @@ -30,8 +30,8 @@ unsigned __stdcall MessagePumpThread(void* param) PopupData *pd = (PopupData*)hwndMsg.lParam;
if (enabled && num_popups < MAX_POPUPS) {
- //HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, GetDesktopWindow(), 0, hInst, (LPVOID)hwndMsg.lParam);
- HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
+ //HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, GetDesktopWindow(), 0, hInst, (LPVOID)hwndMsg.lParam);
+ HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, L"Popup", WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
num_popups++;
if (hwndMsg.wParam) // set notifyer handle
SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0);
diff --git a/plugins/YAPP/src/popwin.h b/plugins/YAPP/src/popwin.h index c206ea2176..4087ffb322 100644 --- a/plugins/YAPP/src/popwin.h +++ b/plugins/YAPP/src/popwin.h @@ -1,7 +1,7 @@ #ifndef _POPWIN_INC
#define _POPWIN_INC
-#define POP_WIN_CLASS _T(MODULE) _T("YAPPWindowClass")
+#define POP_WIN_CLASS _T(MODULE) L"YAPPWindowClass"
#define PUM_SETTEXT (WM_USER + 0x020)
#define PUM_GETCONTACT (WM_USER + 0x021)
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 88f6a65cfe..c77273cb5b 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -289,7 +289,7 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) {
POPUPDATAT pd = {0};
- mir_tstrcpy(pd.lptzContactName, lParam == SM_WARNING ? _T("Warning") : _T("Notification"));
+ mir_tstrcpy(pd.lptzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification");
pd.lchIcon = LoadIcon(0, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION);
_tcsncpy(pd.lptzText, _A2T((char *)wParam), MAX_SECONDLINE); pd.lptzText[MAX_SECONDLINE-1] = 0;
CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0);
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index 3068d68baa..9b64c9803b 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -98,8 +98,8 @@ static void InitFonts() mir_tstrcpy(font_id_firstline.name, LPGENT("First line"));
mir_strcpy(font_id_firstline.dbSettingsGroup, MODULE);
mir_strcpy(font_id_firstline.prefix, "FontFirst");
- mir_tstrcpy(font_id_firstline.backgroundGroup, _T("Popups"));
- mir_tstrcpy(font_id_firstline.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_firstline.backgroundGroup, L"Popups");
+ mir_tstrcpy(font_id_firstline.backgroundName, L"Background");
font_id_firstline.order = 0;
FontRegisterT(&font_id_firstline);
@@ -109,8 +109,8 @@ static void InitFonts() mir_tstrcpy(font_id_secondline.name, LPGENT("Second line"));
mir_strcpy(font_id_secondline.dbSettingsGroup, MODULE);
mir_strcpy(font_id_secondline.prefix, "FontSecond");
- mir_tstrcpy(font_id_secondline.backgroundGroup, _T("Popups"));
- mir_tstrcpy(font_id_secondline.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_secondline.backgroundGroup, L"Popups");
+ mir_tstrcpy(font_id_secondline.backgroundName, L"Background");
font_id_secondline.order = 1;
FontRegisterT(&font_id_secondline);
@@ -120,8 +120,8 @@ static void InitFonts() mir_tstrcpy(font_id_time.name, LPGENT("Time"));
mir_strcpy(font_id_time.dbSettingsGroup, MODULE);
mir_strcpy(font_id_time.prefix, "FontTime");
- mir_tstrcpy(font_id_time.backgroundGroup, _T("Popups"));
- mir_tstrcpy(font_id_time.backgroundName, _T("Background"));
+ mir_tstrcpy(font_id_time.backgroundGroup, L"Popups");
+ mir_tstrcpy(font_id_time.backgroundName, L"Background");
font_id_time.order = 2;
FontRegisterT(&font_id_time);
@@ -200,7 +200,7 @@ int ModulesLoaded(WPARAM, LPARAM) LoadModuleDependentOptions();
- if (GetModuleHandle(_T("neweventnotify")))
+ if (GetModuleHandle(L"neweventnotify"))
ignore_gpd_passed_addy = true;
return 0;
diff --git a/plugins/YAPP/src/yapp_history_dlg.cpp b/plugins/YAPP/src/yapp_history_dlg.cpp index 33cb01c1a2..67a1fcaa14 100644 --- a/plugins/YAPP/src/yapp_history_dlg.cpp +++ b/plugins/YAPP/src/yapp_history_dlg.cpp @@ -16,7 +16,7 @@ HWND hHistoryWindow = 0; //the history window
PopupHistoryList lstPopupHistory; //defined in main.cpp
-const TCHAR *szHistoryColumns[] = {_T("Title"), _T("Message"), _T("Timestamp")}; //need to make sure that the string and size vectors have the same number of elements
+const TCHAR *szHistoryColumns[] = {L"Title", L"Message", L"Timestamp"}; //need to make sure that the string and size vectors have the same number of elements
const int cxHistoryColumns[] = {100, 450, 115};
const int cHistoryColumns = sizeof(szHistoryColumns) / sizeof(szHistoryColumns[0]);
@@ -134,7 +134,7 @@ int MatchesFilterCS(const TCHAR *filter, const PopupHistoryData *popupItem) //ca {
TCHAR buffer[1024];
struct tm *myTime = localtime(&popupItem->timestamp);
- _tcsftime(buffer, 1024, _T("%c"), myTime);
+ _tcsftime(buffer, 1024, L"%c", myTime);
match = (_tcsstr(buffer, filter)) ? 1 : match;
}
@@ -169,7 +169,7 @@ int MatchesFilterCI(const TCHAR *filterS, const PopupHistoryData *popupItem) if (!match) //if no match has been found yet try to match the timestamp
{
struct tm *myTime = localtime(&popupItem->timestamp);
- _tcsftime(buffer, 1024, _T("%c"), myTime);
+ _tcsftime(buffer, 1024, L"%c", myTime);
match = (_tcsstr(buffer, filterI)) ? 1 : match;
}
@@ -423,7 +423,7 @@ void AddEventsDefault(HWND hWnd, int, TCHAR *filter, SIG_MATCHESFILTER MatchesFi ListView_InsertItem(hHistoryList, &item);
ListView_SetItemText(hHistoryList, lIndex, 1, popupItem->messageT);
myTime = localtime(&popupItem->timestamp);
- _tcsftime(buffer, 1024, _T("%c"), myTime);
+ _tcsftime(buffer, 1024, L"%c", myTime);
ListView_SetItemText(hHistoryList, lIndex++, 2, buffer);
}
}
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 60916d5673..96d331ceea 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -155,20 +155,20 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) if (id != NULL)
_tcsncpy_s(buf, id, _TRUNCATE);
else
- mir_sntprintf(buf, _T("%p"), hContact);
+ mir_sntprintf(buf, L"%p", hContact);
}
szUtfMsg.append(T2Utf(buf));
break;
case 't':
case 'T':
- _tcsftime(buf, 10, _T("%H:%M"), tm_time);
+ _tcsftime(buf, 10, L"%H:%M", tm_time);
szUtfMsg.append(T2Utf(buf));
break;
case 'd':
case 'D':
- _tcsftime(buf, 12, _T("%d/%m/%Y"), tm_time);
+ _tcsftime(buf, 12, L"%d/%m/%Y", tm_time);
szUtfMsg.append(T2Utf(buf));
break;
@@ -235,7 +235,7 @@ extern "C" int __declspec(dllexport) Load() _tcsncpy(tszForwardTemplate, szForwardTemplate, _countof(tszForwardTemplate));
mir_free(szForwardTemplate);
}
- else _tcsncpy(tszForwardTemplate, _T("%u: %m"), MAXTEMPLATESIZE-1);
+ else _tcsncpy(tszForwardTemplate, L"%u: %m", MAXTEMPLATESIZE-1);
iSplit = db_get_dw(NULL, "yaRelay", "Split", 0);
iSplitMaxSize = db_get_dw(NULL, "yaRelay", "SplitMaxSize", 100);
diff --git a/plugins/ZeroSwitch/src/ZeroSwitch.cpp b/plugins/ZeroSwitch/src/ZeroSwitch.cpp index 651eb7ff77..66263cf52f 100644 --- a/plugins/ZeroSwitch/src/ZeroSwitch.cpp +++ b/plugins/ZeroSwitch/src/ZeroSwitch.cpp @@ -79,20 +79,20 @@ void CreateHelperWnd() wcex.hCursor = NULL;
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wcex.lpszMenuName = NULL;
- wcex.lpszClassName = _T("ZeroSwitchHlp");
+ wcex.lpszClassName = L"ZeroSwitchHlp";
wcex.hIconSm = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if (NULL == RegisterClassEx(&wcex))
return; // wtf
- hDummyWnd = CreateWindow(_T("ZeroSwitchHlp"), _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, hInst, NULL);
+ hDummyWnd = CreateWindow(L"ZeroSwitchHlp", L"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, hInst, NULL);
if (!hDummyWnd)
- UnregisterClass(_T("ZeroSwitchHlp"), hInst);
- hHelperWnd = CreateWindow(_T("ZeroSwitchHlp"), _T("Miranda NG"), WS_OVERLAPPEDWINDOW | WS_VISIBLE, -100, -100, 90, 90, hDummyWnd, NULL, hInst, NULL);
+ UnregisterClass(L"ZeroSwitchHlp", hInst);
+ hHelperWnd = CreateWindow(L"ZeroSwitchHlp", L"Miranda NG", WS_OVERLAPPEDWINDOW | WS_VISIBLE, -100, -100, 90, 90, hDummyWnd, NULL, hInst, NULL);
if (!hHelperWnd)
{
DestroyWindow(hDummyWnd);
- UnregisterClass(_T("ZeroSwitchHlp"), hInst);
+ UnregisterClass(L"ZeroSwitchHlp", hInst);
}
}
@@ -102,7 +102,7 @@ void DestroyHelperWnd() {
DestroyWindow(hHelperWnd);
DestroyWindow(hDummyWnd);
- UnregisterClass(_T("ZeroSwitchHlp"), hInst);
+ UnregisterClass(L"ZeroSwitchHlp", hInst);
}
}
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp index aba815a2fd..e2806a5a0c 100644 --- a/plugins/helpers/gen_helpers.cpp +++ b/plugins/helpers/gen_helpers.cpp @@ -106,7 +106,7 @@ int AddDebugLogMessage(const TCHAR* fmt, ...) mir_vsntprintf(tszText, _countof(tszText), fmt, va);
va_end(va);
#ifdef MODULENAME
- mir_sntprintf(tszFinal, _T("%s: %s"), MODULENAME, tszText);
+ mir_sntprintf(tszFinal, L"%s: %s", MODULENAME, tszText);
#else
_tcsncpy(tszFinal, tszText, _countof(tszFinal));
#endif
diff --git a/plugins/mTextControl/src/FormattedTextDraw.cpp b/plugins/mTextControl/src/FormattedTextDraw.cpp index 0c734a02b8..8bce9290e3 100644 --- a/plugins/mTextControl/src/FormattedTextDraw.cpp +++ b/plugins/mTextControl/src/FormattedTextDraw.cpp @@ -120,7 +120,7 @@ HRESULT CFormattedTextDraw::putTextA(char *newVal) cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
cf.dwEffects = 0;
- _tcsncpy_s(cf.szFaceName, _T("MS Shell Dlg"), _TRUNCATE);
+ _tcsncpy_s(cf.szFaceName, L"MS Shell Dlg", _TRUNCATE);
m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
return S_OK;
@@ -148,7 +148,7 @@ HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal) cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
cf.dwEffects = 0;
- _tcsncpy_s(cf.szFaceName, _T("MS Shell Dlg"), _TRUNCATE);
+ _tcsncpy_s(cf.szFaceName, L"MS Shell Dlg", _TRUNCATE);
m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
return S_OK;
}
diff --git a/plugins/mTextControl/src/ImageDataObjectHlp.cpp b/plugins/mTextControl/src/ImageDataObjectHlp.cpp index a7d8ae6a06..762ccf7322 100644 --- a/plugins/mTextControl/src/ImageDataObjectHlp.cpp +++ b/plugins/mTextControl/src/ImageDataObjectHlp.cpp @@ -72,7 +72,7 @@ HENHMETAFILE CacheIconToEmf(HICON hIcon) emfCache = newItem;
emfCacheSize++;
- HDC emfdc = CreateEnhMetaFile(NULL, NULL, NULL, _T("icon"));
+ HDC emfdc = CreateEnhMetaFile(NULL, NULL, NULL, L"icon");
DrawIconEx(emfdc, 0, 0, (HICON)hIcon, 16, 16, 0, NULL, DI_NORMAL);
emfCache->hIcon = hIcon;
emfCache->hEmf = CloseEnhMetaFile(emfdc);
diff --git a/plugins/mTextControl/src/fancy_rtf.cpp b/plugins/mTextControl/src/fancy_rtf.cpp index e94ef784af..a210632700 100644 --- a/plugins/mTextControl/src/fancy_rtf.cpp +++ b/plugins/mTextControl/src/fancy_rtf.cpp @@ -55,7 +55,7 @@ static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *, ts->TxSendMessage(EM_SETSEL, range.cpMin, -1, &lResult);
ts->TxSendMessage(EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, &lResult);
ts->TxSendMessage(EM_SETSEL, range.cpMin, range.cpMax, &lResult);
- ts->TxSendMessage(EM_REPLACESEL, FALSE, (LPARAM)_T(""), &lResult);
+ ts->TxSendMessage(EM_REPLACESEL, FALSE, (LPARAM)L"", &lResult);
return true;
}
@@ -85,24 +85,24 @@ static bool bbCodeImageFunc(IFormattedTextDraw *ftd, CHARRANGE range, TCHAR *txt static BBCodeInfo bbCodes[] =
{
- { _T("[b]"), 0, bbCodeSimpleFunc, BBS_BOLD_S },
- { _T("[/b]"), 0, bbCodeSimpleFunc, BBS_BOLD_E },
- { _T("[i]"), 0, bbCodeSimpleFunc, BBS_ITALIC_S },
- { _T("[/i]"), 0, bbCodeSimpleFunc, BBS_ITALIC_E },
- { _T("[u]"), 0, bbCodeSimpleFunc, BBS_UNDERLINE_S },
- { _T("[/u]"), 0, bbCodeSimpleFunc, BBS_UNDERLINE_E },
- { _T("[s]"), 0, bbCodeSimpleFunc, BBS_STRIKEOUT_S },
- { _T("[/s]"), 0, bbCodeSimpleFunc, BBS_STRIKEOUT_E },
-
- // { _T("[color="), _T("]"), bbCodeSimpleFunc, BBS_COLOR_S },
- // { _T("[/color]"), 0, bbCodeSimpleFunc, BBS_COLOR_E }
-
- { _T("[$hicon="), _T("$]"), bbCodeImageFunc, 0 }
-
- // { _T("[url]"), _T("[/url]"), bbCodeSimpleFunc, BBS_URL1 },
- // { _T("[url="), _T("]"), bbCodeSimpleFunc, BBS_URL2 },
- // { _T("[url]"), _T("[/url]"), bbCodeSimpleFunc, BBS_IMG1 },
- // { _T("[url="), _T("]"), bbCodeSimpleFunc, BBS_IMG2 },
+ { L"[b]", 0, bbCodeSimpleFunc, BBS_BOLD_S },
+ { L"[/b]", 0, bbCodeSimpleFunc, BBS_BOLD_E },
+ { L"[i]", 0, bbCodeSimpleFunc, BBS_ITALIC_S },
+ { L"[/i]", 0, bbCodeSimpleFunc, BBS_ITALIC_E },
+ { L"[u]", 0, bbCodeSimpleFunc, BBS_UNDERLINE_S },
+ { L"[/u]", 0, bbCodeSimpleFunc, BBS_UNDERLINE_E },
+ { L"[s]", 0, bbCodeSimpleFunc, BBS_STRIKEOUT_S },
+ { L"[/s]", 0, bbCodeSimpleFunc, BBS_STRIKEOUT_E },
+
+ // { L"[color=", L"]", bbCodeSimpleFunc, BBS_COLOR_S },
+ // { L"[/color]", 0, bbCodeSimpleFunc, BBS_COLOR_E }
+
+ { L"[$hicon=", L"$]", bbCodeImageFunc, 0 }
+
+ // { L"[url]", L"[/url]", bbCodeSimpleFunc, BBS_URL1 },
+ // { L"[url=", L"]", bbCodeSimpleFunc, BBS_URL2 },
+ // { L"[url]", L"[/url]", bbCodeSimpleFunc, BBS_IMG1 },
+ // { L"[url=", L"]", bbCodeSimpleFunc, BBS_IMG2 },
};
static int bbCodeCount = sizeof(bbCodes) / sizeof(*bbCodes);
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp index 96c9d4865f..f96175de84 100644 --- a/plugins/mTextControl/src/main.cpp +++ b/plugins/mTextControl/src/main.cpp @@ -60,7 +60,7 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfoEx);
MyCreateTextServices = 0;
- hMsfteditDll = LoadLibrary(_T("msftedit.dll"));
+ hMsfteditDll = LoadLibrary(L"msftedit.dll");
if (hMsfteditDll)
MyCreateTextServices = (pfnMyCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
diff --git a/plugins/mTextControl/src/richeditutils.cpp b/plugins/mTextControl/src/richeditutils.cpp index 16008472f9..d94785d475 100644 --- a/plugins/mTextControl/src/richeditutils.cpp +++ b/plugins/mTextControl/src/richeditutils.cpp @@ -77,7 +77,7 @@ public: HRESULT STDMETHODCALLTYPE GetNewStorage(LPSTORAGE * lplpstg)
{
TCHAR sztName[64];
- mir_sntprintf(sztName, _T("s%u"), this->nextStgId);
+ mir_sntprintf(sztName, L"s%u", this->nextStgId);
if (this->pictStg == NULL)
return STG_E_MEDIUMFULL;
@@ -135,7 +135,7 @@ void LoadRichEdit() wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("NBRichEditProxyWndClass");
+ wcl.lpszClassName = L"NBRichEditProxyWndClass";
wcl.hIconSm = 0;
RegisterClassEx(&wcl);
}
@@ -147,7 +147,7 @@ void UnloadRichEdit() HWND CreateProxyWindow(ITextServices *ts)
{
- HWND hwnd = CreateWindow(_T("NBRichEditProxyWndClass"), _T(""), 0, 0, 0, 0, 0, 0, 0, hInst, 0);
+ HWND hwnd = CreateWindow(L"NBRichEditProxyWndClass", L"", 0, 0, 0, 0, 0, 0, 0, hInst, 0);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)ts);
return hwnd;
}
diff --git a/plugins/wbOSD/src/options.cpp b/plugins/wbOSD/src/options.cpp index 6f9dd76a48..de0c49a6cc 100644 --- a/plugins/wbOSD/src/options.cpp +++ b/plugins/wbOSD/src/options.cpp @@ -11,7 +11,7 @@ Distributed under GNU's GPL 2 or later COLORREF pencustcolors[16];
-const static osdmsg defstr = { _T(""), 0, RGB(0, 0, 0), 0, 0 };
+const static osdmsg defstr = { L"", 0, RGB(0, 0, 0), 0, 0 };
void FillCheckBoxTree(HWND hwndTree, DWORD style)
{
@@ -250,7 +250,7 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam) {
TCHAR buf[20];
- mir_sntprintf(buf, _T("%d %%"), ps->alpha * 100 / 255);
+ mir_sntprintf(buf, L"%d %%", ps->alpha * 100 / 255);
SetDlgItemText(hDlg, IDC_ALPHATXT, buf);
}
@@ -266,7 +266,7 @@ INT_PTR CALLBACK OptDlgProc(HWND hDlg, UINT msg, WPARAM wparam, LPARAM lparam) ps->alpha = SendDlgItemMessage(hDlg, IDC_SLIDER1, TBM_GETPOS, 0, 0);
{
TCHAR buf[20];
- mir_sntprintf(buf, _T("%d %%"), ps->alpha * 100 / 255);
+ mir_sntprintf(buf, L"%d %%", ps->alpha * 100 / 255);
SetDlgItemText(hDlg, IDC_ALPHATXT, buf);
}
goto xxx;
diff --git a/plugins/wbOSD/src/stdafx.h b/plugins/wbOSD/src/stdafx.h index aca31800a0..8e0d3f2248 100644 --- a/plugins/wbOSD/src/stdafx.h +++ b/plugins/wbOSD/src/stdafx.h @@ -40,7 +40,7 @@ Distributed under GNU's GPL 2 or later #define DEFAULT_FNT_CLIPRECISION 2
#define DEFAULT_FNT_QUALITY 1
#define DEFAULT_FNT_PITCHANDFAM 49
-#define DEFAULT_FNT_FACENAME _T("Arial")
+#define DEFAULT_FNT_FACENAME L"Arial"
#define DEFAULT_CLRMSG RGB(255, 100, 0) //fore
#define DEFAULT_CLRSTATUS RGB(40, 160, 255) //fore
@@ -62,7 +62,7 @@ Distributed under GNU's GPL 2 or later #define DEFAULT_ANNOUNCESTATUS 1
#define DEFAULT_ANNOUNCE 0x00000002 //status mask
#define DEFAULT_SHOWMYSTATUS 1
-#define DEFAULT_MESSAGEFORMAT _T("Message from %n: %m")
+#define DEFAULT_MESSAGEFORMAT L"Message from %n: %m"
#define DEFAULT_SHOWMSGWIN 1
#define DEFAULT_SHOWWHEN 0x00000002
diff --git a/plugins/wbOSD/src/wbOSD.cpp b/plugins/wbOSD/src/wbOSD.cpp index 0a9e341244..5159a3b437 100644 --- a/plugins/wbOSD/src/wbOSD.cpp +++ b/plugins/wbOSD/src/wbOSD.cpp @@ -9,13 +9,13 @@ Distributed under GNU's GPL 2 or later #include "stdafx.h"
-TCHAR szClassName[] = _T("wbOSD");
-const static osdmsg defstr = { _T(""), 0, RGB(0, 0, 0), 0, 0 };
+TCHAR szClassName[] = L"wbOSD";
+const static osdmsg defstr = { L"", 0, RGB(0, 0, 0), 0, 0 };
int DrawMe(HWND hwnd, TCHAR *string, COLORREF color)
{
logmsg("DrawMe");
- if (!string) string = _T("bullshit");
+ if (!string) string = L"bullshit";
plgsettings plgs;
loadDBSettings(&plgs);
@@ -276,7 +276,7 @@ int MainInit(WPARAM, LPARAM) if (!RegisterClassEx(&wincl))
return 0;
- g_hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TOOLWINDOW, szClassName, _T("WannaBeOSD"),
+ g_hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TOOLWINDOW, szClassName, L"WannaBeOSD",
WS_POPUP,
db_get_dw(NULL, THIS_MODULE, "winxpos", DEFAULT_WINXPOS),
db_get_dw(NULL, THIS_MODULE, "winypos", DEFAULT_WINYPOS),
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 4b53eaa8a4..52280c13e2 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -118,7 +118,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* /*hash*/, c int CAimProto::get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
if (ext && _taccess(pszDest, 0))
CreateDirectoryTreeT(pszDest);
@@ -127,19 +127,19 @@ int CAimProto::get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbL DBVARIANT dbv;
if (getTString(hContact, AIM_KEY_AH, &dbv)) return GAIR_NOAVATAR;
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), dbv.ptszVal);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
db_free(&dbv);
bool found = false;
if (ext == NULL) {
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T(".*"));
+ mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L".*");
_tfinddata_t c_file;
long hFile = _tfindfirst(pszDest, &c_file);
if (hFile > -1L) {
do {
if (_tcsrchr(c_file.name, '.')) {
- mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, _T("\\%s"), c_file.name);
+ mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name);
found = true;
}
} while (_tfindnext(hFile, &c_file) == 0);
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index 3bf8adab9f..82508f63f0 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -203,7 +203,7 @@ int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam) static const struct gc_item Items[] = {
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
{ TranslateT("User &history"), 20, MENU_ITEM, FALSE },
- { _T(""), 100, MENU_SEPARATOR, FALSE },
+ { L"", 100, MENU_SEPARATOR, FALSE },
{ TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE }
};
gcmi->nItems = _countof(Items);
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index 3ac57d6e0b..a6a41bef4d 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -155,11 +155,11 @@ bool parse_clientlogin_response(NETLIBHTTPREQUEST *nlhr, NETLIBHTTPHEADER *my_he }
ptrW buf_w(mir_utf8decodeW(nlhr->pData));
- HXML root = xmlParseString(buf_w, &datalen, _T(""));
+ HXML root = xmlParseString(buf_w, &datalen, L"");
if (!root)
return false;
- HXML status = xmlGetChildByPath(root, _T("response/statusCode"), 0);
+ HXML status = xmlGetChildByPath(root, L"response/statusCode", 0);
if (!status)
return false;
@@ -168,12 +168,12 @@ bool parse_clientlogin_response(NETLIBHTTPREQUEST *nlhr, NETLIBHTTPHEADER *my_he if (wcscmp(status_text, L"200"))
return false;
- HXML secret_node = xmlGetChildByPath(root, _T("response/data/sessionSecret"), 0);
- HXML hosttime_node = xmlGetChildByPath(root, _T("response/data/hostTime"), 0);
+ HXML secret_node = xmlGetChildByPath(root, L"response/data/sessionSecret", 0);
+ HXML hosttime_node = xmlGetChildByPath(root, L"response/data/hostTime", 0);
if (!secret_node || !hosttime_node)
return false;
- HXML token_node = xmlGetChildByPath(root, _T("response/data/token/a"), 0);
+ HXML token_node = xmlGetChildByPath(root, L"response/data/token/a", 0);
if (!token_node)
return false;
@@ -218,11 +218,11 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos int datalen = 0;
ptrW buf_w(mir_utf8decodeW(response));
- HXML root = xmlParseString(buf_w, &datalen, _T(""));
+ HXML root = xmlParseString(buf_w, &datalen, L"");
if (!root)
return false;
- HXML status = xmlGetChildByPath(root, _T("response/statusCode"), 0);
+ HXML status = xmlGetChildByPath(root, L"response/statusCode", 0);
if (!status)
return false;
@@ -231,9 +231,9 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos if (wcscmp(status_text, L"200"))
return false;
- HXML host_node = xmlGetChildByPath(root, _T("response/data/host"), 0);
- HXML port_node = xmlGetChildByPath(root, _T("response/data/port"), 0);
- HXML cookie_node = xmlGetChildByPath(root, _T("response/data/cookie"), 0);
+ HXML host_node = xmlGetChildByPath(root, L"response/data/host", 0);
+ HXML port_node = xmlGetChildByPath(root, L"response/data/port", 0);
+ HXML cookie_node = xmlGetChildByPath(root, L"response/data/cookie", 0);
if (!host_node || !port_node || !cookie_node)
return false;
@@ -246,7 +246,7 @@ bool parse_start_socar_session_response(const char *response, CMStringA &bos_hos cookie = _T2A(cookie_w);
if (encryption) {
- HXML tls_node = xmlGetChildByPath(root, _T("response/data/tlsCertName"), 0); //tls is optional, so this is not fatal error
+ HXML tls_node = xmlGetChildByPath(root, L"response/data/tlsCertName", 0); //tls is optional, so this is not fatal error
if (tls_node) {
LPCTSTR certname_w = xmlGetText(tls_node);
if (certname_w)
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index f114c52311..287aec3a84 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -538,7 +538,7 @@ char* rtf_to_html(HWND hwndDlg, int DlgItem) isSize = 1;
else
isSize = 3;
- TCHAR text[3] = _T("");
+ TCHAR text[3] = L"";
SendDlgItemMessage(hwndDlg, DlgItem, EM_GETSELTEXT, 0, (LPARAM)&text);
if (Bold != isBold) {
Bold = isBold;
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 8774998b51..9d19984558 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -324,7 +324,7 @@ int CAimProto::receiving_file(file_transfer *ft, HANDLE hServerPacketRecver, NET mir_free(buf);
TCHAR fname[256];
- mir_sntprintf(fname, _T("%s%s"), ft->pfts.tszWorkingDir, name);
+ mir_sntprintf(fname, L"%s%s", ft->pfts.tszWorkingDir, name);
mir_free(name);
mir_free(ft->pfts.tszCurrentFile);
ft->pfts.tszCurrentFile = mir_tstrdup(fname);
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp index ea187bfbe6..25ae226baa 100644 --- a/protocols/AimOscar/src/links.cpp +++ b/protocols/AimOscar/src/links.cpp @@ -84,16 +84,16 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) open chatroom: aim:gochat?roomname=ROOM&exchange=NUM
*/
/* add a contact to the list */
- if (!_tcsnicmp(arg, _T("addbuddy?"), 9)) {
+ if (!_tcsnicmp(arg, L"addbuddy?", 9)) {
TCHAR *tok, *tok2;
char *sn = NULL, *group = NULL;
for (tok = arg + 8; tok != NULL; tok = tok2) {
tok2 = _tcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
- if (!_tcsnicmp(tok, _T("screenname="), 11) && *(tok + 11) != 0)
+ if (!_tcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0)
sn = mir_t2a(url_decode(tok + 11));
- if (!_tcsnicmp(tok, _T("groupname="), 10) && *(tok + 10) != 0)
+ if (!_tcsnicmp(tok, L"groupname=", 10) && *(tok + 10) != 0)
group = mir_utf8encodeT(url_decode(tok + 10)); /* group is currently ignored */
}
if (sn == NULL) {
@@ -111,16 +111,16 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) return 0;
}
/* send a message to a contact */
- else if (!_tcsnicmp(arg, _T("goim?"), 5)) {
+ else if (!_tcsnicmp(arg, L"goim?", 5)) {
TCHAR *tok, *tok2, *msg = NULL;
char *sn = NULL;
for (tok = arg + 4; tok != NULL; tok = tok2) {
tok2 = _tcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
- if (!_tcsnicmp(tok, _T("screenname="), 11) && *(tok + 11) != 0)
+ if (!_tcsnicmp(tok, L"screenname=", 11) && *(tok + 11) != 0)
sn = mir_t2a(url_decode(tok + 11));
- if (!_tcsnicmp(tok, _T("message="), 8) && *(tok + 8) != 0)
+ if (!_tcsnicmp(tok, L"message=", 8) && *(tok + 8) != 0)
msg = url_decode(tok + 8);
}
if (sn == NULL) return 1; /* parse failed */
@@ -134,7 +134,7 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) }
/* open a chatroom */
- else if (!_tcsnicmp(arg, _T("gochat?"), 7)) {
+ else if (!_tcsnicmp(arg, L"gochat?", 7)) {
TCHAR *tok, *tok2;
char *rm = NULL;
int exchange = 0;
@@ -142,12 +142,12 @@ static INT_PTR ServiceParseAimLink(WPARAM, LPARAM lParam) for (tok = arg + 6; tok != NULL; tok = tok2) {
tok2 = _tcschr(++tok, '&'); /* first token */
if (tok2) *tok2 = 0;
- if (!_tcsnicmp(tok, _T("roomname="), 9) && *(tok + 9) != 0) {
+ if (!_tcsnicmp(tok, L"roomname=", 9) && *(tok + 9) != 0) {
rm = mir_t2a(url_decode(tok + 9));
for (char *ch = rm; *ch; ++ch)
if (*ch == '+') *ch = ' ';
}
- if (!_tcsnicmp(tok, _T("exchange="), 9))
+ if (!_tcsnicmp(tok, L"exchange=", 9))
exchange = _ttoi(tok + 9);
}
if (rm == NULL || exchange <= 0) {
diff --git a/protocols/AimOscar/src/popup.cpp b/protocols/AimOscar/src/popup.cpp index 13d1888690..03b4fa8ba3 100644 --- a/protocols/AimOscar/src/popup.cpp +++ b/protocols/AimOscar/src/popup.cpp @@ -88,7 +88,7 @@ void CAimProto::ShowPopup(const char* msg, int flags, char* url) if (flags & MAIL_POPUP)
{
size_t len = mir_tstrlen(ppd.lptzText);
- mir_sntprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, _T(" %s"), TranslateT("Open mail account?"));
+ mir_sntprintf(&ppd.lptzText[len], _countof(ppd.lptzText) - len, L" %s", TranslateT("Open mail account?"));
if (MessageBox(NULL, ppd.lptzText, ppd.lptzContactName, MB_YESNO | MB_ICONINFORMATION) == IDYES)
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOW);
}
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index c780fb5129..fa297a5664 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -1661,7 +1661,7 @@ void CAimProto::snac_mail_response(SNAC &snac)//family 0x0018 if (new_mail && num_msgs) {
TCHAR msg[1024];
- int len = mir_sntprintf(msg, _T("%S@%S (%d)\r\n%s "), sn, address, num_msgs,
+ int len = mir_sntprintf(msg, L"%S@%S (%d)\r\n%s ", sn, address, num_msgs,
TranslateT("You've got mail! Checked at"));
SYSTEMTIME stLocal;
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index d8df3f87f6..2b906bc355 100755 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -1267,7 +1267,7 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, chat_list_item int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
if (chk) {
if (IsHContactInfo(hItem)) {
- TCHAR buf[128] = _T("");
+ TCHAR buf[128] = L"";
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
char *sn = mir_t2a(buf);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 8212a70b42..b5e23b21aa 100755 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -533,14 +533,14 @@ int CAimProto::open_contact_file(const char*, const TCHAR* file, const char*, TC {
path = (TCHAR*)mir_alloc(MAX_PATH * sizeof(TCHAR));
- int pos = mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), VARST(_T("%miranda_userdata%")), m_szModuleName);
+ int pos = mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_userdata%"), m_szModuleName);
if (contact_dir)
- pos += mir_sntprintf(path + pos, MAX_PATH - pos, _T("\\%S"), m_szModuleName);
+ pos += mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%S", m_szModuleName);
if (_taccess(path, 0))
CreateDirectoryTreeT(path);
- mir_sntprintf(path + pos, MAX_PATH - pos, _T("\\%s"), file);
+ mir_sntprintf(path + pos, MAX_PATH - pos, L"\\%s", file);
int fid = _topen(path, _O_CREAT | _O_RDWR | _O_BINARY, _S_IREAD);
if (fid < 0) {
TCHAR errmsg[512];
@@ -553,7 +553,7 @@ int CAimProto::open_contact_file(const char*, const TCHAR* file, const char*, TC void CAimProto::write_away_message(const char* sn, const char* msg, bool utf)
{
TCHAR* path;
- int fid = open_contact_file(sn, _T("away.html"), "wb", path, 1);
+ int fid = open_contact_file(sn, L"away.html", "wb", path, 1);
if (fid >= 0) {
if (utf) _write(fid, "\xEF\xBB\xBF", 3);
char* s_msg = process_status_msg(msg, sn);
@@ -562,7 +562,7 @@ void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) _write(fid, "'s Away Message:</h3>", 21);
_write(fid, s_msg, (unsigned)mir_strlen(s_msg));
_close(fid);
- ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW);
mir_free(path);
mir_free(s_msg);
}
@@ -571,7 +571,7 @@ void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) void CAimProto::write_profile(const char* sn, const char* msg, bool utf)
{
TCHAR* path;
- int fid = open_contact_file(sn, _T("profile.html"), "wb", path, 1);
+ int fid = open_contact_file(sn, L"profile.html", "wb", path, 1);
if (fid >= 0) {
if (utf) _write(fid, "\xEF\xBB\xBF", 3);
char* s_msg = process_status_msg(msg, sn);
@@ -580,7 +580,7 @@ void CAimProto::write_profile(const char* sn, const char* msg, bool utf) _write(fid, "'s Profile:</h3>", 16);
_write(fid, s_msg, (unsigned)mir_strlen(s_msg));
_close(fid);
- ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, L"open", path, NULL, NULL, SW_SHOW);
mir_free(path);
mir_free(s_msg);
}
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index e7a9849290..b85699b520 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -33,7 +33,7 @@ bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai, std::string * utils::text::replace_first(url, "%s", std::string(id));
}
- std::tstring filename = GetAvatarFolder() + _T('\\') + std::tstring(_A2T(id)) + _T(".jpg");
+ std::tstring filename = GetAvatarFolder() + _T('\\') + std::tstring(_A2T(id)) + L".jpg";
_tcsncpy_s(pai.filename, filename.c_str(), _TRUNCATE);
pai.format = ProtoGetAvatarFormat(pai.filename);
@@ -126,7 +126,7 @@ void FacebookProto::UpdateAvatarWorker(void *) std::tstring FacebookProto::GetAvatarFolder()
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
+ mir_sntprintf(path, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
return path;
}
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 9ec90536a7..79d9874e93 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -376,7 +376,7 @@ int FacebookProto::OnGCMenuHook(WPARAM, LPARAM lParam) { { LPGENT("User &details"), 10, MENU_ITEM, FALSE }, { LPGENT("User &history"), 20, MENU_ITEM, FALSE }, - { _T(""), 100, MENU_SEPARATOR, FALSE }, + { L"", 100, MENU_SEPARATOR, FALSE }, { LPGENT("&Leave chat session"), 110, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); @@ -415,7 +415,7 @@ void FacebookProto::PrepareNotificationsChatRoom() { MCONTACT hNotificationsChatRoom = ChatIDToHContact(FACEBOOK_NOTIFICATIONS_CHATROOM); if (hNotificationsChatRoom == NULL || getDword(hNotificationsChatRoom, "Status", ID_STATUS_OFFLINE) != ID_STATUS_ONLINE) { TCHAR nameT[200]; - mir_sntprintf(nameT, _T("%s: %s"), m_tszUserName, TranslateT("Notifications")); + mir_sntprintf(nameT, L"%s: %s", m_tszUserName, TranslateT("Notifications")); // Create the group chat session GCSESSION gcw = { sizeof(gcw) }; diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 128613ed06..21ff44d15d 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -735,7 +735,7 @@ void facebook_client::insert_reader(MCONTACT hContact, time_t timestamp, const s // Load old readers ptrT told(parent->getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS)); if (told) - treaders = std::tstring(told) + _T(", "); + treaders = std::tstring(told) + L", "; // Append new reader name and remember them treaders += utils::text::prepare_name(treaderName, true); @@ -932,13 +932,13 @@ bool facebook_client::login(const char *username, const char *password) // 2) Approve last unknown login if (resp.data.find("name=\"submit[This was me]\"") != std::string::npos) { CMString tszTitle; - tszTitle.AppendFormat(_T("%s - %s"), parent->m_tszUserName, TranslateT("Check last login")); + tszTitle.AppendFormat(L"%s - %s", parent->m_tszUserName, TranslateT("Check last login")); CMString tszMessage(TranslateT("Do you recognize this activity?")); std::string activity = utils::text::slashu_to_utf8(utils::text::source_get_value(&resp.data, 3, "<body", "</strong></div>", "</div>")); activity = utils::text::trim(utils::text::html_entities_decode(utils::text::remove_html(activity))); if (!activity.empty()) { - tszMessage.AppendFormat(_T("\n\n%s"), ptrT(mir_utf8decodeT(activity.c_str()))); + tszMessage.AppendFormat(L"\n\n%s", ptrT(mir_utf8decodeT(activity.c_str()))); } if (MessageBox(0, tszMessage, tszTitle, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON1) == IDYES) { @@ -1694,7 +1694,7 @@ bool facebook_client::save_url(const std::string &url, const std::tstring &filen CreateDirectoryTreeT(dir.c_str()); // Write to file - FILE *f = _tfopen(filename.c_str(), _T("wb")); + FILE *f = _tfopen(filename.c_str(), L"wb"); if (f != NULL) { fwrite(resp->pData, 1, resp->dataLength, f); fclose(f); diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index a75d61f58c..95e4307ad0 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -371,7 +371,7 @@ void FacebookProto::LoadChatInfo(facebook_chatroom *fbc) continue; if (namesUsed > 0) - fbc->chat_name += _T(", "); + fbc->chat_name += L", "; std::tstring tname = _A2T(participant.c_str(), CP_UTF8); fbc->chat_name += utils::text::prepare_name(tname, false); diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index d12af3fd03..2f349531ff 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -202,7 +202,7 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara SendDlgItemMessage(hwnd, IDC_URL, EM_LIMITTEXT, 1024, 0); ptrT place(data->proto->getTStringA(FACEBOOK_KEY_PLACE)); - SetDlgItemText(hwnd, IDC_PLACE, place != NULL ? place : _T("Miranda NG")); + SetDlgItemText(hwnd, IDC_PLACE, place != NULL ? place : L"Miranda NG"); bShowContacts = data->proto->getByte("PostStatusExpand", 0) > 0; ResizeHorizontal(hwnd, bShowContacts); diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index a7fdc4674f..bfb4dd24d4 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -217,11 +217,11 @@ void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url, std::string b64 = ptrA(mir_base64_encode((PBYTE)sticker.c_str(), (unsigned)sticker.length())); b64 = utils::url::encode(b64); - std::tstring filename = GetAvatarFolder() + _T("\\stickers\\"); + std::tstring filename = GetAvatarFolder() + L"\\stickers\\"; ptrT dir(mir_tstrdup(filename.c_str())); filename += (TCHAR*)_A2T(b64.c_str()); - filename += _T(".png"); + filename += L".png"; // Check if we have this sticker already and download it it not if (GetFileAttributes(filename.c_str()) == INVALID_FILE_ATTRIBUTES) { diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c76b0c6800..80cd20e3d7 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -520,7 +520,7 @@ std::string truncateUtf8(std::string &text, size_t maxLength) { // TODO: Probably there is much simpler and nicer way std::tstring ttext = ptrT(mir_utf8decodeT(text.c_str())); if (ttext.length() > maxLength) { - ttext = ttext.substr(0, maxLength) + _T("\x2026"); // unicode ellipsis + ttext = ttext.substr(0, maxLength) + L"\x2026"; // unicode ellipsis return std::string(_T2A(ttext.c_str(), CP_UTF8)); } // It's not longer, return given string @@ -805,7 +805,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo if (!hChatContact) { // hopefully shouldn't happen, but who knows? - debugLog(_T("!!! No hChatContact for %s"), fbc->thread_id.c_str()); + debugLog(L"!!! No hChatContact for %s", fbc->thread_id.c_str()); continue; } diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c5dbb60c2c..7f7720f350 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -52,7 +52,7 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : m_pagePrefix = (pagePrefix != NULL) ? _T2A(pagePrefix, CP_UTF8) : TEXT_EMOJI_PAGE; if (m_tszDefaultGroup == NULL) - m_tszDefaultGroup = mir_tstrdup(_T("Facebook")); + m_tszDefaultGroup = mir_tstrdup(L"Facebook"); CreateProtoService(PS_CREATEACCMGRUI, &FacebookProto::SvcCreateAccMgrUI); CreateProtoService(PS_GETMYAWAYMSG, &FacebookProto::GetMyAwayMsg); @@ -92,7 +92,7 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } facy.set_handle(m_hNetlibUser); @@ -271,7 +271,7 @@ HANDLE FacebookProto::SearchByEmail(const TCHAR* email) HANDLE FacebookProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, const TCHAR* lastName) { TCHAR arg[200]; - mir_sntprintf(arg, _T("%s %s %s"), nick, firstName, lastName); + mir_sntprintf(arg, L"%s %s %s", nick, firstName, lastName); return SearchByEmail(arg); // Facebook is using one search method for everything (except IDs) } @@ -886,7 +886,7 @@ void FacebookProto::OpenUrlThread(void *p) { open_url *data = static_cast<open_url*>(p); - ShellExecute(NULL, _T("open"), data->browser, data->url, NULL, SW_SHOWDEFAULT); + ShellExecute(NULL, L"open", data->browser, data->url, NULL, SW_SHOWDEFAULT); delete data; } @@ -1009,7 +1009,7 @@ void FacebookProto::InitPopups() char name[256]; // Client - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Client errors")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Client errors")); mir_snprintf(name, "%s_%s", m_szModuleName, "Client"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1020,7 +1020,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Newsfeeds - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Wall posts")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Wall posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "Newsfeed"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1031,7 +1031,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Notifications - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Notifications")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notifications")); mir_snprintf(name, "%s_%s", m_szModuleName, "Notification"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1042,7 +1042,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Others - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Other events")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Other events")); mir_snprintf(name, "%s_%s", m_szModuleName, "Other"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1053,7 +1053,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Friendship changes - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Friendship events")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Friendship events")); mir_snprintf(name, "%s_%s", m_szModuleName, "Friendship"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1064,7 +1064,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // Ticker - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Real-time friends activity")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Real-time friends activity")); mir_snprintf(name, "%s_%s", m_szModuleName, "Ticker"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1075,7 +1075,7 @@ void FacebookProto::InitPopups() popupClasses.push_back(Popup_RegisterClass(&ppc)); // On this day - mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("\"On this day\" posts")); + mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("\"On this day\" posts")); mir_snprintf(name, "%s_%s", m_szModuleName, "OnThisDay"); ppc.ptszDescription = desc; ppc.pszName = name; @@ -1143,7 +1143,7 @@ void FacebookProto::MessageRead(MCONTACT hContact) return; TCHAR ttime[64]; - _tcsftime(ttime, _countof(ttime), _T("%X"), localtime(&time)); + _tcsftime(ttime, _countof(ttime), L"%X", localtime(&time)); StatusTextData st = { 0 }; st.cbSize = sizeof(st); @@ -1152,7 +1152,7 @@ void FacebookProto::MessageRead(MCONTACT hContact) if (isChatRoom(hContact)) { // Load readers names ptrT treaders(getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS)); - mir_sntprintf(st.tszText, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : _T("???")); + mir_sntprintf(st.tszText, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : L"???"); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st); } else if (!ServiceExists(MS_MESSAGESTATE_UPDATE)){ mir_sntprintf(st.tszText, TranslateT("Message read: %s"), ttime); diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index bf6ec8389e..b0d6c61896 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -23,8 +23,8 @@ #include "resources.h"
#include "options.h"
-#define AVA_FILE_NAME_FORMAT _T("%s\\%s\\AvatarCache\\Jabber\\") _T(SHORT_PLUGIN_NAME) _T(".pseudoava.png")
-#define AVA_RES_TYPE _T("PNG")
+#define AVA_FILE_NAME_FORMAT L"%s\\%s\\AvatarCache\\Jabber\\" _T(SHORT_PLUGIN_NAME) L".pseudoava.png"
+#define AVA_RES_TYPE L"PNG"
#define SRMM_MODULE_NAME "SRMM"
#define SRMM_AVATAR_SETTING_NAME "Avatar"
@@ -154,7 +154,7 @@ void SetAvatar(MCONTACT hContact) return;
if (ava)
- CallService(MS_AV_SETAVATART, hContact, (LPARAM)_T(""));
+ CallService(MS_AV_SETAVATART, hContact, (LPARAM)L"");
CallService(MS_AV_SETAVATART, hContact, (LPARAM)avaFile);
db_set_ts(hContact, SRMM_MODULE_NAME, SRMM_AVATAR_SETTING_NAME, avaFile);
}
diff --git a/protocols/GTalkExt/src/googletalk.h b/protocols/GTalkExt/src/googletalk.h index 3c9f686bb5..7595e3de7c 100644 --- a/protocols/GTalkExt/src/googletalk.h +++ b/protocols/GTalkExt/src/googletalk.h @@ -21,50 +21,50 @@ #pragma once
-#define MESSAGE_URL_FORMAT_STANDARD _T("%s/#inbox/%x%08x")
-#define MESSAGE_URL_FORMAT_HTML _T("%s/h/?v=c&th=%x%08x")
+#define MESSAGE_URL_FORMAT_STANDARD L"%s/#inbox/%x%08x"
+#define MESSAGE_URL_FORMAT_HTML L"%s/h/?v=c&th=%x%08x"
-#define JABBER_FEAT_GTALK_SHARED_STATUS _T("google:shared-status")
+#define JABBER_FEAT_GTALK_SHARED_STATUS L"google:shared-status"
-#define JABBER_EXT_GTALK_PMUC _T("pmuc-v1")
+#define JABBER_EXT_GTALK_PMUC L"pmuc-v1"
-#define NOTIFY_FEATURE_XMLNS _T("google:mail:notify")
-#define SETTING_FEATURE_XMLNS _T("google:setting")
-#define DISCOVERY_XMLNS _T("http://jabber.org/protocol/disco#info")
+#define NOTIFY_FEATURE_XMLNS L"google:mail:notify"
+#define SETTING_FEATURE_XMLNS L"google:setting"
+#define DISCOVERY_XMLNS L"http://jabber.org/protocol/disco#info"
-#define ATTRNAME_TYPE _T("type")
-#define ATTRNAME_FROM _T("from")
-#define ATTRNAME_TO _T("to")
-#define ATTRNAME_URL _T("url")
-#define ATTRNAME_TID _T("tid")
-#define ATTRNAME_UNREAD _T("unread")
-#define ATTRNAME_XMLNS _T("xmlns")
-#define ATTRNAME_ID _T("id")
-#define ATTRNAME_TOTAL_MATCHED _T("total-matched")
-#define ATTRNAME_NAME _T("name")
-#define ATTRNAME_ADDRESS _T("address")
-#define ATTRNAME_RESULT_TIME _T("result-time")
-#define ATTRNAME_NEWER_THAN_TIME _T("newer-than-time")
-#define ATTRNAME_NEWER_THAN_TID _T("newer-than-tid")
-#define ATTRNAME_VALUE _T("value")
-#define ATTRNAME_VAR _T("var")
+#define ATTRNAME_TYPE L"type"
+#define ATTRNAME_FROM L"from"
+#define ATTRNAME_TO L"to"
+#define ATTRNAME_URL L"url"
+#define ATTRNAME_TID L"tid"
+#define ATTRNAME_UNREAD L"unread"
+#define ATTRNAME_XMLNS L"xmlns"
+#define ATTRNAME_ID L"id"
+#define ATTRNAME_TOTAL_MATCHED L"total-matched"
+#define ATTRNAME_NAME L"name"
+#define ATTRNAME_ADDRESS L"address"
+#define ATTRNAME_RESULT_TIME L"result-time"
+#define ATTRNAME_NEWER_THAN_TIME L"newer-than-time"
+#define ATTRNAME_NEWER_THAN_TID L"newer-than-tid"
+#define ATTRNAME_VALUE L"value"
+#define ATTRNAME_VAR L"var"
-#define IQTYPE_RESULT _T("result")
-#define IQTYPE_SET _T("set")
-#define IQTYPE_GET _T("get")
+#define IQTYPE_RESULT L"result"
+#define IQTYPE_SET L"set"
+#define IQTYPE_GET L"get"
-#define NODENAME_MAILBOX _T("mailbox")
-#define NODENAME_QUERY _T("query")
-#define NODENAME_IQ _T("iq")
-#define NODENAME_USERSETTING _T("usersetting")
-#define NODENAME_MAILNOTIFICATIONS _T("mailnotifications")
-#define NODENAME_SUBJECT _T("subject")
-#define NODENAME_SNIPPET _T("snippet")
-#define NODENAME_SENDERS _T("senders")
-#define NODENAME_FEATURE _T("feature")
-#define NODENAME_NEW_MAIL _T("new-mail")
+#define NODENAME_MAILBOX L"mailbox"
+#define NODENAME_QUERY L"query"
+#define NODENAME_IQ L"iq"
+#define NODENAME_USERSETTING L"usersetting"
+#define NODENAME_MAILNOTIFICATIONS L"mailnotifications"
+#define NODENAME_SUBJECT L"subject"
+#define NODENAME_SNIPPET L"snippet"
+#define NODENAME_SENDERS L"senders"
+#define NODENAME_FEATURE L"feature"
+#define NODENAME_NEW_MAIL L"new-mail"
-#define SETTING_TRUE _T("true")
+#define SETTING_TRUE L"true"
#define RESPONSE_TIMEOUT (1000 * 60 * 60)
#define TIMER_INTERVAL (1000 * 60 * 2)
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 1f5c6f02e6..1948a21dbf 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -26,8 +26,8 @@ #include "notifications.h"
#include "options.h"
-#define JABBER_IQID _T("mir_")
-#define JABBER_IQID_FORMAT _T("mir_%d")
+#define JABBER_IQID L"mir_"
+#define JABBER_IQID_FORMAT L"mir_%d"
LRESULT CALLBACK PopupProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -53,7 +53,7 @@ void MakeUrlHex(LPTSTR url, LPCTSTR tid) ULARGE_INTEGER iTid; iTid.QuadPart = _tstoi64(tid);
LPTSTR tidInUrl = _tcsstr(url, tid);
LPTSTR trail = tidInUrl + mir_tstrlen(tid);
- wsprintf(tidInUrl, _T("%x%08x"), iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!!
+ wsprintf(tidInUrl, L"%x%08x", iTid.HighPart, iTid.LowPart); //!!!!!!!!!!!!
wmemmove(tidInUrl + mir_tstrlen(tidInUrl), trail, mir_tstrlen(trail) + 1);
}
@@ -296,12 +296,12 @@ BOOL SendHandler(IJabberInterface *ji, HXML node, void *) ji->AddTemporaryIqHandler(DiscoverHandler, JABBER_IQ_TYPE_RESULT, _ttoi(ptszId + 4), NULL, RESPONSE_TIMEOUT, 500);
}
- if (!mir_tstrcmp(xmlGetName(node), _T("presence")) && xmlGetAttrValue(node, ATTRNAME_TO) == 0) {
+ if (!mir_tstrcmp(xmlGetName(node), L"presence") && xmlGetAttrValue(node, ATTRNAME_TO) == 0) {
if (!gta->m_bGoogleSharedStatus)
return FALSE;
- HXML statNode = xmlGetChildByPath(node, _T("status"), 0);
- HXML showNode = xmlGetChildByPath(node, _T("show"), 0);
+ HXML statNode = xmlGetChildByPath(node, L"status", 0);
+ HXML showNode = xmlGetChildByPath(node, L"show", 0);
if (statNode) {
LPCTSTR status = xmlGetText(showNode);
LPCTSTR msg = xmlGetText(statNode);
@@ -337,12 +337,12 @@ BOOL OnIqSetGoogleSharedStatus(IJabberInterface *ji, HXML iqNode, void *) int status;
HXML query = xmlGetChildByPath(iqNode, NODENAME_QUERY, 0);
- HXML node = xmlGetChildByPath(query, _T("invisible"), 0);
- if (0 == mir_tstrcmpi(_T("true"), xmlGetAttrValue(node, _T("value"))))
+ HXML node = xmlGetChildByPath(query, L"invisible", 0);
+ if (0 == mir_tstrcmpi(L"true", xmlGetAttrValue(node, L"value")))
status = ID_STATUS_INVISIBLE;
else {
- LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, _T("show"), 0));
- if (txt && 0 == mir_tstrcmpi(_T("dnd"), txt))
+ LPCTSTR txt = xmlGetText(xmlGetChildByPath(query, L"show", 0));
+ if (txt && 0 == mir_tstrcmpi(L"dnd", txt))
status = ID_STATUS_DND;
else if (gta->m_pa->ppro->m_iStatus == ID_STATUS_DND || gta->m_pa->ppro->m_iStatus == ID_STATUS_INVISIBLE)
status = ID_STATUS_ONLINE;
@@ -363,20 +363,20 @@ void GoogleTalkAcc::SendIqGoogleSharedStatus(LPCTSTR status, LPCTSTR msg) HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL);
xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS);
- xmlAddAttrInt(query, _T("version"), 2);
+ xmlAddAttrInt(query, L"version", 2);
- xmlAddChild(query, _T("status"), msg);
- if (!mir_tstrcmp(status, _T("invisible"))) {
- xmlAddChild(query, _T("show"), _T("default"));
- xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("true"));
+ xmlAddChild(query, L"status", msg);
+ if (!mir_tstrcmp(status, L"invisible")) {
+ xmlAddChild(query, L"show", L"default");
+ xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"true");
}
else {
- if (!mir_tstrcmp(status, _T("dnd")))
- xmlAddChild(query, _T("show"), _T("dnd"));
+ if (!mir_tstrcmp(status, L"dnd"))
+ xmlAddChild(query, L"show", L"dnd");
else
- xmlAddChild(query, _T("show"), _T("default"));
+ xmlAddChild(query, L"show", L"default");
- xmlAddAttr(xmlAddChild(query, _T("invisible"), 0), _T("value"), _T("false"));
+ xmlAddAttr(xmlAddChild(query, L"invisible", 0), L"value", L"false");
}
m_bGoogleSharedStatusLock = TRUE;
m_japi->SendXmlNode(iq);
@@ -392,13 +392,13 @@ int OnServerDiscoInfo(WPARAM wParam, LPARAM lParam) // m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PING;
JABBER_DISCO_FIELD *fld = (JABBER_DISCO_FIELD*)wParam;
- if (!mir_tstrcmp(fld->category, _T("server")) && !mir_tstrcmp(fld->type, _T("im")) && !mir_tstrcmp(fld->name, _T("Google Talk"))) {
+ if (!mir_tstrcmp(fld->category, L"server") && !mir_tstrcmp(fld->type, L"im") && !mir_tstrcmp(fld->name, L"Google Talk")) {
HXML iq = xmlCreateNode(NODENAME_IQ, NULL, FALSE);
xmlAddAttr(iq, ATTRNAME_TYPE, IQTYPE_GET);
HXML query = xmlAddChild(iq, NODENAME_QUERY, NULL);
xmlAddChild(query, ATTRNAME_XMLNS, JABBER_FEAT_GTALK_SHARED_STATUS);
- xmlAddAttrInt(query, _T("version"), 2);
+ xmlAddAttrInt(query, L"version", 2);
gta->m_japi->SendXmlNode(iq);
xmlDestroyNode(iq);
}
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 2a7084a404..5b0ab1159e 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -25,8 +25,8 @@ #include "db.h"
#include "options.h"
-#define COMMON_GMAIL_HOST1 _T("gmail.com")
-#define COMMON_GMAIL_HOST2 _T("googlemail.com")
+#define COMMON_GMAIL_HOST1 L"gmail.com"
+#define COMMON_GMAIL_HOST2 L"googlemail.com"
#define AUTH_REQUEST_URL "https://www.google.com/accounts/ClientAuth"
#define AUTH_REQUEST_PARAMS "Email=%s&Passwd=%s&accountType=HOSTED_OR_GOOGLE&skipvpage=true&PersistentCookie=false"
@@ -44,7 +44,7 @@ const NETLIBHTTPHEADER HEADER_URL_ENCODED = { "Content-Type", "application/x-www #define LOGIN_PASS_SETTING_NAME "Password"
-#define INBOX_URL_FORMAT _T("https://mail.google.com/%s%s/#inbox")
+#define INBOX_URL_FORMAT L"https://mail.google.com/%s%s/#inbox"
// 3 lines from netlib.h
#define GetNetlibHandleType(h) (h?*(int*)h:NLH_INVALID)
@@ -207,8 +207,8 @@ void OpenContactInbox(LPCSTR szModuleName) TCHAR buf[1024];
if (mir_tstrcmpi(host, COMMON_GMAIL_HOST1) && mir_tstrcmpi(host, COMMON_GMAIL_HOST2))
- mir_sntprintf(buf, INBOX_URL_FORMAT, _T("a/"), host); // hosted
+ mir_sntprintf(buf, INBOX_URL_FORMAT, L"a/", host); // hosted
else
- mir_sntprintf(buf, INBOX_URL_FORMAT, _T(""), _T("mail")); // common
+ mir_sntprintf(buf, INBOX_URL_FORMAT, L"", L"mail"); // common
OpenUrl(szModuleName, tszJid, buf);
}
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index b1277de614..6b167af949 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -25,11 +25,11 @@ #include "options.h"
#include "inbox.h"
-#define PLUGIN_DATA_PROP_NAME _T("{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}")
-#define EVT_DELETED_HOOK_PROP_NAME _T("{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}")
+#define PLUGIN_DATA_PROP_NAME L"{DB5CE833-C3AC-4851-831C-DDEBD9FA0508}"
+#define EVT_DELETED_HOOK_PROP_NAME L"{87CBD2BC-8806-413C-8FD5-1D61ABCA4AF8}"
-#define EVENT_DELETED_MSG RegisterWindowMessage(_T("{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}"))
-#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(_T("{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}"))
+#define EVENT_DELETED_MSG RegisterWindowMessage(L"{B9B00536-86A0-4BCE-B2FE-4ABD409C22AE}")
+#define MESSAGE_CLOSEPOPUP RegisterWindowMessage(L"{7A60EA87-3E77-41DF-8A69-59B147F0C9C6}")
#define CLIST_MODULE_NAME "CList"
#define CONTACT_DISPLAY_NAME_SETTING "MyHandle"
@@ -158,10 +158,10 @@ static bool DoAddPopup(POPUPDATAT *data) void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCount)
{
- if (mir_tstrcmp(unreadCount, _T("0")))
- wsprintf(buff, _T("%s [%s]"), jid, unreadCount); //!!!!!!!!!!!
+ if (mir_tstrcmp(unreadCount, L"0"))
+ wsprintf(buff, L"%s [%s]", jid, unreadCount); //!!!!!!!!!!!
else
- wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!!
+ wsprintf(buff, L"%s", jid); //!!!!!!!!!!!
}
MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName)
@@ -270,9 +270,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre break;
if (p.name)
- tszSenders.AppendFormat(_T(" %s <%s>\n"), p.name, p.addr);
+ tszSenders.AppendFormat(L" %s <%s>\n", p.name, p.addr);
else
- tszSenders.AppendFormat(_T(" %s\n"), p.addr);
+ tszSenders.AppendFormat(L" %s\n", p.addr);
}
if (ReadCheckbox(0, IDC_ADDSNIP, (UINT_PTR)TlsGetValue(itlsSettings)))
diff --git a/protocols/GTalkExt/src/notifications.h b/protocols/GTalkExt/src/notifications.h index c9cf4684af..1675f3285b 100644 --- a/protocols/GTalkExt/src/notifications.h +++ b/protocols/GTalkExt/src/notifications.h @@ -21,7 +21,7 @@ #pragma once
-#define TEMP_WINDOW_CLASS_NAME _T("AntiShittyFullscreenDetectionWindowClass")
+#define TEMP_WINDOW_CLASS_NAME L"AntiShittyFullscreenDetectionWindowClass"
#define SENDER_COUNT 10
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index 604ef0013d..d141179cc8 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -23,8 +23,8 @@ #include "db.h"
#include "options.h"
-#define ACCOUNT_PROP_NAME _T("{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}")
-#define DIALOG_INITIALIZED_PROP_NAME _T("{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}")
+#define ACCOUNT_PROP_NAME L"{BF447EBA-27AE-4DB7-893C-FC42A3F74D75}"
+#define DIALOG_INITIALIZED_PROP_NAME L"{5EE59FE5-679A-4A29-B0A1-03092E7AC20E}"
#define POPUPS_OPTIONS_GROUP LPGENT("Popups")
#define NETWORK_OPTIONS_GROUP LPGENT("Network")
@@ -32,8 +32,8 @@ #define NOTIFY_SETTINGS_FROM_MOD_NAME SHORT_PLUGIN_NAME ".NotifySettingsFromModName"
#define TEST_LETTER_SUBJECT LPGENT("Why C sucks")
-#define TEST_LETTER_INBOX _T("brickstrace@gmail.com [1]")
-#define TEST_LETTER_SENDER _T(" bems\n")
+#define TEST_LETTER_INBOX L"brickstrace@gmail.com [1]"
+#define TEST_LETTER_SENDER L" bems\n"
#define TEST_LETTER_SNIP LPGENT("* Primitive type system\n* No overloading\n* Limited possibility of data abstraction, polymorphism, subtyping and code reuse\n* No metaprogramming except preprocessor macros\n* No exceptions")
void CheckControlsEnabled(HWND wnd)
diff --git a/protocols/GTalkExt/src/options.h b/protocols/GTalkExt/src/options.h index b26f21b277..f6de20a154 100644 --- a/protocols/GTalkExt/src/options.h +++ b/protocols/GTalkExt/src/options.h @@ -23,7 +23,7 @@ #include "resources.h"
-#define JABBER_FEAT_GTALK_PMUC _T("http://www.google.com/xmpp/protocol/pmuc/v1")
+#define JABBER_FEAT_GTALK_PMUC L"http://www.google.com/xmpp/protocol/pmuc/v1"
#define MAIL_NOTIFICATIONS LPGENT("GMail notifications")
#define FULL_NOTIFICATION_FORMAT LPGENT("subject\n %s\nfrom\n%s\n%s\n")
diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index b4f366d743..3839aeb5d1 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -39,7 +39,7 @@ static LPSTR TipperItemProps[] = #define TIPPER_ITEMS_MOD_NAME "Tipper_Items"
#define TIPPER_ITEM_COUNT_SETTING "DINumValues"
-#define UNREAD_THREADS_RAW _T("%raw:") _T(SHORT_PLUGIN_NAME) _T("/UnreadThreads%")
+#define UNREAD_THREADS_RAW L"%raw:" _T(SHORT_PLUGIN_NAME) L"/UnreadThreads%"
#define UNREAD_THREADS_LABEL LPGENT("Unread threads:")
void ShiftTipperSettings(LPSTR buff, int count, LPSTR format)
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index 0bb2a380fc..0ecdd36433 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -28,14 +28,14 @@ //
void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST( L"%miranda_avatarcache%"), m_szModuleName);
if (_taccess(pszDest, 0)) {
int ret = CreateDirectoryTreeT(pszDest);
if (ret == 0)
- debugLog(_T("getAvatarFilename(): Created new directory for avatar cache: %s."), pszDest);
+ debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", pszDest);
else {
- debugLog(_T("getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s"), pszDest, errno, ws_strerror(errno));
+ debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", pszDest, errno, ws_strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), pszDest);
showpopup(m_tszUserName, error, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE);
@@ -48,12 +48,12 @@ void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen) DBVARIANT dbv;
if (!getString(hContact, GG_KEY_AVATARHASH, &dbv)) {
TCHAR* avatarHashT = mir_a2t(dbv.pszVal);
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s%s"), avatarHashT, avatartype);
+ mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s%s", avatarHashT, avatartype);
mir_free(avatarHashT);
db_free(&dbv);
}
}
- else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%S avatar%s"), m_szModuleName, avatartype);
+ else mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%S avatar%s", m_szModuleName, avatartype);
}
bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)
@@ -84,16 +84,16 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts) //if this url returned xml data (before and after 11.2013 gg convention)
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, L"result");
if (hXml != NULL) {
- HXML node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar"), 0);
- const TCHAR *blank = (node != NULL) ? xmlGetAttrValue(node, _T("blank")) : NULL;
- if (blank != NULL && mir_tstrcmp(blank, _T("1"))) {
- node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0);
+ HXML node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar", 0);
+ const TCHAR *blank = (node != NULL) ? xmlGetAttrValue(node, L"blank") : NULL;
+ if (blank != NULL && mir_tstrcmp(blank, L"1")) {
+ node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/timestamp", 0);
*avatarts = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
- node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention
+ node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/bigavatar", 0); //new gg convention
if (node == NULL){
- node = xmlGetChildByPath(hXml, _T("users/user/avatars/avatar/originBigAvatar"), 0); //old gg convention
+ node = xmlGetChildByPath(hXml, L"users/user/avatars/avatar/originBigAvatar", 0); //old gg convention
}
*avatarurl = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
}
@@ -267,9 +267,9 @@ void __cdecl GGPROTO::avatarrequestthread(void*) _write(file_fd, resp->pData, resp->dataLength);
_close(file_fd);
result = 1;
- debugLog(_T("avatarrequestthread() new avatar_transfers item. Saved data to file=%s."), ai.filename);
+ debugLog(L"avatarrequestthread() new avatar_transfers item. Saved data to file=%s.", ai.filename);
} else {
- debugLog(_T("avatarrequestthread(): _topen file %s error. errno=%d: %s"), ai.filename, errno, ws_strerror(errno));
+ debugLog(L"avatarrequestthread(): _topen file %s error. errno=%d: %s", ai.filename, errno, ws_strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot create avatar file. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), ai.filename);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
@@ -361,7 +361,7 @@ void __cdecl GGPROTO::setavatarthread(void *param) TCHAR *szFilename = (TCHAR*)param;
int file_fd = _topen(szFilename, _O_RDONLY | _O_BINARY, _S_IREAD);
if (file_fd == -1) {
- debugLog(_T("setavatarthread(): Failed to open avatar file errno=%d: %s"), errno, ws_strerror(errno));
+ debugLog(L"setavatarthread(): Failed to open avatar file errno=%d: %s", errno, ws_strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot open avatar file. ERROR: %d: %s\n%s"), errno, ws_strerror(errno), szFilename);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index d7ad598eef..2632b89d75 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -381,8 +381,8 @@ retry: p.status_descr = mir_utf8encodeT(getstatusmsg(m_iDesiredStatus));
p.status = status_m2gg(m_iDesiredStatus, p.status_descr != NULL);
- debugLog(_T("mainthread() (%x): Connecting with number %d, status %d and description \"%s\"."), this, p.uin, m_iDesiredStatus,
- p.status_descr ? getstatusmsg(m_iDesiredStatus) : _T("<none>"));
+ debugLog(L"mainthread() (%x): Connecting with number %d, status %d and description \"%s\".", this, p.uin, m_iDesiredStatus,
+ p.status_descr ? getstatusmsg(m_iDesiredStatus) : L"<none>");
gg_LeaveCriticalSection(&modemsg_mutex, "mainthread", 13, 1, "modemsg_mutex", 1);
// Check manual hosts
@@ -426,7 +426,7 @@ retry: mir_sntprintf(error, TranslateT("Connection cannot be established. errno=%d: %s"), errno, ws_strerror(errno));
perror = error;
}
- debugLog(_T("mainthread() (%x): %s"), this, perror);
+ debugLog(L"mainthread() (%x): %s", this, perror);
if (getByte(GG_KEY_SHOWCERRORS, GG_KEYDEF_SHOWCERRORS))
showpopup(m_tszUserName, perror, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE);
@@ -637,7 +637,7 @@ retry: _tcsncpy_s(strFmt2, pcli->pfnGetStatusModeDescription( status_gg2m(atoi(__status)), 0), _TRUNCATE);
if (__city) {
- mir_sntprintf(strFmt1, _T(", %s %s"), TranslateT("City:"), __city);
+ mir_sntprintf(strFmt1, L", %s %s", TranslateT("City:"), __city);
mir_tstrncat(strFmt2, strFmt1, _countof(strFmt2) - mir_tstrlen(strFmt2));
}
if (__birthyear) {
@@ -646,7 +646,7 @@ retry: int br = atoi(__birthyear);
if (br < (lt->tm_year + 1900) && br > 1900) {
- mir_sntprintf(strFmt1, _T(", %s %d"), TranslateT("Age:"), (lt->tm_year + 1900) - br);
+ mir_sntprintf(strFmt1, L", %s %d", TranslateT("Age:"), (lt->tm_year + 1900) - br);
mir_tstrncat(strFmt2, strFmt1, _countof(strFmt2) - mir_tstrlen(strFmt2));
}
}
@@ -837,7 +837,7 @@ retry: gce.ptszNick = (TCHAR*) pcli->pfnGetContactDisplayName( getcontact(e->event.msg.sender, 1, 0, NULL), 0);
gce.time = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
gce.dwFlags = GCEF_ADDTOLOG;
- debugLog(_T("mainthread() (%x): Conference message to room %s & id %s."), this, chat, id);
+ debugLog(L"mainthread() (%x): Conference message to room %s & id %s.", this, chat, id);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free(messageT);
}
@@ -907,7 +907,7 @@ retry: gce.time = e->event.multilogon_msg.time;
gce.bIsMe = 1;
gce.dwFlags = GCEF_ADDTOLOG;
- debugLog(_T("mainthread() (%x): Sent conference message to room %s."), this, chat);
+ debugLog(L"mainthread() (%x): Sent conference message to room %s.", this, chat);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free(messageT);
mir_free(nickT);
@@ -974,7 +974,7 @@ retry: if (iIndexes && iIndexes[i])
continue;
- mir_sntprintf(szMsg, _T("%s (%s)"), szText,
+ mir_sntprintf(szMsg, L"%s (%s)", szText,
*e->event.multilogon_info.sessions[i].name != '\0' ?
_A2T(e->event.multilogon_info.sessions[i].name) : TranslateT("Unknown client"));
showpopup(m_tszUserName, szMsg, GG_POPUP_MULTILOGON);
@@ -1538,7 +1538,7 @@ MCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick) MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
- debugLog(_T("getcontact(): Failed to create Gadu-Gadu contact %s"), szNick);
+ debugLog(L"getcontact(): Failed to create Gadu-Gadu contact %s", szNick);
return NULL;
}
@@ -1701,7 +1701,7 @@ void GGPROTO::changecontactstatus(uin_t uin, int status, const TCHAR *idescr, in // Check if there's description and if it's not empty
if (idescr && *idescr)
{
- debugLog(_T("changecontactstatus(): Saving for %d status descr \"%s\"."), uin, idescr);
+ debugLog(L"changecontactstatus(): Saving for %d status descr \"%s\".", uin, idescr);
db_set_ts(hContact, "CList", GG_KEY_STATUSDESCR, idescr);
} else {
// Remove status if there's nothing
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 6fb87d7bca..f3c500cc79 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -65,7 +65,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule if (dbv.cVal == -100) unspecified = 1; else { ptstr = str; - mir_sntprintf(str, dbv.cVal ? _T("GMT%+d:%02d") : _T("GMT"), -dbv.cVal / 2, (dbv.cVal & 1) * 30); + mir_sntprintf(str, dbv.cVal ? L"GMT%+d:%02d" : L"GMT", -dbv.cVal / 2, (dbv.cVal & 1) * 30); } } else { unspecified = (special == SVS_ZEROISUNSPEC && dbv.bVal == 0); @@ -79,7 +79,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule unspecified = 1; } else { ptstr = str; - mir_sntprintf(str, _T("%S"), pstr); + mir_sntprintf(str, L"%S", pstr); } } else { @@ -97,12 +97,12 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule unspecified = 1; } else { ptstr = str; - mir_sntprintf(str, _T("%S"), pstr); + mir_sntprintf(str, L"%S", pstr); } if (dbv.dVal == 0) unspecified = 1; } else if (special == SVS_GGVERSION) { ptstr = str; - mir_sntprintf(str, _T("%S"), (char *)gg_version2string(dbv.dVal)); + mir_sntprintf(str, L"%S", (char *)gg_version2string(dbv.dVal)); } else { ptstr = _itot(special == SVS_SIGNED ? dbv.lVal : dbv.dVal, str, 10); } @@ -110,7 +110,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule case DBVT_ASCIIZ: unspecified = (special == SVS_ZEROISUNSPEC && dbv.pszVal[0] == '\0'); ptstr = str; - mir_sntprintf(str, _T("%S"), dbv.pszVal); + mir_sntprintf(str, L"%S", dbv.pszVal); break; case DBVT_TCHAR: unspecified = (special == SVS_ZEROISUNSPEC && dbv.ptszVal[0] == '\0'); @@ -125,7 +125,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule break; default: ptstr = str; - mir_tstrcpy(str, _T("???")); + mir_tstrcpy(str, L"???"); break; } } @@ -682,7 +682,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, // Add genders if (!dat->hContact) { - SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)_T("")); // 0 + SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)L""); // 0 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Female")); // 1 SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Male")); // 2 } diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index feb65aa5d9..62b12b934b 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -65,9 +65,9 @@ TCHAR* ws_strerror(int code) TCHAR buff[128];
int len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, WSAGetLastError(), 0, buff, _countof(buff), NULL);
if (len == 0)
- mir_sntprintf(err_desc, _T("WinSock %u: Unknown error."), WSAGetLastError());
+ mir_sntprintf(err_desc, L"WinSock %u: Unknown error.", WSAGetLastError());
else
- mir_sntprintf(err_desc, _T("WinSock %d: %s"), WSAGetLastError(), buff);
+ mir_sntprintf(err_desc, L"WinSock %d: %s", WSAGetLastError(), buff);
return err_desc;
}
@@ -174,20 +174,20 @@ void GGPROTO::cleanuplastplugin(DWORD version) debugLogA("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version);
TCHAR avatarsPath[MAX_PATH];
- mir_sntprintf(avatarsPath, _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName);
+ mir_sntprintf(avatarsPath, L"%s\\%s", VARST( L"%miranda_avatarcache%"), m_tszUserName);
- debugLog(_T("cleanuplastplugin() 1: miranda_avatarcache = %s"), avatarsPath);
+ debugLog(L"cleanuplastplugin() 1: miranda_avatarcache = %s", avatarsPath);
TCHAR spec[MAX_PATH + 10];
- mir_sntprintf(spec, _T("%s\\*.(null)"), avatarsPath);
+ mir_sntprintf(spec, L"%s\\*.(null)", avatarsPath);
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(spec, &ffd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
TCHAR filePathT [2*MAX_PATH + 10];
- mir_sntprintf(filePathT, _T("%s\\%s"), avatarsPath, ffd.cFileName);
+ mir_sntprintf(filePathT, L"%s\\%s", avatarsPath, ffd.cFileName);
if (!_taccess(filePathT, 0)){
- debugLog(_T("cleanuplastplugin() 1: remove file = %s"), filePathT);
+ debugLog(L"cleanuplastplugin() 1: remove file = %s", filePathT);
_tremove(filePathT);
}
} while (FindNextFile(hFind, &ffd) != 0);
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index b089305de3..81eb4f0bf6 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -68,7 +68,7 @@ GGPROTO::GGPROTO(const char *pszProtoName, const TCHAR *tszUserName) : db_set_resident(m_szModuleName, GG_KEY_AVATARREQUESTED);
TCHAR szPath[MAX_PATH];
- mir_sntprintf(szPath, _T("%s\\%s\\ImageCache"), (TCHAR*)VARST(_T("%miranda_userdata%")), m_tszUserName);
+ mir_sntprintf(szPath, L"%s\\%s\\ImageCache", (TCHAR*)VARST(L"%miranda_userdata%"), m_tszUserName);
hImagesFolder = FoldersRegisterCustomPathT(LPGEN("Images"), m_szModuleName, szPath, m_tszUserName);
DWORD dwVersion;
@@ -431,7 +431,7 @@ HWND GGPROTO::SearchAdvanced(HWND hwndDlg) yearFrom = 0;
else
yearFrom = ay - yearFrom;
- mir_sntprintf(text, _T("%d %d"), yearFrom, yearTo);
+ mir_sntprintf(text, L"%d %d", yearFrom, yearTo);
T2Utf age_utf8(text);
gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, age_utf8);
@@ -499,7 +499,7 @@ static INT_PTR CALLBACK gg_advancedsearchdlgproc(HWND hwndDlg, UINT message, WPA switch (message) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)_T("")); // 0
+ SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)L""); // 0
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Female")); // 1
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_ADDSTRING, 0, (LPARAM)TranslateT("Male")); // 2
return TRUE;
@@ -597,7 +597,7 @@ void __cdecl GGPROTO::getawaymsgthread(void *arg) gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR)) {
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
- debugLog(_T("getawaymsgthread(): Reading away msg <%s>."), dbv.ptszVal);
+ debugLog(L"getawaymsgthread(): Reading away msg <%s>.", dbv.ptszVal);
db_free(&dbv);
}
else {
@@ -627,7 +627,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const TCHAR *newMsg) int status = gg_normalizestatus(iStatus);
TCHAR **msgPtr;
- debugLog(_T("SetAwayMsg(): PS_SETAWAYMSG(%d, \"%s\")."), iStatus, newMsg);
+ debugLog(L"SetAwayMsg(): PS_SETAWAYMSG(%d, \"%s\".)", iStatus, newMsg);
gg_EnterCriticalSection(&modemsg_mutex, "SetAwayMsg", 55, "modemsg_mutex", 1);
// Select proper our msg ptr
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 305e398548..5bf54545b1 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -128,7 +128,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) // Window terminated (Miranda exit)
if (gch->pDest->iType == SESSION_TERMINATE)
{
- debugLog(_T("gc_event(): Terminating chat %x, id %s from chat window..."), chat, gch->pDest->ptszID);
+ debugLog(L"gc_event(): Terminating chat %x, id %s from chat window...", chat, gch->pDest->ptszID);
// Destroy chat entry
free(chat->recipients);
list_remove(&chats, chat, 1);
@@ -173,7 +173,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) gce.time = time(NULL);
gce.bIsMe = 1;
gce.dwFlags = GCEF_ADDTOLOG;
- debugLog(_T("gc_event(): Sending conference message to room %s, \"%s\"."), gch->pDest->ptszID, gch->ptszText);
+ debugLog(L"gc_event(): Sending conference message to room %s, \"%s\".", gch->pDest->ptszID, gch->ptszText);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free(nickT);
@@ -191,7 +191,7 @@ int GGPROTO::gc_event(WPARAM, LPARAM lParam) if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
}
- debugLog(_T("gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\"."), gch->pDest->iType, chat, uin, gch->ptszText);
+ debugLog(L"gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\".", gch->pDest->iType, chat, uin, gch->ptszText);
return 0;
}
@@ -246,9 +246,9 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count if (found == recipients_count)
{
if (chat->ignore)
- debugLog(_T("gc_getchat(): Ignoring existing id %s, size %d."), chat->id, chat->recipients_count);
+ debugLog(L"gc_getchat(): Ignoring existing id %s, size %d.", chat->id, chat->recipients_count);
else
- debugLog(_T("gc_getchat(): Returning existing id %s, size %d."), chat->id, chat->recipients_count);
+ debugLog(L"gc_getchat(): Returning existing id %s, size %d.", chat->id, chat->recipients_count);
return !(chat->ignore) ? chat->id : NULL;
}
}
@@ -295,7 +295,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count for(; i < recipients_count; i++)
chat->recipients[i] = recipients[i];
if (sender) chat->recipients[i] = sender;
- debugLog(_T("gc_getchat(): Ignoring new chat %s, count %d."), chat->id, chat->recipients_count);
+ debugLog(L"gc_getchat(): Ignoring new chat %s, count %d.", chat->id, chat->recipients_count);
list_add(&chats, chat, 0);
return NULL;
}
@@ -330,7 +330,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count // Create new room
if (CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM) &gcwindow)) {
- debugLog(_T("gc_getchat(): Cannot create new chat window %s."), chat->id);
+ debugLog(L"gc_getchat(): Cannot create new chat window %s.", chat->id);
free(name);
free(chat);
return NULL;
@@ -364,7 +364,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count gce.bIsMe = 1;
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free(nickT);
- debugLog(_T("gc_getchat(): Myself %s: %s (%s) to the list..."), gce.ptszUID, gce.ptszNick, gce.ptszStatus);
+ debugLog(L"gc_getchat(): Myself %s: %s (%s) to the list...", gce.ptszUID, gce.ptszNick, gce.ptszStatus);
}
else debugLogA("gc_getchat(): Myself adding failed with uin %d !!!", uin);
@@ -386,14 +386,14 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count gce.ptszNick = TranslateT("'Unknown'");
gce.bIsMe = 0;
gce.dwFlags = 0;
- debugLog(_T("gc_getchat(): Added %s: %s (%s) to the list..."), gce.ptszUID, gce.ptszNick, gce.ptszStatus);
+ debugLog(L"gc_getchat(): Added %s: %s (%s) to the list...", gce.ptszUID, gce.ptszNick, gce.ptszStatus);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
}
gcd.iType = GC_EVENT_CONTROL;
CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce);
CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
- debugLog(_T("gc_getchat(): Returning new chat window %s, count %d."), chat->id, chat->recipients_count);
+ debugLog(L"gc_getchat(): Returning new chat window %s, count %d.", chat->id, chat->recipients_count);
list_add(&chats, chat, 0);
return chat->id;
}
@@ -641,7 +641,7 @@ int GGPROTO::gc_changenick(MCONTACT hContact, TCHAR *ptszNick) gce.ptszUID = id;
gce.ptszText = ptszNick;
- debugLog(_T("gc_changenick(): Found room %s with uin %d, sending nick change %s."), chat->id, uin, id);
+ debugLog(L"gc_changenick(): Found room %s with uin %d, sending nick change %s.", chat->id, uin, id);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
break;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 87ccaa2a54..bd6313b5b0 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -219,7 +219,7 @@ TCHAR *gg_img_getfilter(TCHAR *szFilter, int nSize) // Match relative to ImgDecoder presence
szFilterName = TranslateT("Image files (*.bmp,*.gif,*.jpeg,*.jpg,*.png)");
- szFilterMask = _T("*.bmp;*.gif;*.jpeg;*.jpg;*.png");
+ szFilterMask = L"*.bmp;*.gif;*.jpeg;*.jpg;*.png";
// Make up filter
_tcsncpy(pFilter, szFilterName, nSize);
@@ -259,16 +259,16 @@ int gg_img_saveimage(HWND hwnd, GGIMAGEENTRY *dat) ofn.Flags = OFN_PATHMUSTEXIST | OFN_NOCHANGEDIR | OFN_OVERWRITEPROMPT;
if (GetSaveFileName(&ofn))
{
- FILE *fp = _tfopen(szFileName, _T("w+b"));
+ FILE *fp = _tfopen(szFileName, L"w+b");
if (fp)
{
fwrite(dat->lpData, dat->nSize, 1, fp);
fclose(fp);
- gg->debugLog(_T("gg_img_saveimage(): Image saved to %s."), szFileName);
+ gg->debugLog(L"gg_img_saveimage(): Image saved to %s.", szFileName);
}
else
{
- gg->debugLog(_T("gg_img_saveimage(): Cannot save image to %s."), szFileName);
+ gg->debugLog(L"gg_img_saveimage(): Cannot save image to %s.", szFileName);
MessageBox(hwnd, TranslateT("Image cannot be written to disk."), gg->m_tszUserName, MB_OK | MB_ICONERROR);
}
}
@@ -495,7 +495,7 @@ static INT_PTR CALLBACK gg_img_dlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dat->bReceiving)
{
TCHAR szTitle[128];
- mir_sntprintf(szTitle, _T("%s (%d / %d)"), img->lpszFileName, dat->nImg, dat->nImgTotal);
+ mir_sntprintf(szTitle, L"%s (%d / %d)", img->lpszFileName, dat->nImg, dat->nImgTotal);
SetDlgItemText(hwndDlg, IDC_IMG_NAME, szTitle);
}
else
@@ -747,7 +747,7 @@ int gg_img_isexists(TCHAR *szPath, GGIMAGEENTRY *dat) if (st.st_size == dat->nSize)
{
- FILE *fp = _tfopen(szPath, _T("rb"));
+ FILE *fp = _tfopen(szPath, L"rb");
if (!fp) return 0;
char *lpData = (char*)mir_alloc(dat->nSize);
if (fread(lpData, 1, dat->nSize, fp) == dat->nSize)
@@ -779,12 +779,12 @@ TCHAR *gg_img_hasextension(TCHAR *filename) {
size_t len = mir_tstrlen(imgtype);
imgtype++;
- if (len == 4 && (mir_tstrcmpi(imgtype, _T("bmp")) == 0 ||
- mir_tstrcmpi(imgtype, _T("gif")) == 0 ||
- mir_tstrcmpi(imgtype, _T("jpg")) == 0 ||
- mir_tstrcmpi(imgtype, _T("png")) == 0))
+ if (len == 4 && (mir_tstrcmpi(imgtype, L"bmp") == 0 ||
+ mir_tstrcmpi(imgtype, L"gif") == 0 ||
+ mir_tstrcmpi(imgtype, L"jpg") == 0 ||
+ mir_tstrcmpi(imgtype, L"png") == 0))
return --imgtype;
- if (len == 5 && mir_tstrcmpi(imgtype, _T("jpeg")) == 0)
+ if (len == 5 && mir_tstrcmpi(imgtype, L"jpeg") == 0)
return --imgtype;
}
}
@@ -801,9 +801,9 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) size_t tPathLen;
int i, res;
- if (hImagesFolder == NULL || FoldersGetCustomPathT(hImagesFolder, path, MAX_PATH, _T(""))) {
- TCHAR *tmpPath = Utils_ReplaceVarsT( _T("%miranda_userdata%"));
- tPathLen = mir_sntprintf(szPath, _T("%s\\%s\\ImageCache"), tmpPath, m_tszUserName);
+ if (hImagesFolder == NULL || FoldersGetCustomPathT(hImagesFolder, path, MAX_PATH, L"")) {
+ TCHAR *tmpPath = Utils_ReplaceVarsT( L"%miranda_userdata%");
+ tPathLen = mir_sntprintf(szPath, L"%s\\%s\\ImageCache", tmpPath, m_tszUserName);
mir_free(tmpPath);
}
else {
@@ -814,33 +814,33 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) if ( _taccess(szPath, 0)){
int ret = CreateDirectoryTreeT(szPath);
if (ret == 0){
- debugLog(_T("img_displayasmsg(): Created new directory for image cache: %s."), szPath);
+ debugLog(L"img_displayasmsg(): Created new directory for image cache: %s.", szPath);
} else {
- debugLog(_T("img_displayasmsg(): Can not create directory for image cache: %s. errno=%d: %s"), szPath, errno, strerror(errno));
+ debugLog(L"img_displayasmsg(): Can not create directory for image cache: %s. errno=%d: %s", szPath, errno, strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot create image cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR | GG_POPUP_ALLOW_MSGBOX | GG_POPUP_ONCE);
}
}
- mir_sntprintf(szPath + tPathLen, MAX_PATH - tPathLen, _T("\\%s"), dat->lpszFileName);
+ mir_sntprintf(szPath + tPathLen, MAX_PATH - tPathLen, L"\\%s", dat->lpszFileName);
if ((pImgext = gg_img_hasextension(szPath)) == NULL)
pImgext = szPath + mir_tstrlen(szPath);
_tcsncpy_s(imgext, pImgext, _TRUNCATE);
for (i = 1; ; ++i)
{
if ((res = gg_img_isexists(szPath, dat)) != -1) break;
- mir_sntprintf(szPath, _T("%.*s (%u)%s"), pImgext - szPath, szPath, i, imgext);
+ mir_sntprintf(szPath, L"%.*s (%u)%s", pImgext - szPath, szPath, i, imgext);
}
if (res == 0) {
// Image file not found, thus create it
- FILE *fp = _tfopen(szPath, _T("w+b"));
+ FILE *fp = _tfopen(szPath, L"w+b");
if (fp) {
res = fwrite(dat->lpData, dat->nSize, 1, fp) > 0;
fclose(fp);
} else {
- debugLog(_T("img_displayasmsg(): Cannot open file %s for write image. errno=%d: %s"), szPath, errno, strerror(errno));
+ debugLog(L"img_displayasmsg(): Cannot open file %s for write image. errno=%d: %s", szPath, errno, strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot save received image to file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
@@ -850,16 +850,16 @@ int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img) if (res != 0) {
TCHAR image_msg[MAX_PATH + 11];
- mir_sntprintf(image_msg, _T("[img]%s[/img]"), szPath);
+ mir_sntprintf(image_msg, L"[img]%s[/img]", szPath);
T2Utf szMessage(image_msg);
PROTORECVEVENT pre = {0};
pre.timestamp = time(NULL);
pre.szMessage = szMessage;
ProtoChainRecvMsg(hContact, &pre);
- debugLog(_T("img_displayasmsg(): Image saved to %s."), szPath);
+ debugLog(L"img_displayasmsg(): Image saved to %s.", szPath);
}
- else debugLog(_T("img_displayasmsg(): Cannot save image to %s."), szPath);
+ else debugLog(L"img_displayasmsg(): Cannot save image to %s.", szPath);
return 0;
}
@@ -931,15 +931,15 @@ const TCHAR *gg_img_guessfileextension(const char *lpData) if (lpData != NULL)
{
if (memcmp(lpData, "BM", 2) == 0)
- return _T(".bmp");
+ return L".bmp";
if (memcmp(lpData, "GIF8", 4) == 0)
- return _T(".gif");
+ return L".gif";
if (memcmp(lpData, "\xFF\xD8", 2) == 0)
- return _T(".jpg");
+ return L".jpg";
if (memcmp(lpData, "\x89PNG", 4) == 0)
- return _T(".png");
+ return L".png";
}
- return _T("");
+ return L"";
}
////////////////////////////////////////////////////////////////////////////
@@ -958,10 +958,10 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) // Copy the file name
if (szFileName)
{
- FILE *fp = _tfopen(szFileName, _T("rb"));
+ FILE *fp = _tfopen(szFileName, L"rb");
if (!fp) {
free(dat);
- debugLog(_T("img_loadpicture(): fopen(\"%s\", \"rb\") failed. errno=%d: %s"), szFileName, errno, strerror(errno));
+ debugLog(L"img_loadpicture(): fopen(\"%s\", \"rb\" failed. errno=%d: %s)", szFileName, errno, strerror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot open image file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), szFileName);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
@@ -973,7 +973,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) {
fclose(fp);
free(dat);
- debugLog(_T("img_loadpicture(): Zero file size \"%s\" failed."), szFileName);
+ debugLog(L"img_loadpicture(): Zero file size \"%s\" failed.", szFileName);
return NULL;
}
// Maximum acceptable image size
@@ -981,7 +981,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) {
fclose(fp);
free(dat);
- debugLog(_T("img_loadpicture(): Image size of \"%s\" exceeds 255 KB."), szFileName);
+ debugLog(L"img_loadpicture(): Image size of \"%s\" exceeds 255 KB.", szFileName);
MessageBox(NULL, TranslateT("Image exceeds maximum allowed size of 255 KB."), m_tszUserName, MB_OK | MB_ICONEXCLAMATION);
return NULL;
}
@@ -992,7 +992,7 @@ void* GGPROTO::img_loadpicture(gg_event* e, TCHAR *szFileName) free(dat->lpData);
fclose(fp);
free(dat);
- debugLog(_T("img_loadpicture(): Reading file \"%s\" failed."), szFileName);
+ debugLog(L"img_loadpicture(): Reading file \"%s\" failed.", szFileName);
return NULL;
}
fclose(fp);
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 190270ceac..9b5a0cde73 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -280,7 +280,7 @@ INT_PTR GGPROTO::import_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "import_server", 65, 1, "sess_mutex", 1);
mir_sntprintf(error, TranslateT("List cannot be imported because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("import_server(): Cannot import list. errno:%d: %s"), errno, ws_strerror(errno));
+ debugLog(L"import_server(): Cannot import list. errno:%d: %s", errno, ws_strerror(errno));
}
gg_LeaveCriticalSection(&sess_mutex, "import_server", 65, 2, "sess_mutex", 1);
@@ -318,7 +318,7 @@ INT_PTR GGPROTO::remove_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "remove_server", 66, 1, "sess_mutex", 1);
mir_sntprintf(error, TranslateT("List cannot be removed because of error: %s (Error: %d)"), ws_strerror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("remove_server(): Cannot remove list. errno=%d: %s"), errno, ws_strerror(errno));
+ debugLog(L"remove_server(): Cannot remove list. errno=%d: %s", errno, ws_strerror(errno));
}
gg_LeaveCriticalSection(&sess_mutex, "remove_server", 66, 2, "sess_mutex", 1);
@@ -337,23 +337,23 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) OPENFILENAME ofn = {0};
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
_tcsncpy(filter, TranslateT("Text files"), _countof(filter));
- mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter));
pfilter = filter + mir_tstrlen(filter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
- _tcsncpy(pfilter, _T("*.TXT"), _countof(filter) - (pfilter - filter));
+ _tcsncpy(pfilter, L"*.TXT", _countof(filter) - (pfilter - filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
_tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - (pfilter - filter));
- mir_tstrncat(pfilter, _T(" (*)"), _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
+ mir_tstrncat(pfilter, L" (*)", _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
- _tcsncpy(pfilter, _T("*"), _countof(filter) - (pfilter - filter));
+ _tcsncpy(pfilter, L"*", _countof(filter) - (pfilter - filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
@@ -366,14 +366,14 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("txt");
+ ofn.lpstrDefExt = L"txt";
#ifdef DEBUGMODE
debugLogA("import_text()");
#endif
if (!GetOpenFileName(&ofn)) return 0;
- FILE *f = _tfopen(str, _T("r"));
+ FILE *f = _tfopen(str, L"r");
_tstat(str, &st);
if (f && st.st_size)
@@ -392,7 +392,7 @@ INT_PTR GGPROTO::import_text(WPARAM, LPARAM) TCHAR error[256];
mir_sntprintf(error, TranslateT("List cannot be imported from file \"%s\" because of error:\n\t%s (Error: %d)"), str, _tcserror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("import_text(): Cannot import list from file \"%s\". errno=%d: %s"), str, errno, _tcserror(errno));
+ debugLog(L"import_text(): Cannot import list from file \"%s\". errno=%d: %s", str, errno, _tcserror(errno));
if (f)
fclose(f);
return 0;
@@ -406,24 +406,24 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) TCHAR filter[512], *pfilter;
_tcsncpy(str, TranslateT("contacts"), _countof(str));
- mir_tstrncat(str, _T(".txt"), _countof(str) - mir_tstrlen(str));
+ mir_tstrncat(str, L".txt", _countof(str) - mir_tstrlen(str));
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
_tcsncpy(filter, TranslateT("Text files"), _countof(filter));
- mir_tstrncat(filter, _T(" (*.txt)"), _countof(filter) - mir_tstrlen(filter));
+ mir_tstrncat(filter, L" (*.txt)", _countof(filter) - mir_tstrlen(filter));
pfilter = filter + mir_tstrlen(filter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
- _tcsncpy(pfilter, _T("*.TXT"), _countof(filter) - (pfilter - filter));
+ _tcsncpy(pfilter, L"*.TXT", _countof(filter) - (pfilter - filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
_tcsncpy(pfilter, TranslateT("All Files"), _countof(filter) - (pfilter - filter));
- mir_tstrncat(pfilter, _T(" (*)"), _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
+ mir_tstrncat(pfilter, L" (*)", _countof(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
- _tcsncpy(pfilter, _T("*"), _countof(filter) - (pfilter - filter));
+ _tcsncpy(pfilter, L"*", _countof(filter) - (pfilter - filter));
pfilter = pfilter + mir_tstrlen(pfilter) + 1;
if (pfilter >= filter + _countof(filter))
return 0;
@@ -433,14 +433,14 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("txt");
+ ofn.lpstrDefExt = L"txt";
#ifdef DEBUGMODE
- debugLog(_T("export_text(%s)."), str);
+ debugLog(L"export_text(%s).", str);
#endif
if (!GetSaveFileName(&ofn)) return 0;
- FILE *f = _tfopen(str, _T("w"));
+ FILE *f = _tfopen(str, L"w");
if (f) {
char *contacts = gg_makecontacts(this, 0);
fwrite(contacts, sizeof(char), mir_strlen(contacts), f);
@@ -454,7 +454,7 @@ INT_PTR GGPROTO::export_text(WPARAM, LPARAM) TCHAR error[128];
mir_sntprintf(error, TranslateT("List cannot be exported to file \"%s\" because of error:\n\t%s (Error: %d)"), str, _tcserror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("export_text(): Cannot export list to file \"%s\". errno=%d: %s"), str, errno, _tcserror(errno));
+ debugLog(L"export_text(): Cannot export list to file \"%s\". errno=%d: %s", str, errno, _tcserror(errno));
}
return 0;
@@ -498,7 +498,7 @@ INT_PTR GGPROTO::export_server(WPARAM, LPARAM) gg_LeaveCriticalSection(&sess_mutex, "export_server", 67, 1, "sess_mutex", 1);
mir_sntprintf(error, TranslateT("List cannot be exported because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("export_server(): Cannot export list. errno=%d: %s"), errno, ws_strerror(errno));
+ debugLog(L"export_server(): Cannot export list. errno=%d: %s", errno, ws_strerror(errno));
}
gg_LeaveCriticalSection(&sess_mutex, "export_server", 67, 2, "sess_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index be19ab681c..2bcff16f9e 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -316,12 +316,12 @@ int GGPROTO::oauth_receivetoken() nlc = resp->nlc;
if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) {
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, L"result");
if (hXml != NULL) {
- HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0);
+ HXML node = xmlGetChildByPath(hXml, L"oauth_token", 0);
token = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
- node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0);
+ node = xmlGetChildByPath(hXml, L"oauth_token_secret", 0);
token_secret = node != NULL ? mir_t2a(xmlGetText(node)) : NULL;
xmlDestroyNode(hXml);
@@ -385,12 +385,12 @@ int GGPROTO::oauth_receivetoken() if (resp) {
if (resp->resultCode == 200 && resp->dataLength > 0 && resp->pData) {
TCHAR *xmlAction = mir_a2t(resp->pData);
- HXML hXml = xmlParseString(xmlAction, 0, _T("result"));
+ HXML hXml = xmlParseString(xmlAction, 0, L"result");
if (hXml != NULL) {
- HXML node = xmlGetChildByPath(hXml, _T("oauth_token"), 0);
+ HXML node = xmlGetChildByPath(hXml, L"oauth_token", 0);
token = mir_t2a(xmlGetText(node));
- node = xmlGetChildByPath(hXml, _T("oauth_token_secret"), 0);
+ node = xmlGetChildByPath(hXml, L"oauth_token_secret", 0);
token_secret = mir_t2a(xmlGetText(node));
xmlDestroyNode(hXml);
diff --git a/protocols/Gadu-Gadu/src/ownerinfo.cpp b/protocols/Gadu-Gadu/src/ownerinfo.cpp index b51fd7caba..125c0da27d 100644 --- a/protocols/Gadu-Gadu/src/ownerinfo.cpp +++ b/protocols/Gadu-Gadu/src/ownerinfo.cpp @@ -59,7 +59,7 @@ void __cdecl GGPROTO::remindpasswordthread(void *param) TCHAR error[128];
mir_sntprintf(error, TranslateT("Password could not be reminded because of error:\n\t%s (Error: %d)"), ws_strerror(errno), errno);
MessageBox(NULL, error, m_tszUserName, MB_OK | MB_ICONSTOP);
- debugLog(_T("remindpasswordthread(): Password could not be reminded. errno=%d: %s"), errno, ws_strerror(errno));
+ debugLog(L"remindpasswordthread(): Password could not be reminded. errno=%d: %s", errno, ws_strerror(errno));
}
else
{
diff --git a/protocols/Gadu-Gadu/src/popups.cpp b/protocols/Gadu-Gadu/src/popups.cpp index 451b3aac5d..e8ca28f164 100644 --- a/protocols/Gadu-Gadu/src/popups.cpp +++ b/protocols/Gadu-Gadu/src/popups.cpp @@ -87,7 +87,7 @@ void GGPROTO::initpopups() puc.hIcon = CopyIcon(LoadIconEx("main", FALSE));
ReleaseIconEx("main", FALSE);
puc.iSeconds = 4;
- mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
+ mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Notify"));
mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify");
hPopupNotify = Popup_RegisterClass(&puc);
@@ -95,7 +95,7 @@ void GGPROTO::initpopups() puc.colorText = RGB(255, 245, 225); // Yellow
puc.iSeconds = 60;
puc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED);
- mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Error"));
mir_snprintf(szName, "%s_%s", m_szModuleName, "Error");
hPopupError = Popup_RegisterClass(&puc);
}
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 2dae64d0ff..d5c5c99217 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -235,12 +235,12 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) }
requestAvatarTransfer(pai->hContact, AvatarURL);
- debugLog(_T("getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged but file %s does not exist. errno=%d: %s. requestAvatarTransfer() fired. return GAIR_WAITFOR"), uin, pai->filename, errno, ws_strerror(errno));
+ debugLog(L"getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged but file %s does not exist. errno=%d: %s. requestAvatarTransfer() fired. return GAIR_WAITFOR", uin, pai->filename, errno, ws_strerror(errno));
return GAIR_WAITFOR;
}
if ((wParam & GAIF_FORCE) != 0) {
if (_tremove(pai->filename) != 0){
- debugLog(_T("getavatarinfo(): refresh. _tremove 1 file %s error. errno=%d: %s"), pai->filename, errno, _tcserror(errno));
+ debugLog(L"getavatarinfo(): refresh. _tremove 1 file %s error. errno=%d: %s", pai->filename, errno, _tcserror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot remove old avatar file before refresh. ERROR: %d: %s\n%s"), errno, _tcserror(errno), pai->filename);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
@@ -255,7 +255,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) if (AvatarHash == NULL && AvatarSavedHash != NULL) {
getAvatarFilename(pai->hContact, pai->filename, _countof(pai->filename));
if (_tremove(pai->filename) != 0){
- debugLog(_T("getavatarinfo(): delete. _tremove file %s error. errno=%d: %s"), pai->filename, errno, _tcserror(errno));
+ debugLog(L"getavatarinfo(): delete. _tremove file %s error. errno=%d: %s", pai->filename, errno, _tcserror(errno));
TCHAR error[512];
mir_sntprintf(error, TranslateT("Cannot remove old avatar file. ERROR: %d: %s\n%s"), errno, _tcserror(errno), pai->filename);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
@@ -302,7 +302,7 @@ INT_PTR GGPROTO::getmyavatar(WPARAM wParam, LPARAM lParam) debugLogA("getmyavatar(): Incoming request for self avatar information. returned ok.");
return 0;
} else {
- debugLog(_T("getmyavatar(): Incoming request for self avatar information. saved avatar file %s does not exist. return -1 (error)"), szFilename);
+ debugLog(L"getmyavatar(): Incoming request for self avatar information. saved avatar file %s does not exist. return -1 (error)", szFilename);
return -1;
}
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index ba881c9d3a..bd68343587 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -330,7 +330,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w ListView_GetItemText(hList, lvhti.iItem, 0, szClientName, _countof(szClientName));
ListView_GetItemText(hList, lvhti.iItem, 1, szIP, _countof(szIP));
ListView_GetItemText(hList, lvhti.iItem, 2, szLoginTime, _countof(szLoginTime));
- mir_sntprintf(szText, _T("%s\t%s\t%s"), szClientName, szIP, szLoginTime);
+ mir_sntprintf(szText, L"%s\t%s\t%s", szClientName, szIP, szLoginTime);
if ((hData = GlobalAlloc(GMEM_MOVEABLE, mir_tstrlen(szText) + 1)) != NULL)
{
mir_tstrcpy((TCHAR*)GlobalLock(hData), szText);
@@ -346,7 +346,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w TCHAR szUrl[256], szIP[64];
szIP[0] = 0;
ListView_GetItemText(hList, lvhti.iItem, 1, szIP, _countof(szIP));
- mir_sntprintf(szUrl, _T("http://whois.domaintools.com/%s"), szIP);
+ mir_sntprintf(szUrl, L"http://whois.domaintools.com/%s", szIP);
Utils_OpenUrlT(szUrl);
break;
}
diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 03bb478ac5..4f40b99e37 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -44,7 +44,7 @@ void *gg_doregister(GGPROTO *gg, char *newPass, char *newEmail) (h && !s) ? http_error_string(h->error) :
(s ? TranslateT("Registration rejected") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLog(_T("gg_doregister(): Cannot register. errno=%d: %s"), errno, ws_strerror(errno));
+ gg->debugLog(L"gg_doregister(): Cannot register. errno=%d: %s", errno, ws_strerror(errno));
}
else {
gg->setDword(GG_KEY_UIN, s->uin);
@@ -90,7 +90,7 @@ void *gg_dounregister(GGPROTO *gg, uin_t uin, char *password) (h && !s) ? http_error_string(h->error) :
(s ? TranslateT("Bad number or password") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLog(_T("gg_dounregister(): Cannot remove account. errno=%d: %s"), errno, ws_strerror(errno));
+ gg->debugLog(L"gg_dounregister(): Cannot remove account. errno=%d: %s", errno, ws_strerror(errno));
}
else
{
@@ -142,7 +142,7 @@ void *gg_dochpass(GGPROTO *gg, uin_t uin, char *password, char *newPass) (h && !s) ? http_error_string(h->error) :
(s ? TranslateT("Invalid data entered") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLog(_T("gg_dochpass(): Cannot change password. errno=%d: %s"), errno, ws_strerror(errno));
+ gg->debugLog(L"gg_dochpass(): Cannot change password. errno=%d: %s", errno, ws_strerror(errno));
}
else
{
@@ -183,7 +183,7 @@ void *gg_dochemail(GGPROTO *gg, uin_t uin, char *password, char *email, char *ne mir_sntprintf(error, TranslateT("Your e-mail cannot be changed because of error:\n\t%s"),
(h && !s) ? http_error_string(h->error) : (s ? TranslateT("Bad old e-mail or password") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLog(_T("gg_dochemail(): Cannot change e-mail. errno=%d: %s"), errno, ws_strerror(errno));
+ gg->debugLog(L"gg_dochemail(): Cannot change e-mail. errno=%d: %s", errno, ws_strerror(errno));
}
else
{
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 22be4d9471..6a15e93456 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -59,7 +59,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, AddDCCSession(hContact, dcc);
dcc->Connect();
if (getByte("MirVerAutoRequest", 1))
- PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), name.c_str());
+ PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", name.c_str());
}
else {
CLISTEVENT cle = {};
@@ -110,7 +110,7 @@ MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline) setTString(hContact, "Default", user->name);
setWord(hContact, "Status", SetOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE);
if (!InList && getByte("MirVerAutoRequestTemp", 0))
- PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), user->name);
+ PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", user->name);
return hContact;
}
return false;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index fb7e734547..f72796fde8 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -52,10 +52,10 @@ VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) return;
if (ppro->m_forceVisible)
- ppro->PostIrcMessage(_T("/MODE %s -i"), ppro->m_info.sNick.c_str());
+ ppro->PostIrcMessage(L"/MODE %s -i", ppro->m_info.sNick.c_str());
if (mir_strlen(ppro->m_myHost) == 0 && ppro->IsConnected())
- ppro->DoUserhostWithReason(2, (_T("S") + ppro->m_info.sNick).c_str(), true, _T("%s"), ppro->m_info.sNick.c_str());
+ ppro->DoUserhostWithReason(2, (L"S" + ppro->m_info.sNick).c_str(), true, L"%s", ppro->m_info.sNick.c_str());
}
VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD)
@@ -71,9 +71,9 @@ VOID CALLBACK KeepAliveTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) TCHAR temp2[270];
if (!ppro->m_info.sServerName.IsEmpty())
- mir_sntprintf(temp2, _T("PING %s"), ppro->m_info.sServerName.c_str());
+ mir_sntprintf(temp2, L"PING %s", ppro->m_info.sServerName.c_str());
else
- mir_sntprintf(temp2, _T("PING %u"), time(0));
+ mir_sntprintf(temp2, L"PING %u", time(0));
if (ppro->IsConnected())
ppro->SendIrcMessage(temp2, false);
@@ -89,13 +89,13 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) ppro->m_iStatus == ID_STATUS_OFFLINE || ppro->m_iStatus == ID_STATUS_CONNECTING ||
(!ppro->m_autoOnlineNotification && !ppro->bTempForceCheck) || ppro->bTempDisableCheck) {
ppro->KillChatTimer(ppro->OnlineNotifTimer3);
- ppro->m_channelsToWho = _T("");
+ ppro->m_channelsToWho = L"";
return;
}
CMString name = GetWord(ppro->m_channelsToWho.c_str(), 0);
if (name.IsEmpty()) {
- ppro->m_channelsToWho = _T("");
+ ppro->m_channelsToWho = L"";
int count = (int)CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)ppro->m_szModuleName);
for (int i = 0; i < count; i++) {
GC_INFO gci = { 0 };
@@ -104,7 +104,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) gci.pszModule = ppro->m_szModuleName;
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM)
if (gci.iCount <= ppro->m_onlineNotificationLimit)
- ppro->m_channelsToWho += CMString(gci.pszName) + _T(" ");
+ ppro->m_channelsToWho += CMString(gci.pszName) + L" ";
}
}
@@ -114,7 +114,7 @@ VOID CALLBACK OnlineNotifTimerProc3(HWND, UINT, UINT_PTR idEvent, DWORD) }
name = GetWord(ppro->m_channelsToWho.c_str(), 0);
- ppro->DoUserhostWithReason(2, _T("S") + name, true, _T("%s"), name.c_str());
+ ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str());
CMString temp = GetWordAddress(ppro->m_channelsToWho.c_str(), 1);
ppro->m_channelsToWho = temp;
if (ppro->m_iTempCheckTime)
@@ -132,7 +132,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (ppro->m_iStatus == ID_STATUS_OFFLINE || ppro->m_iStatus == ID_STATUS_CONNECTING ||
(!ppro->m_autoOnlineNotification && !ppro->bTempForceCheck) || ppro->bTempDisableCheck) {
ppro->KillChatTimer(ppro->OnlineNotifTimer);
- ppro->m_namesToWho = _T("");
+ ppro->m_namesToWho = L"";
return;
}
@@ -156,7 +156,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (!bAdvanced) {
db_free(&dbv);
if (!ppro->getTString(hContact, "Nick", &dbv)) {
- ppro->m_namesToUserhost += CMString(dbv.ptszVal) + _T(" ");
+ ppro->m_namesToUserhost += CMString(dbv.ptszVal) + L" ";
db_free(&dbv);
}
}
@@ -172,9 +172,9 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) DBWildcard = dbv2.ptszVal;
if (DBNick && (!DBWildcard || !WCCmp(CharLower(DBWildcard), CharLower(DBNick))))
- ppro->m_namesToWho += CMString(DBNick) + _T(" ");
+ ppro->m_namesToWho += CMString(DBNick) + L" ";
else if (DBWildcard)
- ppro->m_namesToWho += CMString(DBWildcard) + _T(" ");
+ ppro->m_namesToWho += CMString(DBWildcard) + L" ";
if (DBNick) db_free(&dbv);
if (DBWildcard) db_free(&dbv2);
@@ -191,7 +191,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) name2 = GetWord(ppro->m_namesToUserhost.c_str(), 0);
CMString temp;
if (!name.IsEmpty()) {
- ppro->DoUserhostWithReason(2, _T("S") + name, true, _T("%s"), name.c_str());
+ ppro->DoUserhostWithReason(2, L"S" + name, true, L"%s", name.c_str());
temp = GetWordAddress(ppro->m_namesToWho.c_str(), 1);
ppro->m_namesToWho = temp;
}
@@ -199,12 +199,12 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (!name2.IsEmpty()) {
CMString params;
for (int i = 0; i < 3; i++) {
- params = _T("");
+ params = L"";
for (int j = 0; j < 5; j++)
- params += GetWord(ppro->m_namesToUserhost, i * 5 + j) + _T(" ");
+ params += GetWord(ppro->m_namesToUserhost, i * 5 + j) + L" ";
if (params[0] != ' ')
- ppro->DoUserhostWithReason(1, CMString(_T("S")) + params, true, params);
+ ppro->DoUserhostWithReason(1, CMString(L"S") + params, true, params);
}
temp = GetWordAddress(ppro->m_namesToUserhost.c_str(), 15);
ppro->m_namesToUserhost = temp;
@@ -261,7 +261,7 @@ void __cdecl CIrcProto::ResolveIPThread(LPVOID di) bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg)
{
TCHAR szResponse[100];
- mir_sntprintf(szResponse, _T("PONG %s"), pmsg->parameters[0].c_str());
+ mir_sntprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
SendIrcMessage(szResponse);
return false;
}
@@ -357,8 +357,8 @@ bool CIrcProto::OnIrc_SETAWAY(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg)
{
if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming && pmsg->prefix.sNick != m_info.sNick) {
- CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
- DoEvent(GC_EVENT_JOIN, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, _T("Normal"), host.c_str(), NULL, true, false);
+ CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
+ DoEvent(GC_EVENT_JOIN, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, L"Normal", host.c_str(), NULL, true, false);
DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE);
}
else ShowMessage(pmsg);
@@ -369,7 +369,7 @@ bool CIrcProto::OnIrc_JOIN(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming) {
- CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
+ CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
DoEvent(GC_EVENT_QUIT, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters.getCount() > 0 ? pmsg->parameters[0].c_str() : NULL, NULL, host.c_str(), NULL, true, false);
struct CONTACT user = { (LPTSTR)pmsg->prefix.sNick.c_str(), (LPTSTR)pmsg->prefix.sUser.c_str(), (LPTSTR)pmsg->prefix.sHost.c_str(), false, false, false };
CList_SetOffline(&user);
@@ -387,7 +387,7 @@ bool CIrcProto::OnIrc_QUIT(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_PART(const CIrcMessage* pmsg)
{
if (pmsg->parameters.getCount() > 0 && pmsg->m_bIncoming) {
- CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
+ CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
DoEvent(GC_EVENT_PART, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), pmsg->parameters.getCount() > 1 ? pmsg->parameters[1].c_str() : NULL, NULL, host.c_str(), NULL, true, false);
if (pmsg->prefix.sNick == m_info.sNick) {
CMString S = MakeWndID(pmsg->parameters[0].c_str());
@@ -417,9 +417,9 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) if (m_rejoinIfKicked) {
CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0);
if (wi && wi->pszPassword)
- PostIrcMessage(_T("/JOIN %s %s"), pmsg->parameters[0].c_str(), wi->pszPassword);
+ PostIrcMessage(L"/JOIN %s %s", pmsg->parameters[0].c_str(), wi->pszPassword);
else
- PostIrcMessage(_T("/JOIN %s"), pmsg->parameters[0].c_str());
+ PostIrcMessage(L"/JOIN %s", pmsg->parameters[0].c_str());
}
}
@@ -429,8 +429,8 @@ bool CIrcProto::OnIrc_KICK(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_MODEQUERY(const CIrcMessage* pmsg)
{
if (pmsg->parameters.getCount() > 2 && pmsg->m_bIncoming && IsChannel(pmsg->parameters[1])) {
- CMString sPassword = _T("");
- CMString sLimit = _T("");
+ CMString sPassword = L"";
+ CMString sLimit = L"";
bool bAdd = false;
int iParametercount = 3;
@@ -464,8 +464,8 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) {
bool flag = false;
bool bContainsValidModes = false;
- CMString sModes = _T("");
- CMString sParams = _T("");
+ CMString sModes = L"";
+ CMString sParams = L"";
if (pmsg->parameters.getCount() > 1 && pmsg->m_bIncoming) {
if (IsChannel(pmsg->parameters[0])) {
@@ -476,22 +476,22 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) while (*p1 != '\0') {
if (*p1 == '+') {
bAdd = true;
- sModes += _T("+");
+ sModes += L"+";
}
if (*p1 == '-') {
bAdd = false;
- sModes += _T("-");
+ sModes += L"-";
}
if (*p1 == 'l' && bAdd && iParametercount < (int)pmsg->parameters.getCount()) {
bContainsValidModes = true;
- sModes += _T("l");
- sParams += _T(" ") + pmsg->parameters[iParametercount];
+ sModes += L"l";
+ sParams += L" " + pmsg->parameters[iParametercount];
iParametercount++;
}
if (*p1 == 'b' || *p1 == 'k' && iParametercount < (int)pmsg->parameters.getCount()) {
bContainsValidModes = true;
sModes += *p1;
- sParams += _T(" ") + pmsg->parameters[iParametercount];
+ sParams += L" " + pmsg->parameters[iParametercount];
iParametercount++;
}
if (strchr(sUserModes.c_str(), (char)*p1)) {
@@ -537,13 +537,13 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) CMString sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += _T(" ") + pmsg->parameters[i];
+ sMessage += L" " + pmsg->parameters[i];
DoEvent(GC_EVENT_INFORMATION, pmsg->parameters[0].c_str(), pmsg->prefix.sNick.c_str(), sMessage.c_str(), NULL, NULL, NULL, true, false);
}
else if (bContainsValidModes) {
for (int i = iParametercount; i < (int)pmsg->parameters.getCount(); i++)
- sParams += _T(" ") + pmsg->parameters[i];
+ sParams += L" " + pmsg->parameters[i];
TCHAR temp[4000];
mir_sntprintf(temp, TranslateT("%s sets mode %s%s"), pmsg->prefix.sNick.c_str(), sModes.c_str(), sParams.c_str());
@@ -551,7 +551,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) }
if (flag)
- PostIrcMessage(_T("/MODE %s"), pmsg->parameters[0].c_str());
+ PostIrcMessage(L"/MODE %s", pmsg->parameters[0].c_str());
}
else {
TCHAR temp[256];
@@ -559,7 +559,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg) CMString sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += _T(" ") + pmsg->parameters[i];
+ sMessage += L" " + pmsg->parameters[i];
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, pmsg->prefix.sNick.c_str(), sMessage.c_str(), NULL, NULL, NULL, true, false);
}
@@ -579,7 +579,7 @@ bool CIrcProto::OnIrc_NICK(const CIrcMessage* pmsg) setTString("Nick", m_info.sNick.c_str());
}
- CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
+ CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
DoEvent(GC_EVENT_NICK, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, host.c_str(), NULL, true, bIsMe);
DoEvent(GC_EVENT_CHUID, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, NULL, NULL, true, false);
@@ -629,9 +629,9 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM)
S2 = GetWord(gci.pszID, 0);
else
- S2 = _T("");
+ S2 = L"";
}
- else S2 = _T("");
+ else S2 = L"";
}
DoEvent(GC_EVENT_NOTICE, S2.IsEmpty() ? 0 : S2.c_str(), S.c_str(), pmsg->parameters[1].c_str(), NULL, S3.c_str(), NULL, true, false);
}
@@ -644,7 +644,7 @@ bool CIrcProto::OnIrc_NOTICE(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_YOURHOST(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming) {
- static const TCHAR* lpszFmt = _T("Your host is %99[^ \x5b,], running version %99s");
+ static const TCHAR* lpszFmt = L"Your host is %99[^ \x5b,], running version %99s";
TCHAR szHostName[100], szVersion[100];
if (_stscanf(pmsg->parameters[1].c_str(), lpszFmt, &szHostName, &szVersion) > 0)
m_info.sServerName = szHostName;
@@ -662,7 +662,7 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) return true;
if (pmsg->m_bIncoming && m_joinOnInvite && pmsg->parameters.getCount() > 1 && mir_tstrcmpi(pmsg->parameters[0].c_str(), m_info.sNick.c_str()) == 0)
- PostIrcMessage(_T("/JOIN %s"), pmsg->parameters[1].c_str());
+ PostIrcMessage(L"/JOIN %s", pmsg->parameters[1].c_str());
ShowMessage(pmsg);
return true;
@@ -670,9 +670,9 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_PINGPONG(const CIrcMessage* pmsg)
{
- if (pmsg->m_bIncoming && pmsg->sCommand == _T("PING")) {
+ if (pmsg->m_bIncoming && pmsg->sCommand == L"PING") {
TCHAR szResponse[100];
- mir_sntprintf(szResponse, _T("PONG %s"), pmsg->parameters[0].c_str());
+ mir_sntprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
SendIrcMessage(szResponse);
}
@@ -718,7 +718,7 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage* pmsg) if (bIsChannel) {
if (!(pmsg->m_bIncoming && m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm'))) {
if (!pmsg->m_bIncoming)
- mess.Replace(_T("%%"), _T("%"));
+ mess.Replace(L"%%", L"%");
DoEvent(GC_EVENT_MESSAGE, pmsg->parameters[0].c_str(), pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true);
}
return true;
@@ -741,7 +741,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) mess.Delete(mess.GetLength() - 1, 1);
// exploit???
- if (mess.Find(1) != -1 || mess.Find(_T("%newl")) != -1) {
+ if (mess.Find(1) != -1 || mess.Find(L"%newl") != -1) {
TCHAR temp[4096];
mir_sntprintf(temp, TranslateT("CTCP ERROR: Malformed CTCP command received from %s!%s@%s. Possible attempt to take control of your IRC client registered"), pmsg->prefix.sNick.c_str(), pmsg->prefix.sUser.c_str(), pmsg->prefix.sHost.c_str());
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick.c_str(), temp, NULL, NULL, NULL, true, false);
@@ -756,15 +756,15 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // should it be ignored?
if (m_ignore) {
if (IsChannel(pmsg->parameters[0])) {
- if (command == _T("action") && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm'))
+ if (command == L"action" && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'm'))
return true;
}
else {
- if (command == _T("action")) {
+ if (command == L"action") {
if (IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))
return true;
}
- else if (command == _T("dcc")) {
+ else if (command == L"dcc") {
if (IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'd'))
return true;
}
@@ -773,32 +773,32 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
}
- if (pmsg->sCommand == _T("PRIVMSG")) {
+ if (pmsg->sCommand == L"PRIVMSG") {
// incoming ACTION
- if (command == _T("action")) {
+ if (command == L"action") {
mess.Delete(0, 6);
if (IsChannel(pmsg->parameters[0])) {
if (mess.GetLength() > 1) {
mess.Delete(0, 1);
if (!pmsg->m_bIncoming)
- mess.Replace(_T("%%"), _T("%"));
+ mess.Replace(L"%%", L"%");
DoEvent(GC_EVENT_ACTION, pmsg->parameters[0].c_str(), pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true);
}
}
else if (pmsg->m_bIncoming) {
mess.Insert(0, pmsg->prefix.sNick.c_str());
- mess.Insert(0, _T("* "));
- mess.Insert(mess.GetLength(), _T(" *"));
+ mess.Insert(0, L"* ");
+ mess.Insert(mess.GetLength(), L" *");
CIrcMessage msg = *pmsg;
msg.parameters[1] = mess;
OnIrc_PRIVMSG(&msg);
}
}
// incoming FINGER
- else if (pmsg->m_bIncoming && command == _T("finger")) {
- PostIrcMessage(_T("/NOTICE %s \001FINGER %s (%s)\001"), pmsg->prefix.sNick.c_str(), m_name, m_userID);
+ else if (pmsg->m_bIncoming && command == L"finger") {
+ PostIrcMessage(L"/NOTICE %s \001FINGER %s (%s)\001", pmsg->prefix.sNick.c_str(), m_name, m_userID);
TCHAR temp[300];
mir_sntprintf(temp, TranslateT("CTCP FINGER requested by %s"), pmsg->prefix.sNick.c_str());
@@ -806,8 +806,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming VERSION
- else if (pmsg->m_bIncoming && command == _T("version")) {
- PostIrcMessage(_T("/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)") _T(", ") _T(__COPYRIGHT) _T("\001"), pmsg->prefix.sNick.c_str());
+ else if (pmsg->m_bIncoming && command == L"version") {
+ PostIrcMessage(L"/NOTICE %s \001VERSION Miranda NG %%mirver (IRC v.%%version)" L", " _T(__COPYRIGHT) L"\001", pmsg->prefix.sNick.c_str());
TCHAR temp[300];
mir_sntprintf(temp, TranslateT("CTCP VERSION requested by %s"), pmsg->prefix.sNick.c_str());
@@ -815,8 +815,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming SOURCE
- else if (pmsg->m_bIncoming && command == _T("source")) {
- PostIrcMessage(_T("/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001"), pmsg->prefix.sNick.c_str());
+ else if (pmsg->m_bIncoming && command == L"source") {
+ PostIrcMessage(L"/NOTICE %s \001SOURCE Get Miranda IRC here: http://miranda-ng.org/ \001", pmsg->prefix.sNick.c_str());
TCHAR temp[300];
mir_sntprintf(temp, TranslateT("CTCP SOURCE requested by %s"), pmsg->prefix.sNick.c_str());
@@ -824,8 +824,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming USERINFO
- else if (pmsg->m_bIncoming && command == _T("userinfo")) {
- PostIrcMessage(_T("/NOTICE %s \001USERINFO %s\001"), pmsg->prefix.sNick.c_str(), m_userInfo);
+ else if (pmsg->m_bIncoming && command == L"userinfo") {
+ PostIrcMessage(L"/NOTICE %s \001USERINFO %s\001", pmsg->prefix.sNick.c_str(), m_userInfo);
TCHAR temp[300];
mir_sntprintf(temp, TranslateT("CTCP USERINFO requested by %s"), pmsg->prefix.sNick.c_str());
@@ -833,8 +833,8 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming PING
- else if (pmsg->m_bIncoming && command == _T("ping")) {
- PostIrcMessage(_T("/NOTICE %s \001%s\001"), pmsg->prefix.sNick.c_str(), mess.c_str());
+ else if (pmsg->m_bIncoming && command == L"ping") {
+ PostIrcMessage(L"/NOTICE %s \001%s\001", pmsg->prefix.sNick.c_str(), mess.c_str());
TCHAR temp[300];
mir_sntprintf(temp, TranslateT("CTCP PING requested by %s"), pmsg->prefix.sNick.c_str());
@@ -842,31 +842,31 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// incoming TIME
- else if (pmsg->m_bIncoming && command == _T("time")) {
+ else if (pmsg->m_bIncoming && command == L"time") {
TCHAR temp[300];
time_t tim = time(NULL);
mir_tstrncpy(temp, _tctime(&tim), 25);
- PostIrcMessage(_T("/NOTICE %s \001TIME %s\001"), pmsg->prefix.sNick.c_str(), temp);
+ PostIrcMessage(L"/NOTICE %s \001TIME %s\001", pmsg->prefix.sNick.c_str(), temp);
mir_sntprintf(temp, TranslateT("CTCP TIME requested by %s"), pmsg->prefix.sNick.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, temp, NULL, NULL, NULL, true, false);
}
// incoming DCC request... lots of stuff happening here...
- else if (pmsg->m_bIncoming && command == _T("dcc")) {
+ else if (pmsg->m_bIncoming && command == L"dcc") {
CMString type = GetWord(mess.c_str(), 1);
type.MakeLower();
// components of a dcc message
- CMString sFile = _T("");
+ CMString sFile = L"";
DWORD dwAdr = 0;
int iPort = 0;
unsigned __int64 dwSize = 0;
- CMString sToken = _T("");
- bool bIsChat = (type == _T("chat"));
+ CMString sToken = L"";
+ bool bIsChat = (type == L"chat");
// 1. separate the dcc command into the correct pieces
- if (bIsChat || type == _T("send")) {
+ if (bIsChat || type == L"send") {
// if the filename is surrounded by quotes, do this
if (GetWord(mess.c_str(), 2)[0] == '\"') {
int end = 0;
@@ -896,7 +896,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) while (!bFlag && !GetWord(mess.c_str(), index).IsEmpty()) {
CMString sTemp;
- if (type == _T("chat"))
+ if (type == L"chat")
sTemp = GetWord(mess.c_str(), index - 1) + GetWord(mess.c_str(), index);
else
sTemp = GetWord(mess.c_str(), index - 2) + GetWord(mess.c_str(), index - 1) + GetWord(mess.c_str(), index);
@@ -918,7 +918,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) TCHAR* p1 = _tcsdup(GetWordAddress(mess.c_str(), 2));
TCHAR* p2 = (TCHAR*)GetWordAddress(p1, index - 5);
- if (type == _T("send")) {
+ if (type == L"send") {
if (p2 > p1) {
p2--;
while (p2 != p1 && *p2 == ' ') {
@@ -928,7 +928,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) sFile = p1;
}
}
- else sFile = _T("chat");
+ else sFile = L"chat";
free(p1);
@@ -939,7 +939,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
}
}
- else if (type == _T("accept") || type == _T("resume")) {
+ else if (type == L"accept" || type == L"resume") {
// if the filename is surrounded by quotes, do this
if (GetWord(mess.c_str(), 2)[0] == '\"') {
int end = 0;
@@ -1005,7 +1005,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // end separating dcc commands
// 2. Check for malformed dcc commands or other errors
- if (bIsChat || type == _T("send")) {
+ if (bIsChat || type == L"send") {
TCHAR szTemp[256];
szTemp[0] = '\0';
@@ -1018,10 +1018,10 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (bIsChat && !m_DCCChatEnabled)
mir_sntprintf(szTemp, TranslateT("DCC: Chat request from %s denied"), pmsg->prefix.sNick.c_str());
- else if (type == _T("send") && !m_DCCFileEnabled)
+ else if (type == L"send" && !m_DCCFileEnabled)
mir_sntprintf(szTemp, TranslateT("DCC: File transfer request from %s denied"), pmsg->prefix.sNick.c_str());
- else if (type == _T("send") && !iPort && ulAdr == 0)
+ else if (type == L"send" && !iPort && ulAdr == 0)
mir_sntprintf(szTemp, TranslateT("DCC: Reverse file transfer request from %s denied [No local IP]"), pmsg->prefix.sNick.c_str());
if (sFile.IsEmpty() || dwAdr == 0 || dwSize == 0 || iPort == 0 && sToken.IsEmpty())
@@ -1039,11 +1039,11 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) sFileCorrected = sFile.Mid(i + 1);
sFile = sFileCorrected;
}
- else if (type == _T("accept") || type == _T("resume")) {
+ else if (type == L"accept" || type == L"resume") {
TCHAR szTemp[256];
szTemp[0] = '\0';
- if (type == _T("resume") && !m_DCCFileEnabled)
+ if (type == L"resume" && !m_DCCFileEnabled)
mir_sntprintf(szTemp, TranslateT("DCC: File transfer resume request from %s denied"), pmsg->prefix.sNick.c_str());
if (sToken.IsEmpty() && iPort == 0 || sFile.IsEmpty())
@@ -1074,7 +1074,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) m_DCCChatIgnore == 2 && hContact &&
db_get_b(hContact, "CList", "NotOnList", 0) == 0 &&
db_get_b(hContact, "CList", "Hidden", 0) == 0) {
- CMString host = pmsg->prefix.sUser + _T("@") + pmsg->prefix.sHost;
+ CMString host = pmsg->prefix.sUser + L"@" + pmsg->prefix.sHost;
CList_AddDCCChat(pmsg->prefix.sNick, host, dwAdr, iPort); // add a CHAT event to the clist
}
else {
@@ -1085,7 +1085,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// remote requested that the file should be resumed
- if (type == _T("resume")) {
+ if (type == L"resume") {
CDccSession* dcc;
if (sToken.IsEmpty())
dcc = FindDCCSendByPort(iPort);
@@ -1095,12 +1095,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (dcc) {
InterlockedExchange(&dcc->dwWhatNeedsDoing, (long)FILERESUME_RESUME);
dcc->dwResumePos = dwSize; // dwSize is the resume position
- PostIrcMessage(_T("/PRIVMSG %s \001DCC ACCEPT %s\001"), pmsg->prefix.sNick.c_str(), GetWordAddress(mess.c_str(), 2));
+ PostIrcMessage(L"/PRIVMSG %s \001DCC ACCEPT %s\001", pmsg->prefix.sNick.c_str(), GetWordAddress(mess.c_str(), 2));
}
}
// remote accepted your request for a file resume
- if (type == _T("accept")) {
+ if (type == L"accept") {
CDccSession* dcc;
if (sToken.IsEmpty())
dcc = FindDCCRecvByPortAndName(iPort, pmsg->prefix.sNick.c_str());
@@ -1114,7 +1114,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
}
- if (type == _T("send")) {
+ if (type == L"send") {
CMString sTokenBackup = sToken;
bool bTurbo = false; // TDCC indicator
@@ -1182,12 +1182,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
// handle incoming ctcp in notices. This technique is used for replying to CTCP queries
- else if (pmsg->sCommand == _T("NOTICE")) {
+ else if (pmsg->sCommand == L"NOTICE") {
TCHAR szTemp[300];
szTemp[0] = '\0';
//if we got incoming CTCP Version for contact in CList - then write its as MirVer for that contact!
- if (pmsg->m_bIncoming && command == _T("version")) {
+ if (pmsg->m_bIncoming && command == L"version") {
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false };
MCONTACT hContact = CList_FindContact(&user);
if (hContact)
@@ -1198,12 +1198,12 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (m_whoisDlg && IsWindowVisible(m_whoisDlg->GetHwnd())) {
m_whoisDlg->m_InfoNick.GetText(szTemp, _countof(szTemp));
if (mir_tstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0) {
- if (pmsg->m_bIncoming && (command == _T("version") || command == _T("userinfo") || command == _T("time"))) {
+ if (pmsg->m_bIncoming && (command == L"version" || command == L"userinfo" || command == L"time")) {
SetActiveWindow(m_whoisDlg->GetHwnd());
m_whoisDlg->m_Reply.SetText(DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE));
return true;
}
- if (pmsg->m_bIncoming && command == _T("ping")) {
+ if (pmsg->m_bIncoming && command == L"ping") {
SetActiveWindow(m_whoisDlg->GetHwnd());
int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1));
TCHAR szTmp[30];
@@ -1219,7 +1219,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) }
//... else show the reply in the current window
- if (pmsg->m_bIncoming && command == _T("ping")) {
+ if (pmsg->m_bIncoming && command == L"ping") {
int s = (int)time(0) - (int)_ttol(GetWordAddress(mess.c_str(), 1));
mir_sntprintf(szTemp, TranslateT("CTCP PING reply from %s: %u sec(s)"), pmsg->prefix.sNick.c_str(), s);
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false);
@@ -1236,7 +1236,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_NAMES(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 3)
- sNamesList += pmsg->parameters[3] + _T(" ");
+ sNamesList += pmsg->parameters[3] + L" ";
ShowMessage(pmsg);
return true;
}
@@ -1244,7 +1244,7 @@ bool CIrcProto::OnIrc_NAMES(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) {
- CMString name = _T("a");
+ CMString name = L"a";
int i = 0;
BOOL bFlag = false;
@@ -1283,20 +1283,20 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) GCDEST gcd = { m_szModuleName, sID.c_str(), GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
- PostIrcMessage(_T("/MODE %s"), sChanName);
+ PostIrcMessage(L"/MODE %s", sChanName);
// register the statuses
- gce.ptszStatus = _T("Owner");
+ gce.ptszStatus = L"Owner";
CallChatEvent(0, (LPARAM)&gce);
- gce.ptszStatus = _T("Admin");
+ gce.ptszStatus = L"Admin";
CallChatEvent(0, (LPARAM)&gce);
- gce.ptszStatus = _T("Op");
+ gce.ptszStatus = L"Op";
CallChatEvent(0, (LPARAM)&gce);
- gce.ptszStatus = _T("Halfop");
+ gce.ptszStatus = L"Halfop";
CallChatEvent(0, (LPARAM)&gce);
- gce.ptszStatus = _T("Voice");
+ gce.ptszStatus = L"Voice";
CallChatEvent(0, (LPARAM)&gce);
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
CallChatEvent(0, (LPARAM)&gce);
{
int k = 0;
@@ -1309,7 +1309,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) sStat = PrefixToStatus(sTemp[0]);
// fix for networks like freshirc where they allow more than one prefix
- while (PrefixToStatus(sTemp[0]) != _T("Normal"))
+ while (PrefixToStatus(sTemp[0]) != L"Normal")
sTemp.Delete(0, 1);
gcd.iType = GC_EVENT_JOIN;
@@ -1336,11 +1336,11 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) CallChatEvent(0, (LPARAM)&gce);
DoEvent(GC_EVENT_SETCONTACTSTATUS, sChanName, sTemp.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE);
// fix for networks like freshirc where they allow more than one prefix
- if (PrefixToStatus(sTemp2[0]) != _T("Normal")) {
+ if (PrefixToStatus(sTemp2[0]) != L"Normal") {
sTemp2.Delete(0, 1);
sStat = PrefixToStatus(sTemp2[0]);
- while (sStat != _T("Normal")) {
- DoEvent(GC_EVENT_ADDSTATUS, sID.c_str(), sTemp.c_str(), _T("system"), sStat.c_str(), NULL, NULL, false, false, 0);
+ while (sStat != L"Normal") {
+ DoEvent(GC_EVENT_ADDSTATUS, sID.c_str(), sTemp.c_str(), L"system", sStat.c_str(), NULL, NULL, false, false, 0);
sTemp2.Delete(0, 1);
sStat = PrefixToStatus(sTemp2[0]);
}
@@ -1367,9 +1367,9 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) if (!sTopic.IsEmpty() && !mir_tstrcmpi(GetWord(sTopic.c_str(), 0).c_str(), sChanName)) {
DoEvent(GC_EVENT_TOPIC, sChanName, sTopicName.IsEmpty() ? NULL : sTopicName.c_str(), GetWordAddress(sTopic.c_str(), 1), NULL, sTopicTime.IsEmpty() ? NULL : sTopicTime.c_str(), NULL, true, false);
AddWindowItemData(sChanName, 0, 0, 0, GetWordAddress(sTopic.c_str(), 1));
- sTopic = _T("");
- sTopicName = _T("");
- sTopicTime = _T("");
+ sTopic = L"";
+ sTopicName = L"";
+ sTopicTime = L"";
} }
gcd.ptszID = (TCHAR*)sID.c_str();
@@ -1387,8 +1387,8 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) gce.pDest = &gcd;
if (!getTString("JTemp", &dbv)) {
- CMString command = _T("a");
- CMString save = _T("");
+ CMString command = L"a";
+ CMString save = L"";
int k = 0;
while (!command.IsEmpty()) {
@@ -1399,7 +1399,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) if (!mir_tstrcmpi(sChanName, S))
break;
- save += command + _T(" ");
+ save += command + L" ";
}
}
@@ -1434,7 +1434,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) }
}
- sNamesList = _T("");
+ sNamesList = L"";
ShowMessage(pmsg);
return true;
}
@@ -1443,9 +1443,9 @@ bool CIrcProto::OnIrc_INITIALTOPIC(const CIrcMessage* pmsg) {
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 2) {
AddWindowItemData(pmsg->parameters[1].c_str(), 0, 0, 0, pmsg->parameters[2].c_str());
- sTopic = pmsg->parameters[1] + _T(" ") + pmsg->parameters[2];
- sTopicName = _T("");
- sTopicTime = _T("");
+ sTopic = pmsg->parameters[1] + L" " + pmsg->parameters[2];
+ sTopicName = L"";
+ sTopicTime = L"";
}
ShowMessage(pmsg);
return true;
@@ -1458,7 +1458,7 @@ bool CIrcProto::OnIrc_INITIALTOPICNAME(const CIrcMessage* pmsg) time_t ttTopicTime;
sTopicName = pmsg->parameters[2];
ttTopicTime = _tcstol(pmsg->parameters[3].c_str(), &tStopStr, 10);
- _tcsftime(tTimeBuf, 128, _T("%#c"), localtime(&ttTopicTime));
+ _tcsftime(tTimeBuf, 128, L"%#c", localtime(&ttTopicTime));
sTopicTime = tTimeBuf;
}
ShowMessage(pmsg);
@@ -1515,11 +1515,11 @@ bool CIrcProto::OnIrc_LIST(const CIrcMessage* pmsg) ListView_SetItem(hListView, &lvItem);
TCHAR* temp = mir_tstrdup(pmsg->parameters[pmsg->parameters.getCount() - 1]);
- TCHAR* find = _tcsstr(temp, _T("[+"));
- TCHAR* find2 = _tcsstr(temp, _T("]"));
+ TCHAR* find = _tcsstr(temp, L"[+");
+ TCHAR* find2 = _tcsstr(temp, L"]");
TCHAR* save = temp;
if (find == temp && find2 != NULL && find + 8 >= find2) {
- temp = _tcsstr(temp, _T("]"));
+ temp = _tcsstr(temp, L"]");
if (mir_tstrlen(temp) > 1) {
temp++;
temp[0] = '\0';
@@ -1570,7 +1570,7 @@ bool CIrcProto::OnIrc_LISTEND(const CIrcMessage* pmsg) if (m_noOfChannels > 0)
percent = (int)(m_channelNumber * 100) / m_noOfChannels;
if (percent < 70) {
- mir_tstrcat(text, _T(" "));
+ mir_tstrcat(text, L" ");
mir_tstrcat(text, TranslateT("(probably truncated by server)"));
}
SetDlgItemText(m_listDlg->GetHwnd(), IDC_TEXT, text);
@@ -1583,20 +1583,20 @@ bool CIrcProto::OnIrc_BANLIST(const CIrcMessage* pmsg) {
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 2) {
if (m_managerDlg->GetHwnd() && (
- m_managerDlg->m_radio1.GetState() && pmsg->sCommand == _T("367") ||
- m_managerDlg->m_radio2.GetState() && pmsg->sCommand == _T("346") ||
- m_managerDlg->m_radio3.GetState() && pmsg->sCommand == _T("348")) &&
+ m_managerDlg->m_radio1.GetState() && pmsg->sCommand == L"367" ||
+ m_managerDlg->m_radio2.GetState() && pmsg->sCommand == L"346" ||
+ m_managerDlg->m_radio3.GetState() && pmsg->sCommand == L"348") &&
!m_managerDlg->m_radio1.Enabled() && !m_managerDlg->m_radio2.Enabled() && !m_managerDlg->m_radio3.Enabled()) {
CMString S = pmsg->parameters[2];
if (pmsg->parameters.getCount() > 3) {
- S += _T(" - ");
+ S += L" - ";
S += pmsg->parameters[3];
if (pmsg->parameters.getCount() > 4) {
- S += _T(" - ( ");
+ S += L" - ( ";
time_t time = _ttoi(pmsg->parameters[4].c_str());
S += _tctime(&time);
- S.Replace(_T("\n"), _T(" "));
- S += _T(")");
+ S.Replace(L"\n", L" ");
+ S += L")";
}
}
@@ -1612,9 +1612,9 @@ bool CIrcProto::OnIrc_BANLISTEND(const CIrcMessage* pmsg) {
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) {
if (m_managerDlg->GetHwnd() &&
- (m_managerDlg->m_radio1.GetState() && pmsg->sCommand == _T("368")
- || m_managerDlg->m_radio2.GetState() && pmsg->sCommand == _T("347")
- || m_managerDlg->m_radio3.GetState() && pmsg->sCommand == _T("349")) &&
+ (m_managerDlg->m_radio1.GetState() && pmsg->sCommand == L"368"
+ || m_managerDlg->m_radio2.GetState() && pmsg->sCommand == L"347"
+ || m_managerDlg->m_radio3.GetState() && pmsg->sCommand == L"349") &&
!m_managerDlg->m_radio1.Enabled() && !m_managerDlg->m_radio2.Enabled() && !m_managerDlg->m_radio3.Enabled()) {
if (strchr(sChannelModes.c_str(), 'b'))
m_managerDlg->m_radio1.Enable();
@@ -1678,7 +1678,7 @@ bool CIrcProto::OnIrc_WHOIS_OTHER(const CIrcMessage* pmsg) if (pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0) {
TCHAR temp[1024], temp2[1024];
m_whoisDlg->m_InfoOther.GetText(temp, 1000);
- mir_tstrcat(temp, _T("%s\r\n"));
+ mir_tstrcat(temp, L"%s\r\n");
mir_sntprintf(temp2, temp, pmsg->parameters[2].c_str());
m_whoisDlg->m_InfoOther.SetText(temp2);
}
@@ -1728,7 +1728,7 @@ bool CIrcProto::OnIrc_WHOIS_IDLE(const CIrcMessage* pmsg) TCHAR temp3[256];
TCHAR tTimeBuf[128], *tStopStr;
time_t ttTime = _tcstol(pmsg->parameters[3].c_str(), &tStopStr, 10);
- _tcsftime(tTimeBuf, 128, _T("%c"), localtime(&ttTime));
+ _tcsftime(tTimeBuf, 128, L"%c", localtime(&ttTime));
mir_sntprintf(temp3, TranslateT("online since %s, idle %s"), tTimeBuf, temp);
m_whoisDlg->m_AwayTime.SetText(temp3);
}
@@ -1747,9 +1747,9 @@ bool CIrcProto::OnIrc_WHOIS_SERVER(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_WHOIS_AUTH(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && m_whoisDlg && pmsg->parameters.getCount() > 2 && m_manualWhoisCount > 0) {
- if (pmsg->sCommand == _T("330"))
+ if (pmsg->sCommand == L"330")
m_whoisDlg->m_InfoAuth.SetText(pmsg->parameters[2].c_str());
- else if (pmsg->parameters[2] == _T("is an identified user") || pmsg->parameters[2] == _T("is a registered nick"))
+ else if (pmsg->parameters[2] == L"is an identified user" || pmsg->parameters[2] == L"is a registered nick")
m_whoisDlg->m_InfoAuth.SetText(pmsg->parameters[2].c_str());
else
OnIrc_WHOIS_OTHER(pmsg);
@@ -1767,7 +1767,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg) CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false };
MCONTACT hContact = CList_FindContact(&user);
if (hContact) {
- AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str());
+ AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)L"> " + pmsg->parameters[2] + (CMString)L": " + pmsg->parameters[1]).c_str());
DBVARIANT dbv;
if (!getTString(hContact, "Default", &dbv)) {
@@ -1775,13 +1775,13 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg) DBVARIANT dbv2;
if (getByte(hContact, "AdvancedMode", 0) == 0)
- DoUserhostWithReason(1, ((CMString)_T("S") + dbv.ptszVal).c_str(), true, dbv.ptszVal);
+ DoUserhostWithReason(1, ((CMString)L"S" + dbv.ptszVal).c_str(), true, dbv.ptszVal);
else {
if (!getTString(hContact, "UWildcard", &dbv2)) {
- DoUserhostWithReason(2, ((CMString)_T("S") + dbv2.ptszVal).c_str(), true, dbv2.ptszVal);
+ DoUserhostWithReason(2, ((CMString)L"S" + dbv2.ptszVal).c_str(), true, dbv2.ptszVal);
db_free(&dbv2);
}
- else DoUserhostWithReason(2, ((CMString)_T("S") + dbv.ptszVal).c_str(), true, dbv.ptszVal);
+ else DoUserhostWithReason(2, ((CMString)L"S" + dbv.ptszVal).c_str(), true, dbv.ptszVal);
}
setString(hContact, "User", "");
setString(hContact, "Host", "");
@@ -1804,7 +1804,7 @@ static void __stdcall sttShowNickWnd(void* param) }
SetEvent(ppro->m_evWndCreate);
SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_CAPTION, TranslateT("Change nickname"));
- SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_TEXT, pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : _T(""));
+ SetDlgItemText(ppro->m_nickDlg->GetHwnd(), IDC_TEXT, pmsg->parameters.getCount() > 2 ? pmsg->parameters[2].c_str() : L"");
ppro->m_nickDlg->m_Enick.SetText(pmsg->parameters[1].c_str());
ppro->m_nickDlg->m_Enick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1));
delete pmsg;
@@ -1815,7 +1815,7 @@ bool CIrcProto::OnIrc_NICK_ERR(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) {
if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && mir_tstrcmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
TCHAR m[200];
- mir_sntprintf(m, _T("NICK %s"), m_alternativeNick);
+ mir_sntprintf(m, L"NICK %s", m_alternativeNick);
if (IsConnected())
SendIrcMessage(m);
}
@@ -1834,8 +1834,8 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) {
DBVARIANT dbv;
if (!getTString("JTemp", &dbv)) {
- CMString command = _T("a");
- CMString save = _T("");
+ CMString command = L"a";
+ CMString save = L"";
int i = 0;
while (!command.IsEmpty()) {
@@ -1843,7 +1843,7 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) i++;
if (!command.IsEmpty() && pmsg->parameters[0] == command.Mid(1))
- save += command + _T(" ");
+ save += command + L" ";
}
db_free(&dbv);
@@ -1862,9 +1862,9 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_UNKNOWN(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 0) {
- if (pmsg->parameters[0] == _T("WHO") && GetNextUserhostReason(2) != _T("U"))
+ if (pmsg->parameters[0] == L"WHO" && GetNextUserhostReason(2) != L"U")
return true;
- if (pmsg->parameters[0] == _T("USERHOST") && GetNextUserhostReason(1) != _T("U"))
+ if (pmsg->parameters[0] == L"USERHOST" && GetNextUserhostReason(1) != L"U")
return true;
}
ShowMessage(pmsg);
@@ -1926,7 +1926,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) while (!User.IsEmpty()) {
if (GetWord(m_whoReply.c_str(), 3)[0] == 'G') {
S += User;
- S += _T("\t");
+ S += L"\t";
DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[1].c_str(), User.c_str(), NULL, NULL, NULL, ID_STATUS_AWAY, FALSE, FALSE);
}
else DoEvent(GC_EVENT_SETCONTACTSTATUS, pmsg->parameters[1].c_str(), User.c_str(), NULL, NULL, NULL, ID_STATUS_ONLINE, FALSE, FALSE);
@@ -1945,7 +1945,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) /// if it is not a channel
ptrT UserList(mir_tstrdup(m_whoReply.c_str()));
const TCHAR* p1 = UserList;
- m_whoReply = _T("");
+ m_whoReply = L"";
CONTACT ccUser = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false };
MCONTACT hContact = CList_FindContact(&ccUser);
@@ -1991,7 +1991,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) if (DBWildcard && DBNick && !WCCmp(CharLower(DBWildcard), CharLower(DBNick))) {
setTString(hContact, "Nick", DBDefault);
- DoUserhostWithReason(2, ((CMString)_T("S") + DBWildcard).c_str(), true, (TCHAR*)DBWildcard);
+ DoUserhostWithReason(2, ((CMString)L"S" + DBWildcard).c_str(), true, (TCHAR*)DBWildcard);
setString(hContact, "User", "");
setString(hContact, "Host", "");
@@ -2015,7 +2015,7 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) {
CMString command = PeekAtReasons(2);
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 6 && command[0] == 'S') {
- m_whoReply.AppendFormat(_T("%s %s %s %s "), pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str());
+ m_whoReply.AppendFormat(L"%s %s %s %s ", pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str());
if (mir_tstrcmpi(pmsg->parameters[5].c_str(), m_info.sNick.c_str()) == 0) {
TCHAR host[1024];
mir_tstrncpy(host, pmsg->parameters[3].c_str(), 1024);
@@ -2030,12 +2030,12 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) bool CIrcProto::OnIrc_TRYAGAIN(const CIrcMessage* pmsg)
{
- CMString command = _T("");
+ CMString command = L"";
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1) {
- if (pmsg->parameters[1] == _T("WHO"))
+ if (pmsg->parameters[1] == L"WHO")
command = GetNextUserhostReason(2);
- if (pmsg->parameters[1] == _T("USERHOST"))
+ if (pmsg->parameters[1] == L"USERHOST")
command = GetNextUserhostReason(1);
}
if (command[0] == 'U')
@@ -2048,7 +2048,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) CMString command;
if (pmsg->m_bIncoming) {
command = GetNextUserhostReason(1);
- if (!command.IsEmpty() && command != _T("U") && pmsg->parameters.getCount() > 1) {
+ if (!command.IsEmpty() && command != L"U" && pmsg->parameters.getCount() > 1) {
CONTACT finduser = { NULL, NULL, NULL, false, false, false };
int awaystatus = 0;
CMString sTemp;
@@ -2096,8 +2096,8 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) user = p2;
nick = p1;
}
- mess = _T("");
- mask = nick + _T("!") + user + _T("@") + host;
+ mess = L"";
+ mask = nick + L"!" + user + L"@" + host;
if (host.IsEmpty() || user.IsEmpty() || nick.IsEmpty()) {
mir_free(p1);
continue;
@@ -2126,32 +2126,32 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) break;
case 'I': // m_ignore
- mess = _T("/IGNORE %question=\"");
+ mess = L"/IGNORE %question=\"";
mess += TranslateT("Please enter the hostmask (nick!user@host)\nNOTE! Contacts on your contact list are never ignored");
- mess += (CMString)_T("\",\"") + TranslateT("Ignore") + _T("\",\"*!*@") + host + _T("\"");
+ mess += (CMString)L"\",\"" + TranslateT("Ignore") + L"\",\"*!*@" + host + L"\"";
if (m_ignoreChannelDefault)
- mess += _T(" +qnidcm");
+ mess += L" +qnidcm";
else
- mess += _T(" +qnidc");
+ mess += L" +qnidc";
break;
case 'J': // Unignore
- mess = _T("/UNIGNORE *!*@") + host;
+ mess = L"/UNIGNORE *!*@" + host;
break;
case 'B': // Ban
channel = (command.c_str() + 1);
- mess = _T("/MODE ") + channel + _T(" +b *!*@") + host;
+ mess = L"/MODE " + channel + L" +b *!*@" + host;
break;
case 'K': // Ban & Kick
channel = (command.c_str() + 1);
- mess.Format(_T("/MODE %s +b *!*@%s%%newl/KICK %s %s"), channel.c_str(), host.c_str(), channel.c_str(), nick.c_str());
+ mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s", channel.c_str(), host.c_str(), channel.c_str(), nick.c_str());
break;
case 'L': // Ban & Kick with reason
channel = (command.c_str() + 1);
- mess.Format(_T("/MODE %s +b *!*@%s%%newl/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""),
+ mess.Format(L"/MODE %s +b *!*@%s%%newl/KICK %s %s %%question=\"%s\",\"%s\",\"%s\"",
channel.c_str(), host.c_str(), channel.c_str(), nick.c_str(),
TranslateT("Please enter the reason"), TranslateT("Ban'n Kick"), TranslateT("Jerk"));
break;
@@ -2177,14 +2177,14 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) }
}
- if (!pmsg->m_bIncoming || command == _T("U"))
+ if (!pmsg->m_bIncoming || command == L"U")
ShowMessage(pmsg);
return true;
}
bool CIrcProto::OnIrc_SUPPORT(const CIrcMessage* pmsg)
{
- static const TCHAR *lpszFmt = _T("Try server %99[^ ,], port %19s");
+ static const TCHAR *lpszFmt = L"Try server %99[^ ,], port %19s";
TCHAR szAltServer[100];
TCHAR szAltPort[20];
if (pmsg->parameters.getCount() > 1 && _stscanf(pmsg->parameters[1].c_str(), lpszFmt, &szAltServer, &szAltPort) == 2) {
@@ -2204,19 +2204,19 @@ bool CIrcProto::OnIrc_SUPPORT(const CIrcMessage* pmsg) CMString S;
for (int i = 0; i < pmsg->parameters.getCount(); i++) {
TCHAR* temp = mir_tstrdup(pmsg->parameters[i].c_str());
- if (_tcsstr(temp, _T("CHANTYPES="))) {
+ if (_tcsstr(temp, L"CHANTYPES=")) {
TCHAR* p1 = _tcschr(temp, '=');
p1++;
if (mir_tstrlen(p1) > 0)
sChannelPrefixes = p1;
}
- if (_tcsstr(temp, _T("CHANMODES="))) {
+ if (_tcsstr(temp, L"CHANMODES=")) {
TCHAR* p1 = _tcschr(temp, '=');
p1++;
if (mir_tstrlen(p1) > 0)
sChannelModes = (char*)_T2A(p1);
}
- if (_tcsstr(temp, _T("PREFIX="))) {
+ if (_tcsstr(temp, L"PREFIX=")) {
TCHAR* p1 = _tcschr(temp, '(');
TCHAR* p2 = _tcschr(temp, ')');
if (p1 && p2) {
@@ -2268,7 +2268,7 @@ void CIrcProto::OnIrcDefault(const CIrcMessage* pmsg) void CIrcProto::OnIrcDisconnected()
{
- m_statusMessage = _T("");
+ m_statusMessage = L"";
db_unset(NULL, m_szModuleName, "JTemp");
bTempDisableCheck = false;
bTempForceCheck = false;
@@ -2286,7 +2286,7 @@ void CIrcProto::OnIrcDisconnected() m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, ID_STATUS_OFFLINE);
- CMString sDisconn = _T("\035\002");
+ CMString sDisconn = L"\035\002";
sDisconn += TranslateT("*Disconnected*");
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, sDisconn.c_str(), NULL, NULL, NULL, true, false);
@@ -2339,7 +2339,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)Temp, m_iStatus);
if (m_iDesiredStatus == ID_STATUS_AWAY)
- PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
if (m_perform) {
DoPerform("ALL NETWORKS");
@@ -2362,14 +2362,14 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci) && gci.iType == GCW_CHATROOM) {
CHANNELINFO *wi = (CHANNELINFO*)gci.dwItemData;
if (wi && wi->pszPassword)
- PostIrcMessage(_T("/JOIN %s %s"), gci.pszName, wi->pszPassword);
+ PostIrcMessage(L"/JOIN %s %s", gci.pszName, wi->pszPassword);
else
- PostIrcMessage(_T("/JOIN %s"), gci.pszName);
+ PostIrcMessage(L"/JOIN %s", gci.pszName);
}
}
}
- DoEvent(GC_EVENT_ADDGROUP, SERVERWINDOW, NULL, NULL, _T("Normal"), NULL, NULL, FALSE, TRUE);
+ DoEvent(GC_EVENT_ADDGROUP, SERVERWINDOW, NULL, NULL, L"Normal", NULL, NULL, FALSE, TRUE);
{
GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -2394,7 +2394,7 @@ int CIrcProto::DoPerform(const char* event) DBVARIANT dbv;
if (!getTString(sSetting.c_str(), &dbv)) {
- if (!my_strstri(dbv.ptszVal, _T("/away")))
+ if (!my_strstri(dbv.ptszVal, L"/away"))
PostIrcMessageWnd(NULL, NULL, dbv.ptszVal);
else
mir_forkthread(AwayWarningThread, NULL);
@@ -2406,7 +2406,7 @@ int CIrcProto::DoPerform(const char* event) int CIrcProto::IsIgnored(const CMString& nick, const CMString& address, const CMString& host, char type)
{
- return IsIgnored(nick + _T("!") + address + _T("@") + host, type);
+ return IsIgnored(nick + L"!" + address + L"@" + host, type);
}
int CIrcProto::IsIgnored(CMString user, char type)
@@ -2440,7 +2440,7 @@ int CIrcProto::IsIgnored(CMString user, char type) bool CIrcProto::AddIgnore(const TCHAR* mask, const TCHAR* flags, const TCHAR* network)
{
RemoveIgnore(mask);
- m_ignoreItems.insert(new CIrcIgnoreItem(mask, (_T("+") + CMString(flags)).c_str(), network));
+ m_ignoreItems.insert(new CIrcIgnoreItem(mask, (L"+" + CMString(flags)).c_str(), network));
RewriteIgnoreSettings();
if (m_ignoreDlg)
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index ef2611db39..d8204e63dc 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include "version.h"
-#define NICKSUBSTITUTE _T("!_nick_!")
+#define NICKSUBSTITUTE L"!_nick_!"
void CIrcProto::FormatMsg(CMString& text)
{
@@ -30,25 +30,25 @@ void CIrcProto::FormatMsg(CMString& text) mir_tstrncpy(temp, GetWord(text.c_str(), 0).c_str(), 29);
CharLower(temp);
CMString command = temp;
- CMString S = _T("");
- if (command == _T("/quit") || command == _T("/away"))
- S = GetWord(text.c_str(), 0) + _T(" :") + GetWordAddress(text.c_str(), 1);
- else if (command == _T("/privmsg") || command == _T("/part") || command == _T("/topic") || command == _T("/notice")) {
- S = GetWord(text.c_str(), 0) + _T(" ") + GetWord(text.c_str(), 1) + _T(" :");
+ CMString S = L"";
+ if (command == L"/quit" || command == L"/away")
+ S = GetWord(text.c_str(), 0) + L" :" + GetWordAddress(text.c_str(), 1);
+ else if (command == L"/privmsg" || command == L"/part" || command == L"/topic" || command == L"/notice") {
+ S = GetWord(text.c_str(), 0) + L" " + GetWord(text.c_str(), 1) + L" :";
if (!GetWord(text.c_str(), 2).IsEmpty())
S += CMString(GetWordAddress(text.c_str(), 2));
}
- else if (command == _T("/kick")) {
- S = GetWord(text.c_str(), 0) + _T(" ") + GetWord(text.c_str(), 1) + _T(" ") + GetWord(text.c_str(), 2) + _T(" :") + GetWordAddress(text.c_str(), 3);
+ else if (command == L"/kick") {
+ S = GetWord(text.c_str(), 0) + L" " + GetWord(text.c_str(), 1) + L" " + GetWord(text.c_str(), 2) + L" :" + GetWordAddress(text.c_str(), 3);
}
- else if (command == _T("/nick")) {
+ else if (command == L"/nick") {
if (!_tcsstr(GetWord(text.c_str(), 1).c_str(), NICKSUBSTITUTE)) {
sNick4Perform = GetWord(text.c_str(), 1);
S = GetWordAddress(text.c_str(), 0);
}
else {
CMString sNewNick = GetWord(text.c_str(), 1);
- if (sNick4Perform == _T("")) {
+ if (sNick4Perform == L"") {
DBVARIANT dbv;
if (!getTString("PNick", &dbv)) {
sNick4Perform = dbv.ptszVal;
@@ -57,7 +57,7 @@ void CIrcProto::FormatMsg(CMString& text) }
sNewNick.Replace(NICKSUBSTITUTE, sNick4Perform.c_str());
- S = GetWord(text.c_str(), 0) + _T(" ") + sNewNick;
+ S = GetWord(text.c_str(), 0) + L" " + sNewNick;
}
}
else S = GetWordAddress(text.c_str(), 0);
@@ -68,17 +68,17 @@ void CIrcProto::FormatMsg(CMString& text) static void AddCR(CMString& text)
{
- text.Replace(_T("\n"), _T("\r\n"));
- text.Replace(_T("\r\r"), _T("\r"));
+ text.Replace(L"\n", L"\r\n");
+ text.Replace(L"\r\r", L"\r");
}
CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window)
{
- CMString Messageout = _T("");
+ CMString Messageout = L"";
const TCHAR* p1 = text;
const TCHAR* p2 = text;
bool LinebreakFlag = false, hasAlias = false;
- p2 = _tcsstr(p1, _T("\r\n"));
+ p2 = _tcsstr(p1, L"\r\n");
if (!p2)
p2 = _tcschr(p1, '\0');
if (p1 == p2)
@@ -86,7 +86,7 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) do {
if (LinebreakFlag)
- Messageout += _T("\r\n");
+ Messageout += L"\r\n";
TCHAR* line = new TCHAR[p2 - p1 + 1];
mir_tstrncpy(line, p1, p2 - p1 + 1);
@@ -100,42 +100,42 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) line = new TCHAR[S.GetLength() + 2];
mir_tstrncpy(line, S.c_str(), S.GetLength() + 1);
CMString alias(m_alias);
- const TCHAR* p3 = _tcsstr(alias.c_str(), (GetWord(line, 0) + _T(" ")).c_str());
+ const TCHAR* p3 = _tcsstr(alias.c_str(), (GetWord(line, 0) + L" ").c_str());
if (p3 != alias.c_str()) {
- CMString str = _T("\r\n");
- str += GetWord(line, 0) + _T(" ");
+ CMString str = L"\r\n";
+ str += GetWord(line, 0) + L" ";
p3 = _tcsstr(alias.c_str(), str.c_str());
if (p3)
p3 += 2;
}
if (p3 != NULL) {
hasAlias = true;
- const TCHAR* p4 = _tcsstr(p3, _T("\r\n"));
+ const TCHAR* p4 = _tcsstr(p3, L"\r\n");
if (!p4)
p4 = _tcschr(p3, '\0');
*(TCHAR*)p4 = 0;
CMString str = p3;
- str.Replace(_T("##"), window);
- str.Replace(_T("$?"), _T("%question"));
+ str.Replace(L"##", window);
+ str.Replace(L"$?", L"%question");
TCHAR buf[5];
for (int index = 1; index < 8; index++) {
- mir_sntprintf(buf, _T("#$%u"), index);
+ mir_sntprintf(buf, L"#$%u", index);
if (!GetWord(line, index).IsEmpty() && IsChannel(GetWord(line, index)))
str.Replace(buf, GetWord(line, index).c_str());
else {
- CMString S1 = _T("#");
+ CMString S1 = L"#";
S1 += GetWord(line, index);
str.Replace(buf, S1.c_str());
}
}
for (int index2 = 1; index2 < 8; index2++) {
- mir_sntprintf(buf, _T("$%u-"), index2);
+ mir_sntprintf(buf, L"$%u-", index2);
str.Replace(buf, GetWordAddress(line, index2));
}
for (int index3 = 1; index3 < 8; index3++) {
- mir_sntprintf(buf, _T("$%u"), index3);
+ mir_sntprintf(buf, L"$%u", index3);
str.Replace(buf, GetWord(line, index3).c_str());
}
Messageout += GetWordAddress(str.c_str(), 1);
@@ -147,7 +147,7 @@ CMString CIrcProto::DoAlias(const TCHAR *text, TCHAR *window) p1 = p2;
if (*p1 == '\r')
p1 += 2;
- p2 = _tcsstr(p1, _T("\r\n"));
+ p2 = _tcsstr(p1, L"\r\n");
if (!p2)
p2 = _tcschr(p1, '\0');
delete[] line;
@@ -164,32 +164,32 @@ CMString CIrcProto::DoIdentifiers(CMString text, const TCHAR*) TCHAR str[2];
GetLocalTime(&time);
- text.Replace(_T("%mnick"), m_nick);
- text.Replace(_T("%anick"), m_alternativeNick);
- text.Replace(_T("%awaymsg"), m_statusMessage.c_str());
- text.Replace(_T("%module"), _A2T(m_szModuleName));
- text.Replace(_T("%name"), m_name);
- text.Replace(_T("%newl"), _T("\r\n"));
- text.Replace(_T("%network"), m_info.sNetwork.c_str());
- text.Replace(_T("%me"), m_info.sNick.c_str());
+ text.Replace(L"%mnick", m_nick);
+ text.Replace(L"%anick", m_alternativeNick);
+ text.Replace(L"%awaymsg", m_statusMessage.c_str());
+ text.Replace(L"%module", _A2T(m_szModuleName));
+ text.Replace(L"%name", m_name);
+ text.Replace(L"%newl", L"\r\n");
+ text.Replace(L"%network", m_info.sNetwork.c_str());
+ text.Replace(L"%me", m_info.sNick.c_str());
char mirver[100];
CallService(MS_SYSTEM_GETVERSIONTEXT, _countof(mirver), LPARAM(mirver));
- text.Replace(_T("%mirver"), _A2T(mirver));
+ text.Replace(L"%mirver", _A2T(mirver));
- text.Replace(_T("%version"), _T(__VERSION_STRING_DOTS));
+ text.Replace(L"%version", _T(__VERSION_STRING_DOTS));
str[0] = 3; str[1] = '\0';
- text.Replace(_T("%color"), str);
+ text.Replace(L"%color", str);
str[0] = 2;
- text.Replace(_T("%bold"), str);
+ text.Replace(L"%bold", str);
str[0] = 31;
- text.Replace(_T("%underline"), str);
+ text.Replace(L"%underline", str);
str[0] = 22;
- text.Replace(_T("%italics"), str);
+ text.Replace(L"%italics", str);
return text;
}
@@ -218,19 +218,19 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString three = GetWord(text, 3);
CMString therest = GetWordAddress(text, 4);
- if (command == _T("/servershow") || command == _T("/serverhide")) {
+ if (command == L"/servershow" || command == L"/serverhide") {
if (m_useServer) {
GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallChatEvent(command == _T("/servershow") ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce);
+ CallChatEvent(command == L"/servershow" ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce);
}
return true;
}
- else if (command == _T("/sleep") || command == _T("/wait")) {
+ else if (command == L"/sleep" || command == L"/wait") {
if (!one.IsEmpty()) {
int ms;
- if (_stscanf(one.c_str(), _T("%d"), &ms) == 1 && ms > 0 && ms <= 4000)
+ if (_stscanf(one.c_str(), L"%d", &ms) == 1 && ms > 0 && ms <= 4000)
Sleep(ms);
else
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Incorrect parameters. Usage: /sleep [ms], ms should be greater than 0 and less than 4000."), NULL, NULL, NULL, true, false);
@@ -238,10 +238,10 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/clear")) {
+ if (command == L"/clear") {
CMString S;
if (!one.IsEmpty()) {
- if (one == _T("server"))
+ if (one == L"server")
S = SERVERWINDOW;
else
S = MakeWndID(one.c_str());
@@ -257,7 +257,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/ignore")) {
+ if (command == L"/ignore") {
if (IsConnected()) {
CMString IgnoreFlags;
TCHAR temp[500];
@@ -268,18 +268,18 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false);
return true;
}
- if (!mir_tstrcmpi(one.c_str(), _T("on"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"on")) {
m_ignore = 1;
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is enabled"), NULL, NULL, NULL, true, false);
return true;
}
- if (!mir_tstrcmpi(one.c_str(), _T("off"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"off")) {
m_ignore = 0;
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false);
return true;
}
if (!_tcschr(one.c_str(), '!') && !_tcschr(one.c_str(), '@'))
- one += _T("!*@*");
+ one += L"!*@*";
if (!two.IsEmpty() && two[0] == '+') {
if (_tcschr(two.c_str(), 'q'))
@@ -295,7 +295,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta if (_tcschr(two.c_str(), 'm'))
IgnoreFlags += 'm';
}
- else IgnoreFlags = _T("qnidc");
+ else IgnoreFlags = L"qnidc";
CMString szNetwork;
if (three.IsEmpty())
@@ -311,9 +311,9 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/unignore")) {
+ if (command == L"/unignore") {
if (!_tcschr(one.c_str(), '!') && !_tcschr(one.c_str(), '@'))
- one += _T("!*@*");
+ one += L"!*@*";
TCHAR temp[500];
if (RemoveIgnore(one.c_str()))
@@ -324,15 +324,15 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/userhost")) {
+ if (command == L"/userhost") {
if (one.IsEmpty())
return true;
- DoUserhostWithReason(1, _T("U"), false, command);
+ DoUserhostWithReason(1, L"U", false, command);
return false;
}
- if (command == _T("/joinx")) {
+ if (command == L"/joinx") {
if (!one.IsEmpty()) {
for (int i = 1;; i++) {
CMString tmp = GetWord(text, i);
@@ -342,12 +342,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta AddToJTemp('X', tmp);
}
- PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1));
+ PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1));
}
return true;
}
- if (command == _T("/joinm")) {
+ if (command == L"/joinm") {
if (!one.IsEmpty()) {
for (int i = 1;; i++) {
CMString tmp = GetWord(text, i);
@@ -357,12 +357,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta AddToJTemp('M', tmp);
}
- PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1));
+ PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1));
}
return true;
}
- if (command == _T("/nusers")) {
+ if (command == L"/nusers") {
TCHAR szTemp[40];
CMString S = MakeWndID(window);
GC_INFO gci = { 0 };
@@ -370,22 +370,22 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta gci.pszModule = m_szModuleName;
gci.pszID = S.c_str();
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci))
- mir_sntprintf(szTemp, _T("users: %u"), gci.iCount);
+ mir_sntprintf(szTemp, L"users: %u", gci.iCount);
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false);
return true;
}
- if (command == _T("/echo")) {
+ if (command == L"/echo") {
if (one.IsEmpty())
return true;
- if (!mir_tstrcmpi(one.c_str(), _T("on"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"on")) {
bEcho = TRUE;
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are shown"), NULL, NULL, NULL, true, false);
}
- if (!mir_tstrcmpi(one.c_str(), _T("off"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"off")) {
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are not shown"), NULL, NULL, NULL, true, false);
bEcho = FALSE;
}
@@ -393,7 +393,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/buddycheck")) {
+ if (command == L"/buddycheck") {
if (one.IsEmpty()) {
if ((m_autoOnlineNotification && !bTempDisableCheck) || bTempForceCheck)
DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("The buddy check function is enabled"), NULL, NULL, NULL, true, false);
@@ -401,17 +401,17 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("The buddy check function is disabled"), NULL, NULL, NULL, true, false);
return true;
}
- if (!mir_tstrcmpi(one.c_str(), _T("on"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"on")) {
bTempForceCheck = true;
bTempDisableCheck = false;
CallFunctionAsync(sttSetTimerOn, this);
}
- if (!mir_tstrcmpi(one.c_str(), _T("off"))) {
+ if (!mir_tstrcmpi(one.c_str(), L"off")) {
bTempForceCheck = false;
bTempDisableCheck = true;
CallFunctionAsync(sttSetTimerOff, this);
}
- if (!mir_tstrcmpi(one.c_str(), _T("time")) && !two.IsEmpty()) {
+ if (!mir_tstrcmpi(one.c_str(), L"time") && !two.IsEmpty()) {
m_iTempCheckTime = _ttoi(two.c_str());
if (m_iTempCheckTime < 10 && m_iTempCheckTime != 0)
m_iTempCheckTime = 10;
@@ -427,14 +427,14 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/whois")) {
+ if (command == L"/whois") {
if (one.IsEmpty())
return false;
m_manualWhoisCount++;
return false;
}
- if (command == _T("/channelmanager")) {
+ if (command == L"/channelmanager") {
if (window && !hContact && IsChannel(window)) {
if (IsConnected()) {
if (m_managerDlg != NULL) {
@@ -452,26 +452,26 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/who")) {
+ if (command == L"/who") {
if (one.IsEmpty())
return true;
- DoUserhostWithReason(2, _T("U"), false, _T("%s"), one.c_str());
+ DoUserhostWithReason(2, L"U", false, L"%s", one.c_str());
return false;
}
- if (command == _T("/hop")) {
+ if (command == L"/hop") {
if (!IsChannel(window))
return true;
- PostIrcMessage(_T("/PART %s"), window);
+ PostIrcMessage(L"/PART %s", window);
if ((one.IsEmpty() || !IsChannel(one))) {
CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, window, NULL, NULL, NULL, NULL, NULL, FALSE, FALSE, 0);
if (wi && wi->pszPassword)
- PostIrcMessage(_T("/JOIN %s %s"), window, wi->pszPassword);
+ PostIrcMessage(L"/JOIN %s %s", window, wi->pszPassword);
else
- PostIrcMessage(_T("/JOIN %s"), window);
+ PostIrcMessage(L"/JOIN %s", window);
return true;
}
@@ -480,11 +480,11 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta GCEVENT gce = { sizeof(gce), &gcd };
CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce);
- PostIrcMessage(_T("/JOIN %s"), GetWordAddress(text, 1));
+ PostIrcMessage(L"/JOIN %s", GetWordAddress(text, 1));
return true;
}
- if (command == _T("/list")) {
+ if (command == L"/list") {
if (m_listDlg == NULL) {
m_listDlg = new CListDlg(this);
m_listDlg->Show();
@@ -496,55 +496,55 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString szMsg(FORMAT, TranslateT("This command is not recommended on a network of this size!\r\nIt will probably cause high CPU usage and/or high bandwidth\r\nusage for around %u to %u minute(s).\r\n\r\nDo you want to continue?"), minutes2, minutes);
if (m_noOfChannels < 4000 || (m_noOfChannels >= 4000 && MessageBox(NULL, szMsg, TranslateT("IRC warning"), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2) == IDYES)) {
ListView_DeleteAllItems(GetDlgItem(m_listDlg->GetHwnd(), IDC_INFO_LISTVIEW));
- PostIrcMessage(_T("/lusers"));
+ PostIrcMessage(L"/lusers");
return false;
}
m_listDlg->m_status.SetText(TranslateT("Aborted"));
return true;
}
- if (command == _T("/me")) {
+ if (command == L"/me") {
if (one.IsEmpty())
return true;
TCHAR szTemp[4000];
- mir_sntprintf(szTemp, _T("\001ACTION %s\001"), GetWordAddress(text.c_str(), 1));
+ mir_sntprintf(szTemp, L"\001ACTION %s\001", GetWordAddress(text.c_str(), 1));
PostIrcMessageWnd(window, hContact, szTemp);
return true;
}
- if (command == _T("/ame")) {
+ if (command == L"/ame") {
if (one.IsEmpty())
return true;
- CMString S = _T("/ME ") + DoIdentifiers(GetWordAddress(text.c_str(), 1), window);
- S.Replace(_T("%"), _T("%%"));
+ CMString S = L"/ME " + DoIdentifiers(GetWordAddress(text.c_str(), 1), window);
+ S.Replace(L"%", L"%%");
DoEvent(GC_EVENT_SENDMESSAGE, NULL, NULL, S.c_str(), NULL, NULL, NULL, FALSE, FALSE);
return true;
}
- if (command == _T("/amsg")) {
+ if (command == L"/amsg") {
if (one.IsEmpty())
return true;
CMString S = DoIdentifiers(GetWordAddress(text.c_str(), 1), window);
- S.Replace(_T("%"), _T("%%"));
+ S.Replace(L"%", L"%%");
DoEvent(GC_EVENT_SENDMESSAGE, NULL, NULL, S.c_str(), NULL, NULL, NULL, FALSE, FALSE);
return true;
}
- if (command == _T("/msg")) {
+ if (command == L"/msg") {
if (one.IsEmpty() || two.IsEmpty())
return true;
TCHAR szTemp[4000];
- mir_sntprintf(szTemp, _T("/PRIVMSG %s"), GetWordAddress(text.c_str(), 1));
+ mir_sntprintf(szTemp, L"/PRIVMSG %s", GetWordAddress(text.c_str(), 1));
PostIrcMessageWnd(window, hContact, szTemp);
return true;
}
- if (command == _T("/query")) {
+ if (command == L"/query") {
if (one.IsEmpty() || IsChannel(one.c_str()))
return true;
@@ -552,17 +552,17 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta MCONTACT hContact2 = CList_AddContact(&user, false, false);
if (hContact2) {
if (getByte(hContact, "AdvancedMode", 0) == 0)
- DoUserhostWithReason(1, (_T("S") + one).c_str(), true, one.c_str());
+ DoUserhostWithReason(1, (L"S" + one).c_str(), true, one.c_str());
else {
DBVARIANT dbv1;
if (!getTString(hContact, "UWildcard", &dbv1)) {
- CMString S = _T("S");
+ CMString S = L"S";
S += dbv1.ptszVal;
DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal);
db_free(&dbv1);
}
else {
- CMString S = _T("S");
+ CMString S = L"S";
S += one;
DoUserhostWithReason(2, S.c_str(), true, one.c_str());
}
@@ -573,13 +573,13 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta if (!two.IsEmpty()) {
TCHAR szTemp[4000];
- mir_sntprintf(szTemp, _T("/PRIVMSG %s"), GetWordAddress(text.c_str(), 1));
+ mir_sntprintf(szTemp, L"/PRIVMSG %s", GetWordAddress(text.c_str(), 1));
PostIrcMessageWnd(window, hContact, szTemp);
}
return true;
}
- if (command == _T("/ctcp")) {
+ if (command == L"/ctcp") {
if (one.IsEmpty() || two.IsEmpty())
return true;
@@ -591,15 +591,15 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta ulAdr = ConvertIPToInteger(m_IPFromServer ? m_myHost : m_myLocalHost);
// if it is not dcc or if it is dcc and a local ip exist
- if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0 || ulAdr) {
- if (mir_tstrcmpi(two.c_str(), _T("ping")) == 0)
- mir_sntprintf(szTemp, _T("/PRIVMSG %s \001%s %u\001"), one.c_str(), two.c_str(), time(0));
+ if (mir_tstrcmpi(two.c_str(), L"dcc") != 0 || ulAdr) {
+ if (mir_tstrcmpi(two.c_str(), L"ping") == 0)
+ mir_sntprintf(szTemp, L"/PRIVMSG %s \001%s %u\001", one.c_str(), two.c_str(), time(0));
else
- mir_sntprintf(szTemp, _T("/PRIVMSG %s \001%s\001"), one.c_str(), GetWordAddress(text.c_str(), 2));
+ mir_sntprintf(szTemp, L"/PRIVMSG %s \001%s\001", one.c_str(), GetWordAddress(text.c_str(), 2));
PostIrcMessageWnd(window, hContact, szTemp);
}
- if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0) {
+ if (mir_tstrcmpi(two.c_str(), L"dcc") != 0) {
mir_sntprintf(szTemp, TranslateT("CTCP %s request sent to %s"), two.c_str(), one.c_str());
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false);
}
@@ -607,11 +607,11 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (command == _T("/dcc")) {
+ if (command == L"/dcc") {
if (one.IsEmpty() || two.IsEmpty())
return true;
- if (mir_tstrcmpi(one.c_str(), _T("send")) == 0) {
+ if (mir_tstrcmpi(one.c_str(), L"send") == 0) {
TCHAR szTemp[1000];
unsigned long ulAdr = 0;
@@ -627,10 +627,10 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta CMString s;
if (getByte(ccNew, "AdvancedMode", 0) == 0)
- DoUserhostWithReason(1, (_T("S") + two).c_str(), true, two.c_str());
+ DoUserhostWithReason(1, (L"S" + two).c_str(), true, two.c_str());
else {
DBVARIANT dbv1;
- CMString S = _T("S");
+ CMString S = L"S";
if (!getTString(ccNew, "UWildcard", &dbv1)) {
S += dbv1.ptszVal;
DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal);
@@ -661,7 +661,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta return true;
}
- if (mir_tstrcmpi(one.c_str(), _T("chat")) == 0) {
+ if (mir_tstrcmpi(one.c_str(), L"chat") == 0) {
TCHAR szTemp[1000];
unsigned long ulAdr = 0;
@@ -693,7 +693,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hConta }
if (iPort != 0) {
- PostIrcMessage(_T("/CTCP %s DCC CHAT chat %u %u"), two.c_str(), ulAdr, iPort);
+ PostIrcMessage(L"/CTCP %s DCC CHAT chat %u %u", two.c_str(), ulAdr, iPort);
mir_sntprintf(szTemp, TranslateT("DCC CHAT request sent to %s"), two.c_str(), one.c_str());
DoEvent(GC_EVENT_INFORMATION, 0, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false);
}
@@ -735,7 +735,7 @@ static void __stdcall DoInputRequestAliasApcStub(void* _par) TCHAR* title = NULL;
TCHAR* defaulttext = NULL;
CMString command = (TCHAR*)str;
- TCHAR* p = _tcsstr((TCHAR*)str, _T("%question"));
+ TCHAR* p = _tcsstr((TCHAR*)str, L"%question");
if (p[9] == '=' && p[10] == '\"') {
infotext = &p[11];
p = _tcschr(infotext, '\"');
@@ -833,12 +833,12 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR if (!hContact && IsConnected()) {
Message = DoAlias(Message.c_str(), windowname);
- if (Message.Find(_T("%question")) != -1) {
+ if (Message.Find(L"%question") != -1) {
CallFunctionAsync(DoInputRequestAliasApcStub, new DoInputRequestParam(this, Message));
return 1;
}
- Message.Replace(_T("%newl"), _T("\r\n"));
+ Message.Replace(L"%newl", L"\r\n");
RemoveLinebreaks(Message);
}
@@ -852,8 +852,8 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR while (!Message.IsEmpty()) {
// split the text into lines, and do an automatic textsplit on long lies as well
bool flag = false;
- CMString DoThis = _T("");
- int index = Message.Find(_T("\r\n"), 0);
+ CMString DoThis = L"";
+ int index = Message.Find(L"\r\n", 0);
if (index == -1)
index = Message.GetLength();
@@ -861,11 +861,11 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR index = 432;
DoThis = Message.Mid(0, index);
Message.Delete(0, index);
- if (Message.Find(_T("\r\n"), 0) == 0)
+ if (Message.Find(L"\r\n", 0) == 0)
Message.Delete(0, 2);
//do this if it's a /raw
- if (IsConnected() && (GetWord(DoThis.c_str(), 0) == _T("/raw") || GetWord(DoThis.c_str(), 0) == _T("/quote"))) {
+ if (IsConnected() && (GetWord(DoThis.c_str(), 0) == L"/raw" || GetWord(DoThis.c_str(), 0) == L"/quote")) {
if (GetWord(DoThis.c_str(), 1).IsEmpty())
continue;
@@ -878,11 +878,11 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR *window, MCONTACT hContact, const TCHAR if ((GetWord(DoThis.c_str(), 0)[0] != '/') || // not a command
((GetWord(DoThis.c_str(), 0)[0] == '/') && (GetWord(DoThis.c_str(), 0)[1] == '/')) || // or double backslash at the beginning
hContact) {
- CMString S = _T("/PRIVMSG ");
+ CMString S = L"/PRIVMSG ";
if (mir_tstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty())
- S += m_info.sServerName + _T(" ") + DoThis;
+ S += m_info.sServerName + L" " + DoThis;
else
- S += CMString(windowname) + _T(" ") + DoThis;
+ S += CMString(windowname) + L" " + DoThis;
DoThis = S;
flag = true;
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 8d462b3a17..bac5fd2d2b 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -68,7 +68,7 @@ CIrcMessage::~CIrcMessage() void CIrcMessage::Reset() { - prefix.sNick = prefix.sUser = prefix.sHost = sCommand = _T(""); + prefix.sNick = prefix.sUser = prefix.sHost = sCommand = L""; m_bIncoming = false; m_bNotify = true; @@ -105,13 +105,13 @@ void CIrcMessage::ParseIrcCommand(const TCHAR* lpszCmdLine) if (*p1 == ':') { // break prefix into its components (nick!user@host) p2 = ++p1; - while (*p2 && !_tcschr(_T(" !"), *p2)) + while (*p2 && !_tcschr(L" !", *p2)) ++p2; prefix.sNick.SetString(p1, p2 - p1); if (*p2 != '!') goto end_of_prefix; p1 = ++p2; - while (*p2 && !_tcschr(_T(" @"), *p2)) + while (*p2 && !_tcschr(L" @", *p2)) ++p2; prefix.sUser.SetString(p1, p2 - p1); if (*p2 != '@') @@ -184,7 +184,7 @@ void CIrcProto::SendIrcMessage(const TCHAR* msg, bool bNotify, int cp) if (bNotify) { CIrcMessage ircMsg(this, msg, cp); - if (!ircMsg.sCommand.IsEmpty() && ircMsg.sCommand != _T("QUIT")) + if (!ircMsg.sCommand.IsEmpty() && ircMsg.sCommand != L"QUIT") Notify(&ircMsg); } } @@ -201,7 +201,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) con = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)m_hNetlibUser, (LPARAM)&ncon); if (con == NULL) { TCHAR szTemp[300]; - mir_sntprintf(szTemp, _T("\0035%s \002%s\002 (%S: %u)."), + mir_sntprintf(szTemp, L"\0035%s \002%s\002 (%S: %u).", TranslateT("Failed to connect to"), si.sNetwork.c_str(), si.sServer.c_str(), si.iPort); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false); return false; @@ -230,7 +230,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) Sleep(100); if (info.sPassword.GetLength()) NLSend("PASS %s\r\n", info.sPassword.c_str()); - NLSend(_T("NICK %s\r\n"), info.sNick.c_str()); + NLSend(L"NICK %s\r\n", info.sNick.c_str()); CMString userID = GetWord(info.sUserID.c_str(), 0); TCHAR szHostName[MAX_PATH]; @@ -238,10 +238,10 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info) GetComputerName(szHostName, &cbHostName); CMString HostName = GetWord(szHostName, 0); if (userID.IsEmpty()) - userID = _T("Miranda"); + userID = L"Miranda"; if (HostName.IsEmpty()) - HostName = _T("host"); - NLSend(_T("USER %s %s %s :%s\r\n"), userID.c_str(), HostName.c_str(), _T("server"), info.sFullName.c_str()); + HostName = L"host"; + NLSend(L"USER %s %s %s :%s\r\n", userID.c_str(), HostName.c_str(), L"server", info.sFullName.c_str()); return con != NULL; } @@ -256,7 +256,7 @@ void CIrcProto::Disconnect(void) KillIdent(); if (m_quitMessage[0]) - NLSend(_T("QUIT :%s\r\n"), m_quitMessage); + NLSend(L"QUIT :%s\r\n", m_quitMessage); else NLSend("QUIT \r\n"); @@ -635,18 +635,18 @@ CIrcSessionInfo::CIrcSessionInfo(const CIrcSessionInfo& si) : void CIrcSessionInfo::Reset() { sServer = ""; - sServerName = _T(""); + sServerName = L""; iPort = 0; - sNick = _T(""); - sUserID = _T(""); - sFullName = _T(""); + sNick = L""; + sUserID = L""; + sFullName = L""; sPassword = ""; bIdentServer = false; bNickFlag = false; m_iSSL = 0; - sIdentServerType = _T(""); + sIdentServerType = L""; iIdentServerPort = 0; - sNetwork = _T(""); + sNetwork = L""; } //////////////////////////////////////////////////////////////////// @@ -978,8 +978,8 @@ int CDccSession::SetupConnection() // if spaces in the filename surround with quotes if (sFileWithQuotes.Find(' ', 0) != -1) { - sFileWithQuotes.Insert(0, _T("\"")); - sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\"")); + sFileWithQuotes.Insert(0, L"\""); + sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\""); } // send out DCC RECV command for passive filetransfers @@ -990,7 +990,7 @@ int CDccSession::SetupConnection() ulAdr = m_proto->m_IPFromServer ? ConvertIPToInteger(m_proto->m_myHost) : nb.dwExternalIP; if (di->iPort && ulAdr) - m_proto->PostIrcMessage(_T("/CTCP %s DCC SEND %s %u %u %I64u %s"), di->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, di->iPort, di->dwSize, di->sToken.c_str()); + m_proto->PostIrcMessage(L"/CTCP %s DCC SEND %s %u %u %I64u %s", di->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, di->iPort, di->dwSize, di->sToken.c_str()); return TRUE; } diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 4e5c156334..eaa7f8541b 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -219,7 +219,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) CallChatEvent(WINDOW_HIDDEN, (LPARAM)&gce);
TCHAR szTemp[MAX_PATH];
- mir_sntprintf(szTemp, _T("%%miranda_path%%\\Plugins\\%S_perform.ini"), m_szModuleName);
+ mir_sntprintf(szTemp, L"%%miranda_path%%\\Plugins\\%S_perform.ini", m_szModuleName);
TCHAR *szLoadFileName = Utils_ReplaceVarsT(szTemp);
char* pszPerformData = IrcLoadFile(szLoadFileName);
if (pszPerformData != NULL) {
@@ -274,13 +274,13 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) if (m_nick[0]) {
TCHAR szBuf[40];
if (mir_tstrlen(m_alternativeNick) == 0) {
- mir_sntprintf(szBuf, _T("%s%u"), m_nick, rand() % 9999);
+ mir_sntprintf(szBuf, L"%s%u", m_nick, rand() % 9999);
setTString("AlernativeNick", szBuf);
mir_tstrncpy(m_alternativeNick, szBuf, 30);
}
if (mir_tstrlen(m_name) == 0) {
- mir_sntprintf(szBuf, _T("Miranda%u"), rand() % 9999);
+ mir_sntprintf(szBuf, L"Miranda%u", rand() % 9999);
setTString("Name", szBuf);
mir_tstrncpy(m_name, szBuf, 200);
}
@@ -305,7 +305,7 @@ MCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) if (hContact) {
DBVARIANT dbv1;
- CMString S = _T("S");
+ CMString S = L"S";
if (getByte(hContact, "AdvancedMode", 0) == 0) {
S += user.name;
@@ -323,7 +323,7 @@ MCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) }
}
if (getByte("MirVerAutoRequest", 1))
- PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), user.name);
+ PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", user.name);
}
mir_free(id);
@@ -421,14 +421,14 @@ int __cdecl CIrcProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** s // if spaces in the filename surround witrh quotes
if (sFileWithQuotes.Find(' ', 0) != -1) {
- sFileWithQuotes.Insert(0, _T("\""));
- sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\""));
+ sFileWithQuotes.Insert(0, L"\"");
+ sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\"");
}
if (di->bReverse)
- PostIrcMessage(_T("/PRIVMSG %s \001DCC RESUME %s 0 %I64u %s\001"), di->sContactName.c_str(), sFileWithQuotes.c_str(), dwPos, dcc->di->sToken.c_str());
+ PostIrcMessage(L"/PRIVMSG %s \001DCC RESUME %s 0 %I64u %s\001", di->sContactName.c_str(), sFileWithQuotes.c_str(), dwPos, dcc->di->sToken.c_str());
else
- PostIrcMessage(_T("/PRIVMSG %s \001DCC RESUME %s %u %I64u\001"), di->sContactName.c_str(), sFileWithQuotes.c_str(), di->iPort, dwPos);
+ PostIrcMessage(L"/PRIVMSG %s \001DCC RESUME %s %u %I64u\001", di->sContactName.c_str(), sFileWithQuotes.c_str(), di->iPort, dwPos);
return 0;
}
@@ -565,8 +565,8 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz // if spaces in the filename surround witrh quotes
if (sFileWithQuotes.Find(' ', 0) != -1) {
- sFileWithQuotes.Insert(0, _T("\""));
- sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), _T("\""));
+ sFileWithQuotes.Insert(0, L"\"");
+ sFileWithQuotes.Insert(sFileWithQuotes.GetLength(), L"\"");
}
dci->hContact = hContact;
@@ -584,12 +584,12 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz // need to make sure that %'s are doubled to avoid having chat interpret as color codes
CMString sFileCorrect = dci->sFile;
- sFileCorrect.Replace(_T("%"), _T("%%"));
+ sFileCorrect.Replace(L"%", L"%%");
// is it an reverse filetransfer (receiver acts as server)
if (dci->bReverse) {
TCHAR szTemp[256];
- PostIrcMessage(_T("/CTCP %s DCC SEND %s 200 0 %I64u %u"),
+ PostIrcMessage(L"/CTCP %s DCC SEND %s 200 0 %I64u %u",
dci->sContactName.c_str(), sFileWithQuotes.c_str(), dci->dwSize, dcc->iToken);
mir_sntprintf(szTemp,
@@ -599,7 +599,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz if (m_sendNotice) {
mir_sntprintf(szTemp,
- _T("/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [Reverse transfer]"),
+ L"/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [Reverse transfer]",
dci->sContactName.c_str(), sFileCorrect.c_str(), dci->dwSize / 1024);
PostIrcMessage(szTemp);
}
@@ -608,7 +608,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz iPort = dcc->Connect();
if (iPort) {
TCHAR szTemp[256];
- PostIrcMessage(_T("/CTCP %s DCC SEND %s %u %u %I64u"),
+ PostIrcMessage(L"/CTCP %s DCC SEND %s %u %u %I64u",
dci->sContactName.c_str(), sFileWithQuotes.c_str(), ulAdr, iPort, dci->dwSize);
mir_sntprintf(szTemp,
@@ -618,7 +618,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz if (m_sendNotice) {
mir_sntprintf(szTemp,
- _T("/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [IP: %s]"),
+ L"/NOTICE %s I am sending the file '\002%s\002' (%I64u kB) to you, please accept it. [IP: %s]",
dci->sContactName.c_str(), sFileCorrect.c_str(), dci->dwSize / 1024, (TCHAR*)_A2T(ConvertIntegerToIP(ulAdr)));
PostIrcMessage(szTemp);
}
@@ -631,7 +631,7 @@ HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppsz index++;
while (ppszFiles[index]) {
if (_taccess(ppszFiles[index], 0) == 0) {
- PostIrcMessage(_T("/DCC SEND %s %S"), dci->sContactName.c_str(), ppszFiles[index]);
+ PostIrcMessage(L"/DCC SEND %s %S", dci->sContactName.c_str(), ppszFiles[index]);
}
index++;
}
@@ -753,8 +753,8 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) }
else if ((iNewStatus == ID_STATUS_ONLINE || iNewStatus == ID_STATUS_FREECHAT) && IsConnected() && m_iStatus == ID_STATUS_AWAY) //go to online while connected
{
- m_statusMessage = _T("");
- PostIrcMessage(_T("/AWAY"));
+ m_statusMessage = L"";
+ PostIrcMessage(L"/AWAY");
return 0;
}
else if (iNewStatus == ID_STATUS_OFFLINE && IsConnected()) //go from online/away to offline
@@ -765,7 +765,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) }
else if (iNewStatus == ID_STATUS_AWAY && IsConnected()) //go to away while connected
{
- PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
return 0;
}
else if (iNewStatus == ID_STATUS_ONLINE && IsConnected()) //already online
@@ -781,7 +781,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) HANDLE __cdecl CIrcProto::GetAwayMsg(MCONTACT hContact)
{
- WhoisAwayReply = _T("");
+ WhoisAwayReply = L"";
DBVARIANT dbv;
// bypass chat contacts.
@@ -792,7 +792,7 @@ HANDLE __cdecl CIrcProto::GetAwayMsg(MCONTACT hContact) db_free(&dbv);
return 0;
}
- CMString S = _T("WHOIS ");
+ CMString S = L"WHOIS ";
S += dbv.ptszVal;
if (IsConnected())
SendIrcMessage(S.c_str(), false);
@@ -815,7 +815,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) default:
CMString newStatus = msg;
- newStatus.Replace(_T("\r\n"), _T(" "));
+ newStatus.Replace(L"\r\n", L" ");
if (m_statusMessage.IsEmpty() || msg == NULL || m_statusMessage != newStatus) {
if (msg == NULL || *msg == 0)
m_statusMessage = STR_AWAYMESSAGE;
@@ -823,7 +823,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) m_statusMessage = newStatus;
if (m_iStatus == ID_STATUS_AWAY)
- PostIrcMessage(_T("/AWAY %s"), m_statusMessage.Mid(0, 450));
+ PostIrcMessage(L"/AWAY %s", m_statusMessage.Mid(0, 450));
}
}
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 7d13696798..608cd844bb 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -828,10 +828,10 @@ void CCtcpPrefsDlg::OnInitDialog() m_combo.AddStringA("8192");
TCHAR szTemp[10];
- mir_sntprintf(szTemp, _T("%u"), m_proto->m_DCCPacketSize);
+ mir_sntprintf(szTemp, L"%u", m_proto->m_DCCPacketSize);
int i = m_combo.SelectString(szTemp);
if (i == CB_ERR)
- m_combo.SelectString(_T("4096"));
+ m_combo.SelectString(L"4096");
if (m_proto->m_DCCChatAccept == 1)
m_radio1.SetState(true);
@@ -849,14 +849,14 @@ void CCtcpPrefsDlg::OnInitDialog() else {
if (m_proto->m_IPFromServer) {
if (m_proto->m_myHost[0]) {
- CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + _T(">");
+ CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + L">";
m_ip.SetText(s.c_str());
}
else m_ip.SetText(TranslateT("<Automatic>"));
}
else {
if (m_proto->m_myLocalHost[0]) {
- CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + _T(">");
+ CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + L">";
m_ip.SetText(s.c_str());
}
else m_ip.SetText(TranslateT("<Automatic>"));
@@ -874,14 +874,14 @@ void CCtcpPrefsDlg::OnClicked(CCtrlData*) else {
if (m_fromServer.GetState()) {
if (m_proto->m_myHost[0]) {
- CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + _T(">");
+ CMString s = (CMString)TranslateT("<Resolved IP: ") + (TCHAR*)_A2T(m_proto->m_myHost) + L">";
m_ip.SetText(s.c_str());
}
else m_ip.SetText(TranslateT("<Automatic>"));
}
else {
if (m_proto->m_myLocalHost[0]) {
- CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + _T(">");
+ CMString s = (CMString)TranslateT("<Local IP: ") + (TCHAR*)_A2T(m_proto->m_myLocalHost) + L">";
m_ip.SetText(s.c_str());
}
else m_ip.SetText(TranslateT("<Automatic>"));
@@ -1091,7 +1091,7 @@ void COtherPrefsDlg::OnAdd(CCtrlButton*) {
TCHAR* temp = m_pertormEdit.GetText();
- if (my_strstri(temp, _T("/away")))
+ if (my_strstri(temp, L"/away"))
MessageBox(NULL, TranslateT("The usage of /AWAY in your perform buffer is restricted\n as IRC sends this command automatically."), TranslateT("IRC Error"), MB_OK);
else {
int i = m_performCombo.GetCurSel();
@@ -1113,7 +1113,7 @@ void COtherPrefsDlg::OnDelete(CCtrlButton*) if (i != CB_ERR) {
PERFORM_INFO* pPerf = (PERFORM_INFO*)m_performCombo.GetItemData(i);
if (pPerf != NULL) {
- pPerf->mText = _T("");
+ pPerf->mText = L"";
m_pertormEdit.SetTextA("");
m_delete.Disable();
m_add.Disable();
@@ -1179,7 +1179,7 @@ void COtherPrefsDlg::addPerformComboValue(int idx, const char* szValueName) pPref = new PERFORM_INFO(sSetting.c_str(), dbv.ptszVal);
db_free(&dbv);
}
- else pPref = new PERFORM_INFO(sSetting.c_str(), _T(""));
+ else pPref = new PERFORM_INFO(sSetting.c_str(), L"");
m_performCombo.SetItemData(idx, (LPARAM)pPref);
}
@@ -1232,7 +1232,7 @@ void CAddIgnoreDlg::OnOk(CCtrlButton*) CMString Mask = GetWord(szMask, 0);
if (Mask.GetLength() != 0) {
if (!_tcschr(Mask.c_str(), '!') && !_tcschr(Mask.c_str(), '@'))
- Mask += _T("!*@*");
+ Mask += L"!*@*";
if (!flags.IsEmpty()) {
if (*szOldMask)
@@ -1316,7 +1316,7 @@ static LRESULT CALLBACK ListviewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, void CIrcProto::InitIgnore(void)
{
TCHAR szTemp[MAX_PATH];
- mir_sntprintf(szTemp, _T("%%miranda_path%%\\Plugins\\%S_ignore.ini"), m_szModuleName);
+ mir_sntprintf(szTemp, L"%%miranda_path%%\\Plugins\\%S_ignore.ini", m_szModuleName);
TCHAR *szLoadFileName = Utils_ReplaceVarsT(szTemp);
char* pszIgnoreData = IrcLoadFile(szLoadFileName);
if (pszIgnoreData != NULL) {
@@ -1383,7 +1383,7 @@ void CIrcProto::RewriteIgnoreSettings(void) mir_snprintf(settingName, "IGNORE:%d", i);
CIrcIgnoreItem& C = m_ignoreItems[i];
- setTString(settingName, (C.mask + _T(" ") + C.flags + _T(" ") + C.network).c_str());
+ setTString(settingName, (C.mask + L" " + C.flags + L" " + C.network).c_str());
}
}
@@ -1662,11 +1662,11 @@ int CIrcProto::OnInitOptionsPages(WPARAM wParam, LPARAM) void CIrcProto::InitPrefs(void)
{
- ConnectSettings[0].defStr = _T("Miranda");
- ConnectSettings[1].defStr = _T("UNIX");
- ConnectSettings[2].defStr = _T("113");
- ConnectSettings[3].defStr = _T("30");
- ConnectSettings[4].defStr = _T("10");
+ ConnectSettings[0].defStr = L"Miranda";
+ ConnectSettings[1].defStr = L"UNIX";
+ ConnectSettings[2].defStr = L"113";
+ ConnectSettings[3].defStr = L"30";
+ ConnectSettings[4].defStr = L"10";
CtcpSettings[0].defStr = STR_USERINFO;
@@ -1701,7 +1701,7 @@ void CIrcProto::InitPrefs(void) m_mySpecifiedHostIP[0] = 0;
if (m_alias == NULL)
- m_alias = mir_tstrdup(_T("/op /mode ## +ooo $1 $2 $3\r\n/dop /mode ## -ooo $1 $2 $3\r\n/voice /mode ## +vvv $1 $2 $3\r\n/dvoice /mode ## -vvv $1 $2 $3\r\n/j /join #$1 $2-\r\n/p /part ## $1-\r\n/w /whois $1\r\n/k /kick ## $1 $2-\r\n/q /query $1\r\n/logon /log on ##\r\n/logoff /log off ##\r\n/save /log buffer $1\r\n/slap /me slaps $1 around a bit with a large trout"));
+ m_alias = mir_tstrdup(L"/op /mode ## +ooo $1 $2 $3\r\n/dop /mode ## -ooo $1 $2 $3\r\n/voice /mode ## +vvv $1 $2 $3\r\n/dvoice /mode ## -vvv $1 $2 $3\r\n/j /join #$1 $2-\r\n/p /part ## $1-\r\n/w /whois $1\r\n/k /kick ## $1 $2-\r\n/q /query $1\r\n/logon /log on ##\r\n/logoff /log off ##\r\n/save /log buffer $1\r\n/slap /me slaps $1 around a bit with a large trout");
m_quickComboSelection = getDword("QuickComboSelection", m_serverComboSelection + 1);
m_myHost[0] = '\0';
@@ -1821,7 +1821,7 @@ INT_PTR CIrcProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) static void sttImportIni(const TCHAR* szIniFile)
{
- FILE* serverFile = _tfopen(szIniFile, _T("r"));
+ FILE* serverFile = _tfopen(szIniFile, L"r");
if (serverFile == NULL)
return;
@@ -1847,17 +1847,17 @@ static void sttImportIni(const TCHAR* szIniFile) void InitServers()
{
- TCHAR *szTemp = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins\\IRC_servers.ini"));
+ TCHAR *szTemp = Utils_ReplaceVarsT(L"%miranda_path%\\Plugins\\IRC_servers.ini");
sttImportIni(szTemp);
mir_free(szTemp);
RereadServers();
if (g_servers.getCount() == 0) {
- TCHAR *szIniFile = Utils_ReplaceVarsT(_T("%temp%\\default_servers.ini"));
- FILE *serverFile = _tfopen(szIniFile, _T("a"));
+ TCHAR *szIniFile = Utils_ReplaceVarsT(L"%temp%\\default_servers.ini");
+ FILE *serverFile = _tfopen(szIniFile, L"a");
if (serverFile) {
- char* pszSvrs = (char*)LockResource(LoadResource(hInst, FindResource(hInst, MAKEINTRESOURCE(IDR_SERVERS), _T("TEXT"))));
+ char* pszSvrs = (char*)LockResource(LoadResource(hInst, FindResource(hInst, MAKEINTRESOURCE(IDR_SERVERS), L"TEXT")));
if (pszSvrs)
fwrite(pszSvrs, 1, mir_strlen(pszSvrs) + 1, serverFile);
fclose(serverFile);
diff --git a/protocols/IRCG/src/output.cpp b/protocols/IRCG/src/output.cpp index c86d78fb61..8ff9d2a7b8 100644 --- a/protocols/IRCG/src/output.cpp +++ b/protocols/IRCG/src/output.cpp @@ -26,26 +26,26 @@ static CMString FormatOutput(const CIrcMessage* pmsg) CMString sMessage;
if (pmsg->m_bIncoming) { // Is it an incoming message?
- if (pmsg->sCommand == _T("WALLOPS") && pmsg->parameters.getCount() > 0) {
+ if (pmsg->sCommand == L"WALLOPS" && pmsg->parameters.getCount() > 0) {
TCHAR temp[200]; *temp = '\0';
mir_sntprintf(temp, TranslateT("WallOps from %s: "), pmsg->prefix.sNick.c_str());
sMessage = temp;
for (int i = 0; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
- if (pmsg->sCommand == _T("INVITE") && pmsg->parameters.getCount() > 1) {
+ if (pmsg->sCommand == L"INVITE" && pmsg->parameters.getCount() > 1) {
TCHAR temp[256]; *temp = '\0';
mir_sntprintf(temp, TranslateT("%s invites you to %s"), pmsg->prefix.sNick.c_str(), pmsg->parameters[1].c_str());
sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) {
- sMessage += _T(": ") + pmsg->parameters[i];
+ sMessage += L": " + pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
@@ -56,30 +56,30 @@ static CMString FormatOutput(const CIrcMessage* pmsg) mir_sntprintf(temp, TranslateT("%s is away"), pmsg->parameters[1].c_str());
sMessage = temp;
for (int i = 2; i < (int)pmsg->parameters.getCount(); i++) {
- sMessage += _T(": ") + pmsg->parameters[i];
+ sMessage += L": " + pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
goto THE_END;
}
if ((index == 443 || index == 441) && pmsg->parameters.getCount() > 3)
- return pmsg->parameters[1] + _T(" ") + pmsg->parameters[3] + _T(": ") + pmsg->parameters[2];
+ return pmsg->parameters[1] + L" " + pmsg->parameters[3] + L": " + pmsg->parameters[2];
if (index == 303) { // ISON command
sMessage = TranslateT("These are online: ");
for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(", ");
+ sMessage += L", ";
}
goto THE_END;
}
if ((index > 400 || index < 500) && pmsg->parameters.getCount() > 2 && pmsg->sCommand[0] == '4') //all error messages
- return pmsg->parameters[2] + _T(": ") + pmsg->parameters[1];
+ return pmsg->parameters[2] + L": " + pmsg->parameters[1];
}
- else if (pmsg->sCommand == _T("NOTICE") && pmsg->parameters.getCount() > 1) {
+ else if (pmsg->sCommand == L"NOTICE" && pmsg->parameters.getCount() > 1) {
TCHAR temp[500]; *temp = '\0';
int l = pmsg->parameters[1].GetLength();
@@ -89,7 +89,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) tempstr.Delete(0, 1);
tempstr.Delete(tempstr.GetLength() - 1, 1);
CMString type = GetWord(tempstr.c_str(), 0);
- if (mir_tstrcmpi(type.c_str(), _T("ping")) == 0)
+ if (mir_tstrcmpi(type.c_str(), L"ping") == 0)
mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s"), type.c_str(), pmsg->parameters[0].c_str());
else
mir_sntprintf(temp, TranslateT("CTCP %s reply sent to %s: %s"), type.c_str(), pmsg->parameters[0].c_str(), GetWordAddress(tempstr.c_str(), 1));
@@ -101,7 +101,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) for (int i = 1; i < (int)pmsg->parameters.getCount(); i++) {
sMessage += pmsg->parameters[i];
if (i != pmsg->parameters.getCount() - 1)
- sMessage += _T(" ");
+ sMessage += L" ";
}
}
goto THE_END;
@@ -111,18 +111,18 @@ static CMString FormatOutput(const CIrcMessage* pmsg) if (pmsg->m_bIncoming) {
if (pmsg->parameters.getCount() < 2 && pmsg->parameters.getCount() > 0)
- return pmsg->sCommand + _T(" : ") + pmsg->parameters[0];
+ return pmsg->sCommand + L" : " + pmsg->parameters[0];
if (pmsg->parameters.getCount() > 1)
for (int i = 1; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += pmsg->parameters[i] + _T(" ");
+ sMessage += pmsg->parameters[i] + L" ";
}
else {
if (pmsg->prefix.sNick.GetLength())
- sMessage = pmsg->prefix.sNick + _T(" ");
- sMessage += pmsg->sCommand + _T(" ");
+ sMessage = pmsg->prefix.sNick + L" ";
+ sMessage += pmsg->sCommand + L" ";
for (int i = 0; i < (int)pmsg->parameters.getCount(); i++)
- sMessage += pmsg->parameters[i] + _T(" ");
+ sMessage += pmsg->parameters[i] + L" ";
}
THE_END:
@@ -134,16 +134,16 @@ BOOL CIrcProto::ShowMessage(const CIrcMessage* pmsg) CMString mess = FormatOutput(pmsg);
if (!pmsg->m_bIncoming)
- mess.Replace(_T("%%"), _T("%"));
+ mess.Replace(L"%%", L"%");
int iTemp = _ttoi(pmsg->sCommand.c_str());
//To active window
if ((iTemp > 400 || iTemp < 500) && pmsg->sCommand[0] == '4' //all error messages
- || pmsg->sCommand == _T("303") //ISON command
- || pmsg->sCommand == _T("INVITE")
- || ((pmsg->sCommand == _T("NOTICE")) && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), _T("\001")) == NULL) : false)) // CTCP answers should go to m_network Log window!
- || pmsg->sCommand == _T("515")) //chanserv error
+ || pmsg->sCommand == L"303" //ISON command
+ || pmsg->sCommand == L"INVITE"
+ || ((pmsg->sCommand == L"NOTICE") && ((pmsg->parameters.getCount() > 2) ? (_tcsstr(pmsg->parameters[1].c_str(), L"\001") == NULL) : false)) // CTCP answers should go to m_network Log window!
+ || pmsg->sCommand == L"515") //chanserv error
{
DoEvent(GC_EVENT_INFORMATION, NULL, pmsg->m_bIncoming ? pmsg->prefix.sNick.c_str() : m_info.sNick.c_str(), mess.c_str(), NULL, NULL, NULL, true, pmsg->m_bIncoming ? false : true);
return TRUE;
diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index b8cd6b6e7b..ef968fb631 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -149,7 +149,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.pszID = S.c_str();
if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
TCHAR szTemp[40];
- mir_sntprintf(szTemp, _T("%u"), gci.iCount);
+ mir_sntprintf(szTemp, L"%u", gci.iCount);
sOutput = szTemp;
}
}
@@ -163,7 +163,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) return (INT_PTR)mir_strdup(gci.pszUsers);
}
else if (sRequest == "channellist") {
- CMString S = _T("");
+ CMString S = L"";
int n = CallServiceSync(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)m_szModuleName);
if (n >= 0) {
int j = 0;
@@ -175,10 +175,10 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) {
if (mir_tstrcmpi(gci.pszID, SERVERWINDOW)) {
CMString S1 = gci.pszID;
- int k = S1.Find(_T(" "));
+ int k = S1.Find(L" ");
if (k != -1)
S1 = S1.Mid(0, k);
- S += S1 + _T(" ");
+ S += S1 + L" ";
}
}
j++;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index d147b48b2e..559e3bf29d 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -201,7 +201,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) if (!getTString(hContact, "Nick", &dbv)) {
int type = getByte(hContact, "ChatRoom", 0);
if (type != 0) {
- CMString S = _T("");
+ CMString S = L"";
if (type == GCW_CHATROOM)
S = MakeWndID(dbv.ptszVal);
if (type == GCW_SERVER)
@@ -210,7 +210,7 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) GCEVENT gce = { sizeof(gce), &gcd };
int i = CallChatEvent(SESSION_TERMINATE, (LPARAM)&gce);
if (i && type == GCW_CHATROOM)
- PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
+ PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
}
else {
BYTE bDCC = getByte((MCONTACT)wp, "DCC", 0);
@@ -234,7 +234,7 @@ INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM)
- PostIrcMessage(_T("/JOIN %s"), dbv.ptszVal);
+ PostIrcMessage(L"/JOIN %s", dbv.ptszVal);
db_free(&dbv);
}
return 0;
@@ -248,7 +248,7 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) {
- PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
+ PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
CMString S = MakeWndID(dbv.ptszVal);
GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL };
@@ -268,7 +268,7 @@ INT_PTR __cdecl CIrcProto::OnMenuChanSettings(WPARAM wp, LPARAM) MCONTACT hContact = (MCONTACT)wp;
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
- PostIrcMessageWnd(dbv.ptszVal, NULL, _T("/CHANNELMANAGER"));
+ PostIrcMessageWnd(dbv.ptszVal, NULL, L"/CHANNELMANAGER");
db_free(&dbv);
}
return 0;
@@ -282,7 +282,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
- PostIrcMessage(_T("/WHOIS %s %s"), dbv.ptszVal, dbv.ptszVal);
+ PostIrcMessage(L"/WHOIS %s %s", dbv.ptszVal, dbv.ptszVal);
db_free(&dbv);
}
return 0;
@@ -316,7 +316,7 @@ INT_PTR __cdecl CIrcProto::OnMenuIgnore(WPARAM wp, LPARAM) S = "+qnidcm";
else
S = "+qnidc";
- PostIrcMessage(_T("/IGNORE %%question=\"%s\",\"%s\",\"*!*@%S\" %s"),
+ PostIrcMessage(L"/IGNORE %%question=\"%s\",\"%s\",\"*!*@%S\" %s",
TranslateT("Please enter the hostmask (nick!user@host)\nNOTE! Contacts on your contact list are never ignored"),
TranslateT("Ignore"), host, S.c_str());
db_free(&dbv1);
@@ -361,7 +361,7 @@ INT_PTR __cdecl CIrcProto::OnQuickConnectMenuCommand(WPARAM, LPARAM) INT_PTR __cdecl CIrcProto::OnShowListMenuCommand(WPARAM, LPARAM)
{
- PostIrcMessage(_T("/LIST"));
+ PostIrcMessage(L"/LIST");
return 0;
}
@@ -404,22 +404,22 @@ static void DoChatFormatting(TCHAR* pszText) switch (p1[1]) {
case 'B':
case 'b':
- mir_tstrcpy(InsertThis, _T("\002"));
+ mir_tstrcpy(InsertThis, L"\002");
iRemoveChars = 2;
break;
case 'I':
case 'i':
- mir_tstrcpy(InsertThis, _T("\026"));
+ mir_tstrcpy(InsertThis, L"\026");
iRemoveChars = 2;
break;
case 'U':
case 'u':
- mir_tstrcpy(InsertThis, _T("\037"));
+ mir_tstrcpy(InsertThis, L"\037");
iRemoveChars = 2;
break;
case 'c':
{
- mir_tstrcpy(InsertThis, _T("\003"));
+ mir_tstrcpy(InsertThis, L"\003");
iRemoveChars = 2;
TCHAR szTemp[3];
@@ -429,36 +429,36 @@ static void DoChatFormatting(TCHAR* pszText) break;
case 'C':
if (p1[2] == '%' && p1[3] == 'F') {
- mir_tstrcpy(InsertThis, _T("\x0399,99"));
+ mir_tstrcpy(InsertThis, L"\x0399,99");
iRemoveChars = 4;
}
else {
- mir_tstrcpy(InsertThis, _T("\x0399"));
+ mir_tstrcpy(InsertThis, L"\x0399");
iRemoveChars = 2;
}
iFG = -1;
break;
case 'f':
if (p1 - 3 >= pszText && p1[-3] == '\003')
- mir_tstrcpy(InsertThis, _T(","));
+ mir_tstrcpy(InsertThis, L",");
else if (iFG >= 0)
- mir_sntprintf(InsertThis, _T("\x03%u,"), iFG);
+ mir_sntprintf(InsertThis, L"\x03%u,", iFG);
else
- mir_tstrcpy(InsertThis, _T("\x0399,"));
+ mir_tstrcpy(InsertThis, L"\x0399,");
iRemoveChars = 2;
break;
case 'F':
if (iFG >= 0)
- mir_sntprintf(InsertThis, _T("\x03%u,99"), iFG);
+ mir_sntprintf(InsertThis, L"\x03%u,99", iFG);
else
- mir_tstrcpy(InsertThis, _T("\x0399,99"));
+ mir_tstrcpy(InsertThis, L"\x0399,99");
iRemoveChars = 2;
break;
case '%':
- mir_tstrcpy(InsertThis, _T("%"));
+ mir_tstrcpy(InsertThis, L"%");
iRemoveChars = 2;
break;
@@ -481,7 +481,7 @@ static void DoChatFormatting(TCHAR* pszText) int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam)
{
GCHOOK *gch = (GCHOOK*)lParam;
- CMString S = _T("");
+ CMString S = L"";
mir_cslock lock(m_gchook);
@@ -489,7 +489,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) if (gch) {
if (!mir_strcmpi(gch->pDest->pszModule, m_szModuleName)) {
TCHAR *p1 = mir_tstrdup(gch->pDest->ptszID);
- TCHAR *p2 = _tcsstr(p1, _T(" - "));
+ TCHAR *p2 = _tcsstr(p1, L" - ");
if (p2)
*p2 = '\0';
@@ -509,13 +509,13 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) break;
case GC_USER_CHANMGR:
- PostIrcMessageWnd(p1, NULL, _T("/CHANNELMANAGER"));
+ PostIrcMessageWnd(p1, NULL, L"/CHANNELMANAGER");
break;
case GC_USER_PRIVMESS:
{
TCHAR szTemp[4000];
- mir_sntprintf(szTemp, _T("/QUERY %s"), gch->ptszUID);
+ mir_sntprintf(szTemp, L"/QUERY %s", gch->ptszUID);
PostIrcMessageWnd(p1, NULL, szTemp);
}
break;
@@ -526,11 +526,11 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) OnChangeNickMenuCommand(NULL, NULL);
break;
case 2:
- PostIrcMessageWnd(p1, NULL, _T("/CHANNELMANAGER"));
+ PostIrcMessageWnd(p1, NULL, L"/CHANNELMANAGER");
break;
case 3:
- PostIrcMessage(_T("/PART %s %s"), p1, m_userInfo);
+ PostIrcMessage(L"/PART %s %s", p1, m_userInfo);
{
S = MakeWndID(p1);
GCDEST gcd = { m_szModuleName, S.c_str(), GC_EVENT_CONTROL };
@@ -539,21 +539,21 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) }
break;
case 4: // show server window
- PostIrcMessageWnd(p1, NULL, _T("/SERVERSHOW"));
+ PostIrcMessageWnd(p1, NULL, L"/SERVERSHOW");
break;
/* case 5: // nickserv register nick
- PostIrcMessage( _T("/nickserv REGISTER %%question=\"%s\",\"%s\""),
+ PostIrcMessage( L"/nickserv REGISTER %%question=\"%s\",\"%s\"",
TranslateT("Please enter your authentication code"), TranslateT("Authenticate nick"));
break;
*/
case 6: // nickserv Identify
- PostIrcMessage(_T("/nickserv AUTH %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv AUTH %%question=\"%s\",\"%s\"",
TranslateT("Please enter your authentication code"), TranslateT("Authenticate nick"));
break;
case 7: // nickserv drop nick
if (MessageBox(0, TranslateT("Are you sure you want to unregister your current nick?"), TranslateT("Delete nick"),
MB_ICONERROR + MB_YESNO + MB_DEFBUTTON2) == IDYES)
- PostIrcMessage(_T("/nickserv DROP"));
+ PostIrcMessage(L"/nickserv DROP");
break;
case 8: // nickserv Identify
{
@@ -563,7 +563,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) HWND hEditCtrl = GetDlgItem(question_hWnd, IDC_EDIT);
SetDlgItemText(question_hWnd, IDC_CAPTION, TranslateT("Identify nick"));
SetDlgItemText(question_hWnd, IDC_TEXT, TranslateT("Please enter your password"));
- SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, _T("/nickserv IDENTIFY %question=\"%s\",\"%s\""));
+ SetDlgItemText(question_hWnd, IDC_HIDDENEDIT, L"/nickserv IDENTIFY %question=\"%s\",\"%s\"");
SetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE,
(LONG)GetWindowLongPtr(GetDlgItem(question_hWnd, IDC_EDIT), GWL_STYLE) | ES_PASSWORD);
SendMessage(hEditCtrl, EM_SETPASSWORDCHAR, (WPARAM)_T('*'), 0);
@@ -575,75 +575,75 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) {
DBVARIANT dbv;
if (!getTString("Nick", &dbv)) {
- PostIrcMessage(_T("/nickserv SENDPASS %s"), dbv.ptszVal);
+ PostIrcMessage(L"/nickserv SENDPASS %s", dbv.ptszVal);
db_free(&dbv);
}
}
break;
case 10: // nickserv set new password
- PostIrcMessage(_T("/nickserv SET PASSWORD %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv SET PASSWORD %%question=\"%s\",\"%s\"",
TranslateT("Please enter your new password"), TranslateT("Set new password"));
break;
case 11: // nickserv set language
- PostIrcMessage(_T("/nickserv SET LANGUAGE %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv SET LANGUAGE %%question=\"%s\",\"%s\"",
TranslateT("Please enter desired language ID (numeric value, depends on server)"), TranslateT("Change language of NickServ messages"));
break;
case 12: // nickserv set homepage
- PostIrcMessage(_T("/nickserv SET URL %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv SET URL %%question=\"%s\",\"%s\"",
TranslateT("Please enter URL that will be linked to your nick"), TranslateT("Set URL, linked to nick"));
break;
case 13: // nickserv set email
- PostIrcMessage(_T("/nickserv SET EMAIL %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv SET EMAIL %%question=\"%s\",\"%s\"",
TranslateT("Please enter your e-mail, that will be linked to your nick"), TranslateT("Set e-mail, linked to nick"));
break;
case 14: // nickserv set info
- PostIrcMessage(_T("/nickserv SET INFO %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv SET INFO %%question=\"%s\",\"%s\"",
TranslateT("Please enter some information about your nick"), TranslateT("Set information for nick"));
break;
case 15: // nickserv kill unauth off
- PostIrcMessage(_T("/nickserv SET KILL OFF"));
+ PostIrcMessage(L"/nickserv SET KILL OFF");
break;
case 16: // nickserv kill unauth on
- PostIrcMessage(_T("/nickserv SET KILL ON"));
+ PostIrcMessage(L"/nickserv SET KILL ON");
break;
case 17: // nickserv kill unauth quick
- PostIrcMessage(_T("/nickserv SET KILL QUICK"));
+ PostIrcMessage(L"/nickserv SET KILL QUICK");
break;
case 18: // nickserv hide nick from /LIST
- PostIrcMessage(_T("/nickserv SET PRIVATE ON"));
+ PostIrcMessage(L"/nickserv SET PRIVATE ON");
break;
case 19: // nickserv show nick to /LIST
- PostIrcMessage(_T("/nickserv SET PRIVATE OFF"));
+ PostIrcMessage(L"/nickserv SET PRIVATE OFF");
break;
case 20: // nickserv Hide e-mail from info
- PostIrcMessage(_T("/nickserv SET HIDE EMAIL ON"));
+ PostIrcMessage(L"/nickserv SET HIDE EMAIL ON");
break;
case 21: // nickserv Show e-mail in info
- PostIrcMessage(_T("/nickserv SET HIDE EMAIL OFF"));
+ PostIrcMessage(L"/nickserv SET HIDE EMAIL OFF");
break;
case 22: // nickserv Set security for nick
- PostIrcMessage(_T("/nickserv SET SECURE ON"));
+ PostIrcMessage(L"/nickserv SET SECURE ON");
break;
case 23: // nickserv Remove security for nick
- PostIrcMessage(_T("/nickserv SET SECURE OFF"));
+ PostIrcMessage(L"/nickserv SET SECURE OFF");
break;
case 24: // nickserv Link nick to current
- PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"",
TranslateT("Please enter nick you want to link to your current nick"), TranslateT("Link another nick to current nick"));
break;
case 25: // nickserv Unlink nick from current
- PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"",
TranslateT("Please enter nick you want to unlink from your current nick"), TranslateT("Unlink another nick from current nick"));
break;
case 26: // nickserv Set main nick
- PostIrcMessage(_T("/nickserv LINK %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/nickserv LINK %%question=\"%s\",\"%s\"",
TranslateT("Please enter nick you want to set as your main nick"), TranslateT("Set main nick"));
break;
case 27: // nickserv list all linked nicks
- PostIrcMessage(_T("/nickserv LISTLINKS"));
+ PostIrcMessage(L"/nickserv LISTLINKS");
break;
case 28: // nickserv list all channels owned
- PostIrcMessage(_T("/nickserv LISTCHANS"));
+ PostIrcMessage(L"/nickserv LISTCHANS");
break;
}
break;
@@ -651,35 +651,35 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) case GC_USER_NICKLISTMENU:
switch (gch->dwData) {
case 1:
- PostIrcMessage(_T("/MODE %s +o %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s +o %s", p1, gch->ptszUID);
break;
case 2:
- PostIrcMessage(_T("/MODE %s -o %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s -o %s", p1, gch->ptszUID);
break;
case 3:
- PostIrcMessage(_T("/MODE %s +v %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s +v %s", p1, gch->ptszUID);
break;
case 4:
- PostIrcMessage(_T("/MODE %s -v %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s -v %s", p1, gch->ptszUID);
break;
case 5:
- PostIrcMessage(_T("/KICK %s %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/KICK %s %s", p1, gch->ptszUID);
break;
case 6:
- PostIrcMessage(_T("/KICK %s %s %%question=\"%s\",\"%s\",\"%s\""),
+ PostIrcMessage(L"/KICK %s %s %%question=\"%s\",\"%s\",\"%s\"",
p1, gch->ptszUID, TranslateT("Please enter the reason"), TranslateT("Kick"), TranslateT("Jerk"));
break;
case 7:
- DoUserhostWithReason(1, _T("B") + (CMString)p1, true, _T("%s"), gch->ptszUID);
+ DoUserhostWithReason(1, L"B" + (CMString)p1, true, L"%s", gch->ptszUID);
break;
case 8:
- DoUserhostWithReason(1, _T("K") + (CMString)p1, true, _T("%s"), gch->ptszUID);
+ DoUserhostWithReason(1, L"K" + (CMString)p1, true, L"%s", gch->ptszUID);
break;
case 9:
- DoUserhostWithReason(1, _T("L") + (CMString)p1, true, _T("%s"), gch->ptszUID);
+ DoUserhostWithReason(1, L"L" + (CMString)p1, true, L"%s", gch->ptszUID);
break;
case 10:
- PostIrcMessage(_T("/WHOIS %s %s"), gch->ptszUID, gch->ptszUID);
+ PostIrcMessage(L"/WHOIS %s %s", gch->ptszUID, gch->ptszUID);
break;
// case 11:
// DoUserhostWithReason(1, "I", true, "%s", gch->ptszUID );
@@ -688,38 +688,38 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) // DoUserhostWithReason(1, "J", true, "%s", gch->ptszUID );
// break;
case 13:
- PostIrcMessage(_T("/DCC CHAT %s"), gch->ptszUID);
+ PostIrcMessage(L"/DCC CHAT %s", gch->ptszUID);
break;
case 14:
- PostIrcMessage(_T("/DCC SEND %s"), gch->ptszUID);
+ PostIrcMessage(L"/DCC SEND %s", gch->ptszUID);
break;
case 15:
- DoUserhostWithReason(1, _T("I"), true, _T("%s"), gch->ptszUID);
+ DoUserhostWithReason(1, L"I", true, L"%s", gch->ptszUID);
break;
case 16:
- PostIrcMessage(_T("/MODE %s +h %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s +h %s", p1, gch->ptszUID);
break;
case 17:
- PostIrcMessage(_T("/MODE %s -h %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s -h %s", p1, gch->ptszUID);
break;
case 18:
- PostIrcMessage(_T("/MODE %s +q %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s +q %s", p1, gch->ptszUID);
break;
case 19:
- PostIrcMessage(_T("/MODE %s -q %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s -q %s", p1, gch->ptszUID);
break;
case 20:
- PostIrcMessage(_T("/MODE %s +a %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s +a %s", p1, gch->ptszUID);
break;
case 21:
- PostIrcMessage(_T("/MODE %s -a %s"), p1, gch->ptszUID);
+ PostIrcMessage(L"/MODE %s -a %s", p1, gch->ptszUID);
break;
case 22:
- PostIrcMessage(_T("/NOTICE %s %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/NOTICE %s %%question=\"%s\",\"%s\"",
gch->ptszUID, TranslateT("Please enter the notice text"), TranslateT("Send notice"));
break;
case 23:
- PostIrcMessage(_T("/INVITE %s %%question=\"%s\",\"%s\""),
+ PostIrcMessage(L"/INVITE %s %%question=\"%s\",\"%s\"",
gch->ptszUID, TranslateT("Please enter the channel name to invite to"), TranslateT("Invite to channel"));
break;
case 30:
@@ -738,13 +738,13 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) }
break;
case 31: //slap
- PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/slap %s"), gch->ptszUID));
+ PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/slap %s", gch->ptszUID));
break;
case 32: //nickserv info
- PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/nickserv INFO %s ALL"), gch->ptszUID));
+ PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/nickserv INFO %s ALL", gch->ptszUID));
break;
case 33: //nickserv ghost
- PostIrcMessageWnd(p1, NULL, CMString(FORMAT, _T("/nickserv GHOST %s"), gch->ptszUID));
+ PostIrcMessageWnd(p1, NULL, CMString(FORMAT, L"/nickserv GHOST %s", gch->ptszUID));
break;
}
break;
@@ -761,7 +761,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) static gc_item logItems[] = {
{ LPGENT("&Change your nickname"), 1, MENU_ITEM, FALSE },
{ LPGENT("Channel &settings"), 2, MENU_ITEM, FALSE },
- { _T(""), 0, MENU_SEPARATOR, FALSE },
+ { L"", 0, MENU_SEPARATOR, FALSE },
{ LPGENT("NickServ"), 0, MENU_NEWPOPUP, FALSE },
{ LPGENT("Register nick"), 5, MENU_POPUPITEM, TRUE },
{ LPGENT("Auth nick"), 6, MENU_POPUPITEM, FALSE },
@@ -773,27 +773,27 @@ static gc_item logItems[] = { { LPGENT("Set homepage"), 12, MENU_POPUPITEM, FALSE },
{ LPGENT("Set e-mail"), 13, MENU_POPUPITEM, FALSE },
{ LPGENT("Set info"), 14, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("Hide e-mail from info"), 20, MENU_POPUPITEM, FALSE },
{ LPGENT("Show e-mail in info"), 21, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("Set security for nick"), 22, MENU_POPUPITEM, FALSE },
{ LPGENT("Remove security for nick"), 23, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("Link nick to current"), 24, MENU_POPUPITEM, FALSE },
{ LPGENT("Unlink nick from current"), 25, MENU_POPUPITEM, FALSE },
{ LPGENT("Set main nick"), 26, MENU_POPUPITEM, FALSE },
{ LPGENT("List all your nicks"), 27, MENU_POPUPITEM, FALSE },
{ LPGENT("List your channels"), 28, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("Kill unauthorized: off"), 15, MENU_POPUPITEM, FALSE },
{ LPGENT("Kill unauthorized: on"), 16, MENU_POPUPITEM, FALSE },
{ LPGENT("Kill unauthorized: quick"), 17, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("Hide nick from list"), 18, MENU_POPUPITEM, FALSE },
{ LPGENT("Show nick to list"), 19, MENU_POPUPITEM, FALSE },
{ LPGENT("Show the server &window"), 4, MENU_ITEM, FALSE },
- { _T(""), 0, MENU_SEPARATOR, FALSE },
+ { L"", 0, MENU_SEPARATOR, FALSE },
{ LPGENT("&Leave the channel"), 3, MENU_ITEM, FALSE }
};
@@ -815,7 +815,7 @@ static gc_item nickItems[] = { { LPGENT("Take H&alfop"), 17, MENU_POPUPITEM, FALSE },
{ LPGENT("Give &Voice"), 3, MENU_POPUPITEM, FALSE }, //15
{ LPGENT("Take V&oice"), 4, MENU_POPUPITEM, FALSE },
- { _T(""), 0, MENU_POPUPSEPARATOR, FALSE },
+ { L"", 0, MENU_POPUPSEPARATOR, FALSE },
{ LPGENT("&Kick"), 5, MENU_POPUPITEM, FALSE },
{ LPGENT("Ki&ck (reason)"), 6, MENU_POPUPITEM, FALSE },
{ LPGENT("&Ban"), 7, MENU_POPUPITEM, FALSE }, //20
@@ -825,7 +825,7 @@ static gc_item nickItems[] = { { LPGENT("Request &Chat"), 13, MENU_POPUPITEM, FALSE },
{ LPGENT("Send &File"), 14, MENU_POPUPITEM, FALSE }, //25
{ LPGENT("Add to &ignore list"), 15, MENU_ITEM, FALSE },
- { _T(""), 12, MENU_SEPARATOR, FALSE },
+ { L"", 12, MENU_SEPARATOR, FALSE },
{ LPGENT("&Add User"), 30, MENU_ITEM, FALSE }
};
@@ -968,7 +968,7 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
if (getByte("MirVerAutoRequest", 1))
- PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), dbv.ptszVal);
+ PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", dbv.ptszVal);
db_free(&dbv);
}
}
@@ -1045,9 +1045,9 @@ void CIrcProto::ConnectToServer(void) bTempDisableCheck = false;
bTempForceCheck = false;
m_iTempCheckTime = 0;
- sChannelPrefixes = _T("&#");
+ sChannelPrefixes = L"&#";
sUserModes = "ov";
- sUserModePrefixes = _T("@+");
+ sUserModePrefixes = L"@+";
sChannelModes = "btnimklps";
if (!m_bConnectThreadRunning)
@@ -1056,7 +1056,7 @@ void CIrcProto::ConnectToServer(void) InterlockedIncrement((long *)&m_bConnectRequested);
TCHAR szTemp[300];
- mir_sntprintf(szTemp, _T("\033%s \002%s\002 (%S: %u)"),
+ mir_sntprintf(szTemp, L"\033%s \002%s\002 (%S: %u)",
TranslateT("Connecting to"), si.sNetwork.c_str(), si.sServer.c_str(), si.iPort);
DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, NULL, szTemp, NULL, NULL, NULL, true, false);
}
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index 6870a538d2..2fa3ab877b 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -79,12 +79,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IRC_UM_DISCONNECT "/UMenuDisconnect"
#define IRC_UM_IGNORE "/UMenuIgnore"
-#define STR_QUITMESSAGE _T("\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/")
-#define STR_USERINFO _T("I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/")
-#define STR_AWAYMESSAGE _T("I'm away from the computer.") // Default away
-#define DCCSTRING _T(" (DCC)")
+#define STR_QUITMESSAGE L"\002Miranda NG!\002 Smaller, Faster, Easier. http://miranda-ng.org/"
+#define STR_USERINFO L"I'm a happy Miranda NG user! Get it here: http://miranda-ng.org/"
+#define STR_AWAYMESSAGE L"I'm away from the computer." // Default away
+#define DCCSTRING L" (DCC)"
#define SERVERSMODULE "IRC Servers"
-#define SERVERWINDOW _T("Network log")
+#define SERVERWINDOW L"Network log"
#define DCC_CHAT 1
#define DCC_SEND 2
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index c21a4760d6..cfae12a301 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -29,7 +29,7 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand) int pos = 0;
for (;;) {
- CMString tmp = sCommand.Tokenize(_T(","), pos);
+ CMString tmp = sCommand.Tokenize(L",", pos);
if (pos == -1)
break;
@@ -37,12 +37,12 @@ void CIrcProto::AddToJTemp(TCHAR op, CMString& sCommand) if (res.IsEmpty())
res = tmp;
else
- res += _T(" ") + tmp;
+ res += L" " + tmp;
}
DBVARIANT dbv;
if (!getTString("JTemp", &dbv)) {
- res = CMString(dbv.ptszVal) + _T(" ") + res;
+ res = CMString(dbv.ptszVal) + L" " + res;
db_free(&dbv);
}
@@ -110,13 +110,13 @@ const TCHAR* __stdcall GetWordAddress(const TCHAR* text, int index) void __stdcall RemoveLinebreaks(CMString &Message)
{
- while (Message.Find(_T("\r\n\r\n"), 0) != -1)
- Message.Replace(_T("\r\n\r\n"), _T("\r\n"));
+ while (Message.Find(L"\r\n\r\n", 0) != -1)
+ Message.Replace(L"\r\n\r\n", L"\r\n");
- if (Message.Find(_T("\r\n"), 0) == 0)
+ if (Message.Find(L"\r\n", 0) == 0)
Message.Delete(0, 2);
- if ((Message.GetLength() > 1) && (Message.Find(_T("\r\n"), Message.GetLength() - 2) == 0))
+ if ((Message.GetLength() > 1) && (Message.Find(L"\r\n", Message.GetLength() - 2) == 0))
Message.Delete(Message.GetLength() - 2, 2);
}
@@ -124,7 +124,7 @@ char* __stdcall IrcLoadFile(TCHAR* szPath) {
char * szContainer = NULL;
DWORD dwSiz = 0;
- FILE *hFile = _tfopen(szPath, _T("rb"));
+ FILE *hFile = _tfopen(szPath, L"rb");
if (hFile != NULL) {
fseek(hFile, 0, SEEK_END); // seek to end
dwSiz = ftell(hFile); // size
@@ -342,7 +342,7 @@ TCHAR* __stdcall DoColorCodes(const TCHAR* text, bool bStrip, bool bReplacePerce *p++ = '%';
*p++ = 'c';
- mir_sntprintf(buf, _T("%02u"), iFG);
+ mir_sntprintf(buf, L"%02u", iFG);
for (int i = 0; i < 2; i++)
*p++ = buf[i];
}
@@ -355,7 +355,7 @@ TCHAR* __stdcall DoColorCodes(const TCHAR* text, bool bStrip, bool bReplacePerce *p++ = '%';
*p++ = 'f';
- mir_sntprintf(buf, _T("%02u"), iBG);
+ mir_sntprintf(buf, L"%02u", iBG);
for (int i = 0; i < 2; i++)
*p++ = buf[i];
}
@@ -387,7 +387,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN {
GCDEST gcd = { m_szModuleName, NULL, iEvent };
CMString sID;
- CMString sText = _T("");
+ CMString sText = L"";
if (iEvent == GC_EVENT_INFORMATION && bIsMe && !bEcho)
return false;
@@ -401,7 +401,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN if (pszWindow) {
if (mir_tstrcmpi(pszWindow, SERVERWINDOW))
- sID = pszWindow + (CMString)_T(" - ") + m_info.sNetwork;
+ sID = pszWindow + (CMString)L" - " + m_info.sNetwork;
else
sID = pszWindow;
gcd.ptszID = (TCHAR*)sID.c_str();
@@ -435,21 +435,21 @@ CMString CIrcProto::ModeToStatus(int sMode) if (sUserModes.Find(sMode) != -1) {
switch (sMode) {
case 'q':
- return (CMString)_T("Owner");
+ return (CMString)L"Owner";
case 'o':
- return (CMString)_T("Op");
+ return (CMString)L"Op";
case 'v':
- return (CMString)_T("Voice");
+ return (CMString)L"Voice";
case 'h':
- return (CMString)_T("Halfop");
+ return (CMString)L"Halfop";
case 'a':
- return (CMString)_T("Admin");
+ return (CMString)L"Admin";
default:
- return (CMString)_T("Unknown");
+ return (CMString)L"Unknown";
}
}
- return (CMString)_T("Normal");
+ return (CMString)L"Normal";
}
CMString CIrcProto::PrefixToStatus(int cPrefix)
@@ -460,7 +460,7 @@ CMString CIrcProto::PrefixToStatus(int cPrefix) return ModeToStatus(sUserModes[index]);
}
- return (CMString)_T("Normal");
+ return (CMString)L"Normal";
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -533,11 +533,11 @@ void CIrcProto::KillChatTimer(UINT_PTR &nIDEvent) int CIrcProto::SetChannelSBText(CMString sWindow, CHANNELINFO * wi)
{
- CMString sTemp = _T("");
+ CMString sTemp = L"";
if (wi->pszMode) {
- sTemp += _T("[");
+ sTemp += L"[";
sTemp += wi->pszMode;
- sTemp += _T("] ");
+ sTemp += L"] ";
}
if (wi->pszTopic)
sTemp += wi->pszTopic;
@@ -548,7 +548,7 @@ int CIrcProto::SetChannelSBText(CMString sWindow, CHANNELINFO * wi) CMString CIrcProto::MakeWndID(const TCHAR* sWindow)
{
TCHAR buf[200];
- mir_sntprintf(buf, _T("%s - %s"), sWindow, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline"));
+ mir_sntprintf(buf, L"%s - %s", sWindow, (IsConnected()) ? m_info.sNetwork.c_str() : TranslateT("Offline"));
return CMString(buf);
}
@@ -613,22 +613,22 @@ void CIrcProto::FindLocalIP(HANDLE hConn) // inspiration from jabber void CIrcProto::DoUserhostWithReason(int type, CMString reason, bool bSendCommand, CMString userhostparams, ...)
{
TCHAR temp[4096];
- CMString S = _T("");
+ CMString S = L"";
switch (type) {
case 1:
- S = _T("USERHOST");
+ S = L"USERHOST";
break;
case 2:
- S = _T("WHO");
+ S = L"WHO";
break;
default:
- S = _T("USERHOST");
+ S = L"USERHOST";
break;
}
va_list ap;
va_start(ap, userhostparams);
- mir_vsntprintf(temp, _countof(temp), (S + _T(" ") + userhostparams).c_str(), ap);
+ mir_vsntprintf(temp, _countof(temp), (S + L" " + userhostparams).c_str(), ap);
va_end(ap);
// Add reason
@@ -644,7 +644,7 @@ void CIrcProto::DoUserhostWithReason(int type, CMString reason, bool bSendComman CMString CIrcProto::GetNextUserhostReason(int type)
{
- CMString reason = _T("");
+ CMString reason = L"";
switch (type) {
case 1:
if (!vUserhostReasons.getCount())
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index c3ed0b36bf..dd557e25d1 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -114,9 +114,9 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM DBVARIANT dbv;
if (!p->ppro->getTString(p->hContact, "Default", &dbv)) {
CMString S = _T(STR_ERROR);
- S += _T(" (");
+ S += L" (";
S += dbv.ptszVal;
- S += _T(")");
+ S += L")";
if ((mir_tstrlen(temp) < 4 && mir_tstrlen(temp)) || !WCCmp(CharLower(temp), CharLower(dbv.ptszVal))) {
MessageBox(NULL, TranslateTS(S.c_str()), TranslateT("IRC error"), MB_OK | MB_ICONERROR);
db_free(&dbv);
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 78417104da..e41020e7d1 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -111,14 +111,14 @@ void CWhoisDlg::OnGo(CCtrlButton*) {
TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
- m_proto->PostIrcMessage(_T("/WHOIS %s %s"), szTemp, szTemp);
+ m_proto->PostIrcMessage(L"/WHOIS %s %s", szTemp, szTemp);
}
void CWhoisDlg::OnQuery(CCtrlButton*)
{
TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
- m_proto->PostIrcMessage(_T("/QUERY %s"), szTemp);
+ m_proto->PostIrcMessage(L"/QUERY %s", szTemp);
}
void CWhoisDlg::OnPing(CCtrlButton*)
@@ -126,7 +126,7 @@ void CWhoisDlg::OnPing(CCtrlButton*) TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
m_Reply.SetText(TranslateT("Please wait..."));
- m_proto->PostIrcMessage(_T("/PRIVMSG %s \001PING %u\001"), szTemp, time(0));
+ m_proto->PostIrcMessage(L"/PRIVMSG %s \001PING %u\001", szTemp, time(0));
}
void CWhoisDlg::OnUserInfo(CCtrlButton*)
@@ -134,7 +134,7 @@ void CWhoisDlg::OnUserInfo(CCtrlButton*) TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
m_Reply.SetText(TranslateT("Please wait..."));
- m_proto->PostIrcMessage(_T("/PRIVMSG %s \001USERINFO\001"), szTemp);
+ m_proto->PostIrcMessage(L"/PRIVMSG %s \001USERINFO\001", szTemp);
}
void CWhoisDlg::OnTime(CCtrlButton*)
@@ -142,7 +142,7 @@ void CWhoisDlg::OnTime(CCtrlButton*) TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
m_Reply.SetText(TranslateT("Please wait..."));
- m_proto->PostIrcMessage(_T("/PRIVMSG %s \001TIME\001"), szTemp);
+ m_proto->PostIrcMessage(L"/PRIVMSG %s \001TIME\001", szTemp);
}
void CWhoisDlg::OnVersion(CCtrlButton*)
@@ -150,7 +150,7 @@ void CWhoisDlg::OnVersion(CCtrlButton*) TCHAR szTemp[255];
m_InfoNick.GetText(szTemp, _countof(szTemp));
m_Reply.SetText(TranslateT("Please wait..."));
- m_proto->PostIrcMessage(_T("/PRIVMSG %s \001VERSION\001"), szTemp);
+ m_proto->PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", szTemp);
}
void CWhoisDlg::ShowMessage(const CIrcMessage* pmsg)
@@ -163,12 +163,12 @@ void CWhoisDlg::ShowMessage(const CIrcMessage* pmsg) m_InfoName.SetText(pmsg->parameters[5].c_str());
m_InfoAddress.SetText(pmsg->parameters[3].c_str());
m_InfoId.SetText(pmsg->parameters[2].c_str());
- m_InfoChannels.SetText(_T(""));
- m_InfoServer.SetText(_T(""));
- m_InfoAway2.SetText(_T(""));
- m_InfoAuth.SetText(_T(""));
- m_InfoOther.SetText(_T(""));
- m_Reply.SetText(_T(""));
+ m_InfoChannels.SetText(L"");
+ m_InfoServer.SetText(L"");
+ m_InfoAway2.SetText(L"");
+ m_InfoAuth.SetText(L"");
+ m_InfoOther.SetText(L"");
+ m_Reply.SetText(L"");
SetWindowText(m_hwnd, TranslateT("User information"));
EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), true);
ShowWindow(m_hwnd, SW_SHOW);
@@ -183,14 +183,14 @@ void CWhoisDlg::ShowMessageNoUser(const CIrcMessage *pmsg) m_InfoNick.SetText(pmsg->parameters[2].c_str());
m_InfoNick.SendMsg(CB_SETEDITSEL, 0, MAKELPARAM(0, -1));
m_Caption.SetText(pmsg->parameters[2].c_str());
- m_InfoName.SetText(_T(""));
- m_InfoAddress.SetText(_T(""));
- m_InfoId.SetText(_T(""));
- m_InfoChannels.SetText(_T(""));
- m_InfoServer.SetText(_T(""));
- m_InfoAway2.SetText(_T(""));
- m_InfoAuth.SetText(_T(""));
- m_Reply.SetText(_T(""));
+ m_InfoName.SetText(L"");
+ m_InfoAddress.SetText(L"");
+ m_InfoId.SetText(L"");
+ m_InfoChannels.SetText(L"");
+ m_InfoServer.SetText(L"");
+ m_InfoAway2.SetText(L"");
+ m_InfoAuth.SetText(L"");
+ m_Reply.SetText(L"");
EnableWindow(GetDlgItem(m_hwnd, ID_INFO_QUERY), false);
}
@@ -230,7 +230,7 @@ void CNickDlg::OnOk(CCtrlButton*) {
TCHAR szTemp[255];
m_Enick.GetText(szTemp, _countof(szTemp));
- m_proto->PostIrcMessage(_T("/NICK %s"), szTemp);
+ m_proto->PostIrcMessage(L"/NICK %s", szTemp);
CMString S = szTemp;
DBVARIANT dbv;
@@ -238,7 +238,7 @@ void CNickDlg::OnOk(CCtrlButton*) for (int i = 0; i < 10; i++) {
CMString s = GetWord(dbv.ptszVal, i);
if (!s.IsEmpty() && s != szTemp)
- S += _T(" ") + s;
+ S += L" " + s;
}
db_free(&dbv);
}
@@ -279,7 +279,7 @@ void CListDlg::OnInitDialog() switch (index) {
case 0: mir_tstrcpy(szBuffer, TranslateT("Channel")); break;
- case 1: mir_tstrcpy(szBuffer, _T("#")); break;
+ case 1: mir_tstrcpy(szBuffer, L"#"); break;
case 2: mir_tstrcpy(szBuffer, TranslateT("Mode")); break;
case 3: mir_tstrcpy(szBuffer, TranslateT("Topic")); break;
}
@@ -470,7 +470,7 @@ void CListDlg::OnJoin(CCtrlButton*) m_list2.GetItemText(m_list2.GetSelectionMark(), 0, szTemp, 255);
else
m_list.GetItemText(m_list.GetSelectionMark(), 0, szTemp, 255);
- m_proto->PostIrcMessage(_T("/JOIN %s"), szTemp);
+ m_proto->PostIrcMessage(L"/JOIN %s", szTemp);
}
void CListDlg::UpdateList()
@@ -507,7 +507,7 @@ void CJoinDlg::OnInitDialog() for (int i = 0; i < 20; i++) {
if (!GetWord(dbv.ptszVal, i).IsEmpty()) {
CMString S = GetWord(dbv.ptszVal, i);
- S.Replace(_T("%newl"), _T(" "));
+ S.Replace(L"%newl", L" ");
SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)S.c_str());
}
}
@@ -526,12 +526,12 @@ void CJoinDlg::OnOk(CCtrlButton*) TCHAR szTemp[255];
GetDlgItemText(m_hwnd, IDC_ENICK, szTemp, _countof(szTemp));
if (m_proto->IsChannel(szTemp))
- m_proto->PostIrcMessage(_T("/JOIN %s"), szTemp);
+ m_proto->PostIrcMessage(L"/JOIN %s", szTemp);
else
- m_proto->PostIrcMessage(_T("/JOIN #%s"), szTemp);
+ m_proto->PostIrcMessage(L"/JOIN #%s", szTemp);
CMString S = szTemp;
- S.Replace(_T(" "), _T("%newl"));
+ S.Replace(L" ", L"%newl");
CMString SL = S;
DBVARIANT dbv;
@@ -539,7 +539,7 @@ void CJoinDlg::OnOk(CCtrlButton*) for (int i = 0; i < 20; i++) {
CMString W = GetWord(dbv.ptszVal, i);
if (!W.IsEmpty() && W != SL)
- S += _T(" ") + W;
+ S += L" " + W;
}
db_free(&dbv);
}
@@ -633,7 +633,7 @@ void CQuickDlg::OnOk(CCtrlButton*) TCHAR windowname[20];
GetWindowText(m_hwnd, windowname, _countof(windowname));
- if (mir_tstrcmpi(windowname, _T("Miranda IRC")) == 0) {
+ if (mir_tstrcmpi(windowname, L"Miranda IRC") == 0) {
m_proto->m_serverComboSelection = m_serverCombo.GetCurSel() - 1;
m_proto->setDword("ServerComboSelection", m_proto->m_serverComboSelection);
m_proto->setString("ServerName", m_proto->m_serverName);
@@ -734,7 +734,7 @@ void CQuestionDlg::OnOk(CCtrlButton*) TCHAR *m = new TCHAR[j + 2];
GetDlgItemText(m_hwnd, IDC_HIDDENEDIT, m, j + 1);
- TCHAR *text = _tcsstr(m, _T("%question"));
+ TCHAR *text = _tcsstr(m, L"%question");
TCHAR *p1 = text;
TCHAR *p2 = NULL;
if (p1) {
@@ -909,21 +909,21 @@ void CManagerDlg::OnClose() TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
- CMString S = _T("");
+ CMString S = L"";
TCHAR temp[1000];
for (int i = 0; i < 5; i++) {
if (m_topic.SendMsg(CB_GETLBTEXT, i, (LPARAM)temp) != LB_ERR) {
CMString S1 = temp;
/* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */
#if !defined(__GNUC__) || !defined(UNICODE)
- S1.Replace(_T(" "), _T("%¤"));
+ S1.Replace(L" ", L"%¤");
#endif
- S += _T(" ") + S1;
+ S += L" " + S1;
}
}
if (!S.IsEmpty() && m_proto->IsConnected()) {
- mir_sntprintf(temp, _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
+ mir_sntprintf(temp, L"Topic%s%s", window, m_proto->m_info.sNetwork.c_str());
char* p = mir_t2a(temp);
m_proto->setTString(p, S.c_str());
mir_free(p);
@@ -942,15 +942,15 @@ void CManagerDlg::OnAdd(CCtrlButton*) TCHAR temp[100];
TCHAR mode[3];
if (m_radio1.GetState()) {
- mir_tstrcpy(mode, _T("+b"));
+ mir_tstrcpy(mode, L"+b");
mir_tstrncpy(temp, TranslateT("Add ban"), 100);
}
if (m_radio2.GetState()) {
- mir_tstrcpy(mode, _T("+I"));
+ mir_tstrcpy(mode, L"+I");
mir_tstrncpy(temp, TranslateT("Add invite"), 100);
}
if (m_radio3.GetState()) {
- mir_tstrcpy(mode, _T("+e"));
+ mir_tstrcpy(mode, L"+e");
mir_tstrncpy(temp, TranslateT("Add exception"), 100);
}
@@ -967,7 +967,7 @@ void CManagerDlg::OnAdd(CCtrlButton*) TCHAR temp2[450];
TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
- mir_sntprintf(temp2, _T("/MODE %s %s %s"), window, mode, _T("%question"));
+ mir_sntprintf(temp2, L"/MODE %s %s %s", window, mode, L"%question");
SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2);
dlg->Activate();
}
@@ -984,15 +984,15 @@ void CManagerDlg::OnEdit(CCtrlButton*) TCHAR temp[100];
TCHAR mode[3];
if (m_radio1.GetState()) {
- mir_tstrcpy(mode, _T("b"));
+ mir_tstrcpy(mode, L"b");
mir_tstrncpy(temp, TranslateT("Edit ban"), 100);
}
if (m_radio2.GetState()) {
- mir_tstrcpy(mode, _T("I"));
+ mir_tstrcpy(mode, L"I");
mir_tstrncpy(temp, TranslateT("Edit invite?"), 100);
}
if (m_radio3.GetState()) {
- mir_tstrcpy(mode, _T("e"));
+ mir_tstrcpy(mode, L"e");
mir_tstrncpy(temp, TranslateT("Edit exception?"), 100);
}
@@ -1010,7 +1010,7 @@ void CManagerDlg::OnEdit(CCtrlButton*) TCHAR temp2[450];
TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
- mir_sntprintf(temp2, _T("/MODE %s -%s %s%s/MODE %s +%s %s"), window, mode, user.c_str(), _T("%newl"), window, mode, _T("%question"));
+ mir_sntprintf(temp2, L"/MODE %s -%s %s%s/MODE %s +%s %s", window, mode, user.c_str(), L"%newl", window, mode, L"%question");
SetDlgItemText(addban_hWnd, IDC_HIDDENEDIT, temp2);
dlg->Activate();
}
@@ -1030,22 +1030,22 @@ void CManagerDlg::OnRemove(CCtrlButton*) CMString user = GetWord(m, 0);
if (m_radio1.GetState()) {
- mir_tstrcpy(mode, _T("-b"));
+ mir_tstrcpy(mode, L"-b");
mir_tstrncpy(temp, TranslateT("Remove ban?"), 100);
}
if (m_radio2.GetState()) {
- mir_tstrcpy(mode, _T("-I"));
+ mir_tstrcpy(mode, L"-I");
mir_tstrncpy(temp, TranslateT("Remove invite?"), 100);
}
if (m_radio3.GetState()) {
- mir_tstrcpy(mode, _T("-e"));
+ mir_tstrcpy(mode, L"-e");
mir_tstrncpy(temp, TranslateT("Remove exception?"), 100);
}
TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
if (MessageBox(m_hwnd, user.c_str(), temp, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) == IDYES) {
- m_proto->PostIrcMessage(_T("/MODE %s %s %s"), window, mode, user.c_str());
+ m_proto->PostIrcMessage(L"/MODE %s %s %s", window, mode, user.c_str());
ApplyQuestion();
}
CloseQuestion();
@@ -1083,79 +1083,79 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (wi) {
TCHAR toadd[10]; *toadd = '\0';
TCHAR toremove[10]; *toremove = '\0';
- CMString appendixadd = _T("");
- CMString appendixremove = _T("");
+ CMString appendixadd = L"";
+ CMString appendixremove = L"";
if (wi->pszMode && _tcschr(wi->pszMode, 't')) {
if (!m_check1.GetState())
- mir_tstrcat(toremove, _T("t"));
+ mir_tstrcat(toremove, L"t");
}
else if (m_check1.GetState())
- mir_tstrcat(toadd, _T("t"));
+ mir_tstrcat(toadd, L"t");
if (wi->pszMode && _tcschr(wi->pszMode, 'n')) {
if (!m_check2.GetState())
- mir_tstrcat(toremove, _T("n"));
+ mir_tstrcat(toremove, L"n");
}
else if (m_check2.GetState())
- mir_tstrcat(toadd, _T("n"));
+ mir_tstrcat(toadd, L"n");
if (wi->pszMode && _tcschr(wi->pszMode, 'i')) {
if (!m_check3.GetState())
- mir_tstrcat(toremove, _T("i"));
+ mir_tstrcat(toremove, L"i");
}
else if (m_check3.GetState())
- mir_tstrcat(toadd, _T("i"));
+ mir_tstrcat(toadd, L"i");
if (wi->pszMode && _tcschr(wi->pszMode, 'm')) {
if (!m_check4.GetState())
- mir_tstrcat(toremove, _T("m"));
+ mir_tstrcat(toremove, L"m");
}
else if (m_check4.GetState())
- mir_tstrcat(toadd, _T("m"));
+ mir_tstrcat(toadd, L"m");
if (wi->pszMode && _tcschr(wi->pszMode, 'p')) {
if (!m_check7.GetState())
- mir_tstrcat(toremove, _T("p"));
+ mir_tstrcat(toremove, L"p");
}
else if (m_check7.GetState())
- mir_tstrcat(toadd, _T("p"));
+ mir_tstrcat(toadd, L"p");
if (wi->pszMode && _tcschr(wi->pszMode, 's')) {
if (!m_check8.GetState())
- mir_tstrcat(toremove, _T("s"));
+ mir_tstrcat(toremove, L"s");
}
else if (m_check8.GetState())
- mir_tstrcat(toadd, _T("s"));
+ mir_tstrcat(toadd, L"s");
if (wi->pszMode && _tcschr(wi->pszMode, 'c')) {
if (!m_check9.GetState())
- mir_tstrcat(toremove, _T("c"));
+ mir_tstrcat(toremove, L"c");
}
else if (m_check9.GetState())
- mir_tstrcat(toadd, _T("c"));
+ mir_tstrcat(toadd, L"c");
- CMString Key = _T("");
- CMString Limit = _T("");
+ CMString Key = L"";
+ CMString Limit = L"";
if (wi->pszMode && wi->pszPassword && _tcschr(wi->pszMode, 'k')) {
if (!m_check5.GetState()) {
- mir_tstrcat(toremove, _T("k"));
- appendixremove += _T(" ") + CMString(wi->pszPassword);
+ mir_tstrcat(toremove, L"k");
+ appendixremove += L" " + CMString(wi->pszPassword);
}
else if (GetWindowTextLength(m_key.GetHwnd())) {
TCHAR temp[400];
m_key.GetText(temp, 14);
if (Key != temp) {
- mir_tstrcat(toremove, _T("k"));
- mir_tstrcat(toadd, _T("k"));
- appendixadd += _T(" ") + CMString(temp);
- appendixremove += _T(" ") + CMString(wi->pszPassword);
+ mir_tstrcat(toremove, L"k");
+ mir_tstrcat(toadd, L"k");
+ appendixadd += L" " + CMString(temp);
+ appendixremove += L" " + CMString(wi->pszPassword);
}
}
}
else if (m_check5.GetState() && GetWindowTextLength(m_key.GetHwnd())) {
- mir_tstrcat(toadd, _T("k"));
- appendixadd += _T(" ");
+ mir_tstrcat(toadd, L"k");
+ appendixadd += L" ";
TCHAR temp[400];
m_key.GetText(temp, _countof(temp));
@@ -1164,19 +1164,19 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (_tcschr(wi->pszMode, 'l')) {
if (!m_check6.GetState())
- mir_tstrcat(toremove, _T("l"));
+ mir_tstrcat(toremove, L"l");
else if (GetWindowTextLength(GetDlgItem(m_hwnd, IDC_LIMIT))) {
TCHAR temp[15];
GetDlgItemText(m_hwnd, IDC_LIMIT, temp, _countof(temp));
if (wi->pszLimit && mir_tstrcmpi(wi->pszLimit, temp)) {
- mir_tstrcat(toadd, _T("l"));
- appendixadd += _T(" ") + CMString(temp);
+ mir_tstrcat(toadd, L"l");
+ appendixadd += L" " + CMString(temp);
}
}
}
else if (m_check6.GetState() && GetWindowTextLength(m_limit.GetHwnd())) {
- mir_tstrcat(toadd, _T("l"));
- appendixadd += _T(" ");
+ mir_tstrcat(toadd, L"l");
+ appendixadd += L" ";
TCHAR temp[15];
m_limit.GetText(temp, _countof(temp));
@@ -1185,13 +1185,13 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) if (mir_tstrlen(toadd) || mir_tstrlen(toremove)) {
TCHAR temp[500];
- mir_tstrcpy(temp, _T("/mode "));
+ mir_tstrcpy(temp, L"/mode ");
mir_tstrcat(temp, window);
- mir_tstrcat(temp, _T(" "));
+ mir_tstrcat(temp, L" ");
if (mir_tstrlen(toremove))
- mir_sntprintf(temp, _T("%s-%s"), temp, toremove);
+ mir_sntprintf(temp, L"%s-%s", temp, toremove);
if (mir_tstrlen(toadd))
- mir_sntprintf(temp, _T("%s+%s"), temp, toadd);
+ mir_sntprintf(temp, L"%s+%s", temp, toadd);
if (!appendixremove.IsEmpty())
mir_tstrcat(temp, appendixremove.c_str());
if (!appendixadd.IsEmpty())
@@ -1209,7 +1209,7 @@ void CManagerDlg::OnApplyTopic(CCtrlButton*) TCHAR window[256];
GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
m_topic.GetText(temp, _countof(temp));
- m_proto->PostIrcMessage(_T("/TOPIC %s %s"), window, temp);
+ m_proto->PostIrcMessage(L"/TOPIC %s %s", window, temp);
int i = m_topic.SendMsg(CB_FINDSTRINGEXACT, -1, (LPARAM)temp);
if (i != LB_ERR)
m_topic.SendMsg(CB_DELETESTRING, i, 0);
@@ -1246,11 +1246,11 @@ void CManagerDlg::ApplyQuestion() GetDlgItemText(m_hwnd, IDC_CAPTION, window, _countof(window));
TCHAR mode[3];
- mir_tstrcpy(mode, _T("+b"));
+ mir_tstrcpy(mode, L"+b");
if (m_radio2.GetState())
- mir_tstrcpy(mode, _T("+I"));
+ mir_tstrcpy(mode, L"+I");
if (m_radio3.GetState())
- mir_tstrcpy(mode, _T("+e"));
+ mir_tstrcpy(mode, L"+e");
m_list.ResetContent();
m_radio1.Disable();
m_radio2.Disable();
@@ -1258,7 +1258,7 @@ void CManagerDlg::ApplyQuestion() m_add.Disable();
m_edit.Disable();
m_remove.Disable();
- m_proto->PostIrcMessage(_T("%s %s %s"), _T("/MODE"), window, mode); //wrong overloaded operator if three args
+ m_proto->PostIrcMessage(L"%s %s %s", L"/MODE", window, mode); //wrong overloaded operator if three args
}
void CManagerDlg::CloseQuestion()
@@ -1278,7 +1278,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (wi) {
if (m_proto->IsConnected()) {
TCHAR temp[1000];
- mir_sntprintf(temp, _T("Topic%s%s"), window, m_proto->m_info.sNetwork.c_str());
+ mir_sntprintf(temp, L"Topic%s%s", window, m_proto->m_info.sNetwork.c_str());
char* p = mir_t2a(temp);
@@ -1289,7 +1289,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (!S.IsEmpty()) {
/* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */
#if !defined(__GNUC__) || !defined(UNICODE)
- S.Replace(_T("%¤"), _T(" "));
+ S.Replace(L"%¤", L" ");
#endif
m_topic.SendMsg(CB_ADDSTRING, 0, (LPARAM)S.c_str());
}
@@ -1364,7 +1364,7 @@ void CManagerDlg::InitManager(int mode, const TCHAR* window) if (strchr(m_proto->sChannelModes.c_str(), 'b')) {
m_radio1.SetState(true);
- m_proto->PostIrcMessage(_T("/MODE %s +b"), window);
+ m_proto->PostIrcMessage(L"/MODE %s +b", window);
}
}
diff --git a/protocols/IcqOscarJ/src/editlist.cpp b/protocols/IcqOscarJ/src/editlist.cpp index dfaebb4c85..df0840385a 100644 --- a/protocols/IcqOscarJ/src/editlist.cpp +++ b/protocols/IcqOscarJ/src/editlist.cpp @@ -79,7 +79,7 @@ void ChangeInfoData::BeginListEdit(int iItem, RECT *rc, int iSetting, WORD wVKey UpdateWindow(hwndList);
dataListEdit = this;
- hwndListEdit = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, _T("LISTBOX"), _T(""), WS_POPUP | WS_BORDER | WS_VSCROLL,
+ hwndListEdit = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, L"LISTBOX", L"", WS_POPUP | WS_BORDER | WS_VSCROLL,
rc->left, rc->bottom, rc->right - rc->left, 150, NULL, NULL, hInst, NULL);
SendMessage(hwndListEdit, WM_SETFONT, (WPARAM)hListFont, 0);
int itemHeight = SendMessage(hwndListEdit, LB_GETITEMHEIGHT, 0, 0);
diff --git a/protocols/IcqOscarJ/src/editstring.cpp b/protocols/IcqOscarJ/src/editstring.cpp index 1cd3a2f805..94b41836ee 100644 --- a/protocols/IcqOscarJ/src/editstring.cpp +++ b/protocols/IcqOscarJ/src/editstring.cpp @@ -257,7 +257,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey) }
dataStringEdit = this;
- hwndEdit = CreateWindow(_T("EDIT"), _T(""), WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ((si.displayType&LIM_TYPE) == LI_NUMBER ? ES_NUMBER : 0) | (si.displayType&LIF_PASSWORD ? ES_PASSWORD : 0), rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top, hwndList, NULL, hInst, NULL);
+ hwndEdit = CreateWindow(L"EDIT", L"", WS_VISIBLE | WS_CHILD | ES_AUTOHSCROLL | ((si.displayType&LIM_TYPE) == LI_NUMBER ? ES_NUMBER : 0) | (si.displayType&LIF_PASSWORD ? ES_PASSWORD : 0), rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top, hwndList, NULL, hInst, NULL);
SetWindowTextUtf(hwndEdit, szValue);
if (alloced) SAFE_FREE(&szValue);
mir_subclassWindow(hwndEdit, StringEditSubclassProc);
@@ -265,7 +265,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey) if ((si.displayType & LIM_TYPE) == LI_NUMBER) {
int *range = (int*)si.pList;
RECT rcUpDown;
- hwndUpDown = CreateWindow(UPDOWN_CLASS, _T(""), WS_VISIBLE | WS_CHILD | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_HOTTRACK | UDS_NOTHOUSANDS | UDS_SETBUDDYINT, 0, 0, 0, 0, hwndList, NULL, hInst, NULL);
+ hwndUpDown = CreateWindow(UPDOWN_CLASS, L"", WS_VISIBLE | WS_CHILD | UDS_AUTOBUDDY | UDS_ALIGNRIGHT | UDS_HOTTRACK | UDS_NOTHOUSANDS | UDS_SETBUDDYINT, 0, 0, 0, 0, hwndList, NULL, hInst, NULL);
SendMessage(hwndUpDown, UDM_SETRANGE32, range[0], range[1]);
SendMessage(hwndUpDown, UDM_SETPOS32, 0, sid.value);
if (!(si.displayType & LIF_ZEROISVALID) && sid.value == 0)
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp index f0f32a831b..da09e845dd 100644 --- a/protocols/IcqOscarJ/src/fam_04message.cpp +++ b/protocols/IcqOscarJ/src/fam_04message.cpp @@ -948,7 +948,7 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, size_t wLen, DWORD dwUin, c contacts[iContact] = (ICQSEARCHRESULT*)SAFE_MALLOC(sizeof(ICQSEARCHRESULT));
contacts[iContact]->hdr.cbSize = sizeof(ICQSEARCHRESULT);
contacts[iContact]->hdr.flags = PSR_TCHAR;
- contacts[iContact]->hdr.nick.t = null_strdup(_T(""));
+ contacts[iContact]->hdr.nick.t = null_strdup(L"");
contacts[iContact]->hdr.id.t = ansi_to_tchar(szUid);
if (IsStringUIN(szUid)) { // icq contact
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index c1d1b30564..130f8796c7 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -76,7 +76,7 @@ void CIcqProto::GetFullAvatarFileName(int dwUin, const char *szUid, int dwFormat void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, size_t cbLen)
{
TCHAR szPath[MAX_PATH * 2];
- mir_sntprintf(szPath, _T("%s\\%S\\"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(szPath, L"%s\\%S\\", VARST(L"%miranda_avatarcache%"), m_szModuleName);
FOLDERSGETDATA fgd = { sizeof(fgd) };
fgd.nMaxPathSize = _countof(szPath);
@@ -100,14 +100,14 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, else {
TCHAR szBuf[MAX_PATH];
if (CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)szBuf))
- mir_tstrcpy(pszDest + tPathLen, _T("avatar"));
+ mir_tstrcpy(pszDest + tPathLen, L"avatar");
else {
TCHAR *szLastDot = _tcsrchr(szBuf, '.');
if (szLastDot)
szLastDot[0] = '\0';
mir_tstrcpy(pszDest + tPathLen, szBuf);
- mir_tstrcat(pszDest + tPathLen, _T("_avt"));
+ mir_tstrcat(pszDest + tPathLen, L"_avt");
}
}
}
@@ -115,7 +115,7 @@ void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, void AddAvatarExt(int dwFormat, TCHAR *pszDest)
{
const TCHAR *ext = ProtoGetAvatarExtension(dwFormat);
- mir_tstrcat(pszDest, (*ext == 0) ? _T(".dat") : ext);
+ mir_tstrcat(pszDest, (*ext == 0) ? L".dat" : ext);
}
#define MD5_BLOCK_SIZE 1024*1024 /* use 1MB blocks */
@@ -1212,7 +1212,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen const TCHAR *ptszExt;
int dwPaFormat = ProtoGetBufferFormat(pBuffer, &ptszExt);
TCHAR tszImageFile[MAX_PATH];
- mir_sntprintf(tszImageFile, _T("%s%s"), pCookieData->szFile, ptszExt);
+ mir_sntprintf(tszImageFile, L"%s%s", pCookieData->szFile, ptszExt);
ppro->setByte(pCookieData->hContact, "AvatarType", (BYTE)dwPaFormat);
ai.format = dwPaFormat; // set the format
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 12c8b99307..12694a3763 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -386,7 +386,7 @@ int CIcqProto::Authorize(MEVENT hDbEvent) if (getContactUid(hContact, &uin, &uid))
return 1;
- icq_sendAuthResponseServ(uin, uid, 1, _T(""));
+ icq_sendAuthResponseServ(uin, uid, 1, L"");
delSetting(hContact, "Grant");
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 9a21a65877..3168d290ec 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -126,14 +126,14 @@ static HANDLE LoadXStatusIconLibrary(TCHAR *path, const TCHAR *sub) HANDLE hLib;
mir_tstrcpy(p, sub);
- mir_tstrcat(p, _T("\\xstatus_ICQ.dll"));
+ mir_tstrcat(p, L"\\xstatus_ICQ.dll");
if (hLib = LoadLibrary(path))
return hLib;
mir_tstrcpy(p, sub);
- mir_tstrcat(p, _T("\\xstatus_icons.dll"));
+ mir_tstrcat(p, L"\\xstatus_icons.dll");
if (hLib = LoadLibrary(path))
return hLib;
- mir_tstrcpy(p, _T("\\"));
+ mir_tstrcpy(p, L"\\");
return hLib;
}
@@ -145,9 +145,9 @@ static TCHAR* InitXStatusIconLibrary(TCHAR *buf, size_t buf_size) // get miranda's exe path
GetModuleFileName(NULL, path, MAX_PATH);
- hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, _T("\\Icons"));
+ hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, L"\\Icons");
if (!hXStatusIconsDLL) // TODO: add "Custom Folders" support
- hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, _T("\\Plugins"));
+ hXStatusIconsDLL = (HMODULE)LoadXStatusIconLibrary(path, L"\\Plugins");
if (hXStatusIconsDLL) {
null_strcpy(buf, path, buf_size - 1);
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 874b3ecab5..3c5f4e165a 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -109,8 +109,8 @@ static int OnModulesLoaded(WPARAM, LPARAM) HookEvent(ME_TTB_MODULELOADED, g_OnToolbarInit);
bSecureIM = ServiceExists("SecureIM/IsContactSecured") != 0;
- bMirOTR = GetModuleHandle(_T("mirotr.dll")) != NULL;
- bNewGPG = GetModuleHandle(_T("new_gpg.dll")) != NULL;
+ bMirOTR = GetModuleHandle(L"mirotr.dll") != NULL;
+ bNewGPG = GetModuleHandle(L"new_gpg.dll") != NULL;
#ifdef _WIN64
bPlatform = 1;
#else
@@ -128,14 +128,14 @@ static int OnModulesLoaded(WPARAM, LPARAM) fontid.cbSize = sizeof(fontid);
_tcsncpy_s(fontid.group, LPGENT("Jabber"), _TRUNCATE);
strncpy_s(fontid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE);
- _tcsncpy_s(fontid.backgroundGroup, _T("Jabber"), _TRUNCATE);
- _tcsncpy_s(fontid.backgroundName, _T("Background"), _TRUNCATE);
+ _tcsncpy_s(fontid.backgroundGroup, L"Jabber", _TRUNCATE);
+ _tcsncpy_s(fontid.backgroundName, L"Background", _TRUNCATE);
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.colour = GetSysColor(COLOR_WINDOWTEXT);
fontid.deffontsettings.size = -11;
- mir_tstrncpy(fontid.deffontsettings.szFace, _T("MS Shell Dlg"), _countof(fontid.deffontsettings.szFace));
+ mir_tstrncpy(fontid.deffontsettings.szFace, L"MS Shell Dlg", _countof(fontid.deffontsettings.szFace));
fontid.deffontsettings.style = 0;
_tcsncpy_s(fontid.name, LPGENT("Frame title"), _TRUNCATE);
@@ -150,10 +150,10 @@ static int OnModulesLoaded(WPARAM, LPARAM) ColourIDT colourid = {0};
colourid.cbSize = sizeof(colourid);
- _tcsncpy_s(colourid.group, _T("Jabber"), _TRUNCATE);
+ _tcsncpy_s(colourid.group, L"Jabber", _TRUNCATE);
strncpy_s(colourid.dbSettingsGroup, GLOBAL_SETTING_MODULE, _TRUNCATE);
- _tcsncpy_s(colourid.name, _T("Background"), _TRUNCATE);
+ _tcsncpy_s(colourid.name, L"Background", _TRUNCATE);
strncpy_s(colourid.setting, "clFrameBack", _TRUNCATE);
colourid.defcolour = GetSysColor(COLOR_WINDOW);
ColourRegisterT(&colourid);
@@ -188,14 +188,14 @@ extern "C" int __declspec(dllexport) Load() {
INT_PTR result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP);
if (FIP == NULL || result != S_OK) {
- MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Jabber Protocol will be disabled."), _T("Error"), MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
+ MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Jabber Protocol will be disabled."), L"Error", MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
return 1;
}
}
WORD v[4];
CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v);
- mir_sntprintf(szCoreVersion, _T("%d.%d.%d.%d"), v[0], v[1], v[2], v[3]);
+ mir_sntprintf(szCoreVersion, L"%d.%d.%d.%d", v[0], v[1], v[2], v[3]);
CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);
@@ -235,13 +235,13 @@ extern "C" int __declspec(dllexport) Unload(void) if (g_nTempFileId != 0) {
TCHAR tszTempPath[MAX_PATH], tszFilePath[MAX_PATH];
GetTempPath(_countof(tszTempPath), tszTempPath);
- mir_sntprintf(tszFilePath, _T("%sjab*.tmp.*"), tszTempPath);
+ mir_sntprintf(tszFilePath, L"%sjab*.tmp.*", tszTempPath);
WIN32_FIND_DATA findData;
HANDLE hFind = FindFirstFile(tszFilePath, &findData);
if (hFind != INVALID_HANDLE_VALUE) {
do {
- mir_sntprintf(tszFilePath, _T("%s%s"), tszTempPath, findData.cFileName);
+ mir_sntprintf(tszFilePath, L"%s%s", tszTempPath, findData.cFileName);
DeleteFile(tszFilePath);
} while (FindNextFile(hFind, &findData));
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 5186d2241e..045c72c092 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -109,25 +109,25 @@ void CJabberProto::OnIqResult_CommandExecution(HXML iqNode, CJabberIqInfo *pInfo void CJabberProto::AdHoc_RequestListOfCommands(TCHAR * szResponder, HWND hwndDlg)
{
m_ThreadInfo->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResult_ListOfCommands, JABBER_IQ_TYPE_GET, szResponder, 0, -1, hwndDlg))
- << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS));
+ << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(L"node", JABBER_FEAT_COMMANDS));
}
int CJabberProto::AdHoc_ExecuteCommand(HWND hwndDlg, TCHAR*, JabberAdHocData* dat)
{
for (int i = 1;; i++) {
- HXML itemNode = XmlGetNthChild(dat->CommandsNode, _T("item"), i);
+ HXML itemNode = XmlGetNthChild(dat->CommandsNode, L"item", i);
if (!itemNode)
break;
if (BST_UNCHECKED == IsDlgButtonChecked(GetDlgItem(hwndDlg, IDC_FRAME), i))
continue;
- const TCHAR *node = XmlGetAttrValue(itemNode, _T("node"));
+ const TCHAR *node = XmlGetAttrValue(itemNode, L"node");
if (node) {
- const TCHAR *jid2 = XmlGetAttrValue(itemNode, _T("jid"));
+ const TCHAR *jid2 = XmlGetAttrValue(itemNode, L"jid");
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, jid2, 0, -1, hwndDlg))
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), node) << XATTR(_T("action"), _T("execute")));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", node) << XATTR(L"action", L"execute"));
EnableDlgItem(hwndDlg, IDC_SUBMIT, FALSE);
SetDlgItemText(hwndDlg, IDC_SUBMIT, TranslateT("OK"));
@@ -142,8 +142,8 @@ int CJabberProto::AdHoc_ExecuteCommand(HWND hwndDlg, TCHAR*, JabberAdHocData* da int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, JabberAdHocData* dat)
{
int nodeIdx = 0;
- const TCHAR * type = XmlGetAttrValue(iqNode, _T("type"));
- if (!type || !mir_tstrcmp(type, _T("error"))) {
+ const TCHAR * type = XmlGetAttrValue(iqNode, L"type");
+ if (!type || !mir_tstrcmp(type, L"error")) {
// error occurred here
TCHAR buff[255];
const TCHAR *code = NULL;
@@ -151,13 +151,13 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe HXML errorNode = XmlGetChild(iqNode, "error");
if (errorNode) {
- code = XmlGetAttrValue(errorNode, _T("code"));
+ code = XmlGetAttrValue(errorNode, L"code");
description = XmlGetText(errorNode);
}
- mir_sntprintf(buff, TranslateT("Error %s %s"), (code) ? code : _T(""), (description) ? description : _T(""));
+ mir_sntprintf(buff, TranslateT("Error %s %s"), (code) ? code : L"", (description) ? description : L"");
JabberFormSetInstruction(hwndDlg, buff);
}
- else if (!mir_tstrcmp(type, _T("result"))) {
+ else if (!mir_tstrcmp(type, L"result")) {
BOOL validResponse = FALSE;
EnumChildWindows(GetDlgItem(hwndDlg, IDC_FRAME), sttDeleteChildWindowsProc, 0);
dat->CurrentHeight = 0;
@@ -165,8 +165,8 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe SetScrollPos(GetDlgItem(hwndDlg, IDC_VSCROLL), SB_CTL, 0, FALSE);
HXML queryNode = XmlGetChild(iqNode, "query");
if (queryNode) {
- const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
- const TCHAR *node = XmlGetAttrValue(queryNode, _T("node"));
+ const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns");
+ const TCHAR *node = XmlGetAttrValue(queryNode, L"node");
if (xmlns && node && !mir_tstrcmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !mir_tstrcmp(node, JABBER_FEAT_COMMANDS))
validResponse = TRUE;
}
@@ -175,12 +175,12 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe int ypos = 20;
for (nodeIdx = 1;; nodeIdx++) {
- HXML itemNode = XmlGetNthChild(queryNode, _T("item"), nodeIdx);
+ HXML itemNode = XmlGetNthChild(queryNode, L"item", nodeIdx);
if (!itemNode)
break;
- const TCHAR *name = XmlGetAttrValue(itemNode, _T("name"));
- if (!name) name = XmlGetAttrValue(itemNode, _T("node"));
+ const TCHAR *name = XmlGetAttrValue(itemNode, L"name");
+ if (!name) name = XmlGetAttrValue(itemNode, L"node");
ypos = AdHoc_AddCommandRadio(GetDlgItem(hwndDlg, IDC_FRAME), TranslateTS(name), nodeIdx, ypos, (nodeIdx == 1) ? 1 : 0);
dat->CurrentHeight = ypos;
}
@@ -212,16 +212,16 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA dat->AdHocNode = xmlCopyNode(workNode);
const TCHAR *type;
- if ((type = XmlGetAttrValue(workNode, _T("type"))) == NULL) return TRUE;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if ((type = XmlGetAttrValue(workNode, L"type")) == NULL) return TRUE;
+ if (!mir_tstrcmp(type, L"result")) {
// wParam = <iq/> node from responder as a result of command execution
HXML commandNode, xNode;
- if ((commandNode = XmlGetChild(dat->AdHocNode, _T("command"))) == NULL)
+ if ((commandNode = XmlGetChild(dat->AdHocNode, L"command")) == NULL)
return TRUE;
- const TCHAR *status = XmlGetAttrValue(commandNode, _T("status"));
+ const TCHAR *status = XmlGetAttrValue(commandNode, L"status");
if (!status)
- status = _T("completed");
+ status = L"completed";
if ((xNode = XmlGetChild(commandNode, "x"))) {
// use jabber:x:data form
@@ -264,12 +264,12 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA EnableDlgItem(hwndDlg, IDC_SUBMIT, TRUE);
}
- if (!status || mir_tstrcmp(status, _T("executing"))) {
+ if (!status || mir_tstrcmp(status, L"executing")) {
ShowDlgItem(hwndDlg, IDC_SUBMIT, SW_HIDE);
SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Done"));
}
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
// error occurred here
int toHide[] = { IDC_FRAME, IDC_FRAME_TEXT, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_SUBMIT, 0};
sttShowControls(hwndDlg, FALSE, toHide);
@@ -279,10 +279,10 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA TCHAR buff[255];
HXML errorNode = XmlGetChild(workNode , "error");
if (errorNode) {
- code = XmlGetAttrValue(errorNode, _T("code"));
+ code = XmlGetAttrValue(errorNode, L"code");
description = XmlGetText(errorNode);
}
- mir_sntprintf(buff, TranslateT("Error %s %s"), code ? code : _T(""), description ? description : _T(""));
+ mir_sntprintf(buff, TranslateT("Error %s %s"), code ? code : L"", description ? description : L"");
JabberFormSetInstruction(hwndDlg,buff);
}
JabberAdHoc_RefreshFrameScroll(hwndDlg, dat);
@@ -295,20 +295,20 @@ int CJabberProto::AdHoc_SubmitCommandForm(HWND hwndDlg, JabberAdHocData* dat, TC HXML xNode = XmlGetChild(commandNode, "x");
HXML dataNode = JabberFormGetData(GetDlgItem(hwndDlg, IDC_FRAME), xNode);
- LPCTSTR jid2 = XmlGetAttrValue(dat->AdHocNode, _T("from"));
+ LPCTSTR jid2 = XmlGetAttrValue(dat->AdHocNode, L"from");
XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, jid2, 0, -1, hwndDlg));
- HXML command = iq << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS);
+ HXML command = iq << XCHILDNS(L"command", JABBER_FEAT_COMMANDS);
- const TCHAR *sessionId = XmlGetAttrValue(commandNode, _T("sessionid"));
+ const TCHAR *sessionId = XmlGetAttrValue(commandNode, L"sessionid");
if (sessionId)
- command << XATTR(_T("sessionid"), sessionId);
+ command << XATTR(L"sessionid", sessionId);
- const TCHAR *node = XmlGetAttrValue(commandNode, _T("node"));
+ const TCHAR *node = XmlGetAttrValue(commandNode, L"node");
if (node)
- command << XATTR(_T("node"), node);
+ command << XATTR(L"node", node);
if (action)
- command << XATTR(_T("action"), action);
+ command << XATTR(L"action", action);
XmlAddChild(command, dataNode);
m_ThreadInfo->send(iq);
@@ -339,7 +339,7 @@ int CJabberProto::AdHoc_AddCommandRadio(HWND hFrame, TCHAR * labelStr, int id, i ctrlWidth = min(ctrlWidth, strRect.right - strRect.left + 20);
ReleaseDC(hFrame, hdc);
- HWND hCtrl = CreateWindowEx(0, _T("button"), labelStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, ctrlOffset, ypos, ctrlWidth, labelHeight, hFrame, (HMENU)id, hInst, NULL);
+ HWND hCtrl = CreateWindowEx(0, L"button", labelStr, WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTORADIOBUTTON, ctrlOffset, ypos, ctrlWidth, labelHeight, hFrame, (HMENU)id, hInst, NULL);
SendMessage(hCtrl, WM_SETFONT, (WPARAM)SendMessage(GetParent(hFrame), WM_GETFONT, 0, 0), 0);
SendMessage(hCtrl, BM_SETCHECK, value, 0);
return (ypos + labelHeight + verticalStep);
@@ -391,8 +391,8 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA else {
dat->proto->m_ThreadInfo->send(
XmlNodeIq(dat->proto->AddIQ(&CJabberProto::OnIqResult_CommandExecution, JABBER_IQ_TYPE_SET, pStartupParams->m_szJid, 0, -1, hwndDlg))
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS)
- << XATTR(_T("node"), pStartupParams->m_szNode) << XATTR(_T("action"), _T("execute")));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS)
+ << XATTR(L"node", pStartupParams->m_szNode) << XATTR(L"action", L"execute"));
EnableDlgItem(hwndDlg, IDC_SUBMIT, FALSE);
SetDlgItemText(hwndDlg, IDC_SUBMIT, TranslateT("OK"));
@@ -416,11 +416,11 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_PREV:
- return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("prev"));
+ return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"prev");
case IDC_NEXT:
- return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("next"));
+ return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"next");
case IDC_COMPLETE:
- return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, _T("complete"));
+ return dat->proto->AdHoc_SubmitCommandForm(hwndDlg, dat, L"complete");
case IDC_SUBMIT:
if (!dat->AdHocNode && dat->CommandsNode && LOWORD(wParam) == IDC_SUBMIT)
return dat->proto->AdHoc_ExecuteCommand(hwndDlg, dat->ResponderJID, dat);
@@ -527,7 +527,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) HMENU hMenu = CreatePopupMenu();
for (int i = 0; i < item->arResources.getCount(); i++)
AppendMenu(hMenu, MF_STRING, i + 1, item->arResources[i]->m_tszResourceName);
- HWND hwndTemp = CreateWindowEx(WS_EX_TOOLWINDOW, _T("button"), _T("PopupMenuHost"), 0, 0, 0, 10, 10, NULL, NULL, hInst, NULL);
+ HWND hwndTemp = CreateWindowEx(WS_EX_TOOLWINDOW, L"button", L"PopupMenuHost", 0, 0, 0, 10, 10, NULL, NULL, hInst, NULL);
SetForegroundWindow(hwndTemp);
RECT rc;
POINT pt;
@@ -541,7 +541,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) if (selected > 0) {
JABBER_RESOURCE_STATUS *r = item->arResources[selected - 1];
if (r) {
- mir_tstrncat(jid, _T("/"), _countof(jid) - mir_tstrlen(jid));
+ mir_tstrncat(jid, L"/", _countof(jid) - mir_tstrlen(jid));
mir_tstrncat(jid, r->m_tszResourceName, _countof(jid) - mir_tstrlen(jid));
}
selected = 1;
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp index 43b4ff0c60..f7c2b64a45 100644 --- a/protocols/JabberG/src/jabber_agent.cpp +++ b/protocols/JabberG/src/jabber_agent.cpp @@ -169,13 +169,13 @@ public: break;
if (XmlGetName(n)) {
- if (!mir_tstrcmp(XmlGetName(n), _T("instructions"))) {
+ if (!mir_tstrcmp(XmlGetName(n), L"instructions")) {
JabberFormSetInstruction(m_hwnd, XmlGetText(n));
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("key")) || !mir_tstrcmp(XmlGetName(n), _T("registered"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"key") || !mir_tstrcmp(XmlGetName(n), L"registered")) {
// do nothing
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("password")))
+ else if (!mir_tstrcmp(XmlGetName(n), L"password"))
JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_PRIVATE, XmlGetName(n), XmlGetText(n));
else // everything else is a normal text field
JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_SINGLE, XmlGetName(n), XmlGetText(n));
@@ -229,7 +229,7 @@ public: const TCHAR *from;
if (m_agentRegIqNode == NULL) return;
- if ((from = XmlGetAttrValue(m_agentRegIqNode, _T("from"))) == NULL) return;
+ if ((from = XmlGetAttrValue(m_agentRegIqNode, L"from")) == NULL) return;
if ((queryNode = XmlGetChild(m_agentRegIqNode , "query")) == NULL) return;
HWND hFrame = GetDlgItem(m_hwnd, IDC_FRAME);
@@ -253,14 +253,14 @@ public: break;
if (XmlGetName(n)) {
- if (!mir_tstrcmp(XmlGetName(n), _T("key"))) {
+ if (!mir_tstrcmp(XmlGetName(n), L"key")) {
// field that must be passed along with the registration
if (XmlGetText(n))
XmlAddChild(query, XmlGetName(n), XmlGetText(n));
else
XmlAddChild(query, XmlGetName(n));
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("registered")) || !mir_tstrcmp(XmlGetName(n), _T("instructions"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"registered") || !mir_tstrcmp(XmlGetName(n), L"instructions")) {
// do nothing, we will skip these
}
else {
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index 4c4b93c27c..97850e9336 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -240,7 +240,7 @@ int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription) LPTSTR szExt = mir_tstrdup(szFeature);
LPTSTR pSrc, pDst;
for (pSrc = szExt, pDst = szExt; *pSrc; pSrc++)
- if (_tcschr(_T("bcdfghjklmnpqrstvwxz0123456789"), *pSrc))
+ if (_tcschr(L"bcdfghjklmnpqrstvwxz0123456789", *pSrc))
*pDst++ = *pSrc;
*pDst = 0;
m_clientCapsManager.SetClientCaps(JABBER_CAPS_MIRANDA_NODE, szExt, jcb);
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index e532302a42..5d9d101ee6 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -33,8 +33,8 @@ bool operator==(const DBEVENTINFO &ev1, const DBEVENTINFO &ev2) void CJabberProto::EnableArchive(bool bEnable)
{
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext())
- << XCHILDNS(_T("auto"), JABBER_FEAT_ARCHIVE) << XATTR(_T("save"), (bEnable) ? _T("true") : _T("false")));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext())
+ << XCHILDNS(L"auto", JABBER_FEAT_ARCHIVE) << XATTR(L"save", (bEnable) ? L"true" : L"false"));
}
void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem)
@@ -45,38 +45,38 @@ void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *p pItem->bHistoryRead = true;
XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultGetCollectionList, JABBER_IQ_TYPE_GET));
- HXML list = iq << XCHILDNS(_T("list"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), pItem->jid);
+ HXML list = iq << XCHILDNS(L"list", JABBER_FEAT_ARCHIVE) << XATTR(L"with", pItem->jid);
time_t tmLast = getDword(hContact, "LastCollection", 0);
if (tmLast) {
TCHAR buf[40];
- list << XATTR(_T("start"), time2str(tmLast, buf, _countof(buf)));
+ list << XATTR(L"start", time2str(tmLast, buf, _countof(buf)));
}
m_ThreadInfo->send(iq);
}
void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*)
{
- const TCHAR *to = XmlGetAttrValue(iqNode, _T("to"));
- if (to == NULL || mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ const TCHAR *to = XmlGetAttrValue(iqNode, L"to");
+ if (to == NULL || mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result"))
return;
HXML list = XmlGetChild(iqNode, "list");
- if (!list || mir_tstrcmp(XmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE))
+ if (!list || mir_tstrcmp(XmlGetAttrValue(list, L"xmlns"), JABBER_FEAT_ARCHIVE))
return;
for (int nodeIdx = 1;; nodeIdx++) {
- HXML itemNode = XmlGetNthChild(list, _T("chat"), nodeIdx);
+ HXML itemNode = XmlGetNthChild(list, L"chat", nodeIdx);
if (!itemNode)
break;
- const TCHAR* start = XmlGetAttrValue(itemNode, _T("start"));
- const TCHAR* with = XmlGetAttrValue(itemNode, _T("with"));
+ const TCHAR* start = XmlGetAttrValue(itemNode, L"start");
+ const TCHAR* with = XmlGetAttrValue(itemNode, L"with");
if (!start || !with)
continue;
m_ThreadInfo->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetCollection, JABBER_IQ_TYPE_GET))
- << XCHILDNS(_T("retrieve"), JABBER_FEAT_ARCHIVE) << XATTR(_T("with"), with) << XATTR(_T("start"), start));
+ << XCHILDNS(L"retrieve", JABBER_FEAT_ARCHIVE) << XATTR(L"with", with) << XATTR(L"start", start));
}
}
@@ -221,15 +221,15 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*)
{
- if (mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if (mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result"))
return;
HXML chatNode = XmlGetChild(iqNode, "chat");
- if (!chatNode || mir_tstrcmp(XmlGetAttrValue(chatNode, _T("xmlns")), JABBER_FEAT_ARCHIVE))
+ if (!chatNode || mir_tstrcmp(XmlGetAttrValue(chatNode, L"xmlns"), JABBER_FEAT_ARCHIVE))
return;
- const TCHAR* start = XmlGetAttrValue(chatNode, _T("start"));
- const TCHAR* with = XmlGetAttrValue(chatNode, _T("with"));
+ const TCHAR* start = XmlGetAttrValue(chatNode, L"start");
+ const TCHAR* with = XmlGetAttrValue(chatNode, L"with");
if (!start || !with)
return;
@@ -249,9 +249,9 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) int from;
const TCHAR *itemName = XmlGetName(itemNode);
- if (!mir_tstrcmp(itemName, _T("to")))
+ if (!mir_tstrcmp(itemName, L"to"))
from = DBEF_SENT;
- else if (!mir_tstrcmp(itemName, _T("from")))
+ else if (!mir_tstrcmp(itemName, L"from"))
from = 0;
else
continue;
@@ -261,7 +261,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) continue;
const TCHAR *tszBody = XmlGetText(body);
- const TCHAR *tszSecs = XmlGetAttrValue(itemNode, _T("secs"));
+ const TCHAR *tszSecs = XmlGetAttrValue(itemNode, L"secs");
if (!tszBody || !tszSecs)
continue;
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 2106a4b2c7..362e300e89 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -47,7 +47,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM param->ppro->m_hwndJabberAddBookmark = hwndDlg;
TranslateDialogDefault(hwndDlg);
if (item = param->m_item) {
- if (!mir_tstrcmp(item->type, _T("conference"))) {
+ if (!mir_tstrcmp(item->type, L"conference")) {
if (!_tcschr(item->jid, _T('@'))) { //no room name - consider it is transport
CheckDlgButton(hwndDlg, IDC_AGENT_RADIO, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE);
@@ -118,9 +118,9 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM item = param->ppro->ListAdd(LIST_BOOKMARK, roomJID);
if (IsDlgButtonChecked(hwndDlg, IDC_URL_RADIO) == BST_CHECKED)
- replaceStrT(item->type, _T("url"));
+ replaceStrT(item->type, L"url");
else
- replaceStrT(item->type, _T("conference"));
+ replaceStrT(item->type, L"conference");
GetDlgItemText(hwndDlg, IDC_NICK, text, _countof(text));
replaceStrT(item->nick, text);
@@ -265,7 +265,7 @@ void CJabberDlgBookmarks::UpdateData() m_proto->m_ThreadInfo->send(
XmlNodeIq( m_proto->AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET))
- << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(_T("storage"), _T("storage:bookmarks")));
+ << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks"));
}
void CJabberDlgBookmarks::OnInitDialog()
@@ -329,7 +329,7 @@ void CJabberDlgBookmarks::OpenBookmark() JABBER_LIST_ITEM *item = m_proto->ListGetItemPtr(LIST_BOOKMARK, address);
if (item == NULL) return;
- if (!mir_tstrcmpi(item->type, _T("conference"))) {
+ if (!mir_tstrcmpi(item->type, L"conference")) {
m_lvBookmarks.SetItemState(iItem, 0, LVIS_SELECTED); // Unselect the item
/* some hack for using bookmark to transport not under XEP-0048 */
@@ -391,7 +391,7 @@ void CJabberDlgBookmarks::OnProtoRefresh(WPARAM, LPARAM) LISTFOREACH(i, m_proto, LIST_BOOKMARK)
{
if (item = m_proto->ListGetItemPtrFromIndex(i)) {
- int itemType = mir_tstrcmpi(item->type, _T("conference")) ? 1 : 0;
+ int itemType = mir_tstrcmpi(item->type, L"conference") ? 1 : 0;
int iItem = m_lvBookmarks.AddItem(item->name, itemType, (LPARAM)item->jid, itemType);
m_lvBookmarks.SetItem(iItem, 1, item->jid);
if (itemType == 0)
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 02c7e6b611..8059f3a1bd 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -60,13 +60,13 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
HXML queryNode = XmlGetChild(iqNode , "query");
if (queryNode) {
- const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, L"xmlns");
if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = XmlGetChild(queryNode , "streamhost");
if (streamHostNode) {
- const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid"));
- const TCHAR *streamHost = XmlGetAttrValue(streamHostNode, _T("host"));
- const TCHAR *streamPort = XmlGetAttrValue(streamHostNode, _T("port"));
+ const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, L"jid");
+ const TCHAR *streamHost = XmlGetAttrValue(streamHostNode, L"host");
+ const TCHAR *streamPort = XmlGetAttrValue(streamHostNode, L"port");
if (streamJid && streamHost && streamPort) {
jbt->szProxyHost = mir_tstrdup(streamHost);
jbt->szProxyJid = mir_tstrdup(streamJid);
@@ -94,7 +94,7 @@ void JabberByteSendConnection(HANDLE hConn, DWORD /*dwRemoteIP*/, void* extra) NETLIBCONNINFO connInfo = { sizeof(connInfo) };
CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConn, (LPARAM)&connInfo);
- mir_sntprintf(szPort, _T("%u"), connInfo.wPort);
+ mir_sntprintf(szPort, L"%u", connInfo.wPort);
ppro->debugLogA("bytestream_send_connection incoming connection accepted: %s", connInfo.szIpPort);
if ((item = ppro->ListGetItemPtr(LIST_BYTE, szPort)) == NULL) {
@@ -187,7 +187,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) nIqId = pInfo->GetIqId();
{
XmlNodeIq iq(pInfo);
- HXML query = iq << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(_T("sid"), jbt->sid);
+ HXML query = iq << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(L"sid", jbt->sid);
if (bDirect) {
ptrA localAddr;
@@ -209,24 +209,24 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) if (localAddr == NULL)
localAddr = (char*)CallService(MS_NETLIB_ADDRESSTOSTRING, 1, nlb.dwExternalIP);
- mir_sntprintf(szPort, _T("%d"), nlb.wPort);
+ mir_sntprintf(szPort, L"%d", nlb.wPort);
JABBER_LIST_ITEM *item = ListAdd(LIST_BYTE, szPort);
item->jbt = jbt;
hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
jbt->hEvent = hEvent;
jbt->hSendEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(localAddr)) << XATTRI(_T("port"), nlb.wPort);
+ query << XCHILD(L"streamhost") << XATTR(L"jid", m_ThreadInfo->fullJID) << XATTR(L"host", _A2T(localAddr)) << XATTRI(L"port", nlb.wPort);
NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0);
for (unsigned i=0; i < ihaddr->cbNum; i++)
if (mir_strcmp(localAddr, ihaddr->szIp[i]))
- query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(ihaddr->szIp[i])) << XATTRI(_T("port"), nlb.wPort);
+ query << XCHILD(L"streamhost") << XATTR(L"jid", m_ThreadInfo->fullJID) << XATTR(L"host", _A2T(ihaddr->szIp[i])) << XATTRI(L"port", nlb.wPort);
mir_free(ihaddr);
}
if (jbt->bProxyDiscovered)
- query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), jbt->szProxyJid) << XATTR(_T("host"), jbt->szProxyHost) << XATTR(_T("port"), jbt->szProxyPort);
+ query << XCHILD(L"streamhost") << XATTR(L"jid", jbt->szProxyJid) << XATTR(L"host", jbt->szProxyHost) << XATTR(L"port", jbt->szProxyPort);
jbt->hProxyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
jbt->szStreamhostUsed = NULL;
@@ -299,11 +299,11 @@ void CJabberProto::ByteInitiateResult(HXML iqNode, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
HXML queryNode = XmlGetChild(iqNode , "query");
if (queryNode) {
- const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *queryXmlns = XmlGetAttrValue(queryNode, L"xmlns");
if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = XmlGetChild(queryNode , "streamhost-used");
if (streamHostNode) {
- const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, _T("jid"));
+ const TCHAR *streamJid = XmlGetAttrValue(streamHostNode, L"jid");
if (streamJid)
jbt->szStreamhostUsed = mir_tstrdup(streamJid);
} } } }
@@ -364,7 +364,7 @@ int CJabberProto::ByteSendParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char* b TCHAR *szInitiatorJid = JabberPrepareJid(jbt->srcJID);
TCHAR *szTargetJid = JabberPrepareJid(jbt->dstJID);
- mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid);
+ mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid);
mir_free(szInitiatorJid);
mir_free(szTargetJid);
@@ -407,13 +407,13 @@ void CJabberProto::IqResultStreamActivate(HXML iqNode, CJabberIqInfo*) int id = JabberGetPacketID(iqNode);
TCHAR listJid[JABBER_MAX_JID_LEN];
- mir_sntprintf(listJid, _T("ftproxy_%d"), id);
+ mir_sntprintf(listJid, L"ftproxy_%d", id);
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_FTIQID, listJid);
if (item == NULL)
return;
- if (!mir_tstrcmp(XmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if (!mir_tstrcmp(XmlGetAttrValue(iqNode, L"type"), L"result"))
item->jbt->bStreamActivated = TRUE;
if (item->jbt->hProxyEvent)
@@ -433,9 +433,9 @@ void CJabberProto::ByteSendViaProxy(JABBER_BYTE_TRANSFER *jbt) if (jbt == NULL) return;
if ((buffer=(char*)mir_alloc(JABBER_NETWORK_BUFFER_SIZE)) == NULL) {
- m_ThreadInfo->send( XmlNodeIq(_T("error"), jbt->iqId, jbt->srcJID)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 406) << XATTR(_T("type"), _T("auth"))
- << XCHILDNS(_T("not-acceptable"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ m_ThreadInfo->send( XmlNodeIq(L"error", jbt->iqId, jbt->srcJID)
+ << XCHILD(L"error") << XATTRI(L"code", 406) << XATTR(L"type", L"auth")
+ << XCHILDNS(L"not-acceptable", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return;
}
@@ -482,9 +482,9 @@ void CJabberProto::ByteSendViaProxy(JABBER_BYTE_TRANSFER *jbt) (this->*jbt->pfnFinal)((jbt->state == JBT_DONE) ? TRUE : FALSE, jbt->ft);
jbt->ft = NULL;
if (!validStreamhost)
- m_ThreadInfo->send( XmlNodeIq(_T("error"), jbt->iqId, jbt->srcJID)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ m_ThreadInfo->send( XmlNodeIq(L"error", jbt->iqId, jbt->srcJID)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
}
int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char* buffer, int datalen)
@@ -513,7 +513,7 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch TCHAR *szInitiatorJid = JabberPrepareJid(jbt->srcJID);
TCHAR *szTargetJid = JabberPrepareJid(jbt->dstJID);
- mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid);
+ mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid);
mir_free(szInitiatorJid);
mir_free(szTargetJid);
@@ -556,14 +556,14 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch int iqId = SerialNext();
TCHAR listJid[256];
- mir_sntprintf(listJid, _T("ftproxy_%d"), iqId);
+ mir_sntprintf(listJid, L"ftproxy_%d", iqId);
JABBER_LIST_ITEM *item = ListAdd(LIST_FTIQID, listJid);
item->jbt = jbt;
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::IqResultStreamActivate, JABBER_IQ_TYPE_SET, jbt->streamhostJID, 0, iqId))
- << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(_T("sid"), jbt->sid) << XCHILD(_T("activate"), jbt->dstJID));
+ << XQUERY(JABBER_FEAT_BYTESTREAMS) << XATTR(L"sid", jbt->sid) << XCHILD(L"activate", jbt->dstJID));
WaitForSingleObject(jbt->hProxyEvent, INFINITE);
@@ -602,13 +602,13 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) jbt->state = JBT_INIT;
if (iqNode = jbt->iqNode) {
- from = XmlGetAttrValue(iqNode, _T("from"));
- to = XmlGetAttrValue(iqNode, _T("to"));
- szId = XmlGetAttrValue(iqNode, _T("id"));
+ from = XmlGetAttrValue(iqNode, L"from");
+ to = XmlGetAttrValue(iqNode, L"to");
+ szId = XmlGetAttrValue(iqNode, L"id");
queryNode = XmlGetChild(iqNode, "query");
if (queryNode)
- sid = XmlGetAttrValue(queryNode, _T("sid"));
+ sid = XmlGetAttrValue(queryNode, L"sid");
}
if (szId && from && to && sid && (n = XmlGetChild(queryNode, "streamhost")) != NULL) {
@@ -618,15 +618,15 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) jbt->sid = mir_tstrdup(sid);
if ((buffer = (char*)mir_alloc(JABBER_NETWORK_BUFFER_SIZE))) {
- for (i = 1; (n = XmlGetNthChild(queryNode, _T("streamhost"), i)) != NULL; i++) {
- if ((szHost = XmlGetAttrValue(n, _T("host"))) != NULL &&
- (szPort = XmlGetAttrValue(n, _T("port"))) != NULL &&
- (str = XmlGetAttrValue(n, _T("jid"))) != NULL) {
+ for (i = 1; (n = XmlGetNthChild(queryNode, L"streamhost", i)) != NULL; i++) {
+ if ((szHost = XmlGetAttrValue(n, L"host")) != NULL &&
+ (szPort = XmlGetAttrValue(n, L"port")) != NULL &&
+ (str = XmlGetAttrValue(n, L"jid")) != NULL) {
port = (WORD)_ttoi(szPort);
replaceStrT(jbt->streamhostJID, str);
- debugLog(_T("bytestream_recv connecting to %s:%d"), szHost, port);
+ debugLog(L"bytestream_recv connecting to %s:%d", szHost, port);
NETLIBOPENCONNECTION nloc = { 0 };
nloc.cbSize = sizeof(nloc);
nloc.szHost = mir_t2a(szHost);
@@ -674,9 +674,9 @@ void __cdecl CJabberProto::ByteReceiveThread(JABBER_BYTE_TRANSFER *jbt) if (!validStreamhost && szId && from) {
debugLogA("bytestream_recv_connection session not completed");
- m_ThreadInfo->send(XmlNodeIq(_T("error"), szId, from)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ m_ThreadInfo->send(XmlNodeIq(L"error", szId, from)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
}
delete jbt;
@@ -709,7 +709,7 @@ int CJabberProto::ByteReceiveParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char {
ptrT szInitiatorJid(JabberPrepareJid(jbt->srcJID));
ptrT szTargetJid(JabberPrepareJid(jbt->dstJID));
- mir_sntprintf(text, _T("%s%s%s"), jbt->sid, szInitiatorJid, szTargetJid);
+ mir_sntprintf(text, L"%s%s%s", jbt->sid, szInitiatorJid, szTargetJid);
}
T2Utf szAuthString(text);
@@ -746,8 +746,8 @@ int CJabberProto::ByteReceiveParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char jbt->state = JBT_RECVING;
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), jbt->iqId, jbt->srcJID) << XQUERY(JABBER_FEAT_BYTESTREAMS)
- << XCHILD(_T("streamhost-used")) << XATTR(_T("jid"), jbt->streamhostJID));
+ XmlNodeIq(L"result", jbt->iqId, jbt->srcJID) << XQUERY(JABBER_FEAT_BYTESTREAMS)
+ << XCHILD(L"streamhost-used") << XATTR(L"jid", jbt->streamhostJID));
}
else jbt->state = JBT_SOCKSERR;
break;
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 602b47f7a7..eb859e524b 100644 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -109,22 +109,22 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query) {
// XEP-0232 support
HXML xform;
- for (int i = 1; (xform = XmlGetNthChild(query, _T("x"), i)) != NULL; i++) {
- TCHAR *szFormTypeValue = XPath(xform, _T("field[@var='FORM_TYPE']/value"));
- if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
- TCHAR *szTmp = XPath(xform, _T("field[@var='os']/value"));
+ for (int i = 1; (xform = XmlGetNthChild(query, L"x", i)) != NULL; i++) {
+ TCHAR *szFormTypeValue = XPath(xform, L"field[@var='FORM_TYPE']/value");
+ if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, L"urn:xmpp:dataforms:softwareinfo")) {
+ TCHAR *szTmp = XPath(xform, L"field[@var='os']/value");
if (szTmp)
r->m_tszOs = mir_tstrdup(szTmp);
- szTmp = XPath(xform, _T("field[@var='os_version']/value"));
+ szTmp = XPath(xform, L"field[@var='os_version']/value");
if (szTmp)
r->m_tszOsVersion = mir_tstrdup(szTmp);
- szTmp = XPath(xform, _T("field[@var='software']/value"));
+ szTmp = XPath(xform, L"field[@var='software']/value");
if (szTmp)
r->m_tszSoftware = mir_tstrdup(szTmp);
- szTmp = XPath(xform, _T("field[@var='software_version']/value"));
+ szTmp = XPath(xform, L"field[@var='software_version']/value");
if (szTmp)
r->m_tszSoftwareVersion = mir_tstrdup(szTmp);
- szTmp = XPath(xform, _T("field[@var='x-miranda-core-version']/value"));
+ szTmp = XPath(xform, L"field[@var='x-miranda-core-version']/value");
if (szTmp)
r->m_tszXMirandaCoreVersion = mir_tstrdup(szTmp);
@@ -142,8 +142,8 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo) if (pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT && query) {
JabberCapsBits jcbCaps = 0;
HXML feature;
- for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) {
- const TCHAR *featureName = XmlGetAttrValue(feature, _T("var"));
+ for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) {
+ const TCHAR *featureName = XmlGetAttrValue(feature, L"var");
if (!featureName)
continue;
@@ -201,7 +201,7 @@ JabberCapsBits CJabberProto::GetTotalJidCapabilites(const TCHAR *jid) if (item) {
for (int i = 0; i < item->arResources.getCount(); i++) {
TCHAR szFullJid[JABBER_MAX_JID_LEN];
- mir_sntprintf(szFullJid, _T("%s/%s"), szBareJid, item->arResources[i]->m_tszResourceName);
+ mir_sntprintf(szFullJid, L"%s/%s", szBareJid, item->arResources[i]->m_tszResourceName);
JabberCapsBits jcb = GetResourceCapabilites(szFullJid, FALSE);
if (!(jcb & JABBER_RESOURCE_CAPS_ERROR))
jcbToReturn |= jcb;
@@ -240,8 +240,8 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen r->m_dwDiscoInfoRequestTime = pInfo->GetRequestTime();
TCHAR queryNode[512];
- mir_sntprintf(queryNode, _T("%s#%s"), r->m_tszCapsNode, r->m_tszCapsVer);
- m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), queryNode));
+ mir_sntprintf(queryNode, L"%s#%s", r->m_tszCapsNode, r->m_tszCapsVer);
+ m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", queryNode));
bRequestSent = TRUE;
}
@@ -253,7 +253,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen if (jcbMainCaps != JABBER_RESOURCE_CAPS_TIMEOUT && r->m_tszCapsExt) {
TCHAR *caps = mir_tstrdup(r->m_tszCapsExt);
- TCHAR *token = _tcstok(caps, _T(" "));
+ TCHAR *token = _tcstok(caps, L" ");
while (token) {
switch (jcbExtCaps = m_clientCapsManager.GetClientCaps(r->m_tszCapsNode, token)) {
case JABBER_RESOURCE_CAPS_ERROR:
@@ -268,7 +268,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen m_clientCapsManager.SetClientCaps(r->m_tszCapsNode, token, JABBER_RESOURCE_CAPS_IN_PROGRESS, pInfo->GetIqId());
m_ThreadInfo->send(
- XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), CMString(FORMAT, _T("%s#%s"), r->m_tszCapsNode, token)));
+ XmlNodeIq(pInfo) << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", CMString(FORMAT, L"%s#%s", r->m_tszCapsNode, token)));
bRequestSent = TRUE;
}
@@ -282,7 +282,7 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen jcbCaps |= jcbExtCaps;
}
- token = _tcstok(NULL, _T(" "));
+ token = _tcstok(NULL, L" ");
}
mir_free(caps);
@@ -349,17 +349,17 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion);
if (jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR) {
// Bombus hack:
- if (!mir_tstrcmp(r->m_tszSoftware, _T("Bombus")) || !mir_tstrcmp(r->m_tszSoftware, _T("BombusMod"))) {
+ if (!mir_tstrcmp(r->m_tszSoftware, L"Bombus") || !mir_tstrcmp(r->m_tszSoftware, L"BombusMod")) {
jcbMainCaps = JABBER_CAPS_SI | JABBER_CAPS_SI_FT | JABBER_CAPS_IBB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION | JABBER_CAPS_COMMANDS | JABBER_CAPS_VCARD_TEMP;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// Neos hack:
- else if (!mir_tstrcmp(r->m_tszSoftware, _T("neos"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, L"neos")) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// sim hack:
- else if (!mir_tstrcmp(r->m_tszSoftware, _T("sim"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, L"sim")) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_VERSION | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
@@ -558,12 +558,12 @@ JabberCapsBits CJabberClientCapsManager::GetClientCaps(TCHAR *szNode, TCHAR *szV CJabberClientCaps *pClient = FindClient(szNode);
if (!pClient) {
lck.unlock();
- ppro->debugLog(_T("CAPS: get no caps for: %s, %s"), szNode, szVer);
+ ppro->debugLog(L"CAPS: get no caps for: %s, %s", szNode, szVer);
return JABBER_RESOURCE_CAPS_UNINIT;
}
JabberCapsBits jcbCaps = pClient->GetPartialCaps(szVer);
lck.unlock();
- ppro->debugLog(_T("CAPS: get caps %I64x for: %s, %s"), jcbCaps, szNode, szVer);
+ ppro->debugLog(L"CAPS: get caps %I64x for: %s, %s", jcbCaps, szNode, szVer);
return jcbCaps;
}
@@ -581,7 +581,7 @@ BOOL CJabberClientCapsManager::SetClientCaps(const TCHAR *szNode, const TCHAR *s }
BOOL bOk = pClient->SetPartialCaps(szVer, jcbCaps, nIqId);
lck.unlock();
- ppro->debugLog(_T("CAPS: set caps %I64x for: %s, %s"), jcbCaps, szNode, szVer);
+ ppro->debugLog(L"CAPS: set caps %I64x for: %s, %s", jcbCaps, szNode, szVer);
return bOk;
}
@@ -615,7 +615,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con continue;
TCHAR szExtCap[ 512 ];
- mir_sntprintf(szExtCap, _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature);
+ mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature);
if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = g_JabberFeatCapPairsExt[i].jcbCap;
break;
@@ -625,7 +625,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con // check features registered through IJabberNetInterface::RegisterFeature() and IJabberNetInterface::AddFeatures()
for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) {
TCHAR szExtCap[ 512 ];
- mir_sntprintf(szExtCap, _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt);
+ mir_sntprintf(szExtCap, L"%s#%s", JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt);
if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap;
break;
@@ -645,22 +645,22 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con if (!ppro->m_options.AllowVersionRequests)
jcb &= ~JABBER_CAPS_VERSION;
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO);
if (szNode)
- query << XATTR(_T("node"), szNode);
+ query << XATTR(L"node", szNode);
- query << XCHILD(_T("identity")) << XATTR(_T("category"), _T("client"))
- << XATTR(_T("type"), _T("pc")) << XATTR(_T("name"), _T("Miranda"));
+ query << XCHILD(L"identity") << XATTR(L"category", L"client")
+ << XATTR(L"type", L"pc") << XATTR(L"name", L"Miranda");
for (i=0; g_JabberFeatCapPairs[i].szFeature; i++)
if (jcb & g_JabberFeatCapPairs[i].jcbCap)
- query << XCHILD(_T("feature")) << XATTR(_T("var"), g_JabberFeatCapPairs[i].szFeature);
+ query << XCHILD(L"feature") << XATTR(L"var", g_JabberFeatCapPairs[i].szFeature);
for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++)
if (jcb & ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap)
- query << XCHILD(_T("feature")) << XATTR(_T("var"), ppro->m_lstJabberFeatCapPairsDynamic[i]->szFeature);
+ query << XCHILD(L"feature") << XATTR(L"var", ppro->m_lstJabberFeatCapPairsDynamic[i]->szFeature);
if (ppro->m_options.AllowVersionRequests && !szNode) {
TCHAR szOsBuffer[256] = {0};
@@ -668,26 +668,26 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con if (ppro->m_options.ShowOSVersion) {
if (!GetOSDisplayString(szOsBuffer, _countof(szOsBuffer)))
- mir_tstrncpy(szOsBuffer, _T(""), _countof(szOsBuffer));
+ mir_tstrncpy(szOsBuffer, L"", _countof(szOsBuffer));
else {
- TCHAR *szOsWindows = _T("Microsoft Windows");
+ TCHAR *szOsWindows = L"Microsoft Windows";
size_t nOsWindowsLength = mir_tstrlen(szOsWindows);
if (!_tcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength))
os += nOsWindowsLength + 1;
}
}
- HXML form = query << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("result"));
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("FORM_TYPE")) << XATTR(_T("type"), _T("hidden"))
- << XCHILD(_T("value"), _T("urn:xmpp:dataforms:softwareinfo"));
+ HXML form = query << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"result");
+ form << XCHILD(L"field") << XATTR(L"var", L"FORM_TYPE") << XATTR(L"type", L"hidden")
+ << XCHILD(L"value", L"urn:xmpp:dataforms:softwareinfo");
if (ppro->m_options.ShowOSVersion) {
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("os")) << XCHILD(_T("value"), _T("Microsoft Windows"));
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("os_version")) << XCHILD(_T("value"), os);
+ form << XCHILD(L"field") << XATTR(L"var", L"os") << XCHILD(L"value", L"Microsoft Windows");
+ form << XCHILD(L"field") << XATTR(L"var", L"os_version") << XCHILD(L"value", os);
}
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("software")) << XCHILD(_T("value"), _T("Miranda NG Jabber Protocol"));
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("software_version")) << XCHILD(_T("value"), _T(__VERSION_STRING_DOTS));
- form << XCHILD(_T("field")) << XATTR(_T("var"), _T("x-miranda-core-version")) << XCHILD(_T("value"), szCoreVersion);
+ form << XCHILD(L"field") << XATTR(L"var", L"software") << XCHILD(L"value", L"Miranda NG Jabber Protocol");
+ form << XCHILD(L"field") << XATTR(L"var", L"software_version") << XCHILD(L"value", _T(__VERSION_STRING_DOTS));
+ form << XCHILD(L"field") << XATTR(L"var", L"x-miranda-core-version") << XCHILD(L"value", szCoreVersion);
}
ppro->m_ThreadInfo->send(iq);
diff --git a/protocols/JabberG/src/jabber_caps.h b/protocols/JabberG/src/jabber_caps.h index 6546d9e0f6..d9ed0422c4 100644 --- a/protocols/JabberG/src/jabber_caps.h +++ b/protocols/JabberG/src/jabber_caps.h @@ -46,116 +46,116 @@ typedef unsigned __int64 JabberCapsBits; #define JABBER_RESOURCE_CAPS_NONE 0x0000000000000000
#endif
-#define JABBER_FEAT_DISCO_INFO _T("http://jabber.org/protocol/disco#info")
+#define JABBER_FEAT_DISCO_INFO L"http://jabber.org/protocol/disco#info"
#define JABBER_CAPS_DISCO_INFO ((JabberCapsBits)1)
-#define JABBER_FEAT_DISCO_ITEMS _T("http://jabber.org/protocol/disco#items")
+#define JABBER_FEAT_DISCO_ITEMS L"http://jabber.org/protocol/disco#items"
#define JABBER_CAPS_DISCO_ITEMS ((JabberCapsBits)1<<1)
-#define JABBER_FEAT_ENTITY_CAPS _T("http://jabber.org/protocol/caps")
+#define JABBER_FEAT_ENTITY_CAPS L"http://jabber.org/protocol/caps"
#define JABBER_CAPS_ENTITY_CAPS ((JabberCapsBits)1<<2)
-#define JABBER_FEAT_SI _T("http://jabber.org/protocol/si")
+#define JABBER_FEAT_SI L"http://jabber.org/protocol/si"
#define JABBER_CAPS_SI ((JabberCapsBits)1<<3)
-#define JABBER_FEAT_SI_FT _T("http://jabber.org/protocol/si/profile/file-transfer")
+#define JABBER_FEAT_SI_FT L"http://jabber.org/protocol/si/profile/file-transfer"
#define JABBER_CAPS_SI_FT ((JabberCapsBits)1<<4)
-#define JABBER_FEAT_BYTESTREAMS _T("http://jabber.org/protocol/bytestreams")
+#define JABBER_FEAT_BYTESTREAMS L"http://jabber.org/protocol/bytestreams"
#define JABBER_CAPS_BYTESTREAMS ((JabberCapsBits)1<<5)
-#define JABBER_FEAT_IBB _T("http://jabber.org/protocol/ibb")
+#define JABBER_FEAT_IBB L"http://jabber.org/protocol/ibb"
#define JABBER_CAPS_IBB ((JabberCapsBits)1<<6)
-#define JABBER_FEAT_OOB _T("jabber:iq:oob")
-#define JABBER_FEAT_OOB2 _T("jabber:x:oob")
+#define JABBER_FEAT_OOB L"jabber:iq:oob"
+#define JABBER_FEAT_OOB2 L"jabber:x:oob"
#define JABBER_CAPS_OOB ((JabberCapsBits)1<<7)
-#define JABBER_FEAT_COMMANDS _T("http://jabber.org/protocol/commands")
+#define JABBER_FEAT_COMMANDS L"http://jabber.org/protocol/commands"
#define JABBER_CAPS_COMMANDS ((JabberCapsBits)1<<8)
-#define JABBER_FEAT_REGISTER _T("jabber:iq:register")
+#define JABBER_FEAT_REGISTER L"jabber:iq:register"
#define JABBER_CAPS_REGISTER ((JabberCapsBits)1<<9)
-#define JABBER_FEAT_MUC _T("http://jabber.org/protocol/muc")
+#define JABBER_FEAT_MUC L"http://jabber.org/protocol/muc"
#define JABBER_CAPS_MUC ((JabberCapsBits)1<<10)
-#define JABBER_FEAT_CHATSTATES _T("http://jabber.org/protocol/chatstates")
+#define JABBER_FEAT_CHATSTATES L"http://jabber.org/protocol/chatstates"
#define JABBER_CAPS_CHATSTATES ((JabberCapsBits)1<<11)
-#define JABBER_FEAT_LAST_ACTIVITY _T("jabber:iq:last")
+#define JABBER_FEAT_LAST_ACTIVITY L"jabber:iq:last"
#define JABBER_CAPS_LAST_ACTIVITY ((JabberCapsBits)1<<12)
-#define JABBER_FEAT_VERSION _T("jabber:iq:version")
+#define JABBER_FEAT_VERSION L"jabber:iq:version"
#define JABBER_CAPS_VERSION ((JabberCapsBits)1<<13)
-#define JABBER_FEAT_ENTITY_TIME _T("urn:xmpp:time")
+#define JABBER_FEAT_ENTITY_TIME L"urn:xmpp:time"
#define JABBER_CAPS_ENTITY_TIME ((JabberCapsBits)1<<14)
-#define JABBER_FEAT_PING _T("urn:xmpp:ping")
+#define JABBER_FEAT_PING L"urn:xmpp:ping"
#define JABBER_CAPS_PING ((JabberCapsBits)1<<15)
-#define JABBER_FEAT_DATA_FORMS _T("jabber:x:data")
+#define JABBER_FEAT_DATA_FORMS L"jabber:x:data"
#define JABBER_CAPS_DATA_FORMS ((JabberCapsBits)1<<16)
-#define JABBER_FEAT_MESSAGE_EVENTS _T("jabber:x:event")
+#define JABBER_FEAT_MESSAGE_EVENTS L"jabber:x:event"
#define JABBER_CAPS_MESSAGE_EVENTS ((JabberCapsBits)1<<17)
-#define JABBER_FEAT_VCARD_TEMP _T("vcard-temp")
+#define JABBER_FEAT_VCARD_TEMP L"vcard-temp"
#define JABBER_CAPS_VCARD_TEMP ((JabberCapsBits)1<<18)
-#define JABBER_FEAT_AVATAR _T("jabber:iq:avatar")
-#define JABBER_FEAT_SERVER_AVATAR _T("storage:client:avatar")
+#define JABBER_FEAT_AVATAR L"jabber:iq:avatar"
+#define JABBER_FEAT_SERVER_AVATAR L"storage:client:avatar"
#define JABBER_CAPS_AVATAR ((JabberCapsBits)1<<19)
-#define JABBER_FEAT_XHTML _T("http://jabber.org/protocol/xhtml-im")
+#define JABBER_FEAT_XHTML L"http://jabber.org/protocol/xhtml-im"
#define JABBER_CAPS_XHTML ((JabberCapsBits)1<<20)
-#define JABBER_FEAT_AGENTS _T("jabber:iq:agents")
+#define JABBER_FEAT_AGENTS L"jabber:iq:agents"
#define JABBER_CAPS_AGENTS ((JabberCapsBits)1<<21)
-#define JABBER_FEAT_BROWSE _T("jabber:iq:browse")
+#define JABBER_FEAT_BROWSE L"jabber:iq:browse"
#define JABBER_CAPS_BROWSE ((JabberCapsBits)1<<22)
-#define JABBER_FEAT_FEATURE_NEG _T("http://jabber.org/protocol/feature-neg")
+#define JABBER_FEAT_FEATURE_NEG L"http://jabber.org/protocol/feature-neg"
#define JABBER_CAPS_FEATURE_NEG ((JabberCapsBits)1<<23)
-#define JABBER_FEAT_AMP _T("http://jabber.org/protocol/amp")
+#define JABBER_FEAT_AMP L"http://jabber.org/protocol/amp"
#define JABBER_CAPS_AMP ((JabberCapsBits)1<<24)
-#define JABBER_FEAT_USER_MOOD _T("http://jabber.org/protocol/mood")
+#define JABBER_FEAT_USER_MOOD L"http://jabber.org/protocol/mood"
#define JABBER_CAPS_USER_MOOD ((JabberCapsBits)1<<25)
-#define JABBER_FEAT_USER_MOOD_NOTIFY _T("http://jabber.org/protocol/mood+notify")
+#define JABBER_FEAT_USER_MOOD_NOTIFY L"http://jabber.org/protocol/mood+notify"
#define JABBER_CAPS_USER_MOOD_NOTIFY ((JabberCapsBits)1<<26)
-#define JABBER_FEAT_PUBSUB _T("http://jabber.org/protocol/pubsub")
+#define JABBER_FEAT_PUBSUB L"http://jabber.org/protocol/pubsub"
#define JABBER_CAPS_PUBSUB ((JabberCapsBits)1<<27)
-#define JABBER_FEAT_SECUREIM _T("http://miranda-ng.org/caps/secureim")
+#define JABBER_FEAT_SECUREIM L"http://miranda-ng.org/caps/secureim"
#define JABBER_CAPS_SECUREIM ((JabberCapsBits)1<<28)
-#define JABBER_FEAT_MIROTR _T("http://miranda-ng.org/caps/mirotr")
+#define JABBER_FEAT_MIROTR L"http://miranda-ng.org/caps/mirotr"
#define JABBER_CAPS_MIROTR ((JabberCapsBits)1<<42)
-#define JABBER_FEAT_NEWGPG _T("http://miranda-ng.org/caps/new_gpg")
+#define JABBER_FEAT_NEWGPG L"http://miranda-ng.org/caps/new_gpg"
#define JABBER_CAPS_NEWGPG ((JabberCapsBits)1<<43)
#define JABBER_CAPS_PLATFORMX86 ((JabberCapsBits)1<<44)
#define JABBER_CAPS_PLATFORMX64 ((JabberCapsBits)1<<45)
-#define JABBER_FEAT_PRIVACY_LISTS _T("jabber:iq:privacy")
+#define JABBER_FEAT_PRIVACY_LISTS L"jabber:iq:privacy"
#define JABBER_CAPS_PRIVACY_LISTS ((JabberCapsBits)1<<29)
-#define JABBER_FEAT_MESSAGE_RECEIPTS _T("urn:xmpp:receipts")
+#define JABBER_FEAT_MESSAGE_RECEIPTS L"urn:xmpp:receipts"
#define JABBER_CAPS_MESSAGE_RECEIPTS ((JabberCapsBits)1<<30)
-#define JABBER_FEAT_USER_TUNE _T("http://jabber.org/protocol/tune")
+#define JABBER_FEAT_USER_TUNE L"http://jabber.org/protocol/tune"
#define JABBER_CAPS_USER_TUNE ((JabberCapsBits)1<<31)
-#define JABBER_FEAT_USER_TUNE_NOTIFY _T("http://jabber.org/protocol/tune+notify")
+#define JABBER_FEAT_USER_TUNE_NOTIFY L"http://jabber.org/protocol/tune+notify"
#define JABBER_CAPS_USER_TUNE_NOTIFY ((JabberCapsBits)1<<32)
-#define JABBER_FEAT_PRIVATE_STORAGE _T("jabber:iq:private")
+#define JABBER_FEAT_PRIVATE_STORAGE L"jabber:iq:private"
#define JABBER_CAPS_PRIVATE_STORAGE ((JabberCapsBits)1<<33)
-#define JABBER_FEAT_ARCHIVE _T("urn:xmpp:archive")
-#define JABBER_FEAT_ARCHIVE_AUTO _T("urn:xmpp:archive:auto")
+#define JABBER_FEAT_ARCHIVE L"urn:xmpp:archive"
+#define JABBER_FEAT_ARCHIVE_AUTO L"urn:xmpp:archive:auto"
#define JABBER_CAPS_ARCHIVE_AUTO ((JabberCapsBits)1<<34)
-#define JABBER_FEAT_ARCHIVE_MANAGE _T("urn:xmpp:archive:manage")
+#define JABBER_FEAT_ARCHIVE_MANAGE L"urn:xmpp:archive:manage"
#define JABBER_CAPS_ARCHIVE_MANAGE ((JabberCapsBits)1<<35)
-#define JABBER_FEAT_CAPTCHA _T("urn:xmpp:captcha")
+#define JABBER_FEAT_CAPTCHA L"urn:xmpp:captcha"
-#define JABBER_FEAT_ATTENTION _T("urn:xmpp:attention:0")
+#define JABBER_FEAT_ATTENTION L"urn:xmpp:attention:0"
#define JABBER_CAPS_ATTENTION ((JabberCapsBits)1<<36)
// deferred
-#define JABBER_FEAT_USER_ACTIVITY _T("http://jabber.org/protocol/activity")
+#define JABBER_FEAT_USER_ACTIVITY L"http://jabber.org/protocol/activity"
#define JABBER_CAPS_USER_ACTIVITY ((JabberCapsBits)1<<37)
-#define JABBER_FEAT_USER_ACTIVITY_NOTIFY _T("http://jabber.org/protocol/activity+notify")
+#define JABBER_FEAT_USER_ACTIVITY_NOTIFY L"http://jabber.org/protocol/activity+notify"
#define JABBER_CAPS_USER_ACTIVITY_NOTIFY ((JabberCapsBits)1<<38)
-#define JABBER_FEAT_MIRANDA_NOTES _T("http://miranda-ng.org/storage#notes")
+#define JABBER_FEAT_MIRANDA_NOTES L"http://miranda-ng.org/storage#notes"
#define JABBER_CAPS_MIRANDA_NOTES ((JabberCapsBits)1<<39)
-#define JABBER_FEAT_JINGLE _T("urn:xmpp:jingle:1")
+#define JABBER_FEAT_JINGLE L"urn:xmpp:jingle:1"
#define JABBER_CAPS_JINGLE ((JabberCapsBits)1<<40)
-#define JABBER_FEAT_ROSTER_EXCHANGE _T("http://jabber.org/protocol/rosterx")
+#define JABBER_FEAT_ROSTER_EXCHANGE L"http://jabber.org/protocol/rosterx"
#define JABBER_CAPS_ROSTER_EXCHANGE ((JabberCapsBits)1<<41)
-#define JABBER_FEAT_DIRECT_MUC_INVITE _T("jabber:x:conference")
+#define JABBER_FEAT_DIRECT_MUC_INVITE L"jabber:x:conference"
#define JABBER_CAPS_DIRECT_MUC_INVITE ((JabberCapsBits)1<<42)
-#define JABBER_FEAT_PUBSUB_EVENT _T("http://jabber.org/protocol/pubsub#event")
-#define JABBER_FEAT_PUBSUB_NODE_CONFIG _T("http://jabber.org/protocol/pubsub#node_config")
+#define JABBER_FEAT_PUBSUB_EVENT L"http://jabber.org/protocol/pubsub#event"
+#define JABBER_FEAT_PUBSUB_NODE_CONFIG L"http://jabber.org/protocol/pubsub#node_config"
#define JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY ((JabberCapsBits)1<<62)
#define JABBER_CAPS_OTHER_SPECIAL (JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY|JABBER_RESOURCE_CAPS_ERROR) // must contain all the caps not listed in g_JabberFeatCapPairs, to prevent using these bits for features registered through IJabberNetInterface::RegisterFeature()
-#define JABBER_CAPS_MIRANDA_NODE _T("http://miranda-ng.org/caps")
+#define JABBER_CAPS_MIRANDA_NODE L"http://miranda-ng.org/caps"
#define JABBER_CAPS_MIRANDA_PARTIAL (JABBER_CAPS_DISCO_INFO | JABBER_CAPS_DISCO_ITEMS | JABBER_CAPS_MUC | JABBER_CAPS_ENTITY_CAPS | JABBER_CAPS_SI | JABBER_CAPS_SI_FT | \
JABBER_CAPS_BYTESTREAMS | JABBER_CAPS_IBB | JABBER_CAPS_OOB | JABBER_CAPS_CHATSTATES | JABBER_CAPS_AGENTS | JABBER_CAPS_BROWSE | \
JABBER_CAPS_VERSION | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_VCARD_TEMP | \
@@ -166,41 +166,41 @@ typedef unsigned __int64 JabberCapsBits; JABBER_CAPS_USER_MOOD_NOTIFY | JABBER_CAPS_USER_TUNE_NOTIFY | JABBER_CAPS_USER_ACTIVITY_NOTIFY | JABBER_CAPS_PLATFORMX86 | JABBER_CAPS_PLATFORMX64)
-#define JABBER_EXT_SECUREIM _T("secureim")
-#define JABBER_EXT_MIROTR _T("mirotr")
-#define JABBER_EXT_JINGLE _T("jingle")
-#define JABBER_EXT_NEWGPG _T("new_gpg")
-#define JABBER_EXT_NUDGE _T("nudge")
-#define JABBER_EXT_COMMANDS _T("cmds")
-#define JABBER_EXT_USER_MOOD _T("mood")
-#define JABBER_EXT_USER_TUNE _T("tune")
-#define JABBER_EXT_USER_ACTIVITY _T("activity")
-#define JABBER_EXT_MIR_NOTES _T("mir_notes")
-#define JABBER_EXT_PLATFORMX86 _T("x86")
-#define JABBER_EXT_PLATFORMX64 _T("x64")
-
-#define JABBER_FEAT_EXT_ADDRESSING _T("http://jabber.org/protocol/address")
-#define JABBER_FEAT_NESTED_ROSTER_GROUPS _T("roster:delimiter")
-
-#define JABBER_FEAT_RC _T("http://jabber.org/protocol/rc")
-#define JABBER_FEAT_RC_SET_STATUS _T("http://jabber.org/protocol/rc#set-status")
-#define JABBER_FEAT_RC_SET_OPTIONS _T("http://jabber.org/protocol/rc#set-options")
-#define JABBER_FEAT_RC_FORWARD _T("http://jabber.org/protocol/rc#forward")
-#define JABBER_FEAT_RC_LEAVE_GROUPCHATS _T("http://jabber.org/protocol/rc#leave-groupchats")
-#define JABBER_FEAT_RC_WS_LOCK _T("http://miranda-ng.org/rc#lock_workstation")
-#define JABBER_FEAT_RC_QUIT_MIRANDA _T("http://miranda-ng.org/rc#quit")
-
-#define JABBER_FEAT_IQ_ROSTER _T("jabber:iq:roster")
-#define JABBER_FEAT_DELAY _T("jabber:x:delay")
-#define JABBER_FEAT_ENTITY_TIME_OLD _T("jabber:iq:time")
-
-#define JABBER_FEAT_MUC_ADMIN _T("http://jabber.org/protocol/muc#admin")
-#define JABBER_FEAT_MUC_OWNER _T("http://jabber.org/protocol/muc#owner")
-#define JABBER_FEAT_MUC_USER _T("http://jabber.org/protocol/muc#user")
-
-#define JABBER_FEAT_NICK _T("http://jabber.org/protocol/nick")
-
-#define JABBER_FEAT_HTTP_AUTH _T("http://jabber.org/protocol/http-auth")
+#define JABBER_EXT_SECUREIM L"secureim"
+#define JABBER_EXT_MIROTR L"mirotr"
+#define JABBER_EXT_JINGLE L"jingle"
+#define JABBER_EXT_NEWGPG L"new_gpg"
+#define JABBER_EXT_NUDGE L"nudge"
+#define JABBER_EXT_COMMANDS L"cmds"
+#define JABBER_EXT_USER_MOOD L"mood"
+#define JABBER_EXT_USER_TUNE L"tune"
+#define JABBER_EXT_USER_ACTIVITY L"activity"
+#define JABBER_EXT_MIR_NOTES L"mir_notes"
+#define JABBER_EXT_PLATFORMX86 L"x86"
+#define JABBER_EXT_PLATFORMX64 L"x64"
+
+#define JABBER_FEAT_EXT_ADDRESSING L"http://jabber.org/protocol/address"
+#define JABBER_FEAT_NESTED_ROSTER_GROUPS L"roster:delimiter"
+
+#define JABBER_FEAT_RC L"http://jabber.org/protocol/rc"
+#define JABBER_FEAT_RC_SET_STATUS L"http://jabber.org/protocol/rc#set-status"
+#define JABBER_FEAT_RC_SET_OPTIONS L"http://jabber.org/protocol/rc#set-options"
+#define JABBER_FEAT_RC_FORWARD L"http://jabber.org/protocol/rc#forward"
+#define JABBER_FEAT_RC_LEAVE_GROUPCHATS L"http://jabber.org/protocol/rc#leave-groupchats"
+#define JABBER_FEAT_RC_WS_LOCK L"http://miranda-ng.org/rc#lock_workstation"
+#define JABBER_FEAT_RC_QUIT_MIRANDA L"http://miranda-ng.org/rc#quit"
+
+#define JABBER_FEAT_IQ_ROSTER L"jabber:iq:roster"
+#define JABBER_FEAT_DELAY L"jabber:x:delay"
+#define JABBER_FEAT_ENTITY_TIME_OLD L"jabber:iq:time"
+
+#define JABBER_FEAT_MUC_ADMIN L"http://jabber.org/protocol/muc#admin"
+#define JABBER_FEAT_MUC_OWNER L"http://jabber.org/protocol/muc#owner"
+#define JABBER_FEAT_MUC_USER L"http://jabber.org/protocol/muc#user"
+
+#define JABBER_FEAT_NICK L"http://jabber.org/protocol/nick"
+
+#define JABBER_FEAT_HTTP_AUTH L"http://jabber.org/protocol/http-auth"
class CJabberClientPartialCaps
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 5119579a86..53edb29bbf 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -115,7 +115,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) if (x == NULL)
return false;
- HXML y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("from"));
+ HXML y = XmlGetChildByTag(x, L"field", L"var", L"from");
if (y == NULL)
return false;
if ((y = XmlGetChild(y, "value")) == NULL)
@@ -124,19 +124,19 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) CAPTCHA_FORM_PARAMS param;
param.fromjid = XmlGetText(y);
- if ((y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("sid"))) == NULL)
+ if ((y = XmlGetChildByTag(x, L"field", L"var", L"sid")) == NULL)
return false;
if ((y = XmlGetChild(y, "value")) == NULL)
return false;
param.sid = XmlGetText(y);
- if ((y = XmlGetChildByTag(x, _T("field"), _T("var"), _T("ocr"))) == NULL)
+ if ((y = XmlGetChildByTag(x, L"field", L"var", L"ocr")) == NULL)
return false;
- param.hint = XmlGetAttrValue (y, _T("label"));
+ param.hint = XmlGetAttrValue (y, L"label");
- param.from = XmlGetAttrValue(parentNode, _T("from"));
- param.to = XmlGetAttrValue(parentNode, _T("to"));
- param.challenge = XmlGetAttrValue(parentNode, _T("id"));
+ param.from = XmlGetAttrValue(parentNode, L"from");
+ param.to = XmlGetAttrValue(parentNode, L"to");
+ param.challenge = XmlGetAttrValue(parentNode, L"id");
HXML o = XmlGetChild(parentNode, "data");
if (o == NULL || XmlGetText(o) == NULL)
return false;
@@ -158,7 +158,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) param.w = bmp.bmWidth;
param.h = bmp.bmHeight;
int res = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_CAPTCHAFORM), NULL, JabberCaptchaFormDlgProc, (LPARAM)¶m);
- if (mir_tstrcmp(param.Result, _T("")) == 0 || !res)
+ if (mir_tstrcmp(param.Result, L"") == 0 || !res)
sendCaptchaError(info, param.from, param.to, param.challenge);
else
sendCaptchaResult(param.Result, info, param.from, param.challenge, param.fromjid, param.sid);
@@ -167,21 +167,21 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) void CJabberProto::sendCaptchaResult(TCHAR* buf, ThreadData *info, LPCTSTR from, LPCTSTR challenge, LPCTSTR fromjid, LPCTSTR sid)
{
- XmlNodeIq iq(_T("set"), SerialNext());
- HXML query= iq <<XATTR(_T("to"), from) << XCHILD(_T("captcha")) << XATTR(_T("xmlns"), _T("urn:xmpp:captcha")) << XCHILD (_T("x")) << XATTR(_T("xmlns"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit"));
- query << XCHILD(_T("field")) << XATTR (_T("var"), _T("FORM_TYPE")) << XCHILD(_T("value"), _T("urn:xmpp:captcha"));
- query << XCHILD(_T("field")) << XATTR (_T("var"), _T("from")) << XCHILD(_T("value"), fromjid);
- query << XCHILD(_T("field")) << XATTR (_T("var"), _T("challenge")) << XCHILD(_T("value"), challenge);
- query << XCHILD(_T("field")) << XATTR (_T("var"), _T("sid")) << XCHILD(_T("value"), sid);
- query << XCHILD(_T("field")) << XATTR (_T("var"), _T("ocr")) << XCHILD(_T("value"), buf);
+ XmlNodeIq iq(L"set", SerialNext());
+ HXML query= iq <<XATTR(L"to", from) << XCHILD(L"captcha") << XATTR(L"xmlns", L"urn:xmpp:captcha") << XCHILD (L"x") << XATTR(L"xmlns", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit");
+ query << XCHILD(L"field") << XATTR (L"var", L"FORM_TYPE") << XCHILD(L"value", L"urn:xmpp:captcha");
+ query << XCHILD(L"field") << XATTR (L"var", L"from") << XCHILD(L"value", fromjid);
+ query << XCHILD(L"field") << XATTR (L"var", L"challenge") << XCHILD(L"value", challenge);
+ query << XCHILD(L"field") << XATTR (L"var", L"sid") << XCHILD(L"value", sid);
+ query << XCHILD(L"field") << XATTR (L"var", L"ocr") << XCHILD(L"value", buf);
info -> send (iq);
}
void CJabberProto::sendCaptchaError(ThreadData *info, LPCTSTR from, LPCTSTR to, LPCTSTR challenge)
{
- XmlNode message(_T("message"));
- message << XATTR(_T("type"), _T("error")) << XATTR(_T("to"), from) << XATTR(_T("id"), challenge) << XATTR(_T("from"), to)
- << XCHILD(_T("error")) << XATTR(_T("type"), _T("modify"))
- << XCHILD(_T("not-acceptable")) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
+ XmlNode message(L"message");
+ message << XATTR(L"type", L"error") << XATTR(L"to", from) << XATTR(L"id", challenge) << XATTR(L"from", to)
+ << XCHILD(L"error") << XATTR(L"type", L"modify")
+ << XCHILD(L"not-acceptable") << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-stanzas");
info->send(message);
}
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 321bdd97f9..40cdb9168c 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -240,7 +240,7 @@ void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus }
if (!buf.IsEmpty()) {
- buf.Replace(_T("%"), _T("%%"));
+ buf.Replace(L"%", L"%%");
GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_INFORMATION };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -353,11 +353,11 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason) if (m_bJabberOnline) {
TCHAR szPresenceTo[JABBER_MAX_JID_LEN];
- mir_sntprintf(szPresenceTo, _T("%s/%s"), item->jid, item->nick);
+ mir_sntprintf(szPresenceTo, L"%s/%s", item->jid, item->nick);
m_ThreadInfo->send(
- XmlNode(_T("presence")) << XATTR(_T("to"), szPresenceTo) << XATTR(_T("type"), _T("unavailable"))
- << XCHILD(_T("status"), szMessage));
+ XmlNode(L"presence") << XATTR(L"to", szPresenceTo) << XATTR(L"type", L"unavailable")
+ << XCHILD(L"status", szMessage));
ListRemove(LIST_CHATROOM, item->jid);
}
@@ -535,8 +535,8 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) TCHAR *ptszStatusMsg = item->getTemp()->m_tszStatusMessage;
if (ptszStatusMsg && *ptszStatusMsg) {
TCHAR *bufPtr = url_buf;
- for (TCHAR *p = _tcsstr(ptszStatusMsg, _T("http")); p && *p; p = _tcsstr(p + 1, _T("http"))) {
- if (!_tcsncmp(p, _T("http://"), 7) || !_tcsncmp(p, _T("https://"), 8)) {
+ for (TCHAR *p = _tcsstr(ptszStatusMsg, L"http"); p && *p; p = _tcsstr(p + 1, L"http")) {
+ if (!_tcsncmp(p, L"http://", 7) || !_tcsncmp(p, L"https://", 8)) {
mir_tstrncpy(bufPtr, p, _countof(url_buf) - (bufPtr - url_buf));
gc_item *pItem = sttFindGcMenuItem(gcmi, idx);
pItem->pszDesc = bufPtr;
@@ -690,12 +690,12 @@ class CGroupchatInviteDlg : public CJabberDlgBase void InviteUser(TCHAR *pUser, TCHAR *text)
{
- XmlNode msg(_T("message"));
- HXML invite = msg << XATTR(_T("to"), m_room) << XATTRID(m_proto->SerialNext())
- << XCHILDNS(_T("x"), JABBER_FEAT_MUC_USER)
- << XCHILD(_T("invite")) << XATTR(_T("to"), pUser);
+ XmlNode msg(L"message");
+ HXML invite = msg << XATTR(L"to", m_room) << XATTRID(m_proto->SerialNext())
+ << XCHILDNS(L"x", JABBER_FEAT_MUC_USER)
+ << XCHILD(L"invite") << XATTR(L"to", pUser);
if (text)
- invite << XCHILD(_T("reason"), text);
+ invite << XCHILD(L"reason", text);
m_proto->m_ThreadInfo->send(msg);
}
@@ -807,18 +807,18 @@ public: void CJabberProto::AdminSet(const TCHAR *to, const TCHAR *ns, const TCHAR *szItem, const TCHAR *itemVal, const TCHAR *var, const TCHAR *varVal)
{
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), to) << XQUERY(ns) << XCHILD(_T("item")) << XATTR(szItem, itemVal) << XATTR(var, varVal));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), to) << XQUERY(ns) << XCHILD(L"item") << XATTR(szItem, itemVal) << XATTR(var, varVal));
}
void CJabberProto::AdminSetReason(const TCHAR *to, const TCHAR *ns, const TCHAR *szItem, const TCHAR *itemVal, const TCHAR *var, const TCHAR *varVal, const TCHAR *rsn)
{
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), to) << XQUERY(ns) << XCHILD(_T("item")) << XATTR(szItem, itemVal) << XATTR(var, varVal) << XCHILD(_T("reason"), rsn));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), to) << XQUERY(ns) << XCHILD(L"item") << XATTR(szItem, itemVal) << XATTR(var, varVal) << XCHILD(L"reason", rsn));
}
void CJabberProto::AdminGet(const TCHAR *to, const TCHAR *ns, const TCHAR *var, const TCHAR *varVal, JABBER_IQ_HANDLER foo)
{
m_ThreadInfo->send(XmlNodeIq(AddIQ(foo, JABBER_IQ_TYPE_GET, to))
- << XQUERY(ns) << XCHILD(_T("item")) << XATTR(var, varVal));
+ << XQUERY(ns) << XCHILD(L"item") << XATTR(var, varVal));
}
// Member info dialog
@@ -919,27 +919,27 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (value) {
case AFFILIATION_NONE:
if (dat->him->m_tszRealJid)
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"none");
else
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("none"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"none");
break;
case AFFILIATION_MEMBER:
if (dat->him->m_tszRealJid)
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("member"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"member");
else
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("member"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"member");
break;
case AFFILIATION_ADMIN:
if (dat->him->m_tszRealJid)
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("admin"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"admin");
else
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("admin"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"admin");
break;
case AFFILIATION_OWNER:
if (dat->him->m_tszRealJid)
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("owner"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"owner");
else
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("affiliation"), _T("owner"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"affiliation", L"owner");
}
break;
@@ -959,13 +959,13 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (value) {
case ROLE_VISITOR:
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("visitor"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"visitor");
break;
case ROLE_PARTICIPANT:
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("participant"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"participant");
break;
case ROLE_MODERATOR:
- dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), dat->him->m_tszResourceName, _T("role"), _T("moderator"));
+ dat->ppro->AdminSet(dat->item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", dat->him->m_tszResourceName, L"role", L"moderator");
break;
}
}
@@ -1016,22 +1016,22 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* TCHAR buf[256];
// do not use snprintf to avoid possible problems with % symbol
- if (TCHAR *p = _tcsstr(szMessage, _T("%s"))) {
+ if (TCHAR *p = _tcsstr(szMessage, L"%s")) {
*p = 0;
- mir_sntprintf(buf, _T("%s%s%s"), szMessage, him->m_tszResourceName, p + 2);
+ mir_sntprintf(buf, L"%s%s%s", szMessage, him->m_tszResourceName, p + 2);
}
else mir_tstrncpy(buf, szMessage, _countof(buf));
UnEscapeChatTags(buf);
ppro->m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("groupchat"))
- << XCHILD(_T("body"), buf));
+ XmlNode(L"message") << XATTR(L"to", item->jid) << XATTR(L"type", L"groupchat")
+ << XCHILD(L"body", buf));
}
break;
case IDM_VCARD:
{
- CMString jid(FORMAT, _T("%s/%s"), item->jid, him->m_tszResourceName);
+ CMString jid(FORMAT, L"%s/%s", item->jid, him->m_tszResourceName);
MCONTACT hContact = ppro->AddToListByJID(jid, PALF_TEMPORARY);
ppro->setTString(hContact, "Nick", him->m_tszResourceName);
@@ -1058,14 +1058,14 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_KICK:
if ((GetTickCount() - dwLastBanKickTime) > BAN_KICK_INTERVAL) {
dwLastBanKickTime = GetTickCount();
- szBuffer.Format(_T("%s: "), me->m_tszResourceName);
+ szBuffer.Format(L"%s: ", me->m_tszResourceName);
szTitle.Format(TranslateT("Reason to kick %s"), him->m_tszResourceName);
TCHAR *resourceName_copy = mir_tstrdup(him->m_tszResourceName); // copy resource name to prevent possible crash if user list rebuilds
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(_T("set"), ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN)
- << XCHILD(_T("item")) << XATTR(_T("nick"), resourceName_copy) << XATTR(_T("role"), _T("none"))
- << XCHILD(_T("reason"), szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN)
+ << XCHILD(L"item") << XATTR(L"nick", resourceName_copy) << XATTR(L"role", L"none")
+ << XCHILD(L"reason", szBuffer));
mir_free(resourceName_copy);
}
@@ -1074,17 +1074,17 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_SET_VISITOR:
if (him->m_role != ROLE_VISITOR)
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("visitor"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"visitor");
break;
case IDM_SET_PARTICIPANT:
if (him->m_role != ROLE_PARTICIPANT)
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("participant"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"participant");
break;
case IDM_SET_MODERATOR:
if (him->m_role != ROLE_MODERATOR)
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("role"), _T("moderator"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"role", L"moderator");
break;
case IDM_SET_NONE:
@@ -1092,9 +1092,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) {
TCHAR szBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid));
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("none"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"none");
}
- else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("none"));
+ else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"none");
}
break;
@@ -1103,9 +1103,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) {
TCHAR szBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid));
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("member"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"member");
}
- else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("member"));
+ else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"member");
}
break;
@@ -1114,9 +1114,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) {
TCHAR szBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid));
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("admin"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"admin");
}
- else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("admin"));
+ else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"admin");
}
break;
@@ -1125,9 +1125,9 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (him->m_tszRealJid) {
TCHAR szBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(him->m_tszRealJid, szBareJid, _countof(szBareJid));
- ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("jid"), szBareJid, _T("affiliation"), _T("owner"));
+ ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"jid", szBareJid, L"affiliation", L"owner");
}
- else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, _T("nick"), him->m_tszResourceName, _T("affiliation"), _T("owner"));
+ else ppro->AdminSet(item->jid, JABBER_FEAT_MUC_ADMIN, L"nick", him->m_tszResourceName, L"affiliation", L"owner");
}
break;
@@ -1137,14 +1137,14 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* TCHAR szVictimBareJid[JABBER_MAX_JID_LEN];
JabberStripJid(him->m_tszRealJid, szVictimBareJid, _countof(szVictimBareJid));
- szBuffer.Format(_T("%s: "), me->m_tszResourceName);
+ szBuffer.Format(L"%s: ", me->m_tszResourceName);
szTitle.Format(TranslateT("Reason to ban %s"), him->m_tszResourceName);
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(_T("set"), ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN)
- << XCHILD(_T("item")) << XATTR(_T("jid"), szVictimBareJid) << XATTR(_T("affiliation"), _T("outcast"))
- << XCHILD(_T("reason"), szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), item->jid) << XQUERY(JABBER_FEAT_MUC_ADMIN)
+ << XCHILD(L"item") << XATTR(L"jid", szVictimBareJid) << XATTR(L"affiliation", L"outcast")
+ << XCHILD(L"reason", szBuffer));
}
}
dwLastBanKickTime = GetTickCount();
@@ -1174,12 +1174,12 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (!ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE))
break;
- szTitle.Format(_T("%s/%s"), item->jid, resourceName_copy);
+ szTitle.Format(L"%s/%s", item->jid, resourceName_copy);
- XmlNode msg(_T("message"));
- msg << XATTR(_T("to"), szTitle) << XATTRID(ppro->SerialNext())
- << XCHILD(_T("x"), szBuffer) << XATTR(_T("xmlns"), JABBER_FEAT_DIRECT_MUC_INVITE) << XATTR(_T("jid"), szInviteTo)
- << XCHILD(_T("invite")) << XATTR(_T("from"), item->nick);
+ XmlNode msg(L"message");
+ msg << XATTR(L"to", szTitle) << XATTRID(ppro->SerialNext())
+ << XCHILD(L"x", szBuffer) << XATTR(L"xmlns", JABBER_FEAT_DIRECT_MUC_INVITE) << XATTR(L"jid", szInviteTo)
+ << XCHILD(L"invite") << XATTR(L"from", item->nick);
ppro->m_ThreadInfo->send(msg);
}
dwLastBanKickTime = GetTickCount();
@@ -1195,7 +1195,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* break;
case IDM_CPY_INROOMJID:
- szBuffer.Format(_T("%s/%s"), item->jid, him->m_tszResourceName);
+ szBuffer.Format(L"%s/%s", item->jid, him->m_tszResourceName);
JabberCopyText(pcli->hwndContactList, szBuffer);
break;
@@ -1239,37 +1239,37 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g switch (gch->dwData) {
case IDM_LST_PARTICIPANT:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("participant"), &CJabberProto::OnIqResultMucGetVoiceList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"role", L"participant", &CJabberProto::OnIqResultMucGetVoiceList);
break;
case IDM_LST_MEMBER:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("member"), &CJabberProto::OnIqResultMucGetMemberList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"member", &CJabberProto::OnIqResultMucGetMemberList);
break;
case IDM_LST_MODERATOR:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("moderator"), &CJabberProto::OnIqResultMucGetModeratorList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"role", L"moderator", &CJabberProto::OnIqResultMucGetModeratorList);
break;
case IDM_LST_BAN:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList);
break;
case IDM_LST_ADMIN:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("admin"), &CJabberProto::OnIqResultMucGetAdminList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"admin", &CJabberProto::OnIqResultMucGetAdminList);
break;
case IDM_LST_OWNER:
- ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("owner"), &CJabberProto::OnIqResultMucGetOwnerList);
+ ppro->AdminGet(gch->pDest->ptszID, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"owner", &CJabberProto::OnIqResultMucGetOwnerList);
break;
case IDM_TOPIC:
szTitle.Format(TranslateT("Set topic for %s"), gch->pDest->ptszID);
szBuffer = item->getTemp()->m_tszStatusMessage;
- szBuffer.Replace(_T("\n"), _T("\r\n"));
+ szBuffer.Replace(L"\n", L"\r\n");
if (ppro->EnterString(szBuffer, szTitle, ESF_RICHEDIT, "gcTopic_"))
ppro->m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("to"), gch->pDest->ptszID) << XATTR(_T("type"), _T("groupchat"))
- << XCHILD(_T("subject"), szBuffer));
+ XmlNode(L"message") << XATTR(L"to", gch->pDest->ptszID) << XATTR(L"type", L"groupchat")
+ << XCHILD(L"subject", szBuffer));
break;
case IDM_NICK:
@@ -1279,7 +1279,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) {
if (ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID) != NULL) {
TCHAR text[1024];
- mir_sntprintf(text, _T("%s/%s"), gch->pDest->ptszID, szBuffer);
+ mir_sntprintf(text, L"%s/%s", gch->pDest->ptszID, szBuffer);
ppro->SendPresenceTo(ppro->m_iStatus == ID_STATUS_INVISIBLE ? ID_STATUS_ONLINE : ppro->m_iStatus, text, NULL);
}
}
@@ -1300,7 +1300,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g if (item == NULL) {
item = ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID);
if (item != NULL) {
- item->type = _T("conference");
+ item->type = L"conference";
MCONTACT hContact = ppro->HContactFromJID(item->jid);
item->name = pcli->pfnGetContactDisplayName(hContact, 0);
ppro->AddEditBookmark(item);
@@ -1312,8 +1312,8 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g szTitle.Format(TranslateT("Reason to destroy %s"), gch->pDest->ptszID);
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(_T("set"), ppro->SerialNext(), gch->pDest->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
- << XCHILD(_T("destroy")) << XCHILD(_T("reason"), szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), gch->pDest->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
+ << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
// fall through
case IDM_LEAVE:
@@ -1333,7 +1333,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g case IDM_LINK5: case IDM_LINK6: case IDM_LINK7: case IDM_LINK8: case IDM_LINK9:
{
int idx = IDM_LINK0;
- for (TCHAR *p = _tcsstr(item->getTemp()->m_tszStatusMessage, _T("http://")); p && *p; p = _tcsstr(p + 1, _T("http://"))) {
+ for (TCHAR *p = _tcsstr(item->getTemp()->m_tszStatusMessage, L"http://"); p && *p; p = _tcsstr(p + 1, L"http://")) {
if (idx == gch->dwData) {
char *bufPtr, *url = mir_t2a(p);
for (bufPtr = url; *bufPtr && !isspace(*bufPtr); ++bufPtr);
@@ -1364,7 +1364,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, const TCHAR *nick)
{
TCHAR szFullJid[JABBER_MAX_JID_LEN];
- mir_sntprintf(szFullJid, _T("%s/%s"), item->jid, nick);
+ mir_sntprintf(szFullJid, L"%s/%s", item->jid, nick);
MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, true, false);
if (hContact != NULL) {
pResourceStatus r(item->findResource(nick));
@@ -1406,8 +1406,8 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) TCHAR *buf = NEWTSTR_ALLOCA(gch->ptszText);
UnEscapeChatTags(buf);
m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("id"), _i64tot(id, tszID, 36)) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("groupchat"))
- << XCHILD(_T("body"), buf));
+ XmlNode(L"message") << XATTR(L"id", _i64tot(id, tszID, 36)) << XATTR(L"to", item->jid) << XATTR(L"type", L"groupchat")
+ << XCHILD(L"body", buf));
}
}
break;
@@ -1438,43 +1438,43 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) void CJabberProto::AddMucListItem(JABBER_MUC_JIDLIST_INFO* jidListInfo, const TCHAR* str, const TCHAR* rsn)
{
- const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? _T("jid") : _T("nick");
+ const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? L"jid" : L"nick";
TCHAR *roomJid = jidListInfo->roomJid;
if (jidListInfo->type == MUC_BANLIST) {
- AdminSetReason(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("outcast"), rsn);
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList);
+ AdminSetReason(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"outcast", rsn);
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList);
}
}
void CJabberProto::AddMucListItem(JABBER_MUC_JIDLIST_INFO* jidListInfo, const TCHAR* str)
{
- const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? _T("jid") : _T("nick");
+ const TCHAR *field = (jidListInfo->type == MUC_BANLIST || _tcschr(str, '@')) ? L"jid" : L"nick";
TCHAR *roomJid = jidListInfo->roomJid;
switch (jidListInfo->type) {
case MUC_VOICELIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("role"), _T("participant"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("participant"), &CJabberProto::OnIqResultMucGetVoiceList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"role", L"participant");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"role", L"participant", &CJabberProto::OnIqResultMucGetVoiceList);
break;
case MUC_MEMBERLIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("member"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("member"), &CJabberProto::OnIqResultMucGetMemberList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"member");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"member", &CJabberProto::OnIqResultMucGetMemberList);
break;
case MUC_MODERATORLIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("role"), _T("moderator"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("role"), _T("moderator"), &CJabberProto::OnIqResultMucGetModeratorList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"role", L"moderator");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"role", L"moderator", &CJabberProto::OnIqResultMucGetModeratorList);
break;
case MUC_BANLIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("outcast"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("outcast"), &CJabberProto::OnIqResultMucGetBanList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"outcast");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"outcast", &CJabberProto::OnIqResultMucGetBanList);
break;
case MUC_ADMINLIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("admin"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("admin"), &CJabberProto::OnIqResultMucGetAdminList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"admin");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"admin", &CJabberProto::OnIqResultMucGetAdminList);
break;
case MUC_OWNERLIST:
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, _T("affiliation"), _T("owner"));
- AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("affiliation"), _T("owner"), &CJabberProto::OnIqResultMucGetOwnerList);
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, field, str, L"affiliation", L"owner");
+ AdminGet(roomJid, JABBER_FEAT_MUC_ADMIN, L"affiliation", L"owner", &CJabberProto::OnIqResultMucGetOwnerList);
break;
}
}
@@ -1485,20 +1485,20 @@ void CJabberProto::DeleteMucListItem(JABBER_MUC_JIDLIST_INFO *jidListInfo, const switch (jidListInfo->type) {
case MUC_VOICELIST: // change role to visitor (from participant)
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("role"), _T("visitor"));
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"role", L"visitor");
break;
case MUC_BANLIST: // change affiliation to none (from outcast)
case MUC_MEMBERLIST: // change affiliation to none (from member)
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("none"));
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"none");
break;
case MUC_MODERATORLIST: // change role to participant (from moderator)
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("role"), _T("participant"));
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"role", L"participant");
break;
case MUC_ADMINLIST: // change affiliation to member (from admin)
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("member"));
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"member");
break;
case MUC_OWNERLIST: // change affiliation to admin (from owner)
- AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, _T("jid"), jid, _T("affiliation"), _T("admin"));
+ AdminSet(roomJid, JABBER_FEAT_MUC_ADMIN, L"jid", jid, L"affiliation", L"admin");
break;
}
}
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index f0306b9ec4..2d1250eb88 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -116,9 +116,9 @@ bool CJabberProto::RecursiveCheckFilter(HXML node, DWORD flags) bool CJabberProto::FilterXml(HXML node, DWORD flags)
{
- if (!m_filterInfo.msg && !mir_tstrcmp(XmlGetName(node), _T("message"))) return false;
- if (!m_filterInfo.presence && !mir_tstrcmp(XmlGetName(node), _T("presence"))) return false;
- if (!m_filterInfo.iq && !mir_tstrcmp(XmlGetName(node), _T("iq"))) return false;
+ if (!m_filterInfo.msg && !mir_tstrcmp(XmlGetName(node), L"message")) return false;
+ if (!m_filterInfo.presence && !mir_tstrcmp(XmlGetName(node), L"presence")) return false;
+ if (!m_filterInfo.iq && !mir_tstrcmp(XmlGetName(node), L"iq")) return false;
if (m_filterInfo.type == TFilterInfo::T_OFF) return true;
mir_cslock lck(m_filterInfo.csPatternLock);
@@ -126,14 +126,14 @@ bool CJabberProto::FilterXml(HXML node, DWORD flags) const TCHAR *attrValue;
switch (m_filterInfo.type) {
case TFilterInfo::T_JID:
- attrValue = XmlGetAttrValue(node, (flags & JCPF_OUT) ? _T("to") : _T("from"));
+ attrValue = XmlGetAttrValue(node, (flags & JCPF_OUT) ? L"to" : L"from");
if (attrValue)
return JabberStrIStr(attrValue, m_filterInfo.pattern) != NULL;
break;
case TFilterInfo::T_XMLNS:
if (XmlGetChildCount(node)) {
- attrValue = XmlGetAttrValue(XmlGetChild(node, 0), _T("xmlns"));
+ attrValue = XmlGetAttrValue(XmlGetChild(node, 0), L"xmlns");
if (attrValue)
return JabberStrIStr(attrValue, m_filterInfo.pattern) != NULL;
}
@@ -305,10 +305,10 @@ struct }
static filter_modes[] =
{
- { TFilterInfo::T_JID, _T("JID"), "main" },
- { TFilterInfo::T_XMLNS, _T("xmlns"), "xmlconsole" },
- { TFilterInfo::T_ANY, _T("all attributes"), "sd_filter_apply" },
- { TFilterInfo::T_OFF, _T("disabled"), "sd_filter_reset" },
+ { TFilterInfo::T_JID, L"JID", "main" },
+ { TFilterInfo::T_XMLNS, L"xmlns", "xmlconsole" },
+ { TFilterInfo::T_ANY, L"all attributes", "sd_filter_apply" },
+ { TFilterInfo::T_OFF, L"disabled", "sd_filter_reset" },
};
class CJabberDlgConsole: public CJabberDlgBase
@@ -522,12 +522,12 @@ INT_PTR CJabberDlgConsole::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) mir_free(textToSend);
- SetDlgItemText(m_hwnd, IDC_CONSOLEIN, _T(""));
+ SetDlgItemText(m_hwnd, IDC_CONSOLEIN, L"");
}
return TRUE;
case IDC_RESET:
- SetDlgItemText(m_hwnd, IDC_CONSOLE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_CONSOLE, L"");
break;
case IDC_BTN_MSG:
@@ -615,7 +615,7 @@ void __cdecl CJabberProto::ConsoleThread(void*) HMODULE hMsftedit;
void CJabberProto::ConsoleInit()
{
- hMsftedit = LoadLibrary(_T("Msftedit.dll"));
+ hMsftedit = LoadLibrary(L"Msftedit.dll");
m_hThreadConsole = ForkThreadEx(&CJabberProto::ConsoleThread, 0, &m_dwConsoleThreadId);
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index e5f6df0342..7d49935abc 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -63,104 +63,104 @@ static struct } sttNodeIcons[] =
{
// standard identities: http://www.xmpp.org/registrar/disco-categories.html#directory
- // {NULL, _T("account"), _T("admin"), NULL, 0},
- // {NULL, _T("account"), _T("anonymous"), NULL, 0},
- // {NULL, _T("account"), _T("registered"), NULL, 0},
- {NULL, _T("account"), NULL, NULL, SKINICON_STATUS_ONLINE},
-
- // {NULL, _T("auth"), _T("cert"), NULL, 0},
- // {NULL, _T("auth"), _T("generic"), NULL, 0},
- // {NULL, _T("auth"), _T("ldap"), NULL, 0},
- // {NULL, _T("auth"), _T("ntlm"), NULL, 0},
- // {NULL, _T("auth"), _T("pam"), NULL, 0},
- // {NULL, _T("auth"), _T("radius"), NULL, 0},
- {NULL, _T("auth"), NULL, "key", 0},
-
- /// {NULL, _T("automation"), _T("command-list"), NULL, 0},
- /// {NULL, _T("automation"), _T("command-node"), NULL, 0},
- // {NULL, _T("automation"), _T("rpc"), NULL, 0},
- // {NULL, _T("automation"), _T("soap"), NULL, 0},
- {NULL, _T("automation"), NULL, "adhoc", 0},
-
- // {NULL, _T("client"), _T("bot"), NULL, 0},
- // {NULL, _T("client"), _T("console"), NULL, 0},
- // {NULL, _T("client"), _T("handheld"), NULL, 0},
- // {NULL, _T("client"), _T("pc"), NULL, 0},
- // {NULL, _T("client"), _T("phone"), NULL, 0},
- // {NULL, _T("client"), _T("web"), NULL, 0},
- {NULL, _T("client"), NULL, NULL, SKINICON_STATUS_ONLINE},
-
- // {NULL, _T("collaboration"), _T("whiteboard"), NULL, 0},
- {NULL, _T("collaboration"), NULL, "group", 0},
-
- // {NULL, _T("component"), _T("archive"), NULL, 0},
- // {NULL, _T("component"), _T("c2s"), NULL, 0},
- // {NULL, _T("component"), _T("generic"), NULL, 0},
- // {NULL, _T("component"), _T("load"), NULL, 0},
- // {NULL, _T("component"), _T("log"), NULL, 0},
- // {NULL, _T("component"), _T("presence"), NULL, 0},
- // {NULL, _T("component"), _T("router"), NULL, 0},
- // {NULL, _T("component"), _T("s2s"), NULL, 0},
- // {NULL, _T("component"), _T("sm"), NULL, 0},
- // {NULL, _T("component"), _T("stats"), NULL, 0},
-
- // {NULL, _T("conference"), _T("irc"), NULL, 0},
- // {NULL, _T("conference"), _T("text"), NULL, 0},
- {NULL, _T("conference"), NULL, "group", 0},
-
- {NULL, _T("directory"), _T("chatroom"), "group", 0},
- {NULL, _T("directory"), _T("group"), "group", 0},
- {NULL, _T("directory"), _T("user"), NULL, SKINICON_OTHER_FINDUSER},
- // {NULL, _T("directory"), _T("waitinglist"), NULL, 0},
- {NULL, _T("directory"), NULL, NULL, SKINICON_OTHER_SEARCHALL},
-
- {NULL, _T("gateway"), _T("aim"), "AIM", SKINICON_STATUS_ONLINE},
- {NULL, _T("gateway"), _T("gadu-gadu"), "GG", SKINICON_STATUS_ONLINE},
- // {NULL, _T("gateway"), _T("http-ws"), NUL, 0},
- {NULL, _T("gateway"), _T("icq"), "ICQ", SKINICON_STATUS_ONLINE},
- {NULL, _T("gateway"), _T("msn"), "MSN", SKINICON_STATUS_ONLINE},
- {NULL, _T("gateway"), _T("qq"), "QQ", SKINICON_STATUS_ONLINE},
- // {NULL, _T("gateway"), _T("sms"), NULL, 0},
- // {NULL, _T("gateway"), _T("smtp"), NULL, 0},
- {NULL, _T("gateway"), _T("tlen"), "TLEN", SKINICON_STATUS_ONLINE},
- {NULL, _T("gateway"), _T("yahoo"), "YAHOO", SKINICON_STATUS_ONLINE},
- {NULL, _T("gateway"), NULL, "Agents", 0},
-
- // {NULL, _T("headline"), _T("newmail"), NULL, 0},
- {NULL, _T("headline"), _T("rss"), "node_rss", 0},
- {NULL, _T("headline"), _T("weather"), "node_weather", 0},
-
- // {NULL, _T("hierarchy"), _T("branch"), NULL, 0},
- // {NULL, _T("hierarchy"), _T("leaf"), NULL, 0},
-
- // {NULL, _T("proxy"), _T("bytestreams"), NULL, 0},
- {NULL, _T("proxy"), NULL, NULL, SKINICON_EVENT_FILE},
-
- // {NULL, _T("pubsub"), _T("collection"), NULL, 0},
- // {NULL, _T("pubsub"), _T("leaf"), NULL, 0},
- // {NULL, _T("pubsub"), _T("pep"), NULL, 0},
- // {NULL, _T("pubsub"), _T("service"), NULL, 0},
-
- // {NULL, _T("server"), _T("im"), NULL, 0},
- {NULL, _T("server"), NULL, "node_server", 0},
-
- // {NULL, _T("store"), _T("berkeley"), NULL, 0},
- /// {NULL, _T("store"), _T("file"), NULL, 0},
- // {NULL, _T("store"), _T("generic"), NULL, 0},
- // {NULL, _T("store"), _T("ldap"), NULL, 0},
- // {NULL, _T("store"), _T("mysql"), NULL, 0},
- // {NULL, _T("store"), _T("oracle"), NULL, 0},
- // {NULL, _T("store"), _T("postgres"), NULL, 0},
- {NULL, _T("store"), NULL, "node_store", 0},
+ // {NULL, L"account", L"admin", NULL, 0},
+ // {NULL, L"account", L"anonymous", NULL, 0},
+ // {NULL, L"account", L"registered", NULL, 0},
+ {NULL, L"account", NULL, NULL, SKINICON_STATUS_ONLINE},
+
+ // {NULL, L"auth", L"cert", NULL, 0},
+ // {NULL, L"auth", L"generic", NULL, 0},
+ // {NULL, L"auth", L"ldap", NULL, 0},
+ // {NULL, L"auth", L"ntlm", NULL, 0},
+ // {NULL, L"auth", L"pam", NULL, 0},
+ // {NULL, L"auth", L"radius", NULL, 0},
+ {NULL, L"auth", NULL, "key", 0},
+
+ /// {NULL, L"automation", L"command-list", NULL, 0},
+ /// {NULL, L"automation", L"command-node", NULL, 0},
+ // {NULL, L"automation", L"rpc", NULL, 0},
+ // {NULL, L"automation", L"soap", NULL, 0},
+ {NULL, L"automation", NULL, "adhoc", 0},
+
+ // {NULL, L"client", L"bot", NULL, 0},
+ // {NULL, L"client", L"console", NULL, 0},
+ // {NULL, L"client", L"handheld", NULL, 0},
+ // {NULL, L"client", L"pc", NULL, 0},
+ // {NULL, L"client", L"phone", NULL, 0},
+ // {NULL, L"client", L"web", NULL, 0},
+ {NULL, L"client", NULL, NULL, SKINICON_STATUS_ONLINE},
+
+ // {NULL, L"collaboration", L"whiteboard", NULL, 0},
+ {NULL, L"collaboration", NULL, "group", 0},
+
+ // {NULL, L"component", L"archive", NULL, 0},
+ // {NULL, L"component", L"c2s", NULL, 0},
+ // {NULL, L"component", L"generic", NULL, 0},
+ // {NULL, L"component", L"load", NULL, 0},
+ // {NULL, L"component", L"log", NULL, 0},
+ // {NULL, L"component", L"presence", NULL, 0},
+ // {NULL, L"component", L"router", NULL, 0},
+ // {NULL, L"component", L"s2s", NULL, 0},
+ // {NULL, L"component", L"sm", NULL, 0},
+ // {NULL, L"component", L"stats", NULL, 0},
+
+ // {NULL, L"conference", L"irc", NULL, 0},
+ // {NULL, L"conference", L"text", NULL, 0},
+ {NULL, L"conference", NULL, "group", 0},
+
+ {NULL, L"directory", L"chatroom", "group", 0},
+ {NULL, L"directory", L"group", "group", 0},
+ {NULL, L"directory", L"user", NULL, SKINICON_OTHER_FINDUSER},
+ // {NULL, L"directory", L"waitinglist", NULL, 0},
+ {NULL, L"directory", NULL, NULL, SKINICON_OTHER_SEARCHALL},
+
+ {NULL, L"gateway", L"aim", "AIM", SKINICON_STATUS_ONLINE},
+ {NULL, L"gateway", L"gadu-gadu", "GG", SKINICON_STATUS_ONLINE},
+ // {NULL, L"gateway", L"http-ws", NUL, 0},
+ {NULL, L"gateway", L"icq", "ICQ", SKINICON_STATUS_ONLINE},
+ {NULL, L"gateway", L"msn", "MSN", SKINICON_STATUS_ONLINE},
+ {NULL, L"gateway", L"qq", "QQ", SKINICON_STATUS_ONLINE},
+ // {NULL, L"gateway", L"sms", NULL, 0},
+ // {NULL, L"gateway", L"smtp", NULL, 0},
+ {NULL, L"gateway", L"tlen", "TLEN", SKINICON_STATUS_ONLINE},
+ {NULL, L"gateway", L"yahoo", "YAHOO", SKINICON_STATUS_ONLINE},
+ {NULL, L"gateway", NULL, "Agents", 0},
+
+ // {NULL, L"headline", L"newmail", NULL, 0},
+ {NULL, L"headline", L"rss", "node_rss", 0},
+ {NULL, L"headline", L"weather", "node_weather", 0},
+
+ // {NULL, L"hierarchy", L"branch", NULL, 0},
+ // {NULL, L"hierarchy", L"leaf", NULL, 0},
+
+ // {NULL, L"proxy", L"bytestreams", NULL, 0},
+ {NULL, L"proxy", NULL, NULL, SKINICON_EVENT_FILE},
+
+ // {NULL, L"pubsub", L"collection", NULL, 0},
+ // {NULL, L"pubsub", L"leaf", NULL, 0},
+ // {NULL, L"pubsub", L"pep", NULL, 0},
+ // {NULL, L"pubsub", L"service", NULL, 0},
+
+ // {NULL, L"server", L"im", NULL, 0},
+ {NULL, L"server", NULL, "node_server", 0},
+
+ // {NULL, L"store", L"berkeley", NULL, 0},
+ /// {NULL, L"store", L"file", NULL, 0},
+ // {NULL, L"store", L"generic", NULL, 0},
+ // {NULL, L"store", L"ldap", NULL, 0},
+ // {NULL, L"store", L"mysql", NULL, 0},
+ // {NULL, L"store", L"oracle", NULL, 0},
+ // {NULL, L"store", L"postgres", NULL, 0},
+ {NULL, L"store", NULL, "node_store", 0},
// icons for non-standard identities
- {NULL, _T("x-service"), _T("x-rss"), "node_rss", 0},
- {NULL, _T("application"), _T("x-weather"), "node_weather", 0},
- {NULL, _T("user"), NULL, NULL, SKINICON_STATUS_ONLINE},
+ {NULL, L"x-service", L"x-rss", "node_rss", 0},
+ {NULL, L"application", L"x-weather", "node_weather", 0},
+ {NULL, L"user", NULL, NULL, SKINICON_STATUS_ONLINE},
// icon suggestions based on supported features
- {_T("jabber:iq:gateway"), NULL, NULL, "Agents", 0},
- {_T("jabber:iq:search"), NULL, NULL, NULL, SKINICON_OTHER_FINDUSER},
+ {L"jabber:iq:gateway", NULL, NULL, "Agents", 0},
+ {L"jabber:iq:search", NULL, NULL, NULL, SKINICON_OTHER_FINDUSER},
{ JABBER_FEAT_COMMANDS, NULL, NULL, "adhoc", 0},
{ JABBER_FEAT_REGISTER, NULL, NULL, "key", 0},
};
@@ -181,11 +181,11 @@ void CJabberProto::OnIqResultServiceDiscoveryInfo(HXML iqNode, CJabberIqInfo *pI else {
HXML feature;
int i;
- for (i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++)
- pNode->AddFeature(XmlGetAttrValue(feature, _T("var")));
+ for (i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++)
+ pNode->AddFeature(XmlGetAttrValue(feature, L"var"));
HXML identity;
- for (i = 1; (identity = XmlGetNthChild(query, _T("identity"), i)) != NULL; i++)
- pNode->AddIdentity(XmlGetAttrValue(identity, _T("category")), XmlGetAttrValue(identity, _T("type")), XmlGetAttrValue(identity, _T("name")));
+ for (i = 1; (identity = XmlGetNthChild(query, L"identity", i)) != NULL; i++)
+ pNode->AddIdentity(XmlGetAttrValue(identity, L"category"), XmlGetAttrValue(identity, L"type"), XmlGetAttrValue(identity, L"name"));
pNode->SetInfoRequestId(JABBER_DISCO_RESULT_OK);
pNode->SetInfoRequestErrorText(NULL);
@@ -224,8 +224,8 @@ void CJabberProto::OnIqResultServiceDiscoveryItems(HXML iqNode, CJabberIqInfo *p pNode->SetItemsRequestId(JABBER_DISCO_RESULT_ERROR);
else {
HXML item;
- for (int i = 1; (item = XmlGetNthChild(query, _T("item"), i)) != NULL; i++)
- pNode->AddChildNode(XmlGetAttrValue(item, _T("jid")), XmlGetAttrValue(item, _T("node")), XmlGetAttrValue(item, _T("name")));
+ for (int i = 1; (item = XmlGetNthChild(query, L"item", i)) != NULL; i++)
+ pNode->AddChildNode(XmlGetAttrValue(item, L"jid"), XmlGetAttrValue(item, L"node"), XmlGetAttrValue(item, L"name"));
pNode->SetItemsRequestId(JABBER_DISCO_RESULT_OK);
pNode->SetItemsRequestErrorText(NULL);
@@ -239,7 +239,7 @@ void CJabberProto::OnIqResultServiceDiscoveryItems(HXML iqNode, CJabberIqInfo *p mir_free(str);
}
else {
- pNode->SetItemsRequestErrorText(_T("request timeout."));
+ pNode->SetItemsRequestErrorText(L"request timeout.");
}
pNode->SetItemsRequestId(JABBER_DISCO_RESULT_ERROR);
}
@@ -261,9 +261,9 @@ void CJabberProto::OnIqResultServiceDiscoveryRootInfo(HXML iqNode, CJabberIqInfo HXML query = XmlGetChild(iqNode, "query");
if (query) {
HXML feature;
- for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) {
- if (!mir_tstrcmp(XmlGetAttrValue(feature, _T("var")), (TCHAR *)pInfo->m_pUserData)) {
- CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttrValue(iqNode, _T("node")), NULL);
+ for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) {
+ if (!mir_tstrcmp(XmlGetAttrValue(feature, L"var"), (TCHAR *)pInfo->m_pUserData)) {
+ CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), XmlGetAttrValue(iqNode, L"node"), NULL);
SendBothRequests(pNode, NULL);
break;
}
@@ -286,15 +286,15 @@ void CJabberProto::OnIqResultServiceDiscoveryRootItems(HXML iqNode, CJabberIqInf HXML query = XmlGetChild(iqNode, "query");
if (query) {
HXML item;
- for (int i = 1; (item = XmlGetNthChild(query, _T("item"), i)) != NULL; i++) {
- const TCHAR *szJid = XmlGetAttrValue(item, _T("jid"));
- const TCHAR *szNode = XmlGetAttrValue(item, _T("node"));
+ for (int i = 1; (item = XmlGetNthChild(query, L"item", i)) != NULL; i++) {
+ const TCHAR *szJid = XmlGetAttrValue(item, L"jid");
+ const TCHAR *szNode = XmlGetAttrValue(item, L"node");
CJabberIqInfo *pNewInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootInfo, JABBER_IQ_TYPE_GET, szJid);
pNewInfo->m_pUserData = pInfo->m_pUserData;
pNewInfo->SetTimeout(30000);
XmlNodeIq iq(pNewInfo);
- iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), szNode);
+ iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", szNode);
XmlAddChild(packet, iq);
}
}
@@ -319,7 +319,7 @@ BOOL CJabberProto::SendInfoRequest(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo);
HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO);
if (pNode->GetNode())
- XmlAddAttr(query, _T("node"), pNode->GetNode());
+ XmlAddAttr(query, L"node", pNode->GetNode());
if (parent)
XmlAddChild(parent, iq);
@@ -349,7 +349,7 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo);
HXML query = iq << XQUERY(JABBER_FEAT_DISCO_INFO);
if (pNode->GetNode())
- XmlAddAttr(query, _T("node"), pNode->GetNode());
+ XmlAddAttr(query, L"node", pNode->GetNode());
if (parent)
XmlAddChild(parent, iq);
@@ -366,7 +366,7 @@ BOOL CJabberProto::SendBothRequests(CJabberSDNode *pNode, HXML parent) XmlNodeIq iq(pInfo);
HXML query = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS);
if (pNode->GetNode())
- XmlAddAttr(query, _T("node"), pNode->GetNode());
+ XmlAddAttr(query, L"node", pNode->GetNode());
if (parent)
XmlAddChild(parent, iq);
@@ -437,7 +437,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) sttBrowseMode = SD_BROWSE_AGENTS;
TCHAR *szServerJid = mir_a2t(m_ThreadInfo->conn.server);
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootItems, JABBER_IQ_TYPE_GET, szServerJid);
- pInfo->m_pUserData = (void*)_T("jabber:iq:gateway");
+ pInfo->m_pUserData = (void*)L"jabber:iq:gateway";
pInfo->SetTimeout(30000);
XmlNodeIq iq(pInfo);
iq << XQUERY(JABBER_FEAT_DISCO_ITEMS);
@@ -635,12 +635,12 @@ void CJabberDlgDiscovery::OnInitDialog() if (m_jid) {
SetDlgItemText(m_hwnd, IDC_COMBO_JID, m_jid);
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
m_focusEditAfterBrowse = false;
}
else {
SetDlgItemTextA(m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->conn.server);
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
m_focusEditAfterBrowse = true;
}
@@ -668,7 +668,7 @@ void CJabberDlgDiscovery::OnInitDialog() ListView_InsertColumn(hwndList, 0, &lvc);
lvc.cx = m_proto->getWord("discoWnd_cx1", 200);
lvc.iSubItem = 1;
- lvc.pszText = _T("JID");
+ lvc.pszText = L"JID";
ListView_InsertColumn(hwndList, 1, &lvc);
lvc.cx = m_proto->getWord("discoWnd_cx2", 200);
lvc.iSubItem = 2;
@@ -790,7 +790,7 @@ void CJabberDlgDiscovery::btnViewAsList_OnClick(CCtrlButton *) void CJabberDlgDiscovery::btnGoHome_OnClick(CCtrlButton *)
{
SetDlgItemTextA(m_hwnd, IDC_COMBO_JID, m_proto->m_ThreadInfo->conn.server);
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
}
@@ -846,8 +846,8 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) else {
res /= 10;
- SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(""));
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_JID, L"");
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
char setting[MAXMODULELABELLENGTH];
mir_snprintf(setting, "discoWnd_favJID_%d", res);
@@ -889,7 +889,7 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(SD_FAKEJID_CONFERENCES));
break;
}
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
}
@@ -948,7 +948,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case WM_JABBER_TRANSPORT_REFRESH:
if (m_proto->m_nSDBrowseMode == SD_BROWSE_MYAGENTS) {
SetDlgItemText(m_hwnd, IDC_COMBO_JID, _T(SD_FAKEJID_MYAGENTS));
- SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
+ SetDlgItemText(m_hwnd, IDC_COMBO_NODE, L"");
PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
}
break;
@@ -1189,15 +1189,15 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM { NULL, LPGENT("Add to favorites"), SD_ACT_FAVORITE},
{ NULL, LPGENT("Add to roster"), SD_ACT_ROSTER, SD_FLG_NONODE | SD_FLG_NOTONROSTER},
{ JABBER_FEAT_MUC, LPGENT("Bookmark chatroom"), SD_ACT_BOOKMARK, SD_FLG_NORESOURCE | SD_FLG_HASUSER},
- { _T("jabber:iq:search"), LPGENT("Add search directory"), SD_ACT_ADDDIRECTORY},
+ { L"jabber:iq:search", LPGENT("Add search directory"), SD_ACT_ADDDIRECTORY},
{ JABBER_FEAT_BYTESTREAMS, LPGENT("Use this proxy"), SD_ACT_PROXY},
{0},
{ JABBER_FEAT_REGISTER, LPGENT("Register"), SD_ACT_REGISTER},
- { _T("jabber:iq:gateway"), LPGENT("Unregister"), SD_ACT_UNREGISTER, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED},
+ { L"jabber:iq:gateway", LPGENT("Unregister"), SD_ACT_UNREGISTER, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED},
{ JABBER_FEAT_COMMANDS, LPGENT("Commands..."), SD_ACT_ADHOC},
{0},
- { _T("jabber:iq:gateway"), LPGENT("Logon"), SD_ACT_LOGON, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_ONLINE},
- { _T("jabber:iq:gateway"), LPGENT("Logoff"), SD_ACT_LOGOFF, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_NOTONLINE},
+ { L"jabber:iq:gateway", LPGENT("Logon"), SD_ACT_LOGON, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_ONLINE},
+ { L"jabber:iq:gateway", LPGENT("Logoff"), SD_ACT_LOGOFF, SD_FLG_ONROSTER | SD_FLG_SUBSCRIBED | SD_FLG_NOTONLINE},
{0},
{ NULL, LPGENT("Copy JID"), SD_ACT_COPYJID},
{ NULL, LPGENT("Copy node name"), SD_ACT_COPYNODE},
@@ -1345,7 +1345,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM mir_snprintf(setting, "discoWnd_favJID_%d", count);
setTString(setting, pNode->GetJid());
mir_snprintf(setting, "discoWnd_favNode_%d", count);
- setTString(setting, pNode->GetNode() ? pNode->GetNode() : _T(""));
+ setTString(setting, pNode->GetNode() ? pNode->GetNode() : L"");
setDword("discoWnd_favCount", ++count);
}
break;
@@ -1384,7 +1384,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM item->name = mir_tstrdup(pNode->GetName());
}
- item->type = _T("conference");
+ item->type = L"conference";
AddEditBookmark(item);
}
}
@@ -1433,14 +1433,14 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_LOGON:
case SD_ACT_LOGOFF:
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), pNode->GetJid()) << XATTR(_T("type"), (res != SD_ACT_LOGON) ? _T("unavailable") : NULL));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", pNode->GetJid()) << XATTR(L"type", (res != SD_ACT_LOGON) ? L"unavailable" : NULL));
break;
case SD_ACT_UNREGISTER:
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), pNode->GetJid()) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove")));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), pNode->GetJid()) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(L"remove"));
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER)
- << XCHILD(_T("item")) << XATTR(_T("jid"), pNode->GetJid()) << XATTR(_T("subscription"), _T("remove")));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER)
+ << XCHILD(L"item") << XATTR(L"jid", pNode->GetJid()) << XATTR(L"subscription", L"remove"));
break;
default:
diff --git a/protocols/JabberG/src/jabber_disco.h b/protocols/JabberG/src/jabber_disco.h index 55422f9358..9c327a60f4 100644 --- a/protocols/JabberG/src/jabber_disco.h +++ b/protocols/JabberG/src/jabber_disco.h @@ -349,23 +349,23 @@ public: {
CMString tszTmp;
- tszTmp.AppendFormat(_T("Jid: %s\r\n"), m_szJid);
+ tszTmp.AppendFormat(L"Jid: %s\r\n", m_szJid);
if (m_szNode)
- tszTmp.AppendFormat(_T("%s: %s\r\n"), TranslateT("Node"), m_szNode);
+ tszTmp.AppendFormat(L"%s: %s\r\n", TranslateT("Node"), m_szNode);
if (m_pIdentities) {
- tszTmp.AppendFormat(_T("\r\n%s:\r\n"), TranslateT("Identities"));
+ tszTmp.AppendFormat(L"\r\n%s:\r\n", TranslateT("Identities"));
CJabberSDIdentity *pIdentity = m_pIdentities;
while (pIdentity) {
if (pIdentity->GetName())
- tszTmp.AppendFormat(_T(" %c %s (%s: %s, %s: %s)\r\n"),
+ tszTmp.AppendFormat(L" %c %s (%s: %s, %s: %s)\r\n",
CHR_BULLET, pIdentity->GetName(),
TranslateT("category"), pIdentity->GetCategory(),
TranslateT("type"), pIdentity->GetType());
else
- tszTmp.AppendFormat(_T(" %c %s: %s, %s: %s\r\n"),
+ tszTmp.AppendFormat(L" %c %s: %s, %s: %s\r\n",
CHR_BULLET,
TranslateT("Category"), pIdentity->GetCategory(),
TranslateT("Type"), pIdentity->GetType());
@@ -375,17 +375,17 @@ public: }
if (m_pFeatures) {
- tszTmp.AppendFormat(_T("\r\n%s:\r\n"), TranslateT("Supported features"));
+ tszTmp.AppendFormat(L"\r\n%s:\r\n", TranslateT("Supported features"));
for (CJabberSDFeature *pFeature = m_pFeatures; pFeature; pFeature = pFeature->GetNext())
- tszTmp.AppendFormat(_T(" %c %s\r\n"), CHR_BULLET, pFeature->GetVar());
+ tszTmp.AppendFormat(L" %c %s\r\n", CHR_BULLET, pFeature->GetVar());
}
if (m_szInfoError)
- tszTmp.AppendFormat(_T("\r\n%s: %s\r\n"), TranslateT("Info request error"), m_szInfoError);
+ tszTmp.AppendFormat(L"\r\n%s: %s\r\n", TranslateT("Info request error"), m_szInfoError);
if (m_szItemsError)
- tszTmp.AppendFormat(_T("\r\n%s: %s\r\n"), TranslateT("Items request error"), m_szItemsError);
+ tszTmp.AppendFormat(L"\r\n%s: %s\r\n", TranslateT("Items request error"), m_szItemsError);
tszTmp.TrimRight();
_tcsncpy_s(szText, nMaxLength, tszTmp, _TRUNCATE);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 5c293e4f79..b78c31f4c0 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -46,12 +46,12 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) JabberStripJid(m_ThreadInfo->fullJID, szStrippedJid, _countof(szStrippedJid));
TCHAR *szDog = _tcschr(szStrippedJid, _T('@'));
if (szDog && mir_tstrcmpi(szDog + 1, jid))
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove")));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(L"remove"));
}
// Remove from roster, server also handles the presence unsubscription process.
- m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER)
- << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), _T("remove")));
+ m_ThreadInfo->send(XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_IQ_ROSTER)
+ << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"subscription", L"remove"));
}
return 0;
}
@@ -97,7 +97,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC else {
TCHAR *p = sttSettingToTchar(cws);
if (cws->value.pszVal != NULL && mir_tstrcmp(p, item->group)) {
- debugLog(_T("Group set to %s"), p);
+ debugLog(L"Group set to %s", p);
if (p)
AddContactToRoster(item->jid, tszNick, p);
}
@@ -120,7 +120,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT ptrT newNick( sttSettingToTchar(cws));
if (newNick && mir_tstrcmp(item->nick, newNick)) {
- debugLog(_T("Renaming contact %s: %s -> %s"), item->jid, item->nick, newNick);
+ debugLog(L"Renaming contact %s: %s -> %s", item->jid, item->nick, newNick);
AddContactToRoster(item->jid, newNick, item->group);
}
}
@@ -134,7 +134,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT if (jid == NULL)
return;
- debugLog(_T("Add %s permanently to list"), jid);
+ debugLog(L"Add %s permanently to list", jid);
ptrT nick(db_get_tsa(hContact, "CList", "MyHandle"));
if (nick == NULL)
nick = getTStringA(hContact, "Nick");
@@ -145,10 +145,10 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONT AddContactToRoster(jid, nick, ptrT(db_get_tsa(hContact, "CList", "Group")));
- XmlNode xPresence(_T("presence")); xPresence << XATTR(_T("to"), LPCTSTR(jid)) << XATTR(_T("type"), _T("subscribe"));
+ XmlNode xPresence(L"presence"); xPresence << XATTR(L"to", LPCTSTR(jid)) << XATTR(L"type", L"subscribe");
ptrT myNick(getTStringA(NULL, "Nick"));
if (myNick != NULL)
- xPresence << XCHILD(_T("nick"), LPCTSTR(myNick)) << XATTR(_T("xmlns"), JABBER_FEAT_NICK);
+ xPresence << XCHILD(L"nick", LPCTSTR(myNick)) << XATTR(L"xmlns", JABBER_FEAT_NICK);
m_ThreadInfo->send(xPresence);
SendGetVcard(jid);
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 69951806b0..aef5167c73 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -179,7 +179,7 @@ void JabberFileServerConnection(JABBER_SOCKET hConnection, DWORD /*dwRemoteIP*/, CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hConnection, (LPARAM)&connInfo);
TCHAR szPort[10];
- mir_sntprintf(szPort, _T("%d"), connInfo.wPort);
+ mir_sntprintf(szPort, L"%d", connInfo.wPort);
ppro->debugLogA("File server incoming connection accepted: %s", connInfo.szIpPort);
JABBER_LIST_ITEM *item = ppro->ListGetItemPtr(LIST_FILE, szPort);
@@ -260,7 +260,7 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) ft->hFileEvent = hEvent;
TCHAR szPort[20];
- mir_sntprintf(szPort, _T("%d"), nlb.wPort);
+ mir_sntprintf(szPort, L"%d", nlb.wPort);
JABBER_LIST_ITEM *item = ListAdd(LIST_FILE, szPort);
item->ft = ft;
@@ -294,12 +294,12 @@ void __cdecl CJabberProto::FileServerThread(filetransfer *ft) size_t len = mir_tstrlen(ptszResource) + mir_tstrlen(ft->jid) + 2;
TCHAR *fulljid = (TCHAR *)alloca(sizeof(TCHAR) * len);
- mir_sntprintf(fulljid, len, _T("%s/%s"), ft->jid, ptszResource);
+ mir_sntprintf(fulljid, len, L"%s/%s", ft->jid, ptszResource);
- XmlNodeIq iq(_T("set"), ft->szId, fulljid);
+ XmlNodeIq iq(L"set", ft->szId, fulljid);
HXML query = iq << XQUERY(JABBER_FEAT_OOB);
- query << XCHILD(_T("url"), _A2T(szAddr));
- query << XCHILD(_T("desc"), ft->szDescription);
+ query << XCHILD(L"url", _A2T(szAddr));
+ query << XCHILD(L"desc", ft->szDescription);
m_ThreadInfo->send(iq);
debugLogA("Waiting for the file to be sent...");
@@ -390,11 +390,11 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, if (ft->httpPath == NULL)
debugLogA("Requested file name does not matched (httpPath == NULL)");
else
- debugLog(_T("Requested file name does not matched ('%s' vs. '%s')"), ft->httpPath, t);
+ debugLog(L"Requested file name does not matched ('%s' vs. '%s')", ft->httpPath, t);
ft->state = FT_ERROR;
break;
}
- debugLog(_T("Sending [%s]"), ft->std.ptszFiles[currentFile]);
+ debugLog(L"Sending [%s]", ft->std.ptszFiles[currentFile]);
_tstati64(ft->std.ptszFiles[currentFile], &statbuf); // file size in statbuf.st_size
if ((fileId = _topen(ft->std.ptszFiles[currentFile], _O_BINARY | _O_RDONLY)) < 0) {
debugLogA("File cannot be opened");
@@ -501,7 +501,7 @@ int filetransfer::create() return fileId;
TCHAR filefull[MAX_PATH];
- mir_sntprintf(filefull, _T("%s\\%s"), std.tszWorkingDir, std.tszCurrentFile);
+ mir_sntprintf(filefull, L"%s\\%s", std.tszWorkingDir, std.tszCurrentFile);
replaceStrT(std.tszCurrentFile, filefull);
if (hWaitEvent != INVALID_HANDLE_VALUE)
@@ -512,12 +512,12 @@ int filetransfer::create() WaitForSingleObject(hWaitEvent, INFINITE);
if (fileId == -1) {
- ppro->debugLog(_T("Saving to [%s]"), std.tszCurrentFile);
+ ppro->debugLog(L"Saving to [%s]", std.tszCurrentFile);
fileId = _topen(std.tszCurrentFile, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE);
}
if (fileId == -1)
- ppro->debugLog(_T("Cannot create file '%s' during a file transfer"), filefull);
+ ppro->debugLog(L"Cannot create file '%s' during a file transfer", filefull);
else if (std.currentFileSize != 0)
_chsize(fileId, std.currentFileSize);
diff --git a/protocols/JabberG/src/jabber_filterlist.cpp b/protocols/JabberG/src/jabber_filterlist.cpp index ad79a42e9a..f03bf49ee1 100644 --- a/protocols/JabberG/src/jabber_filterlist.cpp +++ b/protocols/JabberG/src/jabber_filterlist.cpp @@ -180,7 +180,7 @@ LRESULT CCtrlFilterListView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lPara case 2:
fdat->m_hwndOwner = m_hwnd;
- fdat->m_hwndEditBox = CreateWindow(_T("edit"), fdat->m_filterText,
+ fdat->m_hwndEditBox = CreateWindow(L"edit", fdat->m_filterText,
WS_CHILD|WS_VISIBLE|WS_TABSTOP|ES_LEFT|ES_AUTOHSCROLL,
0, 0, 0, 0,
::GetParent(m_hwnd), (HMENU)-1, hInst, NULL);
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index c8ad8a03b7..6965e989da 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -108,7 +108,7 @@ void JabberFormCenterContent(HWND hwndStatic) void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text)
{
- if (!text) text = _T("");
+ if (!text) text = L"";
size_t len = mir_tstrlen(text);
size_t fixedLen = len;
@@ -205,19 +205,19 @@ void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text) static TJabberFormControlType JabberFormTypeNameToId(const TCHAR *type)
{
- if (!mir_tstrcmp(type, _T("text-private")))
+ if (!mir_tstrcmp(type, L"text-private"))
return JFORM_CTYPE_TEXT_PRIVATE;
- if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi")))
+ if (!mir_tstrcmp(type, L"text-multi") || !mir_tstrcmp(type, L"jid-multi"))
return JFORM_CTYPE_TEXT_MULTI;
- if (!mir_tstrcmp(type, _T("boolean")))
+ if (!mir_tstrcmp(type, L"boolean"))
return JFORM_CTYPE_BOOLEAN;
- if (!mir_tstrcmp(type, _T("list-single")))
+ if (!mir_tstrcmp(type, L"list-single"))
return JFORM_CTYPE_LIST_SINGLE;
- if (!mir_tstrcmp(type, _T("list-multi")))
+ if (!mir_tstrcmp(type, L"list-multi"))
return JFORM_CTYPE_LIST_MULTI;
- if (!mir_tstrcmp(type, _T("fixed")))
+ if (!mir_tstrcmp(type, L"fixed"))
return JFORM_CTYPE_FIXED;
- if (!mir_tstrcmp(type, _T("hidden")))
+ if (!mir_tstrcmp(type, L"hidden"))
return JFORM_CTYPE_HIDDEN;
return JFORM_CTYPE_TEXT_SINGLE;
@@ -283,7 +283,7 @@ void JabberFormLayoutSingleControl(TJabberFormControlInfo *item, TJabberFormLayo }
#define JabberFormCreateLabel() \
- CreateWindow(_T("static"), labelStr, WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE, \
+ CreateWindow(L"static", labelStr, WS_CHILD|WS_VISIBLE|SS_CENTERIMAGE, \
0, 0, 0, 0, hwndStatic, (HMENU)-1, hInst, NULL)
TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayoutInfo *layout_info, TJabberFormControlType type, const TCHAR *labelStr, const TCHAR *valueStr)
@@ -301,7 +301,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo switch (type) {
case JFORM_CTYPE_TEXT_PRIVATE:
item->hLabel = JabberFormCreateLabel();
- item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr,
+ item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL | ES_PASSWORD,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
@@ -310,7 +310,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo case JFORM_CTYPE_TEXT_MULTI:
item->hLabel = JabberFormCreateLabel();
- item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr,
+ item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
@@ -319,11 +319,11 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo break;
case JFORM_CTYPE_BOOLEAN:
- item->hCtrl = CreateWindowEx(0, _T("button"), labelStr,
+ item->hCtrl = CreateWindowEx(0, L"button", labelStr,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX | BS_MULTILINE,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
- if (valueStr && !mir_tstrcmp(valueStr, _T("1")))
+ if (valueStr && !mir_tstrcmp(valueStr, L"1"))
SendMessage(item->hCtrl, BM_SETCHECK, 1, 0);
++layout_info->id;
break;
@@ -347,7 +347,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo break;
case JFORM_CTYPE_FIXED:
- item->hCtrl = CreateWindow(_T("edit"), valueStr,
+ item->hCtrl = CreateWindow(L"edit", valueStr,
WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_READONLY | ES_AUTOHSCROLL,
0, 0, 0, 0,
hwndStatic, (HMENU)-1, hInst, NULL);
@@ -358,7 +358,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo case JFORM_CTYPE_TEXT_SINGLE:
item->hLabel = labelStr ? (JabberFormCreateLabel()) : NULL;
- item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, _T("edit"), valueStr,
+ item->hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, L"edit", valueStr,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_LEFT | ES_AUTOHSCROLL,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
@@ -440,7 +440,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp TCHAR *labelStr, *valueStr;
RECT frameRect;
- if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), _T("x")) || hwndStatic == NULL)
+ if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), L"x") || hwndStatic == NULL)
return;
GetClientRect(hwndStatic, &frameRect);
@@ -460,14 +460,14 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (!n)
break;
- if (mir_tstrcmp(XmlGetName(n), _T("field")))
+ if (mir_tstrcmp(XmlGetName(n), L"field"))
continue;
- varStr = XmlGetAttrValue(n, _T("var"));
- if ((typeName = XmlGetAttrValue(n, _T("type"))) == NULL)
+ varStr = XmlGetAttrValue(n, L"var");
+ if ((typeName = XmlGetAttrValue(n, L"type")) == NULL)
continue;
- if ((label = XmlGetAttrValue(n, _T("label"))) != NULL)
+ if ((label = XmlGetAttrValue(n, L"label")) != NULL)
labelStr = mir_tstrdup(label);
else
labelStr = mir_tstrdup(varStr);
@@ -484,7 +484,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = XmlGetChild(n, j);
if (!v)
break;
- if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), _T("value")) && XmlGetText(v))
+ if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), L"value") && XmlGetText(v))
size += mir_tstrlen(XmlGetText(v)) + 2;
}
valueStr = (TCHAR*)mir_alloc(sizeof(TCHAR)*size);
@@ -493,9 +493,9 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = XmlGetChild(n, j);
if (!v)
break;
- if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), _T("value")) && XmlGetText(v)) {
+ if (XmlGetName(v) && !mir_tstrcmp(XmlGetName(v), L"value") && XmlGetText(v)) {
if (valueStr[0])
- mir_tstrcat(valueStr, _T("\r\n"));
+ mir_tstrcat(valueStr, L"\r\n");
mir_tstrcat(valueStr, XmlGetText(v));
}
}
@@ -514,11 +514,11 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL)
break;
- if (mir_tstrcmp(XmlGetName(o), _T("option")))
+ if (mir_tstrcmp(XmlGetName(o), L"option"))
continue;
if ((v = XmlGetChild(o, "value")) == NULL || XmlGetText(v) == NULL)
continue;
- if ((str = XmlGetAttrValue(o, _T("label"))) == NULL)
+ if ((str = XmlGetAttrValue(o, L"label")) == NULL)
str = XmlGetText(v);
if (str == NULL)
continue;
@@ -533,11 +533,11 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL)
break;
- if (mir_tstrcmp(XmlGetName(o), _T("option")))
+ if (mir_tstrcmp(XmlGetName(o), L"option"))
continue;
if ((v = XmlGetChild(o, "value")) == NULL || XmlGetText(v) == NULL)
continue;
- if ((str = XmlGetAttrValue(o, _T("label"))) == NULL)
+ if ((str = XmlGetAttrValue(o, L"label")) == NULL)
str = XmlGetText(v);
if (str == NULL)
continue;
@@ -547,7 +547,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp vs = XmlGetChild(n, k);
if (!vs)
break;
- if (!mir_tstrcmp(XmlGetName(vs), _T("value")) && !mir_tstrcmp(XmlGetText(vs), XmlGetText(v))) {
+ if (!mir_tstrcmp(XmlGetName(vs), L"value") && !mir_tstrcmp(XmlGetText(vs), XmlGetText(v))) {
selected = true;
break;
}
@@ -579,13 +579,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) const TCHAR *varName, *type, *fieldStr, *labelText, *str2;
TCHAR *p, *q, *str;
- if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), _T("x")) || hwndStatic == NULL)
+ if (xNode == NULL || XmlGetName(xNode) == NULL || mir_tstrcmp(XmlGetName(xNode), L"x") || hwndStatic == NULL)
return NULL;
hFrame = hwndStatic;
id = 0;
- XmlNode x(_T("x"));
- x << XATTR(_T("xmlns"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit"));
+ XmlNode x(L"x");
+ x << XATTR(L"xmlns", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit");
for (int i = 0;; i++) {
n = XmlGetChild(xNode, i);
@@ -593,36 +593,36 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) break;
fieldStr = NULL;
- if (mir_tstrcmp(XmlGetName(n), _T("field")))
+ if (mir_tstrcmp(XmlGetName(n), L"field"))
continue;
- if ((varName = XmlGetAttrValue(n, _T("var"))) == NULL || (type = XmlGetAttrValue(n, _T("type"))) == NULL)
+ if ((varName = XmlGetAttrValue(n, L"var")) == NULL || (type = XmlGetAttrValue(n, L"type")) == NULL)
continue;
hCtrl = GetDlgItem(hFrame, id);
- HXML field = x << XCHILD(_T("field")) << XATTR(_T("var"), varName);
+ HXML field = x << XCHILD(L"field") << XATTR(L"var", varName);
- if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi"))) {
+ if (!mir_tstrcmp(type, L"text-multi") || !mir_tstrcmp(type, L"jid-multi")) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
p = str;
while (p != NULL) {
- if ((q = _tcsstr(p, _T("\r\n"))) != NULL)
+ if ((q = _tcsstr(p, L"\r\n")) != NULL)
*q = '\0';
- field << XCHILD(_T("value"), p);
+ field << XCHILD(L"value", p);
p = q ? q + 2 : NULL;
}
mir_free(str);
id++;
}
- else if (!mir_tstrcmp(type, _T("boolean"))) {
+ else if (!mir_tstrcmp(type, L"boolean")) {
TCHAR buf[10];
_itot(IsDlgButtonChecked(hFrame, id) == BST_CHECKED ? 1 : 0, buf, 10);
- field << XCHILD(_T("value"), buf);
+ field << XCHILD(L"value", buf);
id++;
}
- else if (!mir_tstrcmp(type, _T("list-single"))) {
+ else if (!mir_tstrcmp(type, L"list-single")) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
@@ -632,9 +632,9 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o)
break;
- if (!mir_tstrcmp(XmlGetName(o), _T("option"))) {
+ if (!mir_tstrcmp(XmlGetName(o), L"option")) {
if ((v = XmlGetChild(o, "value")) != NULL && XmlGetText(v)) {
- if ((str2 = XmlGetAttrValue(o, _T("label"))) == NULL)
+ if ((str2 = XmlGetAttrValue(o, L"label")) == NULL)
str2 = XmlGetText(v);
if (!mir_tstrcmp(str2, str))
break;
@@ -643,12 +643,12 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) }
if (o)
- field << XCHILD(_T("value"), XmlGetText(v));
+ field << XCHILD(L"value", XmlGetText(v));
mir_free(str);
id++;
}
- else if (!mir_tstrcmp(type, _T("list-multi"))) {
+ else if (!mir_tstrcmp(type, L"list-multi")) {
int count = SendMessage(hCtrl, LB_GETCOUNT, 0, 0);
for (j = 0; j < count; j++) {
if (SendMessage(hCtrl, LB_GETSEL, j, 0) > 0) {
@@ -661,13 +661,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o)
break;
- if (XmlGetName(o) && !mir_tstrcmp(XmlGetName(o), _T("option"))) {
+ if (XmlGetName(o) && !mir_tstrcmp(XmlGetName(o), L"option")) {
if ((v = XmlGetChild(o, "value")) != NULL && XmlGetText(v)) {
- if ((labelText = XmlGetAttrValue(o, _T("label"))) == NULL)
+ if ((labelText = XmlGetAttrValue(o, L"label")) == NULL)
labelText = XmlGetText(v);
if (!mir_tstrcmp(labelText, str))
- field << XCHILD(_T("value"), XmlGetText(v));
+ field << XCHILD(L"value", XmlGetText(v));
}
}
}
@@ -677,16 +677,16 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) }
id++;
}
- else if (!mir_tstrcmp(type, _T("fixed")) || !mir_tstrcmp(type, _T("hidden"))) {
+ else if (!mir_tstrcmp(type, L"fixed") || !mir_tstrcmp(type, L"hidden")) {
v = XmlGetChild(n, "value");
if (v != NULL && XmlGetText(v) != NULL)
- field << XCHILD(_T("value"), XmlGetText(v));
+ field << XCHILD(L"value", XmlGetText(v));
}
else { // everything else is considered "text-single" or "text-private"
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
- field << XCHILD(_T("value"), str);
+ field << XCHILD(L"value", str);
mir_free(str);
id++;
}
@@ -724,16 +724,16 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, HXML n;
LONG frameExStyle;
// Set dialog title
- if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("title"))) != NULL && XmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"title")) != NULL && XmlGetText(n) != NULL)
SetWindowText(hwndDlg, XmlGetText(n));
else
SetWindowText(hwndDlg, TranslateTS(jfi->defTitle));
// Set instruction field
- if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("instructions"))) != NULL && XmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"instructions")) != NULL && XmlGetText(n) != NULL)
JabberFormSetInstruction(hwndDlg, XmlGetText(n));
else {
- if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, _T("title"))) != NULL && XmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = XmlGetChild(jfi->xNode, L"title")) != NULL && XmlGetText(n) != NULL)
JabberFormSetInstruction(hwndDlg, XmlGetText(n));
else
JabberFormSetInstruction(hwndDlg, TranslateTS(jfi->defTitle));
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index d6bf5afce7..86faff30b5 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -79,7 +79,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): CLISTFrame frame = { sizeof(frame) };
HWND hwndClist = pcli->hwndContactList;
- frame.hWnd = CreateWindowEx(0, _T("JabberInfoFrameClass"), NULL, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, NULL, hInst, this);
+ frame.hWnd = CreateWindowEx(0, L"JabberInfoFrameClass", NULL, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, NULL, hInst, this);
frame.align = alBottom;
frame.height = 2 * SZ_FRAMEPADDING + GetSystemMetrics(SM_CYSMICON) + SZ_LINEPADDING; // compact height by default
frame.Flags = F_VISIBLE|F_LOCKED|F_NOBORDER|F_TCHAR;
@@ -105,7 +105,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): UpdateInfoItem("$", proto->GetIconHandle(IDI_JABBER), proto->m_tszUserName);
CreateInfoItem("$/JID", true);
- UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), _T("Offline"));
+ UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), L"Offline");
SetInfoItemCallback("$/JID", &CJabberProto::InfoFrame_OnSetup);
}
@@ -137,7 +137,7 @@ void CJabberInfoFrame::InitClass() wcx.style = CS_DBLCLKS|CS_HREDRAW|CS_VREDRAW;
wcx.lpfnWndProc = GlobalWndProc;
wcx.hInstance = hInst;
- wcx.lpszClassName = _T("JabberInfoFrameClass");
+ wcx.lpszClassName = L"JabberInfoFrameClass";
wcx.hCursor = LoadCursor(NULL, IDC_ARROW);
RegisterClassEx(&wcx);
bClassRegistered = true;
@@ -242,21 +242,21 @@ void CJabberInfoFrame::ReloadFonts() FontIDT fontid = {0};
fontid.cbSize = sizeof(fontid);
- _tcsncpy_s(fontid.group, _T("Jabber"), _TRUNCATE);
- _tcsncpy_s(fontid.name, _T("Frame title"), _TRUNCATE);
+ _tcsncpy_s(fontid.group, L"Jabber", _TRUNCATE);
+ _tcsncpy_s(fontid.name, L"Frame title", _TRUNCATE);
m_clTitle = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont);
DeleteObject(m_hfntTitle);
m_hfntTitle = CreateFontIndirect(&lfFont);
- _tcsncpy_s(fontid.name, _T("Frame text"), _TRUNCATE);
+ _tcsncpy_s(fontid.name, L"Frame text", _TRUNCATE);
m_clText = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont);
DeleteObject(m_hfntText);
m_hfntText = CreateFontIndirect(&lfFont);
ColourIDT colourid = {0};
colourid.cbSize = sizeof(colourid);
- _tcsncpy_s(colourid.group, _T("Jabber"), _TRUNCATE);
- _tcsncpy_s(colourid.name, _T("Background"), _TRUNCATE);
+ _tcsncpy_s(colourid.group, L"Jabber", _TRUNCATE);
+ _tcsncpy_s(colourid.name, L"Background", _TRUNCATE);
m_clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0);
UpdateSize();
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index e6e270159f..0666d4d96c 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -100,26 +100,26 @@ void CJabberProto::FtInitiate(TCHAR* jid, filetransfer *ft) filename = p + 1;
TCHAR tszJid[512];
- mir_sntprintf(tszJid, _T("%s/%s"), jid, rs);
+ mir_sntprintf(tszJid, L"%s/%s", jid, rs);
XmlNodeIq iq(AddIQ(&CJabberProto::OnFtSiResult, JABBER_IQ_TYPE_SET, tszJid, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO, -1, ft));
- HXML si = iq << XCHILDNS(_T("si"), JABBER_FEAT_SI) << XATTR(_T("id"), sid)
- << XATTR(_T("mime-type"), _T("binary/octet-stream")) << XATTR(_T("profile"), JABBER_FEAT_SI_FT);
- si << XCHILDNS(_T("file"), JABBER_FEAT_SI_FT) << XATTR(_T("name"), filename)
- << XATTRI64(_T("size"), ft->fileSize[ft->std.currentFileNumber]) << XCHILD(_T("desc"), ft->szDescription);
+ HXML si = iq << XCHILDNS(L"si", JABBER_FEAT_SI) << XATTR(L"id", sid)
+ << XATTR(L"mime-type", L"binary/octet-stream") << XATTR(L"profile", JABBER_FEAT_SI_FT);
+ si << XCHILDNS(L"file", JABBER_FEAT_SI_FT) << XATTR(L"name", filename)
+ << XATTRI64(L"size", ft->fileSize[ft->std.currentFileNumber]) << XCHILD(L"desc", ft->szDescription);
- HXML field = si << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG)
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"))
- << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method")) << XATTR(_T("type"), _T("list-single"));
+ HXML field = si << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG)
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form")
+ << XCHILD(L"field") << XATTR(L"var", L"stream-method") << XATTR(L"type", L"list-single");
BOOL bDirect = m_options.BsDirect;
BOOL bProxy = m_options.BsProxyManual;
// bytestreams support?
if (bDirect || bProxy)
- field << XCHILD(_T("option")) << XCHILD(_T("value"), JABBER_FEAT_BYTESTREAMS);
+ field << XCHILD(L"option") << XCHILD(L"value", JABBER_FEAT_BYTESTREAMS);
- field << XCHILD(_T("option")) << XCHILD(_T("value"), JABBER_FEAT_IBB);
+ field << XCHILD(L"option") << XCHILD(L"value", JABBER_FEAT_IBB);
m_ThreadInfo->send(iq);
}
@@ -138,7 +138,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo) if ((featureNode = XmlGetChild(siNode, "feature")) != NULL) {
if ((xNode = XmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL) {
- if ((fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) {
+ if ((fieldNode = XmlGetChildByTag(xNode, "field", "var", L"stream-method")) != NULL) {
if ((valueNode = XmlGetChild(fieldNode, "value")) != NULL && XmlGetText(valueNode) != NULL) {
if ((bDirect || bProxy) && !mir_tstrcmp(XmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
// Start Bytestream session
@@ -187,10 +187,10 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) char* buffer;
int numRead;
- debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]);
+ debugLog(L"Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]);
_tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size
if ((fd = _topen(ft->std.ptszFiles[ft->std.currentFileNumber], _O_BINARY | _O_RDONLY)) < 0) {
- debugLog(_T("File cannot be opened"));
+ debugLog(L"File cannot be opened");
return FALSE;
}
@@ -217,7 +217,7 @@ BOOL CJabberProto::FtSend(HANDLE hConn, filetransfer *ft) BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft)
{
- debugLog(_T("Sending [%s]"), ft->std.ptszFiles[ft->std.currentFileNumber]);
+ debugLog(L"Sending [%s]", ft->std.ptszFiles[ft->std.currentFileNumber]);
struct _stati64 statbuf;
_tstati64(ft->std.ptszFiles[ft->std.currentFileNumber], &statbuf); // file size in statbuf.st_size
@@ -237,8 +237,8 @@ BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) int numRead;
while ((numRead = _read(fd, buffer, blocksize)) > 0) {
int iqId = SerialNext();
- XmlNode msg(_T("message"));
- XmlAddAttr(msg, _T("to"), ft->jibb->dstJID);
+ XmlNode msg(L"message");
+ XmlAddAttr(msg, L"to", ft->jibb->dstJID);
msg << XATTRID(iqId);
// let others send data too
@@ -246,14 +246,14 @@ BOOL CJabberProto::FtIbbSend(int blocksize, filetransfer *ft) char *encoded = mir_base64_encode((PBYTE)(char*)buffer, numRead);
- msg << XCHILD(_T("data"), _A2T(encoded)) << XATTR(_T("xmlns"), JABBER_FEAT_IBB)
- << XATTR(_T("sid"), ft->jibb->sid) << XATTRI(_T("seq"), ft->jibb->wPacketId);
+ msg << XCHILD(L"data", _A2T(encoded)) << XATTR(L"xmlns", JABBER_FEAT_IBB)
+ << XATTR(L"sid", ft->jibb->sid) << XATTRI(L"seq", ft->jibb->wPacketId);
- HXML ampNode = msg << XCHILDNS(_T("amp"), JABBER_FEAT_AMP);
- ampNode << XCHILD(_T("rule")) << XATTR(_T("condition"), _T("deliver-at"))
- << XATTR(_T("value"), _T("stored")) << XATTR(_T("action"), _T("error"));
- ampNode << XCHILD(_T("rule")) << XATTR(_T("condition"), _T("match-resource"))
- << XATTR(_T("value"), _T("exact")) << XATTR(_T("action"), _T("error"));
+ HXML ampNode = msg << XCHILDNS(L"amp", JABBER_FEAT_AMP);
+ ampNode << XCHILD(L"rule") << XATTR(L"condition", L"deliver-at")
+ << XATTR(L"value", L"stored") << XATTR(L"action", L"error");
+ ampNode << XCHILD(L"rule") << XATTR(L"condition", L"match-resource")
+ << XATTR(L"value", L"exact") << XATTR(L"action", L"error");
ft->jibb->wPacketId++;
mir_free(encoded);
@@ -306,21 +306,21 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) unsigned __int64 filesize;
if (!iqNode ||
- (from = XmlGetAttrValue(iqNode, _T("from"))) == NULL ||
- (str = XmlGetAttrValue(iqNode, _T("type"))) == NULL || mir_tstrcmp(str, _T("set")) ||
+ (from = XmlGetAttrValue(iqNode, L"from")) == NULL ||
+ (str = XmlGetAttrValue(iqNode, L"type")) == NULL || mir_tstrcmp(str, L"set") ||
(siNode = XmlGetChildByTag(iqNode, "si", "xmlns", JABBER_FEAT_SI)) == NULL)
return;
- szId = XmlGetAttrValue(iqNode, _T("id"));
- if ((sid = XmlGetAttrValue(siNode, _T("id"))) != NULL &&
+ szId = XmlGetAttrValue(iqNode, L"id");
+ if ((sid = XmlGetAttrValue(siNode, L"id")) != NULL &&
(fileNode = XmlGetChildByTag(siNode, "file", "xmlns", JABBER_FEAT_SI_FT)) != NULL &&
- (filename = XmlGetAttrValue(fileNode, _T("name"))) != NULL &&
- (str = XmlGetAttrValue(fileNode, _T("size"))) != NULL) {
+ (filename = XmlGetAttrValue(fileNode, L"name")) != NULL &&
+ (str = XmlGetAttrValue(fileNode, L"size")) != NULL) {
filesize = _ttoi64(str);
if ((featureNode = XmlGetChildByTag(siNode, "feature", "xmlns", JABBER_FEAT_FEATURE_NEG)) != NULL &&
(xNode = XmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL &&
- (fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) {
+ (fieldNode = XmlGetChildByTag(xNode, "field", "var", L"stream-method")) != NULL) {
BOOL bIbbOnly = m_options.BsOnlyIBB;
HXML optionNode = NULL;
@@ -332,7 +332,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode)
break;
- if (!mir_tstrcmp(XmlGetName(optionNode), _T("option"))) {
+ if (!mir_tstrcmp(XmlGetName(optionNode), L"option")) {
if ((n = XmlGetChild(optionNode, "value")) != NULL && XmlGetText(n)) {
if (!mir_tstrcmp(XmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
ftType = FT_BYTESTREAM;
@@ -350,7 +350,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode)
break;
- if (!mir_tstrcmp(XmlGetName(optionNode), _T("option"))) {
+ if (!mir_tstrcmp(XmlGetName(optionNode), L"option")) {
if ((n = XmlGetChild(optionNode, "value")) != NULL && XmlGetText(n)) {
if (!mir_tstrcmp(XmlGetText(n), JABBER_FEAT_IBB)) {
ftType = FT_IBB;
@@ -388,10 +388,10 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) }
else {
// Unknown stream mechanism
- XmlNodeIq iq(_T("error"), szId, from);
- HXML e = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel"));
- e << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- e << XCHILDNS(_T("no-valid-streams"), JABBER_FEAT_SI);
+ XmlNodeIq iq(L"error", szId, from);
+ HXML e = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel");
+ e << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas");
+ e << XCHILDNS(L"no-valid-streams", JABBER_FEAT_SI);
m_ThreadInfo->send(iq);
return;
}
@@ -399,10 +399,10 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) }
// Bad stream initiation, reply with bad-profile
- XmlNodeIq iq(_T("error"), szId, from);
- HXML e = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel"));
- e << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- e << XCHILDNS(_T("bad-profile"), JABBER_FEAT_SI);
+ XmlNodeIq iq(L"error", szId, from);
+ HXML e = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel");
+ e << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas");
+ e << XCHILDNS(L"bad-profile", JABBER_FEAT_SI);
m_ThreadInfo->send(iq);
}
@@ -415,12 +415,12 @@ void CJabberProto::FtAcceptSiRequest(filetransfer *ft) item->ft = ft;
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), ft->szId, ft->jid)
- << XCHILDNS(_T("si"), JABBER_FEAT_SI)
- << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG)
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit"))
- << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method"))
- << XCHILD(_T("value"), JABBER_FEAT_BYTESTREAMS));
+ XmlNodeIq(L"result", ft->szId, ft->jid)
+ << XCHILDNS(L"si", JABBER_FEAT_SI)
+ << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG)
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit")
+ << XCHILD(L"field") << XATTR(L"var", L"stream-method")
+ << XCHILD(L"value", JABBER_FEAT_BYTESTREAMS));
}
}
@@ -433,12 +433,12 @@ void CJabberProto::FtAcceptIbbRequest(filetransfer *ft) item->ft = ft;
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), ft->szId, ft->jid)
- << XCHILDNS(_T("si"), JABBER_FEAT_SI)
- << XCHILDNS(_T("feature"), JABBER_FEAT_FEATURE_NEG)
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit"))
- << XCHILD(_T("field")) << XATTR(_T("var"), _T("stream-method"))
- << XCHILD(_T("value"), JABBER_FEAT_IBB));
+ XmlNodeIq(L"result", ft->szId, ft->jid)
+ << XCHILDNS(L"si", JABBER_FEAT_SI)
+ << XCHILDNS(L"feature", JABBER_FEAT_FEATURE_NEG)
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit")
+ << XCHILD(L"field") << XATTR(L"var", L"stream-method")
+ << XCHILD(L"value", JABBER_FEAT_IBB));
}
}
@@ -449,7 +449,7 @@ BOOL CJabberProto::FtHandleBytestreamRequest(HXML iqNode, CJabberIqInfo *pInfo) const TCHAR *sid;
JABBER_LIST_ITEM *item;
- if ((sid = XmlGetAttrValue(queryNode, _T("sid"))) != NULL && (item = ListGetItemPtr(LIST_FTRECV, sid)) != NULL) {
+ if ((sid = XmlGetAttrValue(queryNode, L"sid")) != NULL && (item = ListGetItemPtr(LIST_FTRECV, sid)) != NULL) {
// Start Bytestream session
JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER;
memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER));
@@ -471,24 +471,24 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) {
if (iqNode == NULL) return FALSE;
- const TCHAR *id = XmlGetAttrValue(iqNode, _T("id"));
- const TCHAR *from = XmlGetAttrValue(iqNode, _T("from"));
- const TCHAR *to = XmlGetAttrValue(iqNode, _T("to"));
+ const TCHAR *id = XmlGetAttrValue(iqNode, L"id");
+ const TCHAR *from = XmlGetAttrValue(iqNode, L"from");
+ const TCHAR *to = XmlGetAttrValue(iqNode, L"to");
if (!id || !from || !to) return FALSE;
HXML ibbNode = XmlGetChildByTag(iqNode, bOpen ? "open" : "close", "xmlns", JABBER_FEAT_IBB);
if (!ibbNode) return FALSE;
- const TCHAR *sid = XmlGetAttrValue(ibbNode, _T("sid"));
+ const TCHAR *sid = XmlGetAttrValue(ibbNode, L"sid");
if (!sid) return FALSE;
// already closed?
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_FTRECV, sid);
if (item == NULL) {
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), id, from)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", id, from)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return FALSE;
}
@@ -507,14 +507,14 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) item->jibb = jibb;
ForkThread((MyThreadFunc)&CJabberProto::IbbReceiveThread, jibb);
- m_ThreadInfo->send(XmlNodeIq(_T("result"), id, from));
+ m_ThreadInfo->send(XmlNodeIq(L"result", id, from));
return TRUE;
}
// stream already open
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), id, from)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", id, from)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return FALSE;
}
@@ -523,7 +523,7 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen) item->jibb->bStreamClosed = TRUE;
SetEvent(item->jibb->hEvent);
- m_ThreadInfo->send(XmlNodeIq(_T("result"), id, from));
+ m_ThreadInfo->send(XmlNodeIq(L"result", id, from));
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index e4f81a4d68..6394f8a022 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -84,10 +84,10 @@ struct JabberGcRecentInfo void fillForm(HWND hwndDlg)
{
- SetDlgItemText(hwndDlg, IDC_SERVER, m_server ? m_server : _T(""));
- SetDlgItemText(hwndDlg, IDC_ROOM, m_room ? m_room : _T(""));
- SetDlgItemText(hwndDlg, IDC_NICK, m_nick ? m_nick : _T(""));
- SetDlgItemText(hwndDlg, IDC_PASSWORD, m_password ? m_password : _T(""));
+ SetDlgItemText(hwndDlg, IDC_SERVER, m_server ? m_server : L"");
+ SetDlgItemText(hwndDlg, IDC_ROOM, m_room ? m_room : L"");
+ SetDlgItemText(hwndDlg, IDC_NICK, m_nick ? m_nick : L"");
+ SetDlgItemText(hwndDlg, IDC_PASSWORD, m_password ? m_password : L"");
}
void fillData(const TCHAR *room, const TCHAR *server, const TCHAR *nick = NULL, const TCHAR *password = NULL)
@@ -246,7 +246,7 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con }
TCHAR text[JABBER_MAX_JID_LEN + 1];
- mir_sntprintf(text, _T("%s@%s/%s"), room, server, nick);
+ mir_sntprintf(text, L"%s@%s/%s", room, server, nick);
JABBER_LIST_ITEM *item = ListAdd(LIST_CHATROOM, text);
item->bAutoJoin = autojoin;
@@ -254,9 +254,9 @@ void CJabberProto::GroupchatJoinRoom(const TCHAR *server, const TCHAR *room, con replaceStrT(item->password, info.m_password);
int status = (m_iStatus == ID_STATUS_INVISIBLE) ? ID_STATUS_ONLINE : m_iStatus;
- XmlNode x(_T("x")); x << XATTR(_T("xmlns"), JABBER_FEAT_MUC);
+ XmlNode x(L"x"); x << XATTR(L"xmlns", JABBER_FEAT_MUC);
if (info.m_password && info.m_password[0])
- x << XCHILD(_T("password"), info.m_password);
+ x << XCHILD(L"password", info.m_password);
SendPresenceTo(status, text, x);
}
@@ -301,23 +301,23 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL,
TranslateT("Jabber Error"),
TranslateT("Failed to retrieve room list from server."),
- _T(""));
+ L"");
}
else {
bool found = false;
HXML item;
- for (int i = 1; item = XmlGetNthChild(query, _T("item"), i); i++) {
- const TCHAR *jid = XmlGetAttrValue(item, _T("jid"));
+ for (int i = 1; item = XmlGetNthChild(query, L"item", i); i++) {
+ const TCHAR *jid = XmlGetAttrValue(item, L"jid");
TCHAR *name = NEWTSTR_ALLOCA(jid);
if (name) {
if (TCHAR *p = _tcschr(name, _T('@')))
*p = 0;
}
- else name = _T("");
+ else name = L"";
sttRoomListAppend(hwndList,
ListGetItemPtr(LIST_BOOKMARK, jid) ? RoomInfo::ROOM_BOOKMARK : RoomInfo::ROOM_DEFAULT,
- XmlGetAttrValue(item, _T("name")),
+ XmlGetAttrValue(item, L"name"),
jid, name);
found = true;
@@ -327,7 +327,7 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL,
TranslateT("Jabber Error"),
TranslateT("No rooms available on server."),
- _T(""));
+ L"");
}
}
}
@@ -337,14 +337,14 @@ void CJabberProto::OnIqResultDiscovery(HXML iqNode, CJabberIqInfo *pInfo) sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL,
TranslateT("Jabber Error"),
str,
- _T(""));
+ L"");
mir_free(str);
}
else
sttRoomListAppend(hwndList, RoomInfo::ROOM_FAIL,
TranslateT("Jabber Error"),
TranslateT("Room list request timed out."),
- _T(""));
+ L"");
SendMessage(hwndList, CB_SHOWDROPDOWN, TRUE, 0);
}
@@ -471,7 +471,7 @@ void CJabberDlgGcJoin::OnInitDialog() if (!info.loadRecent(i))
break;
- mir_sntprintf(jid, _T("%s@%s (%s)"), info.m_room, info.m_server, info.m_nick ? info.m_nick : TranslateT("<no nick>"));
+ mir_sntprintf(jid, L"%s@%s (%s)", info.m_room, info.m_server, info.m_nick ? info.m_nick : TranslateT("<no nick>"));
SetDlgItemText(m_hwnd, IDC_RECENT1 + i, jid);
}
sttJoinDlgShowRecentItems(m_hwnd, i);
@@ -624,7 +624,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) GetDlgItemText(m_hwnd, IDC_SERVER, server, len);
if (*server) {
- sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_WAIT, TranslateT("Loading..."), TranslateT("Please wait for room list to download."), _T(""));
+ sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_WAIT, TranslateT("Loading..."), TranslateT("Please wait for room list to download."), L"");
CJabberIqInfo *pInfo = m_proto->AddIQ(&CJabberProto::OnIqResultDiscovery, JABBER_IQ_TYPE_GET, server, 0, -1, (void*)GetDlgItem(m_hwnd, IDC_ROOM));
pInfo->SetTimeout(30000);
@@ -638,7 +638,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) sttRoomListAppend(GetDlgItem(m_hwnd, IDC_ROOM), RoomInfo::ROOM_FAIL,
TranslateT("Jabber Error"),
TranslateT("Please specify group chat directory first."),
- _T(""));
+ L"");
}
break;
}
@@ -652,7 +652,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) {
JABBER_LIST_ITEM *item = 0;
if (item = m_proto->ListGetItemPtrFromIndex(i))
- if (!mir_tstrcmp(item->type, _T("conference")))
+ if (!mir_tstrcmp(item->type, L"conference"))
AppendMenu(hMenu, MF_STRING, (UINT_PTR)item, item->name);
}
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
@@ -754,7 +754,7 @@ static VOID CALLBACK JabberGroupchatChangeNickname(void* arg) if (param->ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) {
replaceStrT(item->nick, szBuffer);
- param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMString(FORMAT, _T("%s/%s"), item->jid, szBuffer), NULL);
+ param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMString(FORMAT, L"%s/%s", item->jid, szBuffer), NULL);
}
}
@@ -767,7 +767,7 @@ static int sttGetStatusCode(HXML node) if (statusNode == NULL)
return -1;
- const TCHAR *statusCode = XmlGetAttrValue(statusNode, _T("code"));
+ const TCHAR *statusCode = XmlGetAttrValue(statusNode, L"code");
if (statusCode == NULL)
return -1;
@@ -776,8 +776,8 @@ static int sttGetStatusCode(HXML node) void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *oldNick, HXML itemNode)
{
- const TCHAR *jid = XmlGetAttrValue(itemNode, _T("jid"));
- const TCHAR *newNick = XmlGetAttrValue(itemNode, _T("nick"));
+ const TCHAR *jid = XmlGetAttrValue(itemNode, L"jid");
+ const TCHAR *newNick = XmlGetAttrValue(itemNode, L"nick");
if (newNick == NULL)
return;
@@ -815,8 +815,8 @@ void CJabberProto::GroupchatProcessPresence(HXML node) {
const TCHAR *from;
- if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("presence"))) return;
- if ((from = XmlGetAttrValue(node, _T("from"))) == NULL) return;
+ if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"presence")) return;
+ if ((from = XmlGetAttrValue(node, L"from")) == NULL) return;
const TCHAR *resource = _tcschr(from, '/');
if (resource == NULL || *++resource == '\0')
@@ -839,10 +839,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node) HXML xNode = XmlGetChildByTag(node, "x", "xmlns", JABBER_FEAT_MUC_USER);
HXML itemNode = XmlGetChild(xNode, "item");
- const TCHAR *type = XmlGetAttrValue(node, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(node, L"type");
// entering room or a usual room presence
- if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
+ if (type == NULL || !mir_tstrcmp(type, L"available")) {
if (ptrT(JabberNickFromJID(from)) == NULL)
return;
@@ -853,10 +853,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node) int status = ID_STATUS_ONLINE;
LPCTSTR ptszShow = XmlGetText(XmlGetChild(node, "show"));
if (ptszShow) {
- if (!mir_tstrcmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY;
- else if (!mir_tstrcmp(ptszShow, _T("xa"))) status = ID_STATUS_NA;
- else if (!mir_tstrcmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND;
- else if (!mir_tstrcmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(ptszShow, L"away")) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszShow, L"xa")) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszShow, L"dnd")) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszShow, L"chat")) status = ID_STATUS_FREECHAT;
}
LPCTSTR str = XmlGetText(XmlGetChild(node, "status"));
@@ -880,17 +880,17 @@ void CJabberProto::GroupchatProcessPresence(HXML node) JABBER_GC_AFFILIATION affiliation = r->m_affiliation;
JABBER_GC_ROLE role = r->m_role;
- if ((str = XmlGetAttrValue(itemNode, _T("affiliation"))) != NULL) {
- if (!mir_tstrcmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER;
- else if (!mir_tstrcmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN;
- else if (!mir_tstrcmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER;
- else if (!mir_tstrcmp(str, _T("none"))) affiliation = AFFILIATION_NONE;
- else if (!mir_tstrcmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST;
+ if ((str = XmlGetAttrValue(itemNode, L"affiliation")) != NULL) {
+ if (!mir_tstrcmp(str, L"owner")) affiliation = AFFILIATION_OWNER;
+ else if (!mir_tstrcmp(str, L"admin")) affiliation = AFFILIATION_ADMIN;
+ else if (!mir_tstrcmp(str, L"member")) affiliation = AFFILIATION_MEMBER;
+ else if (!mir_tstrcmp(str, L"none")) affiliation = AFFILIATION_NONE;
+ else if (!mir_tstrcmp(str, L"outcast")) affiliation = AFFILIATION_OUTCAST;
}
- if ((str = XmlGetAttrValue(itemNode, _T("role"))) != NULL) {
- if (!mir_tstrcmp(str, _T("moderator"))) role = ROLE_MODERATOR;
- else if (!mir_tstrcmp(str, _T("participant"))) role = ROLE_PARTICIPANT;
- else if (!mir_tstrcmp(str, _T("visitor"))) role = ROLE_VISITOR;
+ if ((str = XmlGetAttrValue(itemNode, L"role")) != NULL) {
+ if (!mir_tstrcmp(str, L"moderator")) role = ROLE_MODERATOR;
+ else if (!mir_tstrcmp(str, L"participant")) role = ROLE_PARTICIPANT;
+ else if (!mir_tstrcmp(str, L"visitor")) role = ROLE_VISITOR;
else role = ROLE_NONE;
}
@@ -910,7 +910,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) bRoleChanged = true;
}
- if (str = XmlGetAttrValue(itemNode, _T("jid")))
+ if (str = XmlGetAttrValue(itemNode, L"jid"))
r->m_tszRealJid = mir_tstrdup(str);
}
}
@@ -936,7 +936,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) // Check <created/>
if (bRoomCreated) {
HXML n = XmlGetChild(node, "created");
- if (n != NULL && (str = XmlGetAttrValue(n, _T("xmlns"))) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER))
+ if (n != NULL && (str = XmlGetAttrValue(n, L"xmlns")) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER))
// A new room just created by me
// Request room config
m_ThreadInfo->send(
@@ -946,11 +946,11 @@ void CJabberProto::GroupchatProcessPresence(HXML node) }
// leaving room
- else if (!mir_tstrcmp(type, _T("unavailable"))) {
+ else if (!mir_tstrcmp(type, L"unavailable")) {
const TCHAR *str = 0;
if (xNode != NULL && item->nick != NULL) {
HXML reasonNode = XmlGetChild(itemNode, "reason");
- str = XmlGetAttrValue(itemNode, _T("jid"));
+ str = XmlGetAttrValue(itemNode, L"jid");
int iStatus = sttGetStatusCode(xNode);
if (iStatus == 301 && r != NULL)
@@ -994,7 +994,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) }
// processing room errors
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
int errorCode = 0;
HXML errorNode = XmlGetChild(node, "error");
ptrT str(JabberErrorMsg(errorNode, &errorCode));
@@ -1004,7 +1004,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (++item->iChatState == 1 && newNick != NULL && newNick[0] != 0) {
replaceStrT(item->nick, newNick);
TCHAR text[1024] = { 0 };
- mir_sntprintf(text, _T("%s/%s"), item->jid, newNick);
+ mir_sntprintf(text, L"%s/%s", item->jid, newNick);
SendPresenceTo(m_iStatus, text, NULL);
}
else {
@@ -1028,12 +1028,12 @@ void CJabberProto::GroupchatProcessMessage(HXML node) JABBER_LIST_ITEM *item;
CMString imgLink;
- if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("message"))) return;
- if ((from = XmlGetAttrValue(node, _T("from"))) == NULL) return;
+ if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"message")) return;
+ if ((from = XmlGetAttrValue(node, L"from")) == NULL) return;
if ((item = ListGetItemPtr(LIST_CHATROOM, from)) == NULL) return;
- if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return;
- if (!mir_tstrcmp(type, _T("error")))
+ if ((type = XmlGetAttrValue(node, L"type")) == NULL) return;
+ if (!mir_tstrcmp(type, L"error"))
return;
GCDEST gcd = { m_szModuleName, item->jid, 0 };
@@ -1056,7 +1056,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (tmpnick == NULL || *tmpnick == 0)
return;
- const TCHAR *tmptr = _tcsstr(tmpnick, _T("has set the subject to:")); //ejabberd
+ const TCHAR *tmptr = _tcsstr(tmpnick, L"has set the subject to:"); //ejabberd
if (tmptr == NULL)
tmptr = _tcsstr(tmpnick, TranslateT("has set the subject to:")); //ejabberd
if (tmptr != NULL && *tmptr != 0) {
@@ -1079,7 +1079,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) if (resource == NULL)
gcd.iType = GC_EVENT_INFORMATION;
- else if (_tcsncmp(msgText, _T("/me "), 4) == 0 && mir_tstrlen(msgText) > 4) {
+ else if (_tcsncmp(msgText, L"/me ", 4) == 0 && mir_tstrlen(msgText) > 4) {
msgText += 4;
gcd.iType = GC_EVENT_ACTION;
}
@@ -1090,8 +1090,8 @@ void CJabberProto::GroupchatProcessMessage(HXML node) time_t msgTime = 0;
if (!JabberReadXep203delay(node, msgTime)) {
- HXML xDelay = XmlGetChildByTag(node, "x", "xmlns", _T("jabber:x:delay"));
- if (xDelay && (p = XmlGetAttrValue(xDelay, _T("stamp"))) != NULL)
+ HXML xDelay = XmlGetChildByTag(node, "x", "xmlns", L"jabber:x:delay");
+ if (xDelay && (p = XmlGetAttrValue(xDelay, L"stamp")) != NULL)
msgTime = JabberIsoToUnixTime(p);
}
@@ -1107,7 +1107,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) else nick = NULL;
CMString tszText(msgText);
- tszText.Replace(_T("%"), _T("%%"));
+ tszText.Replace(L"%", L"%%");
tszText += imgLink;
GCEVENT gce = { sizeof(gce), &gcd };
@@ -1207,7 +1207,7 @@ void CJabberProto::AcceptGroupchatInvite(const TCHAR *roomJid, const TCHAR *reas {
TCHAR room[256], *server, *p;
_tcsncpy_s(room, roomJid, _TRUNCATE);
- p = _tcstok(room, _T("@"));
- server = _tcstok(NULL, _T("@"));
+ p = _tcstok(room, L"@");
+ server = _tcstok(NULL, L"@");
GroupchatJoinRoom(server, p, reason, password);
}
diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp index 0ac2a73150..bec32266dd 100644 --- a/protocols/JabberG/src/jabber_ibb.cpp +++ b/protocols/JabberG/src/jabber_ibb.cpp @@ -46,24 +46,24 @@ void JabberIbbFreeJibb(JABBER_IBB_TRANSFER *jibb) BOOL CJabberProto::OnFtHandleIbbIq(HXML iqNode, CJabberIqInfo *pInfo)
{
- if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("open")))
+ if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"open"))
FtHandleIbbRequest(iqNode, TRUE);
- else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("close")))
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"close"))
FtHandleIbbRequest(iqNode, FALSE);
- else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("data"))) {
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), L"data")) {
BOOL bOk = FALSE;
- const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), _T("sid"));
- const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), _T("seq"));
+ const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), L"sid");
+ const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), L"seq");
if (sid && seq && XmlGetText(pInfo->GetChildNode()))
bOk = OnIbbRecvdData(XmlGetText(pInfo->GetChildNode()), sid, seq);
if (bOk)
- m_ThreadInfo->send( XmlNodeIq(_T("result"), pInfo));
+ m_ThreadInfo->send( XmlNodeIq(L"result", pInfo));
else
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), pInfo)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", pInfo)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
}
return TRUE;
}
@@ -98,8 +98,8 @@ void CJabberProto::IbbSendThread(JABBER_IBB_TRANSFER *jibb) m_ThreadInfo->send(
XmlNodeIq( AddIQ(&CJabberProto::OnIbbInitiateResult, JABBER_IQ_TYPE_SET, jibb->dstJID, 0, -1, jibb))
- << XCHILDNS(_T("open"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid) << XATTRI(_T("block-size"), JABBER_IBB_BLOCK_SIZE)
- << XATTR(_T("stanza"), _T("message")));
+ << XCHILDNS(L"open", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid) << XATTRI(L"block-size", JABBER_IBB_BLOCK_SIZE)
+ << XATTR(L"stanza", L"message"));
WaitForSingleObject(jibb->hEvent, INFINITE);
CloseHandle(jibb->hEvent);
@@ -115,7 +115,7 @@ void CJabberProto::IbbSendThread(JABBER_IBB_TRANSFER *jibb) m_ThreadInfo->send(
XmlNodeIq( AddIQ(&CJabberProto::OnIbbCloseResult, JABBER_IQ_TYPE_SET, jibb->dstJID, 0, -1, jibb))
- << XCHILDNS(_T("close"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid));
+ << XCHILDNS(L"close", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid));
WaitForSingleObject(jibb->hEvent, INFINITE);
CloseHandle(jibb->hEvent);
@@ -151,7 +151,7 @@ void __cdecl CJabberProto::IbbReceiveThread(JABBER_IBB_TRANSFER *jibb) jibb->hEvent = NULL;
if (jibb->state == JIBB_ERROR)
- m_ThreadInfo->send( XmlNodeIq(_T("set"), SerialNext(), jibb->dstJID) << XCHILDNS(_T("close"), JABBER_FEAT_IBB) << XATTR(_T("sid"), jibb->sid));
+ m_ThreadInfo->send( XmlNodeIq(L"set", SerialNext(), jibb->dstJID) << XCHILDNS(L"close", JABBER_FEAT_IBB) << XATTR(L"sid", jibb->sid));
if (jibb->bStreamClosed && jibb->dwTransferredSize == ft->dwExpectedRecvFileSize)
jibb->state = JIBB_DONE;
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 82c385c64b..f3739cdece 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -47,32 +47,32 @@ struct CTransportProtoTableItem static CTransportProtoTableItem TransportProtoTable[] =
{
- { _T("|*icq*|jit*"), "ICQ" },
- { _T("msn*"), "MSN" },
- { _T("yahoo*"), "YAHOO" },
- { _T("mrim*"), "MRA" },
- { _T("aim*"), "AIM" },
+ { L"|*icq*|jit*", "ICQ" },
+ { L"msn*", "MSN" },
+ { L"yahoo*", "YAHOO" },
+ { L"mrim*", "MRA" },
+ { L"aim*", "AIM" },
//request #3094
- { _T("|gg*|gadu*"), "GaduGadu" },
- { _T("tv*"), "TV" },
- { _T("dict*"), "Dictionary" },
- { _T("weather*"), "Weather" },
- { _T("skype*"), "Skype" },
- { _T("sms*"), "SMS" },
- { _T("smtp*"), "SMTP" },
+ { L"|gg*|gadu*", "GaduGadu" },
+ { L"tv*", "TV" },
+ { L"dict*", "Dictionary" },
+ { L"weather*", "Weather" },
+ { L"skype*", "Skype" },
+ { L"sms*", "SMS" },
+ { L"smtp*", "SMTP" },
//j2j
- { _T("gtalk.*.*"), "GTalk" },
- { _T("|xmpp.*.*|j2j.*.*"),"Jabber2Jabber" },
+ { L"gtalk.*.*", "GTalk" },
+ { L"|xmpp.*.*|j2j.*.*","Jabber2Jabber" },
//jabbim.cz - services
- { _T("disk*"), "Jabber Disk" },
- { _T("irc*"), "IRC" },
- { _T("rss*"), "RSS" },
- { _T("tlen*"), "Tlen" },
+ { L"disk*", "Jabber Disk" },
+ { L"irc*", "IRC" },
+ { L"rss*", "RSS" },
+ { L"tlen*", "Tlen" },
// German social networks
- { _T("studivz*"), "StudiVZ" },
- { _T("schuelervz*"), "SchuelerVZ" },
- { _T("meinvz*"), "MeinVZ" },
+ { L"studivz*", "StudiVZ" },
+ { L"schuelervz*", "SchuelerVZ" },
+ { L"meinvz*", "MeinVZ" },
};
static int skinIconStatusToResourceId[] = {IDI_OFFLINE,IDI_ONLINE,IDI_AWAY,IDI_DND,IDI_NA,IDI_NA,/*IDI_OCCUPIED,*/IDI_FREE4CHAT,IDI_INVISIBLE,IDI_ONTHEPHONE,IDI_OUTTOLUNCH};
@@ -307,7 +307,7 @@ int CJabberProto::LoadAdvancedIcons(int iID) int first = -1;
HICON empty = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mir_sntprintf(Group, LPGENT("Status icons")_T("/%s/%S %s"), m_tszUserName, proto, TranslateT("transport"));
+ mir_sntprintf(Group, LPGENT("Status icons")L"/%s/%S %s", m_tszUserName, proto, TranslateT("transport"));
mir_snprintf(defFile, "proto_%s.dll", proto);
if (!hAdvancedStatusIcon)
hAdvancedStatusIcon = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index 49192e6613..ca7020a25e 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -83,52 +83,52 @@ void CJabberIqManager::Shutdown() void CJabberIqManager::FillPermanentHandlers()
{
// version requests (XEP-0092)
- AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestVersion, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_VERSION, FALSE, L"query");
// last activity (XEP-0012)
- AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestLastActivity, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_LAST_ACTIVITY, FALSE, L"query");
// ping requests (XEP-0199)
- AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, _T("ping"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestPing, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PING, FALSE, L"ping");
// entity time (XEP-0202)
- AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, _T("time"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME, FALSE, L"time");
// entity time (XEP-0090)
- AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqProcessIqOldTime, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_ENTITY_TIME_OLD, FALSE, L"query");
// old avatars support (deprecated XEP-0008)
- AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestAvatar, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_AVATAR, FALSE, L"query");
// privacy lists (XEP-0016)
- AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestPrivacyLists, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR, JABBER_FEAT_PRIVACY_LISTS, FALSE, L"query");
// in band bytestreams (XEP-0047)
AddPermanentHandler(&CJabberProto::OnFtHandleIbbIq, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_CHILD_TAG_NAME | JABBER_IQ_PARSE_CHILD_TAG_XMLNS, JABBER_FEAT_IBB, FALSE, NULL);
// socks5-bytestreams (XEP-0065)
- AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::FtHandleBytestreamRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_BYTESTREAMS, FALSE, L"query");
// session initiation (XEP-0095)
- AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, _T("si"));
+ AddPermanentHandler(&CJabberProto::OnSiRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_SI, FALSE, L"si");
// roster push requests
- AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnRosterPushRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_IQ_ROSTER, FALSE, L"query");
// OOB file transfers
- AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnIqRequestOOB, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_HCONTACT | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_OOB, FALSE, L"query");
// disco#items requests (XEP-0030, XEP-0050)
- AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnHandleDiscoItemsRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_ITEMS, FALSE, L"query");
// disco#info requests (XEP-0030, XEP-0050, XEP-0115)
- AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, _T("query"));
+ AddPermanentHandler(&CJabberProto::OnHandleDiscoInfoRequest, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_DISCO_INFO, FALSE, L"query");
// ad-hoc commands (XEP-0050) for remote controlling (XEP-0146)
- AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, _T("command"));
+ AddPermanentHandler(&CJabberProto::HandleAdhocCommandRequest, JABBER_IQ_TYPE_SET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_TO | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_COMMANDS, FALSE, L"command");
// http auth (XEP-0070)
- AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, _T("confirm"));
+ AddPermanentHandler(&CJabberProto::OnIqHttpAuth, JABBER_IQ_TYPE_GET, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_ID_STR | JABBER_IQ_PARSE_CHILD_TAG_NODE, JABBER_FEAT_HTTP_AUTH, FALSE, L"confirm");
}
void __cdecl CJabberProto::ExpirerThread(void* pParam)
@@ -171,7 +171,7 @@ void CJabberIqManager::ExpireInfo(CJabberIqInfo *pInfo) if ((pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (pInfo->m_szFrom))
pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom);
- ppro->debugLog(_T("Expiring iq id %d, sent to %s"), pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : _T("server"));
+ ppro->debugLog(L"Expiring iq id %d, sent to %s", pInfo->m_nIqId, pInfo->m_szReceiver ? pInfo->m_szReceiver : L"server");
pInfo->m_nIqType = JABBER_IQ_TYPE_FAIL;
(ppro->*(pInfo->m_pHandler))(NULL, pInfo);
@@ -243,14 +243,14 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) if (nIqId == -1 || pNode == NULL)
return false;
- const TCHAR *szType = XmlGetAttrValue(pNode, _T("type"));
+ const TCHAR *szType = XmlGetAttrValue(pNode, L"type");
if (!szType)
return false;
int nIqType = JABBER_IQ_TYPE_FAIL;
- if (!mir_tstrcmpi(szType, _T("result")))
+ if (!mir_tstrcmpi(szType, L"result"))
nIqType = JABBER_IQ_TYPE_RESULT;
- else if (!mir_tstrcmpi(szType, _T("error")))
+ else if (!mir_tstrcmpi(szType, L"error"))
nIqType = JABBER_IQ_TYPE_ERROR;
else
return false;
@@ -268,19 +268,19 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_NAME))
pInfo->m_szChildTagName = (TCHAR*)XmlGetName(pInfo->m_pChildNode);
if (pInfo->m_pChildNode && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_CHILD_TAG_XMLNS))
- pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, _T("xmlns"));
+ pInfo->m_szChildTagXmlns = (TCHAR*)XmlGetAttrValue(pNode, L"xmlns");
}
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_TO)
- pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to"));
+ pInfo->m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to");
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_FROM)
- pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from"));
+ pInfo->m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from");
if (pInfo->m_szFrom && (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT))
pInfo->m_hContact = ppro->HContactFromJID(pInfo->m_szFrom);
if (pInfo->m_dwParamsToParse & JABBER_IQ_PARSE_ID_STR)
- pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id"));
+ pInfo->m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id");
(ppro->*(pInfo->m_pHandler))(pNode, pInfo);
delete pInfo;
@@ -294,15 +294,15 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) for (int i = 0; i < m_arHandlers.getCount(); i++) {
CJabberIqPermanentInfo &pInfo = m_arHandlers[i];
// have to get all data here, in the loop, because there's always possibility that previous handler modified it
- const TCHAR *szType = XmlGetAttrValue(pNode, _T("type"));
+ const TCHAR *szType = XmlGetAttrValue(pNode, L"type");
if (!szType)
return FALSE;
CJabberIqInfo iqInfo;
iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL;
- if (!mir_tstrcmpi(szType, _T("get")))
+ if (!mir_tstrcmpi(szType, L"get"))
iqInfo.m_nIqType = JABBER_IQ_TYPE_GET;
- else if (!mir_tstrcmpi(szType, _T("set")))
+ else if (!mir_tstrcmpi(szType, L"set"))
iqInfo.m_nIqType = JABBER_IQ_TYPE_SET;
else
return FALSE;
@@ -315,7 +315,7 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) return FALSE;
const TCHAR *szTagName = XmlGetName(pFirstChild);
- const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, _T("xmlns"));
+ const TCHAR *szXmlns = XmlGetAttrValue(pFirstChild, L"xmlns");
if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) &&
(!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName)))
@@ -324,19 +324,19 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) iqInfo.m_pChildNode = pFirstChild;
iqInfo.m_szChildTagName = (TCHAR*)szTagName;
iqInfo.m_szChildTagXmlns = (TCHAR*)szXmlns;
- iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, _T("id"));
+ iqInfo.m_szId = (TCHAR*)XmlGetAttrValue(pNode, L"id");
iqInfo.m_pUserData = pInfo.m_pUserData;
if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_TO)
- iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, _T("to"));
+ iqInfo.m_szTo = (TCHAR*)XmlGetAttrValue(pNode, L"to");
if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_FROM)
- iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, _T("from"));
+ iqInfo.m_szFrom = (TCHAR*)XmlGetAttrValue(pNode, L"from");
if ((pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_HCONTACT) && (iqInfo.m_szFrom))
iqInfo.m_hContact = ppro->HContactFromJID(iqInfo.m_szFrom);
- ppro->debugLog(_T("Handling iq id %s, type %s, from %s"), iqInfo.m_szId, szType, iqInfo.m_szFrom);
+ ppro->debugLog(L"Handling iq id %s, type %s, from %s", iqInfo.m_szId, szType, iqInfo.m_szFrom);
if ((ppro->*(pInfo.m_pHandler))(pNode, &iqInfo))
return true;
}
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 13e3cc5cca..a8f4f31e8f 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -36,16 +36,16 @@ BOOL CJabberProto::OnIqRequestVersion(HXML, CJabberIqInfo *pInfo) if (!m_options.AllowVersionRequests)
return FALSE;
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML query = iq << XQUERY(JABBER_FEAT_VERSION);
- query << XCHILD(_T("name"), _T("Miranda NG Jabber"));
- query << XCHILD(_T("version"), szCoreVersion);
+ query << XCHILD(L"name", L"Miranda NG Jabber");
+ query << XCHILD(L"version", szCoreVersion);
if (m_options.ShowOSVersion) {
TCHAR os[256] = { 0 };
if (!GetOSDisplayString(os, _countof(os)))
- mir_tstrncpy(os, _T("Microsoft Windows"), _countof(os));
- query << XCHILD(_T("os"), os);
+ mir_tstrncpy(os, L"Microsoft Windows", _countof(os));
+ query << XCHILD(L"os", os);
}
m_ThreadInfo->send(iq);
@@ -56,15 +56,15 @@ BOOL CJabberProto::OnIqRequestVersion(HXML, CJabberIqInfo *pInfo) BOOL CJabberProto::OnIqRequestLastActivity(HXML, CJabberIqInfo *pInfo)
{
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo) << XQUERY(JABBER_FEAT_LAST_ACTIVITY)
- << XATTRI(_T("seconds"), m_tmJabberIdleStartTime ? time(0) - m_tmJabberIdleStartTime : 0));
+ XmlNodeIq(L"result", pInfo) << XQUERY(JABBER_FEAT_LAST_ACTIVITY)
+ << XATTRI(L"seconds", m_tmJabberIdleStartTime ? time(0) - m_tmJabberIdleStartTime : 0));
return TRUE;
}
// XEP-0199: XMPP Ping support
BOOL CJabberProto::OnIqRequestPing(HXML, CJabberIqInfo *pInfo)
{
- m_ThreadInfo->send(XmlNodeIq(_T("result"), pInfo) << XATTR(_T("from"), m_ThreadInfo->fullJID));
+ m_ThreadInfo->send(XmlNodeIq(L"result", pInfo) << XATTR(L"from", m_ThreadInfo->fullJID));
return TRUE;
}
@@ -101,17 +101,17 @@ BOOL CJabberProto::OnIqRequestTime(HXML, CJabberIqInfo *pInfo) TCHAR stime[100];
TCHAR szTZ[10];
- TimeZone_PrintDateTime(UTC_TIME_HANDLE, _T("I"), stime, _countof(stime), 0);
+ TimeZone_PrintDateTime(UTC_TIME_HANDLE, L"I", stime, _countof(stime), 0);
int nGmtOffset = GetGMTOffset();
- mir_sntprintf(szTZ, _T("%+03d:%02d"), nGmtOffset / 60, nGmtOffset % 60);
+ mir_sntprintf(szTZ, L"%+03d:%02d", nGmtOffset / 60, nGmtOffset % 60);
- XmlNodeIq iq(_T("result"), pInfo);
- HXML timeNode = iq << XCHILDNS(_T("time"), JABBER_FEAT_ENTITY_TIME);
- timeNode << XCHILD(_T("utc"), stime); timeNode << XCHILD(_T("tzo"), szTZ);
+ XmlNodeIq iq(L"result", pInfo);
+ HXML timeNode = iq << XCHILDNS(L"time", JABBER_FEAT_ENTITY_TIME);
+ timeNode << XCHILD(L"utc", stime); timeNode << XCHILD(L"tzo", szTZ);
LPCTSTR szTZName = TimeZone_GetName(NULL);
if (szTZName)
- timeNode << XCHILD(_T("tz"), szTZName);
+ timeNode << XCHILD(L"tz", szTZName);
m_ThreadInfo->send(iq);
return TRUE;
}
@@ -125,19 +125,19 @@ BOOL CJabberProto::OnIqProcessIqOldTime(HXML, CJabberIqInfo *pInfo) _tzset();
time(<ime);
gmt = gmtime(<ime);
- mir_sntprintf(stime, _T("%.4i%.2i%.2iT%.2i:%.2i:%.2i"),
+ mir_sntprintf(stime, L"%.4i%.2i%.2iT%.2i:%.2i:%.2i",
gmt->tm_year + 1900, gmt->tm_mon + 1,
gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec);
dtime = _tctime(<ime);
dtime[24] = 0;
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML queryNode = iq << XQUERY(JABBER_FEAT_ENTITY_TIME_OLD);
- queryNode << XCHILD(_T("utc"), stime);
+ queryNode << XCHILD(L"utc", stime);
LPCTSTR szTZName = TimeZone_GetName(NULL);
if (szTZName)
- queryNode << XCHILD(_T("tz"), szTZName);
- queryNode << XCHILD(_T("display"), dtime);
+ queryNode << XCHILD(L"tz", szTZName);
+ queryNode << XCHILD(L"display", dtime);
m_ThreadInfo->send(iq);
return TRUE;
}
@@ -153,17 +153,17 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo) TCHAR *szMimeType;
switch (pictureType) {
- case PA_FORMAT_JPEG: szMimeType = _T("image/jpeg"); break;
- case PA_FORMAT_GIF: szMimeType = _T("image/gif"); break;
- case PA_FORMAT_PNG: szMimeType = _T("image/png"); break;
- case PA_FORMAT_BMP: szMimeType = _T("image/bmp"); break;
+ case PA_FORMAT_JPEG: szMimeType = L"image/jpeg"; break;
+ case PA_FORMAT_GIF: szMimeType = L"image/gif"; break;
+ case PA_FORMAT_PNG: szMimeType = L"image/png"; break;
+ case PA_FORMAT_BMP: szMimeType = L"image/bmp"; break;
default: return TRUE;
}
TCHAR szFileName[MAX_PATH];
GetAvatarFileName(NULL, szFileName, _countof(szFileName));
- FILE* in = _tfopen(szFileName, _T("rb"));
+ FILE* in = _tfopen(szFileName, L"rb");
if (in == NULL)
return TRUE;
@@ -178,21 +178,21 @@ BOOL CJabberProto::OnIqRequestAvatar(HXML, CJabberIqInfo *pInfo) fclose(in);
ptrA str(mir_base64_encode((PBYTE)(char*)buffer, bytes));
- m_ThreadInfo->send(XmlNodeIq(_T("result"), pInfo) << XQUERY(JABBER_FEAT_AVATAR) << XCHILD(_T("query"), _A2T(str)) << XATTR(_T("mimetype"), szMimeType));
+ m_ThreadInfo->send(XmlNodeIq(L"result", pInfo) << XQUERY(JABBER_FEAT_AVATAR) << XCHILD(L"query", _A2T(str)) << XATTR(L"mimetype", szMimeType));
return TRUE;
}
BOOL CJabberProto::OnSiRequest(HXML node, CJabberIqInfo *pInfo)
{
- const TCHAR *szProfile = XmlGetAttrValue(pInfo->GetChildNode(), _T("profile"));
+ const TCHAR *szProfile = XmlGetAttrValue(pInfo->GetChildNode(), L"profile");
if (szProfile && !mir_tstrcmp(szProfile, JABBER_FEAT_SI_FT))
FtHandleSiRequest(node);
else {
- XmlNodeIq iq(_T("error"), pInfo);
- HXML error = iq << XCHILD(_T("error")) << XATTRI(_T("code"), 400) << XATTR(_T("type"), _T("cancel"));
- error << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- error << XCHILD(_T("bad-profile"));
+ XmlNodeIq iq(L"error", pInfo);
+ HXML error = iq << XCHILD(L"error") << XATTRI(L"code", 400) << XATTR(L"type", L"cancel");
+ error << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas");
+ error << XCHILD(L"bad-profile");
m_ThreadInfo->send(iq);
}
return TRUE;
@@ -227,7 +227,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) // invalid JID
if (!bRetVal) {
- debugLog(_T("<iq/> attempt to hack via roster push from %s"), pInfo->GetFrom());
+ debugLog(L"<iq/> attempt to hack via roster push from %s", pInfo->GetFrom());
return TRUE;
}
}
@@ -240,16 +240,16 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) if (!itemNode)
break;
- if (mir_tstrcmp(XmlGetName(itemNode), _T("item")) != 0)
+ if (mir_tstrcmp(XmlGetName(itemNode), L"item") != 0)
continue;
- if ((jid = XmlGetAttrValue(itemNode, _T("jid"))) == NULL)
+ if ((jid = XmlGetAttrValue(itemNode, L"jid")) == NULL)
continue;
- if ((str = XmlGetAttrValue(itemNode, _T("subscription"))) == NULL)
+ if ((str = XmlGetAttrValue(itemNode, L"subscription")) == NULL)
continue;
// we will not add new account when subscription=remove
- if (!mir_tstrcmp(str, _T("to")) || !mir_tstrcmp(str, _T("both")) || !mir_tstrcmp(str, _T("from")) || !mir_tstrcmp(str, _T("none"))) {
- const TCHAR *name = XmlGetAttrValue(itemNode, _T("name"));
+ if (!mir_tstrcmp(str, L"to") || !mir_tstrcmp(str, L"both") || !mir_tstrcmp(str, L"from") || !mir_tstrcmp(str, L"none")) {
+ const TCHAR *name = XmlGetAttrValue(itemNode, L"name");
ptrT nick((name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid));
if (nick != NULL) {
MCONTACT hContact = HContactFromJID(jid, false);
@@ -287,18 +287,18 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) }
if (JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid)) {
- if (!mir_tstrcmp(str, _T("both"))) item->subscription = SUB_BOTH;
- else if (!mir_tstrcmp(str, _T("to"))) item->subscription = SUB_TO;
- else if (!mir_tstrcmp(str, _T("from"))) item->subscription = SUB_FROM;
+ if (!mir_tstrcmp(str, L"both")) item->subscription = SUB_BOTH;
+ else if (!mir_tstrcmp(str, L"to")) item->subscription = SUB_TO;
+ else if (!mir_tstrcmp(str, L"from")) item->subscription = SUB_FROM;
else item->subscription = SUB_NONE;
- debugLog(_T("Roster push for jid=%s, set subscription to %s"), jid, str);
+ debugLog(L"Roster push for jid=%s, set subscription to %s", jid, str);
MCONTACT hContact = HContactFromJID(jid);
// subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
- if (!mir_tstrcmp(str, _T("remove"))) {
+ if (!mir_tstrcmp(str, L"remove")) {
if (hContact) {
SetContactOfflineStatus(hContact);
ListRemove(LIST_ROSTER, jid);
@@ -327,8 +327,8 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) if (m_options.BsOnlyIBB) {
// reject
- XmlNodeIq iq(_T("error"), pInfo);
- HXML e = XmlAddChild(iq, _T("error"), _T("File transfer refused")); XmlAddAttr(e, _T("code"), 406);
+ XmlNodeIq iq(L"error", pInfo);
+ HXML e = XmlAddChild(iq, L"error", L"File transfer refused"); XmlAddAttr(e, L"code", 406);
m_ThreadInfo->send(iq);
return TRUE;
}
@@ -344,7 +344,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) // Parse the URL
TCHAR *str = (TCHAR*)XmlGetText(n); // URL of the file to get
- if (!_tcsnicmp(str, _T("http://"), 7)) {
+ if (!_tcsnicmp(str, L"http://", 7)) {
TCHAR *p = str + 7, *q;
if ((q = _tcschr(p, '/')) != NULL) {
TCHAR text[1024];
@@ -371,7 +371,7 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) desc = (TCHAR*)XmlGetText(n);
TCHAR *str2;
- debugLog(_T("description = %s"), desc);
+ debugLog(L"description = %s", desc);
if ((str2 = _tcsrchr(ft->httpPath, '/')) != NULL)
str2++;
else
@@ -391,8 +391,8 @@ BOOL CJabberProto::OnIqRequestOOB(HXML, CJabberIqInfo *pInfo) }
else {
// reject
- XmlNodeIq iq(_T("error"), pInfo);
- HXML e = XmlAddChild(iq, _T("error"), _T("File transfer refused")); XmlAddAttr(e, _T("code"), 406);
+ XmlNodeIq iq(L"error", pInfo);
+ HXML e = XmlAddChild(iq, L"error", L"File transfer refused"); XmlAddAttr(e, L"code", 406);
m_ThreadInfo->send(iq);
delete ft;
}
@@ -404,7 +404,7 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest(HXML iqNode, CJabberIqInfo *pInfo) if (!pInfo->GetChildNode())
return TRUE;
- const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node"));
+ const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node");
// caps hack
if (m_clientCapsManager.HandleInfoRequest(iqNode, pInfo, szNode))
return TRUE;
@@ -415,9 +415,9 @@ BOOL CJabberProto::OnHandleDiscoInfoRequest(HXML iqNode, CJabberIqInfo *pInfo) // another request, send empty result
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), pInfo)
- << XCHILD(_T("error")) << XATTRI(_T("code"), 404) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", pInfo)
+ << XCHILD(L"error") << XATTRI(L"code", 404) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return TRUE;
}
@@ -427,19 +427,19 @@ BOOL CJabberProto::OnHandleDiscoItemsRequest(HXML iqNode, CJabberIqInfo *pInfo) return TRUE;
// ad-hoc commands check:
- const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node"));
+ const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node");
if (szNode && m_adhocManager.HandleItemsRequest(iqNode, pInfo, szNode))
return TRUE;
// another request, send empty result
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS);
if (szNode)
- XmlAddAttr(resultQuery, _T("node"), szNode);
+ XmlAddAttr(resultQuery, L"node", szNode);
if (!szNode && m_options.EnableRemoteControl)
- resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), m_ThreadInfo->fullJID)
- << XATTR(_T("node"), JABBER_FEAT_COMMANDS) << XATTR(_T("name"), _T("Ad-hoc commands"));
+ resultQuery << XCHILD(L"item") << XATTR(L"jid", m_ThreadInfo->fullJID)
+ << XATTR(L"node", JABBER_FEAT_COMMANDS) << XATTR(L"name", L"Ad-hoc commands");
m_ThreadInfo->send(iq);
return TRUE;
@@ -473,9 +473,9 @@ BOOL CJabberProto::OnIqHttpAuth(HXML node, CJabberIqInfo *pInfo) if (!pConfirm)
return TRUE;
- const TCHAR *szId = XmlGetAttrValue(pConfirm, _T("id"));
- const TCHAR *szMethod = XmlGetAttrValue(pConfirm, _T("method"));
- const TCHAR *szUrl = XmlGetAttrValue(pConfirm, _T("url"));
+ const TCHAR *szId = XmlGetAttrValue(pConfirm, L"id");
+ const TCHAR *szMethod = XmlGetAttrValue(pConfirm, L"method");
+ const TCHAR *szUrl = XmlGetAttrValue(pConfirm, L"url");
if (!szId || !szMethod || !szUrl)
return TRUE;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index fdba87e6cf..61fe3f353d 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -34,8 +34,8 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) if (iqNode == NULL)
return;
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
- if (mir_tstrcmp(type, _T("result")))
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
+ if (mir_tstrcmp(type, L"result"))
return;
HXML query = XmlGetChildByTag(iqNode, "query", "xmlns", JABBER_FEAT_DISCO_INFO);
@@ -43,13 +43,13 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) return;
HXML identity;
- for (int i = 1; (identity = XmlGetNthChild(query, _T("identity"), i)) != NULL; i++) {
+ for (int i = 1; (identity = XmlGetNthChild(query, L"identity", i)) != NULL; i++) {
JABBER_DISCO_FIELD tmp = {
- XmlGetAttrValue(identity, _T("category")),
- XmlGetAttrValue(identity, _T("type")),
- XmlGetAttrValue(identity, _T("name")) };
+ XmlGetAttrValue(identity, L"category"),
+ XmlGetAttrValue(identity, L"type"),
+ XmlGetAttrValue(identity, L"name") };
- if (!mir_tstrcmp(tmp.category, _T("pubsub")) && !mir_tstrcmp(tmp.type, _T("pep"))) {
+ if (!mir_tstrcmp(tmp.category, L"pubsub") && !mir_tstrcmp(tmp.type, L"pep")) {
m_bPepSupported = true;
EnableMenuItems(true);
@@ -62,8 +62,8 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) if (m_ThreadInfo) {
HXML feature;
- for (int i = 1; (feature = XmlGetNthChild(query, _T("feature"), i)) != NULL; i++) {
- const TCHAR *featureName = XmlGetAttrValue(feature, _T("var"));
+ for (int i = 1; (feature = XmlGetNthChild(query, L"feature", i)) != NULL; i++) {
+ const TCHAR *featureName = XmlGetAttrValue(feature, L"var");
if (!featureName)
continue;
@@ -86,7 +86,7 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf if (iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
bPrivateStorageSupport = true;
- szGroupDelimeter = XPathFmt(iqNode, _T("query[@xmlns='%s']/roster[@xmlns='%s']"), JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_NESTED_ROSTER_GROUPS);
+ szGroupDelimeter = XPathFmt(iqNode, L"query[@xmlns='%s']/roster[@xmlns='%s']", JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_NESTED_ROSTER_GROUPS);
if (szGroupDelimeter && !szGroupDelimeter[0])
szGroupDelimeter = NULL; // "" as roster delimeter is not supported :)
}
@@ -96,22 +96,22 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf return;
// is our default delimiter?
- if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, _T("\\"))))
+ if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, L"\\")))
m_ThreadInfo->send(
- XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
- << XCHILD(_T("roster"), _T("\\")) << XATTR(_T("xmlns"), JABBER_FEAT_NESTED_ROSTER_GROUPS));
+ XmlNodeIq(L"set", SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
+ << XCHILD(L"roster", L"\\") << XATTR(L"xmlns", JABBER_FEAT_NESTED_ROSTER_GROUPS));
// roster request
- TCHAR *szUserData = mir_tstrdup(szGroupDelimeter ? szGroupDelimeter : _T("\\"));
+ TCHAR *szUserData = mir_tstrdup(szGroupDelimeter ? szGroupDelimeter : L"\\");
m_ThreadInfo->send(
XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetRoster, JABBER_IQ_TYPE_GET, NULL, 0, -1, (void*)szUserData))
- << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER));
+ << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER));
}
void CJabberProto::OnIqResultNotes(HXML iqNode, CJabberIqInfo *pInfo)
{
if (iqNode && pInfo->GetIqType() == JABBER_IQ_TYPE_RESULT) {
- HXML hXmlData = XPathFmt(iqNode, _T("query[@xmlns='%s']/storage[@xmlns='%s']"),
+ HXML hXmlData = XPathFmt(iqNode, L"query[@xmlns='%s']/storage[@xmlns='%s']",
JABBER_FEAT_PRIVATE_STORAGE, JABBER_FEAT_MIRANDA_NOTES);
if (hXmlData) m_notes.LoadXml(hXmlData);
}
@@ -134,7 +134,7 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) LISTFOREACH(i, this, LIST_BOOKMARK)
{
JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
- if (item != NULL && !mir_tstrcmp(item->type, _T("conference")) && item->bAutoJoin)
+ if (item != NULL && !mir_tstrcmp(item->type, L"conference") && item->bAutoJoin)
ll.insert(item);
}
@@ -144,8 +144,8 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) TCHAR room[256], text[128];
_tcsncpy_s(text, item->jid, _TRUNCATE);
_tcsncpy_s(room, text, _TRUNCATE);
- TCHAR *p = _tcstok(room, _T("@"));
- TCHAR *server = _tcstok(NULL, _T("@"));
+ TCHAR *p = _tcstok(room, L"@");
+ TCHAR *server = _tcstok(NULL, L"@");
if (item->nick && item->nick[0])
GroupchatJoinRoom(server, p, item->nick, item->password, true);
else {
@@ -178,18 +178,18 @@ void CJabberProto::OnLoggedIn() pIqInfo->SetTimeout(30000);
m_ThreadInfo->send(
XmlNodeIq(pIqInfo) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
- << XCHILDNS(_T("roster"), JABBER_FEAT_NESTED_ROSTER_GROUPS));
+ << XCHILDNS(L"roster", JABBER_FEAT_NESTED_ROSTER_GROUPS));
}
// Server-side notes
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultNotes, JABBER_IQ_TYPE_GET))
<< XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
- << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES));
+ << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES));
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET))
- << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(_T("storage"), _T("storage:bookmarks")));
+ << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks"));
m_bPepSupported = false;
m_ThreadInfo->jabberServerCaps = JABBER_RESOURCE_CAPS_NONE;
@@ -216,22 +216,22 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo*) HXML queryNode;
const TCHAR *type;
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultSetAuth, JABBER_IQ_TYPE_SET));
- HXML query = iq << XQUERY(_T("jabber:iq:auth"));
- query << XCHILD(_T("username"), m_ThreadInfo->conn.username);
+ HXML query = iq << XQUERY(L"jabber:iq:auth");
+ query << XCHILD(L"username", m_ThreadInfo->conn.username);
if (XmlGetChild(queryNode, "digest") != NULL && m_ThreadInfo->szStreamId) {
JabberShaStrBuf buf;
T2Utf str(m_ThreadInfo->conn.password);
char text[200];
mir_snprintf(text, "%s%s", m_ThreadInfo->szStreamId, str);
- query << XCHILD(_T("digest"), _A2T(JabberSha1(text, buf)));
+ query << XCHILD(L"digest", _A2T(JabberSha1(text, buf)));
}
else if (XmlGetChild(queryNode, "password") != NULL)
- query << XCHILD(_T("password"), m_ThreadInfo->conn.password);
+ query << XCHILD(L"password", m_ThreadInfo->conn.password);
else {
debugLogA("No known authentication mechanism accepted by the server.");
m_ThreadInfo->send("</stream:stream>");
@@ -239,11 +239,11 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo*) }
if (XmlGetChild(queryNode, "resource") != NULL)
- query << XCHILD(_T("resource"), m_ThreadInfo->resource);
+ query << XCHILD(L"resource", m_ThreadInfo->resource);
m_ThreadInfo->send(iq);
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
m_ThreadInfo->send("</stream:stream>");
TCHAR text[128];
@@ -261,9 +261,9 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo*) // RECVED: authentication result
// ACTION: if successfully logged in, continue by requesting roster list and set my initial status
debugLogA("<iq/> iqIdSetAuth");
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
ptrT tszNick(getTStringA("Nick"));
if (tszNick == NULL)
setTString("Nick", m_ThreadInfo->conn.username);
@@ -271,7 +271,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo*) OnLoggedIn();
}
// What to do if password error? etc...
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
TCHAR text[128];
m_ThreadInfo->send("</stream:stream>");
@@ -290,16 +290,16 @@ void CJabberProto::OnIqResultBind(HXML iqNode, CJabberIqInfo *pInfo) LPCTSTR szJid = XPathT(iqNode, "bind[@xmlns='urn:ietf:params:xml:ns:xmpp-bind']/jid");
if (szJid) {
if (!_tcsncmp(m_ThreadInfo->fullJID, szJid, _countof(m_ThreadInfo->fullJID)))
- debugLog(_T("Result Bind: %s confirmed "), m_ThreadInfo->fullJID);
+ debugLog(L"Result Bind: %s confirmed ", m_ThreadInfo->fullJID);
else {
- debugLog(_T("Result Bind: %s changed to %s"), m_ThreadInfo->fullJID, szJid);
+ debugLog(L"Result Bind: %s changed to %s", m_ThreadInfo->fullJID, szJid);
_tcsncpy_s(m_ThreadInfo->fullJID, szJid, _TRUNCATE);
}
}
if (m_ThreadInfo->bIsSessionAvailable)
m_ThreadInfo->send(
XmlNodeIq( AddIQ(&CJabberProto::OnIqResultSession, JABBER_IQ_TYPE_SET))
- << XCHILDNS(_T("session"), _T("urn:ietf:params:xml:ns:xmpp-session")));
+ << XCHILDNS(L"session", L"urn:ietf:params:xml:ns:xmpp-session"));
else
OnLoggedIn();
}
@@ -357,12 +357,12 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) return;
}
- if (mir_tstrcmp(XmlGetAttrValue(queryNode, _T("xmlns")), JABBER_FEAT_IQ_ROSTER)) {
+ if (mir_tstrcmp(XmlGetAttrValue(queryNode, L"xmlns"), JABBER_FEAT_IQ_ROSTER)) {
mir_free(szGroupDelimeter);
return;
}
- if (!mir_tstrcmp(szGroupDelimeter, _T("\\"))) {
+ if (!mir_tstrcmp(szGroupDelimeter, L"\\")) {
mir_free(szGroupDelimeter);
szGroupDelimeter = NULL;
}
@@ -377,25 +377,25 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (!itemNode)
break;
- if (mir_tstrcmp(XmlGetName(itemNode), _T("item")))
+ if (mir_tstrcmp(XmlGetName(itemNode), L"item"))
continue;
- const TCHAR *str = XmlGetAttrValue(itemNode, _T("subscription"));
+ const TCHAR *str = XmlGetAttrValue(itemNode, L"subscription");
JABBER_SUBSCRIPTION sub;
if (str == NULL) sub = SUB_NONE;
- else if (!mir_tstrcmp(str, _T("both"))) sub = SUB_BOTH;
- else if (!mir_tstrcmp(str, _T("to"))) sub = SUB_TO;
- else if (!mir_tstrcmp(str, _T("from"))) sub = SUB_FROM;
+ else if (!mir_tstrcmp(str, L"both")) sub = SUB_BOTH;
+ else if (!mir_tstrcmp(str, L"to")) sub = SUB_TO;
+ else if (!mir_tstrcmp(str, L"from")) sub = SUB_FROM;
else sub = SUB_NONE;
- const TCHAR *jid = XmlGetAttrValue(itemNode, _T("jid"));
+ const TCHAR *jid = XmlGetAttrValue(itemNode, L"jid");
if (jid == NULL)
continue;
if (_tcschr(jid, '@') == NULL)
bIsTransport = true;
- const TCHAR *name = XmlGetAttrValue(itemNode, _T("name"));
+ const TCHAR *name = XmlGetAttrValue(itemNode, L"name");
TCHAR *nick = (name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid);
if (nick == NULL)
continue;
@@ -419,7 +419,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) szPos += mir_tstrlen(szGroupDelimeter);
TCHAR *szNewGroup = (TCHAR *)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(item->group) + mir_tstrlen(szPos) + 2));
mir_tstrcpy(szNewGroup, item->group);
- mir_tstrcat(szNewGroup, _T("\\"));
+ mir_tstrcat(szNewGroup, L"\\");
mir_tstrcat(szNewGroup, szPos);
mir_free(item->group);
item->group = szNewGroup;
@@ -478,7 +478,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) setByte(hContact, "IsTransport", false);
}
- const TCHAR *imagepath = XmlGetAttrValue(itemNode, _T("vz:img"));
+ const TCHAR *imagepath = XmlGetAttrValue(itemNode, L"vz:img");
if (imagepath)
httpavatars->insert(new JABBER_HTTP_AVATARS(imagepath, hContact));
}
@@ -494,7 +494,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) MCONTACT hNext = db_find_next(hContact, m_szModuleName);
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) {
- debugLog(_T("Syncing roster: preparing to delete %s (hContact=0x%x)"), jid, hContact);
+ debugLog(L"Syncing roster: preparing to delete %s (hContact=0x%x)", jid, hContact);
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
}
hContact = hNext;
@@ -530,14 +530,14 @@ void CJabberProto::OnIqResultGetRegister(HXML iqNode, CJabberIqInfo*) HXML queryNode;
const TCHAR *type;
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
if (m_hwndAgentRegInput)
SendMessage(m_hwndAgentRegInput, WM_JABBER_REGINPUT_ACTIVATE, 1 /*success*/, (LPARAM)xmlCopyNode(iqNode));
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
if (m_hwndAgentRegInput) {
HXML errorNode = XmlGetChild(iqNode, "error");
TCHAR *str = JabberErrorMsg(errorNode);
@@ -554,10 +554,10 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdSetRegister");
const TCHAR *type, *from;
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if ((from = XmlGetAttrValue(iqNode, _T("from"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
+ if ((from = XmlGetAttrValue(iqNode, L"from")) == NULL) return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setByte(hContact, "IsTransport", true);
@@ -565,7 +565,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if (m_hwndRegProgress)
SendMessage(m_hwndRegProgress, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)TranslateT("Registration successful"));
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
if (m_hwndRegProgress) {
HXML errorNode = XmlGetChild(iqNode, "error");
TCHAR *str = JabberErrorMsg(errorNode);
@@ -601,7 +601,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP TCHAR szAvatarFileName[MAX_PATH];
GetAvatarFileName(hContact, szAvatarFileName, _countof(szAvatarFileName));
- debugLog(_T("Picture file name set to %s"), szAvatarFileName);
+ debugLog(L"Picture file name set to %s", szAvatarFileName);
HANDLE hFile = CreateFile(szAvatarFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return;
@@ -618,7 +618,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP hasPhoto = true;
CallService(MS_AV_SETMYAVATART, (WPARAM)m_szModuleName, (LPARAM)szAvatarFileName);
- debugLog(_T("My picture saved to %s"), szAvatarFileName);
+ debugLog(L"My picture saved to %s", szAvatarFileName);
}
else {
ptrT jid(getTStringA(hContact, "jid"));
@@ -634,7 +634,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP if (item->photoFileName && mir_tstrcmp(item->photoFileName, szAvatarFileName))
DeleteFile(item->photoFileName);
replaceStrT(item->photoFileName, szAvatarFileName);
- debugLog(_T("Contact's picture saved to %s"), szAvatarFileName);
+ debugLog(L"Contact's picture saved to %s", szAvatarFileName);
OnIqResultGotAvatar(hContact, o, szPicType);
}
}
@@ -661,27 +661,27 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) DBVARIANT dbv;
debugLogA("<iq/> iqIdGetVcard");
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if ((jid = XmlGetAttrValue(iqNode, _T("from"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
+ if ((jid = XmlGetAttrValue(iqNode, L"from")) == NULL) return;
int id = JabberGetPacketID(iqNode);
if (id == m_nJabberSearchID) {
m_nJabberSearchID = -1;
if ((vCardNode = XmlGetChild(iqNode, "vCard")) != NULL) {
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
psr.flags = PSR_TCHAR;
psr.nick.t = sttGetText(vCardNode, "NICKNAME");
psr.firstName.t = sttGetText(vCardNode, "FN");
- psr.lastName.t = _T("");
+ psr.lastName.t = L"";
psr.email.t = sttGetText(vCardNode, "EMAIL");
psr.id.t = NEWTSTR_ALLOCA(jid);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!mir_tstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, L"error"))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
else ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
@@ -699,13 +699,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) debugLogA("Other user's vcard");
}
- if (!mir_tstrcmp(type, _T("error"))) {
+ if (!mir_tstrcmp(type, L"error")) {
if ((hContact = HContactFromJID(jid)) != NULL)
ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
return;
}
- if (mir_tstrcmp(type, _T("result")))
+ if (mir_tstrcmp(type, L"result"))
return;
bool hasFn = false, hasNick = false, hasGiven = false, hasFamily = false, hasMiddle = false,
@@ -723,19 +723,19 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) if (!n)
break;
if (XmlGetName(n) == NULL) continue;
- if (!mir_tstrcmp(XmlGetName(n), _T("FN"))) {
+ if (!mir_tstrcmp(XmlGetName(n), L"FN")) {
if (XmlGetText(n) != NULL) {
hasFn = true;
setTString(hContact, "FullName", XmlGetText(n));
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("NICKNAME"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"NICKNAME")) {
if (XmlGetText(n) != NULL) {
hasNick = true;
setTString(hContact, "Nick", XmlGetText(n));
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("N"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"N")) {
// First/Last name
if (!hasGiven && !hasFamily && !hasMiddle) {
if ((m = XmlGetChild(n, "GIVEN")) != NULL && XmlGetText(m) != NULL) {
@@ -752,7 +752,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("EMAIL"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"EMAIL")) {
// E-mail address(es)
if ((m = XmlGetChild(n, "USERID")) == NULL) // Some bad client put e-mail directly in <EMAIL/> instead of <USERID/>
m = n;
@@ -779,11 +779,11 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) nEmail++;
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("BDAY"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"BDAY")) {
// Birthday
if (!hasBday && XmlGetText(n) != NULL) {
if (hContact != NULL) {
- if (_stscanf(XmlGetText(n), _T("%d-%d-%d"), &nYear, &nMonth, &nDay) == 3) {
+ if (_stscanf(XmlGetText(n), L"%d-%d-%d", &nYear, &nMonth, &nDay) == 3) {
hasBday = true;
setWord(hContact, "BirthYear", (WORD)nYear);
setByte(hContact, "BirthMonth", (BYTE)nMonth);
@@ -804,7 +804,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("GENDER"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"GENDER")) {
// Gender
if (!hasGender && XmlGetText(n) != NULL) {
if (hContact != NULL) {
@@ -819,7 +819,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("ADR"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"ADR")) {
if (!hasHome && XmlGetChild(n, "HOME") != NULL) {
// Home address
TCHAR text[128];
@@ -828,9 +828,9 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) hasHomeStreet = true;
if (hContact != NULL) {
if ((o = XmlGetChild(n, "EXTADR")) != NULL && XmlGetText(o) != NULL)
- mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o));
+ mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o));
else if ((o = XmlGetChild(n, "EXTADD")) != NULL && XmlGetText(o) != NULL)
- mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o));
+ mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o));
else
_tcsncpy_s(text, XmlGetText(m), _TRUNCATE);
text[_countof(text) - 1] = '\0';
@@ -875,9 +875,9 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) hasWorkStreet = true;
if (hContact != NULL) {
if ((o = XmlGetChild(n, "EXTADR")) != NULL && XmlGetText(o) != NULL)
- mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o));
+ mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o));
else if ((o = XmlGetChild(n, "EXTADD")) != NULL && XmlGetText(o) != NULL)
- mir_sntprintf(text, _T("%s\r\n%s"), XmlGetText(m), XmlGetText(o));
+ mir_sntprintf(text, L"%s\r\n%s", XmlGetText(m), XmlGetText(o));
else
_tcsncpy_s(text, XmlGetText(m), _TRUNCATE);
text[_countof(text) - 1] = '\0';
@@ -914,7 +914,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("TEL"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"TEL")) {
// Telephone/Fax/Cellular
if ((m = XmlGetChild(n, "NUMBER")) != NULL && XmlGetText(m) != NULL) {
if (hContact != NULL) {
@@ -966,14 +966,14 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("URL"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"URL")) {
// Homepage
if (!hasUrl && XmlGetText(n) != NULL) {
hasUrl = true;
setTString(hContact, "Homepage", XmlGetText(n));
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("ORG"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"ORG")) {
if (!hasOrgname && !hasOrgunit) {
if ((m = XmlGetChild(n, "ORGNAME")) != NULL && XmlGetText(m) != NULL) {
hasOrgname = true;
@@ -985,27 +985,27 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("ROLE"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"ROLE")) {
if (!hasRole && XmlGetText(n) != NULL) {
hasRole = true;
setTString(hContact, "Role", XmlGetText(n));
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("TITLE"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"TITLE")) {
if (!hasTitle && XmlGetText(n) != NULL) {
hasTitle = true;
setTString(hContact, "CompanyPosition", XmlGetText(n));
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("DESC"))) {
+ else if (!mir_tstrcmp(XmlGetName(n), L"DESC")) {
if (!hasDesc && XmlGetText(n) != NULL) {
hasDesc = true;
CMString tszMemo(XmlGetText(n));
- tszMemo.Replace(_T("\n"), _T("\r\n"));
+ tszMemo.Replace(L"\n", L"\r\n");
setTString(hContact, "About", tszMemo);
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("PHOTO")))
+ else if (!mir_tstrcmp(XmlGetName(n), L"PHOTO"))
OnIqResultGetVcardPhoto(n, hContact, hasPhoto);
}
}
@@ -1145,7 +1145,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) void CJabberProto::OnIqResultSetVcard(HXML iqNode, CJabberIqInfo*)
{
debugLogA("<iq/> iqIdSetVcard");
- if (XmlGetAttrValue(iqNode, _T("type")))
+ if (XmlGetAttrValue(iqNode, L"type"))
WindowList_Broadcast(m_hWindowList, WM_JABBER_REFRESH_VCARD, 0, 0);
}
@@ -1156,10 +1156,10 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) int id;
debugLogA("<iq/> iqIdGetSearch");
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
if ((id = JabberGetPacketID(iqNode)) == -1) return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
if ((queryNode = XmlGetChild(iqNode, "query")) == NULL)
return;
@@ -1170,26 +1170,26 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) if (!itemNode)
break;
- if (!mir_tstrcmp(XmlGetName(itemNode), _T("item"))) {
- if ((jid = XmlGetAttrValue(itemNode, _T("jid"))) != NULL) {
+ if (!mir_tstrcmp(XmlGetName(itemNode), L"item")) {
+ if ((jid = XmlGetAttrValue(itemNode, L"jid")) != NULL) {
psr.id.t = (TCHAR*)jid;
- debugLog(_T("Result jid = %s"), jid);
+ debugLog(L"Result jid = %s", jid);
if ((n = XmlGetChild(itemNode, "nick")) != NULL && XmlGetText(n) != NULL)
psr.nick.t = (TCHAR*)XmlGetText(n);
else
- psr.nick.t = _T("");
+ psr.nick.t = L"";
if ((n = XmlGetChild(itemNode, "first")) != NULL && XmlGetText(n) != NULL)
psr.firstName.t = (TCHAR*)XmlGetText(n);
else
- psr.firstName.t = _T("");
+ psr.firstName.t = L"";
if ((n = XmlGetChild(itemNode, "last")) != NULL && XmlGetText(n) != NULL)
psr.lastName.t = (TCHAR*)XmlGetText(n);
else
- psr.lastName.t = _T("");
+ psr.lastName.t = L"";
if ((n = XmlGetChild(itemNode, "email")) != NULL && XmlGetText(n) != NULL)
psr.email.t = (TCHAR*)XmlGetText(n);
else
- psr.email.t = _T("");
+ psr.email.t = L"";
psr.flags = PSR_TCHAR;
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr);
}
@@ -1198,7 +1198,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!mir_tstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, L"error"))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
@@ -1207,7 +1207,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) HXML queryNode;
debugLogA("<iq/> iqIdGetExtSearch");
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
@@ -1215,14 +1215,14 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (id == -1)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
if ((queryNode = XmlGetChild(iqNode, "query")) == NULL) return;
if ((queryNode = XmlGetChild(queryNode, "x")) == NULL) return;
for (int i = 0;; i++) {
HXML itemNode = XmlGetChild(queryNode, i);
if (!itemNode)
break;
- if (mir_tstrcmp(XmlGetName(itemNode), _T("item")))
+ if (mir_tstrcmp(XmlGetName(itemNode), L"item"))
continue;
PROTOSEARCHRESULT psr = { 0 };
@@ -1234,10 +1234,10 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (!fieldNode)
break;
- if (mir_tstrcmp(XmlGetName(fieldNode), _T("field")))
+ if (mir_tstrcmp(XmlGetName(fieldNode), L"field"))
continue;
- const TCHAR *fieldName = XmlGetAttrValue(fieldNode, _T("var"));
+ const TCHAR *fieldName = XmlGetAttrValue(fieldNode, L"var");
if (fieldName == NULL)
continue;
@@ -1245,20 +1245,20 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (n == NULL)
continue;
- if (!mir_tstrcmp(fieldName, _T("jid"))) {
+ if (!mir_tstrcmp(fieldName, L"jid")) {
psr.id.t = (TCHAR*)XmlGetText(n);
- debugLog(_T("Result jid = %s"), psr.id.t);
+ debugLog(L"Result jid = %s", psr.id.t);
}
- else if (!mir_tstrcmp(fieldName, _T("nickname")))
- psr.nick.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T("");
- else if (!mir_tstrcmp(fieldName, _T("fn")))
- psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T("");
- else if (!mir_tstrcmp(fieldName, _T("given")))
- psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T("");
- else if (!mir_tstrcmp(fieldName, _T("family")))
- psr.lastName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T("");
- else if (!mir_tstrcmp(fieldName, _T("email")))
- psr.email.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : _T("");
+ else if (!mir_tstrcmp(fieldName, L"nickname"))
+ psr.nick.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L"";
+ else if (!mir_tstrcmp(fieldName, L"fn"))
+ psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L"";
+ else if (!mir_tstrcmp(fieldName, L"given"))
+ psr.firstName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L"";
+ else if (!mir_tstrcmp(fieldName, L"family"))
+ psr.lastName.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L"";
+ else if (!mir_tstrcmp(fieldName, L"email"))
+ psr.email.t = (XmlGetText(n) != NULL) ? (TCHAR*)XmlGetText(n) : L"";
}
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&psr);
@@ -1266,7 +1266,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!mir_tstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, L"error"))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
@@ -1274,15 +1274,15 @@ void CJabberProto::OnIqResultSetPassword(HXML iqNode, CJabberIqInfo*) {
debugLogA("<iq/> iqIdSetPassword");
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
_tcsncpy_s(m_ThreadInfo->conn.password, m_ThreadInfo->tszNewPassword, _TRUNCATE);
MessageBox(NULL, TranslateT("Password is successfully changed. Don't forget to update your password in the Jabber protocol option."), TranslateT("Change Password"), MB_OK | MB_ICONINFORMATION | MB_SETFOREGROUND);
}
- else if (!mir_tstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, L"error"))
MessageBox(NULL, TranslateT("Password cannot be changed."), TranslateT("Change Password"), MB_OK | MB_ICONSTOP | MB_SETFOREGROUND);
}
@@ -1290,7 +1290,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) {
debugLogA("<iq/> OnIqResultGetVCardAvatar");
- const TCHAR *from = XmlGetAttrValue(iqNode, _T("from"));
+ const TCHAR *from = XmlGetAttrValue(iqNode, L"from");
if (from == NULL)
return;
@@ -1299,8 +1299,8 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) return;
const TCHAR *type;
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if (mir_tstrcmp(type, _T("result"))) return;
+ if ((type = XmlGetAttrValue(iqNode, L"type")) == NULL) return;
+ if (mir_tstrcmp(type, L"result")) return;
HXML vCard = XmlGetChild(iqNode, "vCard");
if (vCard == NULL) return;
@@ -1331,7 +1331,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdResultGetClientAvatar");
- const TCHAR *from = XmlGetAttrValue(iqNode, _T("from"));
+ const TCHAR *from = XmlGetAttrValue(iqNode, L"from");
if (from == NULL)
return;
MCONTACT hContact = HContactFromJID(from);
@@ -1339,17 +1339,17 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) return;
HXML n = NULL;
- if ((type = XmlGetAttrValue(iqNode, _T("type"))) != NULL && !mir_tstrcmp(type, _T("result"))) {
+ if ((type = XmlGetAttrValue(iqNode, L"type")) != NULL && !mir_tstrcmp(type, L"result")) {
HXML queryNode = XmlGetChild(iqNode, "query");
if (queryNode != NULL) {
- const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns");
if (!mir_tstrcmp(xmlns, JABBER_FEAT_AVATAR))
n = XmlGetChild(queryNode, "data");
}
}
if (n != NULL) {
- OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, _T("mimetype")));
+ OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, L"mimetype"));
return;
}
@@ -1369,7 +1369,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) {
debugLogA("<iq/> iqIdResultGetServerAvatar");
- const TCHAR *from = XmlGetAttrValue(iqNode, _T("from"));
+ const TCHAR *from = XmlGetAttrValue(iqNode, L"from");
if (from == NULL)
return;
@@ -1378,18 +1378,18 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) return;
HXML n = NULL;
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
- if (!mir_tstrcmp(type, _T("result"))) {
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
+ if (!mir_tstrcmp(type, L"result")) {
HXML queryNode = XmlGetChild(iqNode, "query");
if (queryNode != NULL) {
- const TCHAR *xmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
+ const TCHAR *xmlns = XmlGetAttrValue(queryNode, L"xmlns");
if (!mir_tstrcmp(xmlns, JABBER_FEAT_SERVER_AVATAR))
n = XmlGetChild(queryNode, "data");
}
}
if (n != NULL) {
- OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, _T("mimetype")));
+ OnIqResultGotAvatar(hContact, n, XmlGetAttrValue(n, L"mimetype"));
return;
}
@@ -1401,7 +1401,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo*) // Try VCard photo
m_ThreadInfo->send(
- XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP));
+ XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP));
}
@@ -1414,13 +1414,13 @@ void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *m int pictureType;
if (mimeType != NULL) {
- if (!mir_tstrcmp(mimeType, _T("image/jpeg"))) pictureType = PA_FORMAT_JPEG;
- else if (!mir_tstrcmp(mimeType, _T("image/png"))) pictureType = PA_FORMAT_PNG;
- else if (!mir_tstrcmp(mimeType, _T("image/gif"))) pictureType = PA_FORMAT_GIF;
- else if (!mir_tstrcmp(mimeType, _T("image/bmp"))) pictureType = PA_FORMAT_BMP;
+ if (!mir_tstrcmp(mimeType, L"image/jpeg")) pictureType = PA_FORMAT_JPEG;
+ else if (!mir_tstrcmp(mimeType, L"image/png")) pictureType = PA_FORMAT_PNG;
+ else if (!mir_tstrcmp(mimeType, L"image/gif")) pictureType = PA_FORMAT_GIF;
+ else if (!mir_tstrcmp(mimeType, L"image/bmp")) pictureType = PA_FORMAT_BMP;
else {
LBL_ErrFormat:
- debugLog(_T("Invalid mime type specified for picture: %s"), mimeType);
+ debugLog(L"Invalid mime type specified for picture: %s", mimeType);
return;
}
}
@@ -1448,7 +1448,7 @@ LBL_ErrFormat: GetAvatarFileName(hContact, tszFileName, _countof(tszFileName));
_tcsncpy_s(ai.filename, tszFileName, _TRUNCATE);
- FILE *out = _tfopen(tszFileName, _T("wb"));
+ FILE *out = _tfopen(tszFileName, L"wb");
if (out != NULL) {
fwrite(body, resultLen, 1, out);
fclose(out);
@@ -1456,7 +1456,7 @@ LBL_ErrFormat: char buffer[41];
setString(hContact, "AvatarSaved", bin2hex(digest, sizeof(digest), buffer));
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&ai), NULL);
- debugLog(_T("Broadcast new avatar: %s"), ai.filename);
+ debugLog(L"Broadcast new avatar: %s", ai.filename);
}
else ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&ai), NULL);
}
@@ -1469,12 +1469,12 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) // RECVED: list of bookmarks
// ACTION: refresh bookmarks dialog
debugLogA("<iq/> iqIdGetBookmarks");
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
const TCHAR *jid;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
if (m_ThreadInfo && !(m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)) {
m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PRIVATE_STORAGE;
EnableMenuItems(true);
@@ -1486,23 +1486,23 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) HXML itemNode;
for (int i = 0; itemNode = XmlGetChild(storageNode, i); i++) {
if (LPCTSTR name = XmlGetName(itemNode)) {
- if (!mir_tstrcmp(name, _T("conference")) && (jid = XmlGetAttrValue(itemNode, _T("jid")))) {
+ if (!mir_tstrcmp(name, L"conference") && (jid = XmlGetAttrValue(itemNode, L"jid"))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
- item->name = mir_tstrdup(XmlGetAttrValue(itemNode, _T("name")));
- item->type = mir_tstrdup(_T("conference"));
+ item->name = mir_tstrdup(XmlGetAttrValue(itemNode, L"name"));
+ item->type = mir_tstrdup(L"conference");
item->bUseResource = true;
item->nick = mir_tstrdup(XPathT(itemNode, "nick"));
item->password = mir_tstrdup(XPathT(itemNode, "password"));
- const TCHAR *autoJ = XmlGetAttrValue(itemNode, _T("autojoin"));
+ const TCHAR *autoJ = XmlGetAttrValue(itemNode, L"autojoin");
if (autoJ != NULL)
- item->bAutoJoin = !mir_tstrcmp(autoJ, _T("true")) || !mir_tstrcmp(autoJ, _T("1"));
+ item->bAutoJoin = !mir_tstrcmp(autoJ, L"true") || !mir_tstrcmp(autoJ, L"1");
}
- else if (!mir_tstrcmp(name, _T("url")) && (jid = XmlGetAttrValue(itemNode, _T("url")))) {
+ else if (!mir_tstrcmp(name, L"url") && (jid = XmlGetAttrValue(itemNode, L"url"))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
item->bUseResource = true;
- item->name = mir_tstrdup(XmlGetAttrValue(itemNode, _T("name")));
- item->type = mir_tstrdup(_T("url"));
+ item->name = mir_tstrdup(XmlGetAttrValue(itemNode, L"name"));
+ item->type = mir_tstrdup(L"url");
}
}
}
@@ -1512,7 +1512,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) OnProcessLoginRq(m_ThreadInfo, JABBER_LOGIN_BOOKMARKS);
}
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
if (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE) {
m_ThreadInfo->jabberServerCaps &= ~JABBER_CAPS_PRIVATE_STORAGE;
EnableMenuItems(true);
@@ -1524,7 +1524,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*) void CJabberProto::SetBookmarkRequest(XmlNodeIq& iq)
{
HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE);
- HXML storage = query << XCHILDNS(_T("storage"), _T("storage:bookmarks"));
+ HXML storage = query << XCHILDNS(L"storage", L"storage:bookmarks");
LISTFOREACH(i, this, LIST_BOOKMARK)
{
@@ -1532,22 +1532,22 @@ void CJabberProto::SetBookmarkRequest(XmlNodeIq& iq) if (item == NULL || item->jid == NULL)
continue;
- if (!mir_tstrcmp(item->type, _T("conference"))) {
- HXML itemNode = storage << XCHILD(_T("conference")) << XATTR(_T("jid"), item->jid);
+ if (!mir_tstrcmp(item->type, L"conference")) {
+ HXML itemNode = storage << XCHILD(L"conference") << XATTR(L"jid", item->jid);
if (item->name)
- itemNode << XATTR(_T("name"), item->name);
+ itemNode << XATTR(L"name", item->name);
if (item->bAutoJoin)
- itemNode << XATTRI(_T("autojoin"), 1);
+ itemNode << XATTRI(L"autojoin", 1);
if (item->nick)
- itemNode << XCHILD(_T("nick"), item->nick);
+ itemNode << XCHILD(L"nick", item->nick);
if (item->password)
- itemNode << XCHILD(_T("password"), item->password);
+ itemNode << XCHILD(L"password", item->password);
}
- if (!mir_tstrcmp(item->type, _T("url"))) {
- HXML itemNode = storage << XCHILD(_T("url")) << XATTR(_T("url"), item->jid);
+ if (!mir_tstrcmp(item->type, L"url")) {
+ HXML itemNode = storage << XCHILD(L"url") << XATTR(L"url", item->jid);
if (item->name)
- itemNode << XATTR(_T("name"), item->name);
+ itemNode << XATTR(L"name", item->name);
}
}
}
@@ -1559,14 +1559,14 @@ void CJabberProto::OnIqResultSetBookmarks(HXML iqNode, CJabberIqInfo*) debugLogA("<iq/> iqIdSetBookmarks");
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_REFRESH);
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
HXML errorNode = XmlGetChild(iqNode, "error");
TCHAR *str = JabberErrorMsg(errorNode);
MessageBox(NULL, str, TranslateT("Jabber Bookmarks Error"), MB_OK | MB_SETFOREGROUND);
@@ -1608,7 +1608,7 @@ void CJabberProto::OnIqResultEntityTime(HXML pIqNode, CJabberIqInfo *pInfo) return;
if (pInfo->m_nIqType == JABBER_IQ_TYPE_RESULT) {
- LPCTSTR szTzo = XPathFmt(pIqNode, _T("time[@xmlns='%s']/tzo"), JABBER_FEAT_ENTITY_TIME);
+ LPCTSTR szTzo = XPathFmt(pIqNode, L"time[@xmlns='%s']/tzo", JABBER_FEAT_ENTITY_TIME);
if (szTzo && szTzo[0]) {
LPCTSTR szMin = _tcschr(szTzo, ':');
int nTz = _ttoi(szTzo) * -2;
@@ -1620,7 +1620,7 @@ void CJabberProto::OnIqResultEntityTime(HXML pIqNode, CJabberIqInfo *pInfo) setByte(pInfo->m_hContact, "Timezone", (signed char)nTz);
- LPCTSTR szTz = XPathFmt(pIqNode, _T("time[@xmlns='%s']/tz"), JABBER_FEAT_ENTITY_TIME);
+ LPCTSTR szTz = XPathFmt(pIqNode, L"time[@xmlns='%s']/tz", JABBER_FEAT_ENTITY_TIME);
if (szTz)
setTString(pInfo->m_hContact, "TzName", szTz);
else
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 58418c0219..576080d884 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CJabberProto::SetMucConfig(HXML node, void *from)
{
if (m_ThreadInfo && from) {
- XmlNodeIq iq(_T("set"), SerialNext(), (TCHAR*)from);
+ XmlNodeIq iq(L"set", SerialNext(), (TCHAR*)from);
HXML query = iq << XQUERY(JABBER_FEAT_MUC_OWNER);
XmlAddChild(query, node);
m_ThreadInfo->send(iq);
@@ -42,24 +42,24 @@ void CJabberProto::SetMucConfig(HXML node, void *from) void CJabberProto::OnIqResultGetMuc(HXML iqNode, CJabberIqInfo*)
{
debugLogA("<iq/> iqIdGetMuc");
- LPCTSTR type = XmlGetAttrValue(iqNode, _T("type"));
+ LPCTSTR type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
- LPCTSTR from = XmlGetAttrValue(iqNode, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(iqNode, L"from");
if (from == NULL)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
- HXML queryNode = XmlGetChild(iqNode, _T("query"));
+ if (!mir_tstrcmp(type, L"result")) {
+ HXML queryNode = XmlGetChild(iqNode, L"query");
if (queryNode != NULL) {
- LPCTSTR str = XmlGetAttrValue(queryNode, _T("xmlns"));
+ LPCTSTR str = XmlGetAttrValue(queryNode, L"xmlns");
if (!mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER)) {
- HXML xNode = XmlGetChild(queryNode, _T("x"));
+ HXML xNode = XmlGetChild(queryNode, L"x");
if (xNode != NULL) {
- str = XmlGetAttrValue(xNode, _T("xmlns"));
+ str = XmlGetAttrValue(xNode, L"xmlns");
if (!mir_tstrcmp(str, JABBER_FEAT_DATA_FORMS))
//LaunchForm(xNode);
- FormCreateDialog(xNode, _T("Jabber Conference Room Configuration"), &CJabberProto::SetMucConfig, mir_tstrdup(from));
+ FormCreateDialog(xNode, L"Jabber Conference Room Configuration", &CJabberProto::SetMucConfig, mir_tstrdup(from));
}
}
}
@@ -98,9 +98,9 @@ static void sttFillJidList(HWND hwndDlg) TCHAR tszItemText[JABBER_MAX_JID_LEN + 256];
HXML iqNode = jidListInfo->iqNode;
if (iqNode != NULL) {
- LPCTSTR from = XmlGetAttrValue(iqNode, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(iqNode, L"from");
if (from != NULL) {
- HXML queryNode = XmlGetChild(iqNode, _T("query"));
+ HXML queryNode = XmlGetChild(iqNode, L"query");
if (queryNode != NULL) {
lvi.mask = LVIF_TEXT | LVIF_PARAM;
lvi.iSubItem = 0;
@@ -110,20 +110,20 @@ static void sttFillJidList(HWND hwndDlg) if (!itemNode)
break;
- LPCTSTR jid = XmlGetAttrValue(itemNode, _T("jid"));
+ LPCTSTR jid = XmlGetAttrValue(itemNode, L"jid");
if (jid != NULL) {
lvi.pszText = (TCHAR*)jid;
if (jidListInfo->type == MUC_BANLIST) {
- LPCTSTR reason = XmlGetText(XmlGetChild(itemNode, _T("reason")));
+ LPCTSTR reason = XmlGetText(XmlGetChild(itemNode, L"reason"));
if (reason != NULL) {
- mir_sntprintf(tszItemText, _T("%s (%s)"), jid, reason);
+ mir_sntprintf(tszItemText, L"%s (%s)", jid, reason);
lvi.pszText = tszItemText;
}
}
else if (jidListInfo->type == MUC_VOICELIST || jidListInfo->type == MUC_MODERATORLIST) {
- LPCTSTR nick = XmlGetAttrValue(itemNode, _T("nick"));
+ LPCTSTR nick = XmlGetAttrValue(itemNode, L"nick");
if (nick != NULL) {
- mir_sntprintf(tszItemText, _T("%s (%s)"), nick, jid);
+ mir_sntprintf(tszItemText, L"%s (%s)", nick, jid);
lvi.pszText = tszItemText;
}
}
@@ -239,10 +239,10 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w if ((dat = (JABBER_MUC_JIDLIST_INFO *)lParam) != NULL) {
HXML iqNode = dat->iqNode;
if (iqNode != NULL) {
- LPCTSTR from = XmlGetAttrValue(iqNode, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(iqNode, L"from");
if (from != NULL) {
dat->roomJid = mir_tstrdup(from);
- HXML queryNode = XmlGetChild(iqNode, _T("query"));
+ HXML queryNode = XmlGetChild(iqNode, L"query");
if (queryNode != NULL) {
TCHAR *localFrom = mir_tstrdup(from);
mir_sntprintf(title, TranslateT("%s, %d items (%s)"),
@@ -437,11 +437,11 @@ static void CALLBACK JabberMucJidListCreateDialogApcProc(void* param) if (iqNode == NULL)
return;
- LPCTSTR from = XmlGetAttrValue(iqNode, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(iqNode, L"from");
if (from == NULL)
return;
- HXML queryNode = XmlGetChild(iqNode, _T("query"));
+ HXML queryNode = XmlGetChild(iqNode, L"query");
if (queryNode == NULL)
return;
@@ -480,11 +480,11 @@ static void CALLBACK JabberMucJidListCreateDialogApcProc(void* param) void CJabberProto::OnIqResultMucGetJidList(HXML iqNode, JABBER_MUC_JIDLIST_TYPE listType)
{
- LPCTSTR type = XmlGetAttrValue(iqNode, _T("type"));
+ LPCTSTR type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
JABBER_MUC_JIDLIST_INFO *jidListInfo = new JABBER_MUC_JIDLIST_INFO;
if (jidListInfo != NULL) {
jidListInfo->type = listType;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 4a20f0dc88..c82c57eedd 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -461,7 +461,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) FormatMirVer(r, szTmp);
hIcon = Finger_GetClientIcon(szTmp, 0);
}
- szTmp.Format(_T("%s [%s, %d]"), r->m_tszResourceName, pcli->pfnGetStatusModeDescription(r->m_iStatus, 0), r->m_iPriority);
+ szTmp.Format(L"%s [%s, %d]", r->m_tszResourceName, pcli->pfnGetStatusModeDescription(r->m_iStatus, 0), r->m_iPriority);
Menu_ModifyItem(m_phMenuResourceItems[i], szTmp, hIcon);
DestroyIcon(hIcon);
}
@@ -520,7 +520,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("subscribe")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"subscribe"));
}
return 0;
}
@@ -530,7 +530,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("subscribed")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"subscribed"));
}
return 0;
}
@@ -540,7 +540,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM hContact, LPARAM) if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("unsubscribed")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid) << XATTR(L"type", L"unsubscribed"));
}
return 0;
}
@@ -552,9 +552,9 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM hContact, LPARAM) JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT(getTStringA(hContact, "jid")));
if (item != NULL) {
- XmlNode p(_T("presence")); XmlAddAttr(p, _T("to"), item->jid);
+ XmlNode p(L"presence"); XmlAddAttr(p, L"to", item->jid);
if (item->getTemp()->m_iStatus == ID_STATUS_ONLINE)
- XmlAddAttr(p, _T("type"), _T("unavailable"));
+ XmlAddAttr(p, L"type", L"unavailable");
m_ThreadInfo->send(p);
}
return 0;
@@ -584,7 +584,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM) JABBER_LIST_ITEM *item = new JABBER_LIST_ITEM();
item->jid = mir_tstrdup(roomID);
item->name = pcli->pfnGetContactDisplayName(hContact, 0);
- item->type = _T("conference");
+ item->type = L"conference";
item->nick = getTStringA(hContact, "MyNick");
AddEditBookmark(item);
delete item;
@@ -973,8 +973,8 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) if (GetResourceCapabilites(jid, TRUE) & JABBER_CAPS_CHATSTATES)
m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("chat")) << XATTRID(SerialNext())
- << XCHILDNS(_T("gone"), JABBER_FEAT_CHATSTATES));
+ XmlNode(L"message") << XATTR(L"to", jid) << XATTR(L"type", L"chat") << XATTRID(SerialNext())
+ << XCHILDNS(L"gone", JABBER_FEAT_CHATSTATES));
}
}
}
@@ -1083,7 +1083,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM hContact, LPARAM if (item == NULL)
return 0;
- mir_sntprintf(text, _T("%s/%s"), item->jid, item->nick);
+ mir_sntprintf(text, L"%s/%s", item->jid, item->nick);
jid = text;
}
else jid = tszJid;
diff --git a/protocols/JabberG/src/jabber_message_handlers.cpp b/protocols/JabberG/src/jabber_message_handlers.cpp index 820fa3a3e7..dc7e7f6026 100644 --- a/protocols/JabberG/src/jabber_message_handlers.cpp +++ b/protocols/JabberG/src/jabber_message_handlers.cpp @@ -44,9 +44,9 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI TCHAR buf[512];
HXML bodyNode = XmlGetChild(node, "body");
if (bodyNode)
- mir_sntprintf(buf, _T("%s:\n%s\n%s"), pInfo->GetFrom(), XmlGetText(bodyNode), szErrText);
+ mir_sntprintf(buf, L"%s:\n%s\n%s", pInfo->GetFrom(), XmlGetText(bodyNode), szErrText);
else
- mir_sntprintf(buf, _T("%s:\n%s"), pInfo->GetFrom(), szErrText);
+ mir_sntprintf(buf, L"%s:\n%s", pInfo->GetFrom(), szErrText);
MsgPopup(NULL, buf, TranslateT("Jabber Error"));
}
@@ -58,8 +58,8 @@ BOOL CJabberProto::OnMessageError(HXML node, ThreadData*, CJabberMessageInfo* pI BOOL CJabberProto::OnMessageIbb(HXML, ThreadData*, CJabberMessageInfo* pInfo)
{
BOOL bOk = FALSE;
- const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), _T("sid"));
- const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), _T("seq"));
+ const TCHAR *sid = XmlGetAttrValue(pInfo->GetChildNode(), L"sid");
+ const TCHAR *seq = XmlGetAttrValue(pInfo->GetChildNode(), L"seq");
if (sid && seq && XmlGetText(pInfo->GetChildNode()))
bOk = OnIbbRecvdData(XmlGetText(pInfo->GetChildNode()), sid, seq);
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index 6800cfb729..47a683a23e 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -43,9 +43,9 @@ CJabberMessageManager::~CJabberMessageManager() void CJabberMessageManager::FillPermanentHandlers()
{
- AddPermanentHandler(&CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, _T("error"));
- AddPermanentHandler(&CJabberProto::OnMessageIbb, 0, 0, JABBER_FEAT_IBB, FALSE, _T("data"));
- AddPermanentHandler(&CJabberProto::OnMessagePubsubEvent, 0, 0, JABBER_FEAT_PUBSUB_EVENT, FALSE, _T("event"));
+ AddPermanentHandler(&CJabberProto::OnMessageError, JABBER_MESSAGE_TYPE_ERROR, JABBER_MESSAGE_PARSE_FROM | JABBER_MESSAGE_PARSE_HCONTACT, NULL, FALSE, L"error");
+ AddPermanentHandler(&CJabberProto::OnMessageIbb, 0, 0, JABBER_FEAT_IBB, FALSE, L"data");
+ AddPermanentHandler(&CJabberProto::OnMessagePubsubEvent, 0, 0, JABBER_FEAT_PUBSUB_EVENT, FALSE, L"event");
AddPermanentHandler(&CJabberProto::OnMessageGroupchat, JABBER_MESSAGE_TYPE_GROUPCHAT, JABBER_MESSAGE_PARSE_FROM, NULL, FALSE, NULL);
}
@@ -57,17 +57,17 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea // have to get all data here, in the loop, because there's always possibility that previous handler modified it
CJabberMessageInfo messageInfo;
- LPCTSTR szType = XmlGetAttrValue(node, _T("type"));
+ LPCTSTR szType = XmlGetAttrValue(node, L"type");
if (szType) {
- if (!mir_tstrcmpi(szType, _T("normal")))
+ if (!mir_tstrcmpi(szType, L"normal"))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_NORMAL;
- else if (!mir_tstrcmpi(szType, _T("error")))
+ else if (!mir_tstrcmpi(szType, L"error"))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_ERROR;
- else if (!mir_tstrcmpi(szType, _T("chat")))
+ else if (!mir_tstrcmpi(szType, L"chat"))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_CHAT;
- else if (!mir_tstrcmpi(szType, _T("groupchat")))
+ else if (!mir_tstrcmpi(szType, L"groupchat"))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_GROUPCHAT;
- else if (!mir_tstrcmpi(szType, _T("headline")))
+ else if (!mir_tstrcmpi(szType, L"headline"))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_HEADLINE;
else
return false;
@@ -80,7 +80,7 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea HXML child = XmlGetChild(node, i);
LPCTSTR szTagName = XmlGetName(child);
- LPCTSTR szXmlns = XmlGetAttrValue(child, _T("xmlns"));
+ LPCTSTR szXmlns = XmlGetAttrValue(child, L"xmlns");
if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName))) {
// node suits handler criteria, call the handler
@@ -88,19 +88,19 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea messageInfo.m_szChildTagName = szTagName;
messageInfo.m_szChildTagXmlns = szXmlns;
messageInfo.m_pUserData = pInfo.m_pUserData;
- messageInfo.m_szFrom = XmlGetAttrValue(node, _T("from")); // is necessary for ppro->debugLogA() below, that's why we must parse it even if JABBER_MESSAGE_PARSE_FROM flag is not set
+ messageInfo.m_szFrom = XmlGetAttrValue(node, L"from"); // is necessary for ppro->debugLogA() below, that's why we must parse it even if JABBER_MESSAGE_PARSE_FROM flag is not set
if (pInfo.m_dwParamsToParse & JABBER_MESSAGE_PARSE_ID_STR)
- messageInfo.m_szId = XmlGetAttrValue(node, _T("id"));
+ messageInfo.m_szId = XmlGetAttrValue(node, L"id");
if (pInfo.m_dwParamsToParse & JABBER_IQ_PARSE_TO)
- messageInfo.m_szTo = XmlGetAttrValue(node, _T("to"));
+ messageInfo.m_szTo = XmlGetAttrValue(node, L"to");
if (pInfo.m_dwParamsToParse & JABBER_MESSAGE_PARSE_HCONTACT)
messageInfo.m_hContact = ppro->HContactFromJID(messageInfo.m_szFrom);
if (messageInfo.m_szFrom)
- ppro->debugLog(_T("Handling message from %s"), messageInfo.m_szFrom);
+ ppro->debugLog(L"Handling message from %s", messageInfo.m_szFrom);
if ((ppro->*(pInfo.m_pHandler))(node, pThreadData, &messageInfo))
return true;
}
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 0d9b4a7c01..de15d1102b 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -32,11 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CJabberProto::AddContactToRoster(const TCHAR *jid, const TCHAR *nick, const TCHAR *grpName)
{
- XmlNodeIq iq(_T("set"), SerialNext());
+ XmlNodeIq iq(L"set", SerialNext());
HXML query = iq << XQUERY(JABBER_FEAT_IQ_ROSTER)
- << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("name"), nick);
+ << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"name", nick);
if (grpName)
- query << XCHILD(_T("group"), grpName);
+ query << XCHILD(L"group", grpName);
m_ThreadInfo->send(iq);
}
@@ -114,7 +114,7 @@ MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, bool if (JABBER_LIST_ITEM *pItem = ListAdd(LIST_ROSTER, jid, hNewContact))
pItem->bUseResource = _tcschr(szJid, '/') != 0;
- debugLog(_T("Create Jabber contact jid=%s, nick=%s"), szJid, nick);
+ debugLog(L"Create Jabber contact jid=%s, nick=%s", szJid, nick);
DBCheckIsTransportedContact(szJid, hNewContact);
return hNewContact;
}
@@ -156,7 +156,7 @@ BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType) void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -176,15 +176,15 @@ void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t c db_free(&dbv);
}
else _i64toa((LONG_PTR)hContact, str, 10);
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), JabberSha1(str, buf), szFileType);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", JabberSha1(str, buf), szFileType);
}
else if (m_ThreadInfo != NULL) {
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%s@%S avatar%s"),
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%s@%S avatar%s",
m_ThreadInfo->conn.username, m_ThreadInfo->conn.server, szFileType);
}
else {
ptrA res1(getStringA("LoginName")), res2(getStringA("LoginServer"));
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S@%S avatar%s"),
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S@%S avatar%s",
(res1) ? (LPSTR)res1 : "noname", (res2) ? (LPSTR)res2 : m_szModuleName, szFileType);
}
}
@@ -286,12 +286,12 @@ struct }
static sttCapsNodeToName_Map[] =
{
- { _T("http://miranda-im.org"), _T("Miranda IM Jabber") },
- { _T("http://miranda-ng.org"), _T("Miranda NG Jabber") },
- { _T("http://www.google.com"), _T("GTalk") },
- { _T("http://mail.google.com"), _T("GMail") },
- { _T("http://talk.google.com/xmpp/bot"), _T("GTalk Bot") },
- { _T("http://www.android.com"), _T("Android") },
+ { L"http://miranda-im.org", L"Miranda IM Jabber" },
+ { L"http://miranda-ng.org", L"Miranda NG Jabber" },
+ { L"http://www.google.com", L"GTalk" },
+ { L"http://mail.google.com", L"GMail" },
+ { L"http://talk.google.com/xmpp/bot", L"GTalk Bot" },
+ { L"http://www.android.com", L"Android" },
};
void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item)
@@ -300,7 +300,7 @@ void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item) if (!hContact)
return;
- debugLog(_T("JabberUpdateMirVer: for jid %s"), item->jid);
+ debugLog(L"JabberUpdateMirVer: for jid %s", item->jid);
pResourceStatus p(NULL);
if (item->resourceMode == RSMODE_LASTSEEN)
@@ -320,55 +320,55 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) // jabber:iq:version info requested and exists?
if (resource->m_dwVersionRequestTime && resource->m_tszSoftware) {
- debugLog(_T("JabberUpdateMirVer: for iq:version rc %s: %s"), resource->m_tszResourceName, resource->m_tszSoftware);
+ debugLog(L"JabberUpdateMirVer: for iq:version rc %s: %s", resource->m_tszResourceName, resource->m_tszSoftware);
if (!resource->m_tszSoftwareVersion || _tcsstr(resource->m_tszSoftware, resource->m_tszSoftwareVersion))
res = resource->m_tszSoftware;
else
- res.Format(_T("%s %s"), resource->m_tszSoftware, resource->m_tszSoftwareVersion);
+ res.Format(L"%s %s", resource->m_tszSoftware, resource->m_tszSoftwareVersion);
}
// no version info and no caps info? set MirVer = resource name
else if (!resource->m_tszCapsNode || !resource->m_tszCapsVer) {
- debugLog(_T("JabberUpdateMirVer: for rc %s: %s"), resource->m_tszResourceName, resource->m_tszResourceName);
+ debugLog(L"JabberUpdateMirVer: for rc %s: %s", resource->m_tszResourceName, resource->m_tszResourceName);
if (resource->m_tszResourceName)
res = resource->m_tszResourceName;
}
// XEP-0115 caps mode
else {
- debugLog(_T("JabberUpdateMirVer: for rc %s: %s#%s"), resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer);
+ debugLog(L"JabberUpdateMirVer: for rc %s: %s#%s", resource->m_tszResourceName, resource->m_tszCapsNode, resource->m_tszCapsVer);
int i;
// search through known software list
for (i = 0; i < _countof(sttCapsNodeToName_Map); i++)
if (_tcsstr(resource->m_tszCapsNode, sttCapsNodeToName_Map[i].node)) {
- res.Format(_T("%s %s"), sttCapsNodeToName_Map[i].name, resource->m_tszCapsVer);
+ res.Format(L"%s %s", sttCapsNodeToName_Map[i].name, resource->m_tszCapsVer);
break;
}
// unknown software
if (i == _countof(sttCapsNodeToName_Map))
- res.Format(_T("%s %s"), resource->m_tszCapsNode, resource->m_tszCapsVer);
+ res.Format(L"%s %s", resource->m_tszCapsNode, resource->m_tszCapsVer);
}
// attach additional info for fingerprint plguin
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX86) && !_tcsstr(res, _T("x86")))
- res.Append(_T(" x86"));
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX86) && !_tcsstr(res, L"x86"))
+ res.Append(L" x86");
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX64) && !_tcsstr(res, _T("x64")))
- res.Append(_T(" x64"));
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_PLATFORMX64) && !_tcsstr(res, L"x64"))
+ res.Append(L" x64");
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_SECUREIM) && !_tcsstr(res, _T("(SecureIM)")))
- res.Append(_T(" (SecureIM)"));
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_SECUREIM) && !_tcsstr(res, L"(SecureIM)"))
+ res.Append(L" (SecureIM)");
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_MIROTR) && !_tcsstr(res, _T("(MirOTR)")))
- res.Append(_T(" (MirOTR)"));
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_MIROTR) && !_tcsstr(res, L"(MirOTR)"))
+ res.Append(L" (MirOTR)");
- if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_NEWGPG) && !_tcsstr(res, _T("(New_GPG)")))
- res.Append(_T(" (New_GPG)"));
+ if (resource->m_tszCapsExt && _tcsstr(resource->m_tszCapsExt, JABBER_EXT_NEWGPG) && !_tcsstr(res, L"(New_GPG)"))
+ res.Append(L" (New_GPG)");
if (resource->m_tszResourceName && !_tcsstr(res, resource->m_tszResourceName))
- if (_tcsstr(res, _T("Miranda IM")) || _tcsstr(res, _T("Miranda NG")) || m_options.ShowForeignResourceInMirVer)
- res.AppendFormat(_T(" [%s]"), resource->m_tszResourceName);
+ if (_tcsstr(res, L"Miranda IM") || _tcsstr(res, L"Miranda NG") || m_options.ShowForeignResourceInMirVer)
+ res.AppendFormat(L" [%s]", resource->m_tszResourceName);
}
@@ -385,7 +385,7 @@ void CJabberProto::UpdateMirVer(MCONTACT hContact, pResourceStatus &resource) TCHAR szFullJid[JABBER_MAX_JID_LEN];
if (resource->m_tszResourceName && !_tcschr(jid, '/'))
- mir_sntprintf(szFullJid, _T("%s/%s"), jid, resource->m_tszResourceName);
+ mir_sntprintf(szFullJid, L"%s/%s", jid, resource->m_tszResourceName);
else
mir_tstrncpy(szFullJid, jid, _countof(szFullJid));
setTString(hContact, DBSETTING_DISPLAY_UID, szFullJid);
@@ -438,7 +438,7 @@ void CJabberProto::SetContactOfflineStatus(MCONTACT hContact) void CJabberProto::InitPopups(void)
{
TCHAR desc[256];
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
char name[256];
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
@@ -485,7 +485,7 @@ CMString CJabberProto::ExtractImage(HXML node) if ((nHtml = XmlGetChild(node, "html")) != NULL &&
(nBody = XmlGetChild(nHtml, "body")) != NULL &&
(nImg = XmlGetChild(nBody, "img")) != NULL &&
- (src = XmlGetAttrValue(nImg, _T("src"))) != NULL) {
+ (src = XmlGetAttrValue(nImg, L"src")) != NULL) {
CMString strSrc(src);
if (strSrc.Left(11).Compare(L"data:image/") == 0) {
@@ -501,8 +501,8 @@ CMString CJabberProto::ExtractImage(HXML node) TCHAR tszTempPath[MAX_PATH], tszTempFile[MAX_PATH];
GetTempPath(_countof(tszTempPath), tszTempPath);
- GetTempFileName(tszTempPath, _T("jab"), InterlockedIncrement(&g_nTempFileId), tszTempFile);
- _tcsncat_s(tszTempFile, _T("."), 1);
+ GetTempFileName(tszTempPath, L"jab", InterlockedIncrement(&g_nTempFileId), tszTempFile);
+ _tcsncat_s(tszTempFile, L".", 1);
_tcsncat_s(tszTempFile, ext, ext.GetLength());
HANDLE h = CreateFile(tszTempFile, GENERIC_READ | GENERIC_WRITE,
@@ -516,7 +516,7 @@ CMString CJabberProto::ExtractImage(HXML node) WriteFile(h, buffer, bufferLen, &n, NULL);
CloseHandle(h);
- link = _T(" file:///");
+ link = L" file:///";
link += tszTempFile;
}
}
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 47cbbd8cfb..aa46e14e58 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -153,10 +153,10 @@ void CNoteList::SaveXml(HXML hXmlParent) CNoteList &me = *this;
for (int i = 0; i < getCount(); i++) {
- HXML hXmlItem = hXmlParent << XCHILD(_T("note"));
- hXmlItem << XATTR(_T("from"), me[i].GetFrom()) << XATTR(_T("tags"), me[i].GetTagsStr());
- hXmlItem << XCHILD(_T("title"), me[i].GetTitle());
- hXmlItem << XCHILD(_T("text"), me[i].GetText());
+ HXML hXmlItem = hXmlParent << XCHILD(L"note");
+ hXmlItem << XATTR(L"from", me[i].GetFrom()) << XATTR(L"tags", me[i].GetTagsStr());
+ hXmlItem << XCHILD(L"title", me[i].GetTitle());
+ hXmlItem << XCHILD(L"text", me[i].GetText());
}
}
@@ -601,9 +601,9 @@ private: void btnSave_OnClick(CCtrlButton *)
{
- XmlNodeIq iq(_T("set"));
+ XmlNodeIq iq(L"set");
HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE);
- HXML storage = query << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES);
+ HXML storage = query << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES);
m_proto->m_notes.SaveXml(storage);
m_proto->m_ThreadInfo->send(iq);
EnableControls();
@@ -710,9 +710,9 @@ void CJabberProto::ProcessIncomingNote(CNoteItem *pNote, bool ok) if (ok && pNote->IsNotEmpty()) {
m_notes.insert(pNote);
- XmlNodeIq iq(_T("set"));
+ XmlNodeIq iq(L"set");
HXML query = iq << XQUERY(JABBER_FEAT_PRIVATE_STORAGE);
- HXML storage = query << XCHILDNS(_T("storage"), JABBER_FEAT_MIRANDA_NOTES);
+ HXML storage = query << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES);
m_notes.SaveXml(storage);
m_ThreadInfo->send(iq);
}
@@ -727,7 +727,7 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) }
TCHAR buf[1024];
- mir_sntprintf(buf, _T("Incoming note: %s\n\n%s\nTags: %s"),
+ mir_sntprintf(buf, L"Incoming note: %s\n\n%s\nTags: %s",
pNote->GetTitle(), pNote->GetText(), pNote->GetTagsStr());
JabberCapsBits jcb = GetResourceCapabilites(pNote->GetFrom(), TRUE);
@@ -737,20 +737,20 @@ void CJabberProto::ProcessOutgoingNote(CNoteItem *pNote, bool ok) int nMsgId = SerialNext();
- XmlNode m(_T("message"));
- m << XATTR(_T("type"), _T("chat")) << XATTR(_T("to"), pNote->GetFrom()) << XATTRID(nMsgId);
- m << XCHILD(_T("body"), buf);
- HXML hXmlItem = m << XCHILDNS(_T("x"), JABBER_FEAT_MIRANDA_NOTES) << XCHILD(_T("note"));
- hXmlItem << XATTR(_T("tags"), pNote->GetTagsStr());
- hXmlItem << XCHILD(_T("title"), pNote->GetTitle());
- hXmlItem << XCHILD(_T("text"), pNote->GetText());
+ XmlNode m(L"message");
+ m << XATTR(L"type", L"chat") << XATTR(L"to", pNote->GetFrom()) << XATTRID(nMsgId);
+ m << XCHILD(L"body", buf);
+ HXML hXmlItem = m << XCHILDNS(L"x", JABBER_FEAT_MIRANDA_NOTES) << XCHILD(L"note");
+ hXmlItem << XATTR(L"tags", pNote->GetTagsStr());
+ hXmlItem << XCHILD(L"title", pNote->GetTitle());
+ hXmlItem << XCHILD(L"text", pNote->GetText());
// message receipts XEP priority
if (jcb & JABBER_CAPS_MESSAGE_RECEIPTS)
- m << XCHILDNS(_T("request"), JABBER_FEAT_MESSAGE_RECEIPTS);
+ m << XCHILDNS(L"request", JABBER_FEAT_MESSAGE_RECEIPTS);
else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) {
- HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS);
- x << XCHILD(_T("delivered")); x << XCHILD(_T("offline"));
+ HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS);
+ x << XCHILD(L"delivered"); x << XCHILD(L"offline");
}
else
nMsgId = -1;
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 40f2b4fb61..9c165d1ce8 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -33,194 +33,194 @@ static BOOL(WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0; /////////////////////////////////////////////////////////////////////////////////////////
// JabberRegisterDlgProc - the dialog proc for registering new account
-#define STR_FORMAT _T("%s %s@%S:%d?")
+#define STR_FORMAT L"%s %s@%S:%d?"
struct { TCHAR *szCode; TCHAR *szDescription; } g_LanguageCodes[] = {
- { _T("aa"), LPGENT("Afar") },
- { _T("ab"), LPGENT("Abkhazian") },
- { _T("af"), LPGENT("Afrikaans") },
- { _T("ak"), LPGENT("Akan") },
- { _T("sq"), LPGENT("Albanian") },
- { _T("am"), LPGENT("Amharic") },
- { _T("ar"), LPGENT("Arabic") },
- { _T("an"), LPGENT("Aragonese") },
- { _T("hy"), LPGENT("Armenian") },
- { _T("as"), LPGENT("Assamese") },
- { _T("av"), LPGENT("Avaric") },
- { _T("ae"), LPGENT("Avestan") },
- { _T("ay"), LPGENT("Aymara") },
- { _T("az"), LPGENT("Azerbaijani") },
- { _T("ba"), LPGENT("Bashkir") },
- { _T("bm"), LPGENT("Bambara") },
- { _T("eu"), LPGENT("Basque") },
- { _T("be"), LPGENT("Belarusian") },
- { _T("bn"), LPGENT("Bengali") },
- { _T("bh"), LPGENT("Bihari") },
- { _T("bi"), LPGENT("Bislama") },
- { _T("bs"), LPGENT("Bosnian") },
- { _T("br"), LPGENT("Breton") },
- { _T("bg"), LPGENT("Bulgarian") },
- { _T("my"), LPGENT("Burmese") },
- { _T("ca"), LPGENT("Catalan; Valencian") },
- { _T("ch"), LPGENT("Chamorro") },
- { _T("ce"), LPGENT("Chechen") },
- { _T("zh"), LPGENT("Chinese") },
- { _T("cu"), LPGENT("Church Slavic; Old Slavonic") },
- { _T("cv"), LPGENT("Chuvash") },
- { _T("kw"), LPGENT("Cornish") },
- { _T("co"), LPGENT("Corsican") },
- { _T("cr"), LPGENT("Cree") },
- { _T("cs"), LPGENT("Czech") },
- { _T("da"), LPGENT("Danish") },
- { _T("dv"), LPGENT("Divehi; Dhivehi; Maldivian") },
- { _T("nl"), LPGENT("Dutch; Flemish") },
- { _T("dz"), LPGENT("Dzongkha") },
- { _T("en"), LPGENT("English") },
- { _T("eo"), LPGENT("Esperanto") },
- { _T("et"), LPGENT("Estonian") },
- { _T("ee"), LPGENT("Ewe") },
- { _T("fo"), LPGENT("Faroese") },
- { _T("fj"), LPGENT("Fijian") },
- { _T("fi"), LPGENT("Finnish") },
- { _T("fr"), LPGENT("French") },
- { _T("fy"), LPGENT("Western Frisian") },
- { _T("ff"), LPGENT("Fulah") },
- { _T("ka"), LPGENT("Georgian") },
- { _T("de"), LPGENT("German") },
- { _T("gd"), LPGENT("Gaelic; Scottish Gaelic") },
- { _T("ga"), LPGENT("Irish") },
- { _T("gl"), LPGENT("Galician") },
- { _T("gv"), LPGENT("Manx") },
- { _T("el"), LPGENT("Greek, Modern (1453-)") },
- { _T("gn"), LPGENT("Guarani") },
- { _T("gu"), LPGENT("Gujarati") },
- { _T("ht"), LPGENT("Haitian; Haitian Creole") },
- { _T("ha"), LPGENT("Hausa") },
- { _T("he"), LPGENT("Hebrew") },
- { _T("hz"), LPGENT("Herero") },
- { _T("hi"), LPGENT("Hindi") },
- { _T("ho"), LPGENT("Hiri Motu") },
- { _T("hu"), LPGENT("Hungarian") },
- { _T("ig"), LPGENT("Igbo") },
- { _T("is"), LPGENT("Icelandic") },
- { _T("io"), LPGENT("Ido") },
- { _T("ii"), LPGENT("Sichuan Yi") },
- { _T("iu"), LPGENT("Inuktitut") },
- { _T("ie"), LPGENT("Interlingue") },
- { _T("ia"), LPGENT("Interlingua (International Auxiliary Language Association)") },
- { _T("id"), LPGENT("Indonesian") },
- { _T("ik"), LPGENT("Inupiaq") },
- { _T("it"), LPGENT("Italian") },
- { _T("jv"), LPGENT("Javanese") },
- { _T("ja"), LPGENT("Japanese") },
- { _T("kl"), LPGENT("Kalaallisut; Greenlandic") },
- { _T("kn"), LPGENT("Kannada") },
- { _T("ks"), LPGENT("Kashmiri") },
- { _T("kr"), LPGENT("Kanuri") },
- { _T("kk"), LPGENT("Kazakh") },
- { _T("km"), LPGENT("Central Khmer") },
- { _T("ki"), LPGENT("Kikuyu; Gikuyu") },
- { _T("rw"), LPGENT("Kinyarwanda") },
- { _T("ky"), LPGENT("Kirghiz; Kyrgyz") },
- { _T("kv"), LPGENT("Komi") },
- { _T("kg"), LPGENT("Kongo") },
- { _T("ko"), LPGENT("Korean") },
- { _T("kj"), LPGENT("Kuanyama; Kwanyama") },
- { _T("ku"), LPGENT("Kurdish") },
- { _T("lo"), LPGENT("Lao") },
- { _T("la"), LPGENT("Latin") },
- { _T("lv"), LPGENT("Latvian") },
- { _T("li"), LPGENT("Limburgan; Limburger; Limburgish") },
- { _T("ln"), LPGENT("Lingala") },
- { _T("lt"), LPGENT("Lithuanian") },
- { _T("lb"), LPGENT("Luxembourgish; Letzeburgesch") },
- { _T("lu"), LPGENT("Luba-Katanga") },
- { _T("lg"), LPGENT("Ganda") },
- { _T("mk"), LPGENT("Macedonian") },
- { _T("mh"), LPGENT("Marshallese") },
- { _T("ml"), LPGENT("Malayalam") },
- { _T("mi"), LPGENT("Maori") },
- { _T("mr"), LPGENT("Marathi") },
- { _T("ms"), LPGENT("Malay") },
- { _T("mg"), LPGENT("Malagasy") },
- { _T("mt"), LPGENT("Maltese") },
- { _T("mo"), LPGENT("Moldavian") },
- { _T("mn"), LPGENT("Mongolian") },
- { _T("na"), LPGENT("Nauru") },
- { _T("nv"), LPGENT("Navajo; Navaho") },
- { _T("nr"), LPGENT("Ndebele, South; South Ndebele") },
- { _T("nd"), LPGENT("Ndebele, North; North Ndebele") },
- { _T("ng"), LPGENT("Ndonga") },
- { _T("ne"), LPGENT("Nepali") },
- { _T("nn"), LPGENT("Norwegian Nynorsk; Nynorsk, Norwegian") },
- { _T("nb"), LPGENT("Bokmaal, Norwegian; Norwegian Bokmaal") },
- { _T("no"), LPGENT("Norwegian") },
- { _T("ny"), LPGENT("Chichewa; Chewa; Nyanja") },
- { _T("oc"), LPGENT("Occitan (post 1500); Provencal") },
- { _T("oj"), LPGENT("Ojibwa") },
- { _T("or"), LPGENT("Oriya") },
- { _T("om"), LPGENT("Oromo") },
- { _T("os"), LPGENT("Ossetian; Ossetic") },
- { _T("pa"), LPGENT("Panjabi; Punjabi") },
- { _T("fa"), LPGENT("Persian") },
- { _T("pi"), LPGENT("Pali") },
- { _T("pl"), LPGENT("Polish") },
- { _T("pt"), LPGENT("Portuguese") },
- { _T("ps"), LPGENT("Pushto") },
- { _T("qu"), LPGENT("Quechua") },
- { _T("rm"), LPGENT("Romansh") },
- { _T("ro"), LPGENT("Romanian") },
- { _T("rn"), LPGENT("Rundi") },
- { _T("ru"), LPGENT("Russian") },
- { _T("sg"), LPGENT("Sango") },
- { _T("sa"), LPGENT("Sanskrit") },
- { _T("sr"), LPGENT("Serbian") },
- { _T("hr"), LPGENT("Croatian") },
- { _T("si"), LPGENT("Sinhala; Sinhalese") },
- { _T("sk"), LPGENT("Slovak") },
- { _T("sl"), LPGENT("Slovenian") },
- { _T("se"), LPGENT("Northern Sami") },
- { _T("sm"), LPGENT("Samoan") },
- { _T("sn"), LPGENT("Shona") },
- { _T("sd"), LPGENT("Sindhi") },
- { _T("so"), LPGENT("Somali") },
- { _T("st"), LPGENT("Sotho, Southern") },
- { _T("es"), LPGENT("Spanish; Castilian") },
- { _T("sc"), LPGENT("Sardinian") },
- { _T("ss"), LPGENT("Swati") },
- { _T("su"), LPGENT("Sundanese") },
- { _T("sw"), LPGENT("Swahili") },
- { _T("sv"), LPGENT("Swedish") },
- { _T("ty"), LPGENT("Tahitian") },
- { _T("ta"), LPGENT("Tamil") },
- { _T("tt"), LPGENT("Tatar") },
- { _T("te"), LPGENT("Telugu") },
- { _T("tg"), LPGENT("Tajik") },
- { _T("tl"), LPGENT("Tagalog") },
- { _T("th"), LPGENT("Thai") },
- { _T("bo"), LPGENT("Tibetan") },
- { _T("ti"), LPGENT("Tigrinya") },
- { _T("to"), LPGENT("Tonga (Tonga Islands)") },
- { _T("tn"), LPGENT("Tswana") },
- { _T("ts"), LPGENT("Tsonga") },
- { _T("tk"), LPGENT("Turkmen") },
- { _T("tr"), LPGENT("Turkish") },
- { _T("tw"), LPGENT("Twi") },
- { _T("ug"), LPGENT("Uighur; Uyghur") },
- { _T("uk"), LPGENT("Ukrainian") },
- { _T("ur"), LPGENT("Urdu") },
- { _T("uz"), LPGENT("Uzbek") },
- { _T("ve"), LPGENT("Venda") },
- { _T("vi"), LPGENT("Vietnamese") },
- { _T("vo"), LPGENT("Volapuk") },
- { _T("cy"), LPGENT("Welsh") },
- { _T("wa"), LPGENT("Walloon") },
- { _T("wo"), LPGENT("Wolof") },
- { _T("xh"), LPGENT("Xhosa") },
- { _T("yi"), LPGENT("Yiddish") },
- { _T("yo"), LPGENT("Yoruba") },
- { _T("za"), LPGENT("Zhuang; Chuang") },
- { _T("zu"), LPGENT("Zulu") },
+ { L"aa", LPGENT("Afar") },
+ { L"ab", LPGENT("Abkhazian") },
+ { L"af", LPGENT("Afrikaans") },
+ { L"ak", LPGENT("Akan") },
+ { L"sq", LPGENT("Albanian") },
+ { L"am", LPGENT("Amharic") },
+ { L"ar", LPGENT("Arabic") },
+ { L"an", LPGENT("Aragonese") },
+ { L"hy", LPGENT("Armenian") },
+ { L"as", LPGENT("Assamese") },
+ { L"av", LPGENT("Avaric") },
+ { L"ae", LPGENT("Avestan") },
+ { L"ay", LPGENT("Aymara") },
+ { L"az", LPGENT("Azerbaijani") },
+ { L"ba", LPGENT("Bashkir") },
+ { L"bm", LPGENT("Bambara") },
+ { L"eu", LPGENT("Basque") },
+ { L"be", LPGENT("Belarusian") },
+ { L"bn", LPGENT("Bengali") },
+ { L"bh", LPGENT("Bihari") },
+ { L"bi", LPGENT("Bislama") },
+ { L"bs", LPGENT("Bosnian") },
+ { L"br", LPGENT("Breton") },
+ { L"bg", LPGENT("Bulgarian") },
+ { L"my", LPGENT("Burmese") },
+ { L"ca", LPGENT("Catalan; Valencian") },
+ { L"ch", LPGENT("Chamorro") },
+ { L"ce", LPGENT("Chechen") },
+ { L"zh", LPGENT("Chinese") },
+ { L"cu", LPGENT("Church Slavic; Old Slavonic") },
+ { L"cv", LPGENT("Chuvash") },
+ { L"kw", LPGENT("Cornish") },
+ { L"co", LPGENT("Corsican") },
+ { L"cr", LPGENT("Cree") },
+ { L"cs", LPGENT("Czech") },
+ { L"da", LPGENT("Danish") },
+ { L"dv", LPGENT("Divehi; Dhivehi; Maldivian") },
+ { L"nl", LPGENT("Dutch; Flemish") },
+ { L"dz", LPGENT("Dzongkha") },
+ { L"en", LPGENT("English") },
+ { L"eo", LPGENT("Esperanto") },
+ { L"et", LPGENT("Estonian") },
+ { L"ee", LPGENT("Ewe") },
+ { L"fo", LPGENT("Faroese") },
+ { L"fj", LPGENT("Fijian") },
+ { L"fi", LPGENT("Finnish") },
+ { L"fr", LPGENT("French") },
+ { L"fy", LPGENT("Western Frisian") },
+ { L"ff", LPGENT("Fulah") },
+ { L"ka", LPGENT("Georgian") },
+ { L"de", LPGENT("German") },
+ { L"gd", LPGENT("Gaelic; Scottish Gaelic") },
+ { L"ga", LPGENT("Irish") },
+ { L"gl", LPGENT("Galician") },
+ { L"gv", LPGENT("Manx") },
+ { L"el", LPGENT("Greek, Modern (1453-)") },
+ { L"gn", LPGENT("Guarani") },
+ { L"gu", LPGENT("Gujarati") },
+ { L"ht", LPGENT("Haitian; Haitian Creole") },
+ { L"ha", LPGENT("Hausa") },
+ { L"he", LPGENT("Hebrew") },
+ { L"hz", LPGENT("Herero") },
+ { L"hi", LPGENT("Hindi") },
+ { L"ho", LPGENT("Hiri Motu") },
+ { L"hu", LPGENT("Hungarian") },
+ { L"ig", LPGENT("Igbo") },
+ { L"is", LPGENT("Icelandic") },
+ { L"io", LPGENT("Ido") },
+ { L"ii", LPGENT("Sichuan Yi") },
+ { L"iu", LPGENT("Inuktitut") },
+ { L"ie", LPGENT("Interlingue") },
+ { L"ia", LPGENT("Interlingua (International Auxiliary Language Association)") },
+ { L"id", LPGENT("Indonesian") },
+ { L"ik", LPGENT("Inupiaq") },
+ { L"it", LPGENT("Italian") },
+ { L"jv", LPGENT("Javanese") },
+ { L"ja", LPGENT("Japanese") },
+ { L"kl", LPGENT("Kalaallisut; Greenlandic") },
+ { L"kn", LPGENT("Kannada") },
+ { L"ks", LPGENT("Kashmiri") },
+ { L"kr", LPGENT("Kanuri") },
+ { L"kk", LPGENT("Kazakh") },
+ { L"km", LPGENT("Central Khmer") },
+ { L"ki", LPGENT("Kikuyu; Gikuyu") },
+ { L"rw", LPGENT("Kinyarwanda") },
+ { L"ky", LPGENT("Kirghiz; Kyrgyz") },
+ { L"kv", LPGENT("Komi") },
+ { L"kg", LPGENT("Kongo") },
+ { L"ko", LPGENT("Korean") },
+ { L"kj", LPGENT("Kuanyama; Kwanyama") },
+ { L"ku", LPGENT("Kurdish") },
+ { L"lo", LPGENT("Lao") },
+ { L"la", LPGENT("Latin") },
+ { L"lv", LPGENT("Latvian") },
+ { L"li", LPGENT("Limburgan; Limburger; Limburgish") },
+ { L"ln", LPGENT("Lingala") },
+ { L"lt", LPGENT("Lithuanian") },
+ { L"lb", LPGENT("Luxembourgish; Letzeburgesch") },
+ { L"lu", LPGENT("Luba-Katanga") },
+ { L"lg", LPGENT("Ganda") },
+ { L"mk", LPGENT("Macedonian") },
+ { L"mh", LPGENT("Marshallese") },
+ { L"ml", LPGENT("Malayalam") },
+ { L"mi", LPGENT("Maori") },
+ { L"mr", LPGENT("Marathi") },
+ { L"ms", LPGENT("Malay") },
+ { L"mg", LPGENT("Malagasy") },
+ { L"mt", LPGENT("Maltese") },
+ { L"mo", LPGENT("Moldavian") },
+ { L"mn", LPGENT("Mongolian") },
+ { L"na", LPGENT("Nauru") },
+ { L"nv", LPGENT("Navajo; Navaho") },
+ { L"nr", LPGENT("Ndebele, South; South Ndebele") },
+ { L"nd", LPGENT("Ndebele, North; North Ndebele") },
+ { L"ng", LPGENT("Ndonga") },
+ { L"ne", LPGENT("Nepali") },
+ { L"nn", LPGENT("Norwegian Nynorsk; Nynorsk, Norwegian") },
+ { L"nb", LPGENT("Bokmaal, Norwegian; Norwegian Bokmaal") },
+ { L"no", LPGENT("Norwegian") },
+ { L"ny", LPGENT("Chichewa; Chewa; Nyanja") },
+ { L"oc", LPGENT("Occitan (post 1500); Provencal") },
+ { L"oj", LPGENT("Ojibwa") },
+ { L"or", LPGENT("Oriya") },
+ { L"om", LPGENT("Oromo") },
+ { L"os", LPGENT("Ossetian; Ossetic") },
+ { L"pa", LPGENT("Panjabi; Punjabi") },
+ { L"fa", LPGENT("Persian") },
+ { L"pi", LPGENT("Pali") },
+ { L"pl", LPGENT("Polish") },
+ { L"pt", LPGENT("Portuguese") },
+ { L"ps", LPGENT("Pushto") },
+ { L"qu", LPGENT("Quechua") },
+ { L"rm", LPGENT("Romansh") },
+ { L"ro", LPGENT("Romanian") },
+ { L"rn", LPGENT("Rundi") },
+ { L"ru", LPGENT("Russian") },
+ { L"sg", LPGENT("Sango") },
+ { L"sa", LPGENT("Sanskrit") },
+ { L"sr", LPGENT("Serbian") },
+ { L"hr", LPGENT("Croatian") },
+ { L"si", LPGENT("Sinhala; Sinhalese") },
+ { L"sk", LPGENT("Slovak") },
+ { L"sl", LPGENT("Slovenian") },
+ { L"se", LPGENT("Northern Sami") },
+ { L"sm", LPGENT("Samoan") },
+ { L"sn", LPGENT("Shona") },
+ { L"sd", LPGENT("Sindhi") },
+ { L"so", LPGENT("Somali") },
+ { L"st", LPGENT("Sotho, Southern") },
+ { L"es", LPGENT("Spanish; Castilian") },
+ { L"sc", LPGENT("Sardinian") },
+ { L"ss", LPGENT("Swati") },
+ { L"su", LPGENT("Sundanese") },
+ { L"sw", LPGENT("Swahili") },
+ { L"sv", LPGENT("Swedish") },
+ { L"ty", LPGENT("Tahitian") },
+ { L"ta", LPGENT("Tamil") },
+ { L"tt", LPGENT("Tatar") },
+ { L"te", LPGENT("Telugu") },
+ { L"tg", LPGENT("Tajik") },
+ { L"tl", LPGENT("Tagalog") },
+ { L"th", LPGENT("Thai") },
+ { L"bo", LPGENT("Tibetan") },
+ { L"ti", LPGENT("Tigrinya") },
+ { L"to", LPGENT("Tonga (Tonga Islands)") },
+ { L"tn", LPGENT("Tswana") },
+ { L"ts", LPGENT("Tsonga") },
+ { L"tk", LPGENT("Turkmen") },
+ { L"tr", LPGENT("Turkish") },
+ { L"tw", LPGENT("Twi") },
+ { L"ug", LPGENT("Uighur; Uyghur") },
+ { L"uk", LPGENT("Ukrainian") },
+ { L"ur", LPGENT("Urdu") },
+ { L"uz", LPGENT("Uzbek") },
+ { L"ve", LPGENT("Venda") },
+ { L"vi", LPGENT("Vietnamese") },
+ { L"vo", LPGENT("Volapuk") },
+ { L"cy", LPGENT("Welsh") },
+ { L"wa", LPGENT("Walloon") },
+ { L"wo", LPGENT("Wolof") },
+ { L"xh", LPGENT("Xhosa") },
+ { L"yi", LPGENT("Yiddish") },
+ { L"yo", LPGENT("Yoruba") },
+ { L"za", LPGENT("Zhuang; Chuang") },
+ { L"zu", LPGENT("Zulu") },
{ NULL, NULL }
};
@@ -331,7 +331,7 @@ CCtrlEditJid::CCtrlEditJid(CDlgBase* dlg, int ctrlId): static void sttStoreJidFromUI(CJabberProto *ppro, CCtrlEdit &txtUsername, CCtrlCombo &cbServer)
{
- ppro->setTString("jid", CMString(FORMAT, _T("%s@%s"), ptrT(txtUsername.GetText()), ptrT(cbServer.GetText())));
+ ppro->setTString("jid", CMString(FORMAT, L"%s@%s", ptrT(txtUsername.GetText()), ptrT(cbServer.GetText())));
}
class CDlgOptAccount : public CJabberDlgBase
@@ -388,22 +388,22 @@ public: m_gotservers(false),
m_lnkServers(this, IDC_LINK_PUBLIC_SERVER, "https://xmpp.net/directory.php")
{
- CreateLink(m_txtUsername, "LoginName", _T(""));
+ CreateLink(m_txtUsername, "LoginName", L"");
CreateLink(m_txtPriority, "Priority", DBVT_DWORD, 0);
CreateLink(m_chkSavePassword, proto->m_options.SavePassword);
- CreateLink(m_cbResource, "Resource", _T("Miranda"));
+ CreateLink(m_cbResource, "Resource", L"Miranda");
CreateLink(m_chkUseHostnameAsResource, proto->m_options.HostNameAsResource);
CreateLink(m_chkUseDomainLogin, proto->m_options.UseDomainLogin);
- CreateLink(m_cbServer, "LoginServer", _T("jabber.org"));
+ CreateLink(m_cbServer, "LoginServer", L"jabber.org");
CreateLink(m_txtPort, "Port", DBVT_WORD, 5222);
CreateLink(m_chkUseSsl, proto->m_options.UseSSL);
CreateLink(m_chkUseTls, proto->m_options.UseTLS);
CreateLink(m_chkManualHost, proto->m_options.ManualConnect);
- CreateLink(m_txtManualHost, "ManualHost", _T(""));
+ CreateLink(m_txtManualHost, "ManualHost", L"");
CreateLink(m_txtManualPort, "ManualPort", DBVT_WORD, 0);
CreateLink(m_chkKeepAlive, proto->m_options.KeepAlive);
CreateLink(m_chkAutoDeleteContacts, proto->m_options.RosterSync);
- CreateLink(m_txtUserDirectory, "Jud", _T(""));
+ CreateLink(m_txtUserDirectory, "Jud", L"");
// Bind events
m_cbServer.OnDropdown = Callback(this, &CDlgOptAccount::cbServer_OnDropdown);
@@ -434,7 +434,7 @@ protected: m_cbServer.AddString(TranslateT("Loading..."));
// fill predefined resources
- TCHAR *szResources[] = { _T("Home"), _T("Work"), _T("Office"), _T("Miranda") };
+ TCHAR *szResources[] = { L"Home", L"Work", L"Office", L"Miranda" };
for (int i = 0; i < _countof(szResources); i++)
m_cbResource.AddString(szResources[i]);
@@ -450,7 +450,7 @@ protected: m_cbResource.AddString(tszResource);
m_cbResource.SetText(tszResource);
}
- else m_cbResource.SetText(_T("Miranda"));
+ else m_cbResource.SetText(L"Miranda");
for (int i = 0; g_LanguageCodes[i].szCode; i++) {
int iItem = m_cbLocale.AddString(TranslateTS(g_LanguageCodes[i].szDescription), (LPARAM)g_LanguageCodes[i].szCode);
@@ -571,8 +571,8 @@ private: if (res == IDYES)
m_proto->m_ThreadInfo->send(
- XmlNodeIq(_T("set"), m_proto->SerialNext(), m_proto->m_szJabberJID) << XQUERY(JABBER_FEAT_REGISTER)
- << XCHILD(_T("remove")));
+ XmlNodeIq(L"set", m_proto->SerialNext(), m_proto->m_szJabberJID) << XQUERY(JABBER_FEAT_REGISTER)
+ << XCHILD(L"remove"));
}
void btnChangePassword_OnClick(CCtrlButton *)
@@ -631,8 +631,8 @@ private: m_txtUsername.Enable(!checked);
m_chkSavePassword.Enable(!checked);
if (checked) {
- m_txtPassword.SetText(_T(""));
- m_txtUsername.SetText(_T(""));
+ m_txtPassword.SetText(L"");
+ m_txtUsername.SetText(L"");
m_chkSavePassword.SetState(BST_CHECKED);
}
}
@@ -697,8 +697,8 @@ private: if (!n)
break;
- if (!mir_tstrcmp(XmlGetName(n), _T("item")))
- if (const TCHAR *jid = XmlGetAttrValue(n, _T("jid")))
+ if (!mir_tstrcmp(XmlGetName(n), L"item"))
+ if (const TCHAR *jid = XmlGetAttrValue(n, L"jid"))
if (m_cbServer.FindString(jid, -1, true) == CB_ERR)
m_cbServer.AddString(jid);
}
@@ -732,7 +732,7 @@ private: TCHAR *buf = mir_a2t(result->pData);
XmlNode node(buf, NULL, NULL);
if (node) {
- HXML queryNode = XmlGetChild(node, _T("query"));
+ HXML queryNode = XmlGetChild(node, L"query");
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
}
@@ -776,41 +776,41 @@ public: CreateLink(m_chkDirect, proto->m_options.BsDirect);
CreateLink(m_chkDirectManual, proto->m_options.BsDirectManual);
CreateLink(m_chkProxy, proto->m_options.BsProxyManual);
- CreateLink(m_txtDirect, "BsDirectAddr", _T(""));
- CreateLink(m_txtProxy, "BsProxyServer", _T(""));
+ CreateLink(m_txtDirect, "BsDirectAddr", L"");
+ CreateLink(m_txtProxy, "BsProxyServer", L"");
m_chkDirect.OnChange =
m_chkDirectManual.OnChange = Callback(this, &CDlgOptAdvanced::chkDirect_OnChange);
m_chkProxy.OnChange = Callback(this, &CDlgOptAdvanced::chkProxy_OnChange);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Send messages slower, but with full acknowledgment"), m_proto->m_options.MsgAck);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable avatars"), m_proto->m_options.EnableAvatars);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log chat state changes"), m_proto->m_options.LogChatstates);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log presence subscription state changes"), m_proto->m_options.LogPresence);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Log presence errors"), m_proto->m_options.LogPresenceErrors);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user moods receiving"), m_proto->m_options.EnableUserMood);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user tunes receiving"), m_proto->m_options.EnableUserTune);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable user activity receiving"), m_proto->m_options.EnableUserActivity);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Receive notes"), m_proto->m_options.AcceptNotes);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Automatically save received notes"), m_proto->m_options.AutosaveNotes);
- m_otvOptions.AddOption(LPGENT("Messaging") _T("/") LPGENT("Enable server-side history"), m_proto->m_options.EnableMsgArchive);
-
- m_otvOptions.AddOption(LPGENT("Server options") _T("/") LPGENT("Disable SASL authentication (for old servers)"), m_proto->m_options.Disable3920auth);
- m_otvOptions.AddOption(LPGENT("Server options") _T("/") LPGENT("Enable stream compression (if possible)"), m_proto->m_options.EnableZlib);
-
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Enable remote controlling (from another resource of same JID only)"), m_proto->m_options.EnableRemoteControl);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Show transport agents on contact list"), m_proto->m_options.ShowTransport);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Automatically add contact when accept authorization"), m_proto->m_options.AutoAdd);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Automatically accept authorization requests"), m_proto->m_options.AutoAcceptAuthorization);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Fix incorrect timestamps in incoming messages"), m_proto->m_options.FixIncorrectTimestamps);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Disable frame"), m_proto->m_options.DisableFrame);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Enable XMPP link processing (requires AssocMgr)"), m_proto->m_options.ProcessXMPPLinks);
- m_otvOptions.AddOption(LPGENT("Other") _T("/") LPGENT("Keep contacts assigned to local groups (ignore roster group)"), m_proto->m_options.IgnoreRosterGroups);
-
- m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Allow servers to request version (XEP-0092)"), m_proto->m_options.AllowVersionRequests);
- m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Show information about operating system in version replies"), m_proto->m_options.ShowOSVersion);
- m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Accept only in band incoming filetransfers (don't disclose own IP)"), m_proto->m_options.BsOnlyIBB);
- m_otvOptions.AddOption(LPGENT("Security") _T("/") LPGENT("Accept HTTP Authentication requests (XEP-0070)"), m_proto->m_options.AcceptHttpAuth);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Send messages slower, but with full acknowledgment"), m_proto->m_options.MsgAck);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable avatars"), m_proto->m_options.EnableAvatars);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log chat state changes"), m_proto->m_options.LogChatstates);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log presence subscription state changes"), m_proto->m_options.LogPresence);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Log presence errors"), m_proto->m_options.LogPresenceErrors);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user moods receiving"), m_proto->m_options.EnableUserMood);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user tunes receiving"), m_proto->m_options.EnableUserTune);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable user activity receiving"), m_proto->m_options.EnableUserActivity);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Receive notes"), m_proto->m_options.AcceptNotes);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Automatically save received notes"), m_proto->m_options.AutosaveNotes);
+ m_otvOptions.AddOption(LPGENT("Messaging") L"/" LPGENT("Enable server-side history"), m_proto->m_options.EnableMsgArchive);
+
+ m_otvOptions.AddOption(LPGENT("Server options") L"/" LPGENT("Disable SASL authentication (for old servers)"), m_proto->m_options.Disable3920auth);
+ m_otvOptions.AddOption(LPGENT("Server options") L"/" LPGENT("Enable stream compression (if possible)"), m_proto->m_options.EnableZlib);
+
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Enable remote controlling (from another resource of same JID only)"), m_proto->m_options.EnableRemoteControl);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Show transport agents on contact list"), m_proto->m_options.ShowTransport);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Automatically add contact when accept authorization"), m_proto->m_options.AutoAdd);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Automatically accept authorization requests"), m_proto->m_options.AutoAcceptAuthorization);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Fix incorrect timestamps in incoming messages"), m_proto->m_options.FixIncorrectTimestamps);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Disable frame"), m_proto->m_options.DisableFrame);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Enable XMPP link processing (requires AssocMgr)"), m_proto->m_options.ProcessXMPPLinks);
+ m_otvOptions.AddOption(LPGENT("Other") L"/" LPGENT("Keep contacts assigned to local groups (ignore roster group)"), m_proto->m_options.IgnoreRosterGroups);
+
+ m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Allow servers to request version (XEP-0092)"), m_proto->m_options.AllowVersionRequests);
+ m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Show information about operating system in version replies"), m_proto->m_options.ShowOSVersion);
+ m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Accept only in band incoming filetransfers (don't disclose own IP)"), m_proto->m_options.BsOnlyIBB);
+ m_otvOptions.AddOption(LPGENT("Security") L"/" LPGENT("Accept HTTP Authentication requests (XEP-0070)"), m_proto->m_options.AcceptHttpAuth);
}
void OnInitDialog()
@@ -896,21 +896,21 @@ public: m_txtQuit(this, IDC_TXT_QUIT),
m_otvOptions(this, IDC_OPTTREE)
{
- CreateLink(m_txtAltNick, "GcAltNick", _T(""));
+ CreateLink(m_txtAltNick, "GcAltNick", L"");
CreateLink(m_txtSlap, "GcMsgSlap", TranslateTS(JABBER_GC_MSG_SLAP));
CreateLink(m_txtQuit, "GcMsgQuit", TranslateTS(JABBER_GC_MSG_QUIT));
- m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Autoaccept multiuser chat invitations"), m_proto->m_options.AutoAcceptMUC);
- m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Automatically join bookmarks on login"), m_proto->m_options.AutoJoinBookmarks);
- m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Automatically join conferences on login"), m_proto->m_options.AutoJoinConferences);
- m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Hide conference windows at startup"), m_proto->m_options.AutoJoinHidden);
- m_otvOptions.AddOption(LPGENT("General") _T("/") LPGENT("Do not show multiuser chat invitations"), m_proto->m_options.IgnoreMUCInvites);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Ban notifications"), m_proto->m_options.GcLogBans);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Room configuration changes"), m_proto->m_options.GcLogConfig);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Affiliation changes"), m_proto->m_options.GcLogAffiliations);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Role changes"), m_proto->m_options.GcLogRoles);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Status changes"), m_proto->m_options.GcLogStatuses);
- m_otvOptions.AddOption(LPGENT("Log events") _T("/") LPGENT("Don't notify history messages"), m_proto->m_options.GcLogChatHistory);
+ m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Autoaccept multiuser chat invitations"), m_proto->m_options.AutoAcceptMUC);
+ m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Automatically join bookmarks on login"), m_proto->m_options.AutoJoinBookmarks);
+ m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Automatically join conferences on login"), m_proto->m_options.AutoJoinConferences);
+ m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Hide conference windows at startup"), m_proto->m_options.AutoJoinHidden);
+ m_otvOptions.AddOption(LPGENT("General") L"/" LPGENT("Do not show multiuser chat invitations"), m_proto->m_options.IgnoreMUCInvites);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Ban notifications"), m_proto->m_options.GcLogBans);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Room configuration changes"), m_proto->m_options.GcLogConfig);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Affiliation changes"), m_proto->m_options.GcLogAffiliations);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Role changes"), m_proto->m_options.GcLogRoles);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Status changes"), m_proto->m_options.GcLogStatuses);
+ m_otvOptions.AddOption(LPGENT("Log events") L"/" LPGENT("Don't notify history messages"), m_proto->m_options.GcLogChatHistory);
}
};
@@ -1000,16 +1000,16 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) if (query == NULL) return;
int i = 1;
while (TRUE) {
- HXML item = XmlGetNthChild(query, _T("item"), i++);
+ HXML item = XmlGetNthChild(query, L"item", i++);
if (item == NULL)
break;
- const TCHAR *jid = XmlGetAttrValue(item, _T("jid"));
+ const TCHAR *jid = XmlGetAttrValue(item, L"jid");
if (jid == NULL)
continue;
- const TCHAR *name = XmlGetAttrValue(item, _T("name"));
- const TCHAR *subscription = XmlGetAttrValue(item, _T("subscription"));
+ const TCHAR *name = XmlGetAttrValue(item, L"name");
+ const TCHAR *subscription = XmlGetAttrValue(item, L"subscription");
const TCHAR *group = XmlGetText(XmlGetChild(item, "group"));
_RosterInsertListItem(hList, jid, name, group, subscription, TRUE);
}
@@ -1050,15 +1050,15 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) XmlNodeIq iq(AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_SET));
- HXML query = iq << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER);
+ HXML query = iq << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER);
int itemCount = 0;
int ListItemCount = ListView_GetItemCount(hList);
for (int index = 0; index < ListItemCount; index++) {
- TCHAR jid[JABBER_MAX_JID_LEN] = _T("");
- TCHAR name[260] = _T("");
- TCHAR group[260] = _T("");
- TCHAR subscr[260] = _T("");
+ TCHAR jid[JABBER_MAX_JID_LEN] = L"";
+ TCHAR name[260] = L"";
+ TCHAR group[260] = L"";
+ TCHAR subscr[260] = L"";
ListView_GetItemText(hList, index, 0, jid, _countof(jid));
ListView_GetItemText(hList, index, 1, name, _countof(name));
ListView_GetItemText(hList, index, 2, group, _countof(group));
@@ -1067,17 +1067,17 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) BOOL bRemove = !ListView_GetCheckState(hList, index);
if (itemRoster && bRemove) {
//delete item
- query << XCHILD(_T("item")) << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), _T("remove"));
+ query << XCHILD(L"item") << XATTR(L"jid", jid) << XATTR(L"subscription", L"remove");
itemCount++;
}
else if (!bRemove) {
BOOL bPushed = itemRoster ? TRUE : FALSE;
if (!bPushed) {
- const TCHAR *rosterName = XmlGetAttrValue(itemRoster, _T("name"));
+ const TCHAR *rosterName = XmlGetAttrValue(itemRoster, L"name");
if ((rosterName != NULL || name[0] != 0) && mir_tstrcmpi(rosterName, name))
bPushed = TRUE;
if (!bPushed) {
- rosterName = XmlGetAttrValue(itemRoster, _T("subscription"));
+ rosterName = XmlGetAttrValue(itemRoster, L"subscription");
if ((rosterName != NULL || subscr[0] != 0) && mir_tstrcmpi(rosterName, subscr))
bPushed = TRUE;
}
@@ -1088,12 +1088,12 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) }
}
if (bPushed) {
- HXML item = query << XCHILD(_T("item"));
+ HXML item = query << XCHILD(L"item");
if (mir_tstrlen(group))
- item << XCHILD(_T("group"), group);
+ item << XCHILD(L"group", group);
if (mir_tstrlen(name))
- item << XATTR(_T("name"), name);
- item << XATTR(_T("jid"), jid) << XATTR(_T("subscription"), subscr[0] ? subscr : _T("none"));
+ item << XATTR(L"name", name);
+ item << XATTR(L"jid", jid) << XATTR(L"subscription", subscr[0] ? subscr : L"none");
itemCount++;
}
}
@@ -1120,7 +1120,7 @@ void CJabberProto::_RosterSendRequest(HWND hwndDlg, BYTE rrAction) m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::_RosterHandleGetRequest, JABBER_IQ_TYPE_GET))
- << XCHILDNS(_T("query"), JABBER_FEAT_IQ_ROSTER));
+ << XCHILDNS(L"query", JABBER_FEAT_IQ_ROSTER));
}
static void _RosterItemEditEnd(HWND hEditor, ROSTEREDITDAT * edat, BOOL bCancel)
@@ -1179,7 +1179,7 @@ void CJabberProto::_RosterExportToFile(HWND hwndDlg) TCHAR filename[MAX_PATH] = { 0 };
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*.xml)%c*.xml%c%c"), TranslateT("XML for MS Excel (UTF-8 encoded)"), 0, 0, 0);
+ mir_sntprintf(filter, L"%s (*.xml)%c*.xml%c%c", TranslateT("XML for MS Excel (UTF-8 encoded)"), 0, 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
@@ -1189,41 +1189,41 @@ void CJabberProto::_RosterExportToFile(HWND hwndDlg) ofn.Flags = OFN_HIDEREADONLY;
ofn.nMaxFile = _countof(filename);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("xml");
+ ofn.lpstrDefExt = L"xml";
if (!GetSaveFileName(&ofn)) return;
- FILE * fp = fopent(filename, _T("w"));
+ FILE * fp = fopent(filename, L"w");
if (!fp) return;
HWND hList = GetDlgItem(hwndDlg, IDC_ROSTER);
int ListItemCount = ListView_GetItemCount(hList);
- XmlNode root(_T("Workbook"));
- root << XATTR(_T("xmlns"), _T("urn:schemas-microsoft-com:office:spreadsheet"))
- << XATTR(_T("xmlns:o"), _T("urn:schemas-microsoft-com:office:office"))
- << XATTR(_T("xmlns:x"), _T("urn:schemas-microsoft-com:office:excel"))
- << XATTR(_T("xmlns:ss"), _T("urn:schemas-microsoft-com:office:spreadsheet"))
- << XATTR(_T("xmlns:html"), _T("http://www.w3.org/TR/REC-html40"));
- root << XCHILD(_T("ExcelWorkbook"))
- << XATTR(_T("xmlns"), _T("urn:schemas-microsoft-com:office:excel"));
- HXML table = root << XCHILD(_T("Worksheet")) << XATTR(_T("ss:Name"), _T("Exported roster"))
- << XCHILD(_T("Table"));
+ XmlNode root(L"Workbook");
+ root << XATTR(L"xmlns", L"urn:schemas-microsoft-com:office:spreadsheet")
+ << XATTR(L"xmlns:o", L"urn:schemas-microsoft-com:office:office")
+ << XATTR(L"xmlns:x", L"urn:schemas-microsoft-com:office:excel")
+ << XATTR(L"xmlns:ss", L"urn:schemas-microsoft-com:office:spreadsheet")
+ << XATTR(L"xmlns:html", L"http://www.w3.org/TR/REC-html40");
+ root << XCHILD(L"ExcelWorkbook")
+ << XATTR(L"xmlns", L"urn:schemas-microsoft-com:office:excel");
+ HXML table = root << XCHILD(L"Worksheet") << XATTR(L"ss:Name", L"Exported roster")
+ << XCHILD(L"Table");
for (int index = 0; index < ListItemCount; index++) {
- TCHAR jid[JABBER_MAX_JID_LEN] = _T("");
- TCHAR name[260] = _T("");
- TCHAR group[260] = _T("");
- TCHAR subscr[260] = _T("");
+ TCHAR jid[JABBER_MAX_JID_LEN] = L"";
+ TCHAR name[260] = L"";
+ TCHAR group[260] = L"";
+ TCHAR subscr[260] = L"";
ListView_GetItemText(hList, index, 0, jid, _countof(jid));
ListView_GetItemText(hList, index, 1, name, _countof(name));
ListView_GetItemText(hList, index, 2, group, _countof(group));
ListView_GetItemText(hList, index, 3, subscr, _countof(subscr));
- HXML node = table << XCHILD(_T("Row"));
- node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), _T("+")) << XATTR(_T("ss:Type"), _T("String"));
- node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), jid) << XATTR(_T("ss:Type"), _T("String"));
- node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), name) << XATTR(_T("ss:Type"), _T("String"));
- node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), group) << XATTR(_T("ss:Type"), _T("String"));
- node << XCHILD(_T("Cell")) << XCHILD(_T("Data"), subscr) << XATTR(_T("ss:Type"), _T("String"));
+ HXML node = table << XCHILD(L"Row");
+ node << XCHILD(L"Cell") << XCHILD(L"Data", L"+") << XATTR(L"ss:Type", L"String");
+ node << XCHILD(L"Cell") << XCHILD(L"Data", jid) << XATTR(L"ss:Type", L"String");
+ node << XCHILD(L"Cell") << XCHILD(L"Data", name) << XATTR(L"ss:Type", L"String");
+ node << XCHILD(L"Cell") << XCHILD(L"Data", group) << XATTR(L"ss:Type", L"String");
+ node << XCHILD(L"Cell") << XCHILD(L"Data", subscr) << XATTR(L"ss:Type", L"String");
}
@@ -1274,7 +1274,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) int nBytesProcessed = 0;
XmlNode node(newBuf, &nBytesProcessed, NULL);
if (node) {
- HXML Workbook = XmlGetChild(node, _T("Workbook"));
+ HXML Workbook = XmlGetChild(node, L"Workbook");
if (Workbook) {
HXML Worksheet = XmlGetChild(Workbook, "Worksheet");
if (Worksheet) {
@@ -1283,7 +1283,7 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) int index = 1;
HWND hList = GetDlgItem(hwndDlg, IDC_ROSTER);
while (TRUE) {
- HXML Row = XmlGetNthChild(Table, _T("Row"), index++);
+ HXML Row = XmlGetNthChild(Table, L"Row", index++);
if (!Row)
break;
@@ -1292,13 +1292,13 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) const TCHAR *name = NULL;
const TCHAR *group = NULL;
const TCHAR *subscr = NULL;
- HXML Cell = XmlGetNthChild(Row, _T("Cell"), 1);
+ HXML Cell = XmlGetNthChild(Row, L"Cell", 1);
HXML Data = (Cell) ? XmlGetChild(Cell, "Data") : XmlNode();
if (Data) {
- if (!mir_tstrcmpi(XmlGetText(Data), _T("+"))) bAdd = TRUE;
- else if (mir_tstrcmpi(XmlGetText(Data), _T("-"))) continue;
+ if (!mir_tstrcmpi(XmlGetText(Data), L"+")) bAdd = TRUE;
+ else if (mir_tstrcmpi(XmlGetText(Data), L"-")) continue;
- Cell = XmlGetNthChild(Row, _T("Cell"), 2);
+ Cell = XmlGetNthChild(Row, L"Cell", 2);
if (Cell) Data = XmlGetChild(Cell, "Data");
else Data = NULL;
if (Data) {
@@ -1306,17 +1306,17 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) if (!jid || mir_tstrlen(jid) == 0) continue;
}
- Cell = XmlGetNthChild(Row, _T("Cell"), 3);
+ Cell = XmlGetNthChild(Row, L"Cell", 3);
if (Cell) Data = XmlGetChild(Cell, "Data");
else Data = NULL;
if (Data) name = XmlGetText(Data);
- Cell = XmlGetNthChild(Row, _T("Cell"), 4);
+ Cell = XmlGetNthChild(Row, L"Cell", 4);
if (Cell) Data = XmlGetChild(Cell, "Data");
else Data = NULL;
if (Data) group = XmlGetText(Data);
- Cell = XmlGetNthChild(Row, _T("Cell"), 5);
+ Cell = XmlGetNthChild(Row, L"Cell", 5);
if (Cell) Data = XmlGetChild(Cell, "Data");
else Data = NULL;
if (Data) subscr = XmlGetText(Data);
@@ -1544,10 +1544,10 @@ public: {
SetParent(hwndParent);
- CreateLink(m_txtUsername, "LoginName", _T(""));
+ CreateLink(m_txtUsername, "LoginName", L"");
CreateLink(m_chkSavePassword, proto->m_options.SavePassword);
- CreateLink(m_cbResource, "Resource", _T("Miranda"));
- CreateLink(m_cbServer, "LoginServer", _T("jabber.org"));
+ CreateLink(m_cbResource, "Resource", L"Miranda");
+ CreateLink(m_cbServer, "LoginServer", L"jabber.org");
CreateLink(m_txtPort, "Port", DBVT_WORD, 5222);
CreateLink(m_chkUseDomainLogin, proto->m_options.UseDomainLogin);
@@ -1578,7 +1578,7 @@ protected: m_cbServer.AddString(TranslateT("Loading..."));
// fill predefined resources
- TCHAR *szResources[] = { _T("Home"), _T("Work"), _T("Office"), _T("Miranda") };
+ TCHAR *szResources[] = { L"Home", L"Work", L"Office", L"Miranda" };
for (int i = 0; i < _countof(szResources); i++)
m_cbResource.AddString(szResources[i]);
@@ -1594,7 +1594,7 @@ protected: m_cbResource.AddString(tszResource);
m_cbResource.SetText(tszResource);
}
- else m_cbResource.SetText(_T("Miranda"));
+ else m_cbResource.SetText(L"Miranda");
m_cbType.AddString(TranslateT("Public XMPP Network"), ACC_PUBLIC);
m_cbType.AddString(TranslateT("Secure XMPP Network"), ACC_TLS);
@@ -1864,8 +1864,8 @@ private: m_txtUsername.Enable(!checked);
m_chkSavePassword.Enable(!checked);
if (checked) {
- m_txtPassword.SetText(_T(""));
- m_txtUsername.SetText(_T(""));
+ m_txtPassword.SetText(L"");
+ m_txtUsername.SetText(L"");
m_chkSavePassword.SetState(BST_CHECKED);
}
}
@@ -2171,8 +2171,8 @@ void CJabberDlgAccMgrUI::RefreshServers(HXML node) if (!n)
break;
- if (!mir_tstrcmp(XmlGetName(n), _T("item")))
- if (const TCHAR *jid = XmlGetAttrValue(n, _T("jid")))
+ if (!mir_tstrcmp(XmlGetName(n), L"item"))
+ if (const TCHAR *jid = XmlGetAttrValue(n, L"jid"))
if (m_cbServer.FindString(jid, -1, true) == CB_ERR)
m_cbServer.AddString(jid);
}
@@ -2202,7 +2202,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) TCHAR *ptszText = mir_a2t(result->pData);
XmlNode node(ptszText, NULL, NULL);
if (node) {
- HXML queryNode = XmlGetChild(node, _T("query"));
+ HXML queryNode = XmlGetChild(node, L"query");
if (queryNode && IsWindow(hwnd)) {
SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)queryNode);
bIsError = false;
diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp index d75d0afec1..f81d00a074 100644 --- a/protocols/JabberG/src/jabber_password.cpp +++ b/protocols/JabberG/src/jabber_password.cpp @@ -74,8 +74,8 @@ static INT_PTR CALLBACK JabberChangePasswordDlgProc(HWND hwndDlg, UINT msg, WPAR XmlNodeIq iq(ppro->AddIQ(&CJabberProto::OnIqResultSetPassword, JABBER_IQ_TYPE_SET, _A2T(ppro->m_ThreadInfo->conn.server)));
HXML q = iq << XQUERY(JABBER_FEAT_REGISTER);
- q << XCHILD(_T("username"), ppro->m_ThreadInfo->conn.username);
- q << XCHILD(_T("password"), newPasswd);
+ q << XCHILD(L"username", ppro->m_ThreadInfo->conn.username);
+ q << XCHILD(L"password", newPasswd);
ppro->m_ThreadInfo->send(iq);
}
DestroyWindow(hwndDlg);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index c957183889..4e0fac80ed 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -39,7 +39,7 @@ BOOL CJabberProto::OnIqRequestPrivacyLists(HXML, CJabberIqInfo *pInfo) }
else m_pDlgPrivacyLists->SetStatusText(TranslateT("Warning: privacy lists were changed on server."));
- m_ThreadInfo->send( XmlNodeIq(_T("result"), pInfo));
+ m_ThreadInfo->send( XmlNodeIq(L"result", pInfo));
}
return TRUE;
}
@@ -73,11 +73,11 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) if (iqNode == NULL)
return;
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
- if ( mir_tstrcmp(type, _T("result")))
+ if ( mir_tstrcmp(type, L"result"))
return;
HXML query = XmlGetChild(iqNode , "query");
@@ -86,7 +86,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) HXML list = XmlGetChild(query, "list");
if (list == NULL)
return;
- TCHAR *szListName = (TCHAR*)XmlGetAttrValue(list, _T("name"));
+ TCHAR *szListName = (TCHAR*)XmlGetAttrValue(list, L"name");
if (!szListName)
return;
@@ -100,26 +100,26 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) }
HXML item;
- for (int i = 1; (item = XmlGetNthChild(list, _T("item"), i)) != NULL; i++) {
- const TCHAR *itemType = XmlGetAttrValue(item, _T("type"));
+ for (int i = 1; (item = XmlGetNthChild(list, L"item", i)) != NULL; i++) {
+ const TCHAR *itemType = XmlGetAttrValue(item, L"type");
PrivacyListRuleType nItemType = Else;
if (itemType) {
- if (!mir_tstrcmpi(itemType, _T("jid")))
+ if (!mir_tstrcmpi(itemType, L"jid"))
nItemType = Jid;
- else if (!mir_tstrcmpi(itemType, _T("group")))
+ else if (!mir_tstrcmpi(itemType, L"group"))
nItemType = Group;
- else if (!mir_tstrcmpi(itemType, _T("subscription")))
+ else if (!mir_tstrcmpi(itemType, L"subscription"))
nItemType = Subscription;
}
- const TCHAR *itemValue = XmlGetAttrValue(item, _T("value"));
+ const TCHAR *itemValue = XmlGetAttrValue(item, L"value");
- const TCHAR *itemAction = XmlGetAttrValue(item, _T("action"));
+ const TCHAR *itemAction = XmlGetAttrValue(item, L"action");
BOOL bAllow = TRUE;
- if (itemAction && !mir_tstrcmpi(itemAction, _T("deny")))
+ if (itemAction && !mir_tstrcmpi(itemAction, L"deny"))
bAllow = FALSE;
- const TCHAR *itemOrder = XmlGetAttrValue(item, _T("order"));
+ const TCHAR *itemOrder = XmlGetAttrValue(item, L"order");
DWORD dwOrder = 0;
if (itemOrder)
dwOrder = _ttoi(itemOrder);
@@ -179,13 +179,13 @@ void CJabberProto::OnIqResultPrivacyListActive(HXML iqNode, CJabberIqInfo *pInfo if (iqNode == NULL)
return;
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
CMString szText;
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
mir_cslock lck(m_privacyListManager.m_cs);
if (pList) {
m_privacyListManager.SetActiveListName(pList->GetListName());
@@ -214,7 +214,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf if (iqNode == NULL)
return;
- const TCHAR *type = XmlGetAttrValue(iqNode, _T("type"));
+ const TCHAR *type = XmlGetAttrValue(iqNode, L"type");
if (type == NULL)
return;
@@ -222,7 +222,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf szText[0] = 0;
{
mir_cslock lck(m_privacyListManager.m_cs);
- if (!mir_tstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, L"result")) {
CPrivacyList *pList = (CPrivacyList *)pInfo->GetUserData();
if (pList) {
m_privacyListManager.SetDefaultListName(pList->GetListName());
@@ -258,11 +258,11 @@ void CJabberProto::OnIqResultPrivacyLists(HXML iqNode, CJabberIqInfo *pInfo) m_privacyListManager.RemoveAllLists();
for (int i = 1; ; i++) {
- HXML list = XmlGetNthChild(query, _T("list"), i);
+ HXML list = XmlGetNthChild(query, L"list", i);
if (list == NULL)
break;
- const TCHAR *listName = XmlGetAttrValue(list, _T("name"));
+ const TCHAR *listName = XmlGetAttrValue(list, L"name");
if (listName) {
m_privacyListManager.AddList((TCHAR*)listName);
@@ -270,20 +270,20 @@ void CJabberProto::OnIqResultPrivacyLists(HXML iqNode, CJabberIqInfo *pInfo) if (m_pDlgPrivacyLists)
m_ThreadInfo->send(
XmlNodeIq( AddIQ(&CJabberProto::OnIqResultPrivacyList, JABBER_IQ_TYPE_GET))
- << XQUERY(JABBER_FEAT_PRIVACY_LISTS) << XCHILD(_T("list")) << XATTR(_T("name"), listName));
+ << XQUERY(JABBER_FEAT_PRIVACY_LISTS) << XCHILD(L"list") << XATTR(L"name", listName));
}
}
const TCHAR *szName = NULL;
HXML node = XmlGetChild(query , "active");
if (node)
- szName = XmlGetAttrValue(node, _T("name"));
+ szName = XmlGetAttrValue(node, L"name");
m_privacyListManager.SetActiveListName(szName);
szName = NULL;
node = XmlGetChild(query , "default");
if (node)
- szName = XmlGetAttrValue(node, _T("name"));
+ szName = XmlGetAttrValue(node, L"name");
m_privacyListManager.SetDefaultListName(szName);
}
UI_SAFE_NOTIFY(m_pDlgPrivacyLists, WM_JABBER_REFRESH);
@@ -367,7 +367,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_ICO_PRESENCEIN, STM_SETICON, (WPARAM)m_proto->LoadIconEx("pl_prin_allow"), 0);
SendDlgItemMessage(m_hwnd, IDC_ICO_PRESENCEOUT, STM_SETICON, (WPARAM)m_proto->LoadIconEx("pl_prout_allow"), 0);
- TCHAR *szTypes[] = { _T("JID"), _T("Group"), _T("Subscription"), _T("Any") };
+ TCHAR *szTypes[] = { L"JID", L"Group", L"Subscription", L"Any" };
int i, nTypes[] = { Jid, Group, Subscription, Else };
for (i=0; i < _countof(szTypes); i++) {
LRESULT nItem = SendDlgItemMessage(m_hwnd, IDC_COMBO_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szTypes[i]));
@@ -377,7 +377,7 @@ public: }
SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_RESETCONTENT, 0, 0);
- TCHAR *szSubscriptions[] = { _T("none"), _T("from"), _T("to"), _T("both") };
+ TCHAR *szSubscriptions[] = { L"none", L"from", L"to", L"both" };
for (i=0; i < _countof(szSubscriptions); i++) {
LRESULT nItem = SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(szSubscriptions[i]));
SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_SETITEMDATA, nItem, (LPARAM)szSubscriptions[i]);
@@ -507,7 +507,7 @@ public: if (nCurSel != CB_ERR)
m_pRule->SetValue((TCHAR*)SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUE, CB_GETITEMDATA, nCurSel, 0));
else
- m_pRule->SetValue(_T("none"));
+ m_pRule->SetValue(L"none");
break;
default:
@@ -991,16 +991,16 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList) TCHAR szTypeValue[ 512 ];
switch (pRule->GetType()) {
case Jid:
- mir_sntprintf(szTypeValue, _T("If Jabber ID is '%s' then"), pRule->GetValue());
+ mir_sntprintf(szTypeValue, L"If Jabber ID is '%s' then", pRule->GetValue());
break;
case Group:
- mir_sntprintf(szTypeValue, _T("If group is '%s' then"), pRule->GetValue());
+ mir_sntprintf(szTypeValue, L"If group is '%s' then", pRule->GetValue());
break;
case Subscription:
- mir_sntprintf(szTypeValue, _T("If subscription is '%s' then"), pRule->GetValue());
+ mir_sntprintf(szTypeValue, L"If subscription is '%s' then", pRule->GetValue());
break;
case Else:
- mir_sntprintf(szTypeValue, _T("Else"));
+ mir_sntprintf(szTypeValue, L"Else");
break;
}
@@ -1011,29 +1011,29 @@ void CJabberDlgPrivacyLists::ShowAdvancedList(CPrivacyList *pList) if (!dwPackets)
dwPackets = JABBER_PL_RULE_TYPE_ALL;
if (dwPackets == JABBER_PL_RULE_TYPE_ALL)
- mir_tstrcpy(szPackets, _T("all"));
+ mir_tstrcpy(szPackets, L"all");
else {
if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE)
- mir_tstrcat(szPackets, _T("messages"));
+ mir_tstrcat(szPackets, L"messages");
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN) {
if (mir_tstrlen(szPackets))
- mir_tstrcat(szPackets, _T(", "));
- mir_tstrcat(szPackets, _T("presence-in"));
+ mir_tstrcat(szPackets, L", ");
+ mir_tstrcat(szPackets, L"presence-in");
}
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT) {
if (mir_tstrlen(szPackets))
- mir_tstrcat(szPackets, _T(", "));
- mir_tstrcat(szPackets, _T("presence-out"));
+ mir_tstrcat(szPackets, L", ");
+ mir_tstrcat(szPackets, L"presence-out");
}
if (dwPackets & JABBER_PL_RULE_TYPE_IQ) {
if (mir_tstrlen(szPackets))
- mir_tstrcat(szPackets, _T(", "));
- mir_tstrcat(szPackets, _T("queries"));
+ mir_tstrcat(szPackets, L", ");
+ mir_tstrcat(szPackets, L"queries");
}
}
TCHAR szListItem[ 512 ];
- mir_sntprintf(szListItem, _T("%s %s %s"), szTypeValue, pRule->GetAction() ? _T("allow") : _T("deny"), szPackets);
+ mir_sntprintf(szListItem, L"%s %s %s", szTypeValue, pRule->GetAction() ? L"allow" : L"deny", szPackets);
LRESULT nItemId = SendDlgItemMessage(m_hwnd, IDC_PL_RULES_LIST, LB_ADDSTRING, 0, (LPARAM)szListItem);
SendDlgItemMessage(m_hwnd, IDC_PL_RULES_LIST, LB_SETITEMDATA, nItemId, (LPARAM)pRule);
@@ -1081,25 +1081,25 @@ void CJabberDlgPrivacyLists::DrawRuleAction(HDC hdc, COLORREF clLine1, COLORREF, if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_PRESENCE_IN) {
--itemCount;
if (needComma)
- DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc);
+ DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc);
needComma = true;
DrawNextRulePart(hdc, clLine1, TranslateT("incoming presences"), rc);
}
if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_PRESENCE_OUT) {
--itemCount;
if (needComma)
- DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc);
+ DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc);
needComma = true;
DrawNextRulePart(hdc, clLine1, TranslateT("outgoing presences"), rc);
}
if (pRule->GetPackets() & JABBER_PL_RULE_TYPE_IQ) {
--itemCount;
if (needComma)
- DrawNextRulePart(hdc, clLine1, itemCount ? _T(", ") : TranslateT(" and "), rc);
+ DrawNextRulePart(hdc, clLine1, itemCount ? L", " : TranslateT(" and "), rc);
needComma = true;
DrawNextRulePart(hdc, clLine1, TranslateT("queries"), rc);
}
- DrawNextRulePart(hdc, clLine1, _T("."), rc);
+ DrawNextRulePart(hdc, clLine1, L".", rc);
}
}
@@ -1385,10 +1385,10 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList) break;
case Subscription:
- if (!mir_tstrcmp(pRule->GetValue(), _T("none"))) hItem = clc_info.hItemSubNone;
- else if (!mir_tstrcmp(pRule->GetValue(), _T("from"))) hItem = clc_info.hItemSubFrom;
- else if (!mir_tstrcmp(pRule->GetValue(), _T("to"))) hItem = clc_info.hItemSubTo;
- else if (!mir_tstrcmp(pRule->GetValue(), _T("both"))) hItem = clc_info.hItemSubBoth;
+ if (!mir_tstrcmp(pRule->GetValue(), L"none")) hItem = clc_info.hItemSubNone;
+ else if (!mir_tstrcmp(pRule->GetValue(), L"from")) hItem = clc_info.hItemSubFrom;
+ else if (!mir_tstrcmp(pRule->GetValue(), L"to")) hItem = clc_info.hItemSubTo;
+ else if (!mir_tstrcmp(pRule->GetValue(), L"both")) hItem = clc_info.hItemSubBoth;
break;
case Else:
@@ -1484,28 +1484,28 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) }
hItem = clc_info.hItemSubBoth;
- szJid = _T("both");
+ szJid = L"both";
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets);
if (dwPackets = CListGetPackets(hwndList, hItem, false))
pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets);
hItem = clc_info.hItemSubFrom;
- szJid = _T("from");
+ szJid = L"from";
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets);
if (dwPackets = CListGetPackets(hwndList, hItem, false))
pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets);
hItem = clc_info.hItemSubNone;
- szJid = _T("none");
+ szJid = L"none";
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets);
if (dwPackets = CListGetPackets(hwndList, hItem, false))
pList->AddRule(Subscription, szJid, FALSE, dwOrder++, dwPackets);
hItem = clc_info.hItemSubTo;
- szJid = _T("to");
+ szJid = L"to";
if (dwPackets = CListGetPackets(hwndList, hItem, true))
pList->AddRule(Subscription, szJid, TRUE, dwOrder++, dwPackets);
if (dwPackets = CListGetPackets(hwndList, hItem, false))
@@ -1637,7 +1637,7 @@ void CJabberDlgPrivacyLists::btnAddJid_OnClick(CCtrlButton *) int len = GetWindowTextLength(GetDlgItem(m_hwnd, IDC_NEWJID))+1;
TCHAR *buf = (TCHAR *)_alloca(sizeof(TCHAR) * len);
GetDlgItemText(m_hwnd, IDC_NEWJID, buf, len);
- SetDlgItemText(m_hwnd, IDC_NEWJID, _T(""));
+ SetDlgItemText(m_hwnd, IDC_NEWJID, L"");
CListAddContact(GetDlgItem(m_hwnd, IDC_CLIST), buf);
}
@@ -1658,9 +1658,9 @@ void CJabberDlgPrivacyLists::btnActivate_OnClick(CCtrlButton *) SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_ACTIVATE), GWLP_USERDATA, (LONG_PTR)pList);
XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList));
HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS);
- HXML active = query << XCHILD(_T("active"));
+ HXML active = query << XCHILD(L"active");
if (pList)
- active << XATTR(_T("name"), pList->GetListName());
+ active << XATTR(L"name", pList->GetListName());
lck.unlock();
SetStatusText(TranslateT(JABBER_PL_BUSY_MSG));
@@ -1685,9 +1685,9 @@ void CJabberDlgPrivacyLists::btnSetDefault_OnClick(CCtrlButton *) XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListDefault, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList));
HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS);
- HXML defaultTag = query << XCHILD(_T("default"));
+ HXML defaultTag = query << XCHILD(L"default");
if (pList)
- XmlAddAttr(defaultTag, _T("name"), pList->GetListName());
+ XmlAddAttr(defaultTag, L"name", pList->GetListName());
lck.unlock();
SetStatusText(TranslateT(JABBER_PL_BUSY_MSG));
@@ -1766,7 +1766,7 @@ void CJabberDlgPrivacyLists::btnAddRule_OnClick(CCtrlButton*) CPrivacyList *pList = GetSelectedList(m_hwnd);
if (pList) {
- CPrivacyListRule* pRule = new CPrivacyListRule(m_proto, Jid, _T(""), FALSE);
+ CPrivacyListRule* pRule = new CPrivacyListRule(m_proto, Jid, L"", FALSE);
CJabberDlgPrivacyRule dlgPrivacyRule(m_proto, m_hwnd, pRule);
int nResult = dlgPrivacyRule.DoModal();
if (nResult) {
@@ -1917,38 +1917,38 @@ void CJabberDlgPrivacyLists::btnApply_OnClick(CCtrlButton *) XmlNodeIq iq(m_proto->AddIQ(&CJabberProto::OnIqResultPrivacyListModify, JABBER_IQ_TYPE_SET, NULL, 0, -1, pUserData));
HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS);
- HXML listTag = query << XCHILD(_T("list")) << XATTR(_T("name"), pList->GetListName());
+ HXML listTag = query << XCHILD(L"list") << XATTR(L"name", pList->GetListName());
while (pRule) {
- HXML itemTag = listTag << XCHILD(_T("item"));
+ HXML itemTag = listTag << XCHILD(L"item");
switch (pRule->GetType()) {
case Jid:
- itemTag << XATTR(_T("type"), _T("jid"));
+ itemTag << XATTR(L"type", L"jid");
break;
case Group:
- itemTag << XATTR(_T("type"), _T("group"));
+ itemTag << XATTR(L"type", L"group");
break;
case Subscription:
- itemTag << XATTR(_T("type"), _T("subscription"));
+ itemTag << XATTR(L"type", L"subscription");
break;
}
if (pRule->GetType() != Else)
- itemTag << XATTR(_T("value"), pRule->GetValue());
+ itemTag << XATTR(L"value", pRule->GetValue());
if (pRule->GetAction())
- itemTag << XATTR(_T("action"), _T("allow"));
+ itemTag << XATTR(L"action", L"allow");
else
- itemTag << XATTR(_T("action"), _T("deny"));
- itemTag << XATTRI(_T("order"), pRule->GetOrder());
+ itemTag << XATTR(L"action", L"deny");
+ itemTag << XATTRI(L"order", pRule->GetOrder());
DWORD dwPackets = pRule->GetPackets();
if (dwPackets != JABBER_PL_RULE_TYPE_ALL) {
if (dwPackets & JABBER_PL_RULE_TYPE_IQ)
- itemTag << XCHILD(_T("iq"));
+ itemTag << XCHILD(L"iq");
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_IN)
- itemTag << XCHILD(_T("presence-in"));
+ itemTag << XCHILD(L"presence-in");
if (dwPackets & JABBER_PL_RULE_TYPE_PRESENCE_OUT)
- itemTag << XCHILD(_T("presence-out"));
+ itemTag << XCHILD(L"presence-out");
if (dwPackets & JABBER_PL_RULE_TYPE_MESSAGE)
- itemTag << XCHILD(_T("message"));
+ itemTag << XCHILD(L"message");
}
pRule = pRule->GetNext();
}
@@ -2076,9 +2076,9 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList) XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultPrivacyListActive, JABBER_IQ_TYPE_SET, NULL, 0, -1, pList));
HXML query = iq << XQUERY(JABBER_FEAT_PRIVACY_LISTS);
- HXML active = query << XCHILD(_T("active"));
+ HXML active = query << XCHILD(L"active");
if (pList)
- active << XATTR(_T("name"), pList->GetListName());
+ active << XATTR(L"name", pList->GetListName());
lck.unlock();
m_ThreadInfo->send(iq);
diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h index 6c12682db2..6f48cebd11 100644 --- a/protocols/JabberG/src/jabber_privacy.h +++ b/protocols/JabberG/src/jabber_privacy.h @@ -58,7 +58,7 @@ class CPrivacyListRule protected:
friend class CPrivacyList;
public:
- CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = _T(""), BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0)
+ CPrivacyListRule(CJabberProto *ppro, PrivacyListRuleType type = Else, const TCHAR *szValue = L"", BOOL bAction = TRUE, DWORD dwOrder = 90, DWORD dwPackets = 0)
{
m_proto = ppro;
m_szValue = mir_tstrdup(szValue);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index b64ac73c55..96bbe0c424 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -147,7 +147,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : db_set_resident(m_szModuleName, "Grant");
if ((m_tszSelectedLang = getTStringA("XmlLang")) == NULL)
- m_tszSelectedLang = mir_tstrdup(_T("en"));
+ m_tszSelectedLang = mir_tstrdup(L"en");
}
CJabberProto::~CJabberProto()
@@ -297,7 +297,7 @@ int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM) MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
{
- debugLog(_T("AddToListByJID jid = %s"), newJid);
+ debugLog(L"AddToListByJID jid = %s", newJid);
MCONTACT hContact = DBCreateContact(newJid, NULL, true, false);
if (flags & PALF_TEMPORARY)
@@ -371,18 +371,18 @@ int CJabberProto::Authorize(MEVENT hDbEvent) char *lastName = firstName + mir_strlen(firstName) + 1;
char *jid = lastName + mir_strlen(lastName) + 1;
- debugLog(_T("Send 'authorization allowed' to %s"), jid);
+ debugLog(L"Send 'authorization allowed' to %s", jid);
TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid);
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), newJid) << XATTR(_T("type"), _T("subscribed")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", newJid) << XATTR(L"type", L"subscribed"));
// Automatically add this user to my roster if option is enabled
if (m_options.AutoAdd == TRUE) {
JABBER_LIST_ITEM *item;
if ((item = ListGetItemPtr(LIST_ROSTER, newJid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
- debugLog(_T("Try adding contact automatically jid = %s"), jid);
+ debugLog(L"Try adding contact automatically jid = %s", jid);
if (MCONTACT hContact = AddToListByJID(newJid, 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
@@ -430,7 +430,7 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) debugLogA("Send 'authorization denied' to %s", jid);
ptrT newJid(dbei.flags & DBEF_UTF ? mir_utf8decodeT(jid) : mir_a2t(jid));
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), newJid) << XATTR(_T("type"), _T("unsubscribed")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", newJid) << XATTR(L"type", L"unsubscribed"));
return 0;
}
@@ -502,16 +502,16 @@ int __cdecl CJabberProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR *) switch (ft->type) {
case FT_OOB:
- m_ThreadInfo->send(XmlNodeIq(_T("error"), ft->szId, ft->jid) << XCHILD(_T("error"), _T("File transfer refused")) << XATTRI(_T("code"), 406));
+ m_ThreadInfo->send(XmlNodeIq(L"error", ft->szId, ft->jid) << XCHILD(L"error", L"File transfer refused") << XATTRI(L"code", 406));
break;
case FT_BYTESTREAM:
case FT_IBB:
m_ThreadInfo->send(
- XmlNodeIq(_T("error"), ft->szId, ft->jid)
- << XCHILD(_T("error"), _T("File transfer refused")) << XATTRI(_T("code"), 403) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("forbidden"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"))
- << XCHILD(_T("text"), _T("File transfer refused")) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", ft->szId, ft->jid)
+ << XCHILD(L"error", L"File transfer refused") << XATTRI(L"code", 403) << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"forbidden", L"urn:ietf:params:xml:ns:xmpp-stanzas")
+ << XCHILD(L"text", L"File transfer refused") << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
break;
}
delete ft;
@@ -580,7 +580,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) if (m_ThreadInfo) {
m_ThreadInfo->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultEntityTime, JABBER_IQ_TYPE_GET, jid, JABBER_IQ_PARSE_HCONTACT))
- << XCHILDNS(_T("time"), JABBER_FEAT_ENTITY_TIME));
+ << XCHILDNS(L"time", JABBER_FEAT_ENTITY_TIME));
// XEP-0012, last logoff time
XmlNodeIq iq2(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, jid, JABBER_IQ_PARSE_FROM));
@@ -610,7 +610,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) for (int i = 0; i < item->arResources.getCount(); i++) {
pResourceStatus r(item->arResources[i]);
TCHAR tmp[JABBER_MAX_JID_LEN];
- mir_sntprintf(tmp, _T("%s/%s"), szBareJid, r->m_tszResourceName);
+ mir_sntprintf(tmp, L"%s/%s", szBareJid, r->m_tszResourceName);
if (r->m_jcbCachedCaps & JABBER_CAPS_DISCO_INFO) {
XmlNodeIq iq5(AddIQ(&CJabberProto::OnIqResultCapsDiscoInfoSI, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_HCONTACT));
@@ -661,8 +661,8 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) psr.cbSize = sizeof(psr);
psr.flags = PSR_TCHAR;
psr.nick.t = jsb->jid;
- psr.firstName.t = _T("");
- psr.lastName.t = _T("");
+ psr.firstName.t = L"";
+ psr.lastName.t = L"";
psr.id.t = jsb->jid;
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)jsb->hSearch, (LPARAM)&psr);
@@ -672,7 +672,7 @@ void __cdecl CJabberProto::BasicSearchThread(JABBER_SEARCH_BASIC *jsb) HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid)
{
- debugLog(_T("JabberBasicSearch called with lParam = '%s'"), szJid);
+ debugLog(L"JabberBasicSearch called with lParam = '%s'", szJid);
JABBER_SEARCH_BASIC *jsb;
if (!m_bJabberOnline || (jsb = (JABBER_SEARCH_BASIC*)mir_alloc(sizeof(JABBER_SEARCH_BASIC))) == NULL)
@@ -689,19 +689,19 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) mir_free(szServer);
szServer = getTStringA(NULL, "LoginServer");
if (szServer == NULL)
- szServer = mir_tstrdup(_T("jabber.org"));
- else if (numericjid && !mir_tstrcmpi(szServer, _T("S.ms"))) {
+ szServer = mir_tstrdup(L"jabber.org");
+ else if (numericjid && !mir_tstrcmpi(szServer, L"S.ms")) {
mir_free(szServer);
- szServer = mir_tstrdup(_T("sms"));
+ szServer = mir_tstrdup(L"sms");
}
- mir_sntprintf(jsb->jid, _T("%s@%s"), szJid, szServer);
+ mir_sntprintf(jsb->jid, L"%s@%s", szJid, szServer);
}
else _tcsncpy_s(jsb->jid, szJid, _TRUNCATE);
mir_free(szServer);
}
else _tcsncpy_s(jsb->jid, szJid, _TRUNCATE);
- debugLog(_T("Adding '%s' without validation"), jsb->jid);
+ debugLog(L"Adding '%s' without validation", jsb->jid);
jsb->hSearch = SerialNext();
ForkThread((MyThreadFunc)&CJabberProto::BasicSearchThread, jsb);
return (HANDLE)jsb->hSearch;
@@ -719,7 +719,7 @@ HANDLE __cdecl CJabberProto::SearchByEmail(const TCHAR *email) LPCSTR jid = szServerName == 0 ? "users.jabber.org" : szServerName;
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, _A2T(jid));
- m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(_T("jabber:iq:search")) << XCHILD(_T("email"), email));
+ m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(L"jabber:iq:search") << XCHILD(L"email", email));
return (HANDLE)pInfo->GetIqId();
}
@@ -739,31 +739,31 @@ HANDLE __cdecl CJabberProto::SearchByName(const TCHAR *nick, const TCHAR *firstN (bIsExtFormat) ? &CJabberProto::OnIqResultExtSearch : &CJabberProto::OnIqResultSetSearch,
JABBER_IQ_TYPE_SET, _A2T(szServerName == 0 ? "users.jabber.org" : szServerName));
XmlNodeIq iq(pInfo);
- HXML query = iq << XQUERY(_T("jabber:iq:search"));
+ HXML query = iq << XQUERY(L"jabber:iq:search");
if (bIsExtFormat) {
if (m_tszSelectedLang)
- iq << XATTR(_T("xml:lang"), m_tszSelectedLang);
+ iq << XATTR(L"xml:lang", m_tszSelectedLang);
- HXML x = query << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("submit"));
+ HXML x = query << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"submit");
if (nick[0] != '\0')
- x << XCHILD(_T("field")) << XATTR(_T("var"), _T("user")) << XATTR(_T("value"), nick);
+ x << XCHILD(L"field") << XATTR(L"var", L"user") << XATTR(L"value", nick);
if (firstName[0] != '\0')
- x << XCHILD(_T("field")) << XATTR(_T("var"), _T("fn")) << XATTR(_T("value"), firstName);
+ x << XCHILD(L"field") << XATTR(L"var", L"fn") << XATTR(L"value", firstName);
if (lastName[0] != '\0')
- x << XCHILD(_T("field")) << XATTR(_T("var"), _T("given")) << XATTR(_T("value"), lastName);
+ x << XCHILD(L"field") << XATTR(L"var", L"given") << XATTR(L"value", lastName);
}
else {
if (nick[0] != '\0')
- query << XCHILD(_T("nick"), nick);
+ query << XCHILD(L"nick", nick);
if (firstName[0] != '\0')
- query << XCHILD(_T("first"), firstName);
+ query << XCHILD(L"first", firstName);
if (lastName[0] != '\0')
- query << XCHILD(_T("last"), lastName);
+ query << XCHILD(L"last", lastName);
}
m_ThreadInfo->send(iq);
@@ -798,16 +798,16 @@ int __cdecl CJabberProto::SendContacts(MCONTACT hContact, int, int nContacts, MC if (~jcb & JABBER_CAPS_ROSTER_EXCHANGE)
return 0;
- XmlNode m(_T("message"));
- HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_ROSTER_EXCHANGE);
+ XmlNode m(L"message");
+ HXML x = m << XCHILDNS(L"x", JABBER_FEAT_ROSTER_EXCHANGE);
for (int i = 0; i < nContacts; i++) {
ptrT jid(getTStringA(hContactsList[i], "jid"));
if (jid != NULL)
- x << XCHILD(_T("item")) << XATTR(_T("action"), _T("add")) << XATTR(_T("jid"), jid);
+ x << XCHILD(L"item") << XATTR(L"action", L"add") << XATTR(L"jid", jid);
}
- m << XATTR(_T("to"), szClientJid) << XATTRID(SerialNext());
+ m << XATTR(L"to", szClientJid) << XATTRID(SerialNext());
m_ThreadInfo->send(m);
return 1;
}
@@ -873,7 +873,7 @@ HANDLE __cdecl CJabberProto::SendFile(MCONTACT hContact, const TCHAR *szDescript int i, j;
for (i = j = 0; i < ft->std.totalFiles; i++) {
if (_tstati64(ppszFiles[i], &statbuf))
- debugLog(_T("'%s' is an invalid filename"), ppszFiles[i]);
+ debugLog(L"'%s' is an invalid filename", ppszFiles[i]);
else {
ft->std.ptszFiles[j] = mir_tstrdup(ppszFiles[i]);
ft->fileSize[j] = statbuf.st_size;
@@ -954,16 +954,16 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) TCHAR *msgType;
if (ListGetItemPtr(LIST_CHATROOM, szClientJid) && _tcschr(szClientJid, '/') == NULL)
- msgType = _T("groupchat");
+ msgType = L"groupchat";
else
- msgType = _T("chat");
+ msgType = L"chat";
- XmlNode m(_T("message")); XmlAddAttr(m, _T("type"), msgType);
+ XmlNode m(L"message"); XmlAddAttr(m, L"type", msgType);
if (!isEncrypted)
- m << XCHILD(_T("body"), msg);
+ m << XCHILD(L"body", msg);
else {
- m << XCHILD(_T("body"), _T("[This message is encrypted.]"));
- m << XCHILD(_T("x"), msg) << XATTR(_T("xmlns"), _T("jabber:x:encrypted"));
+ m << XCHILD(L"body", L"[This message is encrypted.]");
+ m << XCHILD(L"x", msg) << XATTR(L"xmlns", L"jabber:x:encrypted");
}
mir_free(msg);
@@ -977,7 +977,7 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) jcb = JABBER_RESOURCE_CAPS_NONE;
if (jcb & JABBER_CAPS_CHATSTATES)
- m << XCHILDNS(_T("active"), JABBER_FEAT_CHATSTATES);
+ m << XCHILDNS(L"active", JABBER_FEAT_CHATSTATES);
if (
// if message delivery check disabled by entity caps manager
@@ -985,29 +985,29 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int, const char* pszSrc) // if client knows nothing about delivery
!(jcb & (JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_RECEIPTS)) ||
// if message sent to groupchat
- !mir_tstrcmp(msgType, _T("groupchat")) ||
+ !mir_tstrcmp(msgType, L"groupchat") ||
// if message delivery check disabled in settings
!m_options.MsgAck || !getByte(hContact, "MsgAck", TRUE))
{
- if (!mir_tstrcmp(msgType, _T("groupchat")))
- XmlAddAttr(m, _T("to"), szClientJid);
+ if (!mir_tstrcmp(msgType, L"groupchat"))
+ XmlAddAttr(m, L"to", szClientJid);
else {
id = SerialNext();
- XmlAddAttr(m, _T("to"), szClientJid); XmlAddAttrID(m, id);
+ XmlAddAttr(m, L"to", szClientJid); XmlAddAttrID(m, id);
}
m_ThreadInfo->send(m);
ForkThread(&CJabberProto::SendMessageAckThread, new TFakeAckParams(hContact, 0, id));
}
else {
- XmlAddAttr(m, _T("to"), szClientJid); XmlAddAttrID(m, id);
+ XmlAddAttr(m, L"to", szClientJid); XmlAddAttrID(m, id);
// message receipts XEP priority
if (jcb & JABBER_CAPS_MESSAGE_RECEIPTS)
- m << XCHILDNS(_T("request"), JABBER_FEAT_MESSAGE_RECEIPTS);
+ m << XCHILDNS(L"request", JABBER_FEAT_MESSAGE_RECEIPTS);
else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) {
- HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS);
- x << XCHILD(_T("delivered")); x << XCHILD(_T("offline"));
+ HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS);
+ x << XCHILD(L"delivered"); x << XCHILD(L"offline");
}
m_ThreadInfo->send(m);
@@ -1038,7 +1038,7 @@ int __cdecl CJabberProto::SetApparentMode(MCONTACT hContact, int mode) switch (mode) {
case ID_STATUS_ONLINE:
if (m_iStatus == ID_STATUS_INVISIBLE || oldMode == ID_STATUS_OFFLINE)
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), jid));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", jid));
break;
case ID_STATUS_OFFLINE:
if (m_iStatus != ID_STATUS_INVISIBLE || oldMode == ID_STATUS_ONLINE)
@@ -1124,11 +1124,11 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param) for (int i = 0; i < item->arResources.getCount(); i++) {
JABBER_RESOURCE_STATUS *r = item->arResources[i];
if (r->m_tszStatusMessage) {
- if (str[0] != '\0') mir_tstrcat(str, _T("\r\n"));
+ if (str[0] != '\0') mir_tstrcat(str, L"\r\n");
if (msgCount > 1) {
- mir_tstrcat(str, _T("("));
+ mir_tstrcat(str, L"(");
mir_tstrcat(str, r->m_tszResourceName);
- mir_tstrcat(str, _T("): "));
+ mir_tstrcat(str, L"): ");
}
mir_tstrcat(str, r->m_tszStatusMessage);
}
@@ -1162,7 +1162,7 @@ HANDLE __cdecl CJabberProto::GetAwayMsg(MCONTACT hContact) int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg)
{
- debugLog(_T("SetAwayMsg called, wParam=%d lParam=%s"), status, msg);
+ debugLog(L"SetAwayMsg called, wParam=%d lParam=%s", status, msg);
TCHAR **szMsg;
mir_cslockfull lck(m_csModeMsgMutex);
@@ -1229,32 +1229,32 @@ int __cdecl CJabberProto::UserIsTyping(MCONTACT hContact, int type) if (jcb & JABBER_RESOURCE_CAPS_ERROR)
jcb = JABBER_RESOURCE_CAPS_NONE;
- XmlNode m(_T("message")); XmlAddAttr(m, _T("to"), szClientJid);
+ XmlNode m(L"message"); XmlAddAttr(m, L"to", szClientJid);
if (jcb & JABBER_CAPS_CHATSTATES) {
- m << XATTR(_T("type"), _T("chat")) << XATTRID(SerialNext());
+ m << XATTR(L"type", L"chat") << XATTRID(SerialNext());
switch (type) {
case PROTOTYPE_SELFTYPING_OFF:
- m << XCHILDNS(_T("paused"), JABBER_FEAT_CHATSTATES);
+ m << XCHILDNS(L"paused", JABBER_FEAT_CHATSTATES);
m_ThreadInfo->send(m);
break;
case PROTOTYPE_SELFTYPING_ON:
- m << XCHILDNS(_T("composing"), JABBER_FEAT_CHATSTATES);
+ m << XCHILDNS(L"composing", JABBER_FEAT_CHATSTATES);
m_ThreadInfo->send(m);
break;
}
}
else if (jcb & JABBER_CAPS_MESSAGE_EVENTS) {
- HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS);
+ HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS);
if (item->messageEventIdStr != NULL)
- x << XCHILD(_T("id"), item->messageEventIdStr);
+ x << XCHILD(L"id", item->messageEventIdStr);
switch (type) {
case PROTOTYPE_SELFTYPING_OFF:
m_ThreadInfo->send(m);
break;
case PROTOTYPE_SELFTYPING_ON:
- x << XCHILD(_T("composing"));
+ x << XCHILD(L"composing");
m_ThreadInfo->send(m);
break;
}
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 492d24b3df..c851f55959 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -36,7 +36,7 @@ CJabberAdhocSession::CJabberAdhocSession(CJabberProto* global) m_bAutofreeUserData = FALSE;
m_dwStage = 0;
ppro = global;
- m_szSessionId.Format(_T("%u%u"), ppro->SerialNext(), GetTickCount());
+ m_szSessionId.Format(L"%u%u", ppro->SerialNext(), GetTickCount());
m_dwStartTime = GetTickCount();
}
@@ -58,7 +58,7 @@ BOOL CJabberProto::HandleAdhocCommandRequest(HXML iqNode, CJabberIqInfo *pInfo) return TRUE;
}
- const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), _T("node"));
+ const TCHAR *szNode = XmlGetAttrValue(pInfo->GetChildNode(), L"node");
if (!szNode)
return TRUE;
@@ -72,8 +72,8 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T return FALSE;
if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
- XmlNodeIq iq(_T("result"), pInfo);
- HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
+ XmlNodeIq iq(L"result", pInfo);
+ HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(L"node", JABBER_FEAT_COMMANDS);
{
mir_cslock lck(m_cs);
@@ -83,8 +83,8 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T if (!szJid)
szJid = m_pProto->m_ThreadInfo->fullJID;
- resultQuery << XCHILD(_T("item")) << XATTR(_T("jid"), szJid)
- << XATTR(_T("node"), pNode->GetNode()) << XATTR(_T("name"), pNode->GetName());
+ resultQuery << XCHILD(L"item") << XATTR(L"jid", szJid)
+ << XATTR(L"node", pNode->GetNode()) << XATTR(L"name", pNode->GetName());
pNode = pNode->GetNext();
}
@@ -103,15 +103,15 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC // FIXME: same code twice
if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
- XmlNodeIq iq(_T("result"), pInfo);
- HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
- resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), _T("Ad-hoc commands"))
- << XATTR(_T("category"), _T("automation")) << XATTR(_T("type"), _T("command-node"));
+ XmlNodeIq iq(L"result", pInfo);
+ HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", JABBER_FEAT_COMMANDS);
+ resultQuery << XCHILD(L"identity") << XATTR(L"name", L"Ad-hoc commands")
+ << XATTR(L"category", L"automation") << XATTR(L"type", L"command-node");
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_COMMANDS);
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DATA_FORMS);
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_INFO);
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_ITEMS);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_COMMANDS);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DATA_FORMS);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_INFO);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_ITEMS);
m_pProto->m_ThreadInfo->send(iq);
return TRUE;
@@ -122,14 +122,14 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC if (pNode == NULL)
return FALSE;
- XmlNodeIq iq(_T("result"), pInfo);
- HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_DISCO_INFO);
- resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), pNode->GetName())
- << XATTR(_T("category"), _T("automation")) << XATTR(_T("type"), _T("command-node"));
+ XmlNodeIq iq(L"result", pInfo);
+ HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(L"node", JABBER_FEAT_DISCO_INFO);
+ resultQuery << XCHILD(L"identity") << XATTR(L"name", pNode->GetName())
+ << XATTR(L"category", L"automation") << XATTR(L"type", L"command-node");
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_COMMANDS);
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DATA_FORMS);
- resultQuery << XCHILD(_T("feature")) << XATTR(_T("var"), JABBER_FEAT_DISCO_INFO);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_COMMANDS);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DATA_FORMS);
+ resultQuery << XCHILD(L"feature") << XATTR(L"var", JABBER_FEAT_DISCO_INFO);
lck.unlock();
m_pProto->m_ThreadInfo->send(iq);
return TRUE;
@@ -147,14 +147,14 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo lck.unlock();
m_pProto->m_ThreadInfo->send(
- XmlNodeIq(_T("error"), pInfo)
- << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", pInfo)
+ << XCHILD(L"error") << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return FALSE;
}
- const TCHAR *szSessionId = XmlGetAttrValue(commandNode, _T("sessionid"));
+ const TCHAR *szSessionId = XmlGetAttrValue(commandNode, L"sessionid");
CJabberAdhocSession* pSession = NULL;
if (szSessionId) {
@@ -162,10 +162,10 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo if (!pSession) {
lck.unlock();
- XmlNodeIq iq(_T("error"), pInfo);
- HXML errorNode = iq << XCHILD(_T("error")) << XATTR(_T("type"), _T("modify"));
- errorNode << XCHILDNS(_T("bad-request"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- errorNode << XCHILDNS(_T("bad-sessionid"), JABBER_FEAT_COMMANDS);
+ XmlNodeIq iq(L"error", pInfo);
+ HXML errorNode = iq << XCHILD(L"error") << XATTR(L"type", L"modify");
+ errorNode << XCHILDNS(L"bad-request", L"urn:ietf:params:xml:ns:xmpp-stanzas");
+ errorNode << XCHILDNS(L"bad-sessionid", JABBER_FEAT_COMMANDS);
m_pProto->m_ThreadInfo->send(iq);
return FALSE;
}
@@ -177,9 +177,9 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo lck.unlock();
m_pProto->m_ThreadInfo->send(
- XmlNodeIq(_T("error"), pInfo)
- << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("forbidden"), _T("urn:ietf:params:xml:ns:xmpp-stanzas")));
+ XmlNodeIq(L"error", pInfo)
+ << XCHILD(L"error") << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"forbidden", L"urn:ietf:params:xml:ns:xmpp-stanzas"));
return FALSE;
}
@@ -190,20 +190,20 @@ BOOL CJabberAdhocManager::HandleCommandRequest(HXML iqNode, CJabberIqInfo *pInfo if (nResultCode == JABBER_ADHOC_HANDLER_STATUS_COMPLETED) {
m_pProto->m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), szNode)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
- << XCHILD(_T("note"), TranslateT("Command completed successfully")) << XATTR(_T("type"), _T("info")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", szNode)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed")
+ << XCHILD(L"note", TranslateT("Command completed successfully")) << XATTR(L"type", L"info"));
RemoveSession(pSession);
pSession = NULL;
}
else if (nResultCode == JABBER_ADHOC_HANDLER_STATUS_CANCEL) {
m_pProto->m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), szNode)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("canceled"))
- << XCHILD(_T("note"), TranslateT("Error occurred during processing command")) << XATTR(_T("type"), _T("error")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", szNode)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"canceled")
+ << XCHILD(L"note", TranslateT("Error occurred during processing command")) << XATTR(L"type", L"error"));
RemoveSession(pSession);
pSession = NULL;
@@ -257,74 +257,74 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc // first form
pSession->SetStage(1);
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML xNode = iq
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_SET_STATUS)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_SET_STATUS)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing")
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form");
- xNode << XCHILD(_T("title"), TranslateT("Change Status"));
- xNode << XCHILD(_T("instructions"), TranslateT("Choose the status and status message"));
+ xNode << XCHILD(L"title", TranslateT("Change Status"));
+ xNode << XCHILD(L"instructions", TranslateT("Choose the status and status message"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
- << XATTR(_T("value"), JABBER_FEAT_RC);
+ xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE")
+ << XATTR(L"value", JABBER_FEAT_RC);
- HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status"))
- << XATTR(_T("type"), _T("list-single")) << XATTR(_T("var"), _T("status"));
+ HXML fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Status"))
+ << XATTR(L"type", L"list-single") << XATTR(L"var", L"status");
- fieldNode << XCHILD(_T("required"));
+ fieldNode << XCHILD(L"required");
int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
switch (status) {
case ID_STATUS_INVISIBLE:
- fieldNode << XCHILD(_T("value"), _T("invisible"));
+ fieldNode << XCHILD(L"value", L"invisible");
break;
case ID_STATUS_AWAY:
case ID_STATUS_ONTHEPHONE:
case ID_STATUS_OUTTOLUNCH:
- fieldNode << XCHILD(_T("value"), _T("away"));
+ fieldNode << XCHILD(L"value", L"away");
break;
case ID_STATUS_NA:
- fieldNode << XCHILD(_T("value"), _T("xa"));
+ fieldNode << XCHILD(L"value", L"xa");
break;
case ID_STATUS_DND:
case ID_STATUS_OCCUPIED:
- fieldNode << XCHILD(_T("value"), _T("dnd"));
+ fieldNode << XCHILD(L"value", L"dnd");
break;
case ID_STATUS_FREECHAT:
- fieldNode << XCHILD(_T("value"), _T("chat"));
+ fieldNode << XCHILD(L"value", L"chat");
break;
case ID_STATUS_ONLINE:
default:
- fieldNode << XCHILD(_T("value"), _T("online"));
+ fieldNode << XCHILD(L"value", L"online");
break;
}
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Free for chat")) << XCHILD(_T("value"), _T("chat"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Online")) << XCHILD(_T("value"), _T("online"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Away")) << XCHILD(_T("value"), _T("away"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Extended away (Not available)")) << XCHILD(_T("value"), _T("xa"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Do not disturb")) << XCHILD(_T("value"), _T("dnd"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Invisible")) << XCHILD(_T("value"), _T("invisible"));
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), TranslateT("Offline")) << XCHILD(_T("value"), _T("offline"));
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Free for chat")) << XCHILD(L"value", L"chat");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Online")) << XCHILD(L"value", L"online");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Away")) << XCHILD(L"value", L"away");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Extended away (Not available)")) << XCHILD(L"value", L"xa");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Do not disturb")) << XCHILD(L"value", L"dnd");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Invisible")) << XCHILD(L"value", L"invisible");
+ fieldNode << XCHILD(L"option") << XATTR(L"label", TranslateT("Offline")) << XCHILD(L"value", L"offline");
// priority
TCHAR szPriority[ 256 ];
- mir_sntprintf(szPriority, _T("%d"), (int)getDword("Priority", 5));
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Priority")) << XATTR(_T("type"), _T("text-single"))
- << XATTR(_T("var"), _T("status-priority")) << XCHILD(_T("value"), szPriority);
+ mir_sntprintf(szPriority, L"%d", (int)getDword("Priority", 5));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Priority")) << XATTR(L"type", L"text-single")
+ << XATTR(L"var", L"status-priority") << XCHILD(L"value", szPriority);
// status message text
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Status message"))
- << XATTR(_T("type"), _T("text-multi")) << XATTR(_T("var"), _T("status-message"));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Status message"))
+ << XATTR(L"type", L"text-multi") << XATTR(L"var", L"status-message");
// global status
- fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Change global status"))
- << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("status-global"));
+ fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Change global status"))
+ << XATTR(L"type", L"boolean") << XATTR(L"var", L"status-global");
ptrT tszStatusMsg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, status, 0));
if (tszStatusMsg)
- fieldNode << XCHILD(_T("value"), tszStatusMsg);
+ fieldNode << XCHILD(L"value", tszStatusMsg);
m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -337,7 +337,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc if (!xNode)
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
- HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status")), valueNode;
+ HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status"), valueNode;
if (!fieldNode)
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
@@ -346,19 +346,19 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int status;
- if (!mir_tstrcmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY;
- else if (!mir_tstrcmp(ptszValue, _T("xa"))) status = ID_STATUS_NA;
- else if (!mir_tstrcmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND;
- else if (!mir_tstrcmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT;
- else if (!mir_tstrcmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE;
- else if (!mir_tstrcmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE;
- else if (!mir_tstrcmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE;
+ if (!mir_tstrcmp(ptszValue, L"away")) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszValue, L"xa")) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszValue, L"dnd")) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszValue, L"chat")) status = ID_STATUS_FREECHAT;
+ else if (!mir_tstrcmp(ptszValue, L"online")) status = ID_STATUS_ONLINE;
+ else if (!mir_tstrcmp(ptszValue, L"invisible")) status = ID_STATUS_INVISIBLE;
+ else if (!mir_tstrcmp(ptszValue, L"offline")) status = ID_STATUS_OFFLINE;
else
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int priority = -9999;
- fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-priority"));
+ fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-priority");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (ptszValue = XmlGetText(valueNode))
priority = _ttoi(ptszValue);
@@ -367,7 +367,7 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc setDword("Priority", priority);
const TCHAR *szStatusMessage = NULL;
- fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-message"));
+ fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-message");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
szStatusMessage = XmlGetText(valueNode);
@@ -375,9 +375,9 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc int nNoDlg = db_get_b(NULL, "SRAway", StatusModeToDbSetting(status, "NoDlg"), 0);
db_set_b(NULL, "SRAway", StatusModeToDbSetting(status, "NoDlg"), 1);
- db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), szStatusMessage ? szStatusMessage : _T(""));
+ db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Msg"), szStatusMessage ? szStatusMessage : L"");
- fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("status-global"));
+ fieldNode = XmlGetChildByTag(xNode, "field", "var", L"status-global");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value"))) {
if ((ptszValue = XmlGetText(valueNode)) != NULL && _ttoi(ptszValue))
CallService(MS_CLIST_SETSTATUSMODE, status, NULL);
@@ -400,32 +400,32 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe // first form
pSession->SetStage(1);
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML xNode = iq
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_SET_OPTIONS)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_SET_OPTIONS)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing")
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form");
- xNode << XCHILD(_T("title"), TranslateT("Set Options"));
- xNode << XCHILD(_T("instructions"), TranslateT("Set the desired options"));
+ xNode << XCHILD(L"title", TranslateT("Set Options"));
+ xNode << XCHILD(L"instructions", TranslateT("Set the desired options"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
- << XATTR(_T("value"), JABBER_FEAT_RC);
+ xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE")
+ << XATTR(L"value", JABBER_FEAT_RC);
// Automatically Accept File Transfers
TCHAR szTmpBuff[ 1024 ];
- mir_sntprintf(szTmpBuff, _T("%d"), db_get_b(NULL, "SRFile", "AutoAccept", 0));
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Automatically Accept File Transfers"))
- << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("auto-files")) << XCHILD(_T("value"), szTmpBuff);
+ mir_sntprintf(szTmpBuff, L"%d", db_get_b(NULL, "SRFile", "AutoAccept", 0));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Automatically Accept File Transfers"))
+ << XATTR(L"type", L"boolean") << XATTR(L"var", L"auto-files") << XCHILD(L"value", szTmpBuff);
// Use sounds
- mir_sntprintf(szTmpBuff, _T("%d"), db_get_b(NULL, "Skin", "UseSound", 0));
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Play sounds"))
- << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("sounds")) << XCHILD(_T("value"), szTmpBuff);
+ mir_sntprintf(szTmpBuff, L"%d", db_get_b(NULL, "Skin", "UseSound", 0));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Play sounds"))
+ << XATTR(L"type", L"boolean") << XATTR(L"var", L"sounds") << XCHILD(L"value", szTmpBuff);
// Disable remote controlling
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Disable remote controlling (check twice what you are doing)"))
- << XATTR(_T("type"), _T("boolean")) << XATTR(_T("var"), _T("enable-rc")) << XCHILD(_T("value"), _T("0"));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Disable remote controlling (check twice what you are doing)"))
+ << XATTR(L"type", L"boolean") << XATTR(L"var", L"enable-rc") << XCHILD(L"value", L"0");
m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -439,19 +439,19 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
// Automatically Accept File Transfers
- HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("auto-files")), valueNode;
+ HXML fieldNode = XmlGetChildByTag(xNode, "field", "var", L"auto-files"), valueNode;
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (XmlGetText(valueNode))
db_set_b(NULL, "SRFile", "AutoAccept", (BYTE)_ttoi(XmlGetText(valueNode)));
// Use sounds
- fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("sounds"));
+ fieldNode = XmlGetChildByTag(xNode, "field", "var", L"sounds");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (XmlGetText(valueNode))
db_set_b(NULL, "Skin", "UseSound", (BYTE)_ttoi(XmlGetText(valueNode)));
// Disable remote controlling
- fieldNode = XmlGetChildByTag(xNode, "field", "var", _T("enable-rc"));
+ fieldNode = XmlGetChildByTag(xNode, "field", "var", L"enable-rc");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (XmlGetText(valueNode) && _ttoi(XmlGetText(valueNode)))
m_options.EnableRemoteControl = 0;
@@ -498,10 +498,10 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe mir_sntprintf(szMsg, TranslateT("There is no messages to forward"));
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
- << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed")
+ << XCHILD(L"note", szMsg) << XATTR(L"type", L"info"));
return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION;
}
@@ -509,24 +509,24 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe // first form
pSession->SetStage(1);
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML xNode = iq
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing")
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form");
- xNode << XCHILD(_T("title"), TranslateT("Forward options"));
+ xNode << XCHILD(L"title", TranslateT("Forward options"));
mir_sntprintf(szMsg, TranslateT("%d message(s) to be forwarded"), nUnreadEvents);
- xNode << XCHILD(_T("instructions"), szMsg);
+ xNode << XCHILD(L"instructions", szMsg);
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
- << XCHILD(_T("value"), JABBER_FEAT_RC);
+ xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE")
+ << XCHILD(L"value", JABBER_FEAT_RC);
// remove clist events
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), TranslateT("Mark messages as read")) << XATTR(_T("type"), _T("boolean"))
- << XATTR(_T("var"), _T("remove-clist-events")) << XCHILD(_T("value"),
- m_options.RcMarkMessagesAsRead == 1 ? _T("1") : _T("0"));
+ xNode << XCHILD(L"field") << XATTR(L"label", TranslateT("Mark messages as read")) << XATTR(L"type", L"boolean")
+ << XATTR(L"var", L"remove-clist-events") << XCHILD(L"value",
+ m_options.RcMarkMessagesAsRead == 1 ? L"1" : L"0");
m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -542,7 +542,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe BOOL bRemoveCListEvents = TRUE;
// remove clist events
- HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("remove-clist-events")), valueNode;
+ HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", L"remove-clist-events"), valueNode;
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (XmlGetText(valueNode) && !_ttoi(XmlGetText(valueNode)))
bRemoveCListEvents = FALSE;
@@ -573,29 +573,29 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe if (szEventText == NULL)
continue;
- XmlNode msg(_T("message"));
- msg << XATTR(_T("to"), pInfo->GetFrom()) << XATTRID(SerialNext())
- << XCHILD(_T("body"), szEventText);
+ XmlNode msg(L"message");
+ msg << XATTR(L"to", pInfo->GetFrom()) << XATTRID(SerialNext())
+ << XCHILD(L"body", szEventText);
- HXML addressesNode = msg << XCHILDNS(_T("addresses"), JABBER_FEAT_EXT_ADDRESSING);
+ HXML addressesNode = msg << XCHILDNS(L"addresses", JABBER_FEAT_EXT_ADDRESSING);
TCHAR szOFrom[JABBER_MAX_JID_LEN];
size_t cbBlob = mir_strlen((LPSTR)dbei.pBlob)+1;
if (cbBlob < dbei.cbBlob) { // rest of message contains a sender's resource
ptrT szOResource( mir_utf8decodeT((LPSTR)dbei.pBlob + cbBlob+1));
- mir_sntprintf(szOFrom, _T("%s/%s"), tszJid, szOResource);
+ mir_sntprintf(szOFrom, L"%s/%s", tszJid, szOResource);
} else
_tcsncpy_s(szOFrom, tszJid, _TRUNCATE);
- addressesNode << XCHILD(_T("address")) << XATTR(_T("type"), _T("ofrom")) << XATTR(_T("jid"), szOFrom);
- addressesNode << XCHILD(_T("address")) << XATTR(_T("type"), _T("oto")) << XATTR(_T("jid"), m_ThreadInfo->fullJID);
+ addressesNode << XCHILD(L"address") << XATTR(L"type", L"ofrom") << XATTR(L"jid", szOFrom);
+ addressesNode << XCHILD(L"address") << XATTR(L"type", L"oto") << XATTR(L"jid", m_ThreadInfo->fullJID);
time_t ltime = (time_t)dbei.timestamp;
struct tm *gmt = gmtime(<ime);
TCHAR stime[512];
- mir_sntprintf(stime, _T("%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ"), gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday,
+ mir_sntprintf(stime, L"%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ", gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday,
gmt->tm_hour, gmt->tm_min, gmt->tm_sec);
- msg << XCHILDNS(_T("delay"), _T("urn:xmpp:delay")) << XATTR(_T("stamp"), stime);
+ msg << XCHILDNS(L"delay", L"urn:xmpp:delay") << XATTR(L"stamp", stime);
m_ThreadInfo->send(msg);
@@ -610,10 +610,10 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe mir_sntprintf(szMsg, TranslateT("%d message(s) forwarded"), nEventsSent);
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_FORWARD)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
- << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_FORWARD)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed")
+ << XCHILD(L"note", szMsg) << XATTR(L"type", L"info"));
return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION;
}
@@ -632,10 +632,10 @@ int CJabberProto::AdhocLockWSHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSes mir_sntprintf(szMsg, TranslateT("Error %d occurred during workstation lock"), GetLastError());
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_WS_LOCK)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
- << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), bOk ? _T("info") : _T("error")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_WS_LOCK)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed")
+ << XCHILD(L"note", szMsg) << XATTR(L"type", bOk ? L"info" : L"error"));
return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION;
}
@@ -651,21 +651,21 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo *pInfo, CJabberAdh // first form
pSession->SetStage(1);
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML xNode = iq
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_QUIT_MIRANDA)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_QUIT_MIRANDA)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing")
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form");
- xNode << XCHILD(_T("title"), TranslateT("Confirmation needed"));
- xNode << XCHILD(_T("instructions"), TranslateT("Please confirm Miranda NG shutdown"));
+ xNode << XCHILD(L"title", TranslateT("Confirmation needed"));
+ xNode << XCHILD(L"instructions", TranslateT("Please confirm Miranda NG shutdown"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
- << XCHILD(_T("value"), JABBER_FEAT_RC);
+ xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE")
+ << XCHILD(L"value", JABBER_FEAT_RC);
// I Agree checkbox
- xNode << XCHILD(_T("field")) << XATTR(_T("label"), _T("I agree")) << XATTR(_T("type"), _T("boolean"))
- << XATTR(_T("var"), _T("allow-shutdown")) << XCHILD(_T("value"), _T("0"));
+ xNode << XCHILD(L"field") << XATTR(L"label", L"I agree") << XATTR(L"type", L"boolean")
+ << XATTR(L"var", L"allow-shutdown") << XCHILD(L"value", L"0");
m_ThreadInfo->send(iq);
return JABBER_ADHOC_HANDLER_STATUS_EXECUTING;
@@ -681,7 +681,7 @@ int CJabberProto::AdhocQuitMirandaHandler(HXML, CJabberIqInfo *pInfo, CJabberAdh HXML fieldNode, valueNode;
// I Agree checkbox
- fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("allow-shutdown"));
+ fieldNode = XmlGetChildByTag(xNode,"field", "var", L"allow-shutdown");
if (fieldNode && (valueNode = XmlGetChild(fieldNode , "value")))
if (XmlGetText(valueNode) && _ttoi(XmlGetText(valueNode)))
CallFunctionAsync(JabberQuitMirandaIMThread, 0);
@@ -712,38 +712,38 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe mir_sntprintf(szMsg, TranslateT("There is no group chats to leave"));
m_ThreadInfo->send(
- XmlNodeIq(_T("result"), pInfo)
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_LEAVE_GROUPCHATS)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("completed"))
- << XCHILD(_T("note"), szMsg) << XATTR(_T("type"), _T("info")));
+ XmlNodeIq(L"result", pInfo)
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_LEAVE_GROUPCHATS)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"completed")
+ << XCHILD(L"note", szMsg) << XATTR(L"type", L"info"));
return JABBER_ADHOC_HANDLER_STATUS_REMOVE_SESSION;
}
pSession->SetStage(1);
- XmlNodeIq iq(_T("result"), pInfo);
+ XmlNodeIq iq(L"result", pInfo);
HXML xNode = iq
- << XCHILDNS(_T("command"), JABBER_FEAT_COMMANDS) << XATTR(_T("node"), JABBER_FEAT_RC_LEAVE_GROUPCHATS)
- << XATTR(_T("sessionid"), pSession->GetSessionId()) << XATTR(_T("status"), _T("executing"))
- << XCHILDNS(_T("x"), JABBER_FEAT_DATA_FORMS) << XATTR(_T("type"), _T("form"));
+ << XCHILDNS(L"command", JABBER_FEAT_COMMANDS) << XATTR(L"node", JABBER_FEAT_RC_LEAVE_GROUPCHATS)
+ << XATTR(L"sessionid", pSession->GetSessionId()) << XATTR(L"status", L"executing")
+ << XCHILDNS(L"x", JABBER_FEAT_DATA_FORMS) << XATTR(L"type", L"form");
- xNode << XCHILD(_T("title"), TranslateT("Leave group chats"));
- xNode << XCHILD(_T("instructions"), TranslateT("Choose the group chats you want to leave"));
+ xNode << XCHILD(L"title", TranslateT("Leave group chats"));
+ xNode << XCHILD(L"instructions", TranslateT("Choose the group chats you want to leave"));
- xNode << XCHILD(_T("field")) << XATTR(_T("type"), _T("hidden")) << XATTR(_T("var"), _T("FORM_TYPE"))
- << XATTR(_T("value"), JABBER_FEAT_RC);
+ xNode << XCHILD(L"field") << XATTR(L"type", L"hidden") << XATTR(L"var", L"FORM_TYPE")
+ << XATTR(L"value", JABBER_FEAT_RC);
// Groupchats
- HXML fieldNode = xNode << XCHILD(_T("field")) << XATTR(_T("label"), NULL) << XATTR(_T("type"), _T("list-multi")) << XATTR(_T("var"), _T("groupchats"));
- fieldNode << XCHILD(_T("required"));
+ HXML fieldNode = xNode << XCHILD(L"field") << XATTR(L"label", NULL) << XATTR(L"type", L"list-multi") << XATTR(L"var", L"groupchats");
+ fieldNode << XCHILD(L"required");
{
mir_cslock lck(m_csLists);
LISTFOREACH_NODEF(i, this, LIST_CHATROOM)
{
JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
if (item != NULL)
- fieldNode << XCHILD(_T("option")) << XATTR(_T("label"), item->jid) << XCHILD(_T("value"), item->jid);
+ fieldNode << XCHILD(L"option") << XATTR(L"label", item->jid) << XCHILD(L"value", item->jid);
}
}
@@ -759,11 +759,11 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
// Groupchat list here:
- HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", _T("groupchats"));
+ HXML fieldNode = XmlGetChildByTag(xNode,"field", "var", L"groupchats");
if (fieldNode) {
for (i=0; i < XmlGetChildCount(fieldNode); i++) {
HXML valueNode = XmlGetChild(fieldNode, i);
- if (valueNode && XmlGetName(valueNode) && XmlGetText(valueNode) && !mir_tstrcmp(XmlGetName(valueNode), _T("value"))) {
+ if (valueNode && XmlGetName(valueNode) && XmlGetText(valueNode) && !mir_tstrcmp(XmlGetName(valueNode), L"value")) {
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, XmlGetText(valueNode));
if (item)
GcQuit(item, 0, NULL);
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index fde6109462..3c033d178c 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -105,8 +105,8 @@ static int JabberSearchAddField(HWND hwndDlg, Data* FieldDat) int Order = (FieldDat->bHidden) ? -1 : FieldDat->Order; - HWND hwndLabel = CreateWindowEx(0, _T("STATIC"), (LPCTSTR)TranslateTS(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, NULL, hInst, 0); - HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, _T("EDIT"), (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, NULL, hInst, 0); + HWND hwndLabel = CreateWindowEx(0, L"STATIC", (LPCTSTR)TranslateTS(FieldDat->Label), WS_CHILD, CornerX, CornerY + Order * 40, width, 13, hwndParent, NULL, hInst, 0); + HWND hwndVar = CreateWindowEx(0 | WS_EX_CLIENTEDGE, L"EDIT", (LPCTSTR)FieldDat->defValue, WS_CHILD | WS_TABSTOP, CornerX + 5, CornerY + Order * 40 + 14, width, 20, hwndParent, NULL, hInst, 0); SendMessage(hwndLabel, WM_SETFONT, (WPARAM)hFont, 0); SendMessage(hwndVar, WM_SETFONT, (WPARAM)hFont, 0); if (!FieldDat->bHidden) { @@ -137,19 +137,19 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!searchHandleDlg) return; - LPCTSTR type = XmlGetAttrValue(iqNode, _T("type")); + LPCTSTR type = XmlGetAttrValue(iqNode, L"type"); if (type == NULL) return; - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetNthChild(iqNode, _T("query"), 1); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetNthChild(iqNode, L"query", 1); HXML xNode = XmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); ShowWindow(searchHandleDlg, SW_HIDE); if (xNode) { //1. Form PostMessage(searchHandleDlg, WM_USER + 11, (WPARAM)xmlCopyNode(xNode), 0); - HXML xcNode = XmlGetNthChild(xNode, _T("instructions"), 1); + HXML xcNode = XmlGetNthChild(xNode, L"instructions", 1); if (xcNode) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, XmlGetText(xcNode)); } @@ -160,7 +160,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!chNode) break; - if (!mir_tstrcmpi(XmlGetName(chNode), _T("instructions")) && XmlGetText(chNode)) + if (!mir_tstrcmpi(XmlGetName(chNode), L"instructions") && XmlGetText(chNode)) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, TranslateTS(XmlGetText(chNode))); else if (XmlGetName(chNode)) { Data *MyData = (Data*)malloc(sizeof(Data)); @@ -177,22 +177,22 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) } } - const TCHAR *szFrom = XmlGetAttrValue(iqNode, _T("from")); + const TCHAR *szFrom = XmlGetAttrValue(iqNode, L"from"); if (szFrom) SearchAddToRecent(szFrom, searchHandleDlg); PostMessage(searchHandleDlg, WM_USER + 10, 0, 0); ShowWindow(searchHandleDlg, SW_SHOW); } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { const TCHAR *code = NULL; const TCHAR *description = NULL; TCHAR buff[255]; HXML errorNode = XmlGetChild(iqNode, "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s\r\nPlease select other server"), code ? code : _T(""), description ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s\r\nPlease select other server"), code ? code : L"", description ? description : L""); SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, buff); } else SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, TranslateT("Error: unknown reply received\r\nPlease select other server")); @@ -203,7 +203,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) // The pmFields is the pointer to map of <field Name, field Label> Not unical but ordered // This can help to made result parser routines more simple -static TCHAR *nickfields[] = { _T("nick"), _T("nickname"), _T("fullname"), _T("name"), _T("given"), _T("first"), _T("jid"), NULL }; +static TCHAR *nickfields[] = { L"nick", L"nickname", L"fullname", L"name", L"given", L"first", L"jid", NULL }; void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_MAP * pmAllFields) { @@ -260,8 +260,8 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M for (int j = 0; j < nFieldCount; j++) { TCHAR *var = ListOfFields[j]; TCHAR *value = pmUserData->operator [](var); - Results.pszFields[j] = value ? value : (TCHAR *)_T(" "); - if (!mir_tstrcmpi(var, _T("jid")) && value) + Results.pszFields[j] = value ? value : (TCHAR *)L" "; + if (!mir_tstrcmpi(var, L"jid") && value) Results.psr.id.t = value; } @@ -271,7 +271,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M if (nick) { if (mir_tstrcmpi(nick, Results.psr.id.t)) - mir_sntprintf(buff, _T("%s (%s)"), nick, Results.psr.id.t); + mir_sntprintf(buff, L"%s (%s)", nick, Results.psr.id.t); else _tcsncpy_s(buff, nick, _TRUNCATE); @@ -307,23 +307,23 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) U_TCHAR_MAP mColumnsNames(10); LIST<void> SearchResults(2); - if (((id = JabberGetPacketID(iqNode)) == -1) || ((type = XmlGetAttrValue(iqNode, _T("type"))) == NULL)) { + if (((id = JabberGetPacketID(iqNode)) == -1) || ((type = XmlGetAttrValue(iqNode, L"type")) == NULL)) { ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); return; } - if (!mir_tstrcmp(type, _T("result"))) { - HXML queryNode = XmlGetNthChild(iqNode, _T("query"), 1); + if (!mir_tstrcmp(type, L"result")) { + HXML queryNode = XmlGetNthChild(iqNode, L"query", 1); HXML xNode = XmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); if (xNode) { //1. Form search results info - HXML reportNode = XmlGetNthChild(xNode, _T("reported"), 1); + HXML reportNode = XmlGetNthChild(xNode, L"reported", 1); if (reportNode) { int i = 1; - while (HXML fieldNode = XmlGetNthChild(reportNode, _T("field"), i++)) { - TCHAR *var = (TCHAR*)XmlGetAttrValue(fieldNode, _T("var")); + while (HXML fieldNode = XmlGetNthChild(reportNode, L"field", i++)) { + TCHAR *var = (TCHAR*)XmlGetAttrValue(fieldNode, L"var"); if (var) { - TCHAR *Label = (TCHAR*)XmlGetAttrValue(fieldNode, _T("label")); + TCHAR *Label = (TCHAR*)XmlGetAttrValue(fieldNode, L"label"); mColumnsNames.insert(var, (Label != NULL) ? Label : var); } } @@ -331,12 +331,12 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) int i = 1; HXML itemNode; - while (itemNode = XmlGetNthChild(xNode, _T("item"), i++)) { + while (itemNode = XmlGetNthChild(xNode, L"item", i++)) { U_TCHAR_MAP *pUserColumn = new U_TCHAR_MAP(10); int j = 1; - while (HXML fieldNode = XmlGetNthChild(itemNode, _T("field"), j++)) { - if (TCHAR* var = (TCHAR*)XmlGetAttrValue(fieldNode, _T("var"))) { - if (TCHAR* Text = (TCHAR*)XmlGetText(XmlGetChild(fieldNode, _T("value")))) { + while (HXML fieldNode = XmlGetNthChild(itemNode, L"field", j++)) { + if (TCHAR* var = (TCHAR*)XmlGetAttrValue(fieldNode, L"var")) { + if (TCHAR* Text = (TCHAR*)XmlGetText(XmlGetChild(fieldNode, L"value"))) { if (!mColumnsNames[var]) mColumnsNames.insert(var, var); pUserColumn->insert(var, Text); @@ -350,14 +350,14 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) else { //2. Field list search results info int i = 1; - while (HXML itemNode = XmlGetNthChild(queryNode, _T("item"), i++)) { + while (HXML itemNode = XmlGetNthChild(queryNode, L"item", i++)) { U_TCHAR_MAP *pUserColumn = new U_TCHAR_MAP(10); - TCHAR *jid = (TCHAR*)XmlGetAttrValue(itemNode, _T("jid")); + TCHAR *jid = (TCHAR*)XmlGetAttrValue(itemNode, L"jid"); TCHAR *keyReturned; - mColumnsNames.insertCopyKey(_T("jid"), _T("jid"), &keyReturned, CopyKey, DestroyKey); - mColumnsNames.insert(_T("jid"), keyReturned); - pUserColumn->insertCopyKey(_T("jid"), jid, NULL, CopyKey, DestroyKey); + mColumnsNames.insertCopyKey(L"jid", L"jid", &keyReturned, CopyKey, DestroyKey); + mColumnsNames.insert(L"jid", keyReturned); + pUserColumn->insertCopyKey(L"jid", jid, NULL, CopyKey, DestroyKey); for (int j = 0;; j++) { HXML child = XmlGetChild(itemNode, j); @@ -368,7 +368,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) if (szColumnName) { LPCTSTR ptszChild = XmlGetText(child); if (ptszChild && *ptszChild) { - mColumnsNames.insertCopyKey((TCHAR*)szColumnName, _T(""), &keyReturned, CopyKey, DestroyKey); + mColumnsNames.insertCopyKey((TCHAR*)szColumnName, L"", &keyReturned, CopyKey, DestroyKey); mColumnsNames.insert((TCHAR*)szColumnName, keyReturned); pUserColumn->insertCopyKey((TCHAR*)szColumnName, (TCHAR*)ptszChild, NULL, CopyKey, DestroyKey); } @@ -379,17 +379,17 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) } } } - else if (!mir_tstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, L"error")) { const TCHAR *code = NULL; const TCHAR *description = NULL; TCHAR buff[255]; HXML errorNode = XmlGetChild(iqNode, "error"); if (errorNode) { - code = XmlGetAttrValue(errorNode, _T("code")); + code = XmlGetAttrValue(errorNode, L"code"); description = XmlGetText(errorNode); } - mir_sntprintf(buff, TranslateT("Error %s %s\r\nTry to specify more detailed"), code ? code : _T(""), description ? description : _T("")); + mir_sntprintf(buff, TranslateT("Error %s %s\r\nTry to specify more detailed"), code ? code : L"", description ? description : L""); ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); if (searchHandleDlg) SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, buff); @@ -477,7 +477,7 @@ int CJabberProto::SearchRenewFields(HWND hwndDlg, JabberSearchData *dat) searchHandleDlg = hwndDlg; CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetSearchFields, JABBER_IQ_TYPE_GET, szServerName); - m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(_T("jabber:iq:search"))); + m_ThreadInfo->send(XmlNodeIq(pInfo) << XQUERY(L"jabber:iq:search")); return pInfo->GetIqId(); } @@ -715,7 +715,7 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) { if (parent && hInst) { ptrT szServer(getTStringA("LoginServer")); - if (szServer == NULL || mir_tstrcmpi(szServer, _T("S.ms"))) + if (szServer == NULL || mir_tstrcmpi(szServer, L"S.ms")) return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, JabberSearchAdvancedDlgProc, (LPARAM)this); } @@ -748,10 +748,10 @@ HWND __cdecl CJabberProto::SearchAdvanced(HWND hwndDlg) // formating query CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultAdvancedSearch, JABBER_IQ_TYPE_SET, szServerName); XmlNodeIq iq(pInfo); - HXML query = iq << XQUERY(_T("jabber:iq:search")); + HXML query = iq << XQUERY(L"jabber:iq:search"); if (m_tszSelectedLang) - iq << XATTR(_T("xml:lang"), m_tszSelectedLang); // i'm sure :) + iq << XATTR(L"xml:lang", m_tszSelectedLang); // i'm sure :) // next can be 2 cases: // Forms: XEP-0055 Example 7 diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index b8247ac8f4..ef96830e7b 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -208,7 +208,7 @@ public: if (rv->_value)
return rv->_value;
else
- return _T("");
+ return L"";
}
else
return NULL;
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 66a879d302..1308ba8a40 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -36,11 +36,11 @@ TNtlmAuth::TNtlmAuth(ThreadData *info, const char* mechanism, const TCHAR *hostn const TCHAR *szProvider;
if (!mir_strcmp(mechanism, "GSS-SPNEGO"))
- szProvider = _T("Negotiate");
+ szProvider = L"Negotiate";
else if (!mir_strcmp(mechanism, "GSSAPI"))
- szProvider = _T("GSSAPI");
+ szProvider = L"GSSAPI";
else if (!mir_strcmp(mechanism, "NTLM"))
- szProvider = _T("NTLM");
+ szProvider = L"NTLM";
else {
LBL_Invalid:
bIsValid = false;
@@ -48,7 +48,7 @@ LBL_Invalid: return;
}
- TCHAR szSpn[1024] = _T("");
+ TCHAR szSpn[1024] = L"";
if (mir_strcmp(mechanism, "NTLM"))
if (!getSpn(szSpn, _countof(szSpn)) && !mir_strcmp(mechanism, "GSSAPI"))
goto LBL_Invalid;
@@ -65,7 +65,7 @@ TNtlmAuth::~TNtlmAuth() bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen)
{
- TCHAR szFullUserName[128] = _T("");
+ TCHAR szFullUserName[128] = L"";
ULONG szFullUserNameLen = _countof(szFullUserName);
if (!GetUserNameEx(NameDnsDomain, szFullUserName, &szFullUserNameLen)) {
szFullUserName[0] = 0;
@@ -79,7 +79,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) if (szHostName && szHostName[0]) {
TCHAR *szFullUserNameU = _tcsupr(mir_tstrdup(szFullUserName));
- mir_sntprintf(szSpn, dwSpnLen, _T("xmpp/%s/%s@%s"), szHostName, szFullUserName, szFullUserNameU);
+ mir_sntprintf(szSpn, dwSpnLen, L"xmpp/%s/%s@%s", szHostName, szFullUserName, szFullUserNameU);
mir_free(szFullUserNameU);
}
else {
@@ -91,7 +91,7 @@ bool TNtlmAuth::getSpn(TCHAR* szSpn, size_t dwSpnLen) connectHost = host->h_name;
TCHAR *connectHostT = mir_a2t(connectHost);
- mir_sntprintf(szSpn, dwSpnLen, _T("xmpp/%s@%s"), connectHostT, _tcsupr(szFullUserName));
+ mir_sntprintf(szSpn, dwSpnLen, L"xmpp/%s@%s", connectHostT, _tcsupr(szFullUserName));
mir_free(connectHostT);
}
@@ -116,7 +116,7 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) if (!hProvider)
return NULL;
- ptrA text((!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge));
+ ptrA text((!mir_tstrcmp(challenge, L"=")) ? mir_strdup("") : mir_t2a(challenge));
if (info->conn.password[0] != 0)
return Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete);
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 0c9abaf40a..bfdee3d9c7 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -153,15 +153,15 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) TCHAR szJid[JABBER_MAX_JID_LEN]; szJid[0] = 0;
if (item->arResources.getCount() != NULL && !isXVcard)
if (TCHAR *bestResName = ListGetBestClientResourceNamePtr(tszJid))
- mir_sntprintf(szJid, _T("%s/%s"), tszJid, bestResName);
+ mir_sntprintf(szJid, L"%s/%s", tszJid, bestResName);
if (szJid[0] == 0)
_tcsncpy_s(szJid, tszJid, _TRUNCATE);
- debugLog(_T("Rereading %s for %s"), isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid);
+ debugLog(L"Rereading %s for %s", isXVcard ? JABBER_FEAT_VCARD_TEMP : JABBER_FEAT_AVATAR, szJid);
m_ThreadInfo->send((isXVcard) ?
- XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP) :
+ XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetVCardAvatar, JABBER_IQ_TYPE_GET, szJid)) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP) :
XmlNodeIq( AddIQ(&CJabberProto::OnIqResultGetClientAvatar, JABBER_IQ_TYPE_GET, szJid)) << XQUERY(JABBER_FEAT_AVATAR));
return GAIR_WAITFOR;
}
@@ -299,7 +299,7 @@ INT_PTR __cdecl CJabberProto::JabberSetAvatar(WPARAM, LPARAM lParam) m_options.AvatarType = ProtoGetBufferFormat(pResult);
GetAvatarFileName(NULL, tFileName, MAX_PATH);
- FILE *out = _tfopen(tFileName, _T("wb"));
+ FILE *out = _tfopen(tFileName, L"wb");
if (out != NULL) {
fwrite(pResult, dwPngSize, 1, out);
fclose(out);
@@ -320,7 +320,7 @@ INT_PTR __cdecl CJabberProto::JabberSetNickname(WPARAM wParam, LPARAM lParam) TCHAR *nickname = (wParam & SMNN_UNICODE) ? mir_u2t((WCHAR*)lParam) : mir_a2t((char*)lParam);
setTString("Nick", nickname);
- SetServerVcard(FALSE, _T(""));
+ SetServerVcard(FALSE, L"");
return 0;
}
@@ -341,13 +341,13 @@ static const TCHAR *JabberEnum2AffilationStr[] = { LPGENT("None"), LPGENT("Outca static void appendString(bool bIsTipper, const TCHAR *tszTitle, const TCHAR *tszValue, CMString &out)
{
if (!out.IsEmpty())
- out.Append(bIsTipper ? _T("\n") : _T("\r\n"));
+ out.Append(bIsTipper ? L"\n" : L"\r\n");
if (bIsTipper)
- out.AppendFormat(_T("<b>%s</b>\t%s"), TranslateTS(tszTitle), tszValue);
+ out.AppendFormat(L"<b>%s</b>\t%s", TranslateTS(tszTitle), tszValue);
else {
TCHAR *p = TranslateTS(tszTitle);
- out.AppendFormat(_T("%s%s\t%s"), p, mir_tstrlen(p) <= 7 ? _T("\t") : _T(""), tszValue);
+ out.AppendFormat(L"%s%s\t%s", p, mir_tstrlen(p) <= 7 ? L"\t" : L"", tszValue);
}
}
@@ -434,7 +434,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) *(szSecondParam++) = 0;
// no command or message command
- if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("message")))) {
+ if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, L"message"))) {
// message
if (!ServiceExists(MS_MSG_SENDMESSAGEW))
return 1;
@@ -447,7 +447,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 1;
if (szSecondParam) { //there are parameters to message
- szMsgBody = _tcsstr(szSecondParam, _T("body="));
+ szMsgBody = _tcsstr(szSecondParam, L"body=");
if (szMsgBody) {
szMsgBody += 5;
TCHAR *szDelim = _tcschr(szMsgBody, _T(';'));
@@ -461,7 +461,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 0;
}
- if (!mir_tstrcmpi(szCommand, _T("roster"))) {
+ if (!mir_tstrcmpi(szCommand, L"roster")) {
if (!HContactFromJID(szJid)) {
PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
@@ -479,21 +479,21 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) }
// chat join invitation
- if (!mir_tstrcmpi(szCommand, _T("join"))) {
+ if (!mir_tstrcmpi(szCommand, L"join")) {
GroupchatJoinRoomByJid(NULL, szJid);
return 0;
}
// service discovery request
- if (!mir_tstrcmpi(szCommand, _T("disco"))) {
+ if (!mir_tstrcmpi(szCommand, L"disco")) {
OnMenuHandleServiceDiscovery(0, (LPARAM)szJid);
return 0;
}
// ad-hoc commands
- if (!mir_tstrcmpi(szCommand, _T("command"))) {
+ if (!mir_tstrcmpi(szCommand, L"command")) {
if (szSecondParam) {
- if (!_tcsnicmp(szSecondParam, _T("node="), 5)) {
+ if (!_tcsnicmp(szSecondParam, L"node=", 5)) {
szSecondParam += 5;
if (!*szSecondParam)
szSecondParam = NULL;
@@ -506,7 +506,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) }
// send file
- if (!mir_tstrcmpi(szCommand, _T("sendfile"))) {
+ if (!mir_tstrcmpi(szCommand, L"sendfile")) {
MCONTACT hContact = HContactFromJID(szJid, false);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, true, true);
@@ -532,13 +532,13 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM hContact, LPARAM) TCHAR tszJid[JABBER_MAX_JID_LEN];
TCHAR *szResource = ListGetBestClientResourceNamePtr(jid);
if (szResource)
- mir_sntprintf(tszJid, _T("%s/%s"), jid, szResource);
+ mir_sntprintf(tszJid, L"%s/%s", jid, szResource);
else
_tcsncpy_s(tszJid, jid, _TRUNCATE);
m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("type"), _T("headline")) << XATTR(_T("to"), tszJid)
- << XCHILDNS(_T("attention"), JABBER_FEAT_ATTENTION));
+ XmlNode(L"message") << XATTR(L"type", L"headline") << XATTR(L"to", tszJid)
+ << XCHILDNS(L"attention", JABBER_FEAT_ATTENTION));
return 0;
}
@@ -548,29 +548,29 @@ BOOL CJabberProto::SendHttpAuthReply(CJabberHttpAuthParams *pParams, BOOL bAutho return FALSE;
if (pParams->m_nType == CJabberHttpAuthParams::IQ) {
- XmlNodeIq iq(bAuthorized ? _T("result") : _T("error"), pParams->m_szIqId, pParams->m_szFrom);
+ XmlNodeIq iq(bAuthorized ? L"result" : L"error", pParams->m_szIqId, pParams->m_szFrom);
if (!bAuthorized) {
- iq << XCHILDNS(_T("confirm"), JABBER_FEAT_HTTP_AUTH) << XATTR(_T("id"), pParams->m_szId)
- << XATTR(_T("method"), pParams->m_szMethod) << XATTR(_T("url"), pParams->m_szUrl);
- iq << XCHILD(_T("error")) << XATTRI(_T("code"), 401) << XATTR(_T("type"), _T("auth"))
- << XCHILDNS(_T("not-authorized"), _T("urn:ietf:params:xml:xmpp-stanzas"));
+ iq << XCHILDNS(L"confirm", JABBER_FEAT_HTTP_AUTH) << XATTR(L"id", pParams->m_szId)
+ << XATTR(L"method", pParams->m_szMethod) << XATTR(L"url", pParams->m_szUrl);
+ iq << XCHILD(L"error") << XATTRI(L"code", 401) << XATTR(L"type", L"auth")
+ << XCHILDNS(L"not-authorized", L"urn:ietf:params:xml:xmpp-stanzas");
}
m_ThreadInfo->send(iq);
}
else if (pParams->m_nType == CJabberHttpAuthParams::MSG) {
- XmlNode msg(_T("message"));
- msg << XATTR(_T("to"), pParams->m_szFrom);
+ XmlNode msg(L"message");
+ msg << XATTR(L"to", pParams->m_szFrom);
if (!bAuthorized)
- msg << XATTR(_T("type"), _T("error"));
+ msg << XATTR(L"type", L"error");
if (pParams->m_szThreadId)
- msg << XCHILD(_T("thread"), pParams->m_szThreadId);
+ msg << XCHILD(L"thread", pParams->m_szThreadId);
- msg << XCHILDNS(_T("confirm"), JABBER_FEAT_HTTP_AUTH) << XATTR(_T("id"), pParams->m_szId)
- << XATTR(_T("method"), pParams->m_szMethod) << XATTR(_T("url"), pParams->m_szUrl);
+ msg << XCHILDNS(L"confirm", JABBER_FEAT_HTTP_AUTH) << XATTR(L"id", pParams->m_szId)
+ << XATTR(L"method", pParams->m_szMethod) << XATTR(L"url", pParams->m_szUrl);
if (!bAuthorized)
- msg << XCHILD(_T("error")) << XATTRI(_T("code"), 401) << XATTR(_T("type"), _T("auth"))
- << XCHILDNS(_T("not-authorized"), _T("urn:ietf:params:xml:xmpp-stanzas"));
+ msg << XCHILD(L"error") << XATTRI(L"code", 401) << XATTR(L"type", L"auth")
+ << XCHILDNS(L"not-authorized", L"urn:ietf:params:xml:xmpp-stanzas");
m_ThreadInfo->send(msg);
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 312422bae7..328ada850e 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -191,16 +191,16 @@ void CJabberProto::xmlStreamInitializeNow(ThreadData *info) m_szXmlStreamToBeInitialized = NULL;
}
- HXML n = xmlCreateNode(_T("xml"), NULL, 1) << XATTR(_T("version"), _T("1.0")) << XATTR(_T("encoding"), _T("UTF-8"));
+ HXML n = xmlCreateNode(L"xml", NULL, 1) << XATTR(L"version", L"1.0") << XATTR(L"encoding", L"UTF-8");
- HXML stream = n << XCHILDNS(_T("stream:stream"), _T("jabber:client")) << XATTR(_T("to"), _A2T(info->conn.server))
- << XATTR(_T("xmlns:stream"), _T("http://etherx.jabber.org/streams"));
+ HXML stream = n << XCHILDNS(L"stream:stream", L"jabber:client") << XATTR(L"to", _A2T(info->conn.server))
+ << XATTR(L"xmlns:stream", L"http://etherx.jabber.org/streams");
if (m_tszSelectedLang)
- XmlAddAttr(stream, _T("xml:lang"), m_tszSelectedLang);
+ XmlAddAttr(stream, L"xml:lang", m_tszSelectedLang);
if (!m_options.Disable3920auth)
- XmlAddAttr(stream, _T("version"), _T("1.0"));
+ XmlAddAttr(stream, L"version", L"1.0");
LPTSTR xmlQuery = xmlToString(n, NULL);
T2Utf buf(xmlQuery);
@@ -279,17 +279,17 @@ LBL_FatalError: if (m_options.HostNameAsResource) {
DWORD dwCompNameLen = _countof(info.resource) - 1;
if (!GetComputerName(info.resource, &dwCompNameLen))
- mir_tstrcpy(info.resource, _T("Miranda"));
+ mir_tstrcpy(info.resource, L"Miranda");
}
else {
if ((tszValue = getTStringA("Resource")) != NULL)
_tcsncpy_s(info.resource, tszValue, _TRUNCATE);
else
- mir_tstrcpy(info.resource, _T("Miranda"));
+ mir_tstrcpy(info.resource, L"Miranda");
}
TCHAR jidStr[512];
- mir_sntprintf(jidStr, _T("%s@%S/%s"), info.conn.username, info.conn.server, info.resource);
+ mir_sntprintf(jidStr, L"%s@%S/%s", info.conn.username, info.conn.server, info.resource);
_tcsncpy_s(info.fullJID, jidStr, _TRUNCATE);
if (m_options.UseDomainLogin) // in the case of NTLM auth we have no need in password
@@ -298,7 +298,7 @@ LBL_FatalError: if (m_savedPassword != NULL)
_tcsncpy_s(info.conn.password, m_savedPassword, _TRUNCATE);
else {
- mir_sntprintf(jidStr, _T("%s@%S"), info.conn.username, info.conn.server);
+ mir_sntprintf(jidStr, L"%s@%S", info.conn.username, info.conn.server);
JabberPasswordDlgParam param;
param.pro = this;
@@ -392,7 +392,7 @@ LBL_FatalError: if (!info.bIsReg) {
size_t len = mir_tstrlen(info.conn.username) + mir_strlen(info.conn.server) + 1;
m_szJabberJID = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
- mir_sntprintf(m_szJabberJID, len + 1, _T("%s@%S"), info.conn.username, info.conn.server);
+ mir_sntprintf(m_szJabberJID, len + 1, L"%s@%S", info.conn.username, info.conn.server);
m_bSendKeepAlive = m_options.KeepAlive != 0;
setTString("jid", m_szJabberJID); // store jid in database
@@ -400,7 +400,7 @@ LBL_FatalError: }
xmlStreamInitializeNow(&info);
- const TCHAR *tag = _T("stream:stream");
+ const TCHAR *tag = L"stream:stream";
debugLogA("Entering main recv loop");
int datalen = 0;
@@ -424,7 +424,7 @@ LBL_FatalError: if (info.jabberServerCaps & JABBER_CAPS_PING) {
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnPingReply, JABBER_IQ_TYPE_GET, NULL, 0, -1, this);
pInfo->SetTimeout(m_options.ConnectionKeepAliveTimeout);
- info.send(XmlNodeIq(pInfo) << XATTR(_T("from"), info.fullJID) << XCHILDNS(_T("ping"), JABBER_FEAT_PING));
+ info.send(XmlNodeIq(pInfo) << XATTR(L"from", info.fullJID) << XCHILDNS(L"ping", JABBER_FEAT_PING));
}
else info.send(" \t ");
continue;
@@ -489,7 +489,7 @@ recvRest: if (m_szXmlStreamToBeInitialized) {
xmlStreamInitializeNow(&info);
- tag = _T("stream:stream");
+ tag = L"stream:stream";
}
if (root && datalen)
goto recvRest;
@@ -551,7 +551,7 @@ recvRest: void CJabberProto::PerformRegistration(ThreadData *info)
{
iqIdRegGetReg = SerialNext();
- info->send(XmlNodeIq(_T("get"), iqIdRegGetReg, NULL) << XQUERY(JABBER_FEAT_REGISTER));
+ info->send(XmlNodeIq(L"get", iqIdRegGetReg, NULL) << XQUERY(JABBER_FEAT_REGISTER));
SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 50, (LPARAM)TranslateT("Requesting registration instruction..."));
}
@@ -560,7 +560,7 @@ void CJabberProto::PerformIqAuth(ThreadData *info) {
if (!info->bIsReg) {
info->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetAuth, JABBER_IQ_TYPE_GET))
- << XQUERY(_T("jabber:iq:auth")) << XCHILD(_T("username"), info->conn.username));
+ << XQUERY(L"jabber:iq:auth") << XCHILD(L"username", info->conn.username));
}
else PerformRegistration(info);
}
@@ -569,17 +569,17 @@ void CJabberProto::PerformIqAuth(ThreadData *info) void CJabberProto::OnProcessStreamOpening(HXML node, ThreadData *info)
{
- if (mir_tstrcmp(XmlGetName(node), _T("stream:stream")))
+ if (mir_tstrcmp(XmlGetName(node), L"stream:stream"))
return;
if (!info->bIsReg) {
- const TCHAR *sid = XmlGetAttrValue(node, _T("id"));
+ const TCHAR *sid = XmlGetAttrValue(node, L"id");
if (sid != NULL)
info->szStreamId = mir_t2a(sid);
}
// old server - disable SASL then
- if (XmlGetAttrValue(node, _T("version")) == NULL)
+ if (XmlGetAttrValue(node, L"version") == NULL)
info->proto->m_options.Disable3920auth = TRUE;
if (info->proto->m_options.Disable3920auth)
@@ -665,8 +665,8 @@ void CJabberProto::PerformAuthentication(ThreadData *info) info->auth = auth;
if (!request) request = auth->getInitialRequest();
- info->send(XmlNode(_T("auth"), _A2T(request)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl"))
- << XATTR(_T("mechanism"), _A2T(auth->getName())));
+ info->send(XmlNode(L"auth", _A2T(request)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-sasl")
+ << XATTR(L"mechanism", _A2T(auth->getName())));
mir_free(request);
}
@@ -682,29 +682,29 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!n)
break;
- if (!mir_tstrcmp(XmlGetName(n), _T("starttls"))) {
+ if (!mir_tstrcmp(XmlGetName(n), L"starttls")) {
if (!info->conn.useSSL && m_options.UseTLS) {
debugLogA("Requesting TLS");
- info->send(XmlNode(XmlGetName(n)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-tls")));
+ info->send(XmlNode(XmlGetName(n)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-tls"));
return;
} }
- if (!mir_tstrcmp(XmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) {
+ if (!mir_tstrcmp(XmlGetName(n), L"compression") && m_options.EnableZlib == TRUE) {
debugLogA("Server compression available");
for (int k = 0;; k++) {
HXML c = XmlGetChild(n, k);
if (!c)
break;
- if (!mir_tstrcmp(XmlGetName(c), _T("method"))) {
- if (!mir_tstrcmp(XmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) {
+ if (!mir_tstrcmp(XmlGetName(c), L"method")) {
+ if (!mir_tstrcmp(XmlGetText(c), L"zlib") && info->zlibInit() == TRUE) {
debugLogA("Requesting Zlib compression");
- info->send(XmlNode(_T("compress")) << XATTR(_T("xmlns"), _T("http://jabber.org/protocol/compress"))
- << XCHILD(_T("method"), _T("zlib")));
+ info->send(XmlNode(L"compress") << XATTR(L"xmlns", L"http://jabber.org/protocol/compress")
+ << XCHILD(L"method", L"zlib"));
return;
} } } }
- if (!mir_tstrcmp(XmlGetName(n), _T("mechanisms"))) {
+ if (!mir_tstrcmp(XmlGetName(n), L"mechanisms")) {
m_AuthMechs.isPlainAvailable = false;
m_AuthMechs.isPlainOldAvailable = false;
m_AuthMechs.isMd5Available = false;
@@ -721,26 +721,26 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (!c)
break;
- if (!mir_tstrcmp(XmlGetName(c), _T("mechanism"))) {
+ if (!mir_tstrcmp(XmlGetName(c), L"mechanism")) {
LPCTSTR ptszMechanism = XmlGetText(c);
- if (!mir_tstrcmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
- else if (!mir_tstrcmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true;
- else if (!mir_tstrcmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true;
- else if (!mir_tstrcmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true;
- else if (!mir_tstrcmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true;
- else if (!mir_tstrcmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true;
+ if (!mir_tstrcmp(ptszMechanism, L"PLAIN")) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, L"DIGEST-MD5")) m_AuthMechs.isMd5Available = true;
+ else if (!mir_tstrcmp(ptszMechanism, L"SCRAM-SHA-1")) m_AuthMechs.isScramAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, L"NTLM")) m_AuthMechs.isNtlmAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, L"GSS-SPNEGO")) m_AuthMechs.isSpnegoAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, L"GSSAPI")) m_AuthMechs.isKerberosAvailable = true;
}
- else if (!mir_tstrcmp(XmlGetName(c), _T("hostname"))) {
- const TCHAR *mech = XmlGetAttrValue(c, _T("mechanism"));
- if (mech && mir_tstrcmpi(mech, _T("GSSAPI")) == 0) {
+ else if (!mir_tstrcmp(XmlGetName(c), L"hostname")) {
+ const TCHAR *mech = XmlGetAttrValue(c, L"mechanism");
+ if (mech && mir_tstrcmpi(mech, L"GSSAPI") == 0) {
m_AuthMechs.m_gssapiHostName = mir_tstrdup(XmlGetText(c));
}
}
}
}
- else if (!mir_tstrcmp(XmlGetName(n), _T("register"))) isRegisterAvailable = true;
- else if (!mir_tstrcmp(XmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true;
- else if (!mir_tstrcmp(XmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true;
+ else if (!mir_tstrcmp(XmlGetName(n), L"register")) isRegisterAvailable = true;
+ else if (!mir_tstrcmp(XmlGetName(n), L"auth")) m_AuthMechs.isAuthAvailable = true;
+ else if (!mir_tstrcmp(XmlGetName(n), L"session")) m_AuthMechs.isSessionAvailable = true;
}
if (areMechanismsDefined) {
@@ -755,8 +755,8 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) if (info->auth) { //We are already logged-in
info->send(
XmlNodeIq(AddIQ(&CJabberProto::OnIqResultBind, JABBER_IQ_TYPE_SET))
- << XCHILDNS(_T("bind"), _T("urn:ietf:params:xml:ns:xmpp-bind"))
- << XCHILD(_T("resource"), info->resource));
+ << XCHILDNS(L"bind", L"urn:ietf:params:xml:ns:xmpp-bind")
+ << XCHILD(L"resource", info->resource));
if (m_AuthMechs.isSessionAvailable)
info->bIsSessionAvailable = TRUE;
@@ -772,8 +772,8 @@ void CJabberProto::OnProcessFailure(HXML node, ThreadData *info) {
const TCHAR *type;
//failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"
- if ((type = XmlGetAttrValue(node, _T("xmlns"))) == NULL) return;
- if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if ((type = XmlGetAttrValue(node, L"xmlns")) == NULL) return;
+ if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-sasl")) {
PerformAuthentication(info);
}
}
@@ -799,13 +799,13 @@ void CJabberProto::OnProcessError(HXML node, ThreadData *info) const TCHAR *name = XmlGetName(n);
const TCHAR *desc = XmlGetText(n);
if (desc)
- pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s: %s\r\n"), name, desc);
+ pos += mir_sntprintf(buff + pos, 1024 - pos, L"%s: %s\r\n", name, desc);
else
- pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s\r\n"), name);
+ pos += mir_sntprintf(buff + pos, 1024 - pos, L"%s\r\n", name);
- if (!mir_tstrcmp(name, _T("conflict")))
+ if (!mir_tstrcmp(name, L"conflict"))
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
- else if (!mir_tstrcmp(name, _T("see-other-host"))) {
+ else if (!mir_tstrcmp(name, L"see-other-host")) {
skipMsg = true;
}
}
@@ -820,10 +820,10 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info) // int iqId;
// RECVED: <success ...
// ACTION: if successfully logged in, continue by requesting roster list and set my initial status
- if ((type = XmlGetAttrValue(node, _T("xmlns"))) == NULL)
+ if ((type = XmlGetAttrValue(node, L"xmlns")) == NULL)
return;
- if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-sasl")) {
if (!info->auth->validateLogin(XmlGetText(node))) {
info->send("</stream:stream>");
return;
@@ -836,7 +836,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info) xmlStreamInitialize("after successful sasl");
}
- else debugLog(_T("Success: unknown action %s."), type);
+ else debugLog(L"Success: unknown action %s.", type);
}
void CJabberProto::OnProcessChallenge(HXML node, ThreadData *info)
@@ -846,11 +846,11 @@ void CJabberProto::OnProcessChallenge(HXML node, ThreadData *info) return;
}
- if (mir_tstrcmp(XmlGetAttrValue(node, _T("xmlns")), _T("urn:ietf:params:xml:ns:xmpp-sasl")))
+ if (mir_tstrcmp(XmlGetAttrValue(node, L"xmlns"), L"urn:ietf:params:xml:ns:xmpp-sasl"))
return;
char* challenge = info->auth->getChallenge(XmlGetText(node));
- info->send(XmlNode(_T("response"), _A2T(challenge)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-sasl")));
+ info->send(XmlNode(L"response", _A2T(challenge)) << XATTR(L"xmlns", L"urn:ietf:params:xml:ns:xmpp-sasl"));
mir_free(challenge);
}
@@ -858,34 +858,34 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) {
OnConsoleProcessXml(node, JCPF_IN);
- if (!mir_tstrcmp(XmlGetName(node), _T("proceed")))
+ if (!mir_tstrcmp(XmlGetName(node), L"proceed"))
OnProcessProceed(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("compressed")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"compressed"))
OnProcessCompressed(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("stream:features")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"stream:features"))
OnProcessFeatures(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("stream:stream")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"stream:stream"))
OnProcessStreamOpening(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("success")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"success"))
OnProcessSuccess(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("failure")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"failure"))
OnProcessFailure(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("stream:error")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"stream:error"))
OnProcessError(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("challenge")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"challenge"))
OnProcessChallenge(node, info);
else if (!info->bIsReg) {
- if (!mir_tstrcmp(XmlGetName(node), _T("message")))
+ if (!mir_tstrcmp(XmlGetName(node), L"message"))
OnProcessMessage(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("presence")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"presence"))
OnProcessPresence(node, info);
- else if (!mir_tstrcmp(XmlGetName(node), _T("iq")))
+ else if (!mir_tstrcmp(XmlGetName(node), L"iq"))
OnProcessIq(node);
else
debugLogA("Invalid top-level tag (only <message/> <presence/> and <iq/> allowed)");
}
else {
- if (!mir_tstrcmp(XmlGetName(node), _T("iq")))
+ if (!mir_tstrcmp(XmlGetName(node), L"iq"))
OnProcessRegIq(node, info);
else
debugLogA("Invalid top-level tag (only <iq/> allowed)");
@@ -895,10 +895,10 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) void CJabberProto::OnProcessProceed(HXML node, ThreadData *info)
{
const TCHAR *type;
- if ((type = XmlGetAttrValue(node, _T("xmlns"))) != NULL && !mir_tstrcmp(type, _T("error")))
+ if ((type = XmlGetAttrValue(node, L"xmlns")) != NULL && !mir_tstrcmp(type, L"error"))
return;
- if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-tls"))) {
+ if (!mir_tstrcmp(type, L"urn:ietf:params:xml:ns:xmpp-tls")) {
debugLogA("Starting TLS...");
char* gtlk = strstr(info->conn.manualHost, "google.com");
@@ -922,10 +922,10 @@ void CJabberProto::OnProcessCompressed(HXML node, ThreadData *info) {
debugLogA("Compression confirmed");
- const TCHAR *type = XmlGetAttrValue(node, _T("xmlns"));
- if (type != NULL && !mir_tstrcmp(type, _T("error")))
+ const TCHAR *type = XmlGetAttrValue(node, L"xmlns");
+ if (type != NULL && !mir_tstrcmp(type, L"error"))
return;
- if (mir_tstrcmp(type, _T("http://jabber.org/protocol/compress")))
+ if (mir_tstrcmp(type, L"http://jabber.org/protocol/compress"))
return;
debugLogA("Starting Zlib stream compression...");
@@ -938,7 +938,7 @@ void CJabberProto::OnProcessCompressed(HXML node, ThreadData *info) void CJabberProto::OnProcessPubsubEvent(HXML node)
{
- const TCHAR *from = XmlGetAttrValue(node, _T("from"));
+ const TCHAR *from = XmlGetAttrValue(node, L"from");
if (!from)
return;
@@ -960,7 +960,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) return;
}
- HXML tuneNode = XPath(itemsNode, _T("item/tune[@xmlns='") JABBER_FEAT_USER_TUNE _T("']"));
+ HXML tuneNode = XPath(itemsNode, L"item/tune[@xmlns='" JABBER_FEAT_USER_TUNE L"']");
if (!tuneNode)
return;
@@ -974,7 +974,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) szLengthInTime[0] = 0;
if (szLength) {
int nLength = _ttoi(szLength);
- mir_sntprintf(szLengthInTime, _T("%02d:%02d:%02d"), nLength / 3600, (nLength / 60) % 60, nLength % 60);
+ mir_sntprintf(szLengthInTime, L"%02d:%02d:%02d", nLength / 3600, (nLength / 60) % 60, nLength % 60);
}
SetContactTune(hContact, szArtist, szLength ? szLengthInTime : NULL, szSource, szTitle, szTrack);
@@ -1026,21 +1026,21 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) {
HXML xNode, n;
- if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("message")))
+ if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"message"))
return;
- LPCTSTR from, type = XmlGetAttrValue(node, _T("type"));
- if ((from = XmlGetAttrValue(node, _T("from"))) == NULL)
+ LPCTSTR from, type = XmlGetAttrValue(node, L"type");
+ if ((from = XmlGetAttrValue(node, L"from")) == NULL)
return;
- LPCTSTR idStr = XmlGetAttrValue(node, _T("id"));
+ LPCTSTR idStr = XmlGetAttrValue(node, L"id");
pResourceStatus pFromResource(ResourceInfoFromJID(from));
// Message receipts delivery request. Reply here, before a call to HandleMessagePermanent() to make sure message receipts are handled for external plugins too.
- if ((!type || mir_tstrcmpi(type, _T("error"))) && XmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) {
+ if ((!type || mir_tstrcmpi(type, L"error")) && XmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) {
info->send(
- XmlNode(_T("message")) << XATTR(_T("to"), from) << XATTR(_T("id"), idStr)
- << XCHILDNS(_T("received"), JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(_T("id"), idStr));
+ XmlNode(L"message") << XATTR(L"to", from) << XATTR(L"id", idStr)
+ << XCHILDNS(L"received", JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(L"id", idStr));
if (pFromResource)
pFromResource->m_jcbManualDiscoveredCaps |= JABBER_CAPS_MESSAGE_RECEIPTS;
@@ -1071,19 +1071,19 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR) * cbLen);
szTmp[0] = 0;
if (szMessage)
- mir_tstrcat(szTmp, _T("Subject: "));
+ mir_tstrcat(szTmp, L"Subject: ");
mir_tstrcat(szTmp, ptszSubject);
if (szMessage) {
- mir_tstrcat(szTmp, _T("\r\n"));
+ mir_tstrcat(szTmp, L"\r\n");
mir_tstrcat(szTmp, szMessage);
}
szMessage = szTmp;
}
if (szMessage && (n = XmlGetChildByTag(node, "addresses", "xmlns", JABBER_FEAT_EXT_ADDRESSING))) {
- HXML addressNode = XmlGetChildByTag(n, "address", "type", _T("ofrom"));
+ HXML addressNode = XmlGetChildByTag(n, "address", "type", L"ofrom");
if (addressNode) {
- const TCHAR *szJid = XmlGetAttrValue(addressNode, _T("jid"));
+ const TCHAR *szJid = XmlGetAttrValue(addressNode, L"jid");
if (szJid) {
size_t cbLen = mir_tstrlen(szMessage) + 1000;
TCHAR *p = (TCHAR*)alloca(sizeof(TCHAR) * cbLen);
@@ -1161,9 +1161,9 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
if ((n = XmlGetChildByTag(node, "confirm", "xmlns", JABBER_FEAT_HTTP_AUTH)) && m_options.AcceptHttpAuth) {
- const TCHAR *szId = XmlGetAttrValue(n, _T("id"));
- const TCHAR *szMethod = XmlGetAttrValue(n, _T("method"));
- const TCHAR *szUrl = XmlGetAttrValue(n, _T("url"));
+ const TCHAR *szId = XmlGetAttrValue(n, L"id");
+ const TCHAR *szMethod = XmlGetAttrValue(n, L"method");
+ const TCHAR *szUrl = XmlGetAttrValue(n, L"url");
if (!szId || !szMethod || !szUrl)
return;
@@ -1187,10 +1187,10 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) // parsing extensions
for (int i = 0; (xNode = XmlGetChild(node, i)) != NULL; i++) {
- if ((xNode = XmlGetNthChild(node, _T("x"), i + 1)) == NULL)
+ if ((xNode = XmlGetNthChild(node, L"x", i + 1)) == NULL)
continue;
- const TCHAR *ptszXmlns = XmlGetAttrValue(xNode, _T("xmlns"));
+ const TCHAR *ptszXmlns = XmlGetAttrValue(xNode, L"xmlns");
if (ptszXmlns == NULL)
continue;
@@ -1198,16 +1198,16 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (OnIncomingNote(from, XmlGetChild(xNode, "note")))
return;
}
- else if (!mir_tstrcmp(ptszXmlns, _T("jabber:x:encrypted"))) {
+ else if (!mir_tstrcmp(ptszXmlns, L"jabber:x:encrypted")) {
LPCTSTR ptszText = XmlGetText(xNode);
if (ptszText == NULL)
return;
//XEP-0027 is not strict enough, different clients have different implementations
//additional validation is required
- TCHAR *prolog = _T("-----BEGIN PGP MESSAGE-----");
- TCHAR *prolog_newline = _T("\r\n\r\n");
- TCHAR *epilog = _T("\r\n-----END PGP MESSAGE-----\r\n");
+ TCHAR *prolog = L"-----BEGIN PGP MESSAGE-----";
+ TCHAR *prolog_newline = L"\r\n\r\n";
+ TCHAR *epilog = L"\r\n-----END PGP MESSAGE-----\r\n";
size_t len = 0;
TCHAR *tempstring = nullptr;
@@ -1215,19 +1215,19 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) {
len = mir_tstrlen(prolog) + mir_tstrlen(prolog_newline) + mir_tstrlen(ptszText) + mir_tstrlen(epilog) + 3;
tempstring = (TCHAR*)_alloca(sizeof(TCHAR)*len);
- mir_sntprintf(tempstring, len, _T("%s%s%s%s"), prolog, prolog_newline, ptszText, epilog);
+ mir_sntprintf(tempstring, len, L"%s%s%s%s", prolog, prolog_newline, ptszText, epilog);
}
else
{
len = mir_tstrlen(ptszText) + 3;
tempstring = (TCHAR*)_alloca(sizeof(TCHAR)*len);
- mir_sntprintf(tempstring, len, _T("%s"), ptszText);
+ mir_sntprintf(tempstring, len, L"%s", ptszText);
}
szMessage = tempstring;
}
else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) {
- const TCHAR *ptszTimeStamp = XmlGetAttrValue(xNode, _T("stamp"));
+ const TCHAR *ptszTimeStamp = XmlGetAttrValue(xNode, L"stamp");
if (ptszTimeStamp != NULL)
msgTime = JabberIsoToUnixTime(ptszTimeStamp);
}
@@ -1266,10 +1266,10 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (!isDelivered && (n = XmlGetChild(xNode, "delivered")) != NULL) {
isDelivered = true;
- XmlNode m(_T("message")); m << XATTR(_T("to"), from);
- HXML x = m << XCHILDNS(_T("x"), JABBER_FEAT_MESSAGE_EVENTS);
- x << XCHILD(_T("delivered"));
- x << XCHILD(_T("id"), idStr);
+ XmlNode m(L"message"); m << XATTR(L"to", from);
+ HXML x = m << XCHILDNS(L"x", JABBER_FEAT_MESSAGE_EVENTS);
+ x << XCHILD(L"delivered");
+ x << XCHILD(L"id", idStr);
info->send(m);
}
if (item != NULL && XmlGetChild(xNode, "composing") != NULL) {
@@ -1286,17 +1286,17 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) TCHAR *szTmp = (TCHAR *)alloca(sizeof(TCHAR)* cbLen);
mir_tstrcpy(szTmp, ptszUrl);
if (szMessage) {
- mir_tstrcat(szTmp, _T("\r\n"));
+ mir_tstrcat(szTmp, L"\r\n");
mir_tstrcat(szTmp, szMessage);
}
szMessage = szTmp;
}
}
else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MUC_USER)) {
- HXML inviteNode = XmlGetChild(xNode, _T("invite"));
+ HXML inviteNode = XmlGetChild(xNode, L"invite");
if (inviteNode != NULL) {
- inviteFromJid = XmlGetAttrValue(inviteNode, _T("from"));
- inviteReason = XmlGetText(XmlGetChild(inviteNode, _T("reason")));
+ inviteFromJid = XmlGetAttrValue(inviteNode, L"from");
+ inviteReason = XmlGetText(XmlGetChild(inviteNode, L"reason"));
inviteRoomJid = from;
if (inviteReason == NULL)
inviteReason = szMessage;
@@ -1306,24 +1306,24 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) &&
item != NULL && (item->subscription == SUB_BOTH || item->subscription == SUB_TO)) {
- TCHAR chkJID[JABBER_MAX_JID_LEN] = _T("@");
+ TCHAR chkJID[JABBER_MAX_JID_LEN] = L"@";
JabberStripJid(from, chkJID + 1, _countof(chkJID) - 1);
for (int j = 1;; j++) {
- HXML iNode = XmlGetNthChild(xNode, _T("item"), j);
+ HXML iNode = XmlGetNthChild(xNode, L"item", j);
if (iNode == NULL)
break;
- const TCHAR *action = XmlGetAttrValue(iNode, _T("action"));
- const TCHAR *jid = XmlGetAttrValue(iNode, _T("jid"));
- const TCHAR *nick = XmlGetAttrValue(iNode, _T("name"));
- const TCHAR *group = XmlGetText(XmlGetChild(iNode, _T("group")));
+ const TCHAR *action = XmlGetAttrValue(iNode, L"action");
+ const TCHAR *jid = XmlGetAttrValue(iNode, L"jid");
+ const TCHAR *nick = XmlGetAttrValue(iNode, L"name");
+ const TCHAR *group = XmlGetText(XmlGetChild(iNode, L"group"));
if (action && jid && _tcsstr(jid, chkJID)) {
- if (!mir_tstrcmp(action, _T("add"))) {
+ if (!mir_tstrcmp(action, L"add")) {
MCONTACT cc = DBCreateContact(jid, nick, false, false);
if (group)
db_set_ts(cc, "CList", "Group", group);
}
- else if (!mir_tstrcmp(action, _T("delete"))) {
+ else if (!mir_tstrcmp(action, L"delete")) {
MCONTACT cc = HContactFromJID(jid);
if (cc)
CallService(MS_DB_CONTACT_DELETE, cc, 0);
@@ -1332,7 +1332,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
}
else if (!isChatRoomInvitation && !mir_tstrcmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) {
- inviteRoomJid = XmlGetAttrValue(xNode, _T("jid"));
+ inviteRoomJid = XmlGetAttrValue(xNode, L"jid");
inviteFromJid = from;
if (inviteReason == NULL)
inviteReason = XmlGetText(xNode);
@@ -1367,7 +1367,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) CMString tmp(szMessage);
tmp += ExtractImage(node);
- tmp.Replace(_T("\n"), _T("\r\n"));
+ tmp.Replace(L"\n", L"\r\n");
ptrA buf(mir_utf8encodeW(tmp));
if (item != NULL) {
@@ -1403,11 +1403,11 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) // XEP-0115: Entity Capabilities
void CJabberProto::OnProcessPresenceCapabilites(HXML node)
{
- const TCHAR *from = XmlGetAttrValue(node, _T("from"));
+ const TCHAR *from = XmlGetAttrValue(node, L"from");
if (from == NULL)
return;
- debugLog(_T("presence: for jid %s"), from);
+ debugLog(L"presence: for jid %s", from);
pResourceStatus r(ResourceInfoFromJID(from));
if (r == NULL)
@@ -1418,9 +1418,9 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node) if ((n = XmlGetChildByTag(node, "c", "xmlns", JABBER_FEAT_ENTITY_CAPS)) != NULL ||
(n = XmlGetChild(node, "c")) != NULL)
{
- const TCHAR *szNode = XmlGetAttrValue(n, _T("node"));
- const TCHAR *szVer = XmlGetAttrValue(n, _T("ver"));
- const TCHAR *szExt = XmlGetAttrValue(n, _T("ext"));
+ const TCHAR *szNode = XmlGetAttrValue(n, L"node");
+ const TCHAR *szVer = XmlGetAttrValue(n, L"ver");
+ const TCHAR *szExt = XmlGetAttrValue(n, L"ext");
if (szNode && szVer) {
r->m_tszCapsNode = mir_tstrdup(szNode);
r->m_tszCapsVer = mir_tstrdup(szVer);
@@ -1472,7 +1472,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) item->getTemp()->m_iStatus = status;
if (nSelectedResource != -1) {
pResourceStatus r(item->arResources[nSelectedResource]);
- debugLog(_T("JabberUpdateJidDbSettings: updating jid %s to rc %s"), item->jid, r->m_tszResourceName);
+ debugLog(L"JabberUpdateJidDbSettings: updating jid %s to rc %s", item->jid, r->m_tszResourceName);
if (r->m_tszStatusMessage)
db_set_ts(hContact, "CList", "StatusMsg", r->m_tszStatusMessage);
else
@@ -1497,10 +1497,10 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
{
- if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("presence")))
+ if (!node || !XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"presence"))
return;
- LPCTSTR from = XmlGetAttrValue(node, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(node, L"from");
if (from == NULL)
return;
@@ -1522,31 +1522,31 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (!mir_tstrcmpi(szBareFrom, szBareOurJid))
bSelfPresence = true;
- LPCTSTR type = XmlGetAttrValue(node, _T("type"));
- if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
+ LPCTSTR type = XmlGetAttrValue(node, L"type");
+ if (type == NULL || !mir_tstrcmp(type, L"available")) {
ptrT nick(JabberNickFromJID(from));
if (nick == NULL)
return;
if ((hContact = HContactFromJID(from)) == NULL) {
if (!mir_tstrcmpi(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) {
- debugLog(_T("SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)"), from);
+ debugLog(L"SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)", from);
return;
}
hContact = DBCreateContact(from, nick, true, true);
}
if (!ListGetItemPtr(LIST_ROSTER, from)) {
- debugLog(_T("Receive presence online from %s (who is not in my roster)"), from);
+ debugLog(L"Receive presence online from %s (who is not in my roster)", from);
ListAdd(LIST_ROSTER, from, hContact);
}
DBCheckIsTransportedContact(from, hContact);
int status = ID_STATUS_ONLINE;
if (HXML showNode = XmlGetChild(node, "show")) {
if (LPCTSTR show = XmlGetText(showNode)) {
- if (!mir_tstrcmp(show, _T("away"))) status = ID_STATUS_AWAY;
- else if (!mir_tstrcmp(show, _T("xa"))) status = ID_STATUS_NA;
- else if (!mir_tstrcmp(show, _T("dnd"))) status = ID_STATUS_DND;
- else if (!mir_tstrcmp(show, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(show, L"away")) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(show, L"xa")) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(show, L"dnd")) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(show, L"chat")) status = ID_STATUS_FREECHAT;
}
}
@@ -1564,15 +1564,15 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (_tcschr(from, '@') == NULL) {
UI_SAFE_NOTIFY(m_pDlgServiceDiscovery, WM_JABBER_TRANSPORT_REFRESH);
}
- debugLog(_T("%s (%s) online, set contact status to %s"), nick, from, pcli->pfnGetStatusModeDescription(status, 0));
+ debugLog(L"%s (%s) online, set contact status to %s", nick, from, pcli->pfnGetStatusModeDescription(status, 0));
HXML xNode;
if (m_options.EnableAvatars) {
bool bHasAvatar = false, bRemovedAvatar = false;
debugLogA("Avatar enabled");
- for (int i = 1; (xNode = XmlGetNthChild(node, _T("x"), i)) != NULL; i++) {
- if (!mir_tstrcmp(XmlGetAttrValue(xNode, _T("xmlns")), _T("jabber:x:avatar"))) {
+ for (int i = 1; (xNode = XmlGetNthChild(node, L"x", i)) != NULL; i++) {
+ if (!mir_tstrcmp(XmlGetAttrValue(xNode, L"xmlns"), L"jabber:x:avatar")) {
LPCTSTR ptszHash = XmlGetText(XmlGetChild(xNode, "hash"));
if (ptszHash != NULL) {
delSetting(hContact, "AvatarXVcard");
@@ -1590,8 +1590,8 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) }
if (!bHasAvatar) { //no jabber:x:avatar. try vcard-temp:x:update
debugLogA("Not hasXAvatar");
- for (int i = 1; (xNode = XmlGetNthChild(node, _T("x"), i)) != NULL; i++) {
- if (!mir_tstrcmp(XmlGetAttrValue(xNode, _T("xmlns")), _T("vcard-temp:x:update"))) {
+ for (int i = 1; (xNode = XmlGetNthChild(node, L"x", i)) != NULL; i++) {
+ if (!mir_tstrcmp(XmlGetAttrValue(xNode, L"xmlns"), L"vcard-temp:x:update")) {
if ((xNode = XmlGetChild(xNode, "photo")) != NULL) {
LPCTSTR txt = XmlGetText(xNode);
if (txt != NULL && txt[0] != 0) {
@@ -1619,7 +1619,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
}
- if (!mir_tstrcmp(type, _T("unavailable"))) {
+ if (!mir_tstrcmp(type, L"unavailable")) {
hContact = HContactFromJID(from);
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from);
if (item != NULL) {
@@ -1639,7 +1639,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) item->getTemp()->m_tszStatusMessage = mir_tstrdup(XmlGetText(XmlGetChild(node, "status")));
}
}
- else debugLog(_T("SKIP Receive presence offline from %s (who is not in my roster)"), from);
+ else debugLog(L"SKIP Receive presence offline from %s (who is not in my roster)", from);
UpdateJidDbSettings(from);
@@ -1650,7 +1650,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
}
- if (!mir_tstrcmp(type, _T("subscribe"))) {
+ if (!mir_tstrcmp(type, L"subscribe")) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBE);
@@ -1659,7 +1659,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (xNick != NULL) {
LPCTSTR xszNick = XmlGetText(xNick);
if (xszNick != NULL && *xszNick) {
- debugLog(_T("Grabbed nick from presence: %s"), xszNick);
+ debugLog(L"Grabbed nick from presence: %s", xszNick);
tszNick = mir_tstrdup(xszNick);
}
}
@@ -1667,12 +1667,12 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) // automatically send authorization allowed to agent/transport
if (_tcschr(from, '@') == NULL || m_options.AutoAcceptAuthorization) {
ListAdd(LIST_ROSTER, from, hContact);
- info->send(XmlNode(_T("presence")) << XATTR(_T("to"), from) << XATTR(_T("type"), _T("subscribed")));
+ info->send(XmlNode(L"presence") << XATTR(L"to", from) << XATTR(L"type", L"subscribed"));
if (m_options.AutoAdd == TRUE) {
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from);
if (item == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
- debugLog(_T("Try adding contact automatically jid = %s"), from);
+ debugLog(L"Try adding contact automatically jid = %s", from);
if ((hContact = AddToListByJID(from, 0)) != NULL) {
if (item)
item->hContact = hContact;
@@ -1684,25 +1684,25 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) RebuildInfoFrame();
}
else {
- debugLog(_T("%s (%s) requests authorization"), tszNick, from);
+ debugLog(L"%s (%s) requests authorization", tszNick, from);
DBAddAuthRequest(from, tszNick);
}
return;
}
- if (!mir_tstrcmp(type, _T("unsubscribe")))
+ if (!mir_tstrcmp(type, L"unsubscribe"))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE);
- if (!mir_tstrcmp(type, _T("unsubscribed")))
+ if (!mir_tstrcmp(type, L"unsubscribed"))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED);
- if (!mir_tstrcmp(type, _T("error")))
+ if (!mir_tstrcmp(type, L"error"))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_ERROR);
- if (!mir_tstrcmp(type, _T("subscribed"))) {
+ if (!mir_tstrcmp(type, L"subscribed")) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBED);
@@ -1753,41 +1753,41 @@ void CJabberProto::OnIqResultVersion(HXML /*node*/, CJabberIqInfo *pInfo) BOOL CJabberProto::OnProcessJingle(HXML node)
{
LPCTSTR type;
- HXML child = XmlGetChildByTag(node, _T("jingle"), _T("xmlns"), JABBER_FEAT_JINGLE);
+ HXML child = XmlGetChildByTag(node, L"jingle", L"xmlns", JABBER_FEAT_JINGLE);
if (child) {
- if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return FALSE;
- if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
- LPCTSTR szAction = XmlGetAttrValue(child, _T("action"));
- LPCTSTR idStr = XmlGetAttrValue(node, _T("id"));
- LPCTSTR from = XmlGetAttrValue(node, _T("from"));
- if (szAction && !mir_tstrcmp(szAction, _T("session-initiate"))) {
+ if ((type = XmlGetAttrValue(node, L"type")) == NULL) return FALSE;
+ if ((!mir_tstrcmp(type, L"get") || !mir_tstrcmp(type, L"set"))) {
+ LPCTSTR szAction = XmlGetAttrValue(child, L"action");
+ LPCTSTR idStr = XmlGetAttrValue(node, L"id");
+ LPCTSTR from = XmlGetAttrValue(node, L"from");
+ if (szAction && !mir_tstrcmp(szAction, L"session-initiate")) {
// if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications"
- m_ThreadInfo->send(XmlNodeIq(_T("result"), idStr, from));
+ m_ThreadInfo->send(XmlNodeIq(L"result", idStr, from));
- XmlNodeIq iq(_T("set"), SerialNext(), from);
- HXML jingleNode = iq << XCHILDNS(_T("jingle"), JABBER_FEAT_JINGLE);
+ XmlNodeIq iq(L"set", SerialNext(), from);
+ HXML jingleNode = iq << XCHILDNS(L"jingle", JABBER_FEAT_JINGLE);
- jingleNode << XATTR(_T("action"), _T("session-terminate"));
- LPCTSTR szInitiator = XmlGetAttrValue(child, _T("initiator"));
+ jingleNode << XATTR(L"action", L"session-terminate");
+ LPCTSTR szInitiator = XmlGetAttrValue(child, L"initiator");
if (szInitiator)
- jingleNode << XATTR(_T("initiator"), szInitiator);
- LPCTSTR szSid = XmlGetAttrValue(child, _T("sid"));
+ jingleNode << XATTR(L"initiator", szInitiator);
+ LPCTSTR szSid = XmlGetAttrValue(child, L"sid");
if (szSid)
- jingleNode << XATTR(_T("sid"), szSid);
+ jingleNode << XATTR(L"sid", szSid);
- jingleNode << XCHILD(_T("reason"))
- << XCHILD(_T("unsupported-applications"));
+ jingleNode << XCHILD(L"reason")
+ << XCHILD(L"unsupported-applications");
m_ThreadInfo->send(iq);
return TRUE;
}
else {
// if it's something else than 'session-initiate' and noone processed it yet, reply with "unknown-session"
- XmlNodeIq iq(_T("error"), idStr, from);
- HXML errNode = iq << XCHILD(_T("error"));
- errNode << XATTR(_T("type"), _T("cancel"));
- errNode << XCHILDNS(_T("item-not-found"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
- errNode << XCHILDNS(_T("unknown-session"), _T("urn:xmpp:jingle:errors:1"));
+ XmlNodeIq iq(L"error", idStr, from);
+ HXML errNode = iq << XCHILD(L"error");
+ errNode << XATTR(L"type", L"cancel");
+ errNode << XCHILDNS(L"item-not-found", L"urn:ietf:params:xml:ns:xmpp-stanzas");
+ errNode << XCHILDNS(L"unknown-session", L"urn:xmpp:jingle:errors:1");
m_ThreadInfo->send(iq);
return TRUE;
}
@@ -1801,13 +1801,13 @@ void CJabberProto::OnProcessIq(HXML node) HXML queryNode;
const TCHAR *type, *xmlns;
- if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("iq"))) return;
- if ((type = XmlGetAttrValue(node, _T("type"))) == NULL) return;
+ if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"iq")) return;
+ if ((type = XmlGetAttrValue(node, L"type")) == NULL) return;
int id = JabberGetPacketID(node);
queryNode = XmlGetChild(node, "query");
- xmlns = XmlGetAttrValue(queryNode, _T("xmlns"));
+ xmlns = XmlGetAttrValue(queryNode, L"xmlns");
// new match by id
if (m_iqManager.HandleIq(id, node))
@@ -1822,7 +1822,7 @@ void CJabberProto::OnProcessIq(HXML node) return;
// RECVED: <iq type='error'> ...
- if (!mir_tstrcmp(type, _T("error"))) {
+ if (!mir_tstrcmp(type, L"error")) {
TCHAR tszBuf[20];
_itot(id, tszBuf, 10);
@@ -1839,15 +1839,15 @@ void CJabberProto::OnProcessIq(HXML node) }
}
}
- else if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
- XmlNodeIq iq(_T("error"), id, XmlGetAttrValue(node, _T("from")));
+ else if ((!mir_tstrcmp(type, L"get") || !mir_tstrcmp(type, L"set"))) {
+ XmlNodeIq iq(L"error", id, XmlGetAttrValue(node, L"from"));
HXML pFirstChild = XmlGetChild(node, 0);
if (pFirstChild)
XmlAddChild(iq, pFirstChild);
- iq << XCHILD(_T("error")) << XATTR(_T("type"), _T("cancel"))
- << XCHILDNS(_T("service-unavailable"), _T("urn:ietf:params:xml:ns:xmpp-stanzas"));
+ iq << XCHILD(L"error") << XATTR(L"type", L"cancel")
+ << XCHILDNS(L"service-unavailable", L"urn:ietf:params:xml:ns:xmpp-stanzas");
m_ThreadInfo->send(iq);
}
}
@@ -1857,9 +1857,9 @@ void CJabberProto::SetRegConfig(HXML node, void *from) {
if (m_regInfo && from) {
TCHAR text[MAX_PATH];
- mir_sntprintf(text, _T("%s@%S"), m_regInfo->conn.username, m_regInfo->conn.server);
- XmlNodeIq iq(_T("set"), SerialNext(), (TCHAR*)from);
- iq << XATTR(_T("from"), text);
+ mir_sntprintf(text, L"%s@%S", m_regInfo->conn.username, m_regInfo->conn.server);
+ XmlNodeIq iq(L"set", SerialNext(), (TCHAR*)from);
+ iq << XATTR(L"from", text);
HXML query = iq << XQUERY(JABBER_FEAT_REGISTER);
XmlAddChild(query, node);
m_regInfo->send(iq);
@@ -1868,28 +1868,28 @@ void CJabberProto::SetRegConfig(HXML node, void *from) void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info)
{
- if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), _T("iq"))) return;
- LPCTSTR type = XmlGetAttrValue(node, _T("type"));
+ if (!XmlGetName(node) || mir_tstrcmp(XmlGetName(node), L"iq")) return;
+ LPCTSTR type = XmlGetAttrValue(node, L"type");
if (type == NULL)
return;
int id = JabberGetPacketID(node);
- LPCTSTR from = XmlGetAttrValue(node, _T("from"));
+ LPCTSTR from = XmlGetAttrValue(node, L"from");
if (from == NULL)
return;
- if (!mir_tstrcmp(type, _T("result"))) {
- HXML queryNode = XmlGetChild(node, _T("query"));
+ if (!mir_tstrcmp(type, L"result")) {
+ HXML queryNode = XmlGetChild(node, L"query");
if (queryNode != NULL) {
- LPCTSTR str = XmlGetAttrValue(queryNode, _T("xmlns"));
+ LPCTSTR str = XmlGetAttrValue(queryNode, L"xmlns");
if (!mir_tstrcmp(str, JABBER_FEAT_REGISTER)) {
- HXML xNode = XmlGetChild(queryNode, _T("x"));
+ HXML xNode = XmlGetChild(queryNode, L"x");
if (xNode != NULL) {
- str = XmlGetAttrValue(xNode, _T("xmlns"));
+ str = XmlGetAttrValue(xNode, L"xmlns");
if (!mir_tstrcmp(str, JABBER_FEAT_DATA_FORMS)) {
m_regInfo = info;
- FormCreateDialog(xNode, _T("Jabber register new user"), &CJabberProto::SetRegConfig, mir_tstrdup(from));
+ FormCreateDialog(xNode, L"Jabber register new user", &CJabberProto::SetRegConfig, mir_tstrdup(from));
return;
}
}
@@ -1900,10 +1900,10 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) if (id == iqIdRegGetReg) {
iqIdRegSetReg = SerialNext();
- XmlNodeIq iq(_T("set"), iqIdRegSetReg);
+ XmlNodeIq iq(L"set", iqIdRegSetReg);
HXML query = iq << XQUERY(JABBER_FEAT_REGISTER);
- query << XCHILD(_T("password"), info->conn.password);
- query << XCHILD(_T("username"), info->conn.username);
+ query << XCHILD(L"password", info->conn.password);
+ query << XCHILD(L"username", info->conn.username);
info->send(iq);
SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 75, (LPARAM)TranslateT("Sending registration information..."));
@@ -1917,7 +1917,7 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info) }
}
- else if (!mir_tstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, L"error")) {
TCHAR *str = JabberErrorMsg(XmlGetChild(node, "error"));
SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)str);
mir_free(str);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 7601a92287..a4f11912b4 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -174,7 +174,7 @@ static HTREEITEM sttFillInfoLine(HWND hwndTree, HTREEITEM htiRoot, HICON hIcon, TCHAR buf[256]; if (title) - mir_sntprintf(buf, _T("%s: %s"), title, value); + mir_sntprintf(buf, L"%s: %s", title, value); else mir_tstrncpy(buf, value, _countof(buf)); @@ -227,7 +227,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti HICON hIcon = NULL; if ( ServiceExists(MS_FP_GETCLIENTICONT)) { if (r->m_tszSoftware != NULL) { - mir_sntprintf(buf, _T("%s %s"), r->m_tszSoftware, r->m_tszSoftwareVersion); + mir_sntprintf(buf, L"%s %s", r->m_tszSoftware, r->m_tszSoftwareVersion); hIcon = Finger_GetClientIcon(buf, 0); } } @@ -251,7 +251,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti // Resource priority TCHAR szPriority[128]; - mir_sntprintf(szPriority, _T("%d"), (int)r->m_iPriority); + mir_sntprintf(szPriority, L"%d", (int)r->m_iPriority); sttFillInfoLine(hwndTree, htiResource, NULL, TranslateT("Resource priority"), szPriority, sttInfoLineId(resource, INFOLINE_PRIORITY)); // Idle @@ -269,7 +269,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti sttFillInfoLine(hwndTree, htiResource, NULL, TranslateT("Idle since"), buf, sttInfoLineId(resource, INFOLINE_IDLE)); // caps - mir_sntprintf(buf, _T("%s/%s"), item->jid, r->m_tszResourceName); + mir_sntprintf(buf, L"%s/%s", item->jid, r->m_tszResourceName); JabberCapsBits jcb = ppro->GetResourceCapabilites(buf, TRUE); if (!(jcb & JABBER_RESOURCE_CAPS_ERROR)) { @@ -279,7 +279,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti if (jcb & g_JabberFeatCapPairs[i].jcbCap) { TCHAR szDescription[ 1024 ]; if (g_JabberFeatCapPairs[i].tszDescription) - mir_sntprintf(szDescription, _T("%s (%s)"), TranslateTS(g_JabberFeatCapPairs[i].tszDescription), g_JabberFeatCapPairs[i].szFeature); + mir_sntprintf(szDescription, L"%s (%s)", TranslateTS(g_JabberFeatCapPairs[i].tszDescription), g_JabberFeatCapPairs[i].szFeature); else _tcsncpy_s(szDescription, g_JabberFeatCapPairs[i].szFeature, _TRUNCATE); sttFillInfoLine(hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i)); @@ -289,7 +289,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti if (jcb & ppro->m_lstJabberFeatCapPairsDynamic[j]->jcbCap) { TCHAR szDescription[ 1024 ]; if (ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription) - mir_sntprintf(szDescription, _T("%s (%s)"), TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature); + mir_sntprintf(szDescription, L"%s (%s)", TranslateTS(ppro->m_lstJabberFeatCapPairsDynamic[j]->szDescription), ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature); else _tcsncpy_s(szDescription, ppro->m_lstJabberFeatCapPairsDynamic[j]->szFeature, _TRUNCATE); sttFillInfoLine(hwndTree, htiCaps, NULL, NULL, szDescription, sttInfoLineId(resource, INFOLINE_CAPS, i)); @@ -320,7 +320,7 @@ static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM ht if (szAdvStatusIcon && szAdvStatusTitle && *szAdvStatusTitle) { TCHAR szText[2048]; if (szAdvStatusText && *szAdvStatusText) - mir_sntprintf(szText, _T("%s (%s)"), TranslateTS(szAdvStatusTitle), szAdvStatusText); + mir_sntprintf(szText, L"%s (%s)", TranslateTS(szAdvStatusTitle), szAdvStatusText); else _tcsncpy_s(szText, TranslateTS(szAdvStatusTitle), _TRUNCATE); sttFillInfoLine(hwndTree, htiRoot, IcoLib_GetIcon(szAdvStatusIcon), szTitle, szText, dwInfoLine); @@ -337,7 +337,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM sttCleanupInfo(hwndTree, 0); - HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), _T("JID"), item->jid, sttInfoLineId(0, INFOLINE_NAME), true); + HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), L"JID", item->jid, sttInfoLineId(0, INFOLINE_NAME), true); TCHAR buf[256]; if (MCONTACT hContact = ppro->HContactFromJID(item->jid)) { @@ -408,7 +408,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM static void sttGetNodeText(HWND hwndTree, HTREEITEM hti, UserInfoStringBuf *buf, int indent = 0) { for (int i = 0; i < indent; i++) - buf->append(_T("\t")); + buf->append(L"\t"); TVITEMEX tvi = { 0 }; tvi.mask = TVIF_HANDLE | TVIF_TEXT | TVIF_STATE; @@ -422,7 +422,7 @@ static void sttGetNodeText(HWND hwndTree, HTREEITEM hti, UserInfoStringBuf *buf, } buf->actualize(); - buf->append(_T("\r\n")); + buf->append(L"\r\n"); if (tvi.state & TVIS_EXPANDED) for (hti = TreeView_GetChild(hwndTree, hti); hti; hti = TreeView_GetNextSibling(hwndTree, hti)) @@ -481,7 +481,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa if (dat->item == NULL) { HWND hwndTree = GetDlgItem(hwndDlg, IDC_TV_INFO); TreeView_DeleteAllItems(hwndTree); - HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, dat->ppro->LoadIconEx("main"), _T("JID"), jid, sttInfoLineId(0, INFOLINE_NAME), true); + HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, dat->ppro->LoadIconEx("main"), L"JID", jid, sttInfoLineId(0, INFOLINE_NAME), true); sttFillInfoLine(hwndTree, htiRoot, dat->ppro->LoadIconEx("vcard"), NULL, TranslateT("Please switch online to see more details.")); break; @@ -539,7 +539,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa tvi.cchTextMax = _countof(szBuffer); tvi.pszText = szBuffer; if (TreeView_GetItem(hwndTree, &tvi)) { - if (TCHAR *str = _tcsstr(szBuffer, _T(": "))) + if (TCHAR *str = _tcsstr(szBuffer, L": ")) JabberCopyText(hwndDlg, str + 2); else JabberCopyText(hwndDlg, szBuffer); @@ -649,7 +649,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP item = photoInfo->ppro->ListGetItemPtr(LIST_ROSTER, jid); if (item != NULL) { if (item->photoFileName) { - photoInfo->ppro->debugLog(_T("Showing picture from %s"), item->photoFileName); + photoInfo->ppro->debugLog(L"Showing picture from %s", item->photoFileName); photoInfo->hBitmap = Bitmap_Load(item->photoFileName); FIP->FI_Premultiply(photoInfo->hBitmap); ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_SHOW); @@ -677,19 +677,19 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP switch (ProtoGetAvatarFileFormat(item->photoFileName)) { case PA_FORMAT_BMP: - mir_sntprintf(szFilter, _T("BMP %s (*.bmp)%c*.BMP"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"BMP %s (*.bmp)%c*.BMP", TranslateT("format"), 0); break; case PA_FORMAT_GIF: - mir_sntprintf(szFilter, _T("GIF %s (*.gif)%c*.GIF"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"GIF %s (*.gif)%c*.GIF", TranslateT("format"), 0); break; case PA_FORMAT_JPEG: - mir_sntprintf(szFilter, _T("JPEG %s (*.jpg;*.jpeg)%c*.JPG;*.JPEG"), TranslateT("format"), 0); + mir_sntprintf(szFilter, L"JPEG %s (*.jpg;*.jpeg)%c*.JPG;*.JPEG", TranslateT("format"), 0); break; default: - mir_sntprintf(szFilter, _T("%s (*.*)%c*.*"), TranslateT("Unknown format"), 0); + mir_sntprintf(szFilter, L"%s (*.*)%c*.*", TranslateT("Unknown format"), 0); } TCHAR szFileName[MAX_PATH]; szFileName[0] = '\0'; @@ -701,7 +701,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP ofn.nMaxFile = _MAX_PATH; ofn.Flags = OFN_OVERWRITEPROMPT; if (GetSaveFileName(&ofn)) { - photoInfo->ppro->debugLog(_T("File selected is %s"), szFileName); + photoInfo->ppro->debugLog(L"File selected is %s", szFileName); CopyFile(item->photoFileName, szFileName, FALSE); } } diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 8b1f200a44..e4da6b2df3 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -69,7 +69,7 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, bool bStripResource) TCHAR* __stdcall JabberNickFromJID(const TCHAR *jid)
{
if (jid == NULL)
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
const TCHAR *p = _tcschr(jid, '@');
if (p == NULL)
@@ -181,7 +181,7 @@ void __stdcall JabberHttpUrlDecode(TCHAR *str) if (str == NULL) return;
for (p = q = (TCHAR*)str; *p != '\0'; p++, q++) {
if (*p == '%' && *(p + 1) != '\0' && isxdigit(*(p + 1)) && *(p + 2) != '\0' && isxdigit(*(p + 2))) {
- _stscanf((TCHAR*)p + 1, _T("%2x"), &code);
+ _stscanf((TCHAR*)p + 1, L"%2x", &code);
*q = (unsigned char)code;
p += 2;
}
@@ -258,24 +258,24 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode) if (errorNode == NULL) {
if (pErrorCode)
*pErrorCode = -1;
- mir_sntprintf(errorStr, 256, _T("%s -1: %s"), TranslateT("Error"), TranslateT("Unknown error message"));
+ mir_sntprintf(errorStr, 256, L"%s -1: %s", TranslateT("Error"), TranslateT("Unknown error message"));
return errorStr;
}
int errorCode = -1;
- const TCHAR *str = XmlGetAttrValue(errorNode, _T("code"));
+ const TCHAR *str = XmlGetAttrValue(errorNode, L"code");
if (str != NULL)
errorCode = _ttoi(str);
str = XmlGetText(errorNode);
if (str == NULL)
- str = XmlGetText(XmlGetChild(errorNode, _T("text")));
+ str = XmlGetText(XmlGetChild(errorNode, L"text"));
if (str == NULL) {
for (int i = 0;; i++) {
HXML c = XmlGetChild(errorNode, i);
if (c == NULL) break;
- const TCHAR *attr = XmlGetAttrValue(c, _T("xmlns"));
- if (attr && !mir_tstrcmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) {
+ const TCHAR *attr = XmlGetAttrValue(c, L"xmlns");
+ if (attr && !mir_tstrcmp(attr, L"urn:ietf:params:xml:ns:xmpp-stanzas")) {
str = XmlGetName(c);
break;
}
@@ -283,9 +283,9 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode) }
if (str != NULL)
- mir_sntprintf(errorStr, 256, _T("%s %d: %s\r\n%s"), TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)), str);
+ mir_sntprintf(errorStr, 256, L"%s %d: %s\r\n%s", TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)), str);
else
- mir_sntprintf(errorStr, 256, _T("%s %d: %s"), TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)));
+ mir_sntprintf(errorStr, 256, L"%s %d: %s", TranslateT("Error"), errorCode, TranslateTS(JabberErrorStr(errorCode)));
if (pErrorCode)
*pErrorCode = errorCode;
@@ -308,7 +308,7 @@ void CJabberProto::SendVisibleInvisiblePresence(BOOL invisible) WORD apparentMode = getWord(hContact, "ApparentMode", 0);
if (invisible == TRUE && apparentMode == ID_STATUS_OFFLINE)
- m_ThreadInfo->send(XmlNode(_T("presence")) << XATTR(_T("to"), item->jid) << XATTR(_T("type"), _T("invisible")));
+ m_ThreadInfo->send(XmlNode(L"presence") << XATTR(L"to", item->jid) << XATTR(L"type", L"invisible"));
else if (invisible == FALSE && apparentMode == ID_STATUS_ONLINE)
SendPresenceTo(m_iStatus, item->jid, NULL);
}
@@ -354,7 +354,7 @@ time_t __stdcall JabberIsoToUnixTime(const TCHAR *stamp) for (; *p != '\0' && !isdigit(*p); p++);
// Parse time
- if (_stscanf(p, _T("%d:%d:%d"), ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3)
+ if (_stscanf(p, L"%d:%d:%d", ×tamp.tm_hour, ×tamp.tm_min, ×tamp.tm_sec) != 3)
return (time_t)0;
timestamp.tm_isdst = 0; // DST is already present in _timezone below
@@ -376,16 +376,16 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const TCHAR szPriority[40];
_itot(iPriority, szPriority, 10);
- XmlNode p(_T("presence")); p << XCHILD(_T("priority"), szPriority);
+ XmlNode p(L"presence"); p << XCHILD(L"priority", szPriority);
if (to != NULL)
- p << XATTR(_T("to"), to);
+ p << XATTR(L"to", to);
if (extra)
XmlAddChild(p, extra);
// XEP-0115:Entity Capabilities
- HXML c = p << XCHILDNS(_T("c"), JABBER_FEAT_ENTITY_CAPS) << XATTR(_T("node"), JABBER_CAPS_MIRANDA_NODE)
- << XATTR(_T("ver"), szCoreVersion);
+ HXML c = p << XCHILDNS(L"c", JABBER_FEAT_ENTITY_CAPS) << XATTR(L"node", JABBER_CAPS_MIRANDA_NODE)
+ << XATTR(L"ver", szCoreVersion);
LIST<TCHAR> arrExtCaps(5);
if (bSecureIM)
@@ -430,17 +430,17 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const szExtCaps.AppendChar(' ');
szExtCaps += arrExtCaps[i];
}
- XmlAddAttr(c, _T("ext"), szExtCaps);
+ XmlAddAttr(c, L"ext", szExtCaps);
}
if (m_options.EnableAvatars) {
- HXML x = p << XCHILDNS(_T("x"), _T("vcard-temp:x:update"));
+ HXML x = p << XCHILDNS(L"x", L"vcard-temp:x:update");
ptrA hashValue(getStringA("AvatarHash"));
if (hashValue != NULL) // XEP-0153: vCard-Based Avatars
- x << XCHILD(_T("photo"), _A2T(hashValue));
+ x << XCHILD(L"photo", _A2T(hashValue));
else
- x << XCHILD(_T("photo"));
+ x << XCHILD(L"photo");
}
{
mir_cslock lck(m_csModeMsgMutex);
@@ -449,25 +449,25 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const if (!msg) msg = m_modeMsgs.szOnline;
break;
case ID_STATUS_INVISIBLE:
- p << XATTR(_T("type"), _T("invisible"));
+ p << XATTR(L"type", L"invisible");
break;
case ID_STATUS_AWAY:
case ID_STATUS_ONTHEPHONE:
case ID_STATUS_OUTTOLUNCH:
- p << XCHILD(_T("show"), _T("away"));
+ p << XCHILD(L"show", L"away");
if (!msg) msg = m_modeMsgs.szAway;
break;
case ID_STATUS_NA:
- p << XCHILD(_T("show"), _T("xa"));
+ p << XCHILD(L"show", L"xa");
if (!msg) msg = m_modeMsgs.szNa;
break;
case ID_STATUS_DND:
case ID_STATUS_OCCUPIED:
- p << XCHILD(_T("show"), _T("dnd"));
+ p << XCHILD(L"show", L"dnd");
if (!msg) msg = m_modeMsgs.szDnd;
break;
case ID_STATUS_FREECHAT:
- p << XCHILD(_T("show"), _T("chat"));
+ p << XCHILD(L"show", L"chat");
if (!msg) msg = m_modeMsgs.szFreechat;
break;
default: // Should not reach here
@@ -475,7 +475,7 @@ void CJabberProto::SendPresenceTo(int status, const TCHAR* to, HXML extra, const }
if (msg)
- p << XCHILD(_T("status"), msg);
+ p << XCHILD(L"status", msg);
}
m_ThreadInfo->send(p);
@@ -493,7 +493,7 @@ void CJabberProto::SendPresence(int status, bool bSendToAll) JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
if (item != NULL && item->nick != NULL) {
TCHAR text[1024];
- mir_sntprintf(text, _T("%s/%s"), item->jid, item->nick);
+ mir_sntprintf(text, L"%s/%s", item->jid, item->nick);
SendPresenceTo(status == ID_STATUS_INVISIBLE ? ID_STATUS_ONLINE : status, text, NULL);
}
}
@@ -505,7 +505,7 @@ void CJabberProto::SendPresence(int status, bool bSendToAll) int __stdcall JabberGetPacketID(HXML n)
{
- const TCHAR *str = XmlGetAttrValue(n, _T("id"));
+ const TCHAR *str = XmlGetAttrValue(n, L"id");
if (str)
if (!_tcsncmp(str, _T(JABBER_IQID), _countof(JABBER_IQID) - 1))
return _ttoi(str + _countof(JABBER_IQID) - 1);
@@ -516,7 +516,7 @@ int __stdcall JabberGetPacketID(HXML n) TCHAR* __stdcall JabberId2string(int id)
{
TCHAR text[100];
- mir_sntprintf(text, _T(JABBER_IQID) _T("%d"), id);
+ mir_sntprintf(text, _T(JABBER_IQID) L"%d", id);
return mir_tstrdup(text);
}
@@ -543,7 +543,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) mir_cslock lck(m_csLists);
JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid);
if (LI != NULL) {
- if (LI->arResources.getCount() == 1 && !mir_tstrcmp(LI->arResources[0]->m_tszCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) {
+ if (LI->arResources.getCount() == 1 && !mir_tstrcmp(LI->arResources[0]->m_tszCapsNode, L"http://talk.google.com/xmpp/bot/caps")) {
if (p) *p = 0;
return dest;
}
@@ -551,7 +551,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) if (p == NULL) {
pResourceStatus r(LI->getBestResource());
if (r != NULL)
- mir_sntprintf(dest, destLen, _T("%s/%s"), jid, r->m_tszResourceName);
+ mir_sntprintf(dest, destLen, L"%s/%s", jid, r->m_tszResourceName);
}
}
@@ -582,17 +582,17 @@ TCHAR* __stdcall JabberStripJid(const TCHAR *jid, TCHAR *dest, size_t destLen) LPCTSTR __stdcall JabberGetPictureType(HXML node, const char *picBuf)
{
if (LPCTSTR ptszType = XmlGetText(XmlGetChild(node, "TYPE")))
- if (!mir_tstrcmp(ptszType, _T("image/jpeg")) ||
- !mir_tstrcmp(ptszType, _T("image/png")) ||
- !mir_tstrcmp(ptszType, _T("image/gif")) ||
- !mir_tstrcmp(ptszType, _T("image/bmp")))
+ if (!mir_tstrcmp(ptszType, L"image/jpeg") ||
+ !mir_tstrcmp(ptszType, L"image/png") ||
+ !mir_tstrcmp(ptszType, L"image/gif") ||
+ !mir_tstrcmp(ptszType, L"image/bmp"))
return ptszType;
switch (ProtoGetBufferFormat(picBuf)) {
- case PA_FORMAT_GIF: return _T("image/gif");
- case PA_FORMAT_BMP: return _T("image/bmp");
- case PA_FORMAT_PNG: return _T("image/png");
- case PA_FORMAT_JPEG: return _T("image/jpeg");
+ case PA_FORMAT_GIF: return L"image/gif";
+ case PA_FORMAT_BMP: return L"image/bmp";
+ case PA_FORMAT_PNG: return L"image/png";
+ case PA_FORMAT_JPEG: return L"image/jpeg";
}
return NULL;
@@ -664,7 +664,7 @@ void CJabberProto::ComboLoadRecentStrings(HWND hwndDlg, UINT idcCombo, char *par }
if (!SendDlgItemMessage(hwndDlg, idcCombo, CB_GETCOUNT, 0, 0))
- SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)L"");
}
void CJabberProto::ComboAddRecentString(HWND hwndDlg, UINT idcCombo, char *param, const TCHAR *string, int recentCount)
@@ -676,7 +676,7 @@ void CJabberProto::ComboAddRecentString(HWND hwndDlg, UINT idcCombo, char *param int id;
SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, (LPARAM)string);
- if ((id = SendDlgItemMessage(hwndDlg, idcCombo, CB_FINDSTRING, (WPARAM)-1, (LPARAM)_T(""))) != CB_ERR)
+ if ((id = SendDlgItemMessage(hwndDlg, idcCombo, CB_FINDSTRING, (WPARAM)-1, (LPARAM)L"")) != CB_ERR)
SendDlgItemMessage(hwndDlg, idcCombo, CB_DELETESTRING, id, 0);
id = getByte(param, 0);
@@ -758,7 +758,7 @@ void CJabberProto::RebuildInfoFrame() TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen)
{
struct tm* T = gmtime(&_time);
- mir_sntprintf(buf, bufLen, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
+ mir_sntprintf(buf, bufLen, L"%04d-%02d-%02dT%02d:%02d:%02dZ",
T->tm_year + 1900, T->tm_mon + 1, T->tm_mday, T->tm_hour, T->tm_min, T->tm_sec);
return buf;
}
@@ -766,9 +766,9 @@ TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen) time_t str2time(const TCHAR *buf)
{
struct tm T = { 0 };
- if (_stscanf(buf, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"), &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec) != 6) {
+ if (_stscanf(buf, L"%04d-%02d-%02dT%02d:%02d:%02dZ", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec) != 6) {
int boo;
- if (_stscanf(buf, _T("%04d-%02d-%02dT%02d:%02d:%02d.%dZ"), &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7)
+ if (_stscanf(buf, L"%04d-%02d-%02dT%02d:%02d:%02d.%dZ", &T.tm_year, &T.tm_mon, &T.tm_mday, &T.tm_hour, &T.tm_min, &T.tm_sec, &boo) != 7)
return 0;
}
@@ -837,11 +837,11 @@ BOOL CJabberProto::EnterString(CMString &result, LPCTSTR caption, int type, char bool JabberReadXep203delay(HXML node, time_t &msgTime)
{
- HXML n = XmlGetChildByTag(node, "delay", "xmlns", _T("urn:xmpp:delay"));
+ HXML n = XmlGetChildByTag(node, "delay", "xmlns", L"urn:xmpp:delay");
if (n == NULL)
return false;
- const TCHAR *ptszTimeStamp = XmlGetAttrValue(n, _T("stamp"));
+ const TCHAR *ptszTimeStamp = XmlGetAttrValue(n, L"stamp");
if (ptszTimeStamp == NULL)
return false;
@@ -927,13 +927,13 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) TCHAR tszFileName[MAX_PATH];
GetAvatarFileName(ai.hContact, tszFileName, _countof(tszFileName));
_tcsncpy_s(ai.filename, tszFileName, _TRUNCATE);
- FILE* out = _tfopen(tszFileName, _T("wb"));
+ FILE* out = _tfopen(tszFileName, L"wb");
if (out != NULL) {
fwrite(res->pData, res->dataLength, 1, out);
fclose(out);
setString(ai.hContact, "AvatarSaved", buffer);
ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0);
- debugLog(_T("Broadcast new avatar: %s"), ai.filename);
+ debugLog(L"Broadcast new avatar: %s", ai.filename);
}
else ProtoBroadcastAck(ai.hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0);
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 8ad9ff1164..ad0f752bb2 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -36,8 +36,8 @@ int CJabberProto::SendGetVcard(const TCHAR *jid) if (!m_bJabberOnline) return 0;
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultGetVcard, JABBER_IQ_TYPE_GET, jid);
- m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP)
- << XATTR(_T("prodid"), _T("-//HandGen//NONSGML vGen v1.0//EN")) << XATTR(_T("version"), _T("2.0")));
+ m_ThreadInfo->send(XmlNodeIq(pInfo) << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP)
+ << XATTR(L"prodid", L"-//HandGen//NONSGML vGen v1.0//EN") << XATTR(L"version", L"2.0"));
return pInfo->GetIqId();
}
@@ -291,9 +291,9 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dat->ppro->GetAvatarFileName(NULL, szAvatarFileName, _countof(szAvatarFileName));
if (_taccess(szAvatarFileName, 0) == 0) {
if (GetTempPath(_countof(szTempPath), szTempPath) <= 0)
- mir_tstrcpy(szTempPath, _T(".\\"));
- if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
- dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
+ mir_tstrcpy(szTempPath, L".\\");
+ if (GetTempFileName(szTempPath, L"jab", 0, szTempFileName) > 0) {
+ dat->ppro->debugLog(L"Temp file = %s", szTempFileName);
if (CopyFile(szAvatarFileName, szTempFileName, FALSE) == TRUE) {
if ((dat->hBitmap = Bitmap_Load(szTempFileName)) != NULL) {
FIP->FI_Premultiply(dat->hBitmap);
@@ -349,16 +349,16 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR struct _stat st;
HBITMAP hNewBitmap;
- dat->ppro->debugLog(_T("File selected is %s"), szFileName);
+ dat->ppro->debugLog(L"File selected is %s", szFileName);
if (_tstat(szFileName, &st) < 0 || st.st_size > 40 * 1024) {
MessageBox(hwndDlg, TranslateT("Only JPG, GIF, and BMP image files smaller than 40 KB are supported."), TranslateT("Jabber vCard"), MB_OK | MB_SETFOREGROUND);
break;
}
if (GetTempPath(_countof(szTempPath), szTempPath) <= 0)
- mir_tstrcpy(szTempPath, _T(".\\"));
+ mir_tstrcpy(szTempPath, L".\\");
- if (GetTempFileName(szTempPath, _T("jab"), 0, szTempFileName) > 0) {
- dat->ppro->debugLog(_T("Temp file = %s"), szTempFileName);
+ if (GetTempFileName(szTempPath, L"jab", 0, szTempFileName) > 0) {
+ dat->ppro->debugLog(L"Temp file = %s", szTempFileName);
if (CopyFile(szFileName, szTempFileName, FALSE) == TRUE) {
if ((hNewBitmap = Bitmap_Load(szTempFileName)) != NULL) {
if (dat->hBitmap) {
@@ -733,7 +733,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP ptrT email( ppro->getTStringA(idstr));
if (email == NULL) break;
- mir_sntprintf(number, _T("%d"), i+1);
+ mir_sntprintf(number, L"%d", i+1);
lvi.pszText = number;
lvi.lParam = (LPARAM)i;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
@@ -754,7 +754,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP ptrT phone( ppro->getTStringA(idstr));
if (phone == NULL) break;
- mir_sntprintf(number, _T("%d"), i+1);
+ mir_sntprintf(number, L"%d", i+1);
lvi.pszText = number;
lvi.lParam = (LPARAM)i;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
@@ -1018,11 +1018,11 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) char idstr[33];
XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultSetVcard, JABBER_IQ_TYPE_SET));
- HXML v = iq << XCHILDNS(_T("vCard"), JABBER_FEAT_VCARD_TEMP);
+ HXML v = iq << XCHILDNS(L"vCard", JABBER_FEAT_VCARD_TEMP);
AppendVcardFromDB(v, "FN", "FullName");
- HXML n = v << XCHILD(_T("N"));
+ HXML n = v << XCHILD(L"N");
AppendVcardFromDB(n, "GIVEN", "FirstName");
AppendVcardFromDB(n, "MIDDLE", "MiddleName");
AppendVcardFromDB(n, "FAMILY", "LastName");
@@ -1037,19 +1037,19 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (email == NULL)
break;
- HXML e = v << XCHILD(_T("EMAIL"), email);
+ HXML e = v << XCHILD(L"EMAIL", email);
AppendVcardFromDB(e, "USERID", idstr);
mir_snprintf(idstr, "e-mailFlag%d", i);
WORD nFlag = getWord(idstr, 0);
- if (nFlag & JABBER_VCEMAIL_HOME) e << XCHILD(_T("HOME"));
- if (nFlag & JABBER_VCEMAIL_WORK) e << XCHILD(_T("WORK"));
- if (nFlag & JABBER_VCEMAIL_INTERNET) e << XCHILD(_T("INTERNET"));
- if (nFlag & JABBER_VCEMAIL_X400) e << XCHILD(_T("X400"));
+ if (nFlag & JABBER_VCEMAIL_HOME) e << XCHILD(L"HOME");
+ if (nFlag & JABBER_VCEMAIL_WORK) e << XCHILD(L"WORK");
+ if (nFlag & JABBER_VCEMAIL_INTERNET) e << XCHILD(L"INTERNET");
+ if (nFlag & JABBER_VCEMAIL_X400) e << XCHILD(L"X400");
}
- n = v << XCHILD(_T("ADR"));
- n << XCHILD(_T("HOME"));
+ n = v << XCHILD(L"ADR");
+ n << XCHILD(L"HOME");
AppendVcardFromDB(n, "STREET", "Street");
AppendVcardFromDB(n, "EXTADR", "Street2");
AppendVcardFromDB(n, "EXTADD", "Street2"); // for compatibility with client using old vcard format
@@ -1059,8 +1059,8 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) AppendVcardFromDB(n, "CTRY", "Country");
AppendVcardFromDB(n, "COUNTRY", "Country"); // for compatibility with client using old vcard format
- n = v << XCHILD(_T("ADR"));
- n << XCHILD(_T("WORK"));
+ n = v << XCHILD(L"ADR");
+ n << XCHILD(L"WORK");
AppendVcardFromDB(n, "STREET", "CompanyStreet");
AppendVcardFromDB(n, "EXTADR", "CompanyStreet2");
AppendVcardFromDB(n, "EXTADD", "CompanyStreet2"); // for compatibility with client using old vcard format
@@ -1070,7 +1070,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) AppendVcardFromDB(n, "CTRY", "CompanyCountry");
AppendVcardFromDB(n, "COUNTRY", "CompanyCountry"); // for compatibility with client using old vcard format
- n = v << XCHILD(_T("ORG"));
+ n = v << XCHILD(L"ORG");
AppendVcardFromDB(n, "ORGNAME", "Company");
AppendVcardFromDB(n, "ORGUNIT", "CompanyDepartment");
@@ -1085,23 +1085,23 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (phone == NULL)
break;
- n = v << XCHILD(_T("TEL"));
+ n = v << XCHILD(L"TEL");
AppendVcardFromDB(n, "NUMBER", idstr);
mir_snprintf(idstr, "PhoneFlag%d", i);
WORD nFlag = getWord(idstr, 0);
- if (nFlag & JABBER_VCTEL_HOME) n << XCHILD(_T("HOME"));
- if (nFlag & JABBER_VCTEL_WORK) n << XCHILD(_T("WORK"));
- if (nFlag & JABBER_VCTEL_VOICE) n << XCHILD(_T("VOICE"));
- if (nFlag & JABBER_VCTEL_FAX) n << XCHILD(_T("FAX"));
- if (nFlag & JABBER_VCTEL_PAGER) n << XCHILD(_T("PAGER"));
- if (nFlag & JABBER_VCTEL_MSG) n << XCHILD(_T("MSG"));
- if (nFlag & JABBER_VCTEL_CELL) n << XCHILD(_T("CELL"));
- if (nFlag & JABBER_VCTEL_VIDEO) n << XCHILD(_T("VIDEO"));
- if (nFlag & JABBER_VCTEL_BBS) n << XCHILD(_T("BBS"));
- if (nFlag & JABBER_VCTEL_MODEM) n << XCHILD(_T("MODEM"));
- if (nFlag & JABBER_VCTEL_ISDN) n << XCHILD(_T("ISDN"));
- if (nFlag & JABBER_VCTEL_PCS) n << XCHILD(_T("PCS"));
+ if (nFlag & JABBER_VCTEL_HOME) n << XCHILD(L"HOME");
+ if (nFlag & JABBER_VCTEL_WORK) n << XCHILD(L"WORK");
+ if (nFlag & JABBER_VCTEL_VOICE) n << XCHILD(L"VOICE");
+ if (nFlag & JABBER_VCTEL_FAX) n << XCHILD(L"FAX");
+ if (nFlag & JABBER_VCTEL_PAGER) n << XCHILD(L"PAGER");
+ if (nFlag & JABBER_VCTEL_MSG) n << XCHILD(L"MSG");
+ if (nFlag & JABBER_VCTEL_CELL) n << XCHILD(L"CELL");
+ if (nFlag & JABBER_VCTEL_VIDEO) n << XCHILD(L"VIDEO");
+ if (nFlag & JABBER_VCTEL_BBS) n << XCHILD(L"BBS");
+ if (nFlag & JABBER_VCTEL_MODEM) n << XCHILD(L"MODEM");
+ if (nFlag & JABBER_VCTEL_ISDN) n << XCHILD(L"ISDN");
+ if (nFlag & JABBER_VCTEL_PCS) n << XCHILD(L"PCS");
}
TCHAR szAvatarName[MAX_PATH], *szFileName;
@@ -1112,15 +1112,15 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) szFileName = szAvatarName;
// Set photo element, also update the global jabberVcardPhotoFileName to reflect the update
- debugLog(_T("Before update, file name = %s"), szFileName);
+ debugLog(L"Before update, file name = %s", szFileName);
if (szFileName == NULL || szFileName[0] == 0) {
- v << XCHILD(_T("PHOTO"));
+ v << XCHILD(L"PHOTO");
DeleteFile(szAvatarName);
delSetting("AvatarSaved");
delSetting("AvatarHash");
}
else {
- debugLog(_T("Saving picture from %s"), szFileName);
+ debugLog(L"Saving picture from %s", szFileName);
struct _stat st;
if (_tstat(szFileName, &st) >= 0) {
@@ -1133,16 +1133,16 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName) if (ReadFile(hFile, buffer, st.st_size, &nRead, NULL)) {
ptrA str(mir_base64_encode((PBYTE)(LPSTR)buffer, nRead));
if (str != NULL) {
- n = v << XCHILD(_T("PHOTO"));
+ n = v << XCHILD(L"PHOTO");
TCHAR *szFileType;
switch (ProtoGetBufferFormat(buffer)) {
- case PA_FORMAT_PNG: szFileType = _T("image/png"); break;
- case PA_FORMAT_GIF: szFileType = _T("image/gif"); break;
- case PA_FORMAT_BMP: szFileType = _T("image/bmp"); break;
- default: szFileType = _T("image/jpeg"); break;
+ case PA_FORMAT_PNG: szFileType = L"image/png"; break;
+ case PA_FORMAT_GIF: szFileType = L"image/gif"; break;
+ case PA_FORMAT_BMP: szFileType = L"image/bmp"; break;
+ default: szFileType = L"image/jpeg"; break;
}
- n << XCHILD(_T("TYPE"), szFileType);
- n << XCHILD(_T("BINVAL"), _A2T(str));
+ n << XCHILD(L"TYPE", szFileType);
+ n << XCHILD(L"BINVAL", _A2T(str));
// NEED TO UPDATE OUR AVATAR HASH:
BYTE digest[MIR_SHA1_HASH_SIZE];
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 37f15c2dce..f4626e8921 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -34,49 +34,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // XmlNodeIq class members
XmlNodeIq::XmlNodeIq(const TCHAR *type, int id, LPCTSTR to) :
- XmlNode(_T("iq"))
+ XmlNode(L"iq")
{
- if (type != NULL) *this << XATTR(_T("type"), type);
- if (to != NULL) *this << XATTR(_T("to"), to);
+ if (type != NULL) *this << XATTR(L"type", type);
+ if (to != NULL) *this << XATTR(L"to", to);
if (id != -1 ) *this << XATTRID(id);
}
XmlNodeIq::XmlNodeIq(const TCHAR *type, LPCTSTR idStr, LPCTSTR to) :
- XmlNode(_T("iq"))
+ XmlNode(L"iq")
{
- if (type != NULL) *this << XATTR(_T("type"), type );
- if (to != NULL) *this << XATTR(_T("to"), to );
- if (idStr != NULL) *this << XATTR(_T("id"), idStr);
+ if (type != NULL) *this << XATTR(L"type", type );
+ if (to != NULL) *this << XATTR(L"to", to );
+ if (idStr != NULL) *this << XATTR(L"id", idStr);
}
XmlNodeIq::XmlNodeIq(const TCHAR *type, HXML node, LPCTSTR to) :
- XmlNode(_T("iq"))
+ XmlNode(L"iq")
{
- if (type != NULL) *this << XATTR(_T("type"), type );
- if (to != NULL) *this << XATTR(_T("to"), to );
+ if (type != NULL) *this << XATTR(L"type", type );
+ if (to != NULL) *this << XATTR(L"to", to );
if (node != NULL) {
- const TCHAR *iqId = XmlGetAttrValue(*this, _T("id"));
- if (iqId != NULL) *this << XATTR(_T("id"), iqId);
+ const TCHAR *iqId = XmlGetAttrValue(*this, L"id");
+ if (iqId != NULL) *this << XATTR(L"id", iqId);
}
}
XmlNodeIq::XmlNodeIq(CJabberIqInfo *pInfo) :
- XmlNode(_T("iq"))
+ XmlNode(L"iq")
{
if (pInfo) {
- if (pInfo->GetCharIqType() != NULL) *this << XATTR(_T("type"), _A2T(pInfo->GetCharIqType()));
- if (pInfo->GetReceiver() != NULL) *this << XATTR(_T("to"), pInfo->GetReceiver());
+ if (pInfo->GetCharIqType() != NULL) *this << XATTR(L"type", _A2T(pInfo->GetCharIqType()));
+ if (pInfo->GetReceiver() != NULL) *this << XATTR(L"to", pInfo->GetReceiver());
if (pInfo->GetIqId() != -1) *this << XATTRID(pInfo->GetIqId());
}
}
XmlNodeIq::XmlNodeIq(const TCHAR *type, CJabberIqInfo *pInfo) :
- XmlNode(_T("iq"))
+ XmlNode(L"iq")
{
- if (type != NULL) *this << XATTR(_T("type"), type);
+ if (type != NULL) *this << XATTR(L"type", type);
if (pInfo) {
- if (pInfo->GetFrom() != NULL) *this << XATTR(_T("to"), pInfo->GetFrom());
- if (pInfo->GetIdStr() != NULL) *this << XATTR(_T("id"), pInfo->GetIdStr());
+ if (pInfo->GetFrom() != NULL) *this << XATTR(L"to", pInfo->GetFrom());
+ if (pInfo->GetIdStr() != NULL) *this << XATTR(L"id", pInfo->GetIdStr());
}
}
@@ -118,15 +118,15 @@ XmlNode::~XmlNode() HXML __fastcall operator<<(HXML node, const XCHILDNS& child)
{
HXML res = XmlAddChild(node, child.name);
- XmlAddAttr(res, _T("xmlns"), child.ns);
+ XmlAddAttr(res, L"xmlns", child.ns);
return res;
}
HXML __fastcall operator<<(HXML node, const XQUERY& child)
{
- HXML n = XmlAddChild(node, _T("query"));
+ HXML n = XmlAddChild(node, L"query");
if (n)
- XmlAddAttr(n, _T("xmlns"), child.ns);
+ XmlAddAttr(n, L"xmlns", child.ns);
return n;
}
@@ -154,8 +154,8 @@ void __fastcall XmlAddAttr(HXML hXml, LPCTSTR pszName, unsigned __int64 value) void __fastcall XmlAddAttrID(HXML hXml, int id)
{
TCHAR text[100];
- mir_sntprintf(text, _T(JABBER_IQID) _T("%d"), id);
- XmlAddAttr(hXml, _T("id"), text);
+ mir_sntprintf(text, _T(JABBER_IQID) L"%d", id);
+ XmlAddAttr(hXml, L"id", text);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -294,7 +294,7 @@ void XPath::ProcessPath(LookupInfo &info, bool bCreate) }
else if (info.nodeIndex) {
int idx = _ttoi(info.nodeIndex.p);
- m_hXml = mir_tstrcmp(nodeName, _T("*")) ? XmlGetNthChild(m_hXml, nodeName, idx) : XmlGetChild(m_hXml, idx - 1);
+ m_hXml = mir_tstrcmp(nodeName, L"*") ? XmlGetNthChild(m_hXml, nodeName, idx) : XmlGetChild(m_hXml, idx - 1);
}
else {
HXML hXml = XmlGetChild(m_hXml, nodeName);
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index d00df9a780..685336b35c 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -215,9 +215,9 @@ HXML __fastcall operator<<(HXML node, const XQUERY& child); // Samples:
// LPCTSTR s = XPathT(node, "child/subchild[@attr='value']"); // get node text
// LPCTSTR s = XPathT(node, "child/subchild[2]/@attr"); // get attribute value
-// XPathT(node, "child/subchild[@name='test']/@attr") = _T("Hello"); // create path if needed and set attribute value
+// XPathT(node, "child/subchild[@name='test']/@attr") = L"Hello"; // create path if needed and set attribute value
//
-// XPathT(node, "child/subchild[@name='test']") = _T("Hello"); // TODO: create path if needed and set node text
+// XPathT(node, "child/subchild[@name='test']") = L"Hello"; // TODO: create path if needed and set node text
#define XPathT(a,b) XPath(a, _T(b))
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4982f6fe1f..e9bacc1e5d 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -286,7 +286,7 @@ void CJabberDlgPepSimple::cbModes_OnChange(CCtrlData *) mir_snprintf(szSetting, "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name);
ptrT szDescr( m_proto->getTStringA(szSetting));
- m_txtDescription.SetText((szDescr != NULL) ? szDescr : _T(""));
+ m_txtDescription.SetText((szDescr != NULL) ? szDescr : L"");
m_txtDescription.Enable(true);
}
else {
@@ -341,7 +341,7 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam) if (mode->m_subitem) {
for (int i = lpdis->itemData; i >= 0; --i)
if (!m_modes[i].m_subitem) {
- mir_sntprintf(text, _T("%s [%s]"), m_modes[i].m_title, mode->m_title);
+ mir_sntprintf(text, L"%s [%s]", m_modes[i].m_title, mode->m_title);
break;
}
}
@@ -352,7 +352,7 @@ BOOL CJabberDlgPepSimple::OnWmDrawItem(UINT, WPARAM, LPARAM lParam) }
else {
TCHAR text[128];
- mir_sntprintf(text, _T("...%s"), mode->m_title);
+ mir_sntprintf(text, L"...%s", mode->m_title);
DrawIconEx(lpdis->hDC, lpdis->rcItem.left + 23, (lpdis->rcItem.top + lpdis->rcItem.bottom - 16) / 2, mode->m_hIcon, 16, 16, 0, NULL, DI_NORMAL);
TextOut(lpdis->hDC, lpdis->rcItem.left + 44, (lpdis->rcItem.top + lpdis->rcItem.bottom - tm.tmHeight) / 2, text, (int)mir_tstrlen(text));
}
@@ -386,11 +386,11 @@ CPepService::~CPepService() void CPepService::Publish()
{
- XmlNodeIq iq(_T("set"), m_proto->SerialNext());
+ XmlNodeIq iq(L"set", m_proto->SerialNext());
CreateData(
- iq << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB)
- << XCHILD(_T("publish")) << XATTR(_T("node"), m_node)
- << XCHILD(_T("item")) << XATTR(_T("id"), _T("current")));
+ iq << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB)
+ << XCHILD(L"publish") << XATTR(L"node", m_node)
+ << XCHILD(L"item") << XATTR(L"id", L"current"));
m_proto->m_ThreadInfo->send(iq);
m_wasPublished = true;
@@ -402,10 +402,10 @@ void CPepService::Retract() _tcslwr(tempName);
m_proto->m_ThreadInfo->send(
- XmlNodeIq(_T("set"), m_proto->SerialNext())
- << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB)
- << XCHILD(_T("publish")) << XATTR(_T("node"), m_node)
- << XCHILD(_T("item"))
+ XmlNodeIq(L"set", m_proto->SerialNext())
+ << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB)
+ << XCHILD(L"publish") << XATTR(L"node", m_node)
+ << XCHILD(L"item")
<< XCHILDNS(tempName, m_node));
mir_free(tempName);
@@ -620,19 +620,19 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode) }
else hSelfContact = m_proto->HContactFromJID(from);
- if (XmlGetChild(itemsNode, _T("retract"))) {
+ if (XmlGetChild(itemsNode, L"retract")) {
if (hSelfContact)
SetMood(hSelfContact, NULL, NULL);
SetMood(hContact, NULL, NULL);
return;
}
- HXML n, moodNode = XPath(itemsNode, _T("item/mood[@xmlns='") JABBER_FEAT_USER_MOOD _T("']"));
+ HXML n, moodNode = XPath(itemsNode, L"item/mood[@xmlns='" JABBER_FEAT_USER_MOOD L"']");
if (!moodNode) return;
LPCTSTR moodType = NULL, moodText = NULL;
for (int i=0; n = XmlGetChild(moodNode, i); i++) {
- if (!mir_tstrcmp(XmlGetName(n), _T("text")))
+ if (!mir_tstrcmp(XmlGetName(n), L"text"))
moodText = XmlGetText(n);
else
moodType = XmlGetName(n);
@@ -650,10 +650,10 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode) void CPepMood::CreateData(HXML n)
{
- HXML moodNode = n << XCHILDNS(_T("mood"), JABBER_FEAT_USER_MOOD);
+ HXML moodNode = n << XCHILDNS(L"mood", JABBER_FEAT_USER_MOOD);
moodNode << XCHILD(_A2T(g_arrMoods[m_mode].szTag));
if (m_text)
- moodNode << XCHILD(_T("text"), m_text);
+ moodNode << XCHILD(L"text", m_text);
}
void CPepMood::ResetExtraIcon(MCONTACT hContact)
@@ -971,7 +971,7 @@ void ActivityBuildTitle(int id, TCHAR *buf, int size) if (szFirst) {
if (szSecond)
- mir_sntprintf(buf, size, _T("%s [%s]"), TranslateTS(szFirst), TranslateTS(szSecond));
+ mir_sntprintf(buf, size, L"%s [%s]", TranslateTS(szFirst), TranslateTS(szSecond));
else
mir_tstrncpy(buf, TranslateTS(szFirst), size);
}
@@ -1007,7 +1007,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode) return;
}
- HXML actNode = XPath(itemsNode, _T("item/activity[@xmlns='") JABBER_FEAT_USER_ACTIVITY _T("']"));
+ HXML actNode = XPath(itemsNode, L"item/activity[@xmlns='" JABBER_FEAT_USER_ACTIVITY L"']");
if (!actNode)
return;
@@ -1016,7 +1016,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode) HXML n;
for (int i=0; n = XmlGetChild(actNode, i); i++) {
- if (mir_tstrcmp(XmlGetName(n), _T("text"))) {
+ if (mir_tstrcmp(XmlGetName(n), L"text")) {
szFirstNode = XmlGetName(n);
HXML secondNode = XmlGetChild(n, 0);
if (szFirstNode && secondNode && XmlGetName(secondNode))
@@ -1040,14 +1040,14 @@ void CPepActivity::CreateData(HXML n) char *szFirstNode = ActivityGetFirst(m_mode);
char *szSecondNode = ActivityGetSecond(m_mode);
- HXML activityNode = n << XCHILDNS(_T("activity"), JABBER_FEAT_USER_ACTIVITY);
+ HXML activityNode = n << XCHILDNS(L"activity", JABBER_FEAT_USER_ACTIVITY);
HXML firstNode = activityNode << XCHILD(_A2T(szFirstNode));
if (firstNode && szSecondNode)
firstNode << XCHILD(_A2T(szSecondNode));
if (m_text)
- activityNode << XCHILD(_T("text"), m_text);
+ activityNode << XCHILD(L"text", m_text);
}
void CPepActivity::ResetExtraIcon(MCONTACT hContact)
@@ -1174,18 +1174,18 @@ BOOL CJabberProto::SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource if (!m_bJabberOnline || !m_bPepSupported)
return FALSE;
- XmlNodeIq iq(_T("set"), SerialNext());
- HXML tuneNode = iq << XCHILDNS(_T("pubsub"), JABBER_FEAT_PUBSUB)
- << XCHILD(_T("publish")) << XATTR(_T("node"), JABBER_FEAT_USER_TUNE)
- << XCHILD(_T("item")) << XCHILDNS(_T("tune"), JABBER_FEAT_USER_TUNE);
+ XmlNodeIq iq(L"set", SerialNext());
+ HXML tuneNode = iq << XCHILDNS(L"pubsub", JABBER_FEAT_PUBSUB)
+ << XCHILD(L"publish") << XATTR(L"node", JABBER_FEAT_USER_TUNE)
+ << XCHILD(L"item") << XCHILDNS(L"tune", JABBER_FEAT_USER_TUNE);
if (szArtist || szLength || szSource || szTitle || szUri) {
- if (szArtist) tuneNode << XCHILD(_T("artist"), szArtist);
- if (szLength) tuneNode << XCHILD(_T("length"), szLength);
- if (szSource) tuneNode << XCHILD(_T("source"), szSource);
- if (szTitle) tuneNode << XCHILD(_T("title"), szTitle);
- if (szTrack) tuneNode << XCHILD(_T("track"), szTrack);
- if (szUri) tuneNode << XCHILD(_T("uri"), szUri);
+ if (szArtist) tuneNode << XCHILD(L"artist", szArtist);
+ if (szLength) tuneNode << XCHILD(L"length", szLength);
+ if (szSource) tuneNode << XCHILD(L"source", szSource);
+ if (szTitle) tuneNode << XCHILD(L"title", szTitle);
+ if (szTrack) tuneNode << XCHILD(L"track", szTrack);
+ if (szUri) tuneNode << XCHILD(L"uri", szUri);
}
m_ThreadInfo->send(iq);
@@ -1211,18 +1211,18 @@ void CJabberProto::SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR s li.ptszAlbum = (TCHAR*)szSource;
li.ptszTitle = (TCHAR*)szTitle;
li.ptszTrack = (TCHAR*)szTrack;
- szListeningTo = (TCHAR*)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)&li);
+ szListeningTo = (TCHAR*)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&li);
}
else {
szListeningTo = (TCHAR*)mir_alloc(2048 * sizeof(TCHAR));
- mir_sntprintf(szListeningTo, 2047, _T("%s - %s"), szTitle ? szTitle : _T(""), szArtist ? szArtist : _T(""));
+ mir_sntprintf(szListeningTo, 2047, L"%s - %s", szTitle ? szTitle : L"", szArtist ? szArtist : L"");
}
setTString(hContact, "ListeningTo", szListeningTo);
char tuneIcon[128];
mir_snprintf(tuneIcon, "%s_%s", m_szModuleName, "main");
- WriteAdvStatus(hContact, ADVSTATUS_TUNE, _T("listening_to"), tuneIcon, TranslateT("Listening To"), szListeningTo);
+ WriteAdvStatus(hContact, ADVSTATUS_TUNE, L"listening_to", tuneIcon, TranslateT("Listening To"), szListeningTo);
mir_free(szListeningTo);
}
@@ -1286,7 +1286,7 @@ INT_PTR __cdecl CJabberProto::OnSetListeningTo(WPARAM, LPARAM lParam) szTmp++;
}
}
- mir_sntprintf(szLengthInSec, _T("%d"), result);
+ mir_sntprintf(szLengthInSec, L"%d", result);
}
SendPepTune(szArtist, szLength ? szLengthInSec : NULL, szSource, szTitle, szTrack, NULL);
@@ -1505,15 +1505,15 @@ void g_XstatusIconsInit() TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, _countof(szFile));
if (TCHAR *p = _tcsrchr(szFile, '\\'))
- mir_tstrcpy(p + 1, _T("..\\Icons\\xstatus_jabber.dll"));
+ mir_tstrcpy(p + 1, L"..\\Icons\\xstatus_jabber.dll");
TCHAR szSection[100];
- mir_tstrcpy(szSection, _T("Protocols/Jabber/") LPGENT("Moods"));
+ mir_tstrcpy(szSection, L"Protocols/Jabber/" LPGENT("Moods"));
for (int i = 1; i < _countof(g_arrMoods); i++)
g_MoodIcons.RegisterIcon(g_arrMoods[i].szTag, szFile, -(200 + i), szSection, TranslateTS(g_arrMoods[i].szName));
- mir_tstrcpy(szSection, _T("Protocols/Jabber/") LPGENT("Activities"));
+ mir_tstrcpy(szSection, L"Protocols/Jabber/" LPGENT("Activities"));
for (int k = 0; k < _countof(g_arrActivities); k++) {
if (g_arrActivities[k].szFirst)
g_ActivityIcons.RegisterIcon(g_arrActivities[k].szFirst, szFile, g_arrActivities[k].iconid, szSection, TranslateTS(g_arrActivities[k].szTitle));
diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index dcc9ee3107..194a4c71de 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -69,7 +69,7 @@ public: for (int i=0; i < getCount(); i++)
{
CPepService &pepSvc = (*this)[i];
- HXML itemsNode = XmlGetChildByTag(eventNode, _T("items"), _T("node"), pepSvc.GetNode());
+ HXML itemsNode = XmlGetChildByTag(eventNode, L"items", L"node", pepSvc.GetNode());
if (itemsNode)
pepSvc.ProcessItems(from, itemsNode);
}
diff --git a/protocols/MRA/src/MraAdvancedSearch.cpp b/protocols/MRA/src/MraAdvancedSearch.cpp index f793de682b..59e2da8242 100644 --- a/protocols/MRA/src/MraAdvancedSearch.cpp +++ b/protocols/MRA/src/MraAdvancedSearch.cpp @@ -54,7 +54,7 @@ static const FieldNames ZodiakField[] = void ResetComboBox(HWND hWndCombo)
{
SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0);
- DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L"");
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0);
SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0);
}
@@ -77,7 +77,7 @@ void InitComboBoxNumders(HWND hWndCombo, DWORD dwStart, DWORD dwEnd) for (DWORD i = dwStart; i <= dwEnd; i++) {
TCHAR szBuff[MAX_PATH];
- mir_sntprintf(szBuff, _T("%lu"), i);
+ mir_sntprintf(szBuff, L"%lu", i);
DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)szBuff);
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, i);
}
@@ -215,7 +215,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg, UINT message, WPARAM wParam HWND hWndCombo = GetDlgItem(hWndDlg, IDC_STATE);
SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0);
ResetComboBox(GetDlgItem(hWndDlg, IDC_CITY));
- DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L"");
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0);
SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0);
@@ -234,7 +234,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg, UINT message, WPARAM wParam DWORD dwStateID = GET_CURRENT_COMBO_DATA(hWndDlg, IDC_STATE);
HWND hWndCombo = GetDlgItem(hWndDlg, IDC_CITY);
SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0);
- DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)L"");
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, 0);
SendMessage(hWndCombo, CB_SETCURSEL, dwItem, 0);
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 1d4acdf0b7..9f42d03f4f 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -56,7 +56,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle) MRA_AVATARS_QUEUE *pmraaqAvatarsQueue = new MRA_AVATARS_QUEUE();
TCHAR szBuffer[MAX_PATH];
- mir_sntprintf(szBuffer, _T("%s %s"), m_tszUserName, TranslateT("Avatars' plugin connections"));
+ mir_sntprintf(szBuffer, L"%s %s", m_tszUserName, TranslateT("Avatars' plugin connections"));
NETLIBUSER nlu = { sizeof(nlu) };
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
@@ -476,7 +476,7 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hQueue, MCONTACT hContact, DWORD d return ERROR_NOT_SUPPORTED;
TCHAR tszBase[MAX_PATH];
- mir_sntprintf(tszBase, _T("%s\\%s\\"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
+ mir_sntprintf(tszBase, L"%s\\%s\\", VARST(L"%miranda_avatarcache%"), m_tszUserName);
res = tszBase;
// some path in buff and free space for file name is avaible
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp index 32a15914b3..782cb3fe40 100644 --- a/protocols/MRA/src/MraChat.cpp +++ b/protocols/MRA/src/MraChat.cpp @@ -39,7 +39,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) gcw.pszModule = m_szModuleName;
gcw.ptszName = pcli->pfnGetContactDisplayName(hContact, 0);
gcw.ptszID = wszEMail;
- gcw.ptszStatusbarText = _T("status bar");
+ gcw.ptszStatusbarText = L"status bar";
gcw.dwItemData = (DWORD)hContact;
if (!CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw)) {
GCDEST gcd = { m_szModuleName, wszEMail.c_str(), GC_EVENT_ADDGROUP };
@@ -56,7 +56,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact) DWORD opcode = MULTICHAT_GET_MEMBERS;
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
- MraMessage(FALSE, NULL, 0, MESSAGE_FLAG_MULTICHAT, szEmail, _T(""), (LPBYTE)&opcode, sizeof(opcode));
+ MraMessage(FALSE, NULL, 0, MESSAGE_FLAG_MULTICHAT, szEmail, L"", (LPBYTE)&opcode, sizeof(opcode));
return 0;
}
}
@@ -145,7 +145,7 @@ INT_PTR CMraProto::MraChatSessionMembersAdd(MCONTACT hContactChatSession, const INT_PTR CMraProto::MraChatSessionJoinUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
{
if (hContactChatSession)
- return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_JOIN, GCEF_ADDTOLOG, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_VISITOR], _T(""), 0, dwTime);
+ return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_JOIN, GCEF_ADDTOLOG, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_VISITOR], L"", 0, dwTime);
return 1;
}
@@ -224,7 +224,7 @@ int CMraProto::MraChatGcEventHook(WPARAM, LPARAM lParam) case GC_USER_CHANMGR:
//int iqId = SerialNext();
//IqAdd( iqId, IQ_PROC_NONE, &CJabberProto::OnIqResultGetMuc );
- //m_ThreadInfo->send( XmlNodeIq( _T("get"), iqId, item->jid ) << XQUERY( xmlnsOwner ));
+ //m_ThreadInfo->send( XmlNodeIq( L"get", iqId, item->jid ) << XQUERY( xmlnsOwner ));
break;
}
}
diff --git a/protocols/MRA/src/MraConstans.h b/protocols/MRA/src/MraConstans.h index 9c897cdb8b..1b9f89a0c1 100644 --- a/protocols/MRA/src/MraConstans.h +++ b/protocols/MRA/src/MraConstans.h @@ -191,7 +191,7 @@ static const LPSTR lpcszMailRuDomains[] = #define MRA_AVT_DEFAULT_TIMEOUT_RECV 30
#define MRA_AVT_DEFAULT_USE_KEEPALIVE_CONN TRUE
#define MRA_AVT_DEFAULT_CHK_INTERVAL 60
-#define MRA_AVT_DEFAULT_AVT_FILENAME _T("_default.jpg")
+#define MRA_AVT_DEFAULT_AVT_FILENAME L"_default.jpg"
#define MRA_AVT_DEFAULT_RET_ABC_PATH TRUE
#define MRA_DELETE_AVT_ON_CONTACT_DELETE TRUE
diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp index 8e71438ceb..8faf3d38a1 100644 --- a/protocols/MRA/src/MraIcons.cpp +++ b/protocols/MRA/src/MraIcons.cpp @@ -84,12 +84,12 @@ void InitXStatusIcons() // load xstatus icons lib
DWORD dwBuffLen;
- DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, _T("xstatus_MRA.dll"), -1, szBuff, _countof(szBuff), &dwBuffLen);
+ DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, L"xstatus_MRA.dll", -1, szBuff, _countof(szBuff), &dwBuffLen);
if (dwErrorCode == NO_ERROR) {
g_hDLLXStatusIcons = LoadLibraryEx(szBuff, NULL, 0);
if (g_hDLLXStatusIcons) {
dwBuffLen = LoadString(g_hDLLXStatusIcons, IDS_IDENTIFY, szBuff, MAX_FILEPATH);
- if (dwBuffLen == 0 || _tcsnicmp(_T("# Custom Status Icons #"), szBuff, 23)) {
+ if (dwBuffLen == 0 || _tcsnicmp(L"# Custom Status Icons #", szBuff, 23)) {
FreeLibrary(g_hDLLXStatusIcons);
g_hDLLXStatusIcons = NULL;
}
@@ -101,7 +101,7 @@ void InitXStatusIcons() GetModuleFileName((g_hDLLXStatusIcons != NULL) ? g_hDLLXStatusIcons : g_hInstance, szBuff, _countof(szBuff));
SKINICONDESC sid = { 0 };
- sid.section.t = LPGENT("Protocols")_T("/") LPGENT("MRA") _T("/") LPGENT("Custom Status");
+ sid.section.t = LPGENT("Protocols")L"/" LPGENT("MRA") L"/" LPGENT("Custom Status");
sid.defaultFile.t = szBuff;
sid.flags = SIDF_ALL_TCHAR;
diff --git a/protocols/MRA/src/MraPlaces.h b/protocols/MRA/src/MraPlaces.h index d2b0d4d417..e58e27962b 100644 --- a/protocols/MRA/src/MraPlaces.h +++ b/protocols/MRA/src/MraPlaces.h @@ -4,8 +4,8 @@ #pragma once
-#define lpwszOther _T("Äðóãîå")
-//static LPWSTR lpwszOther = _T("Äðóãîå");
+#define lpwszOther L"Äðóãîå"
+//static LPWSTR lpwszOther = L"Äðóãîå";
typedef struct
@@ -63,1603 +63,1603 @@ typedef struct static const MRA_PLACE mrapPlaces[] =
{
- {24, 0, 0, _T("Ðîññèÿ")},
- {81, 0, 0, _T("Àçåðáàéäæàí")},
- {82, 0, 0, _T("Àðìåíèÿ")},
- {97, 0, 0, _T("Àôãàíèñòàí")},
- {96, 0, 0, _T("Áàíãëàäåø")},
- {99, 0, 0, _T("Áàõðåéí")},
- {100, 0, 0, _T("Áðóíåé-Äàðóññàëàì")},
- {101, 0, 0, _T("Áóòàí")},
- {102, 0, 0, _T("Âüåòíàì")},
- {83, 0, 0, _T("Ãðóçèÿ")},
- {86, 0, 0, _T("Èçðàèëü")},
- {95, 0, 0, _T("Èíäèÿ")},
- {103, 0, 0, _T("Èíäîíåçèÿ")},
- {79, 0, 0, _T("Èîðäàíèÿ")},
- {85, 0, 0, _T("Èðàê")},
- {87, 0, 0, _T("Èðàí")},
- {104, 0, 0, _T("Éåìåí")},
- {84, 0, 0, _T("Êàçàõñòàí")},
- {105, 0, 0, _T("Êàìáîäæà")},
- {106, 0, 0, _T("Êàòàð")},
- {107, 0, 0, _T("Êèïð")},
- {92, 0, 0, _T("Êèðãèçèÿ (Êûðãûçñòàí)")},
- {76, 0, 0, _T("Êèòàé")},
- {3215, 0, 0, _T("Êîêîñîâûå îñòðîâà (Àâñòð.)")},
- {29, 0, 0, _T("Êîðåÿ (ÊÍÄÐ)")},
- {108, 0, 0, _T("Êîðåÿ")},
- {88, 0, 0, _T("Êóâåéò")},
- {109, 0, 0, _T("Ëàîñ")},
- {110, 0, 0, _T("Ëèâàí")},
- {111, 0, 0, _T("Ìàëàéçèÿ")},
- {112, 0, 0, _T("Ìàëüäèâû")},
- {113, 0, 0, _T("Ìîíãîëèÿ")},
- {114, 0, 0, _T("Ìüÿíìà")},
- {115, 0, 0, _T("Íåïàë")},
- {116, 0, 0, _T("Îáúåäèíåííûå Àðàáñêèå Ýìèðàòû")},
- {117, 0, 0, _T("Îìàí")},
- {3216, 0, 0, _T("Îñòðîâ Ðîæäåñòâà (Àâñòð.)")},
- {122, 0, 0, _T("Ïàêèñòàí")},
- {89, 0, 0, _T("Ïàëåñòèíà")},
- {94, 0, 0, _T("Ñàóäîâñêàÿ Àðàâèÿ")},
- {118, 0, 0, _T("Ñèíãàïóð")},
- {78, 0, 0, _T("Ñèðèÿ")},
- {91, 0, 0, _T("Òàäæèêèñòàí")},
- {119, 0, 0, _T("Òàèëàíä")},
- {120, 0, 0, _T("Òàéâàíü")},
- {132, 0, 0, _T("Òèìîð")},
- {90, 0, 0, _T("Òóðêìåíèÿ")},
- {77, 0, 0, _T("Òóðöèÿ")},
- {93, 0, 0, _T("Óçáåêèñòàí")},
- {121, 0, 0, _T("Ôèëèïïèíû")},
- {98, 0, 0, _T("Øðè Ëàíêà")},
- {75, 0, 0, _T("ßïîíèÿ")},
- {123, 0, 0, _T("Àâñòðàëèÿ")},
- {454, 0, 0, _T("Àìåðèêàíñêîå Ñàìîà")},
- {124, 0, 0, _T("Âàíóàòó")},
- {453, 0, 0, _T("Ãóàì (ÑØÀ)")},
- {126, 0, 0, _T("Êèðèáàòè")},
- {127, 0, 0, _T("Ìàðøàëëîâû Îñòðîâà")},
- {128, 0, 0, _T("Ìèêðîíåçèÿ (Ôåäåðàòèâíûå Øòàòû Ìèêðîíåçèè)")},
- {129, 0, 0, _T("Íàóðó")},
- {3220, 0, 0, _T("Íèóý (Í.Çåë.)")},
- {130, 0, 0, _T("Íîâàÿ Çåëàíäèÿ")},
- {3218, 0, 0, _T("Íîâàÿ Êàëåäîíèÿ (Ôð.)")},
- {3221, 0, 0, _T("Îñòðîâà Êóêà (Í.Çåë.)")},
- {3230, 0, 0, _T("Îñòðîâà Õåðä è Ìàêäîíàëüä (Àâñòð.)")},
- {131, 0, 0, _T("Ïàëàó")},
- {133, 0, 0, _T("Ïàïóà - Íîâàÿ Ãâèíåÿ")},
- {3222, 0, 0, _T("Ïèòêåðí (Áðèò.)")},
- {125, 0, 0, _T("Ñàìîà")},
- {3219, 0, 0, _T("Ñåâ. Ìàðèàíñêèå îñòðîâà (ÑØÀ)")},
- {134, 0, 0, _T("Ñîëîìîíîâû Îñòðîâà")},
- {3223, 0, 0, _T("Òîêåëàó (Í.Çåë.)")},
- {135, 0, 0, _T("Òîíãà")},
- {136, 0, 0, _T("Òóâàëó")},
- {3224, 0, 0, _T("Óîëëèñ è Ôóòóíà îñòðîâà (Ôð.)")},
- {137, 0, 0, _T("Ôèäæè")},
- {3226, 0, 0, _T("Ôðàíöóçñêàÿ Ïîëèíåçèÿ")},
- {3225, 0, 0, _T("Ôðàíöóçñêèå Þæíûå òåððèòîðèè")},
- {138, 0, 0, _T("Êàíàäà")},
- {139, 0, 0, _T("ÑØÀ")},
- {3200, 0, 0, _T("Àíãèëüÿ (Áðèò.)")},
- {140, 0, 0, _T("Àíòèãóà è Áàðáóäà")},
- {141, 0, 0, _T("Àðãåíòèíà")},
- {3202, 0, 0, _T("Àðóáà (Íèä.)")},
- {142, 0, 0, _T("Áàãàìû")},
- {143, 0, 0, _T("Áàðáàäîñ")},
- {146, 0, 0, _T("Áåëèç")},
- {3203, 0, 0, _T("Áåðìóäû (Áðèò.)")},
- {144, 0, 0, _T("Áîëèâèÿ")},
- {145, 0, 0, _T("Áðàçèëèÿ")},
- {147, 0, 0, _T("Âåíåñóýëà")},
- {3204, 0, 0, _T("Âèðãèíñêèå îñòðîâà (Áðèò.)")},
- {452, 0, 0, _T("Âèðãèíñêèå îñòðîâà (ÑØÀ)")},
- {149, 0, 0, _T("Ãàèòè")},
- {148, 0, 0, _T("Ãàéàíà")},
- {3205, 0, 0, _T("Ãâàäåëóïà (Ôð.)")},
- {173, 0, 0, _T("Ãâàòåìàëà")},
- {150, 0, 0, _T("Ãîíäóðàñ")},
- {151, 0, 0, _T("Ãðåíàäà")},
- {152, 0, 0, _T("Ãðåíëàíäèÿ (Äàò.)")},
- {153, 0, 0, _T("Äîìèíèêà")},
- {154, 0, 0, _T("Äîìèíèêàíñêàÿ Ðåñïóáëèêà")},
- {155, 0, 0, _T("Êîëóìáèÿ")},
- {156, 0, 0, _T("Êîñòà-Ðèêà")},
- {157, 0, 0, _T("Êóáà")},
- {3208, 0, 0, _T("Ìàðòèíèêà (Ôð.)")},
- {158, 0, 0, _T("Ìåêñèêà")},
- {3209, 0, 0, _T("Ìîíòñåððàò (Áðèò)")},
- {3201, 0, 0, _T("Íèäåðëàíäñêèå Àíòèëû")},
- {159, 0, 0, _T("Íèêàðàãóà")},
- {3207, 0, 0, _T("Îñòðîâ Êàéìàí (Áðèò.)")},
- {3211, 0, 0, _T("Îñòðîâà Òåðêñ è Êàéêîñ (Áðèò.)")},
- {160, 0, 0, _T("Ïàíàìà")},
- {161, 0, 0, _T("Ïàðàãâàé")},
- {162, 0, 0, _T("Ïåðó")},
- {163, 0, 0, _T("Ñàëüâàäîð")},
- {164, 0, 0, _T("Ñåíò-Âèíñåíò è Ãðåíàäèíû")},
- {165, 0, 0, _T("Ñåíò-Êèòñ è Íåâèñ")},
- {166, 0, 0, _T("Ñåíò-Ëþñèÿ")},
- {3210, 0, 0, _T("Ñåíò-Ïüåð è Ìèêåëîí (Ôð.)")},
- {167, 0, 0, _T("Ñóðèíàì")},
- {168, 0, 0, _T("Òðèíèäàò è Òîáàãî")},
- {169, 0, 0, _T("Óðóãâàé")},
- {3212, 0, 0, _T("Ôîëêëåíäñêèå îñòðîâà (Áðèò.)")},
- {3206, 0, 0, _T("Ôðàíöóçñêàÿ Ãâèàíà")},
- {170, 0, 0, _T("×èëè")},
- {171, 0, 0, _T("Ýêâàäîð")},
- {3213, 0, 0, _T("Þæ. Äæîðäæèÿ è Þæ. Ñàíäâè÷åâû î-âà (Áðèò.)")},
- {172, 0, 0, _T("ßìàéêà")},
- {174, 0, 0, _T("Àëæèð")},
- {175, 0, 0, _T("Àíãîëà")},
- {176, 0, 0, _T("Áåíèí")},
- {177, 0, 0, _T("Áîòñâàíà")},
- {3228, 0, 0, _T("Áðèòàíñêàÿ òåððèòîðèÿ â Èíäèéñêîì îêåàíå")},
- {178, 0, 0, _T("Áóðêèíà-Ôàñî")},
- {179, 0, 0, _T("Áóðóíäè")},
- {180, 0, 0, _T("Ãàáîí")},
- {181, 0, 0, _T("Ãàìáèÿ")},
- {182, 0, 0, _T("Ãàíà")},
- {183, 0, 0, _T("Ãâèíåÿ")},
- {184, 0, 0, _T("Ãâèíåÿ-Áèñàó")},
- {185, 0, 0, _T("Äæèáóòè")},
- {186, 0, 0, _T("Åãèïåò")},
- {187, 0, 0, _T("Çàìáèÿ")},
- {3198, 0, 0, _T("Çàï. Ñàõàðà")},
- {23, 0, 0, _T("Çèìáàáâå")},
- {188, 0, 0, _T("Êàáî-Âåðäå")},
- {189, 0, 0, _T("Êàìåðóí")},
- {190, 0, 0, _T("Êåíèÿ")},
- {191, 0, 0, _T("Êîìîðû")},
- {193, 0, 0, _T("Êîíãî (Çàèð)")},
- {192, 0, 0, _T("Êîíãî")},
- {194, 0, 0, _T("Êîò-ä`Èâóàð")},
- {195, 0, 0, _T("Ëåñîòî")},
- {196, 0, 0, _T("Ëèáåðèÿ")},
- {197, 0, 0, _T("Ëèâèÿ")},
- {198, 0, 0, _T("Ìàâðèêèé")},
- {199, 0, 0, _T("Ìàâðèòàíèÿ")},
- {200, 0, 0, _T("Ìàäàãàñêàð")},
- {3229, 0, 0, _T("Ìàéîòò (Ôð.)")},
- {201, 0, 0, _T("Ìàëàâè")},
- {202, 0, 0, _T("Ìàëè")},
- {203, 0, 0, _T("Ìàðîêêî")},
- {204, 0, 0, _T("Ìîçàìáèê")},
- {205, 0, 0, _T("Íàìèáèÿ")},
- {206, 0, 0, _T("Íèãåð")},
- {207, 0, 0, _T("Íèãåðèÿ")},
- {3227, 0, 0, _T("Îñòðîâ Áóâå (Íîðâ.)")},
- {3197, 0, 0, _T("Ðåþíüîí (Ôð.)")},
- {208, 0, 0, _T("Ðóàíäà")},
- {209, 0, 0, _T("Ñàí-Òîìå è Ïðèíñèïè")},
- {210, 0, 0, _T("Ñâàçèëåíä")},
- {3199, 0, 0, _T("Ñâÿòàÿ Åëåíà (Áðèò.)")},
- {211, 0, 0, _T("Ñåéøåëû")},
- {212, 0, 0, _T("Ñåíåãàë")},
- {213, 0, 0, _T("Ñîìàëè")},
- {214, 0, 0, _T("Ñóäàí")},
- {215, 0, 0, _T("Ñüåððà-Ëåîíå")},
- {216, 0, 0, _T("Òàíçàíèÿ")},
- {217, 0, 0, _T("Òîãî")},
- {218, 0, 0, _T("Òóíèñ")},
- {219, 0, 0, _T("Óãàíäà")},
- {220, 0, 0, _T("Öåíòðàëüíîàôðèêàíñêàÿ Ðåñïóáëèêà")},
- {222, 0, 0, _T("×àä")},
- {223, 0, 0, _T("Ýêâàòîðèàëüíàÿ Ãâèíåÿ")},
- {221, 0, 0, _T("Ýðèòðåÿ")},
- {224, 0, 0, _T("Ýôèîïèÿ")},
- {225, 0, 0, _T("Þæíî-Àôðèêàíñêàÿ Ðåñïóáëèêà (ÞÀÐ)")},
- {39, 0, 0, _T("Óêðàèíà")},
- {40, 0, 0, _T("Àâñòðèÿ")},
- {32, 0, 0, _T("Àëáàíèÿ")},
- {33, 0, 0, _T("Àíäîððà")},
- {340, 0, 0, _T("Áåëîðóññèÿ")},
- {38, 0, 0, _T("Áåëüãèÿ")},
- {41, 0, 0, _T("Áîëãàðèÿ")},
- {42, 0, 0, _T("Áîñíèÿ è Ãåðöåãîâèíà")},
- {43, 0, 0, _T("Âàòèêàí")},
- {45, 0, 0, _T("Âåëèêîáðèòàíèÿ")},
- {44, 0, 0, _T("Âåíãðèÿ")},
- {46, 0, 0, _T("Ãåðìàíèÿ")},
- {3193, 0, 0, _T("Ãåðíñè (Áðèò.)")},
- {47, 0, 0, _T("Ãèáðàëòàð (Áðèò.)")},
- {48, 0, 0, _T("Ãðåöèÿ")},
- {49, 0, 0, _T("Äàíèÿ")},
- {3194, 0, 0, _T("Äæåðñè (Áðèò.)")},
- {50, 0, 0, _T("Èðëàíäèÿ")},
- {51, 0, 0, _T("Èñëàíäèÿ")},
- {34, 0, 0, _T("Èñïàíèÿ")},
- {52, 0, 0, _T("Èòàëèÿ")},
- {53, 0, 0, _T("Ëàòâèÿ")},
- {54, 0, 0, _T("Ëèòâà")},
- {55, 0, 0, _T("Ëèõòåíøòåéí")},
- {56, 0, 0, _T("Ëþêñåìáóðã")},
- {57, 0, 0, _T("Ìàêåäîíèÿ")},
- {58, 0, 0, _T("Ìàëüòà")},
- {59, 0, 0, _T("Ìîëäàâèÿ")},
- {36, 0, 0, _T("Ìîíàêî")},
- {60, 0, 0, _T("Íèäåðëàíäû")},
- {61, 0, 0, _T("Íîðâåãèÿ")},
- {3195, 0, 0, _T("Îñòðîâ Ìýí (Áðèò.)")},
- {62, 0, 0, _T("Ïîëüøà")},
- {35, 0, 0, _T("Ïîðòóãàëèÿ")},
- {63, 0, 0, _T("Ðóìûíèÿ")},
- {64, 0, 0, _T("Ñàí-Ìàðèíî")},
- {74, 0, 0, _T("Ñåðáèÿ è ×åðíîãîðèÿ")},
- {65, 0, 0, _T("Ñëîâàêèÿ")},
- {66, 0, 0, _T("Ñëîâåíèÿ")},
- {67, 0, 0, _T("Ôàðåðñêèå î-âà (Äàíèÿ)")},
- {68, 0, 0, _T("Ôèíëÿíäèÿ")},
- {37, 0, 0, _T("Ôðàíöèÿ")},
- {69, 0, 0, _T("Õîðâàòèÿ")},
- {70, 0, 0, _T("×åõèÿ")},
- {71, 0, 0, _T("Øâåéöàðèÿ")},
- {72, 0, 0, _T("Øâåöèÿ")},
- {3196, 0, 0, _T("Øïèöáåðãåí (Íîðâ.)")},
- {73, 0, 0, _T("Ýñòîíèÿ")},
- {24, 25, 0, _T("Ìîñêâà")},
- {24, 226, 0, _T("Ñàíêò-Ïåòåðáóðã")},
- {24, 233, 0, _T("Ñàõà (ßêóòèÿ)")},
- {24, 232, 0, _T("Ïðèìîðñêèé êðàé")},
- {24, 235, 0, _T("Õàáàðîâñêèé êðàé")},
- {24, 227, 0, _T("Àìóðñêàÿ îáë.")},
- {24, 229, 0, _T("Êàì÷àòñêàÿ îáë.")},
- {24, 231, 0, _T("Ìàãàäàíñêàÿ îáë.")},
- {24, 234, 0, _T("Ñàõàëèíñêàÿ îáë.")},
- {24, 228, 0, _T("Åâðåéñêàÿ ÀÎ")},
- {24, 230, 0, _T("Êîðÿêñêèé ÀÎ")},
- {24, 236, 0, _T("×óêîòñêèé ÀÎ")},
- {24, 237, 0, _T("Áàøêîðòîñòàí")},
- {24, 240, 0, _T("Ìàðèé-Ýë")},
- {24, 241, 0, _T("Ìîðäîâèÿ")},
- {24, 248, 0, _T("Òàòàðñòàí")},
- {24, 249, 0, _T("Óäìóðòèÿ")},
- {24, 251, 0, _T("×óâàøèÿ")},
- {24, 238, 0, _T("Êèðîâñêàÿ îáë.")},
- {24, 242, 0, _T("Íèæåãîðîäñêàÿ îáë.")},
- {24, 243, 0, _T("Îðåíáóðãñêàÿ îáë.")},
- {24, 244, 0, _T("Ïåíçåíñêàÿ îáë.")},
- {24, 245, 0, _T("Ïåðìñêàÿ îáë.")},
- {24, 246, 0, _T("Ñàìàðñêàÿ îáë.")},
- {24, 247, 0, _T("Ñàðàòîâñêàÿ îáë.")},
- {24, 250, 0, _T("Óëüÿíîâñêàÿ îáë.")},
- {24, 239, 0, _T("Êîìè-Ïåðìÿöêèé ÀÎ")},
- {24, 255, 0, _T("Êàðåëèÿ")},
- {24, 256, 0, _T("Êîìè")},
- {24, 252, 0, _T("Àðõàíãåëüñêàÿ îáë.")},
- {24, 253, 0, _T("Âîëîãîäñêàÿ îáë.")},
- {24, 254, 0, _T("Êàëèíèíãðàäñêàÿ îáë.")},
- {24, 257, 0, _T("Ëåíèíãðàäñêàÿ îáë.")},
- {24, 258, 0, _T("Ìóðìàíñêàÿ îáë.")},
- {24, 260, 0, _T("Íîâãîðîäñêàÿ îáë.")},
- {24, 261, 0, _T("Ïñêîâñêàÿ îáë.")},
- {24, 259, 0, _T("Íåíåöêèé ÀÎ")},
- {24, 265, 0, _T("Áóðÿòèÿ")},
- {24, 263, 0, _T("Ðåñïóáëèêà Àëòàé")},
- {24, 273, 0, _T("Òûâà")},
- {24, 275, 0, _T("Õàêàñèÿ")},
- {24, 264, 0, _T("Àëòàéñêèé êðàé")},
- {24, 268, 0, _T("Êðàñíîÿðñêèé êðàé")},
- {24, 266, 0, _T("Èðêóòñêàÿ îáë.")},
- {24, 267, 0, _T("Êåìåðîâñêàÿ îáë.")},
- {24, 269, 0, _T("Íîâîñèáèðñêàÿ îáë.")},
- {24, 270, 0, _T("Îìñêàÿ îáë.")},
- {24, 272, 0, _T("Òîìñêàÿ îáë.")},
- {24, 276, 0, _T("×èòèíñêàÿ îáë.")},
- {24, 262, 0, _T("Àãèíñêèé Áóðÿòñêèé ÀÎ")},
- {24, 271, 0, _T("Òàéìûðñêèé ÀÎ")},
- {24, 274, 0, _T("Óñòü-Îðäûíñêèé Áóðÿòñêèé ÀÎ")},
- {24, 277, 0, _T("Ýâåíêèéñêèé ÀÎ")},
- {24, 278, 0, _T("Êóðãàíñêàÿ îáë.")},
- {24, 279, 0, _T("Ñâåðäëîâñêàÿ îáë.")},
- {24, 280, 0, _T("Òþìåíñêàÿ îáë.")},
- {24, 282, 0, _T("×åëÿáèíñêàÿ îáë.")},
- {24, 281, 0, _T("Õàíòû-Ìàíñèéñêèé ÀÎ - Þãðà")},
- {24, 283, 0, _T("ßìàëî-Íåíåöêèé ÀÎ")},
- {24, 284, 0, _T("Áåëãîðîäñêàÿ îáë.")},
- {24, 285, 0, _T("Áðÿíñêàÿ îáë.")},
- {24, 286, 0, _T("Âëàäèìèðñêàÿ îáë.")},
- {24, 287, 0, _T("Âîðîíåæñêàÿ îáë.")},
- {24, 288, 0, _T("Èâàíîâñêàÿ îáë.")},
- {24, 289, 0, _T("Êàëóæñêàÿ îáë.")},
- {24, 290, 0, _T("Êîñòðîìñêàÿ îáë.")},
- {24, 291, 0, _T("Êóðñêàÿ îáë.")},
- {24, 292, 0, _T("Ëèïåöêàÿ îáë.")},
- {24, 293, 0, _T("Ìîñêîâñêàÿ îáë.")},
- {24, 294, 0, _T("Îðëîâñêàÿ îáë.")},
- {24, 295, 0, _T("Ðÿçàíñêàÿ îáë.")},
- {24, 296, 0, _T("Ñìîëåíñêàÿ îáë.")},
- {24, 297, 0, _T("Òàìáîâñêàÿ îáë.")},
- {24, 298, 0, _T("Òâåðñêàÿ îáë.")},
- {24, 299, 0, _T("Òóëüñêàÿ îáë.")},
- {24, 300, 0, _T("ßðîñëàâñêàÿ îáë.")},
- {24, 301, 0, _T("Àäûãåÿ")},
- {24, 304, 0, _T("Äàãåñòàí")},
- {24, 305, 0, _T("Èíãóøåòèÿ")},
- {24, 306, 0, _T("Êàáàðäèíî-Áàëêàðèÿ")},
- {24, 307, 0, _T("Êàëìûêèÿ")},
- {24, 308, 0, _T("Êàðà÷àåâî-×åðêåññèÿ")},
- {24, 311, 0, _T("Ñåâåðíàÿ Îñåòèÿ - Àëàíèÿ")},
- {24, 313, 0, _T("×å÷íÿ")},
- {24, 309, 0, _T("Êðàñíîäàðñêèé êðàé")},
- {24, 312, 0, _T("Ñòàâðîïîëüñêèé êðàé")},
- {24, 302, 0, _T("Àñòðàõàíñêàÿ îáë.")},
- {24, 303, 0, _T("Âîëãîãðàäñêàÿ îáë.")},
- {24, 310, 0, _T("Ðîñòîâñêàÿ îáë.")},
- {81, 1055, 0, _T("Áàêó")},
- {81, 1058, 0, _T("Ãÿíäæà")},
- {81, 1056, 0, _T("Íàõè÷åâàíü")},
- {81, 1057, 0, _T("Õàíêåíäè")},
- {81, 3153, 0, _T("Øåêè")},
+ {24, 0, 0, L"Ðîññèÿ"},
+ {81, 0, 0, L"Àçåðáàéäæàí"},
+ {82, 0, 0, L"Àðìåíèÿ"},
+ {97, 0, 0, L"Àôãàíèñòàí"},
+ {96, 0, 0, L"Áàíãëàäåø"},
+ {99, 0, 0, L"Áàõðåéí"},
+ {100, 0, 0, L"Áðóíåé-Äàðóññàëàì"},
+ {101, 0, 0, L"Áóòàí"},
+ {102, 0, 0, L"Âüåòíàì"},
+ {83, 0, 0, L"Ãðóçèÿ"},
+ {86, 0, 0, L"Èçðàèëü"},
+ {95, 0, 0, L"Èíäèÿ"},
+ {103, 0, 0, L"Èíäîíåçèÿ"},
+ {79, 0, 0, L"Èîðäàíèÿ"},
+ {85, 0, 0, L"Èðàê"},
+ {87, 0, 0, L"Èðàí"},
+ {104, 0, 0, L"Éåìåí"},
+ {84, 0, 0, L"Êàçàõñòàí"},
+ {105, 0, 0, L"Êàìáîäæà"},
+ {106, 0, 0, L"Êàòàð"},
+ {107, 0, 0, L"Êèïð"},
+ {92, 0, 0, L"Êèðãèçèÿ (Êûðãûçñòàí)"},
+ {76, 0, 0, L"Êèòàé"},
+ {3215, 0, 0, L"Êîêîñîâûå îñòðîâà (Àâñòð.)"},
+ {29, 0, 0, L"Êîðåÿ (ÊÍÄÐ)"},
+ {108, 0, 0, L"Êîðåÿ"},
+ {88, 0, 0, L"Êóâåéò"},
+ {109, 0, 0, L"Ëàîñ"},
+ {110, 0, 0, L"Ëèâàí"},
+ {111, 0, 0, L"Ìàëàéçèÿ"},
+ {112, 0, 0, L"Ìàëüäèâû"},
+ {113, 0, 0, L"Ìîíãîëèÿ"},
+ {114, 0, 0, L"Ìüÿíìà"},
+ {115, 0, 0, L"Íåïàë"},
+ {116, 0, 0, L"Îáúåäèíåííûå Àðàáñêèå Ýìèðàòû"},
+ {117, 0, 0, L"Îìàí"},
+ {3216, 0, 0, L"Îñòðîâ Ðîæäåñòâà (Àâñòð.)"},
+ {122, 0, 0, L"Ïàêèñòàí"},
+ {89, 0, 0, L"Ïàëåñòèíà"},
+ {94, 0, 0, L"Ñàóäîâñêàÿ Àðàâèÿ"},
+ {118, 0, 0, L"Ñèíãàïóð"},
+ {78, 0, 0, L"Ñèðèÿ"},
+ {91, 0, 0, L"Òàäæèêèñòàí"},
+ {119, 0, 0, L"Òàèëàíä"},
+ {120, 0, 0, L"Òàéâàíü"},
+ {132, 0, 0, L"Òèìîð"},
+ {90, 0, 0, L"Òóðêìåíèÿ"},
+ {77, 0, 0, L"Òóðöèÿ"},
+ {93, 0, 0, L"Óçáåêèñòàí"},
+ {121, 0, 0, L"Ôèëèïïèíû"},
+ {98, 0, 0, L"Øðè Ëàíêà"},
+ {75, 0, 0, L"ßïîíèÿ"},
+ {123, 0, 0, L"Àâñòðàëèÿ"},
+ {454, 0, 0, L"Àìåðèêàíñêîå Ñàìîà"},
+ {124, 0, 0, L"Âàíóàòó"},
+ {453, 0, 0, L"Ãóàì (ÑØÀ)"},
+ {126, 0, 0, L"Êèðèáàòè"},
+ {127, 0, 0, L"Ìàðøàëëîâû Îñòðîâà"},
+ {128, 0, 0, L"Ìèêðîíåçèÿ (Ôåäåðàòèâíûå Øòàòû Ìèêðîíåçèè)"},
+ {129, 0, 0, L"Íàóðó"},
+ {3220, 0, 0, L"Íèóý (Í.Çåë.)"},
+ {130, 0, 0, L"Íîâàÿ Çåëàíäèÿ"},
+ {3218, 0, 0, L"Íîâàÿ Êàëåäîíèÿ (Ôð.)"},
+ {3221, 0, 0, L"Îñòðîâà Êóêà (Í.Çåë.)"},
+ {3230, 0, 0, L"Îñòðîâà Õåðä è Ìàêäîíàëüä (Àâñòð.)"},
+ {131, 0, 0, L"Ïàëàó"},
+ {133, 0, 0, L"Ïàïóà - Íîâàÿ Ãâèíåÿ"},
+ {3222, 0, 0, L"Ïèòêåðí (Áðèò.)"},
+ {125, 0, 0, L"Ñàìîà"},
+ {3219, 0, 0, L"Ñåâ. Ìàðèàíñêèå îñòðîâà (ÑØÀ)"},
+ {134, 0, 0, L"Ñîëîìîíîâû Îñòðîâà"},
+ {3223, 0, 0, L"Òîêåëàó (Í.Çåë.)"},
+ {135, 0, 0, L"Òîíãà"},
+ {136, 0, 0, L"Òóâàëó"},
+ {3224, 0, 0, L"Óîëëèñ è Ôóòóíà îñòðîâà (Ôð.)"},
+ {137, 0, 0, L"Ôèäæè"},
+ {3226, 0, 0, L"Ôðàíöóçñêàÿ Ïîëèíåçèÿ"},
+ {3225, 0, 0, L"Ôðàíöóçñêèå Þæíûå òåððèòîðèè"},
+ {138, 0, 0, L"Êàíàäà"},
+ {139, 0, 0, L"ÑØÀ"},
+ {3200, 0, 0, L"Àíãèëüÿ (Áðèò.)"},
+ {140, 0, 0, L"Àíòèãóà è Áàðáóäà"},
+ {141, 0, 0, L"Àðãåíòèíà"},
+ {3202, 0, 0, L"Àðóáà (Íèä.)"},
+ {142, 0, 0, L"Áàãàìû"},
+ {143, 0, 0, L"Áàðáàäîñ"},
+ {146, 0, 0, L"Áåëèç"},
+ {3203, 0, 0, L"Áåðìóäû (Áðèò.)"},
+ {144, 0, 0, L"Áîëèâèÿ"},
+ {145, 0, 0, L"Áðàçèëèÿ"},
+ {147, 0, 0, L"Âåíåñóýëà"},
+ {3204, 0, 0, L"Âèðãèíñêèå îñòðîâà (Áðèò.)"},
+ {452, 0, 0, L"Âèðãèíñêèå îñòðîâà (ÑØÀ)"},
+ {149, 0, 0, L"Ãàèòè"},
+ {148, 0, 0, L"Ãàéàíà"},
+ {3205, 0, 0, L"Ãâàäåëóïà (Ôð.)"},
+ {173, 0, 0, L"Ãâàòåìàëà"},
+ {150, 0, 0, L"Ãîíäóðàñ"},
+ {151, 0, 0, L"Ãðåíàäà"},
+ {152, 0, 0, L"Ãðåíëàíäèÿ (Äàò.)"},
+ {153, 0, 0, L"Äîìèíèêà"},
+ {154, 0, 0, L"Äîìèíèêàíñêàÿ Ðåñïóáëèêà"},
+ {155, 0, 0, L"Êîëóìáèÿ"},
+ {156, 0, 0, L"Êîñòà-Ðèêà"},
+ {157, 0, 0, L"Êóáà"},
+ {3208, 0, 0, L"Ìàðòèíèêà (Ôð.)"},
+ {158, 0, 0, L"Ìåêñèêà"},
+ {3209, 0, 0, L"Ìîíòñåððàò (Áðèò)"},
+ {3201, 0, 0, L"Íèäåðëàíäñêèå Àíòèëû"},
+ {159, 0, 0, L"Íèêàðàãóà"},
+ {3207, 0, 0, L"Îñòðîâ Êàéìàí (Áðèò.)"},
+ {3211, 0, 0, L"Îñòðîâà Òåðêñ è Êàéêîñ (Áðèò.)"},
+ {160, 0, 0, L"Ïàíàìà"},
+ {161, 0, 0, L"Ïàðàãâàé"},
+ {162, 0, 0, L"Ïåðó"},
+ {163, 0, 0, L"Ñàëüâàäîð"},
+ {164, 0, 0, L"Ñåíò-Âèíñåíò è Ãðåíàäèíû"},
+ {165, 0, 0, L"Ñåíò-Êèòñ è Íåâèñ"},
+ {166, 0, 0, L"Ñåíò-Ëþñèÿ"},
+ {3210, 0, 0, L"Ñåíò-Ïüåð è Ìèêåëîí (Ôð.)"},
+ {167, 0, 0, L"Ñóðèíàì"},
+ {168, 0, 0, L"Òðèíèäàò è Òîáàãî"},
+ {169, 0, 0, L"Óðóãâàé"},
+ {3212, 0, 0, L"Ôîëêëåíäñêèå îñòðîâà (Áðèò.)"},
+ {3206, 0, 0, L"Ôðàíöóçñêàÿ Ãâèàíà"},
+ {170, 0, 0, L"×èëè"},
+ {171, 0, 0, L"Ýêâàäîð"},
+ {3213, 0, 0, L"Þæ. Äæîðäæèÿ è Þæ. Ñàíäâè÷åâû î-âà (Áðèò.)"},
+ {172, 0, 0, L"ßìàéêà"},
+ {174, 0, 0, L"Àëæèð"},
+ {175, 0, 0, L"Àíãîëà"},
+ {176, 0, 0, L"Áåíèí"},
+ {177, 0, 0, L"Áîòñâàíà"},
+ {3228, 0, 0, L"Áðèòàíñêàÿ òåððèòîðèÿ â Èíäèéñêîì îêåàíå"},
+ {178, 0, 0, L"Áóðêèíà-Ôàñî"},
+ {179, 0, 0, L"Áóðóíäè"},
+ {180, 0, 0, L"Ãàáîí"},
+ {181, 0, 0, L"Ãàìáèÿ"},
+ {182, 0, 0, L"Ãàíà"},
+ {183, 0, 0, L"Ãâèíåÿ"},
+ {184, 0, 0, L"Ãâèíåÿ-Áèñàó"},
+ {185, 0, 0, L"Äæèáóòè"},
+ {186, 0, 0, L"Åãèïåò"},
+ {187, 0, 0, L"Çàìáèÿ"},
+ {3198, 0, 0, L"Çàï. Ñàõàðà"},
+ {23, 0, 0, L"Çèìáàáâå"},
+ {188, 0, 0, L"Êàáî-Âåðäå"},
+ {189, 0, 0, L"Êàìåðóí"},
+ {190, 0, 0, L"Êåíèÿ"},
+ {191, 0, 0, L"Êîìîðû"},
+ {193, 0, 0, L"Êîíãî (Çàèð)"},
+ {192, 0, 0, L"Êîíãî"},
+ {194, 0, 0, L"Êîò-ä`Èâóàð"},
+ {195, 0, 0, L"Ëåñîòî"},
+ {196, 0, 0, L"Ëèáåðèÿ"},
+ {197, 0, 0, L"Ëèâèÿ"},
+ {198, 0, 0, L"Ìàâðèêèé"},
+ {199, 0, 0, L"Ìàâðèòàíèÿ"},
+ {200, 0, 0, L"Ìàäàãàñêàð"},
+ {3229, 0, 0, L"Ìàéîòò (Ôð.)"},
+ {201, 0, 0, L"Ìàëàâè"},
+ {202, 0, 0, L"Ìàëè"},
+ {203, 0, 0, L"Ìàðîêêî"},
+ {204, 0, 0, L"Ìîçàìáèê"},
+ {205, 0, 0, L"Íàìèáèÿ"},
+ {206, 0, 0, L"Íèãåð"},
+ {207, 0, 0, L"Íèãåðèÿ"},
+ {3227, 0, 0, L"Îñòðîâ Áóâå (Íîðâ.)"},
+ {3197, 0, 0, L"Ðåþíüîí (Ôð.)"},
+ {208, 0, 0, L"Ðóàíäà"},
+ {209, 0, 0, L"Ñàí-Òîìå è Ïðèíñèïè"},
+ {210, 0, 0, L"Ñâàçèëåíä"},
+ {3199, 0, 0, L"Ñâÿòàÿ Åëåíà (Áðèò.)"},
+ {211, 0, 0, L"Ñåéøåëû"},
+ {212, 0, 0, L"Ñåíåãàë"},
+ {213, 0, 0, L"Ñîìàëè"},
+ {214, 0, 0, L"Ñóäàí"},
+ {215, 0, 0, L"Ñüåððà-Ëåîíå"},
+ {216, 0, 0, L"Òàíçàíèÿ"},
+ {217, 0, 0, L"Òîãî"},
+ {218, 0, 0, L"Òóíèñ"},
+ {219, 0, 0, L"Óãàíäà"},
+ {220, 0, 0, L"Öåíòðàëüíîàôðèêàíñêàÿ Ðåñïóáëèêà"},
+ {222, 0, 0, L"×àä"},
+ {223, 0, 0, L"Ýêâàòîðèàëüíàÿ Ãâèíåÿ"},
+ {221, 0, 0, L"Ýðèòðåÿ"},
+ {224, 0, 0, L"Ýôèîïèÿ"},
+ {225, 0, 0, L"Þæíî-Àôðèêàíñêàÿ Ðåñïóáëèêà (ÞÀÐ)"},
+ {39, 0, 0, L"Óêðàèíà"},
+ {40, 0, 0, L"Àâñòðèÿ"},
+ {32, 0, 0, L"Àëáàíèÿ"},
+ {33, 0, 0, L"Àíäîððà"},
+ {340, 0, 0, L"Áåëîðóññèÿ"},
+ {38, 0, 0, L"Áåëüãèÿ"},
+ {41, 0, 0, L"Áîëãàðèÿ"},
+ {42, 0, 0, L"Áîñíèÿ è Ãåðöåãîâèíà"},
+ {43, 0, 0, L"Âàòèêàí"},
+ {45, 0, 0, L"Âåëèêîáðèòàíèÿ"},
+ {44, 0, 0, L"Âåíãðèÿ"},
+ {46, 0, 0, L"Ãåðìàíèÿ"},
+ {3193, 0, 0, L"Ãåðíñè (Áðèò.)"},
+ {47, 0, 0, L"Ãèáðàëòàð (Áðèò.)"},
+ {48, 0, 0, L"Ãðåöèÿ"},
+ {49, 0, 0, L"Äàíèÿ"},
+ {3194, 0, 0, L"Äæåðñè (Áðèò.)"},
+ {50, 0, 0, L"Èðëàíäèÿ"},
+ {51, 0, 0, L"Èñëàíäèÿ"},
+ {34, 0, 0, L"Èñïàíèÿ"},
+ {52, 0, 0, L"Èòàëèÿ"},
+ {53, 0, 0, L"Ëàòâèÿ"},
+ {54, 0, 0, L"Ëèòâà"},
+ {55, 0, 0, L"Ëèõòåíøòåéí"},
+ {56, 0, 0, L"Ëþêñåìáóðã"},
+ {57, 0, 0, L"Ìàêåäîíèÿ"},
+ {58, 0, 0, L"Ìàëüòà"},
+ {59, 0, 0, L"Ìîëäàâèÿ"},
+ {36, 0, 0, L"Ìîíàêî"},
+ {60, 0, 0, L"Íèäåðëàíäû"},
+ {61, 0, 0, L"Íîðâåãèÿ"},
+ {3195, 0, 0, L"Îñòðîâ Ìýí (Áðèò.)"},
+ {62, 0, 0, L"Ïîëüøà"},
+ {35, 0, 0, L"Ïîðòóãàëèÿ"},
+ {63, 0, 0, L"Ðóìûíèÿ"},
+ {64, 0, 0, L"Ñàí-Ìàðèíî"},
+ {74, 0, 0, L"Ñåðáèÿ è ×åðíîãîðèÿ"},
+ {65, 0, 0, L"Ñëîâàêèÿ"},
+ {66, 0, 0, L"Ñëîâåíèÿ"},
+ {67, 0, 0, L"Ôàðåðñêèå î-âà (Äàíèÿ)"},
+ {68, 0, 0, L"Ôèíëÿíäèÿ"},
+ {37, 0, 0, L"Ôðàíöèÿ"},
+ {69, 0, 0, L"Õîðâàòèÿ"},
+ {70, 0, 0, L"×åõèÿ"},
+ {71, 0, 0, L"Øâåéöàðèÿ"},
+ {72, 0, 0, L"Øâåöèÿ"},
+ {3196, 0, 0, L"Øïèöáåðãåí (Íîðâ.)"},
+ {73, 0, 0, L"Ýñòîíèÿ"},
+ {24, 25, 0, L"Ìîñêâà"},
+ {24, 226, 0, L"Ñàíêò-Ïåòåðáóðã"},
+ {24, 233, 0, L"Ñàõà (ßêóòèÿ)"},
+ {24, 232, 0, L"Ïðèìîðñêèé êðàé"},
+ {24, 235, 0, L"Õàáàðîâñêèé êðàé"},
+ {24, 227, 0, L"Àìóðñêàÿ îáë."},
+ {24, 229, 0, L"Êàì÷àòñêàÿ îáë."},
+ {24, 231, 0, L"Ìàãàäàíñêàÿ îáë."},
+ {24, 234, 0, L"Ñàõàëèíñêàÿ îáë."},
+ {24, 228, 0, L"Åâðåéñêàÿ ÀÎ"},
+ {24, 230, 0, L"Êîðÿêñêèé ÀÎ"},
+ {24, 236, 0, L"×óêîòñêèé ÀÎ"},
+ {24, 237, 0, L"Áàøêîðòîñòàí"},
+ {24, 240, 0, L"Ìàðèé-Ýë"},
+ {24, 241, 0, L"Ìîðäîâèÿ"},
+ {24, 248, 0, L"Òàòàðñòàí"},
+ {24, 249, 0, L"Óäìóðòèÿ"},
+ {24, 251, 0, L"×óâàøèÿ"},
+ {24, 238, 0, L"Êèðîâñêàÿ îáë."},
+ {24, 242, 0, L"Íèæåãîðîäñêàÿ îáë."},
+ {24, 243, 0, L"Îðåíáóðãñêàÿ îáë."},
+ {24, 244, 0, L"Ïåíçåíñêàÿ îáë."},
+ {24, 245, 0, L"Ïåðìñêàÿ îáë."},
+ {24, 246, 0, L"Ñàìàðñêàÿ îáë."},
+ {24, 247, 0, L"Ñàðàòîâñêàÿ îáë."},
+ {24, 250, 0, L"Óëüÿíîâñêàÿ îáë."},
+ {24, 239, 0, L"Êîìè-Ïåðìÿöêèé ÀÎ"},
+ {24, 255, 0, L"Êàðåëèÿ"},
+ {24, 256, 0, L"Êîìè"},
+ {24, 252, 0, L"Àðõàíãåëüñêàÿ îáë."},
+ {24, 253, 0, L"Âîëîãîäñêàÿ îáë."},
+ {24, 254, 0, L"Êàëèíèíãðàäñêàÿ îáë."},
+ {24, 257, 0, L"Ëåíèíãðàäñêàÿ îáë."},
+ {24, 258, 0, L"Ìóðìàíñêàÿ îáë."},
+ {24, 260, 0, L"Íîâãîðîäñêàÿ îáë."},
+ {24, 261, 0, L"Ïñêîâñêàÿ îáë."},
+ {24, 259, 0, L"Íåíåöêèé ÀÎ"},
+ {24, 265, 0, L"Áóðÿòèÿ"},
+ {24, 263, 0, L"Ðåñïóáëèêà Àëòàé"},
+ {24, 273, 0, L"Òûâà"},
+ {24, 275, 0, L"Õàêàñèÿ"},
+ {24, 264, 0, L"Àëòàéñêèé êðàé"},
+ {24, 268, 0, L"Êðàñíîÿðñêèé êðàé"},
+ {24, 266, 0, L"Èðêóòñêàÿ îáë."},
+ {24, 267, 0, L"Êåìåðîâñêàÿ îáë."},
+ {24, 269, 0, L"Íîâîñèáèðñêàÿ îáë."},
+ {24, 270, 0, L"Îìñêàÿ îáë."},
+ {24, 272, 0, L"Òîìñêàÿ îáë."},
+ {24, 276, 0, L"×èòèíñêàÿ îáë."},
+ {24, 262, 0, L"Àãèíñêèé Áóðÿòñêèé ÀÎ"},
+ {24, 271, 0, L"Òàéìûðñêèé ÀÎ"},
+ {24, 274, 0, L"Óñòü-Îðäûíñêèé Áóðÿòñêèé ÀÎ"},
+ {24, 277, 0, L"Ýâåíêèéñêèé ÀÎ"},
+ {24, 278, 0, L"Êóðãàíñêàÿ îáë."},
+ {24, 279, 0, L"Ñâåðäëîâñêàÿ îáë."},
+ {24, 280, 0, L"Òþìåíñêàÿ îáë."},
+ {24, 282, 0, L"×åëÿáèíñêàÿ îáë."},
+ {24, 281, 0, L"Õàíòû-Ìàíñèéñêèé ÀÎ - Þãðà"},
+ {24, 283, 0, L"ßìàëî-Íåíåöêèé ÀÎ"},
+ {24, 284, 0, L"Áåëãîðîäñêàÿ îáë."},
+ {24, 285, 0, L"Áðÿíñêàÿ îáë."},
+ {24, 286, 0, L"Âëàäèìèðñêàÿ îáë."},
+ {24, 287, 0, L"Âîðîíåæñêàÿ îáë."},
+ {24, 288, 0, L"Èâàíîâñêàÿ îáë."},
+ {24, 289, 0, L"Êàëóæñêàÿ îáë."},
+ {24, 290, 0, L"Êîñòðîìñêàÿ îáë."},
+ {24, 291, 0, L"Êóðñêàÿ îáë."},
+ {24, 292, 0, L"Ëèïåöêàÿ îáë."},
+ {24, 293, 0, L"Ìîñêîâñêàÿ îáë."},
+ {24, 294, 0, L"Îðëîâñêàÿ îáë."},
+ {24, 295, 0, L"Ðÿçàíñêàÿ îáë."},
+ {24, 296, 0, L"Ñìîëåíñêàÿ îáë."},
+ {24, 297, 0, L"Òàìáîâñêàÿ îáë."},
+ {24, 298, 0, L"Òâåðñêàÿ îáë."},
+ {24, 299, 0, L"Òóëüñêàÿ îáë."},
+ {24, 300, 0, L"ßðîñëàâñêàÿ îáë."},
+ {24, 301, 0, L"Àäûãåÿ"},
+ {24, 304, 0, L"Äàãåñòàí"},
+ {24, 305, 0, L"Èíãóøåòèÿ"},
+ {24, 306, 0, L"Êàáàðäèíî-Áàëêàðèÿ"},
+ {24, 307, 0, L"Êàëìûêèÿ"},
+ {24, 308, 0, L"Êàðà÷àåâî-×åðêåññèÿ"},
+ {24, 311, 0, L"Ñåâåðíàÿ Îñåòèÿ - Àëàíèÿ"},
+ {24, 313, 0, L"×å÷íÿ"},
+ {24, 309, 0, L"Êðàñíîäàðñêèé êðàé"},
+ {24, 312, 0, L"Ñòàâðîïîëüñêèé êðàé"},
+ {24, 302, 0, L"Àñòðàõàíñêàÿ îáë."},
+ {24, 303, 0, L"Âîëãîãðàäñêàÿ îáë."},
+ {24, 310, 0, L"Ðîñòîâñêàÿ îáë."},
+ {81, 1055, 0, L"Áàêó"},
+ {81, 1058, 0, L"Ãÿíäæà"},
+ {81, 1056, 0, L"Íàõè÷åâàíü"},
+ {81, 1057, 0, L"Õàíêåíäè"},
+ {81, 3153, 0, L"Øåêè"},
{81, 2291, 0, lpwszOther},
- {82, 2932, 0, _T("Àáîâÿí")},
- {82, 1060, 0, _T("Àøòàðàê")},
- {82, 3084, 0, _T("Âàíàäçîð")},
- {82, 3011, 0, _T("Ãþìðè")},
- {82, 3306, 0, _T("Äèëèæàí")},
- {82, 1059, 0, _T("Åðåâàí")},
- {82, 3145, 0, _T("Õàíêåíäè")},
+ {82, 2932, 0, L"Àáîâÿí"},
+ {82, 1060, 0, L"Àøòàðàê"},
+ {82, 3084, 0, L"Âàíàäçîð"},
+ {82, 3011, 0, L"Ãþìðè"},
+ {82, 3306, 0, L"Äèëèæàí"},
+ {82, 1059, 0, L"Åðåâàí"},
+ {82, 3145, 0, L"Õàíêåíäè"},
{82, 2292, 0, lpwszOther},
- {97, 1061, 0, _T("Êàáóë")},
+ {97, 1061, 0, L"Êàáóë"},
{97, 2293, 0, lpwszOther},
- {96, 1062, 0, _T("Äàêêà")},
+ {96, 1062, 0, L"Äàêêà"},
{96, 2294, 0, lpwszOther},
- {99, 1063, 0, _T("Ìàíàìà")},
+ {99, 1063, 0, L"Ìàíàìà"},
{99, 2295, 0, lpwszOther},
- {100, 1064, 0, _T("Áàíäàð-Ñåðè-Áåãàâàí")},
+ {100, 1064, 0, L"Áàíäàð-Ñåðè-Áåãàâàí"},
{100, 2296, 0, lpwszOther},
- {101, 1065, 0, _T("Òõèìïõó")},
+ {101, 1065, 0, L"Òõèìïõó"},
{101, 2297, 0, lpwszOther},
- {102, 1066, 0, _T("Õàíîé")},
+ {102, 1066, 0, L"Õàíîé"},
{102, 2298, 0, lpwszOther},
- {83, 1067, 0, _T("Áàòóìè")},
- {83, 3158, 0, _T("Áîðæîìè")},
- {83, 1068, 0, _T("Ïîòè")},
- {83, 3129, 0, _T("Ðóñòàâè")},
- {83, 1069, 0, _T("Ñóõóìè")},
- {83, 1070, 0, _T("Òáèëèñè")},
+ {83, 1067, 0, L"Áàòóìè"},
+ {83, 3158, 0, L"Áîðæîìè"},
+ {83, 1068, 0, L"Ïîòè"},
+ {83, 3129, 0, L"Ðóñòàâè"},
+ {83, 1069, 0, L"Ñóõóìè"},
+ {83, 1070, 0, L"Òáèëèñè"},
{83, 2299, 0, lpwszOther},
- {86, 3345, 0, _T("Àðèýëü")},
- {86, 1071, 0, _T("Àôóëà")},
- {86, 2992, 0, _T("Àøäîä")},
- {86, 3175, 0, _T("Àøêåëîí")},
- {86, 3363, 0, _T("Áàò-ßì")},
- {86, 2884, 0, _T("Áååð-ßêîâ")},
- {86, 3243, 0, _T("Áåéò-Øåìåø")},
- {86, 1074, 0, _T("Áåýð-Øåâà")},
- {86, 3348, 0, _T("Ãåðöåëèÿ")},
- {86, 3241, 0, _T("Äèìîíà")},
- {86, 1075, 0, _T("Èåðóñàëèì")},
- {86, 3350, 0, _T("Éîêíåàì-Èëëèò")},
- {86, 2982, 0, _T("Êàðìèýëü")},
- {86, 2971, 0, _T("Êôàð-Ñàáà")},
- {86, 3136, 0, _T("Íàçàðåò")},
- {86, 1080, 0, _T("Íàòàíèÿ")},
- {86, 3303, 0, _T("Îôàêèì")},
- {86, 3050, 0, _T("Ðààíàíà")},
- {86, 3151, 0, _T("Ðàìàò Ãàí")},
- {86, 3141, 0, _T("Ðåõîâîò")},
- {86, 3012, 0, _T("Ðèøîí ëå Öèîí")},
- {86, 1081, 0, _T("Òâåðèÿ")},
- {86, 1077, 0, _T("Òåëü-Àâèâ")},
- {86, 1079, 0, _T("Õàäåðà")},
- {86, 1078, 0, _T("Õàéôà")},
- {86, 1076, 0, _T("Õåâðîí")},
- {86, 2929, 0, _T("Öôàò")},
- {86, 2928, 0, _T("Ýéëàò")},
+ {86, 3345, 0, L"Àðèýëü"},
+ {86, 1071, 0, L"Àôóëà"},
+ {86, 2992, 0, L"Àøäîä"},
+ {86, 3175, 0, L"Àøêåëîí"},
+ {86, 3363, 0, L"Áàò-ßì"},
+ {86, 2884, 0, L"Áååð-ßêîâ"},
+ {86, 3243, 0, L"Áåéò-Øåìåø"},
+ {86, 1074, 0, L"Áåýð-Øåâà"},
+ {86, 3348, 0, L"Ãåðöåëèÿ"},
+ {86, 3241, 0, L"Äèìîíà"},
+ {86, 1075, 0, L"Èåðóñàëèì"},
+ {86, 3350, 0, L"Éîêíåàì-Èëëèò"},
+ {86, 2982, 0, L"Êàðìèýëü"},
+ {86, 2971, 0, L"Êôàð-Ñàáà"},
+ {86, 3136, 0, L"Íàçàðåò"},
+ {86, 1080, 0, L"Íàòàíèÿ"},
+ {86, 3303, 0, L"Îôàêèì"},
+ {86, 3050, 0, L"Ðààíàíà"},
+ {86, 3151, 0, L"Ðàìàò Ãàí"},
+ {86, 3141, 0, L"Ðåõîâîò"},
+ {86, 3012, 0, L"Ðèøîí ëå Öèîí"},
+ {86, 1081, 0, L"Òâåðèÿ"},
+ {86, 1077, 0, L"Òåëü-Àâèâ"},
+ {86, 1079, 0, L"Õàäåðà"},
+ {86, 1078, 0, L"Õàéôà"},
+ {86, 1076, 0, L"Õåâðîí"},
+ {86, 2929, 0, L"Öôàò"},
+ {86, 2928, 0, L"Ýéëàò"},
{86, 2300, 0, lpwszOther},
- {95, 3315, 0, _T("Áàíãàëîð")},
- {95, 1082, 0, _T("Äåëè")},
- {95, 1083, 0, _T("Äæàéïóð")},
- {95, 3144, 0, _T("Êàëüêóòòà")},
- {95, 3025, 0, _T("Ìóìáàè")},
- {95, 3277, 0, _T("Ïàíàäæè")},
- {95, 1084, 0, _T("×åííàè")},
+ {95, 3315, 0, L"Áàíãàëîð"},
+ {95, 1082, 0, L"Äåëè"},
+ {95, 1083, 0, L"Äæàéïóð"},
+ {95, 3144, 0, L"Êàëüêóòòà"},
+ {95, 3025, 0, L"Ìóìáàè"},
+ {95, 3277, 0, L"Ïàíàäæè"},
+ {95, 1084, 0, L"×åííàè"},
{95, 2301, 0, lpwszOther},
- {103, 1085, 0, _T("Äæàêàðòà")},
+ {103, 1085, 0, L"Äæàêàðòà"},
{103, 2302, 0, lpwszOther},
- {79, 1086, 0, _T("Àììàí")},
+ {79, 1086, 0, L"Àììàí"},
{79, 2303, 0, lpwszOther},
- {85, 1087, 0, _T("Áàãäàä")},
+ {85, 1087, 0, L"Áàãäàä"},
{85, 2304, 0, lpwszOther},
- {87, 1088, 0, _T("Òåãåðàí")},
+ {87, 1088, 0, L"Òåãåðàí"},
{87, 2305, 0, lpwszOther},
- {104, 1089, 0, _T("Ñàíà")},
+ {104, 1089, 0, L"Ñàíà"},
{104, 2306, 0, lpwszOther},
- {84, 1090, 0, _T("Àêòàó")},
- {84, 1091, 0, _T("Àêòþáèíñê")},
- {84, 1092, 0, _T("Àëìà-Àòà")},
- {84, 3242, 0, _T("Àðøàëû")},
- {84, 1093, 0, _T("Àñòàíà")},
- {84, 1094, 0, _T("Àòûðàó (Ãóðüåâ)")},
- {84, 1095, 0, _T("Áàéêîíóð")},
- {84, 3245, 0, _T("Áàëõàø")},
- {84, 3083, 0, _T("Æåçêàçãàí")},
- {84, 1096, 0, _T("Êàï÷àãàé")},
- {84, 1097, 0, _T("Êàðàãàíäà")},
- {84, 1098, 0, _T("Êîêøåòàó")},
- {84, 1099, 0, _T("Êóñòàíàé")},
- {84, 2868, 0, _T("Ëèñàêîâñê")},
- {84, 1100, 0, _T("Ïàâëîäàð")},
- {84, 1101, 0, _T("Ïåòðîïàâëîâñê (Ñåâ.-Êàç. îáë.)")},
- {84, 1102, 0, _T("Ðóäíûé")},
- {84, 1103, 0, _T("Ñåìèïàëàòèíñê")},
- {84, 1104, 0, _T("Ñòåïíîãîðñê")},
- {84, 3166, 0, _T("Òàëãàð")},
- {84, 1105, 0, _T("Òàëäû-Êóðãàí")},
- {84, 2927, 0, _T("Òàðàç")},
- {84, 1106, 0, _T("Òåìèðòàó")},
- {84, 1107, 0, _T("Óðàëüñê")},
- {84, 1108, 0, _T("Óñòü-Êàìåíîãîðñê")},
- {84, 1109, 0, _T("×èìêåíò")},
- {84, 1110, 0, _T("Ýêèáàñòóç")},
+ {84, 1090, 0, L"Àêòàó"},
+ {84, 1091, 0, L"Àêòþáèíñê"},
+ {84, 1092, 0, L"Àëìà-Àòà"},
+ {84, 3242, 0, L"Àðøàëû"},
+ {84, 1093, 0, L"Àñòàíà"},
+ {84, 1094, 0, L"Àòûðàó (Ãóðüåâ)"},
+ {84, 1095, 0, L"Áàéêîíóð"},
+ {84, 3245, 0, L"Áàëõàø"},
+ {84, 3083, 0, L"Æåçêàçãàí"},
+ {84, 1096, 0, L"Êàï÷àãàé"},
+ {84, 1097, 0, L"Êàðàãàíäà"},
+ {84, 1098, 0, L"Êîêøåòàó"},
+ {84, 1099, 0, L"Êóñòàíàé"},
+ {84, 2868, 0, L"Ëèñàêîâñê"},
+ {84, 1100, 0, L"Ïàâëîäàð"},
+ {84, 1101, 0, L"Ïåòðîïàâëîâñê (Ñåâ.-Êàç. îáë.)"},
+ {84, 1102, 0, L"Ðóäíûé"},
+ {84, 1103, 0, L"Ñåìèïàëàòèíñê"},
+ {84, 1104, 0, L"Ñòåïíîãîðñê"},
+ {84, 3166, 0, L"Òàëãàð"},
+ {84, 1105, 0, L"Òàëäû-Êóðãàí"},
+ {84, 2927, 0, L"Òàðàç"},
+ {84, 1106, 0, L"Òåìèðòàó"},
+ {84, 1107, 0, L"Óðàëüñê"},
+ {84, 1108, 0, L"Óñòü-Êàìåíîãîðñê"},
+ {84, 1109, 0, L"×èìêåíò"},
+ {84, 1110, 0, L"Ýêèáàñòóç"},
{84, 2307, 0, lpwszOther},
- {105, 1111, 0, _T("Ïíîìïåíü")},
+ {105, 1111, 0, L"Ïíîìïåíü"},
{105, 2308, 0, lpwszOther},
- {106, 1112, 0, _T("Äîõà")},
+ {106, 1112, 0, L"Äîõà"},
{106, 2309, 0, lpwszOther},
- {107, 1113, 0, _T("Ëàðíàêà")},
- {107, 1114, 0, _T("Ëèìàññîë")},
- {107, 1115, 0, _T("Íèêîñèÿ")},
- {107, 2954, 0, _T("Ïàôîñ")},
+ {107, 1113, 0, L"Ëàðíàêà"},
+ {107, 1114, 0, L"Ëèìàññîë"},
+ {107, 1115, 0, L"Íèêîñèÿ"},
+ {107, 2954, 0, L"Ïàôîñ"},
{107, 2310, 0, lpwszOther},
- {92, 1116, 0, _T("Áèøêåê")},
- {92, 1117, 0, _T("Äæàëàë-Àáàä")},
- {92, 3027, 0, _T("Êàðà-Áàëòà")},
- {92, 1118, 0, _T("Êàðàêîë")},
- {92, 1119, 0, _T("Îø")},
- {92, 1120, 0, _T("Òàëàñ")},
- {92, 2933, 0, _T("Õàéäàðêåí")},
+ {92, 1116, 0, L"Áèøêåê"},
+ {92, 1117, 0, L"Äæàëàë-Àáàä"},
+ {92, 3027, 0, L"Êàðà-Áàëòà"},
+ {92, 1118, 0, L"Êàðàêîë"},
+ {92, 1119, 0, L"Îø"},
+ {92, 1120, 0, L"Òàëàñ"},
+ {92, 2933, 0, L"Õàéäàðêåí"},
{92, 2311, 0, lpwszOther},
- {76, 3214, 0, _T("Àîìûíü (Ìàêàî)")},
- {76, 1121, 0, _T("Ãîíêîíã")},
- {76, 2869, 0, _T("Ãóàí÷æîó")},
- {76, 3262, 0, _T("Äàëÿíü")},
- {76, 1122, 0, _T("Ïåêèí")},
- {76, 1123, 0, _T("Õàðáèí")},
- {76, 1124, 0, _T("Øàíõàé")},
- {76, 3043, 0, _T("Øåíüÿí")},
+ {76, 3214, 0, L"Àîìûíü (Ìàêàî)"},
+ {76, 1121, 0, L"Ãîíêîíã"},
+ {76, 2869, 0, L"Ãóàí÷æîó"},
+ {76, 3262, 0, L"Äàëÿíü"},
+ {76, 1122, 0, L"Ïåêèí"},
+ {76, 1123, 0, L"Õàðáèí"},
+ {76, 1124, 0, L"Øàíõàé"},
+ {76, 3043, 0, L"Øåíüÿí"},
{76, 2312, 0, lpwszOther},
- {29, 1125, 0, _T("Ïõåíüÿí")},
+ {29, 1125, 0, L"Ïõåíüÿí"},
{29, 2313, 0, lpwszOther},
- {108, 1126, 0, _T("Ñåóë")},
- {108, 3240, 0, _T("Òåéäæîí")},
+ {108, 1126, 0, L"Ñåóë"},
+ {108, 3240, 0, L"Òåéäæîí"},
{108, 2314, 0, lpwszOther},
- {88, 1127, 0, _T("Ýëü-Êóâåéò")},
+ {88, 1127, 0, L"Ýëü-Êóâåéò"},
{88, 2315, 0, lpwszOther},
- {109, 1128, 0, _T("Âüåíòüÿí")},
+ {109, 1128, 0, L"Âüåíòüÿí"},
{109, 2316, 0, lpwszOther},
- {110, 1129, 0, _T("Áåéðóò")},
+ {110, 1129, 0, L"Áåéðóò"},
{110, 2317, 0, lpwszOther},
- {111, 1130, 0, _T("Äæîõîð-Áàðó")},
- {111, 1131, 0, _T("Êóàëà-Ëóìïóð")},
+ {111, 1130, 0, L"Äæîõîð-Áàðó"},
+ {111, 1131, 0, L"Êóàëà-Ëóìïóð"},
{111, 2318, 0, lpwszOther},
- {112, 1132, 0, _T("Ìàëå")},
+ {112, 1132, 0, L"Ìàëå"},
{112, 2319, 0, lpwszOther},
- {113, 1133, 0, _T("Óëàí-Áàòîð")},
- {113, 1134, 0, _T("Ýðäýíýò")},
+ {113, 1133, 0, L"Óëàí-Áàòîð"},
+ {113, 1134, 0, L"Ýðäýíýò"},
{113, 2320, 0, lpwszOther},
- {114, 1135, 0, _T("ßíãîí")},
+ {114, 1135, 0, L"ßíãîí"},
{114, 2321, 0, lpwszOther},
- {115, 1136, 0, _T("Êàòìàíäó")},
+ {115, 1136, 0, L"Êàòìàíäó"},
{115, 2322, 0, lpwszOther},
- {116, 1137, 0, _T("Àáó-Äàáè")},
- {116, 1138, 0, _T("Äóáàé")},
- {116, 1139, 0, _T("Øàðäæà")},
+ {116, 1137, 0, L"Àáó-Äàáè"},
+ {116, 1138, 0, L"Äóáàé"},
+ {116, 1139, 0, L"Øàðäæà"},
{116, 2323, 0, lpwszOther},
- {117, 1140, 0, _T("Ìàñêàò")},
+ {117, 1140, 0, L"Ìàñêàò"},
{117, 2324, 0, lpwszOther},
- {122, 1141, 0, _T("Èñëàìàáàä")},
+ {122, 1141, 0, L"Èñëàìàáàä"},
{122, 2325, 0, lpwszOther},
- {89, 1072, 0, _T("Àøäîä")},
- {89, 1073, 0, _T("Àøêåëîí")},
- {89, 1142, 0, _T("Ãàçà")},
+ {89, 1072, 0, L"Àøäîä"},
+ {89, 1073, 0, L"Àøêåëîí"},
+ {89, 1142, 0, L"Ãàçà"},
{89, 2326, 0, lpwszOther},
- {94, 3250, 0, _T("Ìåäèíà")},
- {94, 1143, 0, _T("Ýð-Ðèÿä")},
+ {94, 3250, 0, L"Ìåäèíà"},
+ {94, 1143, 0, L"Ýð-Ðèÿä"},
{94, 2327, 0, lpwszOther},
- {78, 1144, 0, _T("Äàìàñê")},
+ {78, 1144, 0, L"Äàìàñê"},
{78, 2328, 0, lpwszOther},
- {91, 1145, 0, _T("Äóøàíáå")},
- {91, 3307, 0, _T("Êàéðàêêóì")},
- {91, 3308, 0, _T("Õóäæàíä")},
+ {91, 1145, 0, L"Äóøàíáå"},
+ {91, 3307, 0, L"Êàéðàêêóì"},
+ {91, 3308, 0, L"Õóäæàíä"},
{91, 2329, 0, lpwszOther},
- {119, 1146, 0, _T("Áàíãêîê")},
- {119, 1147, 0, _T("Ïõóêåò")},
+ {119, 1146, 0, L"Áàíãêîê"},
+ {119, 1147, 0, L"Ïõóêåò"},
{119, 2330, 0, lpwszOther},
- {120, 1148, 0, _T("Òàéáýé")},
+ {120, 1148, 0, L"Òàéáýé"},
{120, 2331, 0, lpwszOther},
- {132, 1149, 0, _T("Äèëè")},
+ {132, 1149, 0, L"Äèëè"},
{132, 2332, 0, lpwszOther},
- {90, 1150, 0, _T("Àøõàáàä")},
- {90, 3079, 0, _T("Áåçìåèí")},
+ {90, 1150, 0, L"Àøõàáàä"},
+ {90, 3079, 0, L"Áåçìåèí"},
{90, 2333, 0, lpwszOther},
- {77, 1152, 0, _T("Àíêàðà")},
- {77, 1153, 0, _T("Àíòàëèÿ")},
- {77, 3080, 0, _T("Áóðñà")},
- {77, 1151, 0, _T("Ìàðìàðèñ")},
- {77, 1154, 0, _T("Ñòàìáóë")},
- {77, 1155, 0, _T("Òðàáçîí")},
+ {77, 1152, 0, L"Àíêàðà"},
+ {77, 1153, 0, L"Àíòàëèÿ"},
+ {77, 3080, 0, L"Áóðñà"},
+ {77, 1151, 0, L"Ìàðìàðèñ"},
+ {77, 1154, 0, L"Ñòàìáóë"},
+ {77, 1155, 0, L"Òðàáçîí"},
{77, 2334, 0, lpwszOther},
- {93, 3362, 0, _T("Àëìàëûê")},
- {93, 3137, 0, _T("Àíäèæàí")},
- {93, 3273, 0, _T("Àñàêà")},
- {93, 1156, 0, _T("Àõàíãàðàí")},
- {93, 1157, 0, _T("Áóõàðà")},
- {93, 3167, 0, _T("Äæèçàê")},
- {93, 3347, 0, _T("Êóíãðàä")},
- {93, 1158, 0, _T("Íàâîè")},
- {93, 1159, 0, _T("Íàìàíãàí")},
- {93, 1160, 0, _T("Ñàìàðêàíä")},
- {93, 1161, 0, _T("Òàøêåíò")},
- {93, 1162, 0, _T("Óðãåí÷")},
- {93, 1163, 0, _T("Ôåðãàíà")},
- {93, 1164, 0, _T("×èð÷èê")},
+ {93, 3362, 0, L"Àëìàëûê"},
+ {93, 3137, 0, L"Àíäèæàí"},
+ {93, 3273, 0, L"Àñàêà"},
+ {93, 1156, 0, L"Àõàíãàðàí"},
+ {93, 1157, 0, L"Áóõàðà"},
+ {93, 3167, 0, L"Äæèçàê"},
+ {93, 3347, 0, L"Êóíãðàä"},
+ {93, 1158, 0, L"Íàâîè"},
+ {93, 1159, 0, L"Íàìàíãàí"},
+ {93, 1160, 0, L"Ñàìàðêàíä"},
+ {93, 1161, 0, L"Òàøêåíò"},
+ {93, 1162, 0, L"Óðãåí÷"},
+ {93, 1163, 0, L"Ôåðãàíà"},
+ {93, 1164, 0, L"×èð÷èê"},
{93, 2335, 0, lpwszOther},
- {121, 1165, 0, _T("Ìàíèëà")},
- {121, 3319, 0, _T("Ñåáó")},
+ {121, 1165, 0, L"Ìàíèëà"},
+ {121, 3319, 0, L"Ñåáó"},
{121, 2336, 0, lpwszOther},
- {98, 1166, 0, _T("Êîëîìáî")},
+ {98, 1166, 0, L"Êîëîìáî"},
{98, 2337, 0, lpwszOther},
- {75, 3176, 0, _T("Èñåñàêè")},
- {75, 3339, 0, _T("Êîðèÿìà")},
- {75, 1167, 0, _T("Ñàïïîðî")},
- {75, 1168, 0, _T("Òîêèî")},
+ {75, 3176, 0, L"Èñåñàêè"},
+ {75, 3339, 0, L"Êîðèÿìà"},
+ {75, 1167, 0, L"Ñàïïîðî"},
+ {75, 1168, 0, L"Òîêèî"},
{75, 2338, 0, lpwszOther},
- {123, 1914, 0, _T("Àäåëàèäà")},
- {123, 2957, 0, _T("Áëýê Ðîê")},
- {123, 1915, 0, _T("Áðèñáåí")},
- {123, 3331, 0, _T("Ãîðîêàí")},
- {123, 1916, 0, _T("Êàíáåððà")},
- {123, 3001, 0, _T("Ëèäêîìá")},
- {123, 1917, 0, _T("Ìåëüáóðí")},
- {123, 3217, 0, _T("Íîðôîëê")},
- {123, 3064, 0, _T("Ïåðò")},
- {123, 3020, 0, _T("Ñàíòà Ëþñèà")},
- {123, 1918, 0, _T("Ñèäíåé")},
- {123, 3238, 0, _T("Ýíåàááà")},
+ {123, 1914, 0, L"Àäåëàèäà"},
+ {123, 2957, 0, L"Áëýê Ðîê"},
+ {123, 1915, 0, L"Áðèñáåí"},
+ {123, 3331, 0, L"Ãîðîêàí"},
+ {123, 1916, 0, L"Êàíáåððà"},
+ {123, 3001, 0, L"Ëèäêîìá"},
+ {123, 1917, 0, L"Ìåëüáóðí"},
+ {123, 3217, 0, L"Íîðôîëê"},
+ {123, 3064, 0, L"Ïåðò"},
+ {123, 3020, 0, L"Ñàíòà Ëþñèà"},
+ {123, 1918, 0, L"Ñèäíåé"},
+ {123, 3238, 0, L"Ýíåàááà"},
{123, 2339, 0, lpwszOther},
- {454, 1192, 0, _T("Ïàãî-Ïàãî")},
+ {454, 1192, 0, L"Ïàãî-Ïàãî"},
{454, 2366, 0, lpwszOther},
- {124, 1919, 0, _T("Ïîðò-Âèëà")},
+ {124, 1919, 0, L"Ïîðò-Âèëà"},
{124, 2340, 0, lpwszOther},
- {453, 1193, 0, _T("Àãàíüÿ")},
+ {453, 1193, 0, L"Àãàíüÿ"},
{453, 2368, 0, lpwszOther},
- {126, 1921, 0, _T("Áàèðèêè")},
+ {126, 1921, 0, L"Áàèðèêè"},
{126, 2342, 0, lpwszOther},
- {127, 1922, 0, _T("Ìàäæóðî")},
+ {127, 1922, 0, L"Ìàäæóðî"},
{127, 2343, 0, lpwszOther},
- {128, 1923, 0, _T("Ïàëèêèð")},
+ {128, 1923, 0, L"Ïàëèêèð"},
{128, 2344, 0, lpwszOther},
- {129, 1924, 0, _T("ßðåí")},
+ {129, 1924, 0, L"ßðåí"},
{129, 2345, 0, lpwszOther},
- {130, 1925, 0, _T("Âåëëèíãòîí")},
- {130, 1926, 0, _T("Ãàìèëüòîí")},
- {130, 1928, 0, _T("Äàíèäèí")},
- {130, 1929, 0, _T("Êðàéñò÷åð÷")},
- {130, 3235, 0, _T("Êðîìâåëü")},
- {130, 1927, 0, _T("Îêëåíä")},
- {130, 3323, 0, _T("Òàóðàíãà")},
+ {130, 1925, 0, L"Âåëëèíãòîí"},
+ {130, 1926, 0, L"Ãàìèëüòîí"},
+ {130, 1928, 0, L"Äàíèäèí"},
+ {130, 1929, 0, L"Êðàéñò÷åð÷"},
+ {130, 3235, 0, L"Êðîìâåëü"},
+ {130, 1927, 0, L"Îêëåíä"},
+ {130, 3323, 0, L"Òàóðàíãà"},
{130, 2346, 0, lpwszOther},
- {131, 1930, 0, _T("Êîðîð")},
+ {131, 1930, 0, L"Êîðîð"},
{131, 2347, 0, lpwszOther},
- {133, 1931, 0, _T("Ïîðò-Ìîðñáè")},
+ {133, 1931, 0, L"Ïîðò-Ìîðñáè"},
{133, 2348, 0, lpwszOther},
- {125, 1920, 0, _T("Àïèà")},
+ {125, 1920, 0, L"Àïèà"},
{125, 2341, 0, lpwszOther},
- {134, 1932, 0, _T("Õîíèàðà")},
+ {134, 1932, 0, L"Õîíèàðà"},
{134, 2349, 0, lpwszOther},
- {135, 1933, 0, _T("Íóêóàëîôà")},
+ {135, 1933, 0, L"Íóêóàëîôà"},
{135, 2350, 0, lpwszOther},
- {136, 1934, 0, _T("Ôóíàôóòè")},
+ {136, 1934, 0, L"Ôóíàôóòè"},
{136, 2351, 0, lpwszOther},
- {137, 1935, 0, _T("Ñóâà")},
+ {137, 1935, 0, L"Ñóâà"},
{137, 2352, 0, lpwszOther},
- {138, 3055, 0, _T("Áàðëèíãòîí")},
- {138, 3049, 0, _T("Áðîññàðä")},
- {138, 3330, 0, _T("Áóðíàáè")},
- {138, 1169, 0, _T("Âàíêóâåð")},
- {138, 3106, 0, _T("Âàòåðëîî")},
- {138, 1170, 0, _T("Âèííèïåã")},
- {138, 1171, 0, _T("Ãàëèôàêñ")},
- {138, 1172, 0, _T("Ãàìèëüòîí")},
- {138, 3365, 0, _T("Äåíâåð")},
- {138, 1173, 0, _T("Êàëãàðè")},
- {138, 3104, 0, _T("Êàìëóïñ")},
- {138, 3366, 0, _T("Êàííèíãòîí")},
- {138, 1174, 0, _T("Êâåáåê")},
- {138, 2964, 0, _T("Êèíãñòîí")},
- {138, 3113, 0, _T("Êîêâèòëàì")},
- {138, 1175, 0, _T("Ìîíðåàëü")},
- {138, 2920, 0, _T("Íèàãàðà-Ôîëñ")},
- {138, 2889, 0, _T("Íîðä-Éîðê")},
- {138, 1176, 0, _T("Îòòàâà")},
- {138, 2903, 0, _T("Ïîðò Àëáåðíè")},
- {138, 1177, 0, _T("Ðè÷ìîíä")},
- {138, 1178, 0, _T("Òèììèíñ")},
- {138, 2946, 0, _T("Òîðíõèëë")},
- {138, 1179, 0, _T("Òîðîíòî")},
- {138, 1180, 0, _T("Ýäìîíòîí")},
+ {138, 3055, 0, L"Áàðëèíãòîí"},
+ {138, 3049, 0, L"Áðîññàðä"},
+ {138, 3330, 0, L"Áóðíàáè"},
+ {138, 1169, 0, L"Âàíêóâåð"},
+ {138, 3106, 0, L"Âàòåðëîî"},
+ {138, 1170, 0, L"Âèííèïåã"},
+ {138, 1171, 0, L"Ãàëèôàêñ"},
+ {138, 1172, 0, L"Ãàìèëüòîí"},
+ {138, 3365, 0, L"Äåíâåð"},
+ {138, 1173, 0, L"Êàëãàðè"},
+ {138, 3104, 0, L"Êàìëóïñ"},
+ {138, 3366, 0, L"Êàííèíãòîí"},
+ {138, 1174, 0, L"Êâåáåê"},
+ {138, 2964, 0, L"Êèíãñòîí"},
+ {138, 3113, 0, L"Êîêâèòëàì"},
+ {138, 1175, 0, L"Ìîíðåàëü"},
+ {138, 2920, 0, L"Íèàãàðà-Ôîëñ"},
+ {138, 2889, 0, L"Íîðä-Éîðê"},
+ {138, 1176, 0, L"Îòòàâà"},
+ {138, 2903, 0, L"Ïîðò Àëáåðíè"},
+ {138, 1177, 0, L"Ðè÷ìîíä"},
+ {138, 1178, 0, L"Òèììèíñ"},
+ {138, 2946, 0, L"Òîðíõèëë"},
+ {138, 1179, 0, L"Òîðîíòî"},
+ {138, 1180, 0, L"Ýäìîíòîí"},
{138, 2353, 0, lpwszOther},
- {139, 407, 0, _T("Âàøèíãòîí")},
- {139, 426, 0, _T("Àéäàõî")},
- {139, 378, 0, _T("Àéîâà")},
- {139, 412, 0, _T("Àëàáàìà")},
- {139, 446, 0, _T("Àëÿñêà")},
- {139, 434, 0, _T("Àðèçîíà")},
- {139, 416, 0, _T("Àðêàíçàñ")},
- {139, 428, 0, _T("Âàéîìèíã")},
- {139, 440, 0, _T("Âàøèíãòîí")},
- {139, 352, 0, _T("Âåðìîíò")},
- {139, 394, 0, _T("Âèðãèíèÿ")},
- {139, 374, 0, _T("Âèñêîíñèí")},
- {139, 448, 0, _T("Ãàâàéè")},
- {139, 390, 0, _T("Äåëàâåð")},
- {139, 402, 0, _T("Äæîðäæèÿ")},
- {139, 396, 0, _T("Çàïàäíàÿ Âèðãèíèÿ")},
- {139, 370, 0, _T("Èëëèíîéñ")},
- {139, 368, 0, _T("Èíäèàíà")},
- {139, 444, 0, _T("Êàëèôîðíèÿ")},
- {139, 388, 0, _T("Êàíçàñ")},
- {139, 408, 0, _T("Êåíòóêêè")},
- {139, 430, 0, _T("Êîëîðàäî")},
- {139, 358, 0, _T("Êîííåêòèêóò")},
- {139, 418, 0, _T("Ëóèçèàíà")},
- {139, 354, 0, _T("Ìàññà÷óñåòñ")},
- {139, 376, 0, _T("Ìèííåñîòà")},
- {139, 414, 0, _T("Ìèññèñèïè")},
- {139, 380, 0, _T("Ìèññóðè")},
- {139, 372, 0, _T("Ìè÷èãàí")},
- {139, 424, 0, _T("Ìîíòàíà")},
- {139, 348, 0, _T("Ìýí")},
- {139, 392, 0, _T("Ìýðèëåíä")},
- {139, 386, 0, _T("Íåáðàñêà")},
- {139, 438, 0, _T("Íåâàäà")},
- {139, 362, 0, _T("Íüþ-Äæåðñè")},
- {139, 360, 0, _T("Íüþ-Éîðê")},
- {139, 432, 0, _T("Íüþ-Ìåêñèêî")},
- {139, 350, 0, _T("Íüþ-Õýìïøèð")},
- {139, 366, 0, _T("Îãàéî")},
- {139, 420, 0, _T("Îêëàõîìà")},
- {139, 442, 0, _T("Îðåãîí")},
- {139, 364, 0, _T("Ïåíñèëüâàíèÿ")},
- {139, 450, 0, _T("Ïóýðòî-Ðèêî")},
- {139, 356, 0, _T("Ðîä-Àéëåíä")},
- {139, 382, 0, _T("Ñåâåðíàÿ Äàêîòà")},
- {139, 398, 0, _T("Ñåâåðíàÿ Êàðîëèíà")},
- {139, 410, 0, _T("Òåííåññè")},
- {139, 422, 0, _T("Òåõàñ")},
- {139, 406, 0, _T("Ôåäåðàëüíûé îêðóã Êîëóìáèÿ")},
- {139, 404, 0, _T("Ôëîðèäà")},
- {139, 384, 0, _T("Þæíàÿ Äàêîòà")},
- {139, 400, 0, _T("Þæíàÿ Êàðîëèíà")},
- {139, 436, 0, _T("Þòà")},
- {140, 1238, 0, _T("Ñåíò-Äæîíñ")},
+ {139, 407, 0, L"Âàøèíãòîí"},
+ {139, 426, 0, L"Àéäàõî"},
+ {139, 378, 0, L"Àéîâà"},
+ {139, 412, 0, L"Àëàáàìà"},
+ {139, 446, 0, L"Àëÿñêà"},
+ {139, 434, 0, L"Àðèçîíà"},
+ {139, 416, 0, L"Àðêàíçàñ"},
+ {139, 428, 0, L"Âàéîìèíã"},
+ {139, 440, 0, L"Âàøèíãòîí"},
+ {139, 352, 0, L"Âåðìîíò"},
+ {139, 394, 0, L"Âèðãèíèÿ"},
+ {139, 374, 0, L"Âèñêîíñèí"},
+ {139, 448, 0, L"Ãàâàéè"},
+ {139, 390, 0, L"Äåëàâåð"},
+ {139, 402, 0, L"Äæîðäæèÿ"},
+ {139, 396, 0, L"Çàïàäíàÿ Âèðãèíèÿ"},
+ {139, 370, 0, L"Èëëèíîéñ"},
+ {139, 368, 0, L"Èíäèàíà"},
+ {139, 444, 0, L"Êàëèôîðíèÿ"},
+ {139, 388, 0, L"Êàíçàñ"},
+ {139, 408, 0, L"Êåíòóêêè"},
+ {139, 430, 0, L"Êîëîðàäî"},
+ {139, 358, 0, L"Êîííåêòèêóò"},
+ {139, 418, 0, L"Ëóèçèàíà"},
+ {139, 354, 0, L"Ìàññà÷óñåòñ"},
+ {139, 376, 0, L"Ìèííåñîòà"},
+ {139, 414, 0, L"Ìèññèñèïè"},
+ {139, 380, 0, L"Ìèññóðè"},
+ {139, 372, 0, L"Ìè÷èãàí"},
+ {139, 424, 0, L"Ìîíòàíà"},
+ {139, 348, 0, L"Ìýí"},
+ {139, 392, 0, L"Ìýðèëåíä"},
+ {139, 386, 0, L"Íåáðàñêà"},
+ {139, 438, 0, L"Íåâàäà"},
+ {139, 362, 0, L"Íüþ-Äæåðñè"},
+ {139, 360, 0, L"Íüþ-Éîðê"},
+ {139, 432, 0, L"Íüþ-Ìåêñèêî"},
+ {139, 350, 0, L"Íüþ-Õýìïøèð"},
+ {139, 366, 0, L"Îãàéî"},
+ {139, 420, 0, L"Îêëàõîìà"},
+ {139, 442, 0, L"Îðåãîí"},
+ {139, 364, 0, L"Ïåíñèëüâàíèÿ"},
+ {139, 450, 0, L"Ïóýðòî-Ðèêî"},
+ {139, 356, 0, L"Ðîä-Àéëåíä"},
+ {139, 382, 0, L"Ñåâåðíàÿ Äàêîòà"},
+ {139, 398, 0, L"Ñåâåðíàÿ Êàðîëèíà"},
+ {139, 410, 0, L"Òåííåññè"},
+ {139, 422, 0, L"Òåõàñ"},
+ {139, 406, 0, L"Ôåäåðàëüíûé îêðóã Êîëóìáèÿ"},
+ {139, 404, 0, L"Ôëîðèäà"},
+ {139, 384, 0, L"Þæíàÿ Äàêîòà"},
+ {139, 400, 0, L"Þæíàÿ Êàðîëèíà"},
+ {139, 436, 0, L"Þòà"},
+ {140, 1238, 0, L"Ñåíò-Äæîíñ"},
{140, 2442, 0, lpwszOther},
- {141, 1239, 0, _T("Áóýíîñ-Àéðåñ")},
+ {141, 1239, 0, L"Áóýíîñ-Àéðåñ"},
{141, 2441, 0, lpwszOther},
- {142, 1240, 0, _T("Íàññàó")},
+ {142, 1240, 0, L"Íàññàó"},
{142, 2440, 0, lpwszOther},
- {143, 1241, 0, _T("Áðèäæòàóí")},
+ {143, 1241, 0, L"Áðèäæòàóí"},
{143, 2439, 0, lpwszOther},
- {146, 1242, 0, _T("Áåëüìîïàí")},
+ {146, 1242, 0, L"Áåëüìîïàí"},
{146, 2438, 0, lpwszOther},
- {144, 1243, 0, _T("Ëà-Ïàñ")},
+ {144, 1243, 0, L"Ëà-Ïàñ"},
{144, 2437, 0, lpwszOther},
- {145, 1244, 0, _T("Áðàçèëèà")},
- {145, 3094, 0, _T("Ïàññî Ôóíäî")},
- {145, 1245, 0, _T("Ðèî-äå-Æàíåéðî")},
- {145, 1246, 0, _T("Ñàí-Ïàóëó")},
+ {145, 1244, 0, L"Áðàçèëèà"},
+ {145, 3094, 0, L"Ïàññî Ôóíäî"},
+ {145, 1245, 0, L"Ðèî-äå-Æàíåéðî"},
+ {145, 1246, 0, L"Ñàí-Ïàóëó"},
{145, 2436, 0, lpwszOther},
- {147, 1247, 0, _T("Êàðàêàñ")},
+ {147, 1247, 0, L"Êàðàêàñ"},
{147, 2435, 0, lpwszOther},
- {452, 1190, 0, _T("Øàðëîòòà-Àìàëèÿ")},
+ {452, 1190, 0, L"Øàðëîòòà-Àìàëèÿ"},
{452, 2364, 0, lpwszOther},
- {149, 1248, 0, _T("Ïîðò-î-Ïðåíñ")},
+ {149, 1248, 0, L"Ïîðò-î-Ïðåíñ"},
{149, 2434, 0, lpwszOther},
- {148, 1249, 0, _T("Äæîðæòàóí")},
+ {148, 1249, 0, L"Äæîðæòàóí"},
{148, 2433, 0, lpwszOther},
- {173, 1250, 0, _T("Ãâàòåìàëà")},
+ {173, 1250, 0, L"Ãâàòåìàëà"},
{173, 2432, 0, lpwszOther},
- {150, 1251, 0, _T("Òåãóñèãàëüïà")},
+ {150, 1251, 0, L"Òåãóñèãàëüïà"},
{150, 2431, 0, lpwszOther},
- {151, 1252, 0, _T("Ñåíò-Äæîðäæåñ")},
+ {151, 1252, 0, L"Ñåíò-Äæîðäæåñ"},
{151, 2430, 0, lpwszOther},
- {152, 1253, 0, _T("Óìàíàê")},
+ {152, 1253, 0, L"Óìàíàê"},
{152, 2429, 0, lpwszOther},
- {153, 1254, 0, _T("Ðîçî")},
+ {153, 1254, 0, L"Ðîçî"},
{153, 2428, 0, lpwszOther},
- {154, 1255, 0, _T("Ñàíòî-Äîìèíãî")},
+ {154, 1255, 0, L"Ñàíòî-Äîìèíãî"},
{154, 2427, 0, lpwszOther},
- {155, 1256, 0, _T("Áîãîòà")},
+ {155, 1256, 0, L"Áîãîòà"},
{155, 2426, 0, lpwszOther},
- {156, 1257, 0, _T("Ñàí-Õîñå")},
+ {156, 1257, 0, L"Ñàí-Õîñå"},
{156, 2425, 0, lpwszOther},
- {157, 1258, 0, _T("Ãàâàíà")},
+ {157, 1258, 0, L"Ãàâàíà"},
{157, 2424, 0, lpwszOther},
- {158, 1259, 0, _T("Àêàïóëüêî")},
- {158, 1260, 0, _T("Ìåõèêî")},
+ {158, 1259, 0, L"Àêàïóëüêî"},
+ {158, 1260, 0, L"Ìåõèêî"},
{158, 2423, 0, lpwszOther},
- {159, 1261, 0, _T("Ìàíàãóà")},
+ {159, 1261, 0, L"Ìàíàãóà"},
{159, 2422, 0, lpwszOther},
- {160, 1262, 0, _T("Ïàíàìà")},
+ {160, 1262, 0, L"Ïàíàìà"},
{160, 2421, 0, lpwszOther},
- {161, 1263, 0, _T("Àñóíñüîí")},
+ {161, 1263, 0, L"Àñóíñüîí"},
{161, 2420, 0, lpwszOther},
- {162, 1264, 0, _T("Ëèìà")},
+ {162, 1264, 0, L"Ëèìà"},
{162, 2419, 0, lpwszOther},
- {163, 1265, 0, _T("Ñàí-Ñàëüâàäîð")},
+ {163, 1265, 0, L"Ñàí-Ñàëüâàäîð"},
{163, 2418, 0, lpwszOther},
- {164, 1266, 0, _T("Êèíãñòàóí")},
+ {164, 1266, 0, L"Êèíãñòàóí"},
{164, 2417, 0, lpwszOther},
- {165, 1267, 0, _T("Áàñòåð")},
+ {165, 1267, 0, L"Áàñòåð"},
{165, 2416, 0, lpwszOther},
- {166, 1268, 0, _T("Êàñòðè")},
+ {166, 1268, 0, L"Êàñòðè"},
{166, 2415, 0, lpwszOther},
- {167, 1269, 0, _T("Ïàðàìàðèáî")},
+ {167, 1269, 0, L"Ïàðàìàðèáî"},
{167, 2414, 0, lpwszOther},
- {168, 1270, 0, _T("Ïîðò-îô-Ñïåéí")},
+ {168, 1270, 0, L"Ïîðò-îô-Ñïåéí"},
{168, 2413, 0, lpwszOther},
- {169, 1271, 0, _T("Ìîíòåâèäåî")},
+ {169, 1271, 0, L"Ìîíòåâèäåî"},
{169, 2412, 0, lpwszOther},
- {170, 1272, 0, _T("Ñàíòüÿãî")},
+ {170, 1272, 0, L"Ñàíòüÿãî"},
{170, 2411, 0, lpwszOther},
- {171, 1273, 0, _T("Ãóàÿêèëü")},
- {171, 1274, 0, _T("Êèòî")},
+ {171, 1273, 0, L"Ãóàÿêèëü"},
+ {171, 1274, 0, L"Êèòî"},
{171, 2410, 0, lpwszOther},
- {172, 1275, 0, _T("Êèíãñòîí")},
+ {172, 1275, 0, L"Êèíãñòîí"},
{172, 2409, 0, lpwszOther},
- {174, 1854, 0, _T("Àëæèð")},
+ {174, 1854, 0, L"Àëæèð"},
{174, 2495, 0, lpwszOther},
- {175, 1855, 0, _T("Ëóàíäà")},
+ {175, 1855, 0, L"Ëóàíäà"},
{175, 2494, 0, lpwszOther},
- {176, 1856, 0, _T("Êîòîíó")},
- {176, 1857, 0, _T("Ïîðòî-Íîâî")},
+ {176, 1856, 0, L"Êîòîíó"},
+ {176, 1857, 0, L"Ïîðòî-Íîâî"},
{176, 2493, 0, lpwszOther},
- {177, 1858, 0, _T("Ãàáîðîíå")},
+ {177, 1858, 0, L"Ãàáîðîíå"},
{177, 2492, 0, lpwszOther},
- {178, 1859, 0, _T("Óàãàäóãó")},
+ {178, 1859, 0, L"Óàãàäóãó"},
{178, 2491, 0, lpwszOther},
- {179, 1860, 0, _T("Áóæóìáóðó")},
+ {179, 1860, 0, L"Áóæóìáóðó"},
{179, 2490, 0, lpwszOther},
- {180, 1861, 0, _T("Ëèáðåâèëü")},
+ {180, 1861, 0, L"Ëèáðåâèëü"},
{180, 2489, 0, lpwszOther},
- {181, 1862, 0, _T("Áàíæóë")},
+ {181, 1862, 0, L"Áàíæóë"},
{181, 2488, 0, lpwszOther},
- {182, 1863, 0, _T("Àêêðà")},
+ {182, 1863, 0, L"Àêêðà"},
{182, 2487, 0, lpwszOther},
- {183, 1864, 0, _T("Êîíàêðè")},
+ {183, 1864, 0, L"Êîíàêðè"},
{183, 2486, 0, lpwszOther},
- {184, 1865, 0, _T("Áèñàó")},
+ {184, 1865, 0, L"Áèñàó"},
{184, 2485, 0, lpwszOther},
- {185, 1866, 0, _T("Äæèáóòè")},
+ {185, 1866, 0, L"Äæèáóòè"},
{185, 2484, 0, lpwszOther},
- {186, 3312, 0, _T("Äàõàá")},
- {186, 1867, 0, _T("Êàèð")},
- {186, 1868, 0, _T("Õóðãàäà")},
+ {186, 3312, 0, L"Äàõàá"},
+ {186, 1867, 0, L"Êàèð"},
+ {186, 1868, 0, L"Õóðãàäà"},
{186, 2483, 0, lpwszOther},
- {187, 1869, 0, _T("Ëóñàêà")},
+ {187, 1869, 0, L"Ëóñàêà"},
{187, 2482, 0, lpwszOther},
- {23, 1870, 0, _T("Õàðàðå")},
+ {23, 1870, 0, L"Õàðàðå"},
{23, 2481, 0, lpwszOther},
- {188, 1871, 0, _T("Ïðàÿ")},
+ {188, 1871, 0, L"Ïðàÿ"},
{188, 2480, 0, lpwszOther},
- {189, 1872, 0, _T("ßóíäå")},
+ {189, 1872, 0, L"ßóíäå"},
{189, 2479, 0, lpwszOther},
- {190, 1873, 0, _T("Íàéðîáè")},
+ {190, 1873, 0, L"Íàéðîáè"},
{190, 2478, 0, lpwszOther},
- {191, 1874, 0, _T("Ìîðîíè")},
+ {191, 1874, 0, L"Ìîðîíè"},
{191, 2477, 0, lpwszOther},
- {193, 1875, 0, _T("Êèíøàñà")},
+ {193, 1875, 0, L"Êèíøàñà"},
{193, 2476, 0, lpwszOther},
- {192, 1876, 0, _T("Áðàççàâèëü")},
+ {192, 1876, 0, L"Áðàççàâèëü"},
{192, 2475, 0, lpwszOther},
- {194, 1877, 0, _T("ßìóñóêðî")},
+ {194, 1877, 0, L"ßìóñóêðî"},
{194, 2474, 0, lpwszOther},
- {195, 1878, 0, _T("Ìàñåðó")},
+ {195, 1878, 0, L"Ìàñåðó"},
{195, 2473, 0, lpwszOther},
- {196, 1879, 0, _T("Ìîíðîâèÿ")},
+ {196, 1879, 0, L"Ìîíðîâèÿ"},
{196, 2472, 0, lpwszOther},
- {197, 1880, 0, _T("Òðèïîëè")},
+ {197, 1880, 0, L"Òðèïîëè"},
{197, 2471, 0, lpwszOther},
- {198, 1881, 0, _T("Ïîðò-Ëóè")},
+ {198, 1881, 0, L"Ïîðò-Ëóè"},
{198, 2470, 0, lpwszOther},
- {199, 1882, 0, _T("Íóàêøîò")},
+ {199, 1882, 0, L"Íóàêøîò"},
{199, 2469, 0, lpwszOther},
- {200, 1883, 0, _T("Àíòàíàíàðèâó")},
+ {200, 1883, 0, L"Àíòàíàíàðèâó"},
{200, 2468, 0, lpwszOther},
- {201, 1884, 0, _T("Ëèëîíãâå")},
+ {201, 1884, 0, L"Ëèëîíãâå"},
{201, 2467, 0, lpwszOther},
- {202, 1885, 0, _T("Áàìàêî")},
+ {202, 1885, 0, L"Áàìàêî"},
{202, 2466, 0, lpwszOther},
- {203, 1886, 0, _T("Àãàäèð")},
- {203, 1887, 0, _T("Ðàáàò")},
+ {203, 1886, 0, L"Àãàäèð"},
+ {203, 1887, 0, L"Ðàáàò"},
{203, 2465, 0, lpwszOther},
- {204, 1888, 0, _T("Ìàïóòó")},
+ {204, 1888, 0, L"Ìàïóòó"},
{204, 2464, 0, lpwszOther},
- {205, 1889, 0, _T("Âèíäõóê")},
+ {205, 1889, 0, L"Âèíäõóê"},
{205, 2463, 0, lpwszOther},
- {206, 1890, 0, _T("Íèàìåé")},
+ {206, 1890, 0, L"Íèàìåé"},
{206, 2462, 0, lpwszOther},
- {207, 1891, 0, _T("Àáóäæà")},
+ {207, 1891, 0, L"Àáóäæà"},
{207, 2461, 0, lpwszOther},
- {208, 1892, 0, _T("Êèãàëè")},
+ {208, 1892, 0, L"Êèãàëè"},
{208, 2460, 0, lpwszOther},
- {209, 1893, 0, _T("Ñàí-Òîìå")},
+ {209, 1893, 0, L"Ñàí-Òîìå"},
{209, 2459, 0, lpwszOther},
- {210, 1894, 0, _T("Ìáàáàíå")},
+ {210, 1894, 0, L"Ìáàáàíå"},
{210, 2458, 0, lpwszOther},
- {211, 1895, 0, _T("Âèêòîðèÿ")},
+ {211, 1895, 0, L"Âèêòîðèÿ"},
{211, 2457, 0, lpwszOther},
- {212, 1896, 0, _T("Äàêàð")},
+ {212, 1896, 0, L"Äàêàð"},
{212, 2456, 0, lpwszOther},
- {213, 1897, 0, _T("Ìîãàäèøî")},
+ {213, 1897, 0, L"Ìîãàäèøî"},
{213, 2455, 0, lpwszOther},
- {214, 1898, 0, _T("Õàðòóì")},
+ {214, 1898, 0, L"Õàðòóì"},
{214, 2454, 0, lpwszOther},
- {215, 1899, 0, _T("Ôðèòàóí")},
+ {215, 1899, 0, L"Ôðèòàóí"},
{215, 2453, 0, lpwszOther},
- {216, 1900, 0, _T("Äàð-ýñ-Ñàëàì")},
- {216, 1901, 0, _T("Äîäîìà")},
+ {216, 1900, 0, L"Äàð-ýñ-Ñàëàì"},
+ {216, 1901, 0, L"Äîäîìà"},
{216, 2452, 0, lpwszOther},
- {217, 1902, 0, _T("Ëîìå")},
+ {217, 1902, 0, L"Ëîìå"},
{217, 2451, 0, lpwszOther},
- {218, 1903, 0, _T("Òóíèñ")},
+ {218, 1903, 0, L"Òóíèñ"},
{218, 2450, 0, lpwszOther},
- {219, 1904, 0, _T("Êàìïàëà")},
+ {219, 1904, 0, L"Êàìïàëà"},
{219, 2449, 0, lpwszOther},
- {220, 1905, 0, _T("Áàíãè")},
+ {220, 1905, 0, L"Áàíãè"},
{220, 2448, 0, lpwszOther},
- {222, 1906, 0, _T("Íäæàìåíà")},
+ {222, 1906, 0, L"Íäæàìåíà"},
{222, 2447, 0, lpwszOther},
- {223, 1907, 0, _T("Ìàëàáî")},
+ {223, 1907, 0, L"Ìàëàáî"},
{223, 2446, 0, lpwszOther},
- {221, 1908, 0, _T("Àñìýðà")},
+ {221, 1908, 0, L"Àñìýðà"},
{221, 2445, 0, lpwszOther},
- {224, 1909, 0, _T("Àääèñ-Àáåáà")},
+ {224, 1909, 0, L"Àääèñ-Àáåáà"},
{224, 2444, 0, lpwszOther},
- {225, 1910, 0, _T("Äóðáàí")},
- {225, 1913, 0, _T("Éîõàííåñáóðã")},
- {225, 1912, 0, _T("Êåéïòàóí")},
- {225, 3033, 0, _T("Ïàéíòàóí")},
- {225, 1911, 0, _T("Ïðåòîðèÿ")},
+ {225, 1910, 0, L"Äóðáàí"},
+ {225, 1913, 0, L"Éîõàííåñáóðã"},
+ {225, 1912, 0, L"Êåéïòàóí"},
+ {225, 3033, 0, L"Ïàéíòàóí"},
+ {225, 1911, 0, L"Ïðåòîðèÿ"},
{225, 2443, 0, lpwszOther},
- {39, 314, 0, _T("Êèåâ")},
- {39, 315, 0, _T("Âèííèöêàÿ îáë.")},
- {39, 316, 0, _T("Âîëûíñêàÿ îáë.")},
- {39, 317, 0, _T("Äíåïðîïåòðîâñêàÿ îáë.")},
- {39, 318, 0, _T("Äîíåöêàÿ îáë.")},
- {39, 319, 0, _T("Æèòîìèðñêàÿ îáë.")},
- {39, 320, 0, _T("Çàêàðïàòñêàÿ îáë.")},
- {39, 321, 0, _T("Çàïîðîæñêàÿ îáë.")},
- {39, 322, 0, _T("Èâàíî-Ôðàíêîâñêàÿ îáë.")},
- {39, 323, 0, _T("Êèåâñêàÿ îáë.")},
- {39, 324, 0, _T("Êèðîâîãðàäñêàÿ îáë.")},
- {39, 325, 0, _T("Êðûì")},
- {39, 326, 0, _T("Ëóãàíñêàÿ îáë.")},
- {39, 327, 0, _T("Ëüâîâñêàÿ îáë.")},
- {39, 328, 0, _T("Íèêîëàåâñêàÿ îáë.")},
- {39, 329, 0, _T("Îäåññêàÿ îáë.")},
- {39, 330, 0, _T("Ïîëòàâñêàÿ îáë.")},
- {39, 331, 0, _T("Ðîâåíñêàÿ îáë.")},
- {39, 332, 0, _T("Ñóìñêàÿ îáë.")},
- {39, 333, 0, _T("Òåðíîïîëüñêàÿ îáë.")},
- {39, 334, 0, _T("Õàðüêîâñêàÿ îáë.")},
- {39, 335, 0, _T("Õåðñîíñêàÿ îáë.")},
- {39, 336, 0, _T("Õìåëüíèöêàÿ îáë.")},
- {39, 337, 0, _T("×åðêàññêàÿ îáë.")},
- {39, 338, 0, _T("×åðíèãîâñêàÿ îáë.")},
- {39, 339, 0, _T("×åðíîâèöêàÿ îáë.")},
- {40, 602, 0, _T("Áàä Õàëë")},
- {40, 604, 0, _T("Áðåãåíö")},
- {40, 603, 0, _T("Âåíà")},
- {40, 608, 0, _T("Ãðàö")},
- {40, 606, 0, _T("Çàëüöáóðã")},
- {40, 3099, 0, _T("Çåëü-àì-Çåå")},
- {40, 605, 0, _T("Èíñáðóê")},
- {40, 3174, 0, _T("Êèðõáåðã")},
- {40, 609, 0, _T("Êëàãåíôóðò")},
- {40, 607, 0, _T("Ëèíö")},
- {40, 610, 0, _T("Îáäàõ")},
- {40, 611, 0, _T("Ùòóáàéòàë")},
+ {39, 314, 0, L"Êèåâ"},
+ {39, 315, 0, L"Âèííèöêàÿ îáë."},
+ {39, 316, 0, L"Âîëûíñêàÿ îáë."},
+ {39, 317, 0, L"Äíåïðîïåòðîâñêàÿ îáë."},
+ {39, 318, 0, L"Äîíåöêàÿ îáë."},
+ {39, 319, 0, L"Æèòîìèðñêàÿ îáë."},
+ {39, 320, 0, L"Çàêàðïàòñêàÿ îáë."},
+ {39, 321, 0, L"Çàïîðîæñêàÿ îáë."},
+ {39, 322, 0, L"Èâàíî-Ôðàíêîâñêàÿ îáë."},
+ {39, 323, 0, L"Êèåâñêàÿ îáë."},
+ {39, 324, 0, L"Êèðîâîãðàäñêàÿ îáë."},
+ {39, 325, 0, L"Êðûì"},
+ {39, 326, 0, L"Ëóãàíñêàÿ îáë."},
+ {39, 327, 0, L"Ëüâîâñêàÿ îáë."},
+ {39, 328, 0, L"Íèêîëàåâñêàÿ îáë."},
+ {39, 329, 0, L"Îäåññêàÿ îáë."},
+ {39, 330, 0, L"Ïîëòàâñêàÿ îáë."},
+ {39, 331, 0, L"Ðîâåíñêàÿ îáë."},
+ {39, 332, 0, L"Ñóìñêàÿ îáë."},
+ {39, 333, 0, L"Òåðíîïîëüñêàÿ îáë."},
+ {39, 334, 0, L"Õàðüêîâñêàÿ îáë."},
+ {39, 335, 0, L"Õåðñîíñêàÿ îáë."},
+ {39, 336, 0, L"Õìåëüíèöêàÿ îáë."},
+ {39, 337, 0, L"×åðêàññêàÿ îáë."},
+ {39, 338, 0, L"×åðíèãîâñêàÿ îáë."},
+ {39, 339, 0, L"×åðíîâèöêàÿ îáë."},
+ {40, 602, 0, L"Áàä Õàëë"},
+ {40, 604, 0, L"Áðåãåíö"},
+ {40, 603, 0, L"Âåíà"},
+ {40, 608, 0, L"Ãðàö"},
+ {40, 606, 0, L"Çàëüöáóðã"},
+ {40, 3099, 0, L"Çåëü-àì-Çåå"},
+ {40, 605, 0, L"Èíñáðóê"},
+ {40, 3174, 0, L"Êèðõáåðã"},
+ {40, 609, 0, L"Êëàãåíôóðò"},
+ {40, 607, 0, L"Ëèíö"},
+ {40, 610, 0, L"Îáäàõ"},
+ {40, 611, 0, L"Ùòóáàéòàë"},
{40, 2541, 0, lpwszOther},
- {32, 612, 0, _T("Òèðàíà")},
+ {32, 612, 0, L"Òèðàíà"},
{32, 2540, 0, lpwszOther},
- {33, 613, 0, _T("Àíäîððà-ëà-Âåëüÿ")},
+ {33, 613, 0, L"Àíäîððà-ëà-Âåëüÿ"},
{33, 2539, 0, lpwszOther},
- {340, 341, 0, _T("Ìèíñê")},
- {340, 342, 0, _T("Áðåñòñêàÿ îáë.")},
- {340, 343, 0, _T("Âèòåáñêàÿ îáë.")},
- {340, 344, 0, _T("Ãîìåëüñêàÿ îáë.")},
- {340, 345, 0, _T("Ãðîäíåíñêàÿ îáë.")},
- {340, 346, 0, _T("Ìèíñêàÿ îáë.")},
- {340, 347, 0, _T("Ìîãèëåâñêàÿ îáë.")},
- {38, 760, 0, _T("Àíòâåðïåí")},
- {38, 767, 0, _T("Àðëîí")},
- {38, 762, 0, _T("Áðþããå")},
- {38, 761, 0, _T("Áðþññåëü")},
- {38, 763, 0, _T("Ãåíò")},
- {38, 769, 0, _T("Ëóâåí")},
- {38, 765, 0, _T("Ëüåæ")},
- {38, 764, 0, _T("Ìîíñ")},
- {38, 3117, 0, _T("Ìîðòñåëü")},
- {38, 766, 0, _T("Íàìþð")},
- {38, 768, 0, _T("Õàññåëò")},
+ {340, 341, 0, L"Ìèíñê"},
+ {340, 342, 0, L"Áðåñòñêàÿ îáë."},
+ {340, 343, 0, L"Âèòåáñêàÿ îáë."},
+ {340, 344, 0, L"Ãîìåëüñêàÿ îáë."},
+ {340, 345, 0, L"Ãðîäíåíñêàÿ îáë."},
+ {340, 346, 0, L"Ìèíñêàÿ îáë."},
+ {340, 347, 0, L"Ìîãèëåâñêàÿ îáë."},
+ {38, 760, 0, L"Àíòâåðïåí"},
+ {38, 767, 0, L"Àðëîí"},
+ {38, 762, 0, L"Áðþããå"},
+ {38, 761, 0, L"Áðþññåëü"},
+ {38, 763, 0, L"Ãåíò"},
+ {38, 769, 0, L"Ëóâåí"},
+ {38, 765, 0, L"Ëüåæ"},
+ {38, 764, 0, L"Ìîíñ"},
+ {38, 3117, 0, L"Ìîðòñåëü"},
+ {38, 766, 0, L"Íàìþð"},
+ {38, 768, 0, L"Õàññåëò"},
{38, 2532, 0, lpwszOther},
- {41, 3098, 0, _T("Áàíñêî")},
- {41, 792, 0, _T("Áëàãîåâãðàä")},
- {41, 770, 0, _T("Áóðãàñ")},
- {41, 771, 0, _T("Áÿëà")},
- {41, 773, 0, _T("Âàðíà")},
- {41, 776, 0, _T("Âåëèêî-Òûðíîâî")},
- {41, 788, 0, _T("Âèäèí")},
- {41, 789, 0, _T("Âðàöà")},
- {41, 796, 0, _T("Ãàáðîâî")},
- {41, 777, 0, _T("Äèìèòðîâãðàä")},
- {41, 781, 0, _T("Êàâàðíà")},
- {41, 786, 0, _T("Êûðäæàëè")},
- {41, 791, 0, _T("Êþñòåíäèë")},
- {41, 793, 0, _T("Ëàçàðäæèê")},
- {41, 795, 0, _T("Ëîâå÷")},
- {41, 787, 0, _T("Ìèõàéëîâãðàä")},
- {41, 790, 0, _T("Ïåðíèê")},
- {41, 3133, 0, _T("Ïèðäîï")},
- {41, 794, 0, _T("Ïëåâåí")},
- {41, 782, 0, _T("Ïëîâäèâ")},
- {41, 780, 0, _T("Ðàçãðàä")},
- {41, 779, 0, _T("Ðóñå")},
- {41, 774, 0, _T("Ñèëèñòðà")},
- {41, 784, 0, _T("Ñëèâåí")},
- {41, 772, 0, _T("Ñîôèÿ")},
- {41, 775, 0, _T("Òîëáóõèí")},
- {41, 3116, 0, _T("Òûðíîâî")},
- {41, 785, 0, _T("Õàñêîâî")},
- {41, 778, 0, _T("Øóìåí")},
- {41, 783, 0, _T("ßìáîë")},
+ {41, 3098, 0, L"Áàíñêî"},
+ {41, 792, 0, L"Áëàãîåâãðàä"},
+ {41, 770, 0, L"Áóðãàñ"},
+ {41, 771, 0, L"Áÿëà"},
+ {41, 773, 0, L"Âàðíà"},
+ {41, 776, 0, L"Âåëèêî-Òûðíîâî"},
+ {41, 788, 0, L"Âèäèí"},
+ {41, 789, 0, L"Âðàöà"},
+ {41, 796, 0, L"Ãàáðîâî"},
+ {41, 777, 0, L"Äèìèòðîâãðàä"},
+ {41, 781, 0, L"Êàâàðíà"},
+ {41, 786, 0, L"Êûðäæàëè"},
+ {41, 791, 0, L"Êþñòåíäèë"},
+ {41, 793, 0, L"Ëàçàðäæèê"},
+ {41, 795, 0, L"Ëîâå÷"},
+ {41, 787, 0, L"Ìèõàéëîâãðàä"},
+ {41, 790, 0, L"Ïåðíèê"},
+ {41, 3133, 0, L"Ïèðäîï"},
+ {41, 794, 0, L"Ïëåâåí"},
+ {41, 782, 0, L"Ïëîâäèâ"},
+ {41, 780, 0, L"Ðàçãðàä"},
+ {41, 779, 0, L"Ðóñå"},
+ {41, 774, 0, L"Ñèëèñòðà"},
+ {41, 784, 0, L"Ñëèâåí"},
+ {41, 772, 0, L"Ñîôèÿ"},
+ {41, 775, 0, L"Òîëáóõèí"},
+ {41, 3116, 0, L"Òûðíîâî"},
+ {41, 785, 0, L"Õàñêîâî"},
+ {41, 778, 0, L"Øóìåí"},
+ {41, 783, 0, L"ßìáîë"},
{41, 2531, 0, lpwszOther},
- {42, 797, 0, _T("Áàíÿ-Ëóêà")},
- {42, 799, 0, _T("Çåíèöà")},
- {42, 798, 0, _T("Ñàðàåâî")},
- {42, 800, 0, _T("Òóçëà")},
+ {42, 797, 0, L"Áàíÿ-Ëóêà"},
+ {42, 799, 0, L"Çåíèöà"},
+ {42, 798, 0, L"Ñàðàåâî"},
+ {42, 800, 0, L"Òóçëà"},
{42, 2530, 0, lpwszOther},
- {45, 802, 0, _T("Àáåðäèí")},
- {45, 3075, 0, _T("Àéñëâîðò")},
- {45, 801, 0, _T("Àëíâèê")},
- {45, 804, 0, _T("Áèäåôîðä")},
- {45, 803, 0, _T("Áèðìèíãåì")},
- {45, 805, 0, _T("Áëîêñâè÷")},
- {45, 3168, 0, _T("Áîñòîí")},
- {45, 806, 0, _T("Áðàéòîí")},
- {45, 807, 0, _T("Áðåäôîðä")},
- {45, 808, 0, _T("Áðèñòîëü")},
- {45, 809, 0, _T("Âèëëåíõîëë")},
- {45, 3131, 0, _T("Âîððèíãòîí")},
- {45, 810, 0, _T("Âóäáðèäæ")},
- {45, 3342, 0, _T("Ãèëôîðä")},
- {45, 811, 0, _T("Ãëàçãî")},
- {45, 812, 0, _T("Äàäëè")},
- {45, 813, 0, _T("Äàðåì")},
- {45, 814, 0, _T("Äóãëàñ")},
- {45, 3089, 0, _T("Êàðäèô")},
- {45, 815, 0, _T("Êåìáðèäæ")},
- {45, 816, 0, _T("Êåíòåðáåðè")},
- {45, 817, 0, _T("Ëèâåðïóëü")},
- {45, 818, 0, _T("Ëèäñ")},
- {45, 819, 0, _T("Ëîíäîí")},
- {45, 820, 0, _T("Ìàí÷åñòåð")},
- {45, 2976, 0, _T("Ìèò÷åì")},
- {45, 2988, 0, _T("Ìýéäåíõåä")},
- {45, 821, 0, _T("Íîòòèíãåì")},
- {45, 3088, 0, _T("Íüþïîðò")},
- {45, 822, 0, _T("Îêñôîðä")},
- {45, 823, 0, _T("Ïëèìóò")},
- {45, 824, 0, _T("Ïîðòñìóò")},
- {45, 825, 0, _T("Ïðåñòîí")},
- {45, 3343, 0, _T("Ðàéä")},
- {45, 2867, 0, _T("Ðèäèíã")},
- {45, 2986, 0, _T("Ñåíò-Àëáàíñ")},
- {45, 826, 0, _T("Ñòàôôîðä")},
- {45, 3063, 0, _T("Ñòîêïîðò")},
- {45, 827, 0, _T("Óýéìóò")},
- {45, 3140, 0, _T("×åëòåíõýì")},
- {45, 828, 0, _T("×åñòåð")},
- {45, 829, 0, _T("Øåôôèëä")},
- {45, 830, 0, _T("Ýäèíáóðã")},
+ {45, 802, 0, L"Àáåðäèí"},
+ {45, 3075, 0, L"Àéñëâîðò"},
+ {45, 801, 0, L"Àëíâèê"},
+ {45, 804, 0, L"Áèäåôîðä"},
+ {45, 803, 0, L"Áèðìèíãåì"},
+ {45, 805, 0, L"Áëîêñâè÷"},
+ {45, 3168, 0, L"Áîñòîí"},
+ {45, 806, 0, L"Áðàéòîí"},
+ {45, 807, 0, L"Áðåäôîðä"},
+ {45, 808, 0, L"Áðèñòîëü"},
+ {45, 809, 0, L"Âèëëåíõîëë"},
+ {45, 3131, 0, L"Âîððèíãòîí"},
+ {45, 810, 0, L"Âóäáðèäæ"},
+ {45, 3342, 0, L"Ãèëôîðä"},
+ {45, 811, 0, L"Ãëàçãî"},
+ {45, 812, 0, L"Äàäëè"},
+ {45, 813, 0, L"Äàðåì"},
+ {45, 814, 0, L"Äóãëàñ"},
+ {45, 3089, 0, L"Êàðäèô"},
+ {45, 815, 0, L"Êåìáðèäæ"},
+ {45, 816, 0, L"Êåíòåðáåðè"},
+ {45, 817, 0, L"Ëèâåðïóëü"},
+ {45, 818, 0, L"Ëèäñ"},
+ {45, 819, 0, L"Ëîíäîí"},
+ {45, 820, 0, L"Ìàí÷åñòåð"},
+ {45, 2976, 0, L"Ìèò÷åì"},
+ {45, 2988, 0, L"Ìýéäåíõåä"},
+ {45, 821, 0, L"Íîòòèíãåì"},
+ {45, 3088, 0, L"Íüþïîðò"},
+ {45, 822, 0, L"Îêñôîðä"},
+ {45, 823, 0, L"Ïëèìóò"},
+ {45, 824, 0, L"Ïîðòñìóò"},
+ {45, 825, 0, L"Ïðåñòîí"},
+ {45, 3343, 0, L"Ðàéä"},
+ {45, 2867, 0, L"Ðèäèíã"},
+ {45, 2986, 0, L"Ñåíò-Àëáàíñ"},
+ {45, 826, 0, L"Ñòàôôîðä"},
+ {45, 3063, 0, L"Ñòîêïîðò"},
+ {45, 827, 0, L"Óýéìóò"},
+ {45, 3140, 0, L"×åëòåíõýì"},
+ {45, 828, 0, L"×åñòåð"},
+ {45, 829, 0, L"Øåôôèëä"},
+ {45, 830, 0, L"Ýäèíáóðã"},
{45, 2529, 0, lpwszOther},
- {44, 831, 0, _T("Áóäàïåøò")},
- {44, 832, 0, _T("Ãåäåëëå")},
- {44, 836, 0, _T("Äåáðåöåí")},
- {44, 835, 0, _T("Ìèøêîëüö")},
- {44, 834, 0, _T("Ñåãåä")},
- {44, 833, 0, _T("Øèîôîê")},
+ {44, 831, 0, L"Áóäàïåøò"},
+ {44, 832, 0, L"Ãåäåëëå"},
+ {44, 836, 0, L"Äåáðåöåí"},
+ {44, 835, 0, L"Ìèøêîëüö"},
+ {44, 834, 0, L"Ñåãåä"},
+ {44, 833, 0, L"Øèîôîê"},
{44, 2528, 0, lpwszOther},
- {46, 3007, 0, _T("Ààõåí")},
- {46, 837, 0, _T("Àóãñáóðã")},
- {46, 838, 0, _T("Áàäåí-Áàäåí")},
- {46, 3371, 0, _T("Áàìáåðã")},
- {46, 839, 0, _T("Áåðãèø-Ãëàäáàõ")},
- {46, 840, 0, _T("Áåðëèí")},
- {46, 841, 0, _T("Áèëåôåëüä")},
- {46, 3163, 0, _T("Áîâåíäåí")},
- {46, 842, 0, _T("Áîíí")},
- {46, 843, 0, _T("Áðàäåíáóðã")},
- {46, 3015, 0, _T("Áðàóíøâåéã")},
- {46, 844, 0, _T("Áðåìåí")},
- {46, 2921, 0, _T("Âàðøòàéí")},
- {46, 845, 0, _T("Âåéìàð")},
- {46, 846, 0, _T("Âóïïåðòàëü")},
- {46, 847, 0, _T("Ãàìáóðã")},
- {46, 848, 0, _T("Ãàííîâåð")},
- {46, 849, 0, _T("Ãàðäåëåãåí")},
- {46, 3010, 0, _T("Ãåéäåëüáåðã")},
- {46, 850, 0, _T("Ãîòà")},
- {46, 851, 0, _T("Äàðìøòàäò")},
- {46, 3072, 0, _T("Äåññàó")},
- {46, 852, 0, _T("Äåòìîëüä")},
- {46, 853, 0, _T("Äîðòìóíä")},
- {46, 854, 0, _T("Äðåçäåí")},
- {46, 855, 0, _T("Äþññåëüäîðô")},
- {46, 3082, 0, _T("Èôôåöõàéì")},
- {46, 3309, 0, _T("Êàññåë")},
- {46, 856, 0, _T("Êåëüí")},
- {46, 857, 0, _T("Êèëü")},
- {46, 3138, 0, _T("Êîáëåíö")},
- {46, 858, 0, _T("Êðåôåëüä")},
- {46, 859, 0, _T("Ëåéïöèã")},
- {46, 2872, 0, _T("Ëèìáóðã")},
- {46, 2965, 0, _T("Ëèíãåí")},
- {46, 3135, 0, _T("Ëþáåê")},
- {46, 3156, 0, _T("Ìàíãåéì")},
- {46, 3192, 0, _T("Ìååðñáóðã")},
- {46, 860, 0, _T("Ìþíñòåð")},
- {46, 861, 0, _T("Ìþíõåí")},
- {46, 2864, 0, _T("Íîéøòàäò")},
- {46, 862, 0, _T("Íþðíáåðã")},
- {46, 3009, 0, _T("Îôôåíáóðã")},
- {46, 2993, 0, _T("Ïàäåðáîðí")},
- {46, 863, 0, _T("Ðàâåíñáóðã")},
- {46, 864, 0, _T("Ðåãåíñáóðã")},
- {46, 865, 0, _T("Ðåéíåí")},
- {46, 866, 0, _T("Ðîñòîê")},
- {46, 3191, 0, _T("Ñààðáðþêåí")},
- {46, 2974, 0, _T("Ñàíêò-Àâãóñòèí")},
- {46, 3127, 0, _T("Òþðèíãåí")},
- {46, 867, 0, _T("Ôðàéáåðã")},
- {46, 868, 0, _T("Ôðàéáóðã")},
- {46, 869, 0, _T("Ôðàíêôóðò-íà-Ìàéíå")},
- {46, 3373, 0, _T("Õåìíèòö")},
- {46, 3313, 0, _T("Õèëüäåí")},
- {46, 870, 0, _T("Øòóòãàðò")},
- {46, 3045, 0, _T("Ýðëàíãåí")},
- {46, 2906, 0, _T("Ýøáîðí")},
+ {46, 3007, 0, L"Ààõåí"},
+ {46, 837, 0, L"Àóãñáóðã"},
+ {46, 838, 0, L"Áàäåí-Áàäåí"},
+ {46, 3371, 0, L"Áàìáåðã"},
+ {46, 839, 0, L"Áåðãèø-Ãëàäáàõ"},
+ {46, 840, 0, L"Áåðëèí"},
+ {46, 841, 0, L"Áèëåôåëüä"},
+ {46, 3163, 0, L"Áîâåíäåí"},
+ {46, 842, 0, L"Áîíí"},
+ {46, 843, 0, L"Áðàäåíáóðã"},
+ {46, 3015, 0, L"Áðàóíøâåéã"},
+ {46, 844, 0, L"Áðåìåí"},
+ {46, 2921, 0, L"Âàðøòàéí"},
+ {46, 845, 0, L"Âåéìàð"},
+ {46, 846, 0, L"Âóïïåðòàëü"},
+ {46, 847, 0, L"Ãàìáóðã"},
+ {46, 848, 0, L"Ãàííîâåð"},
+ {46, 849, 0, L"Ãàðäåëåãåí"},
+ {46, 3010, 0, L"Ãåéäåëüáåðã"},
+ {46, 850, 0, L"Ãîòà"},
+ {46, 851, 0, L"Äàðìøòàäò"},
+ {46, 3072, 0, L"Äåññàó"},
+ {46, 852, 0, L"Äåòìîëüä"},
+ {46, 853, 0, L"Äîðòìóíä"},
+ {46, 854, 0, L"Äðåçäåí"},
+ {46, 855, 0, L"Äþññåëüäîðô"},
+ {46, 3082, 0, L"Èôôåöõàéì"},
+ {46, 3309, 0, L"Êàññåë"},
+ {46, 856, 0, L"Êåëüí"},
+ {46, 857, 0, L"Êèëü"},
+ {46, 3138, 0, L"Êîáëåíö"},
+ {46, 858, 0, L"Êðåôåëüä"},
+ {46, 859, 0, L"Ëåéïöèã"},
+ {46, 2872, 0, L"Ëèìáóðã"},
+ {46, 2965, 0, L"Ëèíãåí"},
+ {46, 3135, 0, L"Ëþáåê"},
+ {46, 3156, 0, L"Ìàíãåéì"},
+ {46, 3192, 0, L"Ìååðñáóðã"},
+ {46, 860, 0, L"Ìþíñòåð"},
+ {46, 861, 0, L"Ìþíõåí"},
+ {46, 2864, 0, L"Íîéøòàäò"},
+ {46, 862, 0, L"Íþðíáåðã"},
+ {46, 3009, 0, L"Îôôåíáóðã"},
+ {46, 2993, 0, L"Ïàäåðáîðí"},
+ {46, 863, 0, L"Ðàâåíñáóðã"},
+ {46, 864, 0, L"Ðåãåíñáóðã"},
+ {46, 865, 0, L"Ðåéíåí"},
+ {46, 866, 0, L"Ðîñòîê"},
+ {46, 3191, 0, L"Ñààðáðþêåí"},
+ {46, 2974, 0, L"Ñàíêò-Àâãóñòèí"},
+ {46, 3127, 0, L"Òþðèíãåí"},
+ {46, 867, 0, L"Ôðàéáåðã"},
+ {46, 868, 0, L"Ôðàéáóðã"},
+ {46, 869, 0, L"Ôðàíêôóðò-íà-Ìàéíå"},
+ {46, 3373, 0, L"Õåìíèòö"},
+ {46, 3313, 0, L"Õèëüäåí"},
+ {46, 870, 0, L"Øòóòãàðò"},
+ {46, 3045, 0, L"Ýðëàíãåí"},
+ {46, 2906, 0, L"Ýøáîðí"},
{46, 2527, 0, lpwszOther},
- {48, 871, 0, _T("Àôèíû")},
- {48, 873, 0, _T("Èðàêëèîí")},
- {48, 3147, 0, _T("Êîðôó")},
- {48, 872, 0, _T("Ñàëîíèêè")},
- {48, 3178, 0, _T("Õàëêèäèêè")},
+ {48, 871, 0, L"Àôèíû"},
+ {48, 873, 0, L"Èðàêëèîí"},
+ {48, 3147, 0, L"Êîðôó"},
+ {48, 872, 0, L"Ñàëîíèêè"},
+ {48, 3178, 0, L"Õàëêèäèêè"},
{48, 2526, 0, lpwszOther},
- {49, 3006, 0, _T("Àðõóñ")},
- {49, 874, 0, _T("Êîïåíãàãåí")},
- {49, 875, 0, _T("Îäåíñå")},
- {49, 3285, 0, _T("Îëüáîðã")},
- {49, 876, 0, _T("Ñâàíåêå")},
- {49, 3126, 0, _T("Ñêèâå")},
+ {49, 3006, 0, L"Àðõóñ"},
+ {49, 874, 0, L"Êîïåíãàãåí"},
+ {49, 875, 0, L"Îäåíñå"},
+ {49, 3285, 0, L"Îëüáîðã"},
+ {49, 876, 0, L"Ñâàíåêå"},
+ {49, 3126, 0, L"Ñêèâå"},
{49, 2525, 0, lpwszOther},
- {50, 3377, 0, _T("Âèêëîó")},
- {50, 3067, 0, _T("Ãîëâåé")},
- {50, 877, 0, _T("Äóáëèí")},
- {50, 3065, 0, _T("Êèëëàðíåé")},
- {50, 3066, 0, _T("Êîðê")},
- {50, 878, 0, _T("Ëèìåðèê")},
- {50, 3069, 0, _T("Íåéñ")},
- {50, 3068, 0, _T("Òèïïåðýðè")},
+ {50, 3377, 0, L"Âèêëîó"},
+ {50, 3067, 0, L"Ãîëâåé"},
+ {50, 877, 0, L"Äóáëèí"},
+ {50, 3065, 0, L"Êèëëàðíåé"},
+ {50, 3066, 0, L"Êîðê"},
+ {50, 878, 0, L"Ëèìåðèê"},
+ {50, 3069, 0, L"Íåéñ"},
+ {50, 3068, 0, L"Òèïïåðýðè"},
{50, 2524, 0, lpwszOther},
- {51, 879, 0, _T("Ðåéêüÿâèê")},
+ {51, 879, 0, L"Ðåéêüÿâèê"},
{51, 2523, 0, lpwszOther},
- {34, 880, 0, _T("Àëèêàíòå")},
- {34, 3125, 0, _T("Àëüìåðèÿ")},
- {34, 881, 0, _T("Áàðñåëîíà")},
- {34, 890, 0, _T("Áèëüáàî")},
- {34, 3076, 0, _T("Áëàíåñ")},
- {34, 882, 0, _T("Âàëåíñèÿ")},
- {34, 3070, 0, _T("Èáèöà")},
- {34, 888, 0, _T("Êàäèñ")},
- {34, 886, 0, _T("Êàðòàõåíà")},
- {34, 891, 0, _T("Ëà-Êîðóíüÿ")},
- {34, 3310, 0, _T("Ëîðåò äå Ìàð")},
- {34, 883, 0, _T("Ìàäðèä")},
- {34, 884, 0, _T("Ìàëàãà")},
- {34, 885, 0, _T("Ìàðáåëüÿ")},
- {34, 892, 0, _T("Îâüåäî")},
- {34, 3179, 0, _T("Ïàëüìà äå Ìàéîðêà")},
- {34, 3177, 0, _T("Ñàí-Àãóñòèí")},
- {34, 3289, 0, _T("Ñàíòà-Êðóñ-äå-Òåíåðèôå")},
- {34, 889, 0, _T("Ñàðàãîñà")},
- {34, 887, 0, _T("Ñåâèëüÿ")},
- {34, 893, 0, _T("Õèõîí")},
+ {34, 880, 0, L"Àëèêàíòå"},
+ {34, 3125, 0, L"Àëüìåðèÿ"},
+ {34, 881, 0, L"Áàðñåëîíà"},
+ {34, 890, 0, L"Áèëüáàî"},
+ {34, 3076, 0, L"Áëàíåñ"},
+ {34, 882, 0, L"Âàëåíñèÿ"},
+ {34, 3070, 0, L"Èáèöà"},
+ {34, 888, 0, L"Êàäèñ"},
+ {34, 886, 0, L"Êàðòàõåíà"},
+ {34, 891, 0, L"Ëà-Êîðóíüÿ"},
+ {34, 3310, 0, L"Ëîðåò äå Ìàð"},
+ {34, 883, 0, L"Ìàäðèä"},
+ {34, 884, 0, L"Ìàëàãà"},
+ {34, 885, 0, L"Ìàðáåëüÿ"},
+ {34, 892, 0, L"Îâüåäî"},
+ {34, 3179, 0, L"Ïàëüìà äå Ìàéîðêà"},
+ {34, 3177, 0, L"Ñàí-Àãóñòèí"},
+ {34, 3289, 0, L"Ñàíòà-Êðóñ-äå-Òåíåðèôå"},
+ {34, 889, 0, L"Ñàðàãîñà"},
+ {34, 887, 0, L"Ñåâèëüÿ"},
+ {34, 893, 0, L"Õèõîí"},
{34, 2522, 0, lpwszOther},
- {52, 3318, 0, _T("Àîñòà")},
- {52, 3278, 0, _T("Áåëëàðèà")},
- {52, 906, 0, _T("Áîëîíüÿ")},
- {52, 894, 0, _T("Áðåøèà")},
- {52, 895, 0, _T("Âåíåöèÿ")},
- {52, 905, 0, _T("Âåðîíà")},
- {52, 896, 0, _T("Ãåíóÿ")},
- {52, 897, 0, _T("Ëåêêî")},
- {52, 3369, 0, _T("Ëèâîðíî")},
- {52, 3327, 0, _T("Ìàðñàëà")},
- {52, 898, 0, _T("Ìèëàí")},
- {52, 899, 0, _T("Ìîäåíà")},
- {52, 907, 0, _T("Íåàïîëü")},
- {52, 908, 0, _T("Ïåðóäæà")},
- {52, 900, 0, _T("Ïèçà")},
- {52, 901, 0, _T("Ðèì")},
- {52, 3368, 0, _T("Ñàí-Ðåìî")},
- {52, 3384, 0, _T("Ñèðàêóçà")},
- {52, 3252, 0, _T("Òåðàìî")},
- {52, 902, 0, _T("Òðèåñò")},
- {52, 903, 0, _T("Òóðèí")},
- {52, 3130, 0, _T("Ôàíî")},
- {52, 904, 0, _T("Ôëîðåíöèÿ")},
+ {52, 3318, 0, L"Àîñòà"},
+ {52, 3278, 0, L"Áåëëàðèà"},
+ {52, 906, 0, L"Áîëîíüÿ"},
+ {52, 894, 0, L"Áðåøèà"},
+ {52, 895, 0, L"Âåíåöèÿ"},
+ {52, 905, 0, L"Âåðîíà"},
+ {52, 896, 0, L"Ãåíóÿ"},
+ {52, 897, 0, L"Ëåêêî"},
+ {52, 3369, 0, L"Ëèâîðíî"},
+ {52, 3327, 0, L"Ìàðñàëà"},
+ {52, 898, 0, L"Ìèëàí"},
+ {52, 899, 0, L"Ìîäåíà"},
+ {52, 907, 0, L"Íåàïîëü"},
+ {52, 908, 0, L"Ïåðóäæà"},
+ {52, 900, 0, L"Ïèçà"},
+ {52, 901, 0, L"Ðèì"},
+ {52, 3368, 0, L"Ñàí-Ðåìî"},
+ {52, 3384, 0, L"Ñèðàêóçà"},
+ {52, 3252, 0, L"Òåðàìî"},
+ {52, 902, 0, L"Òðèåñò"},
+ {52, 903, 0, L"Òóðèí"},
+ {52, 3130, 0, L"Ôàíî"},
+ {52, 904, 0, L"Ôëîðåíöèÿ"},
{52, 2521, 0, lpwszOther},
- {53, 2939, 0, _T("Àéçêðàóêëå")},
- {53, 3054, 0, _T("Âàëêà")},
- {53, 909, 0, _T("Äàóãàâïèëñ")},
- {53, 2934, 0, _T("Åêàáïèëñ")},
- {53, 913, 0, _T("Åëãàâà")},
- {53, 2935, 0, _T("Êîêíåñå")},
- {53, 912, 0, _T("Ëèåïàÿ")},
- {53, 2905, 0, _T("Ðåçåêíå")},
- {53, 911, 0, _T("Ðèãà")},
- {53, 2936, 0, _T("Ñàëàñïèëñ")},
- {53, 2937, 0, _T("Ñìèëòåíå")},
- {53, 910, 0, _T("Þðìàëà")},
+ {53, 2939, 0, L"Àéçêðàóêëå"},
+ {53, 3054, 0, L"Âàëêà"},
+ {53, 909, 0, L"Äàóãàâïèëñ"},
+ {53, 2934, 0, L"Åêàáïèëñ"},
+ {53, 913, 0, L"Åëãàâà"},
+ {53, 2935, 0, L"Êîêíåñå"},
+ {53, 912, 0, L"Ëèåïàÿ"},
+ {53, 2905, 0, L"Ðåçåêíå"},
+ {53, 911, 0, L"Ðèãà"},
+ {53, 2936, 0, L"Ñàëàñïèëñ"},
+ {53, 2937, 0, L"Ñìèëòåíå"},
+ {53, 910, 0, L"Þðìàëà"},
{53, 2520, 0, lpwszOther},
- {54, 914, 0, _T("Âèëüíþñ")},
- {54, 915, 0, _T("Âèñàãèíàñ")},
- {54, 916, 0, _T("Êàóíàñ")},
- {54, 918, 0, _T("Êëàéïåäà")},
- {54, 919, 0, _T("Ïàëàíãà")},
- {54, 3173, 0, _T("Ïåíåâåæèñ")},
- {54, 917, 0, _T("Øàóëÿé")},
+ {54, 914, 0, L"Âèëüíþñ"},
+ {54, 915, 0, L"Âèñàãèíàñ"},
+ {54, 916, 0, L"Êàóíàñ"},
+ {54, 918, 0, L"Êëàéïåäà"},
+ {54, 919, 0, L"Ïàëàíãà"},
+ {54, 3173, 0, L"Ïåíåâåæèñ"},
+ {54, 917, 0, L"Øàóëÿé"},
{54, 2519, 0, lpwszOther},
- {55, 920, 0, _T("Âàäóö")},
+ {55, 920, 0, L"Âàäóö"},
{55, 2518, 0, lpwszOther},
- {56, 3376, 0, _T("Áåòöäîðô")},
- {56, 921, 0, _T("Ëþêñåìáóðã")},
+ {56, 3376, 0, L"Áåòöäîðô"},
+ {56, 921, 0, L"Ëþêñåìáóðã"},
{56, 2517, 0, lpwszOther},
- {57, 3142, 0, _T("Áèòîëà")},
- {57, 922, 0, _T("Ñêîïüå")},
+ {57, 3142, 0, L"Áèòîëà"},
+ {57, 922, 0, L"Ñêîïüå"},
{57, 2516, 0, lpwszOther},
- {58, 923, 0, _T("Âàëëåòòà")},
- {58, 3154, 0, _T("Ìçèäà")},
- {58, 924, 0, _T("Ñëèìà")},
+ {58, 923, 0, L"Âàëëåòòà"},
+ {58, 3154, 0, L"Ìçèäà"},
+ {58, 924, 0, L"Ñëèìà"},
{58, 2515, 0, lpwszOther},
- {59, 925, 0, _T("Áåëüöû")},
- {59, 926, 0, _T("Áåíäåðû")},
- {59, 3234, 0, _T("Äóáîññàðû")},
- {59, 3275, 0, _T("Êàõóë")},
- {59, 927, 0, _T("Êèøèíåâ")},
- {59, 3321, 0, _T("Ðåçèíà")},
- {59, 928, 0, _T("Ðûáíèöà")},
- {59, 929, 0, _T("Òèðàñïîëü")},
- {59, 3281, 0, _T("×àäûð-Ëóíãà")},
+ {59, 925, 0, L"Áåëüöû"},
+ {59, 926, 0, L"Áåíäåðû"},
+ {59, 3234, 0, L"Äóáîññàðû"},
+ {59, 3275, 0, L"Êàõóë"},
+ {59, 927, 0, L"Êèøèíåâ"},
+ {59, 3321, 0, L"Ðåçèíà"},
+ {59, 928, 0, L"Ðûáíèöà"},
+ {59, 929, 0, L"Òèðàñïîëü"},
+ {59, 3281, 0, L"×àäûð-Ëóíãà"},
{59, 2514, 0, lpwszOther},
- {36, 930, 0, _T("Ìîíòå-Êàðëî")},
+ {36, 930, 0, L"Ìîíòå-Êàðëî"},
{36, 2513, 0, lpwszOther},
- {60, 931, 0, _T("Àìñòåðäàì")},
- {60, 933, 0, _T("Áðåäà")},
- {60, 932, 0, _T("Ãààãà")},
- {60, 934, 0, _T("Ãàóäà")},
- {60, 935, 0, _T("Äåëôò")},
- {60, 2977, 0, _T("Äîíãåí")},
- {60, 3030, 0, _T("Çâîëëå")},
- {60, 3091, 0, _T("Íèéìåãåí")},
- {60, 936, 0, _T("Ðîòòåðäàì")},
- {60, 937, 0, _T("Óòðåõò")},
- {60, 3044, 0, _T("Ýéíäõîâåí")},
- {60, 3380, 0, _T("Ýíøåäå")},
+ {60, 931, 0, L"Àìñòåðäàì"},
+ {60, 933, 0, L"Áðåäà"},
+ {60, 932, 0, L"Ãààãà"},
+ {60, 934, 0, L"Ãàóäà"},
+ {60, 935, 0, L"Äåëôò"},
+ {60, 2977, 0, L"Äîíãåí"},
+ {60, 3030, 0, L"Çâîëëå"},
+ {60, 3091, 0, L"Íèéìåãåí"},
+ {60, 936, 0, L"Ðîòòåðäàì"},
+ {60, 937, 0, L"Óòðåõò"},
+ {60, 3044, 0, L"Ýéíäõîâåí"},
+ {60, 3380, 0, L"Ýíøåäå"},
{60, 2512, 0, lpwszOther},
- {61, 3190, 0, _T("Êðèñòèàíñàíä")},
- {61, 2857, 0, _T("Ëèëëåõàììåð")},
- {61, 938, 0, _T("Îñëî")},
- {61, 3355, 0, _T("Ñòàâàíãåð")},
- {61, 939, 0, _T("Òðîíõåéì")},
+ {61, 3190, 0, L"Êðèñòèàíñàíä"},
+ {61, 2857, 0, L"Ëèëëåõàììåð"},
+ {61, 938, 0, L"Îñëî"},
+ {61, 3355, 0, L"Ñòàâàíãåð"},
+ {61, 939, 0, L"Òðîíõåéì"},
{61, 2511, 0, lpwszOther},
- {62, 940, 0, _T("Áåëîñòîê")},
- {62, 941, 0, _T("Âàðøàâà")},
- {62, 3164, 0, _T("Âðîöëàâ")},
- {62, 942, 0, _T("Ãäàíüñê")},
- {62, 943, 0, _T("Ãëèâèöå")},
- {62, 3237, 0, _T("Çàêîïàíå")},
- {62, 3165, 0, _T("Çåëåíà Ãóðà")},
- {62, 944, 0, _T("Êàòîâèöå")},
- {62, 945, 0, _T("Êðàêîâ")},
- {62, 3008, 0, _T("Ëîäçü")},
- {62, 3150, 0, _T("Îëüøòûí")},
- {62, 946, 0, _T("Ïîçíàíü")},
- {62, 947, 0, _T("Ðàäîì")},
- {62, 948, 0, _T("Ñîïîò")},
- {62, 2958, 0, _T("Òûõû")},
+ {62, 940, 0, L"Áåëîñòîê"},
+ {62, 941, 0, L"Âàðøàâà"},
+ {62, 3164, 0, L"Âðîöëàâ"},
+ {62, 942, 0, L"Ãäàíüñê"},
+ {62, 943, 0, L"Ãëèâèöå"},
+ {62, 3237, 0, L"Çàêîïàíå"},
+ {62, 3165, 0, L"Çåëåíà Ãóðà"},
+ {62, 944, 0, L"Êàòîâèöå"},
+ {62, 945, 0, L"Êðàêîâ"},
+ {62, 3008, 0, L"Ëîäçü"},
+ {62, 3150, 0, L"Îëüøòûí"},
+ {62, 946, 0, L"Ïîçíàíü"},
+ {62, 947, 0, L"Ðàäîì"},
+ {62, 948, 0, L"Ñîïîò"},
+ {62, 2958, 0, L"Òûõû"},
{62, 2510, 0, lpwszOther},
- {35, 949, 0, _T("Ëèññàáîí")},
- {35, 950, 0, _T("Ïîðòî")},
+ {35, 949, 0, L"Ëèññàáîí"},
+ {35, 950, 0, L"Ïîðòî"},
{35, 2509, 0, lpwszOther},
- {63, 952, 0, _T("Áðàøîâ")},
- {63, 951, 0, _T("Áóõàðåñò")},
- {63, 954, 0, _T("Êîíñòàíöà")},
- {63, 955, 0, _T("Ïëîåøòè")},
- {63, 953, 0, _T("ßññû")},
+ {63, 952, 0, L"Áðàøîâ"},
+ {63, 951, 0, L"Áóõàðåñò"},
+ {63, 954, 0, L"Êîíñòàíöà"},
+ {63, 955, 0, L"Ïëîåøòè"},
+ {63, 953, 0, L"ßññû"},
{63, 2508, 0, lpwszOther},
- {64, 956, 0, _T("Ñàí-Ìàðèíî")},
+ {64, 956, 0, L"Ñàí-Ìàðèíî"},
{64, 2507, 0, lpwszOther},
- {74, 957, 0, _T("Áåëãðàä")},
- {74, 960, 0, _T("Íèø")},
- {74, 958, 0, _T("Íîâè-Ñàä")},
- {74, 959, 0, _T("Ñàðàåâî")},
+ {74, 957, 0, L"Áåëãðàä"},
+ {74, 960, 0, L"Íèø"},
+ {74, 958, 0, L"Íîâè-Ñàä"},
+ {74, 959, 0, L"Ñàðàåâî"},
{74, 2506, 0, lpwszOther},
- {65, 961, 0, _T("Áðàòèñëàâà")},
- {65, 962, 0, _T("Êîøèöå")},
- {65, 3101, 0, _T("Ëèïòîâ")},
- {65, 963, 0, _T("Ïîïðàä")},
- {65, 964, 0, _T("Ïðåøîâ")},
- {65, 965, 0, _T("Ðóæåìáåðîê")},
- {65, 966, 0, _T("Òâðäîøèí")},
+ {65, 961, 0, L"Áðàòèñëàâà"},
+ {65, 962, 0, L"Êîøèöå"},
+ {65, 3101, 0, L"Ëèïòîâ"},
+ {65, 963, 0, L"Ïîïðàä"},
+ {65, 964, 0, L"Ïðåøîâ"},
+ {65, 965, 0, L"Ðóæåìáåðîê"},
+ {65, 966, 0, L"Òâðäîøèí"},
{65, 2505, 0, lpwszOther},
- {66, 968, 0, _T("Êîïàð")},
- {66, 967, 0, _T("Ëþáëÿíà")},
- {66, 969, 0, _T("Ìàðèáîð")},
+ {66, 968, 0, L"Êîïàð"},
+ {66, 967, 0, L"Ëþáëÿíà"},
+ {66, 969, 0, L"Ìàðèáîð"},
{66, 2504, 0, lpwszOther},
- {67, 970, 0, _T("Òîðñõàâí")},
+ {67, 970, 0, L"Òîðñõàâí"},
{67, 2503, 0, lpwszOther},
- {68, 2888, 0, _T("Âàíòàà")},
- {68, 971, 0, _T("Âàñà")},
- {68, 979, 0, _T("Êîòêà")},
- {68, 972, 0, _T("Êîóâîëà")},
- {68, 980, 0, _T("Ëàõòè")},
- {68, 973, 0, _T("Îóëó")},
- {68, 3375, 0, _T("Ðèèõèìÿêè")},
- {68, 3159, 0, _T("Ðóîâåñè")},
- {68, 974, 0, _T("Òàìïåðå")},
- {68, 975, 0, _T("Òóðêó")},
- {68, 976, 0, _T("Õåëüñèíêè")},
- {68, 977, 0, _T("Ýñïî")},
- {68, 978, 0, _T("Þâÿñêþëÿ")},
+ {68, 2888, 0, L"Âàíòàà"},
+ {68, 971, 0, L"Âàñà"},
+ {68, 979, 0, L"Êîòêà"},
+ {68, 972, 0, L"Êîóâîëà"},
+ {68, 980, 0, L"Ëàõòè"},
+ {68, 973, 0, L"Îóëó"},
+ {68, 3375, 0, L"Ðèèõèìÿêè"},
+ {68, 3159, 0, L"Ðóîâåñè"},
+ {68, 974, 0, L"Òàìïåðå"},
+ {68, 975, 0, L"Òóðêó"},
+ {68, 976, 0, L"Õåëüñèíêè"},
+ {68, 977, 0, L"Ýñïî"},
+ {68, 978, 0, L"Þâÿñêþëÿ"},
{68, 2502, 0, lpwszOther},
- {37, 996, 0, _T("Àâèíüîí")},
- {37, 983, 0, _T("Áåðæåðàê")},
- {37, 997, 0, _T("Áëóà")},
- {37, 984, 0, _T("Áîðäî")},
- {37, 998, 0, _T("Äèæîí")},
- {37, 987, 0, _T("Êàíí")},
- {37, 988, 0, _T("Êàñòð")},
- {37, 993, 0, _T("Êëåðìîí-Ôåððàí")},
- {37, 3037, 0, _T("Ëèëëü")},
- {37, 989, 0, _T("Ëèîí")},
- {37, 985, 0, _T("Ìàðñåëü")},
- {37, 991, 0, _T("Ìåö")},
- {37, 3161, 0, _T("Ìîáåæ")},
- {37, 990, 0, _T("Íàíñè")},
- {37, 994, 0, _T("Íàíò")},
- {37, 995, 0, _T("Íèööà")},
- {37, 999, 0, _T("Îðëåàí")},
- {37, 981, 0, _T("Ïàðèæ")},
- {37, 3374, 0, _T("Ïåðïèíüÿí")},
- {37, 992, 0, _T("Ðóàí")},
- {37, 982, 0, _T("Ñòðàñáóðã")},
- {37, 986, 0, _T("Òóëóçà")},
- {37, 3314, 0, _T("Øàìáåðè")},
+ {37, 996, 0, L"Àâèíüîí"},
+ {37, 983, 0, L"Áåðæåðàê"},
+ {37, 997, 0, L"Áëóà"},
+ {37, 984, 0, L"Áîðäî"},
+ {37, 998, 0, L"Äèæîí"},
+ {37, 987, 0, L"Êàíí"},
+ {37, 988, 0, L"Êàñòð"},
+ {37, 993, 0, L"Êëåðìîí-Ôåððàí"},
+ {37, 3037, 0, L"Ëèëëü"},
+ {37, 989, 0, L"Ëèîí"},
+ {37, 985, 0, L"Ìàðñåëü"},
+ {37, 991, 0, L"Ìåö"},
+ {37, 3161, 0, L"Ìîáåæ"},
+ {37, 990, 0, L"Íàíñè"},
+ {37, 994, 0, L"Íàíò"},
+ {37, 995, 0, L"Íèööà"},
+ {37, 999, 0, L"Îðëåàí"},
+ {37, 981, 0, L"Ïàðèæ"},
+ {37, 3374, 0, L"Ïåðïèíüÿí"},
+ {37, 992, 0, L"Ðóàí"},
+ {37, 982, 0, L"Ñòðàñáóðã"},
+ {37, 986, 0, L"Òóëóçà"},
+ {37, 3314, 0, L"Øàìáåðè"},
{37, 2501, 0, lpwszOther},
- {69, 1003, 0, _T("Äóáðîâíèê")},
- {69, 1000, 0, _T("Çàãðåá")},
- {69, 1001, 0, _T("Çàäàð")},
- {69, 1004, 0, _T("Ðèåêà")},
- {69, 1002, 0, _T("Ñïëèò")},
+ {69, 1003, 0, L"Äóáðîâíèê"},
+ {69, 1000, 0, L"Çàãðåá"},
+ {69, 1001, 0, L"Çàäàð"},
+ {69, 1004, 0, L"Ðèåêà"},
+ {69, 1002, 0, L"Ñïëèò"},
{69, 2500, 0, lpwszOther},
- {70, 1005, 0, _T("Áðíî")},
- {70, 3291, 0, _T("Ãàâëè÷êóâ-Áðîä")},
- {70, 1007, 0, _T("Ãðàäåö-Êðàëîâå")},
- {70, 1008, 0, _T("Êàðëîâè-Âàðè")},
- {70, 3019, 0, _T("Êëàäðóáû")},
- {70, 1010, 0, _T("Ëîóíè")},
- {70, 1009, 0, _T("Îñòðàâà")},
- {70, 1015, 0, _T("Ïëüçåíü")},
- {70, 3105, 0, _T("Ïðàâ÷èöêà Áðàíà")},
- {70, 1006, 0, _T("Ïðàãà")},
- {70, 3246, 0, _T("Òà÷îâ")},
- {70, 1011, 0, _T("Òðøåáè÷")},
- {70, 1012, 0, _T("Óñòè-íàä-Ëàáåì")},
- {70, 1014, 0, _T("×åñêå-Áóäååâèöå")},
- {70, 1013, 0, _T("ßáëîíåö-íàä-Íèñîó")},
+ {70, 1005, 0, L"Áðíî"},
+ {70, 3291, 0, L"Ãàâëè÷êóâ-Áðîä"},
+ {70, 1007, 0, L"Ãðàäåö-Êðàëîâå"},
+ {70, 1008, 0, L"Êàðëîâè-Âàðè"},
+ {70, 3019, 0, L"Êëàäðóáû"},
+ {70, 1010, 0, L"Ëîóíè"},
+ {70, 1009, 0, L"Îñòðàâà"},
+ {70, 1015, 0, L"Ïëüçåíü"},
+ {70, 3105, 0, L"Ïðàâ÷èöêà Áðàíà"},
+ {70, 1006, 0, L"Ïðàãà"},
+ {70, 3246, 0, L"Òà÷îâ"},
+ {70, 1011, 0, L"Òðøåáè÷"},
+ {70, 1012, 0, L"Óñòè-íàä-Ëàáåì"},
+ {70, 1014, 0, L"×åñêå-Áóäååâèöå"},
+ {70, 1013, 0, L"ßáëîíåö-íàä-Íèñîó"},
{70, 2499, 0, lpwszOther},
- {71, 1016, 0, _T("Àðàó")},
- {71, 1019, 0, _T("Áàäåí")},
- {71, 1017, 0, _T("Áàçåëü")},
- {71, 1018, 0, _T("Áåðí")},
- {71, 1020, 0, _T("Áèëü")},
- {71, 1021, 0, _T("Âèíòåðòóð")},
- {71, 1022, 0, _T("Äàâîñ")},
- {71, 3189, 0, _T("Äåëåìîíò")},
- {71, 1023, 0, _T("Æåíåâà")},
- {71, 1024, 0, _T("Çîëîòóðí")},
- {71, 1025, 0, _T("Ëîçàííà")},
- {71, 1026, 0, _T("Ëîêàðíî")},
- {71, 1027, 0, _T("Ëóãàíî")},
- {71, 1028, 0, _T("Ëþöåðí")},
- {71, 1029, 0, _T("Ìîíòðå")},
- {71, 1030, 0, _T("Öþðèõ")},
+ {71, 1016, 0, L"Àðàó"},
+ {71, 1019, 0, L"Áàäåí"},
+ {71, 1017, 0, L"Áàçåëü"},
+ {71, 1018, 0, L"Áåðí"},
+ {71, 1020, 0, L"Áèëü"},
+ {71, 1021, 0, L"Âèíòåðòóð"},
+ {71, 1022, 0, L"Äàâîñ"},
+ {71, 3189, 0, L"Äåëåìîíò"},
+ {71, 1023, 0, L"Æåíåâà"},
+ {71, 1024, 0, L"Çîëîòóðí"},
+ {71, 1025, 0, L"Ëîçàííà"},
+ {71, 1026, 0, L"Ëîêàðíî"},
+ {71, 1027, 0, L"Ëóãàíî"},
+ {71, 1028, 0, L"Ëþöåðí"},
+ {71, 1029, 0, L"Ìîíòðå"},
+ {71, 1030, 0, L"Öþðèõ"},
{71, 2498, 0, lpwszOther},
- {72, 2883, 0, _T("Àðáîãà")},
- {72, 1031, 0, _T("Ãåòåáîðã")},
- {72, 1032, 0, _T("Êàëüìàð")},
- {72, 1037, 0, _T("Ëàõîëüì")},
- {72, 1036, 0, _T("Ëóëåî")},
- {72, 1042, 0, _T("Ëóíä")},
- {72, 1033, 0, _T("Ìàëüìå")},
- {72, 1034, 0, _T("Ñòîêãîëüì")},
- {72, 1041, 0, _T("Óìåî")},
- {72, 1039, 0, _T("Ôàëóí")},
- {72, 1043, 0, _T("Õåëüñèíáîðã")},
- {72, 1040, 0, _T("Õåðíåñàíä")},
- {72, 1038, 0, _T("Ýñòåðñóíä")},
+ {72, 2883, 0, L"Àðáîãà"},
+ {72, 1031, 0, L"Ãåòåáîðã"},
+ {72, 1032, 0, L"Êàëüìàð"},
+ {72, 1037, 0, L"Ëàõîëüì"},
+ {72, 1036, 0, L"Ëóëåî"},
+ {72, 1042, 0, L"Ëóíä"},
+ {72, 1033, 0, L"Ìàëüìå"},
+ {72, 1034, 0, L"Ñòîêãîëüì"},
+ {72, 1041, 0, L"Óìåî"},
+ {72, 1039, 0, L"Ôàëóí"},
+ {72, 1043, 0, L"Õåëüñèíáîðã"},
+ {72, 1040, 0, L"Õåðíåñàíä"},
+ {72, 1038, 0, L"Ýñòåðñóíä"},
{72, 2497, 0, lpwszOther},
- {73, 3013, 0, _T("Âàëãà")},
- {73, 1044, 0, _T("Êåéëà")},
- {73, 1045, 0, _T("Êîõòëà-ßðâå")},
- {73, 1046, 0, _T("Ìààðäó")},
- {73, 1047, 0, _T("Ìûéçàêþëà")},
- {73, 1048, 0, _T("Íàðâà")},
- {73, 1049, 0, _T("Ïÿðíó")},
- {73, 1050, 0, _T("Ðàêâåðå")},
- {73, 1051, 0, _T("Ñèëëàìÿý")},
- {73, 1052, 0, _T("Òàëëèí")},
- {73, 1053, 0, _T("Òàðòó")},
- {73, 1054, 0, _T("Õààïñàëó")},
+ {73, 3013, 0, L"Âàëãà"},
+ {73, 1044, 0, L"Êåéëà"},
+ {73, 1045, 0, L"Êîõòëà-ßðâå"},
+ {73, 1046, 0, L"Ìààðäó"},
+ {73, 1047, 0, L"Ìûéçàêþëà"},
+ {73, 1048, 0, L"Íàðâà"},
+ {73, 1049, 0, L"Ïÿðíó"},
+ {73, 1050, 0, L"Ðàêâåðå"},
+ {73, 1051, 0, L"Ñèëëàìÿý"},
+ {73, 1052, 0, L"Òàëëèí"},
+ {73, 1053, 0, L"Òàðòó"},
+ {73, 1054, 0, L"Õààïñàëó"},
{0, 0, 0, NULL}
};//*/
/*
static const MRA_COUNTRY mracCountrys[] =
{
- {24, _T("Ðîññèÿ")},
- {81, _T("Àçåðáàéäæàí")},
- {82, _T("Àðìåíèÿ")},
- {97, _T("Àôãàíèñòàí")},
- {96, _T("Áàíãëàäåø")},
- {99, _T("Áàõðåéí")},
- {100, _T("Áðóíåé-Äàðóññàëàì")},
- {101, _T("Áóòàí")},
- {102, _T("Âüåòíàì")},
- {83, _T("Ãðóçèÿ")},
- {86, _T("Èçðàèëü")},
- {95, _T("Èíäèÿ")},
- {103, _T("Èíäîíåçèÿ")},
- {79, _T("Èîðäàíèÿ")},
- {85, _T("Èðàê")},
- {87, _T("Èðàí")},
- {104, _T("Éåìåí")},
- {84, _T("Êàçàõñòàí")},
- {105, _T("Êàìáîäæà")},
- {106, _T("Êàòàð")},
- {107, _T("Êèïð")},
- {92, _T("Êèðãèçèÿ (Êûðãûçñòàí)")},
- {76, _T("Êèòàé")},
- {3215, _T("Êîêîñîâûå îñòðîâà (Àâñòð.)")},
- {29, _T("Êîðåÿ (ÊÍÄÐ)")},
- {108, _T("Êîðåÿ")},
- {88, _T("Êóâåéò")},
- {109, _T("Ëàîñ")},
- {110, _T("Ëèâàí")},
- {111, _T("Ìàëàéçèÿ")},
- {112, _T("Ìàëüäèâû")},
- {113, _T("Ìîíãîëèÿ")},
- {114, _T("Ìüÿíìà")},
- {115, _T("Íåïàë")},
- {116, _T("Îáúåäèíåííûå Àðàáñêèå Ýìèðàòû")},
- {117, _T("Îìàí")},
- {3216, _T("Îñòðîâ Ðîæäåñòâà (Àâñòð.)")},
- {122, _T("Ïàêèñòàí")},
- {89, _T("Ïàëåñòèíà")},
- {94, _T("Ñàóäîâñêàÿ Àðàâèÿ")},
- {118, _T("Ñèíãàïóð")},
- {78, _T("Ñèðèÿ")},
- {91, _T("Òàäæèêèñòàí")},
- {119, _T("Òàèëàíä")},
- {120, _T("Òàéâàíü")},
- {132, _T("Òèìîð")},
- {90, _T("Òóðêìåíèÿ")},
- {77, _T("Òóðöèÿ")},
- {93, _T("Óçáåêèñòàí")},
- {121, _T("Ôèëèïïèíû")},
- {98, _T("Øðè Ëàíêà")},
- {75, _T("ßïîíèÿ")},
- {123, _T("Àâñòðàëèÿ")},
- {454, _T("Àìåðèêàíñêîå Ñàìîà")},
- {124, _T("Âàíóàòó")},
- {453, _T("Ãóàì (ÑØÀ)")},
- {126, _T("Êèðèáàòè")},
- {127, _T("Ìàðøàëëîâû Îñòðîâà")},
- {128, _T("Ìèêðîíåçèÿ (Ôåäåðàòèâíûå Øòàòû Ìèêðîíåçèè)")},
- {129, _T("Íàóðó")},
- {3220, _T("Íèóý (Í.Çåë.)")},
- {130, _T("Íîâàÿ Çåëàíäèÿ")},
- {3218, _T("Íîâàÿ Êàëåäîíèÿ (Ôð.)")},
- {3221, _T("Îñòðîâà Êóêà (Í.Çåë.)")},
- {3230, _T("Îñòðîâà Õåðä è Ìàêäîíàëüä (Àâñòð.)")},
- {131, _T("Ïàëàó")},
- {133, _T("Ïàïóà - Íîâàÿ Ãâèíåÿ")},
- {3222, _T("Ïèòêåðí (Áðèò.)")},
- {125, _T("Ñàìîà")},
- {3219, _T("Ñåâ. Ìàðèàíñêèå îñòðîâà (ÑØÀ)")},
- {134, _T("Ñîëîìîíîâû Îñòðîâà")},
- {3223, _T("Òîêåëàó (Í.Çåë.)")},
- {135, _T("Òîíãà")},
- {136, _T("Òóâàëó")},
- {3224, _T("Óîëëèñ è Ôóòóíà îñòðîâà (Ôð.)")},
- {137, _T("Ôèäæè")},
- {3226, _T("Ôðàíöóçñêàÿ Ïîëèíåçèÿ")},
- {3225, _T("Ôðàíöóçñêèå Þæíûå òåððèòîðèè")},
- {138, _T("Êàíàäà")},
- {139, _T("ÑØÀ")},
- {3200, _T("Àíãèëüÿ (Áðèò.)")},
- {140, _T("Àíòèãóà è Áàðáóäà")},
- {141, _T("Àðãåíòèíà")},
- {3202, _T("Àðóáà (Íèä.)")},
- {142, _T("Áàãàìû")},
- {143, _T("Áàðáàäîñ")},
- {146, _T("Áåëèç")},
- {3203, _T("Áåðìóäû (Áðèò.)")},
- {144, _T("Áîëèâèÿ")},
- {145, _T("Áðàçèëèÿ")},
- {147, _T("Âåíåñóýëà")},
- {3204, _T("Âèðãèíñêèå îñòðîâà (Áðèò.)")},
- {452, _T("Âèðãèíñêèå îñòðîâà (ÑØÀ)")},
- {149, _T("Ãàèòè")},
- {148, _T("Ãàéàíà")},
- {3205, _T("Ãâàäåëóïà (Ôð.)")},
- {173, _T("Ãâàòåìàëà")},
- {150, _T("Ãîíäóðàñ")},
- {151, _T("Ãðåíàäà")},
- {152, _T("Ãðåíëàíäèÿ (Äàò.)")},
- {153, _T("Äîìèíèêà")},
- {154, _T("Äîìèíèêàíñêàÿ Ðåñïóáëèêà")},
- {155, _T("Êîëóìáèÿ")},
- {156, _T("Êîñòà-Ðèêà")},
- {157, _T("Êóáà")},
- {3208, _T("Ìàðòèíèêà (Ôð.)")},
- {158, _T("Ìåêñèêà")},
- {3209, _T("Ìîíòñåððàò (Áðèò)")},
- {3201, _T("Íèäåðëàíäñêèå Àíòèëû")},
- {159, _T("Íèêàðàãóà")},
- {3207, _T("Îñòðîâ Êàéìàí (Áðèò.)")},
- {3211, _T("Îñòðîâà Òåðêñ è Êàéêîñ (Áðèò.)")},
- {160, _T("Ïàíàìà")},
- {161, _T("Ïàðàãâàé")},
- {162, _T("Ïåðó")},
- {163, _T("Ñàëüâàäîð")},
- {164, _T("Ñåíò-Âèíñåíò è Ãðåíàäèíû")},
- {165, _T("Ñåíò-Êèòñ è Íåâèñ")},
- {166, _T("Ñåíò-Ëþñèÿ")},
- {3210, _T("Ñåíò-Ïüåð è Ìèêåëîí (Ôð.)")},
- {167, _T("Ñóðèíàì")},
- {168, _T("Òðèíèäàò è Òîáàãî")},
- {169, _T("Óðóãâàé")},
- {3212, _T("Ôîëêëåíäñêèå îñòðîâà (Áðèò.)")},
- {3206, _T("Ôðàíöóçñêàÿ Ãâèàíà")},
- {170, _T("×èëè")},
- {171, _T("Ýêâàäîð")},
- {3213, _T("Þæ. Äæîðäæèÿ è Þæ. Ñàíäâè÷åâû î-âà (Áðèò.)")},
- {172, _T("ßìàéêà")},
- {174, _T("Àëæèð")},
- {175, _T("Àíãîëà")},
- {176, _T("Áåíèí")},
- {177, _T("Áîòñâàíà")},
- {3228, _T("Áðèòàíñêàÿ òåððèòîðèÿ â Èíäèéñêîì îêåàíå")},
- {178, _T("Áóðêèíà-Ôàñî")},
- {179, _T("Áóðóíäè")},
- {180, _T("Ãàáîí")},
- {181, _T("Ãàìáèÿ")},
- {182, _T("Ãàíà")},
- {183, _T("Ãâèíåÿ")},
- {184, _T("Ãâèíåÿ-Áèñàó")},
- {185, _T("Äæèáóòè")},
- {186, _T("Åãèïåò")},
- {187, _T("Çàìáèÿ")},
- {3198, _T("Çàï. Ñàõàðà")},
- {23, _T("Çèìáàáâå")},
- {188, _T("Êàáî-Âåðäå")},
- {189, _T("Êàìåðóí")},
- {190, _T("Êåíèÿ")},
- {191, _T("Êîìîðû")},
- {193, _T("Êîíãî (Çàèð)")},
- {192, _T("Êîíãî")},
- {194, _T("Êîò-ä`Èâóàð")},
- {195, _T("Ëåñîòî")},
- {196, _T("Ëèáåðèÿ")},
- {197, _T("Ëèâèÿ")},
- {198, _T("Ìàâðèêèé")},
- {199, _T("Ìàâðèòàíèÿ")},
- {200, _T("Ìàäàãàñêàð")},
- {3229, _T("Ìàéîòò (Ôð.)")},
- {201, _T("Ìàëàâè")},
- {202, _T("Ìàëè")},
- {203, _T("Ìàðîêêî")},
- {204, _T("Ìîçàìáèê")},
- {205, _T("Íàìèáèÿ")},
- {206, _T("Íèãåð")},
- {207, _T("Íèãåðèÿ")},
- {3227, _T("Îñòðîâ Áóâå (Íîðâ.)")},
- {3197, _T("Ðåþíüîí (Ôð.)")},
- {208, _T("Ðóàíäà")},
- {209, _T("Ñàí-Òîìå è Ïðèíñèïè")},
- {210, _T("Ñâàçèëåíä")},
- {3199, _T("Ñâÿòàÿ Åëåíà (Áðèò.)")},
- {211, _T("Ñåéøåëû")},
- {212, _T("Ñåíåãàë")},
- {213, _T("Ñîìàëè")},
- {214, _T("Ñóäàí")},
- {215, _T("Ñüåððà-Ëåîíå")},
- {216, _T("Òàíçàíèÿ")},
- {217, _T("Òîãî")},
- {218, _T("Òóíèñ")},
- {219, _T("Óãàíäà")},
- {220, _T("Öåíòðàëüíîàôðèêàíñêàÿ Ðåñïóáëèêà")},
- {222, _T("×àä")},
- {223, _T("Ýêâàòîðèàëüíàÿ Ãâèíåÿ")},
- {221, _T("Ýðèòðåÿ")},
- {224, _T("Ýôèîïèÿ")},
- {225, _T("Þæíî-Àôðèêàíñêàÿ Ðåñïóáëèêà (ÞÀÐ)")},
- {39, _T("Óêðàèíà")},
- {40, _T("Àâñòðèÿ")},
- {32, _T("Àëáàíèÿ")},
- {33, _T("Àíäîððà")},
- {340, _T("Áåëîðóññèÿ")},
- {38, _T("Áåëüãèÿ")},
- {41, _T("Áîëãàðèÿ")},
- {42, _T("Áîñíèÿ è Ãåðöåãîâèíà")},
- {43, _T("Âàòèêàí")},
- {45, _T("Âåëèêîáðèòàíèÿ")},
- {44, _T("Âåíãðèÿ")},
- {46, _T("Ãåðìàíèÿ")},
- {3193, _T("Ãåðíñè (Áðèò.)")},
- {47, _T("Ãèáðàëòàð (Áðèò.)")},
- {48, _T("Ãðåöèÿ")},
- {49, _T("Äàíèÿ")},
- {3194, _T("Äæåðñè (Áðèò.)")},
- {50, _T("Èðëàíäèÿ")},
- {51, _T("Èñëàíäèÿ")},
- {34, _T("Èñïàíèÿ")},
- {52, _T("Èòàëèÿ")},
- {53, _T("Ëàòâèÿ")},
- {54, _T("Ëèòâà")},
- {55, _T("Ëèõòåíøòåéí")},
- {56, _T("Ëþêñåìáóðã")},
- {57, _T("Ìàêåäîíèÿ")},
- {58, _T("Ìàëüòà")},
- {59, _T("Ìîëäàâèÿ")},
- {36, _T("Ìîíàêî")},
- {60, _T("Íèäåðëàíäû")},
- {61, _T("Íîðâåãèÿ")},
- {3195, _T("Îñòðîâ Ìýí (Áðèò.)")},
- {62, _T("Ïîëüøà")},
- {35, _T("Ïîðòóãàëèÿ")},
- {63, _T("Ðóìûíèÿ")},
- {64, _T("Ñàí-Ìàðèíî")},
- {74, _T("Ñåðáèÿ è ×åðíîãîðèÿ")},
- {65, _T("Ñëîâàêèÿ")},
- {66, _T("Ñëîâåíèÿ")},
- {67, _T("Ôàðåðñêèå î-âà (Äàíèÿ)")},
- {68, _T("Ôèíëÿíäèÿ")},
- {37, _T("Ôðàíöèÿ")},
- {69, _T("Õîðâàòèÿ")},
- {70, _T("×åõèÿ")},
- {71, _T("Øâåéöàðèÿ")},
- {72, _T("Øâåöèÿ")},
- {3196, _T("Øïèöáåðãåí (Íîðâ.)")},
- {73, _T("Ýñòîíèÿ")},
+ {24, L"Ðîññèÿ"},
+ {81, L"Àçåðáàéäæàí"},
+ {82, L"Àðìåíèÿ"},
+ {97, L"Àôãàíèñòàí"},
+ {96, L"Áàíãëàäåø"},
+ {99, L"Áàõðåéí"},
+ {100, L"Áðóíåé-Äàðóññàëàì"},
+ {101, L"Áóòàí"},
+ {102, L"Âüåòíàì"},
+ {83, L"Ãðóçèÿ"},
+ {86, L"Èçðàèëü"},
+ {95, L"Èíäèÿ"},
+ {103, L"Èíäîíåçèÿ"},
+ {79, L"Èîðäàíèÿ"},
+ {85, L"Èðàê"},
+ {87, L"Èðàí"},
+ {104, L"Éåìåí"},
+ {84, L"Êàçàõñòàí"},
+ {105, L"Êàìáîäæà"},
+ {106, L"Êàòàð"},
+ {107, L"Êèïð"},
+ {92, L"Êèðãèçèÿ (Êûðãûçñòàí)"},
+ {76, L"Êèòàé"},
+ {3215, L"Êîêîñîâûå îñòðîâà (Àâñòð.)"},
+ {29, L"Êîðåÿ (ÊÍÄÐ)"},
+ {108, L"Êîðåÿ"},
+ {88, L"Êóâåéò"},
+ {109, L"Ëàîñ"},
+ {110, L"Ëèâàí"},
+ {111, L"Ìàëàéçèÿ"},
+ {112, L"Ìàëüäèâû"},
+ {113, L"Ìîíãîëèÿ"},
+ {114, L"Ìüÿíìà"},
+ {115, L"Íåïàë"},
+ {116, L"Îáúåäèíåííûå Àðàáñêèå Ýìèðàòû"},
+ {117, L"Îìàí"},
+ {3216, L"Îñòðîâ Ðîæäåñòâà (Àâñòð.)"},
+ {122, L"Ïàêèñòàí"},
+ {89, L"Ïàëåñòèíà"},
+ {94, L"Ñàóäîâñêàÿ Àðàâèÿ"},
+ {118, L"Ñèíãàïóð"},
+ {78, L"Ñèðèÿ"},
+ {91, L"Òàäæèêèñòàí"},
+ {119, L"Òàèëàíä"},
+ {120, L"Òàéâàíü"},
+ {132, L"Òèìîð"},
+ {90, L"Òóðêìåíèÿ"},
+ {77, L"Òóðöèÿ"},
+ {93, L"Óçáåêèñòàí"},
+ {121, L"Ôèëèïïèíû"},
+ {98, L"Øðè Ëàíêà"},
+ {75, L"ßïîíèÿ"},
+ {123, L"Àâñòðàëèÿ"},
+ {454, L"Àìåðèêàíñêîå Ñàìîà"},
+ {124, L"Âàíóàòó"},
+ {453, L"Ãóàì (ÑØÀ)"},
+ {126, L"Êèðèáàòè"},
+ {127, L"Ìàðøàëëîâû Îñòðîâà"},
+ {128, L"Ìèêðîíåçèÿ (Ôåäåðàòèâíûå Øòàòû Ìèêðîíåçèè)"},
+ {129, L"Íàóðó"},
+ {3220, L"Íèóý (Í.Çåë.)"},
+ {130, L"Íîâàÿ Çåëàíäèÿ"},
+ {3218, L"Íîâàÿ Êàëåäîíèÿ (Ôð.)"},
+ {3221, L"Îñòðîâà Êóêà (Í.Çåë.)"},
+ {3230, L"Îñòðîâà Õåðä è Ìàêäîíàëüä (Àâñòð.)"},
+ {131, L"Ïàëàó"},
+ {133, L"Ïàïóà - Íîâàÿ Ãâèíåÿ"},
+ {3222, L"Ïèòêåðí (Áðèò.)"},
+ {125, L"Ñàìîà"},
+ {3219, L"Ñåâ. Ìàðèàíñêèå îñòðîâà (ÑØÀ)"},
+ {134, L"Ñîëîìîíîâû Îñòðîâà"},
+ {3223, L"Òîêåëàó (Í.Çåë.)"},
+ {135, L"Òîíãà"},
+ {136, L"Òóâàëó"},
+ {3224, L"Óîëëèñ è Ôóòóíà îñòðîâà (Ôð.)"},
+ {137, L"Ôèäæè"},
+ {3226, L"Ôðàíöóçñêàÿ Ïîëèíåçèÿ"},
+ {3225, L"Ôðàíöóçñêèå Þæíûå òåððèòîðèè"},
+ {138, L"Êàíàäà"},
+ {139, L"ÑØÀ"},
+ {3200, L"Àíãèëüÿ (Áðèò.)"},
+ {140, L"Àíòèãóà è Áàðáóäà"},
+ {141, L"Àðãåíòèíà"},
+ {3202, L"Àðóáà (Íèä.)"},
+ {142, L"Áàãàìû"},
+ {143, L"Áàðáàäîñ"},
+ {146, L"Áåëèç"},
+ {3203, L"Áåðìóäû (Áðèò.)"},
+ {144, L"Áîëèâèÿ"},
+ {145, L"Áðàçèëèÿ"},
+ {147, L"Âåíåñóýëà"},
+ {3204, L"Âèðãèíñêèå îñòðîâà (Áðèò.)"},
+ {452, L"Âèðãèíñêèå îñòðîâà (ÑØÀ)"},
+ {149, L"Ãàèòè"},
+ {148, L"Ãàéàíà"},
+ {3205, L"Ãâàäåëóïà (Ôð.)"},
+ {173, L"Ãâàòåìàëà"},
+ {150, L"Ãîíäóðàñ"},
+ {151, L"Ãðåíàäà"},
+ {152, L"Ãðåíëàíäèÿ (Äàò.)"},
+ {153, L"Äîìèíèêà"},
+ {154, L"Äîìèíèêàíñêàÿ Ðåñïóáëèêà"},
+ {155, L"Êîëóìáèÿ"},
+ {156, L"Êîñòà-Ðèêà"},
+ {157, L"Êóáà"},
+ {3208, L"Ìàðòèíèêà (Ôð.)"},
+ {158, L"Ìåêñèêà"},
+ {3209, L"Ìîíòñåððàò (Áðèò)"},
+ {3201, L"Íèäåðëàíäñêèå Àíòèëû"},
+ {159, L"Íèêàðàãóà"},
+ {3207, L"Îñòðîâ Êàéìàí (Áðèò.)"},
+ {3211, L"Îñòðîâà Òåðêñ è Êàéêîñ (Áðèò.)"},
+ {160, L"Ïàíàìà"},
+ {161, L"Ïàðàãâàé"},
+ {162, L"Ïåðó"},
+ {163, L"Ñàëüâàäîð"},
+ {164, L"Ñåíò-Âèíñåíò è Ãðåíàäèíû"},
+ {165, L"Ñåíò-Êèòñ è Íåâèñ"},
+ {166, L"Ñåíò-Ëþñèÿ"},
+ {3210, L"Ñåíò-Ïüåð è Ìèêåëîí (Ôð.)"},
+ {167, L"Ñóðèíàì"},
+ {168, L"Òðèíèäàò è Òîáàãî"},
+ {169, L"Óðóãâàé"},
+ {3212, L"Ôîëêëåíäñêèå îñòðîâà (Áðèò.)"},
+ {3206, L"Ôðàíöóçñêàÿ Ãâèàíà"},
+ {170, L"×èëè"},
+ {171, L"Ýêâàäîð"},
+ {3213, L"Þæ. Äæîðäæèÿ è Þæ. Ñàíäâè÷åâû î-âà (Áðèò.)"},
+ {172, L"ßìàéêà"},
+ {174, L"Àëæèð"},
+ {175, L"Àíãîëà"},
+ {176, L"Áåíèí"},
+ {177, L"Áîòñâàíà"},
+ {3228, L"Áðèòàíñêàÿ òåððèòîðèÿ â Èíäèéñêîì îêåàíå"},
+ {178, L"Áóðêèíà-Ôàñî"},
+ {179, L"Áóðóíäè"},
+ {180, L"Ãàáîí"},
+ {181, L"Ãàìáèÿ"},
+ {182, L"Ãàíà"},
+ {183, L"Ãâèíåÿ"},
+ {184, L"Ãâèíåÿ-Áèñàó"},
+ {185, L"Äæèáóòè"},
+ {186, L"Åãèïåò"},
+ {187, L"Çàìáèÿ"},
+ {3198, L"Çàï. Ñàõàðà"},
+ {23, L"Çèìáàáâå"},
+ {188, L"Êàáî-Âåðäå"},
+ {189, L"Êàìåðóí"},
+ {190, L"Êåíèÿ"},
+ {191, L"Êîìîðû"},
+ {193, L"Êîíãî (Çàèð)"},
+ {192, L"Êîíãî"},
+ {194, L"Êîò-ä`Èâóàð"},
+ {195, L"Ëåñîòî"},
+ {196, L"Ëèáåðèÿ"},
+ {197, L"Ëèâèÿ"},
+ {198, L"Ìàâðèêèé"},
+ {199, L"Ìàâðèòàíèÿ"},
+ {200, L"Ìàäàãàñêàð"},
+ {3229, L"Ìàéîòò (Ôð.)"},
+ {201, L"Ìàëàâè"},
+ {202, L"Ìàëè"},
+ {203, L"Ìàðîêêî"},
+ {204, L"Ìîçàìáèê"},
+ {205, L"Íàìèáèÿ"},
+ {206, L"Íèãåð"},
+ {207, L"Íèãåðèÿ"},
+ {3227, L"Îñòðîâ Áóâå (Íîðâ.)"},
+ {3197, L"Ðåþíüîí (Ôð.)"},
+ {208, L"Ðóàíäà"},
+ {209, L"Ñàí-Òîìå è Ïðèíñèïè"},
+ {210, L"Ñâàçèëåíä"},
+ {3199, L"Ñâÿòàÿ Åëåíà (Áðèò.)"},
+ {211, L"Ñåéøåëû"},
+ {212, L"Ñåíåãàë"},
+ {213, L"Ñîìàëè"},
+ {214, L"Ñóäàí"},
+ {215, L"Ñüåððà-Ëåîíå"},
+ {216, L"Òàíçàíèÿ"},
+ {217, L"Òîãî"},
+ {218, L"Òóíèñ"},
+ {219, L"Óãàíäà"},
+ {220, L"Öåíòðàëüíîàôðèêàíñêàÿ Ðåñïóáëèêà"},
+ {222, L"×àä"},
+ {223, L"Ýêâàòîðèàëüíàÿ Ãâèíåÿ"},
+ {221, L"Ýðèòðåÿ"},
+ {224, L"Ýôèîïèÿ"},
+ {225, L"Þæíî-Àôðèêàíñêàÿ Ðåñïóáëèêà (ÞÀÐ)"},
+ {39, L"Óêðàèíà"},
+ {40, L"Àâñòðèÿ"},
+ {32, L"Àëáàíèÿ"},
+ {33, L"Àíäîððà"},
+ {340, L"Áåëîðóññèÿ"},
+ {38, L"Áåëüãèÿ"},
+ {41, L"Áîëãàðèÿ"},
+ {42, L"Áîñíèÿ è Ãåðöåãîâèíà"},
+ {43, L"Âàòèêàí"},
+ {45, L"Âåëèêîáðèòàíèÿ"},
+ {44, L"Âåíãðèÿ"},
+ {46, L"Ãåðìàíèÿ"},
+ {3193, L"Ãåðíñè (Áðèò.)"},
+ {47, L"Ãèáðàëòàð (Áðèò.)"},
+ {48, L"Ãðåöèÿ"},
+ {49, L"Äàíèÿ"},
+ {3194, L"Äæåðñè (Áðèò.)"},
+ {50, L"Èðëàíäèÿ"},
+ {51, L"Èñëàíäèÿ"},
+ {34, L"Èñïàíèÿ"},
+ {52, L"Èòàëèÿ"},
+ {53, L"Ëàòâèÿ"},
+ {54, L"Ëèòâà"},
+ {55, L"Ëèõòåíøòåéí"},
+ {56, L"Ëþêñåìáóðã"},
+ {57, L"Ìàêåäîíèÿ"},
+ {58, L"Ìàëüòà"},
+ {59, L"Ìîëäàâèÿ"},
+ {36, L"Ìîíàêî"},
+ {60, L"Íèäåðëàíäû"},
+ {61, L"Íîðâåãèÿ"},
+ {3195, L"Îñòðîâ Ìýí (Áðèò.)"},
+ {62, L"Ïîëüøà"},
+ {35, L"Ïîðòóãàëèÿ"},
+ {63, L"Ðóìûíèÿ"},
+ {64, L"Ñàí-Ìàðèíî"},
+ {74, L"Ñåðáèÿ è ×åðíîãîðèÿ"},
+ {65, L"Ñëîâàêèÿ"},
+ {66, L"Ñëîâåíèÿ"},
+ {67, L"Ôàðåðñêèå î-âà (Äàíèÿ)"},
+ {68, L"Ôèíëÿíäèÿ"},
+ {37, L"Ôðàíöèÿ"},
+ {69, L"Õîðâàòèÿ"},
+ {70, L"×åõèÿ"},
+ {71, L"Øâåéöàðèÿ"},
+ {72, L"Øâåöèÿ"},
+ {3196, L"Øïèöáåðãåí (Íîðâ.)"},
+ {73, L"Ýñòîíèÿ"},
{0, NULL}
};
@@ -1667,1125 +1667,1125 @@ static const MRA_COUNTRY mracCountrys[] = static const MRA_CITY mracCitys[] =
{
- {24, 25, _T("Ìîñêâà")},
- {24, 226, _T("Ñàíêò-Ïåòåðáóðã")},
- {24, 233, _T("Ñàõà (ßêóòèÿ)")},
- {24, 232, _T("Ïðèìîðñêèé êðàé")},
- {24, 235, _T("Õàáàðîâñêèé êðàé")},
- {24, 227, _T("Àìóðñêàÿ îáë.")},
- {24, 229, _T("Êàì÷àòñêàÿ îáë.")},
- {24, 231, _T("Ìàãàäàíñêàÿ îáë.")},
- {24, 234, _T("Ñàõàëèíñêàÿ îáë.")},
- {24, 228, _T("Åâðåéñêàÿ ÀÎ")},
- {24, 230, _T("Êîðÿêñêèé ÀÎ")},
- {24, 236, _T("×óêîòñêèé ÀÎ")},
- {24, 237, _T("Áàøêîðòîñòàí")},
- {24, 240, _T("Ìàðèé-Ýë")},
- {24, 241, _T("Ìîðäîâèÿ")},
- {24, 248, _T("Òàòàðñòàí")},
- {24, 249, _T("Óäìóðòèÿ")},
- {24, 251, _T("×óâàøèÿ")},
- {24, 238, _T("Êèðîâñêàÿ îáë.")},
- {24, 242, _T("Íèæåãîðîäñêàÿ îáë.")},
- {24, 243, _T("Îðåíáóðãñêàÿ îáë.")},
- {24, 244, _T("Ïåíçåíñêàÿ îáë.")},
- {24, 245, _T("Ïåðìñêàÿ îáë.")},
- {24, 246, _T("Ñàìàðñêàÿ îáë.")},
- {24, 247, _T("Ñàðàòîâñêàÿ îáë.")},
- {24, 250, _T("Óëüÿíîâñêàÿ îáë.")},
- {24, 239, _T("Êîìè-Ïåðìÿöêèé ÀÎ")},
- {24, 255, _T("Êàðåëèÿ")},
- {24, 256, _T("Êîìè")},
- {24, 252, _T("Àðõàíãåëüñêàÿ îáë.")},
- {24, 253, _T("Âîëîãîäñêàÿ îáë.")},
- {24, 254, _T("Êàëèíèíãðàäñêàÿ îáë.")},
- {24, 257, _T("Ëåíèíãðàäñêàÿ îáë.")},
- {24, 258, _T("Ìóðìàíñêàÿ îáë.")},
- {24, 260, _T("Íîâãîðîäñêàÿ îáë.")},
- {24, 261, _T("Ïñêîâñêàÿ îáë.")},
- {24, 259, _T("Íåíåöêèé ÀÎ")},
- {24, 265, _T("Áóðÿòèÿ")},
- {24, 263, _T("Ðåñïóáëèêà Àëòàé")},
- {24, 273, _T("Òûâà")},
- {24, 275, _T("Õàêàñèÿ")},
- {24, 264, _T("Àëòàéñêèé êðàé")},
- {24, 268, _T("Êðàñíîÿðñêèé êðàé")},
- {24, 266, _T("Èðêóòñêàÿ îáë.")},
- {24, 267, _T("Êåìåðîâñêàÿ îáë.")},
- {24, 269, _T("Íîâîñèáèðñêàÿ îáë.")},
- {24, 270, _T("Îìñêàÿ îáë.")},
- {24, 272, _T("Òîìñêàÿ îáë.")},
- {24, 276, _T("×èòèíñêàÿ îáë.")},
- {24, 262, _T("Àãèíñêèé Áóðÿòñêèé ÀÎ")},
- {24, 271, _T("Òàéìûðñêèé ÀÎ")},
- {24, 274, _T("Óñòü-Îðäûíñêèé Áóðÿòñêèé ÀÎ")},
- {24, 277, _T("Ýâåíêèéñêèé ÀÎ")},
- {24, 278, _T("Êóðãàíñêàÿ îáë.")},
- {24, 279, _T("Ñâåðäëîâñêàÿ îáë.")},
- {24, 280, _T("Òþìåíñêàÿ îáë.")},
- {24, 282, _T("×åëÿáèíñêàÿ îáë.")},
- {24, 281, _T("Õàíòû-Ìàíñèéñêèé ÀÎ - Þãðà")},
- {24, 283, _T("ßìàëî-Íåíåöêèé ÀÎ")},
- {24, 284, _T("Áåëãîðîäñêàÿ îáë.")},
- {24, 285, _T("Áðÿíñêàÿ îáë.")},
- {24, 286, _T("Âëàäèìèðñêàÿ îáë.")},
- {24, 287, _T("Âîðîíåæñêàÿ îáë.")},
- {24, 288, _T("Èâàíîâñêàÿ îáë.")},
- {24, 289, _T("Êàëóæñêàÿ îáë.")},
- {24, 290, _T("Êîñòðîìñêàÿ îáë.")},
- {24, 291, _T("Êóðñêàÿ îáë.")},
- {24, 292, _T("Ëèïåöêàÿ îáë.")},
- {24, 293, _T("Ìîñêîâñêàÿ îáë.")},
- {24, 294, _T("Îðëîâñêàÿ îáë.")},
- {24, 295, _T("Ðÿçàíñêàÿ îáë.")},
- {24, 296, _T("Ñìîëåíñêàÿ îáë.")},
- {24, 297, _T("Òàìáîâñêàÿ îáë.")},
- {24, 298, _T("Òâåðñêàÿ îáë.")},
- {24, 299, _T("Òóëüñêàÿ îáë.")},
- {24, 300, _T("ßðîñëàâñêàÿ îáë.")},
- {24, 301, _T("Àäûãåÿ")},
- {24, 304, _T("Äàãåñòàí")},
- {24, 305, _T("Èíãóøåòèÿ")},
- {24, 306, _T("Êàáàðäèíî-Áàëêàðèÿ")},
- {24, 307, _T("Êàëìûêèÿ")},
- {24, 308, _T("Êàðà÷àåâî-×åðêåññèÿ")},
- {24, 311, _T("Ñåâåðíàÿ Îñåòèÿ - Àëàíèÿ")},
- {24, 313, _T("×å÷íÿ")},
- {24, 309, _T("Êðàñíîäàðñêèé êðàé")},
- {24, 312, _T("Ñòàâðîïîëüñêèé êðàé")},
- {24, 302, _T("Àñòðàõàíñêàÿ îáë.")},
- {24, 303, _T("Âîëãîãðàäñêàÿ îáë.")},
- {24, 310, _T("Ðîñòîâñêàÿ îáë.")},
- {81, 1055, _T("Áàêó")},
- {81, 1058, _T("Ãÿíäæà")},
- {81, 1056, _T("Íàõè÷åâàíü")},
- {81, 1057, _T("Õàíêåíäè")},
- {81, 3153, _T("Øåêè")},
+ {24, 25, L"Ìîñêâà"},
+ {24, 226, L"Ñàíêò-Ïåòåðáóðã"},
+ {24, 233, L"Ñàõà (ßêóòèÿ)"},
+ {24, 232, L"Ïðèìîðñêèé êðàé"},
+ {24, 235, L"Õàáàðîâñêèé êðàé"},
+ {24, 227, L"Àìóðñêàÿ îáë."},
+ {24, 229, L"Êàì÷àòñêàÿ îáë."},
+ {24, 231, L"Ìàãàäàíñêàÿ îáë."},
+ {24, 234, L"Ñàõàëèíñêàÿ îáë."},
+ {24, 228, L"Åâðåéñêàÿ ÀÎ"},
+ {24, 230, L"Êîðÿêñêèé ÀÎ"},
+ {24, 236, L"×óêîòñêèé ÀÎ"},
+ {24, 237, L"Áàøêîðòîñòàí"},
+ {24, 240, L"Ìàðèé-Ýë"},
+ {24, 241, L"Ìîðäîâèÿ"},
+ {24, 248, L"Òàòàðñòàí"},
+ {24, 249, L"Óäìóðòèÿ"},
+ {24, 251, L"×óâàøèÿ"},
+ {24, 238, L"Êèðîâñêàÿ îáë."},
+ {24, 242, L"Íèæåãîðîäñêàÿ îáë."},
+ {24, 243, L"Îðåíáóðãñêàÿ îáë."},
+ {24, 244, L"Ïåíçåíñêàÿ îáë."},
+ {24, 245, L"Ïåðìñêàÿ îáë."},
+ {24, 246, L"Ñàìàðñêàÿ îáë."},
+ {24, 247, L"Ñàðàòîâñêàÿ îáë."},
+ {24, 250, L"Óëüÿíîâñêàÿ îáë."},
+ {24, 239, L"Êîìè-Ïåðìÿöêèé ÀÎ"},
+ {24, 255, L"Êàðåëèÿ"},
+ {24, 256, L"Êîìè"},
+ {24, 252, L"Àðõàíãåëüñêàÿ îáë."},
+ {24, 253, L"Âîëîãîäñêàÿ îáë."},
+ {24, 254, L"Êàëèíèíãðàäñêàÿ îáë."},
+ {24, 257, L"Ëåíèíãðàäñêàÿ îáë."},
+ {24, 258, L"Ìóðìàíñêàÿ îáë."},
+ {24, 260, L"Íîâãîðîäñêàÿ îáë."},
+ {24, 261, L"Ïñêîâñêàÿ îáë."},
+ {24, 259, L"Íåíåöêèé ÀÎ"},
+ {24, 265, L"Áóðÿòèÿ"},
+ {24, 263, L"Ðåñïóáëèêà Àëòàé"},
+ {24, 273, L"Òûâà"},
+ {24, 275, L"Õàêàñèÿ"},
+ {24, 264, L"Àëòàéñêèé êðàé"},
+ {24, 268, L"Êðàñíîÿðñêèé êðàé"},
+ {24, 266, L"Èðêóòñêàÿ îáë."},
+ {24, 267, L"Êåìåðîâñêàÿ îáë."},
+ {24, 269, L"Íîâîñèáèðñêàÿ îáë."},
+ {24, 270, L"Îìñêàÿ îáë."},
+ {24, 272, L"Òîìñêàÿ îáë."},
+ {24, 276, L"×èòèíñêàÿ îáë."},
+ {24, 262, L"Àãèíñêèé Áóðÿòñêèé ÀÎ"},
+ {24, 271, L"Òàéìûðñêèé ÀÎ"},
+ {24, 274, L"Óñòü-Îðäûíñêèé Áóðÿòñêèé ÀÎ"},
+ {24, 277, L"Ýâåíêèéñêèé ÀÎ"},
+ {24, 278, L"Êóðãàíñêàÿ îáë."},
+ {24, 279, L"Ñâåðäëîâñêàÿ îáë."},
+ {24, 280, L"Òþìåíñêàÿ îáë."},
+ {24, 282, L"×åëÿáèíñêàÿ îáë."},
+ {24, 281, L"Õàíòû-Ìàíñèéñêèé ÀÎ - Þãðà"},
+ {24, 283, L"ßìàëî-Íåíåöêèé ÀÎ"},
+ {24, 284, L"Áåëãîðîäñêàÿ îáë."},
+ {24, 285, L"Áðÿíñêàÿ îáë."},
+ {24, 286, L"Âëàäèìèðñêàÿ îáë."},
+ {24, 287, L"Âîðîíåæñêàÿ îáë."},
+ {24, 288, L"Èâàíîâñêàÿ îáë."},
+ {24, 289, L"Êàëóæñêàÿ îáë."},
+ {24, 290, L"Êîñòðîìñêàÿ îáë."},
+ {24, 291, L"Êóðñêàÿ îáë."},
+ {24, 292, L"Ëèïåöêàÿ îáë."},
+ {24, 293, L"Ìîñêîâñêàÿ îáë."},
+ {24, 294, L"Îðëîâñêàÿ îáë."},
+ {24, 295, L"Ðÿçàíñêàÿ îáë."},
+ {24, 296, L"Ñìîëåíñêàÿ îáë."},
+ {24, 297, L"Òàìáîâñêàÿ îáë."},
+ {24, 298, L"Òâåðñêàÿ îáë."},
+ {24, 299, L"Òóëüñêàÿ îáë."},
+ {24, 300, L"ßðîñëàâñêàÿ îáë."},
+ {24, 301, L"Àäûãåÿ"},
+ {24, 304, L"Äàãåñòàí"},
+ {24, 305, L"Èíãóøåòèÿ"},
+ {24, 306, L"Êàáàðäèíî-Áàëêàðèÿ"},
+ {24, 307, L"Êàëìûêèÿ"},
+ {24, 308, L"Êàðà÷àåâî-×åðêåññèÿ"},
+ {24, 311, L"Ñåâåðíàÿ Îñåòèÿ - Àëàíèÿ"},
+ {24, 313, L"×å÷íÿ"},
+ {24, 309, L"Êðàñíîäàðñêèé êðàé"},
+ {24, 312, L"Ñòàâðîïîëüñêèé êðàé"},
+ {24, 302, L"Àñòðàõàíñêàÿ îáë."},
+ {24, 303, L"Âîëãîãðàäñêàÿ îáë."},
+ {24, 310, L"Ðîñòîâñêàÿ îáë."},
+ {81, 1055, L"Áàêó"},
+ {81, 1058, L"Ãÿíäæà"},
+ {81, 1056, L"Íàõè÷åâàíü"},
+ {81, 1057, L"Õàíêåíäè"},
+ {81, 3153, L"Øåêè"},
{81, 2291, lpwszOther},
- {82, 2932, _T("Àáîâÿí")},
- {82, 1060, _T("Àøòàðàê")},
- {82, 3084, _T("Âàíàäçîð")},
- {82, 3011, _T("Ãþìðè")},
- {82, 3306, _T("Äèëèæàí")},
- {82, 1059, _T("Åðåâàí")},
- {82, 3145, _T("Õàíêåíäè")},
+ {82, 2932, L"Àáîâÿí"},
+ {82, 1060, L"Àøòàðàê"},
+ {82, 3084, L"Âàíàäçîð"},
+ {82, 3011, L"Ãþìðè"},
+ {82, 3306, L"Äèëèæàí"},
+ {82, 1059, L"Åðåâàí"},
+ {82, 3145, L"Õàíêåíäè"},
{82, 2292, lpwszOther},
- {97, 1061, _T("Êàáóë")},
+ {97, 1061, L"Êàáóë"},
{97, 2293, lpwszOther},
- {96, 1062, _T("Äàêêà")},
+ {96, 1062, L"Äàêêà"},
{96, 2294, lpwszOther},
- {99, 1063, _T("Ìàíàìà")},
+ {99, 1063, L"Ìàíàìà"},
{99, 2295, lpwszOther},
- {100, 1064, _T("Áàíäàð-Ñåðè-Áåãàâàí")},
+ {100, 1064, L"Áàíäàð-Ñåðè-Áåãàâàí"},
{100, 2296, lpwszOther},
- {101, 1065, _T("Òõèìïõó")},
+ {101, 1065, L"Òõèìïõó"},
{101, 2297, lpwszOther},
- {102, 1066, _T("Õàíîé")},
+ {102, 1066, L"Õàíîé"},
{102, 2298, lpwszOther},
- {83, 1067, _T("Áàòóìè")},
- {83, 3158, _T("Áîðæîìè")},
- {83, 1068, _T("Ïîòè")},
- {83, 3129, _T("Ðóñòàâè")},
- {83, 1069, _T("Ñóõóìè")},
- {83, 1070, _T("Òáèëèñè")},
+ {83, 1067, L"Áàòóìè"},
+ {83, 3158, L"Áîðæîìè"},
+ {83, 1068, L"Ïîòè"},
+ {83, 3129, L"Ðóñòàâè"},
+ {83, 1069, L"Ñóõóìè"},
+ {83, 1070, L"Òáèëèñè"},
{83, 2299, lpwszOther},
- {86, 3345, _T("Àðèýëü")},
- {86, 1071, _T("Àôóëà")},
- {86, 2992, _T("Àøäîä")},
- {86, 3175, _T("Àøêåëîí")},
- {86, 3363, _T("Áàò-ßì")},
- {86, 2884, _T("Áååð-ßêîâ")},
- {86, 3243, _T("Áåéò-Øåìåø")},
- {86, 1074, _T("Áåýð-Øåâà")},
- {86, 3348, _T("Ãåðöåëèÿ")},
- {86, 3241, _T("Äèìîíà")},
- {86, 1075, _T("Èåðóñàëèì")},
- {86, 3350, _T("Éîêíåàì-Èëëèò")},
- {86, 2982, _T("Êàðìèýëü")},
- {86, 2971, _T("Êôàð-Ñàáà")},
- {86, 3136, _T("Íàçàðåò")},
- {86, 1080, _T("Íàòàíèÿ")},
- {86, 3303, _T("Îôàêèì")},
- {86, 3050, _T("Ðààíàíà")},
- {86, 3151, _T("Ðàìàò Ãàí")},
- {86, 3141, _T("Ðåõîâîò")},
- {86, 3012, _T("Ðèøîí ëå Öèîí")},
- {86, 1081, _T("Òâåðèÿ")},
- {86, 1077, _T("Òåëü-Àâèâ")},
- {86, 1079, _T("Õàäåðà")},
- {86, 1078, _T("Õàéôà")},
- {86, 1076, _T("Õåâðîí")},
- {86, 2929, _T("Öôàò")},
- {86, 2928, _T("Ýéëàò")},
+ {86, 3345, L"Àðèýëü"},
+ {86, 1071, L"Àôóëà"},
+ {86, 2992, L"Àøäîä"},
+ {86, 3175, L"Àøêåëîí"},
+ {86, 3363, L"Áàò-ßì"},
+ {86, 2884, L"Áååð-ßêîâ"},
+ {86, 3243, L"Áåéò-Øåìåø"},
+ {86, 1074, L"Áåýð-Øåâà"},
+ {86, 3348, L"Ãåðöåëèÿ"},
+ {86, 3241, L"Äèìîíà"},
+ {86, 1075, L"Èåðóñàëèì"},
+ {86, 3350, L"Éîêíåàì-Èëëèò"},
+ {86, 2982, L"Êàðìèýëü"},
+ {86, 2971, L"Êôàð-Ñàáà"},
+ {86, 3136, L"Íàçàðåò"},
+ {86, 1080, L"Íàòàíèÿ"},
+ {86, 3303, L"Îôàêèì"},
+ {86, 3050, L"Ðààíàíà"},
+ {86, 3151, L"Ðàìàò Ãàí"},
+ {86, 3141, L"Ðåõîâîò"},
+ {86, 3012, L"Ðèøîí ëå Öèîí"},
+ {86, 1081, L"Òâåðèÿ"},
+ {86, 1077, L"Òåëü-Àâèâ"},
+ {86, 1079, L"Õàäåðà"},
+ {86, 1078, L"Õàéôà"},
+ {86, 1076, L"Õåâðîí"},
+ {86, 2929, L"Öôàò"},
+ {86, 2928, L"Ýéëàò"},
{86, 2300, lpwszOther},
- {95, 3315, _T("Áàíãàëîð")},
- {95, 1082, _T("Äåëè")},
- {95, 1083, _T("Äæàéïóð")},
- {95, 3144, _T("Êàëüêóòòà")},
- {95, 3025, _T("Ìóìáàè")},
- {95, 3277, _T("Ïàíàäæè")},
- {95, 1084, _T("×åííàè")},
+ {95, 3315, L"Áàíãàëîð"},
+ {95, 1082, L"Äåëè"},
+ {95, 1083, L"Äæàéïóð"},
+ {95, 3144, L"Êàëüêóòòà"},
+ {95, 3025, L"Ìóìáàè"},
+ {95, 3277, L"Ïàíàäæè"},
+ {95, 1084, L"×åííàè"},
{95, 2301, lpwszOther},
- {103, 1085, _T("Äæàêàðòà")},
+ {103, 1085, L"Äæàêàðòà"},
{103, 2302, lpwszOther},
- {79, 1086, _T("Àììàí")},
+ {79, 1086, L"Àììàí"},
{79, 2303, lpwszOther},
- {85, 1087, _T("Áàãäàä")},
+ {85, 1087, L"Áàãäàä"},
{85, 2304, lpwszOther},
- {87, 1088, _T("Òåãåðàí")},
+ {87, 1088, L"Òåãåðàí"},
{87, 2305, lpwszOther},
- {104, 1089, _T("Ñàíà")},
+ {104, 1089, L"Ñàíà"},
{104, 2306, lpwszOther},
- {84, 1090, _T("Àêòàó")},
- {84, 1091, _T("Àêòþáèíñê")},
- {84, 1092, _T("Àëìà-Àòà")},
- {84, 3242, _T("Àðøàëû")},
- {84, 1093, _T("Àñòàíà")},
- {84, 1094, _T("Àòûðàó (Ãóðüåâ)")},
- {84, 1095, _T("Áàéêîíóð")},
- {84, 3245, _T("Áàëõàø")},
- {84, 3083, _T("Æåçêàçãàí")},
- {84, 1096, _T("Êàï÷àãàé")},
- {84, 1097, _T("Êàðàãàíäà")},
- {84, 1098, _T("Êîêøåòàó")},
- {84, 1099, _T("Êóñòàíàé")},
- {84, 2868, _T("Ëèñàêîâñê")},
- {84, 1100, _T("Ïàâëîäàð")},
- {84, 1101, _T("Ïåòðîïàâëîâñê (Ñåâ.-Êàç. îáë.)")},
- {84, 1102, _T("Ðóäíûé")},
- {84, 1103, _T("Ñåìèïàëàòèíñê")},
- {84, 1104, _T("Ñòåïíîãîðñê")},
- {84, 3166, _T("Òàëãàð")},
- {84, 1105, _T("Òàëäû-Êóðãàí")},
- {84, 2927, _T("Òàðàç")},
- {84, 1106, _T("Òåìèðòàó")},
- {84, 1107, _T("Óðàëüñê")},
- {84, 1108, _T("Óñòü-Êàìåíîãîðñê")},
- {84, 1109, _T("×èìêåíò")},
- {84, 1110, _T("Ýêèáàñòóç")},
+ {84, 1090, L"Àêòàó"},
+ {84, 1091, L"Àêòþáèíñê"},
+ {84, 1092, L"Àëìà-Àòà"},
+ {84, 3242, L"Àðøàëû"},
+ {84, 1093, L"Àñòàíà"},
+ {84, 1094, L"Àòûðàó (Ãóðüåâ)"},
+ {84, 1095, L"Áàéêîíóð"},
+ {84, 3245, L"Áàëõàø"},
+ {84, 3083, L"Æåçêàçãàí"},
+ {84, 1096, L"Êàï÷àãàé"},
+ {84, 1097, L"Êàðàãàíäà"},
+ {84, 1098, L"Êîêøåòàó"},
+ {84, 1099, L"Êóñòàíàé"},
+ {84, 2868, L"Ëèñàêîâñê"},
+ {84, 1100, L"Ïàâëîäàð"},
+ {84, 1101, L"Ïåòðîïàâëîâñê (Ñåâ.-Êàç. îáë.)"},
+ {84, 1102, L"Ðóäíûé"},
+ {84, 1103, L"Ñåìèïàëàòèíñê"},
+ {84, 1104, L"Ñòåïíîãîðñê"},
+ {84, 3166, L"Òàëãàð"},
+ {84, 1105, L"Òàëäû-Êóðãàí"},
+ {84, 2927, L"Òàðàç"},
+ {84, 1106, L"Òåìèðòàó"},
+ {84, 1107, L"Óðàëüñê"},
+ {84, 1108, L"Óñòü-Êàìåíîãîðñê"},
+ {84, 1109, L"×èìêåíò"},
+ {84, 1110, L"Ýêèáàñòóç"},
{84, 2307, lpwszOther},
- {105, 1111, _T("Ïíîìïåíü")},
+ {105, 1111, L"Ïíîìïåíü"},
{105, 2308, lpwszOther},
- {106, 1112, _T("Äîõà")},
+ {106, 1112, L"Äîõà"},
{106, 2309, lpwszOther},
- {107, 1113, _T("Ëàðíàêà")},
- {107, 1114, _T("Ëèìàññîë")},
- {107, 1115, _T("Íèêîñèÿ")},
- {107, 2954, _T("Ïàôîñ")},
+ {107, 1113, L"Ëàðíàêà"},
+ {107, 1114, L"Ëèìàññîë"},
+ {107, 1115, L"Íèêîñèÿ"},
+ {107, 2954, L"Ïàôîñ"},
{107, 2310, lpwszOther},
- {92, 1116, _T("Áèøêåê")},
- {92, 1117, _T("Äæàëàë-Àáàä")},
- {92, 3027, _T("Êàðà-Áàëòà")},
- {92, 1118, _T("Êàðàêîë")},
- {92, 1119, _T("Îø")},
- {92, 1120, _T("Òàëàñ")},
- {92, 2933, _T("Õàéäàðêåí")},
+ {92, 1116, L"Áèøêåê"},
+ {92, 1117, L"Äæàëàë-Àáàä"},
+ {92, 3027, L"Êàðà-Áàëòà"},
+ {92, 1118, L"Êàðàêîë"},
+ {92, 1119, L"Îø"},
+ {92, 1120, L"Òàëàñ"},
+ {92, 2933, L"Õàéäàðêåí"},
{92, 2311, lpwszOther},
- {76, 3214, _T("Àîìûíü (Ìàêàî)")},
- {76, 1121, _T("Ãîíêîíã")},
- {76, 2869, _T("Ãóàí÷æîó")},
- {76, 3262, _T("Äàëÿíü")},
- {76, 1122, _T("Ïåêèí")},
- {76, 1123, _T("Õàðáèí")},
- {76, 1124, _T("Øàíõàé")},
- {76, 3043, _T("Øåíüÿí")},
+ {76, 3214, L"Àîìûíü (Ìàêàî)"},
+ {76, 1121, L"Ãîíêîíã"},
+ {76, 2869, L"Ãóàí÷æîó"},
+ {76, 3262, L"Äàëÿíü"},
+ {76, 1122, L"Ïåêèí"},
+ {76, 1123, L"Õàðáèí"},
+ {76, 1124, L"Øàíõàé"},
+ {76, 3043, L"Øåíüÿí"},
{76, 2312, lpwszOther},
- {29, 1125, _T("Ïõåíüÿí")},
+ {29, 1125, L"Ïõåíüÿí"},
{29, 2313, lpwszOther},
- {108, 1126, _T("Ñåóë")},
- {108, 3240, _T("Òåéäæîí")},
+ {108, 1126, L"Ñåóë"},
+ {108, 3240, L"Òåéäæîí"},
{108, 2314, lpwszOther},
- {88, 1127, _T("Ýëü-Êóâåéò")},
+ {88, 1127, L"Ýëü-Êóâåéò"},
{88, 2315, lpwszOther},
- {109, 1128, _T("Âüåíòüÿí")},
+ {109, 1128, L"Âüåíòüÿí"},
{109, 2316, lpwszOther},
- {110, 1129, _T("Áåéðóò")},
+ {110, 1129, L"Áåéðóò"},
{110, 2317, lpwszOther},
- {111, 1130, _T("Äæîõîð-Áàðó")},
- {111, 1131, _T("Êóàëà-Ëóìïóð")},
+ {111, 1130, L"Äæîõîð-Áàðó"},
+ {111, 1131, L"Êóàëà-Ëóìïóð"},
{111, 2318, lpwszOther},
- {112, 1132, _T("Ìàëå")},
+ {112, 1132, L"Ìàëå"},
{112, 2319, lpwszOther},
- {113, 1133, _T("Óëàí-Áàòîð")},
- {113, 1134, _T("Ýðäýíýò")},
+ {113, 1133, L"Óëàí-Áàòîð"},
+ {113, 1134, L"Ýðäýíýò"},
{113, 2320, lpwszOther},
- {114, 1135, _T("ßíãîí")},
+ {114, 1135, L"ßíãîí"},
{114, 2321, lpwszOther},
- {115, 1136, _T("Êàòìàíäó")},
+ {115, 1136, L"Êàòìàíäó"},
{115, 2322, lpwszOther},
- {116, 1137, _T("Àáó-Äàáè")},
- {116, 1138, _T("Äóáàé")},
- {116, 1139, _T("Øàðäæà")},
+ {116, 1137, L"Àáó-Äàáè"},
+ {116, 1138, L"Äóáàé"},
+ {116, 1139, L"Øàðäæà"},
{116, 2323, lpwszOther},
- {117, 1140, _T("Ìàñêàò")},
+ {117, 1140, L"Ìàñêàò"},
{117, 2324, lpwszOther},
- {122, 1141, _T("Èñëàìàáàä")},
+ {122, 1141, L"Èñëàìàáàä"},
{122, 2325, lpwszOther},
- {89, 1072, _T("Àøäîä")},
- {89, 1073, _T("Àøêåëîí")},
- {89, 1142, _T("Ãàçà")},
+ {89, 1072, L"Àøäîä"},
+ {89, 1073, L"Àøêåëîí"},
+ {89, 1142, L"Ãàçà"},
{89, 2326, lpwszOther},
- {94, 3250, _T("Ìåäèíà")},
- {94, 1143, _T("Ýð-Ðèÿä")},
+ {94, 3250, L"Ìåäèíà"},
+ {94, 1143, L"Ýð-Ðèÿä"},
{94, 2327, lpwszOther},
- {78, 1144, _T("Äàìàñê")},
+ {78, 1144, L"Äàìàñê"},
{78, 2328, lpwszOther},
- {91, 1145, _T("Äóøàíáå")},
- {91, 3307, _T("Êàéðàêêóì")},
- {91, 3308, _T("Õóäæàíä")},
+ {91, 1145, L"Äóøàíáå"},
+ {91, 3307, L"Êàéðàêêóì"},
+ {91, 3308, L"Õóäæàíä"},
{91, 2329, lpwszOther},
- {119, 1146, _T("Áàíãêîê")},
- {119, 1147, _T("Ïõóêåò")},
+ {119, 1146, L"Áàíãêîê"},
+ {119, 1147, L"Ïõóêåò"},
{119, 2330, lpwszOther},
- {120, 1148, _T("Òàéáýé")},
+ {120, 1148, L"Òàéáýé"},
{120, 2331, lpwszOther},
- {132, 1149, _T("Äèëè")},
+ {132, 1149, L"Äèëè"},
{132, 2332, lpwszOther},
- {90, 1150, _T("Àøõàáàä")},
- {90, 3079, _T("Áåçìåèí")},
+ {90, 1150, L"Àøõàáàä"},
+ {90, 3079, L"Áåçìåèí"},
{90, 2333, lpwszOther},
- {77, 1152, _T("Àíêàðà")},
- {77, 1153, _T("Àíòàëèÿ")},
- {77, 3080, _T("Áóðñà")},
- {77, 1151, _T("Ìàðìàðèñ")},
- {77, 1154, _T("Ñòàìáóë")},
- {77, 1155, _T("Òðàáçîí")},
+ {77, 1152, L"Àíêàðà"},
+ {77, 1153, L"Àíòàëèÿ"},
+ {77, 3080, L"Áóðñà"},
+ {77, 1151, L"Ìàðìàðèñ"},
+ {77, 1154, L"Ñòàìáóë"},
+ {77, 1155, L"Òðàáçîí"},
{77, 2334, lpwszOther},
- {93, 3362, _T("Àëìàëûê")},
- {93, 3137, _T("Àíäèæàí")},
- {93, 3273, _T("Àñàêà")},
- {93, 1156, _T("Àõàíãàðàí")},
- {93, 1157, _T("Áóõàðà")},
- {93, 3167, _T("Äæèçàê")},
- {93, 3347, _T("Êóíãðàä")},
- {93, 1158, _T("Íàâîè")},
- {93, 1159, _T("Íàìàíãàí")},
- {93, 1160, _T("Ñàìàðêàíä")},
- {93, 1161, _T("Òàøêåíò")},
- {93, 1162, _T("Óðãåí÷")},
- {93, 1163, _T("Ôåðãàíà")},
- {93, 1164, _T("×èð÷èê")},
+ {93, 3362, L"Àëìàëûê"},
+ {93, 3137, L"Àíäèæàí"},
+ {93, 3273, L"Àñàêà"},
+ {93, 1156, L"Àõàíãàðàí"},
+ {93, 1157, L"Áóõàðà"},
+ {93, 3167, L"Äæèçàê"},
+ {93, 3347, L"Êóíãðàä"},
+ {93, 1158, L"Íàâîè"},
+ {93, 1159, L"Íàìàíãàí"},
+ {93, 1160, L"Ñàìàðêàíä"},
+ {93, 1161, L"Òàøêåíò"},
+ {93, 1162, L"Óðãåí÷"},
+ {93, 1163, L"Ôåðãàíà"},
+ {93, 1164, L"×èð÷èê"},
{93, 2335, lpwszOther},
- {121, 1165, _T("Ìàíèëà")},
- {121, 3319, _T("Ñåáó")},
+ {121, 1165, L"Ìàíèëà"},
+ {121, 3319, L"Ñåáó"},
{121, 2336, lpwszOther},
- {98, 1166, _T("Êîëîìáî")},
+ {98, 1166, L"Êîëîìáî"},
{98, 2337, lpwszOther},
- {75, 3176, _T("Èñåñàêè")},
- {75, 3339, _T("Êîðèÿìà")},
- {75, 1167, _T("Ñàïïîðî")},
- {75, 1168, _T("Òîêèî")},
+ {75, 3176, L"Èñåñàêè"},
+ {75, 3339, L"Êîðèÿìà"},
+ {75, 1167, L"Ñàïïîðî"},
+ {75, 1168, L"Òîêèî"},
{75, 2338, lpwszOther},
- {123, 1914, _T("Àäåëàèäà")},
- {123, 2957, _T("Áëýê Ðîê")},
- {123, 1915, _T("Áðèñáåí")},
- {123, 3331, _T("Ãîðîêàí")},
- {123, 1916, _T("Êàíáåððà")},
- {123, 3001, _T("Ëèäêîìá")},
- {123, 1917, _T("Ìåëüáóðí")},
- {123, 3217, _T("Íîðôîëê")},
- {123, 3064, _T("Ïåðò")},
- {123, 3020, _T("Ñàíòà Ëþñèà")},
- {123, 1918, _T("Ñèäíåé")},
- {123, 3238, _T("Ýíåàááà")},
+ {123, 1914, L"Àäåëàèäà"},
+ {123, 2957, L"Áëýê Ðîê"},
+ {123, 1915, L"Áðèñáåí"},
+ {123, 3331, L"Ãîðîêàí"},
+ {123, 1916, L"Êàíáåððà"},
+ {123, 3001, L"Ëèäêîìá"},
+ {123, 1917, L"Ìåëüáóðí"},
+ {123, 3217, L"Íîðôîëê"},
+ {123, 3064, L"Ïåðò"},
+ {123, 3020, L"Ñàíòà Ëþñèà"},
+ {123, 1918, L"Ñèäíåé"},
+ {123, 3238, L"Ýíåàááà"},
{123, 2339, lpwszOther},
- {454, 1192, _T("Ïàãî-Ïàãî")},
+ {454, 1192, L"Ïàãî-Ïàãî"},
{454, 2366, lpwszOther},
- {124, 1919, _T("Ïîðò-Âèëà")},
+ {124, 1919, L"Ïîðò-Âèëà"},
{124, 2340, lpwszOther},
- {453, 1193, _T("Àãàíüÿ")},
+ {453, 1193, L"Àãàíüÿ"},
{453, 2368, lpwszOther},
- {126, 1921, _T("Áàèðèêè")},
+ {126, 1921, L"Áàèðèêè"},
{126, 2342, lpwszOther},
- {127, 1922, _T("Ìàäæóðî")},
+ {127, 1922, L"Ìàäæóðî"},
{127, 2343, lpwszOther},
- {128, 1923, _T("Ïàëèêèð")},
+ {128, 1923, L"Ïàëèêèð"},
{128, 2344, lpwszOther},
- {129, 1924, _T("ßðåí")},
+ {129, 1924, L"ßðåí"},
{129, 2345, lpwszOther},
- {130, 1925, _T("Âåëëèíãòîí")},
- {130, 1926, _T("Ãàìèëüòîí")},
- {130, 1928, _T("Äàíèäèí")},
- {130, 1929, _T("Êðàéñò÷åð÷")},
- {130, 3235, _T("Êðîìâåëü")},
- {130, 1927, _T("Îêëåíä")},
- {130, 3323, _T("Òàóðàíãà")},
+ {130, 1925, L"Âåëëèíãòîí"},
+ {130, 1926, L"Ãàìèëüòîí"},
+ {130, 1928, L"Äàíèäèí"},
+ {130, 1929, L"Êðàéñò÷åð÷"},
+ {130, 3235, L"Êðîìâåëü"},
+ {130, 1927, L"Îêëåíä"},
+ {130, 3323, L"Òàóðàíãà"},
{130, 2346, lpwszOther},
- {131, 1930, _T("Êîðîð")},
+ {131, 1930, L"Êîðîð"},
{131, 2347, lpwszOther},
- {133, 1931, _T("Ïîðò-Ìîðñáè")},
+ {133, 1931, L"Ïîðò-Ìîðñáè"},
{133, 2348, lpwszOther},
- {125, 1920, _T("Àïèà")},
+ {125, 1920, L"Àïèà"},
{125, 2341, lpwszOther},
- {134, 1932, _T("Õîíèàðà")},
+ {134, 1932, L"Õîíèàðà"},
{134, 2349, lpwszOther},
- {135, 1933, _T("Íóêóàëîôà")},
+ {135, 1933, L"Íóêóàëîôà"},
{135, 2350, lpwszOther},
- {136, 1934, _T("Ôóíàôóòè")},
+ {136, 1934, L"Ôóíàôóòè"},
{136, 2351, lpwszOther},
- {137, 1935, _T("Ñóâà")},
+ {137, 1935, L"Ñóâà"},
{137, 2352, lpwszOther},
- {138, 3055, _T("Áàðëèíãòîí")},
- {138, 3049, _T("Áðîññàðä")},
- {138, 3330, _T("Áóðíàáè")},
- {138, 1169, _T("Âàíêóâåð")},
- {138, 3106, _T("Âàòåðëîî")},
- {138, 1170, _T("Âèííèïåã")},
- {138, 1171, _T("Ãàëèôàêñ")},
- {138, 1172, _T("Ãàìèëüòîí")},
- {138, 3365, _T("Äåíâåð")},
- {138, 1173, _T("Êàëãàðè")},
- {138, 3104, _T("Êàìëóïñ")},
- {138, 3366, _T("Êàííèíãòîí")},
- {138, 1174, _T("Êâåáåê")},
- {138, 2964, _T("Êèíãñòîí")},
- {138, 3113, _T("Êîêâèòëàì")},
- {138, 1175, _T("Ìîíðåàëü")},
- {138, 2920, _T("Íèàãàðà-Ôîëñ")},
- {138, 2889, _T("Íîðä-Éîðê")},
- {138, 1176, _T("Îòòàâà")},
- {138, 2903, _T("Ïîðò Àëáåðíè")},
- {138, 1177, _T("Ðè÷ìîíä")},
- {138, 1178, _T("Òèììèíñ")},
- {138, 2946, _T("Òîðíõèëë")},
- {138, 1179, _T("Òîðîíòî")},
- {138, 1180, _T("Ýäìîíòîí")},
+ {138, 3055, L"Áàðëèíãòîí"},
+ {138, 3049, L"Áðîññàðä"},
+ {138, 3330, L"Áóðíàáè"},
+ {138, 1169, L"Âàíêóâåð"},
+ {138, 3106, L"Âàòåðëîî"},
+ {138, 1170, L"Âèííèïåã"},
+ {138, 1171, L"Ãàëèôàêñ"},
+ {138, 1172, L"Ãàìèëüòîí"},
+ {138, 3365, L"Äåíâåð"},
+ {138, 1173, L"Êàëãàðè"},
+ {138, 3104, L"Êàìëóïñ"},
+ {138, 3366, L"Êàííèíãòîí"},
+ {138, 1174, L"Êâåáåê"},
+ {138, 2964, L"Êèíãñòîí"},
+ {138, 3113, L"Êîêâèòëàì"},
+ {138, 1175, L"Ìîíðåàëü"},
+ {138, 2920, L"Íèàãàðà-Ôîëñ"},
+ {138, 2889, L"Íîðä-Éîðê"},
+ {138, 1176, L"Îòòàâà"},
+ {138, 2903, L"Ïîðò Àëáåðíè"},
+ {138, 1177, L"Ðè÷ìîíä"},
+ {138, 1178, L"Òèììèíñ"},
+ {138, 2946, L"Òîðíõèëë"},
+ {138, 1179, L"Òîðîíòî"},
+ {138, 1180, L"Ýäìîíòîí"},
{138, 2353, lpwszOther},
- {139, 407, _T("Âàøèíãòîí")},
- {139, 426, _T("Àéäàõî")},
- {139, 378, _T("Àéîâà")},
- {139, 412, _T("Àëàáàìà")},
- {139, 446, _T("Àëÿñêà")},
- {139, 434, _T("Àðèçîíà")},
- {139, 416, _T("Àðêàíçàñ")},
- {139, 428, _T("Âàéîìèíã")},
- {139, 440, _T("Âàøèíãòîí")},
- {139, 352, _T("Âåðìîíò")},
- {139, 394, _T("Âèðãèíèÿ")},
- {139, 374, _T("Âèñêîíñèí")},
- {139, 448, _T("Ãàâàéè")},
- {139, 390, _T("Äåëàâåð")},
- {139, 402, _T("Äæîðäæèÿ")},
- {139, 396, _T("Çàïàäíàÿ Âèðãèíèÿ")},
- {139, 370, _T("Èëëèíîéñ")},
- {139, 368, _T("Èíäèàíà")},
- {139, 444, _T("Êàëèôîðíèÿ")},
- {139, 388, _T("Êàíçàñ")},
- {139, 408, _T("Êåíòóêêè")},
- {139, 430, _T("Êîëîðàäî")},
- {139, 358, _T("Êîííåêòèêóò")},
- {139, 418, _T("Ëóèçèàíà")},
- {139, 354, _T("Ìàññà÷óñåòñ")},
- {139, 376, _T("Ìèííåñîòà")},
- {139, 414, _T("Ìèññèñèïè")},
- {139, 380, _T("Ìèññóðè")},
- {139, 372, _T("Ìè÷èãàí")},
- {139, 424, _T("Ìîíòàíà")},
- {139, 348, _T("Ìýí")},
- {139, 392, _T("Ìýðèëåíä")},
- {139, 386, _T("Íåáðàñêà")},
- {139, 438, _T("Íåâàäà")},
- {139, 362, _T("Íüþ-Äæåðñè")},
- {139, 360, _T("Íüþ-Éîðê")},
- {139, 432, _T("Íüþ-Ìåêñèêî")},
- {139, 350, _T("Íüþ-Õýìïøèð")},
- {139, 366, _T("Îãàéî")},
- {139, 420, _T("Îêëàõîìà")},
- {139, 442, _T("Îðåãîí")},
- {139, 364, _T("Ïåíñèëüâàíèÿ")},
- {139, 450, _T("Ïóýðòî-Ðèêî")},
- {139, 356, _T("Ðîä-Àéëåíä")},
- {139, 382, _T("Ñåâåðíàÿ Äàêîòà")},
- {139, 398, _T("Ñåâåðíàÿ Êàðîëèíà")},
- {139, 410, _T("Òåííåññè")},
- {139, 422, _T("Òåõàñ")},
- {139, 406, _T("Ôåäåðàëüíûé îêðóã Êîëóìáèÿ")},
- {139, 404, _T("Ôëîðèäà")},
- {139, 384, _T("Þæíàÿ Äàêîòà")},
- {139, 400, _T("Þæíàÿ Êàðîëèíà")},
- {139, 436, _T("Þòà")},
- {140, 1238, _T("Ñåíò-Äæîíñ")},
+ {139, 407, L"Âàøèíãòîí"},
+ {139, 426, L"Àéäàõî"},
+ {139, 378, L"Àéîâà"},
+ {139, 412, L"Àëàáàìà"},
+ {139, 446, L"Àëÿñêà"},
+ {139, 434, L"Àðèçîíà"},
+ {139, 416, L"Àðêàíçàñ"},
+ {139, 428, L"Âàéîìèíã"},
+ {139, 440, L"Âàøèíãòîí"},
+ {139, 352, L"Âåðìîíò"},
+ {139, 394, L"Âèðãèíèÿ"},
+ {139, 374, L"Âèñêîíñèí"},
+ {139, 448, L"Ãàâàéè"},
+ {139, 390, L"Äåëàâåð"},
+ {139, 402, L"Äæîðäæèÿ"},
+ {139, 396, L"Çàïàäíàÿ Âèðãèíèÿ"},
+ {139, 370, L"Èëëèíîéñ"},
+ {139, 368, L"Èíäèàíà"},
+ {139, 444, L"Êàëèôîðíèÿ"},
+ {139, 388, L"Êàíçàñ"},
+ {139, 408, L"Êåíòóêêè"},
+ {139, 430, L"Êîëîðàäî"},
+ {139, 358, L"Êîííåêòèêóò"},
+ {139, 418, L"Ëóèçèàíà"},
+ {139, 354, L"Ìàññà÷óñåòñ"},
+ {139, 376, L"Ìèííåñîòà"},
+ {139, 414, L"Ìèññèñèïè"},
+ {139, 380, L"Ìèññóðè"},
+ {139, 372, L"Ìè÷èãàí"},
+ {139, 424, L"Ìîíòàíà"},
+ {139, 348, L"Ìýí"},
+ {139, 392, L"Ìýðèëåíä"},
+ {139, 386, L"Íåáðàñêà"},
+ {139, 438, L"Íåâàäà"},
+ {139, 362, L"Íüþ-Äæåðñè"},
+ {139, 360, L"Íüþ-Éîðê"},
+ {139, 432, L"Íüþ-Ìåêñèêî"},
+ {139, 350, L"Íüþ-Õýìïøèð"},
+ {139, 366, L"Îãàéî"},
+ {139, 420, L"Îêëàõîìà"},
+ {139, 442, L"Îðåãîí"},
+ {139, 364, L"Ïåíñèëüâàíèÿ"},
+ {139, 450, L"Ïóýðòî-Ðèêî"},
+ {139, 356, L"Ðîä-Àéëåíä"},
+ {139, 382, L"Ñåâåðíàÿ Äàêîòà"},
+ {139, 398, L"Ñåâåðíàÿ Êàðîëèíà"},
+ {139, 410, L"Òåííåññè"},
+ {139, 422, L"Òåõàñ"},
+ {139, 406, L"Ôåäåðàëüíûé îêðóã Êîëóìáèÿ"},
+ {139, 404, L"Ôëîðèäà"},
+ {139, 384, L"Þæíàÿ Äàêîòà"},
+ {139, 400, L"Þæíàÿ Êàðîëèíà"},
+ {139, 436, L"Þòà"},
+ {140, 1238, L"Ñåíò-Äæîíñ"},
{140, 2442, lpwszOther},
- {141, 1239, _T("Áóýíîñ-Àéðåñ")},
+ {141, 1239, L"Áóýíîñ-Àéðåñ"},
{141, 2441, lpwszOther},
- {142, 1240, _T("Íàññàó")},
+ {142, 1240, L"Íàññàó"},
{142, 2440, lpwszOther},
- {143, 1241, _T("Áðèäæòàóí")},
+ {143, 1241, L"Áðèäæòàóí"},
{143, 2439, lpwszOther},
- {146, 1242, _T("Áåëüìîïàí")},
+ {146, 1242, L"Áåëüìîïàí"},
{146, 2438, lpwszOther},
- {144, 1243, _T("Ëà-Ïàñ")},
+ {144, 1243, L"Ëà-Ïàñ"},
{144, 2437, lpwszOther},
- {145, 1244, _T("Áðàçèëèà")},
- {145, 3094, _T("Ïàññî Ôóíäî")},
- {145, 1245, _T("Ðèî-äå-Æàíåéðî")},
- {145, 1246, _T("Ñàí-Ïàóëó")},
+ {145, 1244, L"Áðàçèëèà"},
+ {145, 3094, L"Ïàññî Ôóíäî"},
+ {145, 1245, L"Ðèî-äå-Æàíåéðî"},
+ {145, 1246, L"Ñàí-Ïàóëó"},
{145, 2436, lpwszOther},
- {147, 1247, _T("Êàðàêàñ")},
+ {147, 1247, L"Êàðàêàñ"},
{147, 2435, lpwszOther},
- {452, 1190, _T("Øàðëîòòà-Àìàëèÿ")},
+ {452, 1190, L"Øàðëîòòà-Àìàëèÿ"},
{452, 2364, lpwszOther},
- {149, 1248, _T("Ïîðò-î-Ïðåíñ")},
+ {149, 1248, L"Ïîðò-î-Ïðåíñ"},
{149, 2434, lpwszOther},
- {148, 1249, _T("Äæîðæòàóí")},
+ {148, 1249, L"Äæîðæòàóí"},
{148, 2433, lpwszOther},
- {173, 1250, _T("Ãâàòåìàëà")},
+ {173, 1250, L"Ãâàòåìàëà"},
{173, 2432, lpwszOther},
- {150, 1251, _T("Òåãóñèãàëüïà")},
+ {150, 1251, L"Òåãóñèãàëüïà"},
{150, 2431, lpwszOther},
- {151, 1252, _T("Ñåíò-Äæîðäæåñ")},
+ {151, 1252, L"Ñåíò-Äæîðäæåñ"},
{151, 2430, lpwszOther},
- {152, 1253, _T("Óìàíàê")},
+ {152, 1253, L"Óìàíàê"},
{152, 2429, lpwszOther},
- {153, 1254, _T("Ðîçî")},
+ {153, 1254, L"Ðîçî"},
{153, 2428, lpwszOther},
- {154, 1255, _T("Ñàíòî-Äîìèíãî")},
+ {154, 1255, L"Ñàíòî-Äîìèíãî"},
{154, 2427, lpwszOther},
- {155, 1256, _T("Áîãîòà")},
+ {155, 1256, L"Áîãîòà"},
{155, 2426, lpwszOther},
- {156, 1257, _T("Ñàí-Õîñå")},
+ {156, 1257, L"Ñàí-Õîñå"},
{156, 2425, lpwszOther},
- {157, 1258, _T("Ãàâàíà")},
+ {157, 1258, L"Ãàâàíà"},
{157, 2424, lpwszOther},
- {158, 1259, _T("Àêàïóëüêî")},
- {158, 1260, _T("Ìåõèêî")},
+ {158, 1259, L"Àêàïóëüêî"},
+ {158, 1260, L"Ìåõèêî"},
{158, 2423, lpwszOther},
- {159, 1261, _T("Ìàíàãóà")},
+ {159, 1261, L"Ìàíàãóà"},
{159, 2422, lpwszOther},
- {160, 1262, _T("Ïàíàìà")},
+ {160, 1262, L"Ïàíàìà"},
{160, 2421, lpwszOther},
- {161, 1263, _T("Àñóíñüîí")},
+ {161, 1263, L"Àñóíñüîí"},
{161, 2420, lpwszOther},
- {162, 1264, _T("Ëèìà")},
+ {162, 1264, L"Ëèìà"},
{162, 2419, lpwszOther},
- {163, 1265, _T("Ñàí-Ñàëüâàäîð")},
+ {163, 1265, L"Ñàí-Ñàëüâàäîð"},
{163, 2418, lpwszOther},
- {164, 1266, _T("Êèíãñòàóí")},
+ {164, 1266, L"Êèíãñòàóí"},
{164, 2417, lpwszOther},
- {165, 1267, _T("Áàñòåð")},
+ {165, 1267, L"Áàñòåð"},
{165, 2416, lpwszOther},
- {166, 1268, _T("Êàñòðè")},
+ {166, 1268, L"Êàñòðè"},
{166, 2415, lpwszOther},
- {167, 1269, _T("Ïàðàìàðèáî")},
+ {167, 1269, L"Ïàðàìàðèáî"},
{167, 2414, lpwszOther},
- {168, 1270, _T("Ïîðò-îô-Ñïåéí")},
+ {168, 1270, L"Ïîðò-îô-Ñïåéí"},
{168, 2413, lpwszOther},
- {169, 1271, _T("Ìîíòåâèäåî")},
+ {169, 1271, L"Ìîíòåâèäåî"},
{169, 2412, lpwszOther},
- {170, 1272, _T("Ñàíòüÿãî")},
+ {170, 1272, L"Ñàíòüÿãî"},
{170, 2411, lpwszOther},
- {171, 1273, _T("Ãóàÿêèëü")},
- {171, 1274, _T("Êèòî")},
+ {171, 1273, L"Ãóàÿêèëü"},
+ {171, 1274, L"Êèòî"},
{171, 2410, lpwszOther},
- {172, 1275, _T("Êèíãñòîí")},
+ {172, 1275, L"Êèíãñòîí"},
{172, 2409, lpwszOther},
- {174, 1854, _T("Àëæèð")},
+ {174, 1854, L"Àëæèð"},
{174, 2495, lpwszOther},
- {175, 1855, _T("Ëóàíäà")},
+ {175, 1855, L"Ëóàíäà"},
{175, 2494, lpwszOther},
- {176, 1856, _T("Êîòîíó")},
- {176, 1857, _T("Ïîðòî-Íîâî")},
+ {176, 1856, L"Êîòîíó"},
+ {176, 1857, L"Ïîðòî-Íîâî"},
{176, 2493, lpwszOther},
- {177, 1858, _T("Ãàáîðîíå")},
+ {177, 1858, L"Ãàáîðîíå"},
{177, 2492, lpwszOther},
- {178, 1859, _T("Óàãàäóãó")},
+ {178, 1859, L"Óàãàäóãó"},
{178, 2491, lpwszOther},
- {179, 1860, _T("Áóæóìáóðó")},
+ {179, 1860, L"Áóæóìáóðó"},
{179, 2490, lpwszOther},
- {180, 1861, _T("Ëèáðåâèëü")},
+ {180, 1861, L"Ëèáðåâèëü"},
{180, 2489, lpwszOther},
- {181, 1862, _T("Áàíæóë")},
+ {181, 1862, L"Áàíæóë"},
{181, 2488, lpwszOther},
- {182, 1863, _T("Àêêðà")},
+ {182, 1863, L"Àêêðà"},
{182, 2487, lpwszOther},
- {183, 1864, _T("Êîíàêðè")},
+ {183, 1864, L"Êîíàêðè"},
{183, 2486, lpwszOther},
- {184, 1865, _T("Áèñàó")},
+ {184, 1865, L"Áèñàó"},
{184, 2485, lpwszOther},
- {185, 1866, _T("Äæèáóòè")},
+ {185, 1866, L"Äæèáóòè"},
{185, 2484, lpwszOther},
- {186, 3312, _T("Äàõàá")},
- {186, 1867, _T("Êàèð")},
- {186, 1868, _T("Õóðãàäà")},
+ {186, 3312, L"Äàõàá"},
+ {186, 1867, L"Êàèð"},
+ {186, 1868, L"Õóðãàäà"},
{186, 2483, lpwszOther},
- {187, 1869, _T("Ëóñàêà")},
+ {187, 1869, L"Ëóñàêà"},
{187, 2482, lpwszOther},
- {23, 1870, _T("Õàðàðå")},
+ {23, 1870, L"Õàðàðå"},
{23, 2481, lpwszOther},
- {188, 1871, _T("Ïðàÿ")},
+ {188, 1871, L"Ïðàÿ"},
{188, 2480, lpwszOther},
- {189, 1872, _T("ßóíäå")},
+ {189, 1872, L"ßóíäå"},
{189, 2479, lpwszOther},
- {190, 1873, _T("Íàéðîáè")},
+ {190, 1873, L"Íàéðîáè"},
{190, 2478, lpwszOther},
- {191, 1874, _T("Ìîðîíè")},
+ {191, 1874, L"Ìîðîíè"},
{191, 2477, lpwszOther},
- {193, 1875, _T("Êèíøàñà")},
+ {193, 1875, L"Êèíøàñà"},
{193, 2476, lpwszOther},
- {192, 1876, _T("Áðàççàâèëü")},
+ {192, 1876, L"Áðàççàâèëü"},
{192, 2475, lpwszOther},
- {194, 1877, _T("ßìóñóêðî")},
+ {194, 1877, L"ßìóñóêðî"},
{194, 2474, lpwszOther},
- {195, 1878, _T("Ìàñåðó")},
+ {195, 1878, L"Ìàñåðó"},
{195, 2473, lpwszOther},
- {196, 1879, _T("Ìîíðîâèÿ")},
+ {196, 1879, L"Ìîíðîâèÿ"},
{196, 2472, lpwszOther},
- {197, 1880, _T("Òðèïîëè")},
+ {197, 1880, L"Òðèïîëè"},
{197, 2471, lpwszOther},
- {198, 1881, _T("Ïîðò-Ëóè")},
+ {198, 1881, L"Ïîðò-Ëóè"},
{198, 2470, lpwszOther},
- {199, 1882, _T("Íóàêøîò")},
+ {199, 1882, L"Íóàêøîò"},
{199, 2469, lpwszOther},
- {200, 1883, _T("Àíòàíàíàðèâó")},
+ {200, 1883, L"Àíòàíàíàðèâó"},
{200, 2468, lpwszOther},
- {201, 1884, _T("Ëèëîíãâå")},
+ {201, 1884, L"Ëèëîíãâå"},
{201, 2467, lpwszOther},
- {202, 1885, _T("Áàìàêî")},
+ {202, 1885, L"Áàìàêî"},
{202, 2466, lpwszOther},
- {203, 1886, _T("Àãàäèð")},
- {203, 1887, _T("Ðàáàò")},
+ {203, 1886, L"Àãàäèð"},
+ {203, 1887, L"Ðàáàò"},
{203, 2465, lpwszOther},
- {204, 1888, _T("Ìàïóòó")},
+ {204, 1888, L"Ìàïóòó"},
{204, 2464, lpwszOther},
- {205, 1889, _T("Âèíäõóê")},
+ {205, 1889, L"Âèíäõóê"},
{205, 2463, lpwszOther},
- {206, 1890, _T("Íèàìåé")},
+ {206, 1890, L"Íèàìåé"},
{206, 2462, lpwszOther},
- {207, 1891, _T("Àáóäæà")},
+ {207, 1891, L"Àáóäæà"},
{207, 2461, lpwszOther},
- {208, 1892, _T("Êèãàëè")},
+ {208, 1892, L"Êèãàëè"},
{208, 2460, lpwszOther},
- {209, 1893, _T("Ñàí-Òîìå")},
+ {209, 1893, L"Ñàí-Òîìå"},
{209, 2459, lpwszOther},
- {210, 1894, _T("Ìáàáàíå")},
+ {210, 1894, L"Ìáàáàíå"},
{210, 2458, lpwszOther},
- {211, 1895, _T("Âèêòîðèÿ")},
+ {211, 1895, L"Âèêòîðèÿ"},
{211, 2457, lpwszOther},
- {212, 1896, _T("Äàêàð")},
+ {212, 1896, L"Äàêàð"},
{212, 2456, lpwszOther},
- {213, 1897, _T("Ìîãàäèøî")},
+ {213, 1897, L"Ìîãàäèøî"},
{213, 2455, lpwszOther},
- {214, 1898, _T("Õàðòóì")},
+ {214, 1898, L"Õàðòóì"},
{214, 2454, lpwszOther},
- {215, 1899, _T("Ôðèòàóí")},
+ {215, 1899, L"Ôðèòàóí"},
{215, 2453, lpwszOther},
- {216, 1900, _T("Äàð-ýñ-Ñàëàì")},
- {216, 1901, _T("Äîäîìà")},
+ {216, 1900, L"Äàð-ýñ-Ñàëàì"},
+ {216, 1901, L"Äîäîìà"},
{216, 2452, lpwszOther},
- {217, 1902, _T("Ëîìå")},
+ {217, 1902, L"Ëîìå"},
{217, 2451, lpwszOther},
- {218, 1903, _T("Òóíèñ")},
+ {218, 1903, L"Òóíèñ"},
{218, 2450, lpwszOther},
- {219, 1904, _T("Êàìïàëà")},
+ {219, 1904, L"Êàìïàëà"},
{219, 2449, lpwszOther},
- {220, 1905, _T("Áàíãè")},
+ {220, 1905, L"Áàíãè"},
{220, 2448, lpwszOther},
- {222, 1906, _T("Íäæàìåíà")},
+ {222, 1906, L"Íäæàìåíà"},
{222, 2447, lpwszOther},
- {223, 1907, _T("Ìàëàáî")},
+ {223, 1907, L"Ìàëàáî"},
{223, 2446, lpwszOther},
- {221, 1908, _T("Àñìýðà")},
+ {221, 1908, L"Àñìýðà"},
{221, 2445, lpwszOther},
- {224, 1909, _T("Àääèñ-Àáåáà")},
+ {224, 1909, L"Àääèñ-Àáåáà"},
{224, 2444, lpwszOther},
- {225, 1910, _T("Äóðáàí")},
- {225, 1913, _T("Éîõàííåñáóðã")},
- {225, 1912, _T("Êåéïòàóí")},
- {225, 3033, _T("Ïàéíòàóí")},
- {225, 1911, _T("Ïðåòîðèÿ")},
+ {225, 1910, L"Äóðáàí"},
+ {225, 1913, L"Éîõàííåñáóðã"},
+ {225, 1912, L"Êåéïòàóí"},
+ {225, 3033, L"Ïàéíòàóí"},
+ {225, 1911, L"Ïðåòîðèÿ"},
{225, 2443, lpwszOther},
- {39, 314, _T("Êèåâ")},
- {39, 315, _T("Âèííèöêàÿ îáë.")},
- {39, 316, _T("Âîëûíñêàÿ îáë.")},
- {39, 317, _T("Äíåïðîïåòðîâñêàÿ îáë.")},
- {39, 318, _T("Äîíåöêàÿ îáë.")},
- {39, 319, _T("Æèòîìèðñêàÿ îáë.")},
- {39, 320, _T("Çàêàðïàòñêàÿ îáë.")},
- {39, 321, _T("Çàïîðîæñêàÿ îáë.")},
- {39, 322, _T("Èâàíî-Ôðàíêîâñêàÿ îáë.")},
- {39, 323, _T("Êèåâñêàÿ îáë.")},
- {39, 324, _T("Êèðîâîãðàäñêàÿ îáë.")},
- {39, 325, _T("Êðûì")},
- {39, 326, _T("Ëóãàíñêàÿ îáë.")},
- {39, 327, _T("Ëüâîâñêàÿ îáë.")},
- {39, 328, _T("Íèêîëàåâñêàÿ îáë.")},
- {39, 329, _T("Îäåññêàÿ îáë.")},
- {39, 330, _T("Ïîëòàâñêàÿ îáë.")},
- {39, 331, _T("Ðîâåíñêàÿ îáë.")},
- {39, 332, _T("Ñóìñêàÿ îáë.")},
- {39, 333, _T("Òåðíîïîëüñêàÿ îáë.")},
- {39, 334, _T("Õàðüêîâñêàÿ îáë.")},
- {39, 335, _T("Õåðñîíñêàÿ îáë.")},
- {39, 336, _T("Õìåëüíèöêàÿ îáë.")},
- {39, 337, _T("×åðêàññêàÿ îáë.")},
- {39, 338, _T("×åðíèãîâñêàÿ îáë.")},
- {39, 339, _T("×åðíîâèöêàÿ îáë.")},
- {40, 602, _T("Áàä Õàëë")},
- {40, 604, _T("Áðåãåíö")},
- {40, 603, _T("Âåíà")},
- {40, 608, _T("Ãðàö")},
- {40, 606, _T("Çàëüöáóðã")},
- {40, 3099, _T("Çåëü-àì-Çåå")},
- {40, 605, _T("Èíñáðóê")},
- {40, 3174, _T("Êèðõáåðã")},
- {40, 609, _T("Êëàãåíôóðò")},
- {40, 607, _T("Ëèíö")},
- {40, 610, _T("Îáäàõ")},
- {40, 611, _T("Ùòóáàéòàë")},
+ {39, 314, L"Êèåâ"},
+ {39, 315, L"Âèííèöêàÿ îáë."},
+ {39, 316, L"Âîëûíñêàÿ îáë."},
+ {39, 317, L"Äíåïðîïåòðîâñêàÿ îáë."},
+ {39, 318, L"Äîíåöêàÿ îáë."},
+ {39, 319, L"Æèòîìèðñêàÿ îáë."},
+ {39, 320, L"Çàêàðïàòñêàÿ îáë."},
+ {39, 321, L"Çàïîðîæñêàÿ îáë."},
+ {39, 322, L"Èâàíî-Ôðàíêîâñêàÿ îáë."},
+ {39, 323, L"Êèåâñêàÿ îáë."},
+ {39, 324, L"Êèðîâîãðàäñêàÿ îáë."},
+ {39, 325, L"Êðûì"},
+ {39, 326, L"Ëóãàíñêàÿ îáë."},
+ {39, 327, L"Ëüâîâñêàÿ îáë."},
+ {39, 328, L"Íèêîëàåâñêàÿ îáë."},
+ {39, 329, L"Îäåññêàÿ îáë."},
+ {39, 330, L"Ïîëòàâñêàÿ îáë."},
+ {39, 331, L"Ðîâåíñêàÿ îáë."},
+ {39, 332, L"Ñóìñêàÿ îáë."},
+ {39, 333, L"Òåðíîïîëüñêàÿ îáë."},
+ {39, 334, L"Õàðüêîâñêàÿ îáë."},
+ {39, 335, L"Õåðñîíñêàÿ îáë."},
+ {39, 336, L"Õìåëüíèöêàÿ îáë."},
+ {39, 337, L"×åðêàññêàÿ îáë."},
+ {39, 338, L"×åðíèãîâñêàÿ îáë."},
+ {39, 339, L"×åðíîâèöêàÿ îáë."},
+ {40, 602, L"Áàä Õàëë"},
+ {40, 604, L"Áðåãåíö"},
+ {40, 603, L"Âåíà"},
+ {40, 608, L"Ãðàö"},
+ {40, 606, L"Çàëüöáóðã"},
+ {40, 3099, L"Çåëü-àì-Çåå"},
+ {40, 605, L"Èíñáðóê"},
+ {40, 3174, L"Êèðõáåðã"},
+ {40, 609, L"Êëàãåíôóðò"},
+ {40, 607, L"Ëèíö"},
+ {40, 610, L"Îáäàõ"},
+ {40, 611, L"Ùòóáàéòàë"},
{40, 2541, lpwszOther},
- {32, 612, _T("Òèðàíà")},
+ {32, 612, L"Òèðàíà"},
{32, 2540, lpwszOther},
- {33, 613, _T("Àíäîððà-ëà-Âåëüÿ")},
+ {33, 613, L"Àíäîððà-ëà-Âåëüÿ"},
{33, 2539, lpwszOther},
- {340, 341, _T("Ìèíñê")},
- {340, 342, _T("Áðåñòñêàÿ îáë.")},
- {340, 343, _T("Âèòåáñêàÿ îáë.")},
- {340, 344, _T("Ãîìåëüñêàÿ îáë.")},
- {340, 345, _T("Ãðîäíåíñêàÿ îáë.")},
- {340, 346, _T("Ìèíñêàÿ îáë.")},
- {340, 347, _T("Ìîãèëåâñêàÿ îáë.")},
- {38, 760, _T("Àíòâåðïåí")},
- {38, 767, _T("Àðëîí")},
- {38, 762, _T("Áðþããå")},
- {38, 761, _T("Áðþññåëü")},
- {38, 763, _T("Ãåíò")},
- {38, 769, _T("Ëóâåí")},
- {38, 765, _T("Ëüåæ")},
- {38, 764, _T("Ìîíñ")},
- {38, 3117, _T("Ìîðòñåëü")},
- {38, 766, _T("Íàìþð")},
- {38, 768, _T("Õàññåëò")},
+ {340, 341, L"Ìèíñê"},
+ {340, 342, L"Áðåñòñêàÿ îáë."},
+ {340, 343, L"Âèòåáñêàÿ îáë."},
+ {340, 344, L"Ãîìåëüñêàÿ îáë."},
+ {340, 345, L"Ãðîäíåíñêàÿ îáë."},
+ {340, 346, L"Ìèíñêàÿ îáë."},
+ {340, 347, L"Ìîãèëåâñêàÿ îáë."},
+ {38, 760, L"Àíòâåðïåí"},
+ {38, 767, L"Àðëîí"},
+ {38, 762, L"Áðþããå"},
+ {38, 761, L"Áðþññåëü"},
+ {38, 763, L"Ãåíò"},
+ {38, 769, L"Ëóâåí"},
+ {38, 765, L"Ëüåæ"},
+ {38, 764, L"Ìîíñ"},
+ {38, 3117, L"Ìîðòñåëü"},
+ {38, 766, L"Íàìþð"},
+ {38, 768, L"Õàññåëò"},
{38, 2532, lpwszOther},
- {41, 3098, _T("Áàíñêî")},
- {41, 792, _T("Áëàãîåâãðàä")},
- {41, 770, _T("Áóðãàñ")},
- {41, 771, _T("Áÿëà")},
- {41, 773, _T("Âàðíà")},
- {41, 776, _T("Âåëèêî-Òûðíîâî")},
- {41, 788, _T("Âèäèí")},
- {41, 789, _T("Âðàöà")},
- {41, 796, _T("Ãàáðîâî")},
- {41, 777, _T("Äèìèòðîâãðàä")},
- {41, 781, _T("Êàâàðíà")},
- {41, 786, _T("Êûðäæàëè")},
- {41, 791, _T("Êþñòåíäèë")},
- {41, 793, _T("Ëàçàðäæèê")},
- {41, 795, _T("Ëîâå÷")},
- {41, 787, _T("Ìèõàéëîâãðàä")},
- {41, 790, _T("Ïåðíèê")},
- {41, 3133, _T("Ïèðäîï")},
- {41, 794, _T("Ïëåâåí")},
- {41, 782, _T("Ïëîâäèâ")},
- {41, 780, _T("Ðàçãðàä")},
- {41, 779, _T("Ðóñå")},
- {41, 774, _T("Ñèëèñòðà")},
- {41, 784, _T("Ñëèâåí")},
- {41, 772, _T("Ñîôèÿ")},
- {41, 775, _T("Òîëáóõèí")},
- {41, 3116, _T("Òûðíîâî")},
- {41, 785, _T("Õàñêîâî")},
- {41, 778, _T("Øóìåí")},
- {41, 783, _T("ßìáîë")},
+ {41, 3098, L"Áàíñêî"},
+ {41, 792, L"Áëàãîåâãðàä"},
+ {41, 770, L"Áóðãàñ"},
+ {41, 771, L"Áÿëà"},
+ {41, 773, L"Âàðíà"},
+ {41, 776, L"Âåëèêî-Òûðíîâî"},
+ {41, 788, L"Âèäèí"},
+ {41, 789, L"Âðàöà"},
+ {41, 796, L"Ãàáðîâî"},
+ {41, 777, L"Äèìèòðîâãðàä"},
+ {41, 781, L"Êàâàðíà"},
+ {41, 786, L"Êûðäæàëè"},
+ {41, 791, L"Êþñòåíäèë"},
+ {41, 793, L"Ëàçàðäæèê"},
+ {41, 795, L"Ëîâå÷"},
+ {41, 787, L"Ìèõàéëîâãðàä"},
+ {41, 790, L"Ïåðíèê"},
+ {41, 3133, L"Ïèðäîï"},
+ {41, 794, L"Ïëåâåí"},
+ {41, 782, L"Ïëîâäèâ"},
+ {41, 780, L"Ðàçãðàä"},
+ {41, 779, L"Ðóñå"},
+ {41, 774, L"Ñèëèñòðà"},
+ {41, 784, L"Ñëèâåí"},
+ {41, 772, L"Ñîôèÿ"},
+ {41, 775, L"Òîëáóõèí"},
+ {41, 3116, L"Òûðíîâî"},
+ {41, 785, L"Õàñêîâî"},
+ {41, 778, L"Øóìåí"},
+ {41, 783, L"ßìáîë"},
{41, 2531, lpwszOther},
- {42, 797, _T("Áàíÿ-Ëóêà")},
- {42, 799, _T("Çåíèöà")},
- {42, 798, _T("Ñàðàåâî")},
- {42, 800, _T("Òóçëà")},
+ {42, 797, L"Áàíÿ-Ëóêà"},
+ {42, 799, L"Çåíèöà"},
+ {42, 798, L"Ñàðàåâî"},
+ {42, 800, L"Òóçëà"},
{42, 2530, lpwszOther},
- {45, 802, _T("Àáåðäèí")},
- {45, 3075, _T("Àéñëâîðò")},
- {45, 801, _T("Àëíâèê")},
- {45, 804, _T("Áèäåôîðä")},
- {45, 803, _T("Áèðìèíãåì")},
- {45, 805, _T("Áëîêñâè÷")},
- {45, 3168, _T("Áîñòîí")},
- {45, 806, _T("Áðàéòîí")},
- {45, 807, _T("Áðåäôîðä")},
- {45, 808, _T("Áðèñòîëü")},
- {45, 809, _T("Âèëëåíõîëë")},
- {45, 3131, _T("Âîððèíãòîí")},
- {45, 810, _T("Âóäáðèäæ")},
- {45, 3342, _T("Ãèëôîðä")},
- {45, 811, _T("Ãëàçãî")},
- {45, 812, _T("Äàäëè")},
- {45, 813, _T("Äàðåì")},
- {45, 814, _T("Äóãëàñ")},
- {45, 3089, _T("Êàðäèô")},
- {45, 815, _T("Êåìáðèäæ")},
- {45, 816, _T("Êåíòåðáåðè")},
- {45, 817, _T("Ëèâåðïóëü")},
- {45, 818, _T("Ëèäñ")},
- {45, 819, _T("Ëîíäîí")},
- {45, 820, _T("Ìàí÷åñòåð")},
- {45, 2976, _T("Ìèò÷åì")},
- {45, 2988, _T("Ìýéäåíõåä")},
- {45, 821, _T("Íîòòèíãåì")},
- {45, 3088, _T("Íüþïîðò")},
- {45, 822, _T("Îêñôîðä")},
- {45, 823, _T("Ïëèìóò")},
- {45, 824, _T("Ïîðòñìóò")},
- {45, 825, _T("Ïðåñòîí")},
- {45, 3343, _T("Ðàéä")},
- {45, 2867, _T("Ðèäèíã")},
- {45, 2986, _T("Ñåíò-Àëáàíñ")},
- {45, 826, _T("Ñòàôôîðä")},
- {45, 3063, _T("Ñòîêïîðò")},
- {45, 827, _T("Óýéìóò")},
- {45, 3140, _T("×åëòåíõýì")},
- {45, 828, _T("×åñòåð")},
- {45, 829, _T("Øåôôèëä")},
- {45, 830, _T("Ýäèíáóðã")},
+ {45, 802, L"Àáåðäèí"},
+ {45, 3075, L"Àéñëâîðò"},
+ {45, 801, L"Àëíâèê"},
+ {45, 804, L"Áèäåôîðä"},
+ {45, 803, L"Áèðìèíãåì"},
+ {45, 805, L"Áëîêñâè÷"},
+ {45, 3168, L"Áîñòîí"},
+ {45, 806, L"Áðàéòîí"},
+ {45, 807, L"Áðåäôîðä"},
+ {45, 808, L"Áðèñòîëü"},
+ {45, 809, L"Âèëëåíõîëë"},
+ {45, 3131, L"Âîððèíãòîí"},
+ {45, 810, L"Âóäáðèäæ"},
+ {45, 3342, L"Ãèëôîðä"},
+ {45, 811, L"Ãëàçãî"},
+ {45, 812, L"Äàäëè"},
+ {45, 813, L"Äàðåì"},
+ {45, 814, L"Äóãëàñ"},
+ {45, 3089, L"Êàðäèô"},
+ {45, 815, L"Êåìáðèäæ"},
+ {45, 816, L"Êåíòåðáåðè"},
+ {45, 817, L"Ëèâåðïóëü"},
+ {45, 818, L"Ëèäñ"},
+ {45, 819, L"Ëîíäîí"},
+ {45, 820, L"Ìàí÷åñòåð"},
+ {45, 2976, L"Ìèò÷åì"},
+ {45, 2988, L"Ìýéäåíõåä"},
+ {45, 821, L"Íîòòèíãåì"},
+ {45, 3088, L"Íüþïîðò"},
+ {45, 822, L"Îêñôîðä"},
+ {45, 823, L"Ïëèìóò"},
+ {45, 824, L"Ïîðòñìóò"},
+ {45, 825, L"Ïðåñòîí"},
+ {45, 3343, L"Ðàéä"},
+ {45, 2867, L"Ðèäèíã"},
+ {45, 2986, L"Ñåíò-Àëáàíñ"},
+ {45, 826, L"Ñòàôôîðä"},
+ {45, 3063, L"Ñòîêïîðò"},
+ {45, 827, L"Óýéìóò"},
+ {45, 3140, L"×åëòåíõýì"},
+ {45, 828, L"×åñòåð"},
+ {45, 829, L"Øåôôèëä"},
+ {45, 830, L"Ýäèíáóðã"},
{45, 2529, lpwszOther},
- {44, 831, _T("Áóäàïåøò")},
- {44, 832, _T("Ãåäåëëå")},
- {44, 836, _T("Äåáðåöåí")},
- {44, 835, _T("Ìèøêîëüö")},
- {44, 834, _T("Ñåãåä")},
- {44, 833, _T("Øèîôîê")},
+ {44, 831, L"Áóäàïåøò"},
+ {44, 832, L"Ãåäåëëå"},
+ {44, 836, L"Äåáðåöåí"},
+ {44, 835, L"Ìèøêîëüö"},
+ {44, 834, L"Ñåãåä"},
+ {44, 833, L"Øèîôîê"},
{44, 2528, lpwszOther},
- {46, 3007, _T("Ààõåí")},
- {46, 837, _T("Àóãñáóðã")},
- {46, 838, _T("Áàäåí-Áàäåí")},
- {46, 3371, _T("Áàìáåðã")},
- {46, 839, _T("Áåðãèø-Ãëàäáàõ")},
- {46, 840, _T("Áåðëèí")},
- {46, 841, _T("Áèëåôåëüä")},
- {46, 3163, _T("Áîâåíäåí")},
- {46, 842, _T("Áîíí")},
- {46, 843, _T("Áðàäåíáóðã")},
- {46, 3015, _T("Áðàóíøâåéã")},
- {46, 844, _T("Áðåìåí")},
- {46, 2921, _T("Âàðøòàéí")},
- {46, 845, _T("Âåéìàð")},
- {46, 846, _T("Âóïïåðòàëü")},
- {46, 847, _T("Ãàìáóðã")},
- {46, 848, _T("Ãàííîâåð")},
- {46, 849, _T("Ãàðäåëåãåí")},
- {46, 3010, _T("Ãåéäåëüáåðã")},
- {46, 850, _T("Ãîòà")},
- {46, 851, _T("Äàðìøòàäò")},
- {46, 3072, _T("Äåññàó")},
- {46, 852, _T("Äåòìîëüä")},
- {46, 853, _T("Äîðòìóíä")},
- {46, 854, _T("Äðåçäåí")},
- {46, 855, _T("Äþññåëüäîðô")},
- {46, 3082, _T("Èôôåöõàéì")},
- {46, 3309, _T("Êàññåë")},
- {46, 856, _T("Êåëüí")},
- {46, 857, _T("Êèëü")},
- {46, 3138, _T("Êîáëåíö")},
- {46, 858, _T("Êðåôåëüä")},
- {46, 859, _T("Ëåéïöèã")},
- {46, 2872, _T("Ëèìáóðã")},
- {46, 2965, _T("Ëèíãåí")},
- {46, 3135, _T("Ëþáåê")},
- {46, 3156, _T("Ìàíãåéì")},
- {46, 3192, _T("Ìååðñáóðã")},
- {46, 860, _T("Ìþíñòåð")},
- {46, 861, _T("Ìþíõåí")},
- {46, 2864, _T("Íîéøòàäò")},
- {46, 862, _T("Íþðíáåðã")},
- {46, 3009, _T("Îôôåíáóðã")},
- {46, 2993, _T("Ïàäåðáîðí")},
- {46, 863, _T("Ðàâåíñáóðã")},
- {46, 864, _T("Ðåãåíñáóðã")},
- {46, 865, _T("Ðåéíåí")},
- {46, 866, _T("Ðîñòîê")},
- {46, 3191, _T("Ñààðáðþêåí")},
- {46, 2974, _T("Ñàíêò-Àâãóñòèí")},
- {46, 3127, _T("Òþðèíãåí")},
- {46, 867, _T("Ôðàéáåðã")},
- {46, 868, _T("Ôðàéáóðã")},
- {46, 869, _T("Ôðàíêôóðò-íà-Ìàéíå")},
- {46, 3373, _T("Õåìíèòö")},
- {46, 3313, _T("Õèëüäåí")},
- {46, 870, _T("Øòóòãàðò")},
- {46, 3045, _T("Ýðëàíãåí")},
- {46, 2906, _T("Ýøáîðí")},
+ {46, 3007, L"Ààõåí"},
+ {46, 837, L"Àóãñáóðã"},
+ {46, 838, L"Áàäåí-Áàäåí"},
+ {46, 3371, L"Áàìáåðã"},
+ {46, 839, L"Áåðãèø-Ãëàäáàõ"},
+ {46, 840, L"Áåðëèí"},
+ {46, 841, L"Áèëåôåëüä"},
+ {46, 3163, L"Áîâåíäåí"},
+ {46, 842, L"Áîíí"},
+ {46, 843, L"Áðàäåíáóðã"},
+ {46, 3015, L"Áðàóíøâåéã"},
+ {46, 844, L"Áðåìåí"},
+ {46, 2921, L"Âàðøòàéí"},
+ {46, 845, L"Âåéìàð"},
+ {46, 846, L"Âóïïåðòàëü"},
+ {46, 847, L"Ãàìáóðã"},
+ {46, 848, L"Ãàííîâåð"},
+ {46, 849, L"Ãàðäåëåãåí"},
+ {46, 3010, L"Ãåéäåëüáåðã"},
+ {46, 850, L"Ãîòà"},
+ {46, 851, L"Äàðìøòàäò"},
+ {46, 3072, L"Äåññàó"},
+ {46, 852, L"Äåòìîëüä"},
+ {46, 853, L"Äîðòìóíä"},
+ {46, 854, L"Äðåçäåí"},
+ {46, 855, L"Äþññåëüäîðô"},
+ {46, 3082, L"Èôôåöõàéì"},
+ {46, 3309, L"Êàññåë"},
+ {46, 856, L"Êåëüí"},
+ {46, 857, L"Êèëü"},
+ {46, 3138, L"Êîáëåíö"},
+ {46, 858, L"Êðåôåëüä"},
+ {46, 859, L"Ëåéïöèã"},
+ {46, 2872, L"Ëèìáóðã"},
+ {46, 2965, L"Ëèíãåí"},
+ {46, 3135, L"Ëþáåê"},
+ {46, 3156, L"Ìàíãåéì"},
+ {46, 3192, L"Ìååðñáóðã"},
+ {46, 860, L"Ìþíñòåð"},
+ {46, 861, L"Ìþíõåí"},
+ {46, 2864, L"Íîéøòàäò"},
+ {46, 862, L"Íþðíáåðã"},
+ {46, 3009, L"Îôôåíáóðã"},
+ {46, 2993, L"Ïàäåðáîðí"},
+ {46, 863, L"Ðàâåíñáóðã"},
+ {46, 864, L"Ðåãåíñáóðã"},
+ {46, 865, L"Ðåéíåí"},
+ {46, 866, L"Ðîñòîê"},
+ {46, 3191, L"Ñààðáðþêåí"},
+ {46, 2974, L"Ñàíêò-Àâãóñòèí"},
+ {46, 3127, L"Òþðèíãåí"},
+ {46, 867, L"Ôðàéáåðã"},
+ {46, 868, L"Ôðàéáóðã"},
+ {46, 869, L"Ôðàíêôóðò-íà-Ìàéíå"},
+ {46, 3373, L"Õåìíèòö"},
+ {46, 3313, L"Õèëüäåí"},
+ {46, 870, L"Øòóòãàðò"},
+ {46, 3045, L"Ýðëàíãåí"},
+ {46, 2906, L"Ýøáîðí"},
{46, 2527, lpwszOther},
- {48, 871, _T("Àôèíû")},
- {48, 873, _T("Èðàêëèîí")},
- {48, 3147, _T("Êîðôó")},
- {48, 872, _T("Ñàëîíèêè")},
- {48, 3178, _T("Õàëêèäèêè")},
+ {48, 871, L"Àôèíû"},
+ {48, 873, L"Èðàêëèîí"},
+ {48, 3147, L"Êîðôó"},
+ {48, 872, L"Ñàëîíèêè"},
+ {48, 3178, L"Õàëêèäèêè"},
{48, 2526, lpwszOther},
- {49, 3006, _T("Àðõóñ")},
- {49, 874, _T("Êîïåíãàãåí")},
- {49, 875, _T("Îäåíñå")},
- {49, 3285, _T("Îëüáîðã")},
- {49, 876, _T("Ñâàíåêå")},
- {49, 3126, _T("Ñêèâå")},
+ {49, 3006, L"Àðõóñ"},
+ {49, 874, L"Êîïåíãàãåí"},
+ {49, 875, L"Îäåíñå"},
+ {49, 3285, L"Îëüáîðã"},
+ {49, 876, L"Ñâàíåêå"},
+ {49, 3126, L"Ñêèâå"},
{49, 2525, lpwszOther},
- {50, 3377, _T("Âèêëîó")},
- {50, 3067, _T("Ãîëâåé")},
- {50, 877, _T("Äóáëèí")},
- {50, 3065, _T("Êèëëàðíåé")},
- {50, 3066, _T("Êîðê")},
- {50, 878, _T("Ëèìåðèê")},
- {50, 3069, _T("Íåéñ")},
- {50, 3068, _T("Òèïïåðýðè")},
+ {50, 3377, L"Âèêëîó"},
+ {50, 3067, L"Ãîëâåé"},
+ {50, 877, L"Äóáëèí"},
+ {50, 3065, L"Êèëëàðíåé"},
+ {50, 3066, L"Êîðê"},
+ {50, 878, L"Ëèìåðèê"},
+ {50, 3069, L"Íåéñ"},
+ {50, 3068, L"Òèïïåðýðè"},
{50, 2524, lpwszOther},
- {51, 879, _T("Ðåéêüÿâèê")},
+ {51, 879, L"Ðåéêüÿâèê"},
{51, 2523, lpwszOther},
- {34, 880, _T("Àëèêàíòå")},
- {34, 3125, _T("Àëüìåðèÿ")},
- {34, 881, _T("Áàðñåëîíà")},
- {34, 890, _T("Áèëüáàî")},
- {34, 3076, _T("Áëàíåñ")},
- {34, 882, _T("Âàëåíñèÿ")},
- {34, 3070, _T("Èáèöà")},
- {34, 888, _T("Êàäèñ")},
- {34, 886, _T("Êàðòàõåíà")},
- {34, 891, _T("Ëà-Êîðóíüÿ")},
- {34, 3310, _T("Ëîðåò äå Ìàð")},
- {34, 883, _T("Ìàäðèä")},
- {34, 884, _T("Ìàëàãà")},
- {34, 885, _T("Ìàðáåëüÿ")},
- {34, 892, _T("Îâüåäî")},
- {34, 3179, _T("Ïàëüìà äå Ìàéîðêà")},
- {34, 3177, _T("Ñàí-Àãóñòèí")},
- {34, 3289, _T("Ñàíòà-Êðóñ-äå-Òåíåðèôå")},
- {34, 889, _T("Ñàðàãîñà")},
- {34, 887, _T("Ñåâèëüÿ")},
- {34, 893, _T("Õèõîí")},
+ {34, 880, L"Àëèêàíòå"},
+ {34, 3125, L"Àëüìåðèÿ"},
+ {34, 881, L"Áàðñåëîíà"},
+ {34, 890, L"Áèëüáàî"},
+ {34, 3076, L"Áëàíåñ"},
+ {34, 882, L"Âàëåíñèÿ"},
+ {34, 3070, L"Èáèöà"},
+ {34, 888, L"Êàäèñ"},
+ {34, 886, L"Êàðòàõåíà"},
+ {34, 891, L"Ëà-Êîðóíüÿ"},
+ {34, 3310, L"Ëîðåò äå Ìàð"},
+ {34, 883, L"Ìàäðèä"},
+ {34, 884, L"Ìàëàãà"},
+ {34, 885, L"Ìàðáåëüÿ"},
+ {34, 892, L"Îâüåäî"},
+ {34, 3179, L"Ïàëüìà äå Ìàéîðêà"},
+ {34, 3177, L"Ñàí-Àãóñòèí"},
+ {34, 3289, L"Ñàíòà-Êðóñ-äå-Òåíåðèôå"},
+ {34, 889, L"Ñàðàãîñà"},
+ {34, 887, L"Ñåâèëüÿ"},
+ {34, 893, L"Õèõîí"},
{34, 2522, lpwszOther},
- {52, 3318, _T("Àîñòà")},
- {52, 3278, _T("Áåëëàðèà")},
- {52, 906, _T("Áîëîíüÿ")},
- {52, 894, _T("Áðåøèà")},
- {52, 895, _T("Âåíåöèÿ")},
- {52, 905, _T("Âåðîíà")},
- {52, 896, _T("Ãåíóÿ")},
- {52, 897, _T("Ëåêêî")},
- {52, 3369, _T("Ëèâîðíî")},
- {52, 3327, _T("Ìàðñàëà")},
- {52, 898, _T("Ìèëàí")},
- {52, 899, _T("Ìîäåíà")},
- {52, 907, _T("Íåàïîëü")},
- {52, 908, _T("Ïåðóäæà")},
- {52, 900, _T("Ïèçà")},
- {52, 901, _T("Ðèì")},
- {52, 3368, _T("Ñàí-Ðåìî")},
- {52, 3384, _T("Ñèðàêóçà")},
- {52, 3252, _T("Òåðàìî")},
- {52, 902, _T("Òðèåñò")},
- {52, 903, _T("Òóðèí")},
- {52, 3130, _T("Ôàíî")},
- {52, 904, _T("Ôëîðåíöèÿ")},
+ {52, 3318, L"Àîñòà"},
+ {52, 3278, L"Áåëëàðèà"},
+ {52, 906, L"Áîëîíüÿ"},
+ {52, 894, L"Áðåøèà"},
+ {52, 895, L"Âåíåöèÿ"},
+ {52, 905, L"Âåðîíà"},
+ {52, 896, L"Ãåíóÿ"},
+ {52, 897, L"Ëåêêî"},
+ {52, 3369, L"Ëèâîðíî"},
+ {52, 3327, L"Ìàðñàëà"},
+ {52, 898, L"Ìèëàí"},
+ {52, 899, L"Ìîäåíà"},
+ {52, 907, L"Íåàïîëü"},
+ {52, 908, L"Ïåðóäæà"},
+ {52, 900, L"Ïèçà"},
+ {52, 901, L"Ðèì"},
+ {52, 3368, L"Ñàí-Ðåìî"},
+ {52, 3384, L"Ñèðàêóçà"},
+ {52, 3252, L"Òåðàìî"},
+ {52, 902, L"Òðèåñò"},
+ {52, 903, L"Òóðèí"},
+ {52, 3130, L"Ôàíî"},
+ {52, 904, L"Ôëîðåíöèÿ"},
{52, 2521, lpwszOther},
- {53, 2939, _T("Àéçêðàóêëå")},
- {53, 3054, _T("Âàëêà")},
- {53, 909, _T("Äàóãàâïèëñ")},
- {53, 2934, _T("Åêàáïèëñ")},
- {53, 913, _T("Åëãàâà")},
- {53, 2935, _T("Êîêíåñå")},
- {53, 912, _T("Ëèåïàÿ")},
- {53, 2905, _T("Ðåçåêíå")},
- {53, 911, _T("Ðèãà")},
- {53, 2936, _T("Ñàëàñïèëñ")},
- {53, 2937, _T("Ñìèëòåíå")},
- {53, 910, _T("Þðìàëà")},
+ {53, 2939, L"Àéçêðàóêëå"},
+ {53, 3054, L"Âàëêà"},
+ {53, 909, L"Äàóãàâïèëñ"},
+ {53, 2934, L"Åêàáïèëñ"},
+ {53, 913, L"Åëãàâà"},
+ {53, 2935, L"Êîêíåñå"},
+ {53, 912, L"Ëèåïàÿ"},
+ {53, 2905, L"Ðåçåêíå"},
+ {53, 911, L"Ðèãà"},
+ {53, 2936, L"Ñàëàñïèëñ"},
+ {53, 2937, L"Ñìèëòåíå"},
+ {53, 910, L"Þðìàëà"},
{53, 2520, lpwszOther},
- {54, 914, _T("Âèëüíþñ")},
- {54, 915, _T("Âèñàãèíàñ")},
- {54, 916, _T("Êàóíàñ")},
- {54, 918, _T("Êëàéïåäà")},
- {54, 919, _T("Ïàëàíãà")},
- {54, 3173, _T("Ïåíåâåæèñ")},
- {54, 917, _T("Øàóëÿé")},
+ {54, 914, L"Âèëüíþñ"},
+ {54, 915, L"Âèñàãèíàñ"},
+ {54, 916, L"Êàóíàñ"},
+ {54, 918, L"Êëàéïåäà"},
+ {54, 919, L"Ïàëàíãà"},
+ {54, 3173, L"Ïåíåâåæèñ"},
+ {54, 917, L"Øàóëÿé"},
{54, 2519, lpwszOther},
- {55, 920, _T("Âàäóö")},
+ {55, 920, L"Âàäóö"},
{55, 2518, lpwszOther},
- {56, 3376, _T("Áåòöäîðô")},
- {56, 921, _T("Ëþêñåìáóðã")},
+ {56, 3376, L"Áåòöäîðô"},
+ {56, 921, L"Ëþêñåìáóðã"},
{56, 2517, lpwszOther},
- {57, 3142, _T("Áèòîëà")},
- {57, 922, _T("Ñêîïüå")},
+ {57, 3142, L"Áèòîëà"},
+ {57, 922, L"Ñêîïüå"},
{57, 2516, lpwszOther},
- {58, 923, _T("Âàëëåòòà")},
- {58, 3154, _T("Ìçèäà")},
- {58, 924, _T("Ñëèìà")},
+ {58, 923, L"Âàëëåòòà"},
+ {58, 3154, L"Ìçèäà"},
+ {58, 924, L"Ñëèìà"},
{58, 2515, lpwszOther},
- {59, 925, _T("Áåëüöû")},
- {59, 926, _T("Áåíäåðû")},
- {59, 3234, _T("Äóáîññàðû")},
- {59, 3275, _T("Êàõóë")},
- {59, 927, _T("Êèøèíåâ")},
- {59, 3321, _T("Ðåçèíà")},
- {59, 928, _T("Ðûáíèöà")},
- {59, 929, _T("Òèðàñïîëü")},
- {59, 3281, _T("×àäûð-Ëóíãà")},
+ {59, 925, L"Áåëüöû"},
+ {59, 926, L"Áåíäåðû"},
+ {59, 3234, L"Äóáîññàðû"},
+ {59, 3275, L"Êàõóë"},
+ {59, 927, L"Êèøèíåâ"},
+ {59, 3321, L"Ðåçèíà"},
+ {59, 928, L"Ðûáíèöà"},
+ {59, 929, L"Òèðàñïîëü"},
+ {59, 3281, L"×àäûð-Ëóíãà"},
{59, 2514, lpwszOther},
- {36, 930, _T("Ìîíòå-Êàðëî")},
+ {36, 930, L"Ìîíòå-Êàðëî"},
{36, 2513, lpwszOther},
- {60, 931, _T("Àìñòåðäàì")},
- {60, 933, _T("Áðåäà")},
- {60, 932, _T("Ãààãà")},
- {60, 934, _T("Ãàóäà")},
- {60, 935, _T("Äåëôò")},
- {60, 2977, _T("Äîíãåí")},
- {60, 3030, _T("Çâîëëå")},
- {60, 3091, _T("Íèéìåãåí")},
- {60, 936, _T("Ðîòòåðäàì")},
- {60, 937, _T("Óòðåõò")},
- {60, 3044, _T("Ýéíäõîâåí")},
- {60, 3380, _T("Ýíøåäå")},
+ {60, 931, L"Àìñòåðäàì"},
+ {60, 933, L"Áðåäà"},
+ {60, 932, L"Ãààãà"},
+ {60, 934, L"Ãàóäà"},
+ {60, 935, L"Äåëôò"},
+ {60, 2977, L"Äîíãåí"},
+ {60, 3030, L"Çâîëëå"},
+ {60, 3091, L"Íèéìåãåí"},
+ {60, 936, L"Ðîòòåðäàì"},
+ {60, 937, L"Óòðåõò"},
+ {60, 3044, L"Ýéíäõîâåí"},
+ {60, 3380, L"Ýíøåäå"},
{60, 2512, lpwszOther},
- {61, 3190, _T("Êðèñòèàíñàíä")},
- {61, 2857, _T("Ëèëëåõàììåð")},
- {61, 938, _T("Îñëî")},
- {61, 3355, _T("Ñòàâàíãåð")},
- {61, 939, _T("Òðîíõåéì")},
+ {61, 3190, L"Êðèñòèàíñàíä"},
+ {61, 2857, L"Ëèëëåõàììåð"},
+ {61, 938, L"Îñëî"},
+ {61, 3355, L"Ñòàâàíãåð"},
+ {61, 939, L"Òðîíõåéì"},
{61, 2511, lpwszOther},
- {62, 940, _T("Áåëîñòîê")},
- {62, 941, _T("Âàðøàâà")},
- {62, 3164, _T("Âðîöëàâ")},
- {62, 942, _T("Ãäàíüñê")},
- {62, 943, _T("Ãëèâèöå")},
- {62, 3237, _T("Çàêîïàíå")},
- {62, 3165, _T("Çåëåíà Ãóðà")},
- {62, 944, _T("Êàòîâèöå")},
- {62, 945, _T("Êðàêîâ")},
- {62, 3008, _T("Ëîäçü")},
- {62, 3150, _T("Îëüøòûí")},
- {62, 946, _T("Ïîçíàíü")},
- {62, 947, _T("Ðàäîì")},
- {62, 948, _T("Ñîïîò")},
- {62, 2958, _T("Òûõû")},
+ {62, 940, L"Áåëîñòîê"},
+ {62, 941, L"Âàðøàâà"},
+ {62, 3164, L"Âðîöëàâ"},
+ {62, 942, L"Ãäàíüñê"},
+ {62, 943, L"Ãëèâèöå"},
+ {62, 3237, L"Çàêîïàíå"},
+ {62, 3165, L"Çåëåíà Ãóðà"},
+ {62, 944, L"Êàòîâèöå"},
+ {62, 945, L"Êðàêîâ"},
+ {62, 3008, L"Ëîäçü"},
+ {62, 3150, L"Îëüøòûí"},
+ {62, 946, L"Ïîçíàíü"},
+ {62, 947, L"Ðàäîì"},
+ {62, 948, L"Ñîïîò"},
+ {62, 2958, L"Òûõû"},
{62, 2510, lpwszOther},
- {35, 949, _T("Ëèññàáîí")},
- {35, 950, _T("Ïîðòî")},
+ {35, 949, L"Ëèññàáîí"},
+ {35, 950, L"Ïîðòî"},
{35, 2509, lpwszOther},
- {63, 952, _T("Áðàøîâ")},
- {63, 951, _T("Áóõàðåñò")},
- {63, 954, _T("Êîíñòàíöà")},
- {63, 955, _T("Ïëîåøòè")},
- {63, 953, _T("ßññû")},
+ {63, 952, L"Áðàøîâ"},
+ {63, 951, L"Áóõàðåñò"},
+ {63, 954, L"Êîíñòàíöà"},
+ {63, 955, L"Ïëîåøòè"},
+ {63, 953, L"ßññû"},
{63, 2508, lpwszOther},
- {64, 956, _T("Ñàí-Ìàðèíî")},
+ {64, 956, L"Ñàí-Ìàðèíî"},
{64, 2507, lpwszOther},
- {74, 957, _T("Áåëãðàä")},
- {74, 960, _T("Íèø")},
- {74, 958, _T("Íîâè-Ñàä")},
- {74, 959, _T("Ñàðàåâî")},
+ {74, 957, L"Áåëãðàä"},
+ {74, 960, L"Íèø"},
+ {74, 958, L"Íîâè-Ñàä"},
+ {74, 959, L"Ñàðàåâî"},
{74, 2506, lpwszOther},
- {65, 961, _T("Áðàòèñëàâà")},
- {65, 962, _T("Êîøèöå")},
- {65, 3101, _T("Ëèïòîâ")},
- {65, 963, _T("Ïîïðàä")},
- {65, 964, _T("Ïðåøîâ")},
- {65, 965, _T("Ðóæåìáåðîê")},
- {65, 966, _T("Òâðäîøèí")},
+ {65, 961, L"Áðàòèñëàâà"},
+ {65, 962, L"Êîøèöå"},
+ {65, 3101, L"Ëèïòîâ"},
+ {65, 963, L"Ïîïðàä"},
+ {65, 964, L"Ïðåøîâ"},
+ {65, 965, L"Ðóæåìáåðîê"},
+ {65, 966, L"Òâðäîøèí"},
{65, 2505, lpwszOther},
- {66, 968, _T("Êîïàð")},
- {66, 967, _T("Ëþáëÿíà")},
- {66, 969, _T("Ìàðèáîð")},
+ {66, 968, L"Êîïàð"},
+ {66, 967, L"Ëþáëÿíà"},
+ {66, 969, L"Ìàðèáîð"},
{66, 2504, lpwszOther},
- {67, 970, _T("Òîðñõàâí")},
+ {67, 970, L"Òîðñõàâí"},
{67, 2503, lpwszOther},
- {68, 2888, _T("Âàíòàà")},
- {68, 971, _T("Âàñà")},
- {68, 979, _T("Êîòêà")},
- {68, 972, _T("Êîóâîëà")},
- {68, 980, _T("Ëàõòè")},
- {68, 973, _T("Îóëó")},
- {68, 3375, _T("Ðèèõèìÿêè")},
- {68, 3159, _T("Ðóîâåñè")},
- {68, 974, _T("Òàìïåðå")},
- {68, 975, _T("Òóðêó")},
- {68, 976, _T("Õåëüñèíêè")},
- {68, 977, _T("Ýñïî")},
- {68, 978, _T("Þâÿñêþëÿ")},
+ {68, 2888, L"Âàíòàà"},
+ {68, 971, L"Âàñà"},
+ {68, 979, L"Êîòêà"},
+ {68, 972, L"Êîóâîëà"},
+ {68, 980, L"Ëàõòè"},
+ {68, 973, L"Îóëó"},
+ {68, 3375, L"Ðèèõèìÿêè"},
+ {68, 3159, L"Ðóîâåñè"},
+ {68, 974, L"Òàìïåðå"},
+ {68, 975, L"Òóðêó"},
+ {68, 976, L"Õåëüñèíêè"},
+ {68, 977, L"Ýñïî"},
+ {68, 978, L"Þâÿñêþëÿ"},
{68, 2502, lpwszOther},
- {37, 996, _T("Àâèíüîí")},
- {37, 983, _T("Áåðæåðàê")},
- {37, 997, _T("Áëóà")},
- {37, 984, _T("Áîðäî")},
- {37, 998, _T("Äèæîí")},
- {37, 987, _T("Êàíí")},
- {37, 988, _T("Êàñòð")},
- {37, 993, _T("Êëåðìîí-Ôåððàí")},
- {37, 3037, _T("Ëèëëü")},
- {37, 989, _T("Ëèîí")},
- {37, 985, _T("Ìàðñåëü")},
- {37, 991, _T("Ìåö")},
- {37, 3161, _T("Ìîáåæ")},
- {37, 990, _T("Íàíñè")},
- {37, 994, _T("Íàíò")},
- {37, 995, _T("Íèööà")},
- {37, 999, _T("Îðëåàí")},
- {37, 981, _T("Ïàðèæ")},
- {37, 3374, _T("Ïåðïèíüÿí")},
- {37, 992, _T("Ðóàí")},
- {37, 982, _T("Ñòðàñáóðã")},
- {37, 986, _T("Òóëóçà")},
- {37, 3314, _T("Øàìáåðè")},
+ {37, 996, L"Àâèíüîí"},
+ {37, 983, L"Áåðæåðàê"},
+ {37, 997, L"Áëóà"},
+ {37, 984, L"Áîðäî"},
+ {37, 998, L"Äèæîí"},
+ {37, 987, L"Êàíí"},
+ {37, 988, L"Êàñòð"},
+ {37, 993, L"Êëåðìîí-Ôåððàí"},
+ {37, 3037, L"Ëèëëü"},
+ {37, 989, L"Ëèîí"},
+ {37, 985, L"Ìàðñåëü"},
+ {37, 991, L"Ìåö"},
+ {37, 3161, L"Ìîáåæ"},
+ {37, 990, L"Íàíñè"},
+ {37, 994, L"Íàíò"},
+ {37, 995, L"Íèööà"},
+ {37, 999, L"Îðëåàí"},
+ {37, 981, L"Ïàðèæ"},
+ {37, 3374, L"Ïåðïèíüÿí"},
+ {37, 992, L"Ðóàí"},
+ {37, 982, L"Ñòðàñáóðã"},
+ {37, 986, L"Òóëóçà"},
+ {37, 3314, L"Øàìáåðè"},
{37, 2501, lpwszOther},
- {69, 1003, _T("Äóáðîâíèê")},
- {69, 1000, _T("Çàãðåá")},
- {69, 1001, _T("Çàäàð")},
- {69, 1004, _T("Ðèåêà")},
- {69, 1002, _T("Ñïëèò")},
+ {69, 1003, L"Äóáðîâíèê"},
+ {69, 1000, L"Çàãðåá"},
+ {69, 1001, L"Çàäàð"},
+ {69, 1004, L"Ðèåêà"},
+ {69, 1002, L"Ñïëèò"},
{69, 2500, lpwszOther},
- {70, 1005, _T("Áðíî")},
- {70, 3291, _T("Ãàâëè÷êóâ-Áðîä")},
- {70, 1007, _T("Ãðàäåö-Êðàëîâå")},
- {70, 1008, _T("Êàðëîâè-Âàðè")},
- {70, 3019, _T("Êëàäðóáû")},
- {70, 1010, _T("Ëîóíè")},
- {70, 1009, _T("Îñòðàâà")},
- {70, 1015, _T("Ïëüçåíü")},
- {70, 3105, _T("Ïðàâ÷èöêà Áðàíà")},
- {70, 1006, _T("Ïðàãà")},
- {70, 3246, _T("Òà÷îâ")},
- {70, 1011, _T("Òðøåáè÷")},
- {70, 1012, _T("Óñòè-íàä-Ëàáåì")},
- {70, 1014, _T("×åñêå-Áóäååâèöå")},
- {70, 1013, _T("ßáëîíåö-íàä-Íèñîó")},
+ {70, 1005, L"Áðíî"},
+ {70, 3291, L"Ãàâëè÷êóâ-Áðîä"},
+ {70, 1007, L"Ãðàäåö-Êðàëîâå"},
+ {70, 1008, L"Êàðëîâè-Âàðè"},
+ {70, 3019, L"Êëàäðóáû"},
+ {70, 1010, L"Ëîóíè"},
+ {70, 1009, L"Îñòðàâà"},
+ {70, 1015, L"Ïëüçåíü"},
+ {70, 3105, L"Ïðàâ÷èöêà Áðàíà"},
+ {70, 1006, L"Ïðàãà"},
+ {70, 3246, L"Òà÷îâ"},
+ {70, 1011, L"Òðøåáè÷"},
+ {70, 1012, L"Óñòè-íàä-Ëàáåì"},
+ {70, 1014, L"×åñêå-Áóäååâèöå"},
+ {70, 1013, L"ßáëîíåö-íàä-Íèñîó"},
{70, 2499, lpwszOther},
- {71, 1016, _T("Àðàó")},
- {71, 1019, _T("Áàäåí")},
- {71, 1017, _T("Áàçåëü")},
- {71, 1018, _T("Áåðí")},
- {71, 1020, _T("Áèëü")},
- {71, 1021, _T("Âèíòåðòóð")},
- {71, 1022, _T("Äàâîñ")},
- {71, 3189, _T("Äåëåìîíò")},
- {71, 1023, _T("Æåíåâà")},
- {71, 1024, _T("Çîëîòóðí")},
- {71, 1025, _T("Ëîçàííà")},
- {71, 1026, _T("Ëîêàðíî")},
- {71, 1027, _T("Ëóãàíî")},
- {71, 1028, _T("Ëþöåðí")},
- {71, 1029, _T("Ìîíòðå")},
- {71, 1030, _T("Öþðèõ")},
+ {71, 1016, L"Àðàó"},
+ {71, 1019, L"Áàäåí"},
+ {71, 1017, L"Áàçåëü"},
+ {71, 1018, L"Áåðí"},
+ {71, 1020, L"Áèëü"},
+ {71, 1021, L"Âèíòåðòóð"},
+ {71, 1022, L"Äàâîñ"},
+ {71, 3189, L"Äåëåìîíò"},
+ {71, 1023, L"Æåíåâà"},
+ {71, 1024, L"Çîëîòóðí"},
+ {71, 1025, L"Ëîçàííà"},
+ {71, 1026, L"Ëîêàðíî"},
+ {71, 1027, L"Ëóãàíî"},
+ {71, 1028, L"Ëþöåðí"},
+ {71, 1029, L"Ìîíòðå"},
+ {71, 1030, L"Öþðèõ"},
{71, 2498, lpwszOther},
- {72, 2883, _T("Àðáîãà")},
- {72, 1031, _T("Ãåòåáîðã")},
- {72, 1032, _T("Êàëüìàð")},
- {72, 1037, _T("Ëàõîëüì")},
- {72, 1036, _T("Ëóëåî")},
- {72, 1042, _T("Ëóíä")},
- {72, 1033, _T("Ìàëüìå")},
- {72, 1034, _T("Ñòîêãîëüì")},
- {72, 1041, _T("Óìåî")},
- {72, 1039, _T("Ôàëóí")},
- {72, 1043, _T("Õåëüñèíáîðã")},
- {72, 1040, _T("Õåðíåñàíä")},
- {72, 1038, _T("Ýñòåðñóíä")},
+ {72, 2883, L"Àðáîãà"},
+ {72, 1031, L"Ãåòåáîðã"},
+ {72, 1032, L"Êàëüìàð"},
+ {72, 1037, L"Ëàõîëüì"},
+ {72, 1036, L"Ëóëåî"},
+ {72, 1042, L"Ëóíä"},
+ {72, 1033, L"Ìàëüìå"},
+ {72, 1034, L"Ñòîêãîëüì"},
+ {72, 1041, L"Óìåî"},
+ {72, 1039, L"Ôàëóí"},
+ {72, 1043, L"Õåëüñèíáîðã"},
+ {72, 1040, L"Õåðíåñàíä"},
+ {72, 1038, L"Ýñòåðñóíä"},
{72, 2497, lpwszOther},
- {73, 3013, _T("Âàëãà")},
- {73, 1044, _T("Êåéëà")},
- {73, 1045, _T("Êîõòëà-ßðâå")},
- {73, 1046, _T("Ìààðäó")},
- {73, 1047, _T("Ìûéçàêþëà")},
- {73, 1048, _T("Íàðâà")},
- {73, 1049, _T("Ïÿðíó")},
- {73, 1050, _T("Ðàêâåðå")},
- {73, 1051, _T("Ñèëëàìÿý")},
- {73, 1052, _T("Òàëëèí")},
- {73, 1053, _T("Òàðòó")},
- {73, 1054, _T("Õààïñàëó")},
+ {73, 3013, L"Âàëãà"},
+ {73, 1044, L"Êåéëà"},
+ {73, 1045, L"Êîõòëà-ßðâå"},
+ {73, 1046, L"Ìààðäó"},
+ {73, 1047, L"Ìûéçàêþëà"},
+ {73, 1048, L"Íàðâà"},
+ {73, 1049, L"Ïÿðíó"},
+ {73, 1050, L"Ðàêâåðå"},
+ {73, 1051, L"Ñèëëàìÿý"},
+ {73, 1052, L"Òàëëèí"},
+ {73, 1053, L"Òàðòó"},
+ {73, 1054, L"Õààïñàëó"},
{0, NULL}
};//*/
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index ccb253a53f..5422fd32f8 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -496,7 +496,7 @@ int CMraProto::SetStatus(int iNewStatus) case ID_STATUS_DND:
case ID_STATUS_FREECHAT:
case ID_STATUS_INVISIBLE:
- MraSendNewStatus(m_iDesiredStatus, m_iXStatus, _T(""), _T(""));
+ MraSendNewStatus(m_iDesiredStatus, m_iXStatus, L"", L"");
case ID_STATUS_CONNECTING:
// ïðåäîòâðàùàåì ïåðåõîä â ëþáîé ñòàòóñ (êðîìå offline) èç ñòàòóñà connecting, åñëè îí íå âûçâàí ñàìèì ïëàãèíîì
if (dwOldStatusMode == ID_STATUS_CONNECTING && iNewStatus != m_iDesiredStatus)
@@ -526,11 +526,11 @@ HANDLE CMraProto::GetAwayMsg(MCONTACT hContact) SYSTEMTIME tt = { 0 };
dwTime = getDword(hContact, DBSETTING_BLOGSTATUSTIME, 0);
if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &tt))
- mir_sntprintf(szTime, _T("%04ld.%02ld.%02ld %02ld:%02ld: "), tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute);
+ mir_sntprintf(szTime, L"%04ld.%02ld.%02ld %02ld:%02ld: ", tt.wYear, tt.wMonth, tt.wDay, tt.wHour, tt.wMinute);
else
szTime[0] = 0;
- mir_sntprintf(szStatusDesc, _T("%s%s"), szTime, szBlogStatus.c_str());
+ mir_sntprintf(szStatusDesc, L"%s%s", szTime, szBlogStatus.c_str());
iRet = GetTickCount();
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)iRet, (LPARAM)szStatusDesc);
}
@@ -549,7 +549,7 @@ int CMraProto::SetAwayMsg(int iStatus, const TCHAR *msg) // íå îòïðàâëÿåì íîâûé ñòàòóñíûé òåêñò äëÿ õñòàòóñîâ, äëÿ õñòàòóñîâ òîëüêî ýâåé ñîîáùåíèÿ
if (dwStatus != ID_STATUS_ONLINE || IsXStatusValid(dwXStatus) == FALSE) {
dwStatusDescSize = min(dwStatusDescSize, STATUS_DESC_MAX);
- MraSendNewStatus(dwStatus, dwXStatus, _T(""), msg);
+ MraSendNewStatus(dwStatus, dwXStatus, L"", msg);
}
return 0;
}
diff --git a/protocols/MRA/src/MraRTFMsg.cpp b/protocols/MRA/src/MraRTFMsg.cpp index 61d305d08e..ab7077f9d1 100644 --- a/protocols/MRA/src/MraRTFMsg.cpp +++ b/protocols/MRA/src/MraRTFMsg.cpp @@ -100,9 +100,9 @@ DWORD MraTextToRTFData(LPSTR lpszMessage, size_t dwMessageSize, LPSTR lpszMessag bool MraIsMessageFlashAnimation(const CMStringW &lpwszMessage)
{
- int iStart = lpwszMessage.Find(_T("<SMILE>id=flas"));
+ int iStart = lpwszMessage.Find(L"<SMILE>id=flas");
if (iStart != -1)
- if (lpwszMessage.Find(_T("'</SMILE>"), iStart) != -1)
+ if (lpwszMessage.Find(L"'</SMILE>", iStart) != -1)
return true;
return false;
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 0b3b289de4..0cb54e6522 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -87,7 +87,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType if (dwFlags & MESSAGE_FLAG_AUTHORIZE) {
OutBuffer buf;
buf.SetUL(2);
- buf.SetLPSW(_T(""));//***deb possible nick here
+ buf.SetLPSW(L"");//***deb possible nick here
buf.SetLPSW(lpwszMessage);
lpszMessageConverted = mir_base64_encode(buf.Data(), (int)buf.Len());
dwMessageConvertedSize = mir_strlen(lpszMessageConverted);
@@ -203,8 +203,8 @@ DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwG // pack auth message
OutBuffer buf2;
buf2.SetUL(2);
- buf2.SetLPSW(_T(""));//***deb possible nick here
- buf2.SetLPSW((wszAuthMessage == NULL) ? _T("") : *wszAuthMessage);
+ buf2.SetLPSW(L"");//***deb possible nick here
+ buf2.SetLPSW((wszAuthMessage == NULL) ? L"" : *wszAuthMessage);
buf.SetLPS(CMStringA(ptrA(mir_base64_encode(buf2.Data(), (int)buf2.Len()))));
buf.SetUL(0);
@@ -393,7 +393,7 @@ HANDLE CMraProto::MraWPRequestByEMail(MCONTACT hContact, DWORD dwAckType, CMStri DWORD dwRequestFlags = 0;
SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_USER);
SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_DOMAIN);
- return MraWPRequestW(hContact, dwAckType, dwRequestFlags, szUser, szDomain, _T(""), _T(""), _T(""), 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ return MraWPRequestW(hContact, dwAckType, dwRequestFlags, szUser, szDomain, L"", L"", L"", 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
// Îòïðàâêà ôàéëîâ
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index b06913d615..ebeb34d92d 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -878,7 +878,7 @@ void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode else {
dwErrDescriptionSize = (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErrorCode, 0, szErrDescription, (_countof(szErrDescription) - sizeof(WCHAR)), NULL) - 2);
szErrDescription[dwErrDescriptionSize] = 0;
- mir_sntprintf(szErrorText, _T("%s %lu: %s"), TranslateTS(lpwszErrText), dwErrorCode, szErrDescription);
+ mir_sntprintf(szErrorText, L"%s %lu: %s", TranslateTS(lpwszErrText), dwErrorCode, szErrDescription);
}
MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, szErrorText);
}
@@ -1009,7 +1009,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP if (dat->ppro->mraGetStringW(NULL, szValueName, szBuff))
SetDlgItemText(hWndDlg, IDC_XMSG, szBuff.c_str()); // custom xstatus description
else // default xstatus description
- SetDlgItemText(hWndDlg, IDC_XMSG, _T(""));
+ SetDlgItemText(hWndDlg, IDC_XMSG, L"");
SendMessage(hWndDlg, WM_TIMER, 0, 0);
SetTimer(hWndDlg, 1, 1000, 0);
@@ -1124,7 +1124,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w DWORD dwTime = dat->ppro->getDword(dat->hContact, DBSETTING_BLOGSTATUSTIME, 0);
if (dwTime && MakeLocalSystemTimeFromTime32(dwTime, &stBlogStatusTime))
- szBuff.Format(_T("%s: %04ld.%02ld.%02ld %02ld:%02ld"), TranslateT("Written"),
+ szBuff.Format(L"%s: %04ld.%02ld.%02ld %02ld:%02ld", TranslateT("Written"),
stBlogStatusTime.wYear, stBlogStatusTime.wMonth, stBlogStatusTime.wDay, stBlogStatusTime.wHour, stBlogStatusTime.wMinute);
else
szBuff.Empty();
@@ -1176,7 +1176,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w size_t dwMessageSize = GetWindowTextLength(GetDlgItem(hWndDlg, IDC_MSG_TO_SEND));
EnableWindow(GetDlgItem(hWndDlg, IDOK), (int)dwMessageSize);
- mir_sntprintf(tszBuff, _T("%d/%d"), dwMessageSize, MICBLOG_STATUS_MAX);
+ mir_sntprintf(tszBuff, L"%d/%d", dwMessageSize, MICBLOG_STATUS_MAX);
SetDlgItemText(hWndDlg, IDC_STATIC_CHARS_COUNTER, tszBuff);
}
break;
@@ -1250,7 +1250,7 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD dwPathLen++;
}
szPath[dwPathLen] = 0;
- mir_tstrcat(szPath, _T("*.*"));
+ mir_tstrcat(szPath, L"*.*");
dwRetErrorCode = ERROR_FILE_NOT_FOUND;
prdsiItems[dwRecDeepCurPos].dwFileNameLen = 0;
@@ -1261,11 +1261,11 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD while (dwRetErrorCode == ERROR_FILE_NOT_FOUND && FindNextFile(prdsiItems[dwRecDeepCurPos].hFind, &prdsiItems[dwRecDeepCurPos].w32fdFindFileData)) {
if (prdsiItems[dwRecDeepCurPos].w32fdFindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {// folder
- if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T("."), 1) != CSTR_EQUAL)
- if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T(".."), 2) != CSTR_EQUAL) {
+ if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, L".", 1) != CSTR_EQUAL)
+ if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, L"..", 2) != CSTR_EQUAL) {
prdsiItems[dwRecDeepCurPos].dwFileNameLen = (int)mir_wstrlen(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName) + 1;
memcpy((szPath + dwPathLen), prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, (prdsiItems[dwRecDeepCurPos].dwFileNameLen*sizeof(WCHAR)));
- mir_tstrcat(szPath, _T("\\*.*"));
+ mir_tstrcat(szPath, L"\\*.*");
dwPathLen += prdsiItems[dwRecDeepCurPos].dwFileNameLen;
dwRecDeepCurPos++;
@@ -1433,9 +1433,9 @@ static DWORD ReplaceInBuff(LPVOID lpInBuff, size_t dwInBuffSize, size_t dwReplac return dwRetErrorCode;
}
-static const LPTSTR lpszXMLTags[] = { _T("'"), _T("""), _T("&"), _T("<"), _T(">") };
+static const LPTSTR lpszXMLTags[] = { L"'", L""", L"&", L"<", L">" };
static const size_t dwXMLTagsCount[] = { (6 * sizeof(TCHAR)), (6 * sizeof(TCHAR)), (5 * sizeof(TCHAR)), (4 * sizeof(TCHAR)), (4 * sizeof(TCHAR)) };
-static const LPTSTR lpszXMLSymbols[] = { _T("\'"), _T("\""), _T("&"), _T("<"), _T(">") };
+static const LPTSTR lpszXMLSymbols[] = { L"\'", L"\"", L"&", L"<", L">" };
static const size_t dwXMLSymbolsCount[] = { sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR), sizeof(TCHAR) };
//Decode XML coded string. The function translate special xml code into standard characters.
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index 03681834d9..902f9eac07 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -282,7 +282,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) HGENMENU hRoot;
{
TCHAR szItem[MAX_PATH + 64];
- mir_sntprintf(szItem, _T("%s Custom Status"), m_tszUserName);
+ mir_sntprintf(szItem, L"%s Custom Status", m_tszUserName);
CMenuItem mi;
mi.root = pcli->pfnGetProtocolMenu(m_szModuleName);
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp index 909a1b94f9..abf966c43f 100644 --- a/protocols/MRA/src/Mra_options.cpp +++ b/protocols/MRA/src/Mra_options.cpp @@ -14,7 +14,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA if (ppro->mraGetStringW(NULL, "e-mail", szBuff))
SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str());
}
- SetDlgItemText(hWndDlg, IDC_PASSWORD, _T(""));
+ SetDlgItemText(hWndDlg, IDC_PASSWORD, L"");
return TRUE;
case WM_COMMAND:
@@ -65,7 +65,7 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP if (ppro->mraGetStringW(NULL, "e-mail", szBuff))
SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str());
}
- SetDlgItemText(hWndDlg, IDC_PASSWORD, _T(""));
+ SetDlgItemText(hWndDlg, IDC_PASSWORD, L"");
return TRUE;
case WM_COMMAND:
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 7ece81f274..133101acee 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -539,9 +539,9 @@ bool CMraProto::CmdOfflineMessageAck(BinBuffer &buf) if (dwTemp == NO_ERROR || dwTemp == ERROR_ACCESS_DENIED)
MraOfflineMessageDel(dwMsgUIDL);
else
- ShowFormattedErrorMessage(_T("Offline message processing error, message will not deleted from server"), NO_ERROR);
+ ShowFormattedErrorMessage(L"Offline message processing error, message will not deleted from server", NO_ERROR);
}
- else ShowFormattedErrorMessage(_T("Offline message processing error, message will not deleted from server"), NO_ERROR);
+ else ShowFormattedErrorMessage(L"Offline message processing error, message will not deleted from server", NO_ERROR);
return true;
}
@@ -558,7 +558,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf) MraUpdateContactInfo(hContact);
if (IsEMailChatAgent(szEmail) == FALSE) {
- CMStringA szBuff = CreateBlobFromContact(hContact, _T(""));
+ CMStringA szBuff = CreateBlobFromContact(hContact, L"");
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.flags = DBEF_UTF;
@@ -730,23 +730,23 @@ bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf) }
break;
case CONTACT_OPER_ERROR:// ## ïåðåäàííûå äàííûå áûëè íåêîððåêòíû
- ShowFormattedErrorMessage(_T("Data been sent are invalid"), NO_ERROR);
+ ShowFormattedErrorMessage(L"Data been sent are invalid", NO_ERROR);
break;
case CONTACT_OPER_INTERR:// ## ïðè îáðàáîòêå çàïðîñà ïðîèçîøëà âíóòðåííÿÿ îøèáêà
- ShowFormattedErrorMessage(_T("Internal server error"), NO_ERROR);
+ ShowFormattedErrorMessage(L"Internal server error", NO_ERROR);
break;
case CONTACT_OPER_NO_SUCH_USER:// ## äîáàâëÿåìîãî ïîëüçîâàòåëÿ íå ñóùåñòâóåò â ñèñòåìå
SetContactBasicInfoW(hContact, 0, SCBIF_SERVER_FLAG, 0, 0, 0, -1, 0, 0, 0, 0);
- ShowFormattedErrorMessage(_T("No such user to add"), NO_ERROR);
+ ShowFormattedErrorMessage(L"No such user to add", NO_ERROR);
break;
case CONTACT_OPER_INVALID_INFO:// ## íåêîððåêòíîå èìÿ ïîëüçîâàòåëÿ
- ShowFormattedErrorMessage(_T("Invalid user name"), NO_ERROR);
+ ShowFormattedErrorMessage(L"Invalid user name", NO_ERROR);
break;
case CONTACT_OPER_USER_EXISTS:// ## ïîëüçîâàòåëü óæå åñòü â êîíòàêò-ëèñòå
- ShowFormattedErrorMessage(_T("User already added"), NO_ERROR);
+ ShowFormattedErrorMessage(L"User already added", NO_ERROR);
break;
case CONTACT_OPER_GROUP_LIMIT:// ## ïðåâûøåíî ìàêñèìàëüíî äîïóñòèìîå êîëè÷åñòâî ãðóïï (20)
- ShowFormattedErrorMessage(_T("Group limit is 20"), NO_ERROR);
+ ShowFormattedErrorMessage(L"Group limit is 20", NO_ERROR);
break;
default:// ## unknown error
TCHAR szBuff[1024];
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4b99db4956..d5477896e7 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -304,7 +304,7 @@ INT_PTR CMraProto::MraSetListeningTo(WPARAM, LPARAM lParam) LISTENINGTOINFO *pliInfo = (LISTENINGTOINFO*)lParam;
if (pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO)) {
- MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, _T(""), 0);
+ MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, L"", 0);
delSetting(DBSETTING_BLOGSTATUSMUSIC);
}
else if (pliInfo->dwFlags & LTI_UNICODE) {
@@ -312,7 +312,7 @@ INT_PTR CMraProto::MraSetListeningTo(WPARAM, LPARAM lParam) if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT))
wszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%track%. %title% - %artist% - %player%", (LPARAM)pliInfo));
else
- wszListeningTo.Format(L"%s. %s - %s - %s", pliInfo->ptszTrack ? pliInfo->ptszTrack : _T(""), pliInfo->ptszTitle ? pliInfo->ptszTitle : _T(""), pliInfo->ptszArtist ? pliInfo->ptszArtist : _T(""), pliInfo->ptszPlayer ? pliInfo->ptszPlayer : _T(""));
+ wszListeningTo.Format(L"%s. %s - %s - %s", pliInfo->ptszTrack ? pliInfo->ptszTrack : L"", pliInfo->ptszTitle ? pliInfo->ptszTitle : L"", pliInfo->ptszArtist ? pliInfo->ptszArtist : L"", pliInfo->ptszPlayer ? pliInfo->ptszPlayer : L"");
mraSetStringExW(NULL, DBSETTING_BLOGSTATUSMUSIC, wszListeningTo);
MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, wszListeningTo, 0);
@@ -328,7 +328,7 @@ int CMraProto::MraMusicChanged(WPARAM wParam, LPARAM lParam) // stopped
if (1 == lParam) {
delSetting(DBSETTING_BLOGSTATUSMUSIC);
- MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, _T(""), 0);
+ MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, L"", 0);
}
break;
@@ -336,7 +336,7 @@ int CMraProto::MraMusicChanged(WPARAM wParam, LPARAM lParam) SONGINFO *psiSongInfo;
if (WAT_RES_OK == CallService(MS_WAT_GETMUSICINFO, WAT_INF_UNICODE, (LPARAM)&psiSongInfo)) {
CMStringW wszMusic;
- wszMusic.Format(_T("%ld. %s - %s - %s"), psiSongInfo->track, psiSongInfo->artist, psiSongInfo->title, psiSongInfo->player);
+ wszMusic.Format(L"%ld. %s - %s - %s", psiSongInfo->track, psiSongInfo->artist, psiSongInfo->title, psiSongInfo->player);
mraSetStringExW(NULL, DBSETTING_BLOGSTATUSMUSIC, wszMusic);
MraChangeUserBlogStatus(MRIM_BLOG_STATUS_MUSIC, wszMusic, 0);
}
@@ -374,7 +374,7 @@ DWORD CMraProto::MraSetXStatusInternal(DWORD dwXStatus) DWORD dwOldStatusMode = InterlockedExchange((volatile LONG*)&m_iXStatus, dwXStatus);
setByte(DBSETTING_XSTATUSID, (BYTE)dwXStatus);
- MraSendNewStatus(m_iStatus, dwXStatus, _T(""), _T(""));
+ MraSendNewStatus(m_iStatus, dwXStatus, L"", L"");
return dwOldStatusMode;
}
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index 8739f0e239..27a002ceba 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -359,8 +359,8 @@ int CMsnProto::MSN_GetPassportAuth(void) time_t ts = time(NULL);
TCHAR szTs1[64], szTs2[64];
- TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, _T("I"), szTs1, _countof(szTs1), 0);
- TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, _T("I"), szTs2, _countof(szTs2), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts, L"I", szTs1, _countof(szTs1), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, ts + 20 * 60, L"I", szTs2, _countof(szTs2), 0);
CMStringA szAuthInfo(FORMAT, authPacket, int(ts), MyOptions.szEmail, ptrA(HtmlEncode(szPassword)), szTs1, szTs2);
@@ -929,7 +929,7 @@ LRESULT CALLBACK AuthWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar * InternetGetCookieExA
*/
if (!fpInternetGetCookieExA) {
- HMODULE hMod = LoadLibrary(_T("wininet.dll"));
+ HMODULE hMod = LoadLibrary(L"wininet.dll");
if (hMod) fpInternetGetCookieExA = (pfnInternetGetCookieExA)GetProcAddress(hMod, "InternetGetCookieExA");
}
if (fpInternetGetCookieExA &&
@@ -969,7 +969,7 @@ void __cdecl CMsnProto::msn_IEAuthThread(void *pParam) HWND hWnd;
MSG msg;
WNDCLASSEX wc={0};
- static const TCHAR *ClassName = _T("SkypeLoginWindow");
+ static const TCHAR *ClassName = L"SkypeLoginWindow";
CoInitialize(NULL);
@@ -980,7 +980,7 @@ void __cdecl CMsnProto::msn_IEAuthThread(void *pParam) wc.lpszClassName = ClassName;
RegisterClassEx(&wc);
- if ((hWnd = CreateWindowEx(0, ClassName, _T("MSN Login"), WS_OVERLAPPEDWINDOW,
+ if ((hWnd = CreateWindowEx(0, ClassName, L"MSN Login", WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 640, 480,
HWND_DESKTOP, NULL, g_hInst, pParam))) {
ShowWindow( hWnd, SW_SHOW );
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 99e6354cd1..9c13070bc1 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -26,8 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_history.h>
static const TCHAR *m_ptszRoles[] = {
- _T("admin"),
- _T("user")
+ L"admin",
+ L"user"
};
MCONTACT CMsnProto::MSN_GetChatInernalHandle(MCONTACT hContact)
@@ -55,7 +55,7 @@ int CMsnProto::MSN_ChatInit(GCThreadData *info, const char *pszID, const char *p TCHAR szName[512];
InterlockedIncrement(&m_chatID);
if (*pszTopic) _tcsncpy(szName, _A2T(pszTopic), _countof(szName));
- else mir_sntprintf(szName, _T("%s %s%d"),
+ else mir_sntprintf(szName, L"%s %s%d",
m_tszUserName, TranslateT("Chat #"), m_chatID);
GCSESSION gcw = { sizeof(gcw) };
@@ -219,7 +219,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) hContInitiator = MSN_HContactFromEmail(initiator->txt);
gce.ptszText= GetContactNameT(hContInitiator);
}
- gce.ptszStatus = _T("admin");
+ gce.ptszStatus = L"admin";
}
if (gcd.iType) {
@@ -330,7 +330,7 @@ static void ChatInviteSend(HANDLE hItem, HWND hwndList, STRLIST &str, CMsnProto int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
if (chk) {
if (IsHContactInfo(hItem)) {
- TCHAR buf[128] = _T("");
+ TCHAR buf[128] = L"";
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
if (buf[0]) str.insert(mir_t2a(buf));
@@ -511,7 +511,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) GCDEST gcd = { m_szModuleName, gch->pDest->ptszID, GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszNick = bError ? _T("") : dbv.ptszVal;
+ gce.ptszNick = bError ? L"" : dbv.ptszVal;
gce.ptszUID = mir_a2t(MyOptions.szEmail);
gce.time = time(NULL);
gce.ptszText = gch->ptszText;
@@ -574,7 +574,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) case 40:
const TCHAR *pszRole = MSN_GCGetRole(MSN_GetThreadByChatId(gch->pDest->ptszID), _T2A(gch->ptszUID));
- MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, _T("admin"))) ? "user" : "admin");
+ MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, L"admin")) ? "user" : "admin");
break;
}
break;
@@ -605,7 +605,7 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam) {
{ LPGENT("User &details"), 10, MENU_ITEM, FALSE },
{ LPGENT("User &history"), 20, MENU_ITEM, FALSE },
- { _T(""), 100, MENU_SEPARATOR, FALSE },
+ { L"", 100, MENU_SEPARATOR, FALSE },
{ LPGENT("&Leave chat session"), 110, MENU_ITEM, FALSE }
};
gcmi->nItems = _countof(Items);
@@ -620,13 +620,13 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam) { LPGENT("&Op user") , 40, MENU_ITEM, FALSE }
};
GCThreadData* thread = MSN_GetThreadByChatId(gcmi->pszID);
- if (thread && thread->mMe && mir_tstrcmpi(thread->mMe->role, _T("admin"))) {
+ if (thread && thread->mMe && mir_tstrcmpi(thread->mMe->role, L"admin")) {
Items[2].bDisabled = TRUE;
Items[3].bDisabled = TRUE;
}
else {
const TCHAR *pszRole = MSN_GCGetRole(thread, email);
- if (pszRole && !mir_tstrcmpi(pszRole, _T("admin")))
+ if (pszRole && !mir_tstrcmpi(pszRole, L"admin"))
Items[3].pszDesc = LPGENT("&Deop user");
}
gcmi->nItems = _countof(Items);
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index a2a7dab1be..c2a02ae5c1 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -182,7 +182,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para msgBody = tHeader.readFromBuffer(msgBody);
if (!(email = NEWSTR_ALLOCA(tHeader["From"]))) return;
mChatID = mir_a2t(tHeader["To"]);
- if (_tcsncmp(mChatID, _T("19:"), 3)) mChatID[0]=0; // NETID_THREAD
+ if (_tcsncmp(mChatID, L"19:", 3)) mChatID[0]=0; // NETID_THREAD
msgBody = tHeader.readFromBuffer(msgBody);
msgBody = tHeader.readFromBuffer(msgBody);
nick = NEWSTR_ALLOCA(tHeader["IM-Display-Name"]);
@@ -848,7 +848,7 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) if (pCount > 12) lti.ptszType = mir_utf8decodeT(parts[12]);
else lti.ptszType = mir_utf8decodeT(parts[1]);
- TCHAR *cm = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)<i);
+ TCHAR *cm = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)<i);
setTString(hContact, "ListeningTo", cm);
mir_free(cm);
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp index 60e9f12147..d047b03213 100644 --- a/protocols/MSN/src/msn_links.cpp +++ b/protocols/MSN/src/msn_links.cpp @@ -34,7 +34,7 @@ static MCONTACT GetContact(TCHAR *arg, TCHAR **pemail, CMsnProto *proto) TCHAR *tok = _tcschr(arg, '&'); /* next token */
if (tok != NULL) *tok++ = '\0';
- if (_tcsnicmp(arg, _T("contact="), 8) == 0) {
+ if (_tcsnicmp(arg, L"contact=", 8) == 0) {
arg += 8;
UrlDecode(arg);
email = arg;
@@ -85,7 +85,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) /* add a contact to the list */
- if (_tcsnicmp(arg, _T("add?"), 4) == 0) {
+ if (_tcsnicmp(arg, L"add?", 4) == 0) {
arg += 4;
TCHAR *email;
@@ -109,7 +109,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) }
/* send a message to a contact */
/* "voice" and "video" not yet implemented, perform same action as "chat" */
- else if (_tcsnicmp(arg, _T("chat?"), 5) == 0) {
+ else if (_tcsnicmp(arg, L"chat?", 5) == 0) {
arg += 5;
MCONTACT hContact = GetContact(arg, NULL, proto);
@@ -119,7 +119,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) return 0;
}
}
- else if (_tcsnicmp(arg, _T("voice?"), 6) == 0) {
+ else if (_tcsnicmp(arg, L"voice?", 6) == 0) {
arg += 6;
MCONTACT hContact = GetContact(arg, NULL, proto);
@@ -129,7 +129,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) return 0;
}
}
- else if (_tcsnicmp(arg, _T("video?"), 6) == 0) {
+ else if (_tcsnicmp(arg, L"video?", 6) == 0) {
arg += 6;
MCONTACT hContact = GetContact(arg, NULL, proto);
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 99ea736122..364d437356 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -388,7 +388,7 @@ void CMsnProto::displayEmailCount(MCONTACT hContact) rtrimt(name);
TCHAR szNick[128];
- mir_sntprintf(szNick, getByte("DisableHotmailJunk", 0) ? _T("%s [%d]") : _T("%s [%d][%d]"), name, mUnreadMessages, mUnreadJunkEmails);
+ mir_sntprintf(szNick, getByte("DisableHotmailJunk", 0) ? L"%s [%d]" : L"%s [%d][%d]", name, mUnreadMessages, mUnreadJunkEmails);
nickChg = true;
setTString(hContact, "Nick", szNick);
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 3ac3245410..6d5b581a89 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -118,7 +118,7 @@ void CMsnProto::InitCustomFolders(void) if (InitCstFldRan) return;
TCHAR folder[MAX_PATH];
- mir_sntprintf(folder, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
+ mir_sntprintf(folder, L"%%miranda_avatarcache%%\\%S", m_szModuleName);
hCustomSmileyFolder = FoldersRegisterCustomPathT(LPGEN("Custom Smileys"), m_szModuleName, folder, m_tszUserName);
InitCstFldRan = true;
@@ -170,7 +170,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) // MSN_GetAvatarFileName - gets a file name for an contact's avatar
void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
{
- size_t tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ size_t tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
if (_taccess(pszDest, 0))
CreateDirectoryTreeT(pszDest);
@@ -182,7 +182,7 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t char* szAvatarHash = MSN_GetAvatarHash(dbv.pszVal);
if (szAvatarHash != NULL) {
TCHAR *sztAvatarHash = mir_a2t(szAvatarHash);
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s."), sztAvatarHash);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s.", sztAvatarHash);
mir_free(sztAvatarHash);
mir_free(szAvatarHash);
}
@@ -197,12 +197,12 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t }
else {
TCHAR *sztModuleName = mir_a2t(m_szModuleName);
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s avatar."), sztModuleName);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s avatar.", sztModuleName);
mir_free(sztModuleName);
}
if (ext == NULL) {
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("*"));
+ mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"*");
bool found = false;
_tfinddata_t c_file;
@@ -210,7 +210,7 @@ void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t if (hFile > -1L) {
do {
if (_tcsrchr(c_file.name, '.')) {
- mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, _T("\\%s"), c_file.name);
+ mir_sntprintf(pszDest + tPathLen2, cbLen - tPathLen2, L"\\%s", c_file.name);
found = true;
}
} while (_tfindnext(hFile, &c_file) == 0);
@@ -317,10 +317,10 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s InitCustomFolders();
TCHAR* path = (TCHAR*)alloca(cbLen * sizeof(TCHAR));
- if (hCustomSmileyFolder == NULL || FoldersGetCustomPathT(hCustomSmileyFolder, path, (int)cbLen, _T(""))) {
- TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+ if (hCustomSmileyFolder == NULL || FoldersGetCustomPathT(hCustomSmileyFolder, path, (int)cbLen, L"")) {
+ TCHAR *tmpPath = Utils_ReplaceVarsT(L"%miranda_userdata%");
TCHAR *tszModuleName = mir_a2t(m_szModuleName);
- tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s\\CustomSmiley"), tmpPath, tszModuleName);
+ tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%s\\CustomSmiley", tmpPath, tszModuleName);
mir_free(tszModuleName);
mir_free(tmpPath);
}
@@ -337,12 +337,12 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s _ui64tot((UINT_PTR)hContact, dbv.ptszVal, 10);
}
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), dbv.ptszVal);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
db_free(&dbv);
}
else {
TCHAR *tszModuleName = mir_a2t(m_szModuleName);
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), tszModuleName);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", tszModuleName);
mir_free(tszModuleName);
}
@@ -357,8 +357,8 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, s CreateDirectoryTreeT(pszDest);
TCHAR *sztSmileyName = mir_a2t(SmileyName);
- mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s.%s"), sztSmileyName,
- type == MSN_APPID_CUSTOMSMILEY ? _T("png") : _T("gif"));
+ mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s.%s", sztSmileyName,
+ type == MSN_APPID_CUSTOMSMILEY ? L"png" : L"gif");
mir_free(sztSmileyName);
}
@@ -623,21 +623,21 @@ void CMsnProto::MSN_SendStatusMessage(const char*) if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) {
LISTENINGTOINFO lti = { 0 };
lti.cbSize = sizeof(lti);
- if (msnCurrentMedia.ptszTitle != NULL) lti.ptszTitle = _T("{0}");
- if (msnCurrentMedia.ptszArtist != NULL) lti.ptszArtist = _T("{1}");
- if (msnCurrentMedia.ptszAlbum != NULL) lti.ptszAlbum = _T("{2}");
- if (msnCurrentMedia.ptszTrack != NULL) lti.ptszTrack = _T("{3}");
- if (msnCurrentMedia.ptszYear != NULL) lti.ptszYear = _T("{4}");
- if (msnCurrentMedia.ptszGenre != NULL) lti.ptszGenre = _T("{5}");
- if (msnCurrentMedia.ptszLength != NULL) lti.ptszLength = _T("{6}");
- if (msnCurrentMedia.ptszPlayer != NULL) lti.ptszPlayer = _T("{7}");
- if (msnCurrentMedia.ptszType != NULL) lti.ptszType = _T("{8}");
-
- TCHAR *tmp = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)<i);
+ if (msnCurrentMedia.ptszTitle != NULL) lti.ptszTitle = L"{0}";
+ if (msnCurrentMedia.ptszArtist != NULL) lti.ptszArtist = L"{1}";
+ if (msnCurrentMedia.ptszAlbum != NULL) lti.ptszAlbum = L"{2}";
+ if (msnCurrentMedia.ptszTrack != NULL) lti.ptszTrack = L"{3}";
+ if (msnCurrentMedia.ptszYear != NULL) lti.ptszYear = L"{4}";
+ if (msnCurrentMedia.ptszGenre != NULL) lti.ptszGenre = L"{5}";
+ if (msnCurrentMedia.ptszLength != NULL) lti.ptszLength = L"{6}";
+ if (msnCurrentMedia.ptszPlayer != NULL) lti.ptszPlayer = L"{7}";
+ if (msnCurrentMedia.ptszType != NULL) lti.ptszType = L"{8}";
+
+ TCHAR *tmp = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)<i);
szFormatEnc = HtmlEncodeUTF8T(tmp);
mir_free(tmp);
}
- else szFormatEnc = HtmlEncodeUTF8T(_T("{0} - {1}"));
+ else szFormatEnc = HtmlEncodeUTF8T(L"{0} - {1}");
char *szArtist = HtmlEncodeUTF8T(msnCurrentMedia.ptszArtist),
*szAlbum = HtmlEncodeUTF8T(msnCurrentMedia.ptszAlbum),
@@ -788,7 +788,7 @@ void CMsnProto::MSN_SetServerStatus(int newStatus) if (!getStringUtf("Place", &dbv))
szPlace = dbv.pszVal;
else {
- TCHAR buf[128] = _T("Miranda");
+ TCHAR buf[128] = L"Miranda";
DWORD buflen = _countof(buf);
GetComputerName(buf, &buflen);
szPlace = mir_utf8encodeT(buf);
@@ -996,14 +996,14 @@ void CMsnProto::InitPopups(void) ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
- mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Hotmail"));
+ mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Hotmail"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Hotmail");
hPopupHotmail = Popup_RegisterClass(&ppc);
ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
- mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
+ mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Notify"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notify");
hPopupNotify = Popup_RegisterClass(&ppc);
@@ -1012,7 +1012,7 @@ void CMsnProto::InitPopups(void) ppc.colorText = RGB(255, 245, 225); //Yellow
ppc.iSeconds = 60;
- mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_sntprintf(desc, L"%s/%s", m_tszUserName, TranslateT("Error"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
hPopupError = Popup_RegisterClass(&ppc);
}
@@ -1026,7 +1026,7 @@ void CALLBACK sttMainThreadCallback(void *param) if ((iserr && !pud->proto->MyOptions.ShowErrorsAsPopups) || !ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
if (pud->flags & MSN_ALLOW_MSGBOX) {
TCHAR szMsg[MAX_SECONDLINE + MAX_CONTACTNAME];
- mir_sntprintf(szMsg, _T("%s:\n%s"), pud->title, pud->text);
+ mir_sntprintf(szMsg, L"%s:\n%s", pud->title, pud->text);
int ret = MessageBox(NULL, szMsg, TranslateT("MSN Protocol"),
MB_YESNO | (iserr ? MB_ICONERROR : MB_ICONINFORMATION));
if (ret == IDYES)
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 4db3c921d2..d7258e5533 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -492,7 +492,7 @@ void __cdecl CMsnProto::MsnFileAckThread(void* arg) filetransfer* ft = (filetransfer*)arg;
TCHAR filefull[MAX_PATH];
- mir_sntprintf(filefull, _T("%s\\%s"), ft->std.tszWorkingDir, ft->std.tszCurrentFile);
+ mir_sntprintf(filefull, L"%s\\%s", ft->std.tszWorkingDir, ft->std.tszCurrentFile);
replaceStrT(ft->std.tszCurrentFile, filefull);
ResetEvent(ft->hResumeEvt);
diff --git a/protocols/MSN/src/msn_skypeab.cpp b/protocols/MSN/src/msn_skypeab.cpp index 716b408726..d2b1b52444 100644 --- a/protocols/MSN/src/msn_skypeab.cpp +++ b/protocols/MSN/src/msn_skypeab.cpp @@ -45,7 +45,7 @@ static TCHAR* get_json_str(JSONNode *item, const char *pszValue) {
if (JSONNode *node = json_get(item, pszValue)) {
TCHAR *ret = json_as_string(node);
- if (!mir_tstrcmp(ret, _T("null"))) {
+ if (!mir_tstrcmp(ret, L"null")) {
mir_free(ret);
return NULL;
}
@@ -197,7 +197,7 @@ bool CMsnProto::MSN_SKYABGetProfile(const char *wlid) if (value = get_json_str(item, "gender")) setByte(hContact, "Gender", (BYTE)(_ttoi(value) == 1 ? 'M' : 'F'));
if (value = get_json_str(item, "birthday")) {
int d, m, y;
- _stscanf(value, _T("%d-%d-%d"), &y, &m, &d);
+ _stscanf(value, L"%d-%d-%d", &y, &m, &d);
setWord(hContact, "BirthYear", y);
setByte(hContact, "BirthDay", d);
setByte(hContact, "BirthMonth", m);
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index b8c52b9e73..09c8844223 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -282,7 +282,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) while (docstr) {
const char *docname = ezxml_txt(ezxml_child(docstr, "DocumentStreamName"));
if (!mir_strcmp(docname, "UserTileStatic")) {
- getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), _T("miranda_avatar.tmp"));
+ getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), L"miranda_avatar.tmp");
break;
}
docstr = ezxml_next(docstr);
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp index 4df80b1c65..1edd062c00 100644 --- a/protocols/MSN/src/msn_std.cpp +++ b/protocols/MSN/src/msn_std.cpp @@ -54,7 +54,7 @@ TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact) return m_DisplayNameCache = str;
}
- return _T("Me");
+ return L"Me";
}
unsigned MSN_GenRandom(void)
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 502ed01b46..0a9e5b5b0b 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -139,7 +139,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) ft->std.hContact = pai->hContact;
ft->p2p_object = mir_strdup(szContext);
- MSN_GetAvatarFileName(pai->hContact, filename, _countof(filename), _T("unk"));
+ MSN_GetAvatarFileName(pai->hContact, filename, _countof(filename), L"unk");
ft->std.tszCurrentFile = mir_tstrdup(filename);
p2p_invite(MSN_APPID_AVATAR, ft, NULL);
@@ -340,10 +340,10 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM, LPARAM lParam) msnCurrentMedia.cbSize = sizeof(msnCurrentMedia); // Marks that there is info set
msnCurrentMedia.dwFlags = LTI_TCHAR;
- overrideStr(msnCurrentMedia.ptszType, cm->ptszType, unicode, _T("Music"));
+ overrideStr(msnCurrentMedia.ptszType, cm->ptszType, unicode, L"Music");
overrideStr(msnCurrentMedia.ptszArtist, cm->ptszArtist, unicode);
overrideStr(msnCurrentMedia.ptszAlbum, cm->ptszAlbum, unicode);
- overrideStr(msnCurrentMedia.ptszTitle, cm->ptszTitle, unicode, _T("No Title"));
+ overrideStr(msnCurrentMedia.ptszTitle, cm->ptszTitle, unicode, L"No Title");
overrideStr(msnCurrentMedia.ptszTrack, cm->ptszTrack, unicode);
overrideStr(msnCurrentMedia.ptszYear, cm->ptszYear, unicode);
overrideStr(msnCurrentMedia.ptszGenre, cm->ptszGenre, unicode);
@@ -357,11 +357,11 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM, LPARAM lParam) else {
TCHAR *text;
if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT))
- text = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%title% - %artist%"), (LPARAM)&msnCurrentMedia);
+ text = (TCHAR *)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%title% - %artist%", (LPARAM)&msnCurrentMedia);
else {
text = (TCHAR *)mir_alloc(128 * sizeof(TCHAR));
- mir_sntprintf(text, 128, _T("%s - %s"), (msnCurrentMedia.ptszTitle ? msnCurrentMedia.ptszTitle : _T("")),
- (msnCurrentMedia.ptszArtist ? msnCurrentMedia.ptszArtist : _T("")));
+ mir_sntprintf(text, 128, L"%s - %s", (msnCurrentMedia.ptszTitle ? msnCurrentMedia.ptszTitle : L""),
+ (msnCurrentMedia.ptszArtist ? msnCurrentMedia.ptszArtist : L""));
}
setTString("ListeningTo", text);
mir_free(text);
diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp index 7cbbb474fb..4317adf91a 100644 --- a/protocols/MinecraftDynmap/src/chat.cpp +++ b/protocols/MinecraftDynmap/src/chat.cpp @@ -99,9 +99,9 @@ void MinecraftDynmapProto::AddChatContact(const char *name) gce.bIsMe = (m_nick == name); if (gce.bIsMe) - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; else - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT,0,reinterpret_cast<LPARAM>(&gce)); } @@ -140,10 +140,10 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - gce.ptszStatus = _T("Admin"); + gce.ptszStatus = L"Admin"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); - gce.ptszStatus = _T("Normal"); + gce.ptszStatus = L"Normal"; CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce)); // Note: Initialization will finish up in SetChatStatus, called separately diff --git a/protocols/MinecraftDynmap/src/communication.cpp b/protocols/MinecraftDynmap/src/communication.cpp index 9b2b6bca91..4e24ddafa4 100644 --- a/protocols/MinecraftDynmap/src/communication.cpp +++ b/protocols/MinecraftDynmap/src/communication.cpp @@ -281,7 +281,7 @@ bool MinecraftDynmapProto::doEvents() // TODO: there are also "channel" and "account" elements if (!time_ || !playerName_ || !message_) { - debugLog(_T("Error: No player name, time or text for message")); + debugLog(L"Error: No player name, time or text for message"); continue; } @@ -289,7 +289,7 @@ bool MinecraftDynmapProto::doEvents() std::string name = playerName_.as_string(); std::string message = message_.as_string(); - debugLog(_T("Received message: [%d] %s -> %s"), timestamp, name.c_str(), message.c_str()); + debugLog(L"Received message: [%d] %s -> %s", timestamp, name.c_str(), message.c_str()); UpdateChat(name.c_str(), message.c_str(), timestamp); } } diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index 57952c1a2e..f2a15d6065 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -52,7 +52,7 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const TCHAR* if (m_hNetlibUser == NULL) { TCHAR error[200]; mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); - MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } // Client instantiation diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index f82ff24fdc..6fe46e57b4 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -25,7 +25,7 @@ void OmegleProto::UpdateChat(const TCHAR *name, const TCHAR *message, bool addto {
// replace % to %% to not interfere with chat color codes
std::tstring smessage = message;
- utils::text::treplace_all(&smessage, _T("%"), _T("%%"));
+ utils::text::treplace_all(&smessage, L"%", L"%%");
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(gce), &gcd };
@@ -241,9 +241,9 @@ void OmegleProto::AddChatContact(const TCHAR *name) gce.bIsMe = mir_tstrcmp(name, this->facy.nick_);
if (gce.bIsMe)
- gce.ptszStatus = _T("Admin");
+ gce.ptszStatus = L"Admin";
else
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
}
@@ -281,10 +281,10 @@ INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress) GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
- gce.ptszStatus = _T("Admin");
+ gce.ptszStatus = L"Admin";
CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
SetTopic();
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index 2db3c5255b..db1391ba82 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -538,10 +538,10 @@ bool Omegle_client::events() for (size_t i = 0; i < size; i++) { likes += ptrT(json_as_string(json_at(items, i))); if (i < size - 1) - likes += _T(", "); + likes += L", "; } - parent->debugLog(_T("Got common likes: '%s'"), likes.c_str()); + parent->debugLog(L"Got common likes: '%s'", likes.c_str()); parent->SetTopic(likes.c_str()); } else if (name == "question") { @@ -556,7 +556,7 @@ bool Omegle_client::events() st.cbSize = sizeof(st); st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_on")); - ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(_T("Stranger"))); + ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(L"Stranger")); mir_sntprintf(st.tszText, TranslateT("%s is typing."), TranslateTS(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); @@ -569,7 +569,7 @@ bool Omegle_client::events() st.cbSize = sizeof(st); st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_off")); - ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(_T("Stranger"))); + ptrT who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_tstrdup(L"Stranger")); mir_sntprintf(st.tszText, TranslateT("%s stopped typing."), TranslateTS(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 3f464a4322..42d0249c1d 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -52,7 +52,7 @@ PROTO<OmegleProto>(proto_name, username) if (m_hNetlibUser == NULL) {
TCHAR error[200];
mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
- MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR);
}
facy.set_handle(m_hNetlibUser);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index d4aee066df..46cf1bbf83 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -27,12 +27,12 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch {
GList *members, *mem;
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_on_invited() start"));
+ proto->debugLog(L"mwServiceConf_on_invited() start");
members = mem = mwConference_getMembers(conf);
for (;mem;mem=mem->next) {
if (proto->my_login_info && strcmp(proto->my_login_info->login_id, ((mwLoginInfo*)mem->data)->login_id) == 0) {
- proto->debugLog(_T("mwServiceConf_on_invited() already present"));
+ proto->debugLog(L"mwServiceConf_on_invited() already present");
mwConference_reject(conf, 0, T2Utf(TranslateT("Invitation rejected - already present.")));
return;
}
@@ -46,11 +46,11 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch MultiByteToWideChar(CP_UTF8, 0, (const char*)invite, -1, ws_invite, 128);
if (MessageBoxW(0, ws_invite, ws_username, MB_OKCANCEL) == IDOK) {
- proto->debugLog(_T("mwServiceConf_on_invited() mwConference_accept"));
+ proto->debugLog(L"mwServiceConf_on_invited() mwConference_accept");
mwConference_accept(conf);
}
else {
- proto->debugLog(_T("mwServiceConf_on_invited() mwConference_reject"));
+ proto->debugLog(L"mwServiceConf_on_invited() mwConference_reject");
char* temp = mir_utf8encodeT(TranslateT("Your invitation has been rejected."));
mwConference_reject(conf, 0, temp);
mir_free(temp);
@@ -59,7 +59,7 @@ void mwServiceConf_on_invited(mwConference* conf, mwLoginInfo* inviter, const ch void CSametimeProto::ClearInviteQueue()
{
- debugLog(_T("CSametimeProto::ClearInviteQueue() start"));
+ debugLog(L"CSametimeProto::ClearInviteQueue() start");
if (!my_conference)
return;
@@ -106,7 +106,7 @@ void CSametimeProto::ClearInviteQueue() void mwServiceConf_conf_opened(mwConference* conf, GList* members)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_conf_opened() start"));
+ proto->debugLog(L"mwServiceConf_conf_opened() start");
TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf));
TCHAR* tszConfTitle = mir_utf8decodeT(mwConference_getTitle(conf));
@@ -139,7 +139,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) GList *user = members;
for (;user; user=user->next) {
- proto->debugLog(_T("mwServiceConf_conf_opened() add user"));
+ proto->debugLog(L"mwServiceConf_conf_opened() add user");
TCHAR* tszUserName = mir_utf8decodeT(((mwLoginInfo*)user->data)->user_name);
TCHAR* tszUserId = mir_utf8decodeT(((mwLoginInfo*)user->data)->login_id);
@@ -171,7 +171,7 @@ void mwServiceConf_conf_opened(mwConference* conf, GList* members) void mwServiceConf_conf_closed(mwConference* conf, guint32 reason)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_conf_closed() start"));
+ proto->debugLog(L"mwServiceConf_conf_closed() start");
TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf));
@@ -191,7 +191,7 @@ void mwServiceConf_conf_closed(mwConference* conf, guint32 reason) void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_on_peer_joined() start"));
+ proto->debugLog(L"mwServiceConf_on_peer_joined() start");
MCONTACT hContact = proto->FindContactByUserId(user->user_id);
if (!hContact) {
@@ -221,7 +221,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = tszUserName;
gce.ptszUID = tszUserId;
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
gce.time = (DWORD)time(0);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM) &gce);
@@ -235,7 +235,7 @@ void mwServiceConf_on_peer_joined(mwConference* conf, mwLoginInfo *user) void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_on_peer_parted() start"));
+ proto->debugLog(L"mwServiceConf_on_peer_parted() start");
ptrT tszConfId(mir_utf8decodeT(mwConference_getName(conf)));
ptrT tszUserName(mir_utf8decodeT(user->user_name));
@@ -250,7 +250,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = tszUserName;
gce.ptszUID = tszUserId;
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
gce.time = (DWORD)time(0);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
}
@@ -259,7 +259,7 @@ void mwServiceConf_on_peer_parted(mwConference* conf, mwLoginInfo* user) void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* what)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_on_text() start"));
+ proto->debugLog(L"mwServiceConf_on_text() start");
TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName(conf));
@@ -290,7 +290,7 @@ void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* wh void mwServiceConf_on_typing(mwConference* conf, mwLoginInfo* who, gboolean typing)
{
CSametimeProto* proto = getProtoFromMwConference(conf);
- proto->debugLog(_T("mwServiceConf_on_typing() start"));
+ proto->debugLog(L"mwServiceConf_on_typing() start");
///TODO unimplemented
}
@@ -312,7 +312,7 @@ mwConferenceHandler mwConference_handler = { void CSametimeProto::TerminateConference(char* name)
{
- debugLog(_T("CSametimeProto::TerminateConference() start"));
+ debugLog(L"CSametimeProto::TerminateConference() start");
GList *conferences, *conf;
conferences = conf = mwServiceConference_getConferences(service_conference);
@@ -346,17 +346,17 @@ int CSametimeProto::GcEventHook(WPARAM wParam, LPARAM lParam) { switch(gch->pDest->iType) {
case GC_USER_MESSAGE:
{
- debugLog(_T("CSametimeProto::GcEventHook() GC_USER_MESSAGE"));
+ debugLog(L"CSametimeProto::GcEventHook() GC_USER_MESSAGE");
mwConference_sendText((mwConference*)conf->data, T2Utf(gch->ptszText));
}
break;
case GC_SESSION_TERMINATE:
{
if (my_conference == conf->data){
- debugLog(_T("CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference"));
+ debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE CloseMyConference");
CloseMyConference(this);
} else {
- debugLog(_T("CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy"));
+ debugLog(L"CSametimeProto::GcEventHook() GC_SESSION_TERMINATE mwConference_destroy");
mwConference_destroy((mwConference*)conf->data, 0, T2Utf(TranslateT("I'm outa here.")));
}
}
@@ -378,7 +378,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) { if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0)
return 0;
- debugLog(_T("CSametimeProto::ChatDeleted() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::ChatDeleted() hContact=[%x]", hContact);
DBVARIANT dbv;
if (!db_get_s(hContact, m_szModuleName, "ChatRoomID", &dbv)) {
TerminateConference(dbv.pszVal);
@@ -392,7 +392,7 @@ int CSametimeProto::ChatDeleted(MCONTACT hContact) { INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(_T("CSametimeProto::onMenuLeaveChat() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::onMenuLeaveChat() hContact=[%x]", hContact);
ChatDeleted(hContact);
return 0;
}
@@ -401,7 +401,7 @@ INT_PTR CSametimeProto::onMenuLeaveChat(WPARAM wParam, LPARAM lParam) INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(_T("CSametimeProto::onMenuCreateChat() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::onMenuCreateChat() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
mwIdBlock idb;
if (my_login_info && GetAwareIdFromContact(hContact, &id_block)) {
@@ -416,12 +416,12 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) invite_queue.push(idb.user);
if (!my_conference) {
- debugLog(_T("CSametimeProto::onMenuCreateChat() mwConference_open"));
+ debugLog(L"CSametimeProto::onMenuCreateChat() mwConference_open");
my_conference = mwConference_new(service_conference, T2Utf(title));
mwConference_open(my_conference);
}
else {
- debugLog(_T("CSametimeProto::onMenuCreateChat() ClearInviteQueue"));
+ debugLog(L"CSametimeProto::onMenuCreateChat() ClearInviteQueue");
ClearInviteQueue();
}
@@ -434,7 +434,7 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
MCONTACT hContact = (MCONTACT)wParam;
- debugLog(_T("CSametimeProto::PrebuildContactMenu() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::PrebuildContactMenu() hContact=[%x]", hContact);
Menu_ShowItem(hLeaveChatMenuItem, db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1);
@@ -463,7 +463,7 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) void CSametimeProto::InitConference()
{
- debugLog(_T("CSametimeProto::InitConference()"));
+ debugLog(L"CSametimeProto::InitConference()");
my_login_info = mwSession_getLoginInfo(session);
@@ -476,7 +476,7 @@ void CSametimeProto::InitConference() void CSametimeProto::DeinitConference()
{
GList *conferences, *conf;
- debugLog(_T("CSametimeProto::DeinitConference()"));
+ debugLog(L"CSametimeProto::DeinitConference()");
if (service_conference){
conferences = conf = mwServiceConference_getConferences(service_conference);
@@ -500,7 +500,7 @@ void CSametimeProto::DeinitConference() void CSametimeProto::InitConferenceMenu()
{
- debugLog(_T("CSametimeProto::InitConferenceMenu()"));
+ debugLog(L"CSametimeProto::InitConferenceMenu()");
CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp index 4782563a7e..bbc71b346b 100644 --- a/protocols/Sametime/src/files.cpp +++ b/protocols/Sametime/src/files.cpp @@ -13,11 +13,11 @@ CSametimeProto* getProtoFromMwFileTransfer(mwFileTransfer* ft) void mwFileTransfer_offered(mwFileTransfer* ft)
{
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- proto->debugLog(_T("mwFileTransfer_offered() start"));
+ proto->debugLog(L"mwFileTransfer_offered() start");
const mwIdBlock* idb = mwFileTransfer_getUser(ft);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
- proto->debugLog(_T("Sametime mwFileTransfer_offered hContact=[%x]"), hContact);
+ proto->debugLog(L"Sametime mwFileTransfer_offered hContact=[%x]", hContact);
if (!hContact) {
mwSametimeList* user_list = mwSametimeList_new();
@@ -33,7 +33,7 @@ void mwFileTransfer_offered(mwFileTransfer* ft) TCHAR descriptionT[512];
if (message) {
TCHAR* messageT = mir_utf8decodeT(message);
- mir_sntprintf(descriptionT, _T("%s - %s"), filenameT, messageT);
+ mir_sntprintf(descriptionT, L"%s - %s", filenameT, messageT);
mir_free(messageT);
} else
_tcsncpy_s(descriptionT, filenameT, _TRUNCATE);
@@ -59,7 +59,7 @@ int SendFileChunk(CSametimeProto* proto, mwFileTransfer* ft, FileTransferClientD return 0;
if (!ReadFile(ftcd->hFile, ftcd->buffer, FILE_BUFF_SIZE, &bytes_read, 0)) {
- proto->debugLog(_T("Sametime closing file transfer (SendFileChunk)"));
+ proto->debugLog(L"Sametime closing file transfer (SendFileChunk)");
mwFileTransfer_close(ft, mwFileTransfer_SUCCESS);
return 0;
}
@@ -79,7 +79,7 @@ void __cdecl SendThread(LPVOID param) { CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(_T("SendThread() start"));
+ proto->debugLog(L"SendThread() start");
PROTOFILETRANSFERSTATUS pfts = {0};
@@ -114,7 +114,7 @@ void __cdecl SendThread(LPVOID param) { if (ftcd->buffer) delete[] ftcd->buffer;
delete ftcd;
- proto->debugLog(_T("SendThread() end"));
+ proto->debugLog(L"SendThread() end");
return;
}
@@ -124,7 +124,7 @@ void mwFileTransfer_opened(mwFileTransfer* ft) CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(_T("Sametime mwFileTransfer_opened start"));
+ proto->debugLog(L"Sametime mwFileTransfer_opened start");
if (ftcd->sending) {
// create a thread to send chunks - since it seems not all clients send acks for each of our chunks!
@@ -139,7 +139,7 @@ void mwFileTransfer_closed(mwFileTransfer* ft, guint32 code) {
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(_T("mwFileTransfer_closed() start"));
+ proto->debugLog(L"mwFileTransfer_closed() start");
if (ftcd) {
if (ftcd->hFile != INVALID_HANDLE_VALUE)
@@ -217,14 +217,14 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data) {
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(_T("mwFileTransfer_recv() start"));
+ proto->debugLog(L"mwFileTransfer_recv() start");
DWORD bytes_written;
if (!WriteFile(ftcd->hFile, data->data, data->len, &bytes_written, 0)) {
- proto->debugLog(_T("mwFileTransfer_recv() !WriteFile"));
+ proto->debugLog(L"mwFileTransfer_recv() !WriteFile");
mwFileTransfer_cancel(ft);
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ftcd->hFt, 0);
- proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_FAILED"));
+ proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_FAILED");
}
else {
mwFileTransfer_ack(ft); // acknowledge chunk
@@ -248,11 +248,11 @@ void mwFileTransfer_recv(mwFileTransfer* ft, struct mwOpaque* data) pfts.currentFileTime = 0; //?
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ftcd->hFt, (LPARAM)&pfts);
- proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_DATA"));
+ proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_DATA");
if (mwFileTransfer_isDone(ft)) {
proto->ProtoBroadcastAck(ftcd->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ftcd->hFt, 0);
- proto->debugLog(_T("mwFileTransfer_recv() ACKRESULT_SUCCESS"));
+ proto->debugLog(L"mwFileTransfer_recv() ACKRESULT_SUCCESS");
}
}
}
@@ -265,7 +265,7 @@ void mwFileTransfer_handle_ack(mwFileTransfer* ft) // see SendThread above - not all clients send us acks
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
//FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
- proto->debugLog(_T("mwFileTransfer_handle_ack()"));
+ proto->debugLog(L"mwFileTransfer_handle_ack()");
}
/** optional. called from mwService_free */
@@ -284,7 +284,7 @@ mwFileTransferHandler mwFileTransfer_handler = { HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, TCHAR** files, const TCHAR* ptszDesc)
{
- debugLog(_T("CSametimeProto::SendFilesToUser() start"));
+ debugLog(L"CSametimeProto::SendFilesToUser() start");
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -359,7 +359,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(_T("CSametimeProto::AcceptFileTransfer() start"));
+ debugLog(L"CSametimeProto::AcceptFileTransfer() start");
FileTransferClientData* ftcd = new FileTransferClientData;
memset(ftcd, 0, sizeof(FileTransferClientData));
@@ -388,7 +388,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s ftcd->hFile = CreateFileA(fp, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, 0, 0);
if (ftcd->hFile == INVALID_HANDLE_VALUE) {
- debugLog(_T("CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE"));
+ debugLog(L"CSametimeProto::AcceptFileTransfer() INVALID_HANDLE_VALUE");
mwFileTransfer_close(ft, mwFileTransfer_ERROR);
return 0;
}
@@ -405,7 +405,7 @@ void CSametimeProto::RejectFileTransfer(HANDLE hFt) {
mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(_T("CSametimeProto::RejectFileTransfer() start"));
+ debugLog(L"CSametimeProto::RejectFileTransfer() start");
mwFileTransfer_reject(ft);
}
@@ -414,7 +414,7 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt) {
mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
- debugLog(_T("CSametimeProto::CancelFileTransfer() start"));
+ debugLog(L"CSametimeProto::CancelFileTransfer() start");
FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
@@ -429,13 +429,13 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt) void CSametimeProto::InitFiles()
{
- debugLog(_T("CSametimeProto::InitFiles()"));
+ debugLog(L"CSametimeProto::InitFiles()");
mwSession_addService(session, (mwService*)(service_files = mwServiceFileTransfer_new(session, &mwFileTransfer_handler)));
}
void CSametimeProto::DeinitFiles()
{
- debugLog(_T("CSametimeProto::DeinitFiles()"));
+ debugLog(L"CSametimeProto::DeinitFiles()");
mwSession_removeService(session, mwService_FILE_TRANSFER);
mwService_free((mwService*)service_files);
service_files = 0;
diff --git a/protocols/Sametime/src/messaging.cpp b/protocols/Sametime/src/messaging.cpp index 0a7f8a24f2..2bde61b90e 100644 --- a/protocols/Sametime/src/messaging.cpp +++ b/protocols/Sametime/src/messaging.cpp @@ -12,13 +12,13 @@ CSametimeProto* getProtoFromMwConversation(mwConversation* conv) void mwIm_conversation_opened(mwConversation* conv)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(_T("mwIm_conversation_opened() start"));
+ proto->debugLog(L"mwIm_conversation_opened() start");
mwIdBlock* idb = mwConversation_getTarget(conv);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
if (!hContact) {
- proto->debugLog(_T("mwIm_conversation_opened() !hContact"));
+ proto->debugLog(L"mwIm_conversation_opened() !hContact");
mwSametimeList* user_list = mwSametimeList_new();
mwSametimeGroup* stgroup = mwSametimeGroup_new(user_list, mwSametimeGroup_NORMAL, Translate("None"));
mwSametimeUser* stuser = mwSametimeUser_new(stgroup, mwSametimeUser_NORMAL, idb);
@@ -45,7 +45,7 @@ void mwIm_conversation_opened(mwConversation* conv) void mwIm_conversation_closed(mwConversation* conv, guint32 err)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(_T("mwIm_conversation_closed() start err=[%d]"), err);
+ proto->debugLog(L"mwIm_conversation_closed() start err=[%d]", err);
if (err & ERR_FAILURE && err != CONNECTION_RESET) {
proto->showPopup(err);
@@ -67,11 +67,11 @@ void mwIm_conversation_closed(mwConversation* conv, guint32 err) void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpointer msg)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(_T("mwIm_conversation_recv() start"));
+ proto->debugLog(L"mwIm_conversation_recv() start");
mwIdBlock* idb = mwConversation_getTarget(conv);
MCONTACT hContact = proto->FindContactByUserId(idb->user);
- proto->debugLog(_T("mwIm_conversation_recv() type=[%d] hContact=[%x]"), type, hContact);
+ proto->debugLog(L"mwIm_conversation_recv() type=[%d] hContact=[%x]", type, hContact);
if (type == mwImSend_TYPING) {
CallService(MS_PROTO_CONTACTISTYPING, hContact, (GPOINTER_TO_UINT(msg) == 0 ? 0 : 2));
@@ -91,7 +91,7 @@ void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpoint void mwIm_place_invite(struct mwConversation* conv, const char* message, const char* title, const char* name)
{
CSametimeProto* proto = getProtoFromMwConversation(conv);
- proto->debugLog(_T("mwIm_place_invite() start"));
+ proto->debugLog(L"mwIm_place_invite() start");
///TODO unimplemented
@@ -114,7 +114,7 @@ mwImHandler mwIm_handler = { HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg)
{
- debugLog(_T("CSametimeProto::SendMessageToUser() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::SendMessageToUser() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -125,13 +125,13 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (!mwConversation_isOpen(conv)) {
- debugLog(_T("CSametimeProto::SendMessageToUser() mwConversation_isOpen"));
+ debugLog(L"CSametimeProto::SendMessageToUser() mwConversation_isOpen");
mir_cslock lck(q_cs);
contact_message_queue[hContact].push(szMsg);
mwConversation_open(conv);
}
else {
- debugLog(_T("CSametimeProto::SendMessageToUser() !mwConversation_isOpen"));
+ debugLog(L"CSametimeProto::SendMessageToUser() !mwConversation_isOpen");
mwConversation_send(conv, mwImSend_PLAIN, szMsg);
}
@@ -147,7 +147,7 @@ HANDLE CSametimeProto::SendMessageToUser(MCONTACT hContact, const char *szMsg) void CSametimeProto::SendTyping(MCONTACT hContact, bool typing)
{
- debugLog(_T("CSametimeProto::SendTyping() hContact=[%x] type=[%d]"), hContact, typing);
+ debugLog(L"CSametimeProto::SendTyping() hContact=[%x] type=[%d]", hContact, typing);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -158,7 +158,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (mwConversation_isOpen(conv)) {
- debugLog(_T("CSametimeProto::SendTyping() send"));
+ debugLog(L"CSametimeProto::SendTyping() send");
mwConversation_send(conv, mwImSend_TYPING, (gconstpointer)GUINT_TO_POINTER(typing ? 1 : 0));
}
}
@@ -169,7 +169,7 @@ void CSametimeProto::SendTyping(MCONTACT hContact, bool typing) void CSametimeProto::CloseIm(MCONTACT hContact)
{
- debugLog(_T("CSametimeProto::CloseIm() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::CloseIm() hContact=[%x]", hContact);
mwAwareIdBlock id_block;
if (GetAwareIdFromContact(hContact, &id_block)) {
@@ -180,7 +180,7 @@ void CSametimeProto::CloseIm(MCONTACT hContact) mwConversation* conv = mwServiceIm_getConversation(service_im, &idb);
if (conv) {
if (mwConversation_isOpen(conv)) {
- debugLog(_T("CSametimeProto::CloseIm() mwConversation_close"));
+ debugLog(L"CSametimeProto::CloseIm() mwConversation_close");
mwConversation_close(conv, 0);
}
}
@@ -190,14 +190,14 @@ void CSametimeProto::CloseIm(MCONTACT hContact) void CSametimeProto::InitMessaging()
{
- debugLog(_T("CSametimeProto::InitMessaging()"));
+ debugLog(L"CSametimeProto::InitMessaging()");
mwSession_addService(session, (mwService*)(service_im = mwServiceIm_new(session, &mwIm_handler)));
mwServiceIm_setClientType(service_im, mwImClient_PLAIN);
}
void CSametimeProto::DeinitMessaging()
{
- debugLog(_T("CSametimeProto::DeinitMessaging()"));
+ debugLog(L"CSametimeProto::DeinitMessaging()");
mwSession_removeService(session, mwService_IM);
mwService_free((mwService*)service_im);
service_im = 0;
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index 6d47ca05fd..9f31d92ba6 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -7,30 +7,30 @@ #define NUM_IDS 24
TCHAR* client_names[NUM_IDS] = {
- _T("Official Binary Library"),
- _T("Official Java Applet"),
- _T("Official Binary Application"),
- _T("Official Java Application"),
- _T("Notes 6.5"),
- _T("Notes 7.0"),
- _T("Notes 8.0 Basic"),
- _T("Notes 8.5.2"),
- _T("Sametime Connect 8.0"),
- _T("Sametime Connect 8.5.2"),
- _T("ICT"),
- _T("NotesBuddy"),
- _T("NotesBuddy 4.15"),
- _T("Sanity"),
- _T("Perl"),
- _T("PMR Alert"),
- _T("Trillian (SourceForge)"),
- _T("Trillian (IBM)"),
- _T("Meanwhile Library"),
- _T("Meanwhile (Python)"),
- _T("Meanwhile (Gaim)"),
- _T("Meanwhile (Adium)"),
- _T("Meanwhile (Kopete)"),
- _T("Custom")
+ L"Official Binary Library",
+ L"Official Java Applet",
+ L"Official Binary Application",
+ L"Official Java Application",
+ L"Notes 6.5",
+ L"Notes 7.0",
+ L"Notes 8.0 Basic",
+ L"Notes 8.5.2",
+ L"Sametime Connect 8.0",
+ L"Sametime Connect 8.5.2",
+ L"ICT",
+ L"NotesBuddy",
+ L"NotesBuddy 4.15",
+ L"Sanity",
+ L"Perl",
+ L"PMR Alert",
+ L"Trillian (SourceForge)",
+ L"Trillian (IBM)",
+ L"Meanwhile Library",
+ L"Meanwhile (Python)",
+ L"Meanwhile (Gaim)",
+ L"Meanwhile (Adium)",
+ L"Meanwhile (Kopete)",
+ L"Custom"
};
int client_ids[NUM_IDS] = {
0x1000,
@@ -66,11 +66,11 @@ int client_ids[NUM_IDS] = { #define NUM_CVS 5
TCHAR* CV_names[NUM_CVS] = {
- _T("Sametime (Use old client version)"),
- _T("Sametime (Miranda default)"),
- _T("Sametime 8"),
- _T("Sametime 8.5.1"),
- _T("Sametime 8.5.2")
+ L"Sametime (Use old client version)",
+ L"Sametime (Miranda default)",
+ L"Sametime 8",
+ L"Sametime 8.5.1",
+ L"Sametime 8.5.2"
};
int CV_major[NUM_CVS] = {
MW_PROTOCOL_VERSION_MAJOR,
@@ -238,7 +238,7 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ofn.hwndOwner = hwndDlg;
ofn.Flags = CC_FULLOPEN;
ofn.nMaxFile = MAX_PATH;
- ofn.lpstrFilter = _T("All\0*.*\0");
+ ofn.lpstrFilter = L"All\0*.*\0";
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
@@ -410,9 +410,9 @@ void CSametimeProto::LoadOptions() if (options.err_method == ED_POP && !ServiceExists(MS_POPUP_SHOWMESSAGE)) options.err_method = ED_BAL;
if (options.err_method == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) options.err_method = ED_MB;
- debugLog(_T("LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]"), options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword));
- debugLog(_T("LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]"), options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor);
- debugLog(_T("LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]"), options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method);
+ debugLog(L"LoadOptions() loaded: ServerName:len=[%d], id:len=[%d], pword:len=[%d]", options.server_name == NULL ? -1 : mir_strlen(options.server_name), options.id == NULL ? -1 : mir_strlen(options.id), options.pword == NULL ? -1 : mir_strlen(options.pword));
+ debugLog(L"LoadOptions() loaded: port=[%d], encrypt_session=[%d], ClientID=[%d], ClientVersionMajor=[%d], ClientVersionMinor=[%d]", options.port, options.encrypt_session, options.client_id, options.client_versionMajor, options.client_versionMinor);
+ debugLog(L"LoadOptions() loaded: get_server_contacts=[%d], add_contacts=[%d], idle_as_away=[%d], err_method=[%d]", options.get_server_contacts, options.add_contacts, options.idle_as_away, options.err_method);
}
diff --git a/protocols/Sametime/src/places.cpp b/protocols/Sametime/src/places.cpp index c7c0a19adf..9bffaa9ac3 100644 --- a/protocols/Sametime/src/places.cpp +++ b/protocols/Sametime/src/places.cpp @@ -54,13 +54,13 @@ mwPlaceHandler mwPlace_handler = { void CSametimeProto::InitPlaces(mwSession* session)
{
- debugLog(_T("CSametimeProto::InitPlaces()"));
+ debugLog(L"CSametimeProto::InitPlaces()");
mwSession_addService(session, (mwService*)(service_places = mwServicePlace_new(session, &mwPlace_handler)));
}
void CSametimeProto::DeinitPlaces(mwSession* session)
{
- debugLog(_T("CSametimeProto::DeinitPlaces()"));
+ debugLog(L"CSametimeProto::DeinitPlaces()");
mwSession_removeService(session, mwService_PLACE);
mwService_free((mwService*)service_places);
service_places = 0;
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 3f04f7ee22..6a9e9a3169 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -124,12 +124,12 @@ void __cdecl sttFakeAckInfoSuccessThread(void *param) {
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(_T("sttFakeAckInfoSuccessThread() start"));
+ proto->debugLog(L"sttFakeAckInfoSuccessThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- proto->debugLog(_T("sttFakeAckInfoSuccessThread() end"));
+ proto->debugLog(L"sttFakeAckInfoSuccessThread() end");
mir_free(tParam);
}
@@ -137,12 +137,12 @@ void __cdecl sttFakeAckMessageSuccessThread(void *param) {
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(_T("sttFakeAckMessageSuccessThread() start"));
+ proto->debugLog(L"sttFakeAckMessageSuccessThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)tParam->lParam, 0);
- proto->debugLog(_T("sttFakeAckMessageSuccessThread() end"));
+ proto->debugLog(L"sttFakeAckMessageSuccessThread() end");
mir_free(tParam);
}
@@ -150,12 +150,12 @@ void __cdecl sttFakeAckMessageFailedThread(void *param) {
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(_T("sttFakeAckMessageFailedThread() start"));
+ proto->debugLog(L"sttFakeAckMessageFailedThread() start");
Sleep(100);
proto->ProtoBroadcastAck(tParam->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, tParam->lParam); ///TODO tParam->lParam: add error message
- proto->debugLog(_T("sttFakeAckMessageFailedThread() end"));
+ proto->debugLog(L"sttFakeAckMessageFailedThread() end");
mir_free(tParam);
}
@@ -163,12 +163,12 @@ void __cdecl sttRecvAwayThread(void *param) {
TFakeAckParams* tParam = (TFakeAckParams*)param;
CSametimeProto* proto = tParam->proto;
- proto->debugLog(_T("sttRecvAwayThread() start"));
+ proto->debugLog(L"sttRecvAwayThread() start");
Sleep(100);
proto->UserRecvAwayMessage(tParam->hContact);
- proto->debugLog(_T("sttRecvAwayThread() end"));
+ proto->debugLog(L"sttRecvAwayThread() end");
free(tParam);
}
@@ -223,7 +223,7 @@ int CSametimeProto::OnSametimeContactDeleted(WPARAM hContact, LPARAM) void CSametimeProto::SetAllOffline()
{
- debugLog(_T("SetAllOffline() start"));
+ debugLog(L"SetAllOffline() start");
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0)) {
@@ -241,7 +241,7 @@ void CSametimeProto::BroadcastNewStatus(int iNewStatus) if (m_iStatus == iNewStatus)
return;
- debugLog(_T("BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]"), m_iStatus, iNewStatus);
+ debugLog(L"BroadcastNewStatus() m_iStatus=[%d], iNewStatus=[%d]", m_iStatus, iNewStatus);
previous_status = m_iStatus;
m_iStatus = iNewStatus;
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index aa7f4a7409..4278a309c8 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -24,7 +24,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
RegisterGLibLogger();
- debugLog(_T("CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]"), _A2T(m_szModuleName), m_tszUserName);
+ debugLog(L"CSametimeProto::CSametimeProto() start m_szModuleName=[%s], m_tszUserName=[%s]", _A2T(m_szModuleName), m_tszUserName);
SametimeInitIcons();
@@ -58,17 +58,17 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam LoadOptions();
- debugLog(_T("CSametimeProto::CSametimeProto() end"));
+ debugLog(L"CSametimeProto::CSametimeProto() end");
}
CSametimeProto::~CSametimeProto()
{
- debugLog(_T("CSametimeProto::~CSametimeProto() start"));
+ debugLog(L"CSametimeProto::~CSametimeProto() start");
DeinitAwayMsg();
UnregisterPopups();
- debugLog(_T("CSametimeProto::~CSametimeProto() end"));
+ debugLog(L"CSametimeProto::~CSametimeProto() end");
UnRegisterGLibLogger();
Netlib_CloseHandle(m_hNetlibUser);
@@ -79,13 +79,13 @@ CSametimeProto::~CSametimeProto() MCONTACT CSametimeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
MYPROTOSEARCHRESULT* sr = (MYPROTOSEARCHRESULT*)psr;
- debugLog(_T("CSametimeProto::AddToList() flags=[%d]"), flags);
+ debugLog(L"CSametimeProto::AddToList() flags=[%d]", flags);
return AddSearchedUser(sr, flags & PALF_TEMPORARY);
}
HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
- debugLog(_T("CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]"), hContact, szPath);
+ debugLog(L"CSametimeProto::FileAllow() hContact=[%x], szPath=[%s]", hContact, szPath);
char* szPathA = mir_t2a(szPath);
HANDLE res = AcceptFileTransfer(hContact, hTransfer, szPathA);
mir_free(szPathA);
@@ -94,21 +94,21 @@ HANDLE CSametimeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHA int CSametimeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
- debugLog(_T("CSametimeProto::FileCancel() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::FileCancel() hContact=[%x]", hContact);
CancelFileTransfer(hTransfer);
return 0;
}
int CSametimeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
- debugLog(_T("CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]"), hContact, szReason);
+ debugLog(L"CSametimeProto::FileDeny() hContact=[%x], szReason=[%s]", hContact, szReason);
RejectFileTransfer(hTransfer);
return 0;
}
int CSametimeProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename)
{
- debugLog(_T("CSametimeProto::FileResume() action=[%d]"), &action);
+ debugLog(L"CSametimeProto::FileResume() action=[%d]", &action);
return 0;
}
@@ -138,7 +138,7 @@ DWORD_PTR CSametimeProto::GetCaps(int type, MCONTACT hContact) int CSametimeProto::GetInfo(MCONTACT hContact, int infoType)
{
// GetInfo - retrieves a contact info
- debugLog(_T("CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]"), hContact, infoType);
+ debugLog(L"CSametimeProto::GetInfo() hContact=[%x], infoType=[%d]", hContact, infoType);
if (getByte(hContact, "ChatRoom", 0))
return 1;
@@ -159,7 +159,7 @@ int CSametimeProto::GetInfo(MCONTACT hContact, int infoType) HANDLE CSametimeProto::SearchBasic(const TCHAR* id)
{
- debugLog(_T("CSametimeProto::SearchBasic() id:len=[%d]"), id == NULL ? -1 : mir_tstrlen(id));
+ debugLog(L"CSametimeProto::SearchBasic() id:len=[%d]", id == NULL ? -1 : mir_tstrlen(id));
return (HANDLE)SearchForUser(T2Utf(id), FALSE);
///TODO - add timeout (like at GGPROTO::searchthread)
}
@@ -168,7 +168,7 @@ HWND CSametimeProto::SearchAdvanced(HWND owner) {
TCHAR buf[512];
if (GetDlgItemText(owner, IDC_EDIT1, buf, _countof(buf))) {
- debugLog(_T("CSametimeProto::SearchAdvanced() buf:len=[%d]"), mir_tstrlen(buf));
+ debugLog(L"CSametimeProto::SearchAdvanced() buf:len=[%d]", mir_tstrlen(buf));
return (HWND)SearchForUser(T2Utf(buf), TRUE);
}
return NULL;
@@ -176,14 +176,14 @@ HWND CSametimeProto::SearchAdvanced(HWND owner) HWND CSametimeProto::CreateExtendedSearchUI(HWND owner)
{
- debugLog(_T("CSametimeProto::CreateExtendedSearchUI() start"));
+ debugLog(L"CSametimeProto::CreateExtendedSearchUI() start");
return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_USERSEARCH), owner, SearchDialogFunc, (LPARAM)this);
}
int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
- debugLog(_T("CSametimeProto::RecvFile() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::RecvFile() hContact=[%x]", hContact);
db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
@@ -193,7 +193,7 @@ int CSametimeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre) int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
- debugLog(_T("CSametimeProto::RecvMsg() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::RecvMsg() hContact=[%x]", hContact);
db_unset(hContact, "CList", "Hidden");
db_unset(hContact, "CList", "NotOnList");
@@ -203,7 +203,7 @@ int CSametimeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) HANDLE CSametimeProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
- debugLog(_T("CSametimeProto::SendFile() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::SendFile() hContact=[%x]", hContact);
if (m_iStatus != ID_STATUS_OFFLINE) {
if (hContact && ppszFiles && szDescription) {
if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
@@ -216,7 +216,7 @@ HANDLE CSametimeProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, T int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg)
{
- debugLog(_T("CSametimeProto::SendMsg() hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::SendMsg() hContact=[%x]", hContact);
char *proto = GetContactProto(hContact);
if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
@@ -244,7 +244,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg) int CSametimeProto::SetStatus(int iNewStatus)
{
- debugLog(_T("CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]"), m_iStatus, m_iDesiredStatus, iNewStatus);
+ debugLog(L"CSametimeProto::SetStatus() m_iStatus=[%d], m_iDesiredStatus=[%d], iNewStatus=[%d]", m_iStatus, m_iDesiredStatus, iNewStatus);
m_iDesiredStatus = iNewStatus;
if (iNewStatus != ID_STATUS_OFFLINE) {
if (m_iStatus == ID_STATUS_OFFLINE)
@@ -261,7 +261,7 @@ int CSametimeProto::SetStatus(int iNewStatus) HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact)
{
- debugLog(_T("CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]"), hContact, m_iStatus);
+ debugLog(L"CSametimeProto::GetInfo() hContact=[%x], m_iStatus=[%d]", hContact, m_iStatus);
if (hContact && m_iStatus != ID_STATUS_OFFLINE) {
TFakeAckParams* tfap;
tfap = (TFakeAckParams*)malloc(sizeof(TFakeAckParams));
@@ -275,7 +275,7 @@ HANDLE CSametimeProto::GetAwayMsg(MCONTACT hContact) int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
{
- debugLog(_T("CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]"), hContact, mode);
+ debugLog(L"CSametimeProto::RecvAwayMsg() hContact=[%x], mode=[%d]", hContact, mode);
ptrT pszMsg(mir_utf8decodeT(evt->szMessage));
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)evt->lParam, pszMsg);
@@ -284,14 +284,14 @@ int CSametimeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt int CSametimeProto::SetAwayMsg(int iStatus, const TCHAR* msg)
{
- debugLog(_T("CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]"), iStatus, msg == NULL ? -1 : mir_tstrlen(msg));
+ debugLog(L"CSametimeProto::SetAwayMsg() iStatus=[%d], msg:len=[%d]", iStatus, msg == NULL ? -1 : mir_tstrlen(msg));
SetSessionAwayMessage(iStatus, msg);
return 0;
}
int CSametimeProto::UserIsTyping(MCONTACT hContact, int type)
{
- debugLog(_T("CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]"), hContact, type);
+ debugLog(L"CSametimeProto::UserIsTyping() hContact=[%x], type=[%d]", hContact, type);
SendTyping(hContact, type == PROTOTYPE_SELFTYPING_ON);
return 0;
}
@@ -300,7 +300,7 @@ int CSametimeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPa {
switch (iEventType) {
case EV_PROTO_ONOPTIONS:
- debugLog(_T("CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS"));
+ debugLog(L"CSametimeProto::OnEvent() EV_PROTO_ONOPTIONS");
OptInit(wParam, lParam);
break;
}
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index 1d54872cd9..496b1ea95e 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -17,13 +17,13 @@ struct { void __cdecl SessionClear(mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionClear()"));
+ proto->debugLog(L"SessionClear()");
}
int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionWrite() server_connection=[%d], len=[%d]"), proto->server_connection, len);
+ proto->debugLog(L"SessionWrite() server_connection=[%d], len=[%d]", proto->server_connection, len);
if (!proto->server_connection) return 1;
if (Netlib_Send(proto->server_connection, (const char*)buf, len, 0) == SOCKET_ERROR)
return 1;
@@ -33,7 +33,7 @@ int __cdecl SessionWrite(mwSession* session, const unsigned char* buf, gsize len void __cdecl SessionClose(mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionClose() server_connection=[%d]"), proto->server_connection);
+ proto->debugLog(L"SessionClose() server_connection=[%d]", proto->server_connection);
Netlib_CloseHandle(proto->server_connection);
proto->server_connection = 0;
}
@@ -52,7 +52,7 @@ void CSametimeProto::SessionStopping() void CSametimeProto::InitMeanwhileServices()
{
- debugLog(_T("InitMeanwhileServices() start"));
+ debugLog(L"InitMeanwhileServices() start");
if (options.encrypt_session) {
mwSession_addCipher(session, mwCipher_new_RC2_128(session));
@@ -77,7 +77,7 @@ void CSametimeProto::InitMeanwhileServices() void CSametimeProto::DeinitMeanwhileServices()
{
- debugLog(_T("DeinitMeanwhileServices() start"));
+ debugLog(L"DeinitMeanwhileServices() start");
DeinitConference();
DeinitFiles();
DeinitMessaging();
@@ -89,7 +89,7 @@ void CSametimeProto::DeinitMeanwhileServices() void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpointer info)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionStateChange() state=[%d]"), state);
+ proto->debugLog(L"SessionStateChange() state=[%d]", state);
switch (state) {
case mwSession_STARTING:
@@ -136,7 +136,7 @@ void __cdecl SessionStateChange(mwSession* session, mwSessionState state, gpoint void __cdecl SessionAdmin(struct mwSession* session, const char* text)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionAdmin()"));
+ proto->debugLog(L"SessionAdmin()");
TCHAR* tt = mir_utf8decodeT(text);
MessageBox(0, tt, TranslateT("Sametime administrator message"), MB_OK);
mir_free(tt);
@@ -145,7 +145,7 @@ void __cdecl SessionAdmin(struct mwSession* session, const char* text) void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from, gboolean may_reply, const char* text)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionAnnounce()"));
+ proto->debugLog(L"SessionAnnounce()");
TCHAR* stzFrom;
TCHAR* stzText;
TCHAR stzFromBuff[256];
@@ -160,7 +160,7 @@ void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from void __cdecl SessionSetPrivacyInfo(struct mwSession* session)
{
CSametimeProto* proto = (CSametimeProto*)mwSession_getProperty(session, "PROTO_STRUCT_PTR");
- proto->debugLog(_T("SessionSetPrivacyInfo()"));
+ proto->debugLog(L"SessionSetPrivacyInfo()");
}
void __cdecl SessionSetUserStatus(struct mwSession* session)
@@ -171,7 +171,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session) struct mwUserStatus us;
mwUserStatus_clone(&us, mwSession_getUserStatus(session));
- proto->debugLog(_T("SessionSetUserStatus() us.status=[%d]"), us.status);
+ proto->debugLog(L"SessionSetUserStatus() us.status=[%d]", us.status);
switch (us.status) {
case mwStatus_ACTIVE:
@@ -224,7 +224,7 @@ void __cdecl SessionSetUserStatus(struct mwSession* session) if (proto->first_online) {
proto->first_online = false;
//proto->showPopup(TranslateT("Setting login status"), SAMETIME_POPUP_INFO);
- proto->debugLog(_T("Setting login status"));
+ proto->debugLog(L"Setting login status");
proto->SetSessionStatus(proto->login_status);
}
else proto->BroadcastNewStatus(new_status);
@@ -241,7 +241,7 @@ void CSametimeProto::UpdateSelfStatus() int CSametimeProto::SetSessionStatus(int status)
{
struct mwUserStatus us;
- debugLog(_T("SetSessionStatus() start status=[%d]"), status);
+ debugLog(L"SetSessionStatus() start status=[%d]", status);
if (idle_timerid) KillTimer(0, idle_timerid);
@@ -271,7 +271,7 @@ int CSametimeProto::SetSessionStatus(int status) us.desc = AwayMessages.szOnline; us.status = mwStatus_ACTIVE; break;
}
- debugLog(_T("SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]"), us.status, us.desc == NULL ? -1 : mir_strlen(us.desc));
+ debugLog(L"SetSessionStatus() mwSession_setUserStatus us.status=[%d], us.desc:len=[%d]", us.status, us.desc == NULL ? -1 : mir_strlen(us.desc));
mwSession_setUserStatus(session, &us);
return 0;
@@ -297,7 +297,7 @@ VOID CALLBACK IdleTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime int CSametimeProto::SetIdle(bool idle)
{
// set a timer, to wait for any autoaway module which might set our status
- debugLog(_T("CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]"), idle, idle_status, idle_timerid);
+ debugLog(L"CSametimeProto::SetIdle() idle=[%d], idle_status=[%d], idle_timerid=[%d]", idle, idle_status, idle_timerid);
if (idle && !idle_status) {
idle_status = true;
if (!idle_timerid)
@@ -313,7 +313,7 @@ int CSametimeProto::SetIdle(bool idle) void CSametimeProto::SetSessionAwayMessage(int status, const TCHAR* msgT)
{
- debugLog(_T("SetSessionAwayMessage() status=[%d], msgT:len=[%d]"), status, msgT == NULL ? -1 : mir_tstrlen(msgT));
+ debugLog(L"SetSessionAwayMessage() status=[%d], msgT:len=[%d]", status, msgT == NULL ? -1 : mir_tstrlen(msgT));
T2Utf msg(msgT);
if (status == ID_STATUS_ONLINE)
@@ -345,7 +345,7 @@ void __cdecl KeepAliveThread(LPVOID param) {
CSametimeProto* proto = (CSametimeProto*)param;
int i = 120;
- proto->debugLog(_T("KeepAliveThread() start"));
+ proto->debugLog(L"KeepAliveThread() start");
while (1) {
@@ -363,7 +363,7 @@ void __cdecl KeepAliveThread(LPVOID param) mir_cslock lck(proto->session_cs);
if (Miranda_Terminated() || !proto->session) {
- proto->debugLog(_T("KeepAliveThread() end"));
+ proto->debugLog(L"KeepAliveThread() end");
break;
}
}
@@ -380,7 +380,7 @@ void __cdecl SessionThread(LPVOID param) {
CSametimeProto* proto = (CSametimeProto*)param;
HANDLE hNetlibUser = proto->m_hNetlibUser;
- proto->debugLog(_T("SessionThread() start"));
+ proto->debugLog(L"SessionThread() start");
continue_connect = true;
@@ -406,7 +406,7 @@ void __cdecl SessionThread(LPVOID param) proto->showPopup(TranslateT("No server connection!"), SAMETIME_POPUP_ERROR);
}
- proto->debugLog(_T("SessionThread() end, no server_connection, continue_connect=[%d]"), continue_connect);
+ proto->debugLog(L"SessionThread() end, no server_connection, continue_connect=[%d]", continue_connect);
return;
}
@@ -436,7 +436,7 @@ void __cdecl SessionThread(LPVOID param) //while(session && server_connection && mwSession_getState(session) != mwSession_STOPPED) {
while (proto->server_connection) {// && session) {// && !mwSession_isStopped(session)) { // break on error
bytes = Netlib_Recv(proto->server_connection, (char *)recv_buffer, 1024 * 32, 0);
- proto->debugLog(_T("SessionThread() Netlib_Recv'ed bytes=[%d]"), bytes);
+ proto->debugLog(L"SessionThread() Netlib_Recv'ed bytes=[%d]", bytes);
if (bytes == 0) {
break;
@@ -462,7 +462,7 @@ void __cdecl SessionThread(LPVOID param) proto->SetAllOffline();
proto->first_online = true;
- proto->debugLog(_T("SessionThread() end"));
+ proto->debugLog(L"SessionThread() end");
return;
}
@@ -488,11 +488,11 @@ WORD CSametimeProto::GetServerVersion() int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser)
{
- debugLog(_T("LogIn() start"));
+ debugLog(L"LogIn() start");
mir_cslock lck(session_cs);
if (session) {
- debugLog(_T("LogIn() end, currently in session"));
+ debugLog(L"LogIn() end, currently in session");
return 0;
}
@@ -505,12 +505,12 @@ int CSametimeProto::LogIn(int ls, HANDLE hNetlibUser) int CSametimeProto::LogOut()
{
- debugLog(_T("LogOut() start"));
+ debugLog(L"LogOut() start");
continue_connect = false;
mir_cslock lck(session_cs);
if (session && server_connection && m_iStatus != ID_STATUS_OFFLINE && !mwSession_isStopped(session) && !mwSession_isStopping(session)) {
- debugLog(_T("LogOut() mwSession_stop"));
+ debugLog(L"LogOut() mwSession_stop");
mwSession_stop(session, 0);
}
@@ -519,15 +519,15 @@ int CSametimeProto::LogOut() int CSametimeProto::OnLogInRedirect(char* newHost)
{
- debugLog(_T("OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]"), newHost ? _A2T(newHost) : "(null)");
+ debugLog(L"OnLogInRedirect() mwSession_LOGIN_REDIR newHost=[%s]", newHost ? _A2T(newHost) : "(null)");
if (!newHost || !mir_strcmp(newHost, options.server_name) || db_get_b(0, m_szModuleName, "ForceLogin", 0) == 1) {
- debugLog(_T("OnLogInRedirect() forceLogin"));
+ debugLog(L"OnLogInRedirect() forceLogin");
mwSession_forceLogin(session);
return 0;
}
- debugLog(_T("OnLogInRedirect() redirect"));
+ debugLog(L"OnLogInRedirect() redirect");
mir_strcpy(options.server_name, newHost);
LogOut();
Sleep(50); //wait for SessionThread end
@@ -561,7 +561,7 @@ void SendAnnouncement(SendAnnouncementFunc_arg* arg) INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam)
{
- debugLog(_T("CSametimeProto::SessionAnnounce() start"));
+ debugLog(L"CSametimeProto::SessionAnnounce() start");
SessionAnnounceDialogProc_arg* sadpArg = (SessionAnnounceDialogProc_arg*)mir_calloc(sizeof(SessionAnnounceDialogProc_arg));
sadpArg->proto = this;
sadpArg->sendAnnouncementFunc = SendAnnouncement;
@@ -571,7 +571,7 @@ INT_PTR CSametimeProto::SessionAnnounce(WPARAM wParam, LPARAM lParam) void CSametimeProto::InitSessionMenu()
{
- debugLog(_T("CSametimeProto::InitSessionMenu()"));
+ debugLog(L"CSametimeProto::InitSessionMenu()");
CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce);
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp index fe30966af1..03081b51c5 100644 --- a/protocols/Sametime/src/session_announce_win.cpp +++ b/protocols/Sametime/src/session_announce_win.cpp @@ -14,7 +14,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
arg = (SessionAnnounceDialogProc_arg*)lParam;
proto = arg->proto;
- proto->debugLog(_T("SessionAnnounceDialogProc WM_INITDIALOG"));
+ proto->debugLog(L"SessionAnnounceDialogProc WM_INITDIALOG");
SendDlgItemMessage(hwndDlg, IDC_LST_ANTO, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
{
@@ -55,7 +55,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara case WM_CLOSE:
proto = arg->proto;
- proto->debugLog(_T("SessionAnnounceDialogProc WM_CLOSE"));
+ proto->debugLog(L"SessionAnnounceDialogProc WM_CLOSE");
mir_free(arg);
DestroyWindow(hwndDlg);
break;
@@ -79,7 +79,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara return 0;
case IDOK:
- proto->debugLog(_T("SessionAnnounceDialogProc IDOK BN_CLICKED"));
+ proto->debugLog(L"SessionAnnounceDialogProc IDOK BN_CLICKED");
{
// build SendAnnouncementFunc_arg
SendAnnouncementFunc_arg* safArg = (SendAnnouncementFunc_arg*)mir_calloc(sizeof(SendAnnouncementFunc_arg));
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index ce68a3f3d7..3766dc73f7 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -54,7 +54,7 @@ void CSametimeProto::AddGroup(const char* name, bool expanded) MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
{
- debugLog(_T("CSametimeProto::AddContact() start"));
+ debugLog(L"CSametimeProto::AddContact() start");
const char* id = mwSametimeUser_getUser(user);
const char* name = mwSametimeUser_getShortName(user);
const char* nick = mwSametimeUser_getAlias(user);
@@ -66,12 +66,12 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary) if (!hContact) {
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
- debugLog(_T("AddContact(): Failed to create Sametime contact"));
+ debugLog(L"AddContact(): Failed to create Sametime contact");
return NULL; ///TODO error handling
}
if (Proto_AddToContact(hContact, m_szModuleName) != 0) {
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
- debugLog(_T("AddContact(): Failed to register Sametime contact"));
+ debugLog(L"AddContact(): Failed to register Sametime contact");
return NULL; ///TODO error handling
}
new_contact = true;
@@ -125,7 +125,7 @@ MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary) void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temporary)
{
- debugLog(_T("CSametimeProto::ImportContactsFromList() start"));
+ debugLog(L"CSametimeProto::ImportContactsFromList() start");
// add contacts
mwSametimeGroup* stgroup;
mwSametimeUser* stuser;
@@ -187,7 +187,7 @@ void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temp void CSametimeProto::ExportContactsToList(mwSametimeList* user_list)
{
- debugLog(_T("CSametimeProto::ExportContactsToList() start"));
+ debugLog(L"CSametimeProto::ExportContactsToList() start");
mwSametimeGroup* stgroup = 0;
char* group_name;
char* group_alias;
@@ -300,7 +300,7 @@ void CSametimeProto::ExportContactsToList(mwSametimeList* user_list) void CSametimeProto::ImportContactsFromFile(TCHAR* filename)
{
- debugLog(_T("CSametimeProto::ImportContactsFromFile() start"));
+ debugLog(L"CSametimeProto::ImportContactsFromFile() start");
std::ifstream in(filename);
std::string text;
std::string line;
@@ -326,9 +326,9 @@ void CSametimeProto::ExportContactsToServer() mwPutBuffer* buff;
mwOpaque* op;
- debugLog(_T("CSametimeProto::ExportContactsToServer() start"));
+ debugLog(L"CSametimeProto::ExportContactsToServer() start");
if (MW_SERVICE_IS_DEAD(service_storage)) {
- debugLog(_T("CSametimeProto::ExportContactsToServer() Failed"));
+ debugLog(L"CSametimeProto::ExportContactsToServer() Failed");
showPopup(TranslateT("Failed to upload contacts - storage service unavailable."), SAMETIME_POPUP_ERROR);
return;
}
@@ -386,7 +386,7 @@ int CSametimeProto::ContactDeleted(MCONTACT hContact) if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
return 0;
- debugLog(_T("CSametimeProto::ContactDeleted()"));
+ debugLog(L"CSametimeProto::ContactDeleted()");
if (GetAwareIdFromContact(hContact, &id_block)) {
GList* gl = g_list_prepend(NULL, &id_block);
@@ -580,7 +580,7 @@ mwAwareListHandler mwAwareList_handler = void CSametimeProto::UserListCreate()
{
- debugLog(_T("CSametimeProto::UserListCreate() start"));
+ debugLog(L"CSametimeProto::UserListCreate() start");
mwServiceAware_unsetAttribute(service_aware, mwAttribute_SPEAKERS);
mwServiceAware_unsetAttribute(service_aware, mwAttribute_MICROPHONE);
mwServiceAware_unsetAttribute(service_aware, mwAttribute_VIDEO_CAMERA);
@@ -634,7 +634,7 @@ void CSametimeProto::UserListDestroy() void CSametimeProto::UserRecvAwayMessage(MCONTACT hContact)
{
- debugLog(_T("CSametimeProto::UserRecvAwayMessage() start hContact=[%x]"), hContact);
+ debugLog(L"CSametimeProto::UserRecvAwayMessage() start hContact=[%x]", hContact);
DBVARIANT dbv;
if (!db_get_s((MCONTACT)hContact, "CList", "StatusMsg", &dbv, DBVT_TCHAR)) {
ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
@@ -765,7 +765,7 @@ INT_PTR CALLBACK CALLBACK SearchDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam MCONTACT CSametimeProto::AddSearchedUser(MYPROTOSEARCHRESULT* mpsr, bool temporary)
{
MCONTACT hContact = 0;
- debugLog(_T("CSametimeProto::AddSearchedUser() start"));
+ debugLog(L"CSametimeProto::AddSearchedUser() start");
mwSametimeList* user_list = mwSametimeList_new();
mwSametimeGroup* stgroup = 0;
if (mpsr->group) {
@@ -799,7 +799,7 @@ void mwServiceAware_clear_callback(mwServiceAware* srvc) void CSametimeProto::InitUserList()
{
- debugLog(_T("CSametimeProto::InitUserList()"));
+ debugLog(L"CSametimeProto::InitUserList()");
mwSession_addService(session, (mwService*)(service_storage = mwServiceStorage_new(session)));
mwSession_addService(session, (mwService*)(service_resolve = mwServiceResolve_new(session)));
@@ -813,7 +813,7 @@ void CSametimeProto::InitUserList() void CSametimeProto::DeinitUserList()
{
- debugLog(_T("CSametimeProto::DeinitUserList()"));
+ debugLog(L"CSametimeProto::DeinitUserList()");
mwSession_removeService(session, mwService_AWARE);
mwService_free((mwService*)service_aware);
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index 346ccd5027..0a73ddce90 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -32,7 +32,7 @@ void CSametimeProto::RegisterPopups() TCHAR szDescr[256];
char szName[256];
- debugLog(_T("CSametimeProto::RegisterPopups()"));
+ debugLog(L"CSametimeProto::RegisterPopups()");
POPUPCLASS puc = { sizeof(puc) };
puc.PluginWindowProc = PopupWindowProc;
@@ -41,7 +41,7 @@ void CSametimeProto::RegisterPopups() puc.pszName = szName;
mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify");
- mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Notification"));
+ mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Notification"));
puc.hIcon = CopyIcon(LoadIconEx("notify", FALSE));
ReleaseIconEx("notify", FALSE);
puc.iSeconds = 8;
@@ -50,7 +50,7 @@ void CSametimeProto::RegisterPopups() hPopupNotify = Popup_RegisterClass(&puc);
mir_snprintf(szName, "%s_%s", m_szModuleName, "Error");
- mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_sntprintf(szDescr, L"%s/%s", m_tszUserName, TranslateT("Error"));
puc.hIcon = CopyIcon(LoadIconEx("error", FALSE));
ReleaseIconEx("error", FALSE);
puc.iSeconds = 10;
@@ -62,7 +62,7 @@ void CSametimeProto::RegisterPopups() void CSametimeProto::UnregisterPopups()
{
- debugLog(_T("CSametimeProto::RegisterPopups()"));
+ debugLog(L"CSametimeProto::RegisterPopups()");
Popup_UnregisterClass(hPopupError);
Popup_UnregisterClass(hPopupNotify);
}
@@ -163,12 +163,12 @@ void LogFromGLib(const gchar* log_domain, GLogLevelFlags log_level, const gchar* void CSametimeProto::RegisterGLibLogger()
{
- debugLog(_T("CSametimeProto::RegisterGLibLogger"));
+ debugLog(L"CSametimeProto::RegisterGLibLogger");
gLogHandler = g_log_set_handler(G_LOG_DOMAIN, G_LOG_LEVEL_MASK, LogFromGLib, this);
}
void CSametimeProto::UnRegisterGLibLogger()
{
- debugLog(_T("CSametimeProto::UnRegisterGLibLogger"));
+ debugLog(L"CSametimeProto::UnRegisterGLibLogger");
if (gLogHandler) g_log_remove_handler(G_LOG_DOMAIN, gLogHandler);
}
diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 626773ab1d..26ef2bcb81 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -68,7 +68,7 @@ void CSkypeProto::OnReceiveAvatar(const NETLIBHTTPREQUEST *response, void *arg) setByte(hContact, "AvatarType", ai.format);
GetAvatarFileName(hContact, ai.filename, _countof(ai.filename));
- FILE *out = _tfopen(ai.filename, _T("wb"));
+ FILE *out = _tfopen(ai.filename, L"wb");
if (out == NULL) {
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai, 0);
return;
@@ -127,7 +127,7 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) void CSkypeProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -139,7 +139,7 @@ void CSkypeProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cb CMStringA username(Contacts[hContact]);
username.Replace("live:", "__live_");
username.Replace("facebook:", "__facebook_");
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%S%s"), username.c_str(), szFileType);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%S%s", username.c_str(), szFileType);
}
void CSkypeProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index e7a47cf2d6..8fa95966d9 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -309,7 +309,7 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) ptrA xinitiator, xtarget, initiator;
//content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember>
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("addmember"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"addmember");
if (xml == NULL)
return;
@@ -331,12 +331,12 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) ptrA xinitiator, xtarget;
//content = <addmember><eventtime>1429186229164</eventtime><initiator>8:initiator</initiator><target>8:user</target></addmember>
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("deletemember"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"deletemember");
if (xml != NULL) {
- HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0);
+ HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
xinitiator = node != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
- xmlNode = xmlGetChildByPath(xml, _T("target"), 0);
+ xmlNode = xmlGetChildByPath(xml, L"target", 0);
xtarget = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
xmlDestroyNode(xml);
@@ -353,12 +353,12 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) {
//content=<topicupdate><eventtime>1429532702130</eventtime><initiator>8:user</initiator><value>test topic</value></topicupdate>
ptrA xinitiator, value;
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("topicupdate"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"topicupdate");
if (xml != NULL) {
- HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0);
+ HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
- xmlNode = xmlGetChildByPath(xml, _T("value"), 0);
+ xmlNode = xmlGetChildByPath(xml, L"value", 0);
value = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
xmlDestroyNode(xml);
@@ -372,16 +372,16 @@ void CSkypeProto::OnChatEvent(const JSONNode &node) {
//content=<roleupdate><eventtime>1429551258363</eventtime><initiator>8:user</initiator><target><id>8:user1</id><role>admin</role></target></roleupdate>
ptrA xinitiator, xId, xRole;
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, _T("roleupdate"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT(strContent.c_str())), 0, L"roleupdate");
if (xml != NULL) {
- HXML xmlNode = xmlGetChildByPath(xml, _T("initiator"), 0);
+ HXML xmlNode = xmlGetChildByPath(xml, L"initiator", 0);
xinitiator = xmlNode != NULL ? mir_t2a(xmlGetText(xmlNode)) : NULL;
- xmlNode = xmlGetChildByPath(xml, _T("target"), 0);
+ xmlNode = xmlGetChildByPath(xml, L"target", 0);
if (xmlNode != NULL)
{
- HXML xmlId = xmlGetChildByPath(xmlNode, _T("id"), 0);
- HXML xmlRole = xmlGetChildByPath(xmlNode, _T("role"), 0);
+ HXML xmlId = xmlGetChildByPath(xmlNode, L"id", 0);
+ HXML xmlRole = xmlGetChildByPath(xmlNode, L"role", 0);
xId = xmlId != NULL ? mir_t2a(xmlGetText(xmlId)) : NULL;
xRole = xmlRole != NULL ? mir_t2a(xmlGetText(xmlRole)) : NULL;
}
@@ -655,7 +655,7 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam) CMString CSkypeProto::ChangeTopicForm()
{
- CMString caption(FORMAT, _T("[%s] %s"), _A2T(m_szModuleName), TranslateT("Enter new chatroom topic"));
+ CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter new chatroom topic"));
ENTER_STRING pForm = { sizeof(pForm) };
pForm.type = ESF_MULTILINE;
pForm.caption = caption;
diff --git a/protocols/SkypeWeb/src/skype_db.h b/protocols/SkypeWeb/src/skype_db.h index ac2d0906fc..63a38ecadc 100644 --- a/protocols/SkypeWeb/src/skype_db.h +++ b/protocols/SkypeWeb/src/skype_db.h @@ -52,12 +52,12 @@ struct CSkypeOptions bAutoHistorySync(proto, "AutoSync", true),
bMarkAllAsUnread(proto, "MarkMesUnread", true),
- wstrPlace(proto, "Place", _T("")),
+ wstrPlace(proto, "Place", L""),
bUseHostnameAsPlace(proto, "UseHostName", true),
bUseBBCodes(proto, "UseBBCodes", true),
- wstrCListGroup(proto, SKYPE_SETTINGS_GROUP, _T("Skype"))
+ wstrCListGroup(proto, SKYPE_SETTINGS_GROUP, L"Skype")
{
}
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index 27a14309ee..f38ee7a8dd 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -57,19 +57,19 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) case SKYPE_DB_EVENT_TYPE_CALL_INFO:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("partlist"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"partlist");
if (xml != NULL)
{
- ptrA type(mir_t2a(xmlGetAttrValue(xml, _T("type"))));
+ ptrA type(mir_t2a(xmlGetAttrValue(xml, L"type")));
bool bType = (!mir_strcmpi(type, "started")) ? 1 : 0;
time_t callDuration = 0;
for (int i = 0; i < xmlGetChildCount(xml); i++)
{
- HXML xmlPart = xmlGetNthChild(xml, _T("part"), i);
+ HXML xmlPart = xmlGetNthChild(xml, L"part", i);
if (xmlPart != NULL)
{
- HXML xmlDuration = xmlGetChildByPath(xmlPart, _T("duration"), 0);
+ HXML xmlDuration = xmlGetChildByPath(xmlPart, L"duration", 0);
if (xmlDuration != NULL)
{
@@ -106,16 +106,16 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) }
case SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("files"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"files");
if (xml != NULL)
{
for (int i = 0; i < xmlGetChildCount(xml); i++)
{
LONGLONG fileSize = 0;
- HXML xmlNode = xmlGetNthChild(xml, _T("file"), i);
+ HXML xmlNode = xmlGetNthChild(xml, L"file", i);
if (xmlNode != NULL)
{
- fileSize = _ttol(xmlGetAttrValue(xmlNode, _T("size")));
+ fileSize = _ttol(xmlGetAttrValue(xmlNode, L"size"));
char *fileName = _T2A(xmlGetText(xmlNode));
if (fileName != NULL)
{
@@ -136,14 +136,14 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) case SKYPE_DB_EVENT_TYPE_MOJI:
case SKYPE_DB_EVENT_TYPE_URIOBJ:
{
- HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, _T("URIObject"));
+ HXML xml = xmlParseString(ptrT(mir_utf8decodeT((char*)pEvent->dbei->pBlob)), 0, L"URIObject");
if (xml != NULL)
{
//szText.Append(_T2A(xmlGetText(xml)));
- HXML xmlA = xmlGetChildByPath(xml, _T("a"), 0);
+ HXML xmlA = xmlGetChildByPath(xml, L"a", 0);
if (xmlA != NULL)
{
- szText += T2Utf(xmlGetAttrValue(xmlA, _T("href")));
+ szText += T2Utf(xmlGetAttrValue(xmlA, L"href"));
}
xmlDestroyNode(xml);
}
diff --git a/protocols/SkypeWeb/src/skype_files.cpp b/protocols/SkypeWeb/src/skype_files.cpp index 66b107a81e..bc562a8746 100644 --- a/protocols/SkypeWeb/src/skype_files.cpp +++ b/protocols/SkypeWeb/src/skype_files.cpp @@ -38,7 +38,7 @@ void CSkypeProto::OnASMObjectCreated(const NETLIBHTTPREQUEST *response, void *ar JSONNode node = JSONNode::parse((char*)response->pData);
std::string strObjectId = node["id"].as_string();
fup->uid = mir_strdup(strObjectId.c_str());
- FILE *pFile = _tfopen(fup->tszFileName, _T("rb"));
+ FILE *pFile = _tfopen(fup->tszFileName, L"rb");
if (pFile == NULL) return;
fseek(pFile, 0, SEEK_END);
diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 594d83409b..7909698b37 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -77,25 +77,25 @@ void CSkypeProto::OnLoginOAuth(const NETLIBHTTPREQUEST *response) {
case 40002:
{
- ShowNotification(_T("Skype"), TranslateT("Authentication failed. Invalid username."), NULL, 1);
+ ShowNotification(L"Skype", TranslateT("Authentication failed. Invalid username."), NULL, 1);
error = LOGINERR_BADUSERID;
break;
}
case 40120:
{
- ShowNotification(_T("Skype"), TranslateT("Authentication failed. Bad username or password."), NULL, 1);
+ ShowNotification(L"Skype", TranslateT("Authentication failed. Bad username or password."), NULL, 1);
error = LOGINERR_WRONGPASSWORD;
break;
}
case 40121:
{
- ShowNotification(_T("Skype"), TranslateT("Too many failed authentication attempts with given username or IP."), NULL, 1);
+ ShowNotification(L"Skype", TranslateT("Too many failed authentication attempts with given username or IP."), NULL, 1);
error = LOGIN_ERROR_TOOMANY_REQUESTS;
break;
}
default:
{
- ShowNotification(_T("Skype"), status["text"] ? status["text"].as_mstring() : TranslateT("Authentication failed. Unknown error."), NULL, 1);
+ ShowNotification(L"Skype", status["text"] ? status["text"].as_mstring() : TranslateT("Authentication failed. Unknown error."), NULL, 1);
error = LOGIN_ERROR_UNKNOWN;
}
}
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 898bc1f11a..cc9ac8e2ca 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -275,7 +275,7 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent) void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const char *szContent, const char *szMessageId)
{
- HXML xmlNode = xmlParseString(mir_utf8decodeT(szContent), 0, _T("contacts"));
+ HXML xmlNode = xmlParseString(mir_utf8decodeT(szContent), 0, L"contacts");
if (xmlNode)
{
int nCount = 0;
@@ -287,7 +287,7 @@ void CSkypeProto::ProcessContactRecv(MCONTACT hContact, time_t timestamp, const nCount = 0;
for (int i = 0; i < xmlGetChildCount(xmlNode); i++)
{
- HXML xmlContact = xmlGetNthChild(xmlNode, _T("c"), i);
+ HXML xmlContact = xmlGetNthChild(xmlNode, L"c", i);
if (xmlContact != NULL)
{
const TCHAR *tszContactId = xmlGetAttrValue(xmlContact, L"s");
diff --git a/protocols/SkypeWeb/src/skype_mslogin.cpp b/protocols/SkypeWeb/src/skype_mslogin.cpp index 9301632c70..3992ab48b7 100644 --- a/protocols/SkypeWeb/src/skype_mslogin.cpp +++ b/protocols/SkypeWeb/src/skype_mslogin.cpp @@ -176,7 +176,7 @@ void CSkypeProto::OnMSLoginEnd(const NETLIBHTTPREQUEST *response) CMString CSkypeProto::RunConfirmationCode()
{
- CMString caption(FORMAT, _T("[%s] %s"), _A2T(m_szModuleName), TranslateT("Enter confirmation code"));
+ CMString caption(FORMAT, L"[%s] %s", _A2T(m_szModuleName), TranslateT("Enter confirmation code"));
ENTER_STRING pForm = { sizeof(pForm) };
pForm.type = ESF_PASSWORD;
pForm.caption = caption;
diff --git a/protocols/SkypeWeb/src/skype_popups.cpp b/protocols/SkypeWeb/src/skype_popups.cpp index 0ca5aab40b..49a7b40d60 100644 --- a/protocols/SkypeWeb/src/skype_popups.cpp +++ b/protocols/SkypeWeb/src/skype_popups.cpp @@ -7,7 +7,7 @@ void CSkypeProto::InitPopups() POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notifications"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notifications"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -17,7 +17,7 @@ void CSkypeProto::InitPopups() ppc.iSeconds = 5;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -27,7 +27,7 @@ void CSkypeProto::InitPopups() ppc.iSeconds = -1;
m_PopupClasses.insert(Popup_RegisterClass(&ppc));
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Calls"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Calls"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Call");
ppc.ptszDescription = desc;
ppc.pszName = name;
diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index a7f5d33608..fff14b059f 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -22,225 +22,225 @@ std::map<std::tstring, std::tstring> CSkypeProto::languages; void CSkypeProto::InitLanguages()
{
std::map<std::tstring, std::tstring> result;
- result[_T("ab")] = _T("Abkhazian");
- result[_T("aa")] = _T("Afar");
- result[_T("af")] = _T("Afrikaans");
- result[_T("ak")] = _T("Akan");
- result[_T("sq")] = _T("Albanian");
- result[_T("am")] = _T("Amharic");
- result[_T("ar")] = _T("Arabic");
- result[_T("an")] = _T("Aragonese");
- result[_T("hy")] = _T("Armenian");
- result[_T("as")] = _T("Assamese");
- result[_T("av")] = _T("Avaric");
- result[_T("ae")] = _T("Avestan");
- result[_T("ay")] = _T("Aymara");
- result[_T("az")] = _T("Azerbaijani");
- result[_T("bm")] = _T("Bambara");
- result[_T("ba")] = _T("Bashkir");
- result[_T("eu")] = _T("Basque");
- result[_T("be")] = _T("Belarusian");
- result[_T("bn")] = _T("Bengali");
- result[_T("bh")] = _T("Bihari languages");
- result[_T("bi")] = _T("Bislama");
- result[_T("nb")] = _T("Bokmal, Norwegian");
- result[_T("bs")] = _T("Bosnian");
- result[_T("br")] = _T("Breton");
- result[_T("bg")] = _T("Bulgarian");
- result[_T("my")] = _T("Burmese");
- result[_T("es")] = _T("Castilian");
- result[_T("ca")] = _T("Catalan");
- result[_T("km")] = _T("Central Khmer");
- result[_T("ch")] = _T("Chamorro");
- result[_T("ce")] = _T("Chechen");
- result[_T("ny")] = _T("Chewa");
- result[_T("ny")] = _T("Chichewa");
- result[_T("zh")] = _T("Chinese");
- result[_T("za")] = _T("Chuang");
- result[_T("cu")] = _T("Church Slavic");
- result[_T("cu")] = _T("Church Slavonic");
- result[_T("cv")] = _T("Chuvash");
- result[_T("kw")] = _T("Cornish");
- result[_T("co")] = _T("Corsican");
- result[_T("cr")] = _T("Cree");
- result[_T("hr")] = _T("Croatian");
- result[_T("cs")] = _T("Czech");
- result[_T("da")] = _T("Danish");
- result[_T("dv")] = _T("Dhivehi");
- result[_T("dv")] = _T("Divehi");
- result[_T("nl")] = _T("Dutch");
- result[_T("dz")] = _T("Dzongkha");
- result[_T("en")] = _T("English");
- result[_T("eo")] = _T("Esperanto");
- result[_T("et")] = _T("Estonian");
- result[_T("ee")] = _T("Ewe");
- result[_T("fo")] = _T("Faroese");
- result[_T("fj")] = _T("Fijian");
- result[_T("fi")] = _T("Finnish");
- result[_T("nl")] = _T("Flemish");
- result[_T("fr")] = _T("French");
- result[_T("ff")] = _T("Fulah");
- result[_T("gd")] = _T("Gaelic");
- result[_T("gl")] = _T("Galician");
- result[_T("lg")] = _T("Ganda");
- result[_T("ka")] = _T("Georgian");
- result[_T("de")] = _T("German");
- result[_T("ki")] = _T("Gikuyu");
- result[_T("el")] = _T("Greek, Modern (1453-)");
- result[_T("kl")] = _T("Greenlandic");
- result[_T("gn")] = _T("Guarani");
- result[_T("gu")] = _T("Gujarati");
- result[_T("ht")] = _T("Haitian");
- result[_T("ht")] = _T("Haitian Creole");
- result[_T("ha")] = _T("Hausa");
- result[_T("he")] = _T("Hebrew");
- result[_T("hz")] = _T("Herero");
- result[_T("hi")] = _T("Hindi");
- result[_T("ho")] = _T("Hiri Motu");
- result[_T("hu")] = _T("Hungarian");
- result[_T("is")] = _T("Icelandic");
- result[_T("io")] = _T("Ido");
- result[_T("ig")] = _T("Igbo");
- result[_T("id")] = _T("Indonesian");
- result[_T("ia")] = _T("Interlingua (International Auxiliary Language Association)");
- result[_T("ie")] = _T("Interlingue");
- result[_T("iu")] = _T("Inuktitut");
- result[_T("ik")] = _T("Inupiaq");
- result[_T("ga")] = _T("Irish");
- result[_T("it")] = _T("Italian");
- result[_T("ja")] = _T("Japanese");
- result[_T("jv")] = _T("Javanese");
- result[_T("kl")] = _T("Kalaallisut");
- result[_T("kn")] = _T("Kannada");
- result[_T("kr")] = _T("Kanuri");
- result[_T("ks")] = _T("Kashmiri");
- result[_T("kk")] = _T("Kazakh");
- result[_T("ki")] = _T("Kikuyu");
- result[_T("rw")] = _T("Kinyarwanda");
- result[_T("ky")] = _T("Kirghiz");
- result[_T("kv")] = _T("Komi");
- result[_T("kg")] = _T("Kongo");
- result[_T("ko")] = _T("Korean");
- result[_T("kj")] = _T("Kuanyama");
- result[_T("ku")] = _T("Kurdish");
- result[_T("kj")] = _T("Kwanyama");
- result[_T("ky")] = _T("Kyrgyz");
- result[_T("lo")] = _T("Lao");
- result[_T("la")] = _T("Latin");
- result[_T("lv")] = _T("Latvian");
- result[_T("lb")] = _T("Letzeburgesch");
- result[_T("li")] = _T("Limburgan");
- result[_T("li")] = _T("Limburger");
- result[_T("li")] = _T("Limburgish");
- result[_T("ln")] = _T("Lingala");
- result[_T("lt")] = _T("Lithuanian");
- result[_T("lu")] = _T("Luba-Katanga");
- result[_T("lb")] = _T("Luxembourgish");
- result[_T("mk")] = _T("Macedonian");
- result[_T("mg")] = _T("Malagasy");
- result[_T("ms")] = _T("Malay");
- result[_T("ml")] = _T("Malayalam");
- result[_T("dv")] = _T("Maldivian");
- result[_T("mt")] = _T("Maltese");
- result[_T("gv")] = _T("Manx");
- result[_T("mi")] = _T("Maori");
- result[_T("mr")] = _T("Marathi");
- result[_T("mh")] = _T("Marshallese");
- result[_T("ro")] = _T("Moldavian");
- result[_T("ro")] = _T("Moldovan");
- result[_T("mn")] = _T("Mongolian");
- result[_T("na")] = _T("Nauru");
- result[_T("nv")] = _T("Navaho");
- result[_T("nv")] = _T("Navajo");
- result[_T("nd")] = _T("Ndebele, North");
- result[_T("nr")] = _T("Ndebele, South");
- result[_T("ng")] = _T("Ndonga");
- result[_T("ne")] = _T("Nepali");
- result[_T("nd")] = _T("North Ndebele");
- result[_T("se")] = _T("Northern Sami");
- result[_T("no")] = _T("Norwegian");
- result[_T("nb")] = _T("Norwegian Bokmal");
- result[_T("nn")] = _T("Norwegian Nynorsk");
- result[_T("ii")] = _T("Nuosu");
- result[_T("ny")] = _T("Nyanja");
- result[_T("nn")] = _T("Nynorsk, Norwegian");
- result[_T("ie")] = _T("Occidental");
- result[_T("oc")] = _T("Occitan (post 1500)");
- result[_T("oj")] = _T("Ojibwa");
- result[_T("cu")] = _T("Old Bulgarian");
- result[_T("cu")] = _T("Old Church Slavonic");
- result[_T("cu")] = _T("Old Slavonic");
- result[_T("or")] = _T("Oriya");
- result[_T("om")] = _T("Oromo");
- result[_T("os")] = _T("Ossetian");
- result[_T("os")] = _T("Ossetic");
- result[_T("pi")] = _T("Pali");
- result[_T("pa")] = _T("Panjabi");
- result[_T("ps")] = _T("Pashto");
- result[_T("fa")] = _T("Persian");
- result[_T("pl")] = _T("Polish");
- result[_T("pt")] = _T("Portuguese");
- result[_T("pa")] = _T("Punjabi");
- result[_T("ps")] = _T("Pushto");
- result[_T("qu")] = _T("Quechua");
- result[_T("ro")] = _T("Romanian");
- result[_T("rm")] = _T("Romansh");
- result[_T("rn")] = _T("Rundi");
- result[_T("ru")] = _T("Russian");
- result[_T("sm")] = _T("Samoan");
- result[_T("sg")] = _T("Sango");
- result[_T("sa")] = _T("Sanskrit");
- result[_T("sc")] = _T("Sardinian");
- result[_T("gd")] = _T("Scottish Gaelic");
- result[_T("sr")] = _T("Serbian");
- result[_T("sn")] = _T("Shona");
- result[_T("ii")] = _T("Sichuan Yi");
- result[_T("sd")] = _T("Sindhi");
- result[_T("si")] = _T("Sinhala");
- result[_T("si")] = _T("Sinhalese");
- result[_T("sk")] = _T("Slovak");
- result[_T("sl")] = _T("Slovenian");
- result[_T("so")] = _T("Somali");
- result[_T("st")] = _T("Sotho, Southern");
- result[_T("nr")] = _T("South Ndebele");
- result[_T("es")] = _T("Spanish");
- result[_T("su")] = _T("Sundanese");
- result[_T("sw")] = _T("Swahili");
- result[_T("ss")] = _T("Swati");
- result[_T("sv")] = _T("Swedish");
- result[_T("tl")] = _T("Tagalog");
- result[_T("ty")] = _T("Tahitian");
- result[_T("tg")] = _T("Tajik");
- result[_T("ta")] = _T("Tamil");
- result[_T("tt")] = _T("Tatar");
- result[_T("te")] = _T("Telugu");
- result[_T("th")] = _T("Thai");
- result[_T("bo")] = _T("Tibetan");
- result[_T("ti")] = _T("Tigrinya");
- result[_T("to")] = _T("Tonga (Tonga Islands)");
- result[_T("ts")] = _T("Tsonga");
- result[_T("tn")] = _T("Tswana");
- result[_T("tr")] = _T("Turkish");
- result[_T("tk")] = _T("Turkmen");
- result[_T("tw")] = _T("Twi");
- result[_T("ug")] = _T("Uighur");
- result[_T("uk")] = _T("Ukrainian");
- result[_T("ur")] = _T("Urdu");
- result[_T("ug")] = _T("Uyghur");
- result[_T("uz")] = _T("Uzbek");
- result[_T("ca")] = _T("Valencian");
- result[_T("ve")] = _T("Venda");
- result[_T("vi")] = _T("Vietnamese");
- result[_T("vo")] = _T("Volapuk");
- result[_T("wa")] = _T("Walloon");
- result[_T("cy")] = _T("Welsh");
- result[_T("fy")] = _T("Western Frisian");
- result[_T("wo")] = _T("Wolof");
- result[_T("xh")] = _T("Xhosa");
- result[_T("yi")] = _T("Yiddish");
- result[_T("yo")] = _T("Yoruba");
- result[_T("za")] = _T("Zhuang");
- result[_T("zu")] = _T("Zulu");
+ result[L"ab"] = L"Abkhazian";
+ result[L"aa"] = L"Afar";
+ result[L"af"] = L"Afrikaans";
+ result[L"ak"] = L"Akan";
+ result[L"sq"] = L"Albanian";
+ result[L"am"] = L"Amharic";
+ result[L"ar"] = L"Arabic";
+ result[L"an"] = L"Aragonese";
+ result[L"hy"] = L"Armenian";
+ result[L"as"] = L"Assamese";
+ result[L"av"] = L"Avaric";
+ result[L"ae"] = L"Avestan";
+ result[L"ay"] = L"Aymara";
+ result[L"az"] = L"Azerbaijani";
+ result[L"bm"] = L"Bambara";
+ result[L"ba"] = L"Bashkir";
+ result[L"eu"] = L"Basque";
+ result[L"be"] = L"Belarusian";
+ result[L"bn"] = L"Bengali";
+ result[L"bh"] = L"Bihari languages";
+ result[L"bi"] = L"Bislama";
+ result[L"nb"] = L"Bokmal, Norwegian";
+ result[L"bs"] = L"Bosnian";
+ result[L"br"] = L"Breton";
+ result[L"bg"] = L"Bulgarian";
+ result[L"my"] = L"Burmese";
+ result[L"es"] = L"Castilian";
+ result[L"ca"] = L"Catalan";
+ result[L"km"] = L"Central Khmer";
+ result[L"ch"] = L"Chamorro";
+ result[L"ce"] = L"Chechen";
+ result[L"ny"] = L"Chewa";
+ result[L"ny"] = L"Chichewa";
+ result[L"zh"] = L"Chinese";
+ result[L"za"] = L"Chuang";
+ result[L"cu"] = L"Church Slavic";
+ result[L"cu"] = L"Church Slavonic";
+ result[L"cv"] = L"Chuvash";
+ result[L"kw"] = L"Cornish";
+ result[L"co"] = L"Corsican";
+ result[L"cr"] = L"Cree";
+ result[L"hr"] = L"Croatian";
+ result[L"cs"] = L"Czech";
+ result[L"da"] = L"Danish";
+ result[L"dv"] = L"Dhivehi";
+ result[L"dv"] = L"Divehi";
+ result[L"nl"] = L"Dutch";
+ result[L"dz"] = L"Dzongkha";
+ result[L"en"] = L"English";
+ result[L"eo"] = L"Esperanto";
+ result[L"et"] = L"Estonian";
+ result[L"ee"] = L"Ewe";
+ result[L"fo"] = L"Faroese";
+ result[L"fj"] = L"Fijian";
+ result[L"fi"] = L"Finnish";
+ result[L"nl"] = L"Flemish";
+ result[L"fr"] = L"French";
+ result[L"ff"] = L"Fulah";
+ result[L"gd"] = L"Gaelic";
+ result[L"gl"] = L"Galician";
+ result[L"lg"] = L"Ganda";
+ result[L"ka"] = L"Georgian";
+ result[L"de"] = L"German";
+ result[L"ki"] = L"Gikuyu";
+ result[L"el"] = L"Greek, Modern (1453-)";
+ result[L"kl"] = L"Greenlandic";
+ result[L"gn"] = L"Guarani";
+ result[L"gu"] = L"Gujarati";
+ result[L"ht"] = L"Haitian";
+ result[L"ht"] = L"Haitian Creole";
+ result[L"ha"] = L"Hausa";
+ result[L"he"] = L"Hebrew";
+ result[L"hz"] = L"Herero";
+ result[L"hi"] = L"Hindi";
+ result[L"ho"] = L"Hiri Motu";
+ result[L"hu"] = L"Hungarian";
+ result[L"is"] = L"Icelandic";
+ result[L"io"] = L"Ido";
+ result[L"ig"] = L"Igbo";
+ result[L"id"] = L"Indonesian";
+ result[L"ia"] = L"Interlingua (International Auxiliary Language Association)";
+ result[L"ie"] = L"Interlingue";
+ result[L"iu"] = L"Inuktitut";
+ result[L"ik"] = L"Inupiaq";
+ result[L"ga"] = L"Irish";
+ result[L"it"] = L"Italian";
+ result[L"ja"] = L"Japanese";
+ result[L"jv"] = L"Javanese";
+ result[L"kl"] = L"Kalaallisut";
+ result[L"kn"] = L"Kannada";
+ result[L"kr"] = L"Kanuri";
+ result[L"ks"] = L"Kashmiri";
+ result[L"kk"] = L"Kazakh";
+ result[L"ki"] = L"Kikuyu";
+ result[L"rw"] = L"Kinyarwanda";
+ result[L"ky"] = L"Kirghiz";
+ result[L"kv"] = L"Komi";
+ result[L"kg"] = L"Kongo";
+ result[L"ko"] = L"Korean";
+ result[L"kj"] = L"Kuanyama";
+ result[L"ku"] = L"Kurdish";
+ result[L"kj"] = L"Kwanyama";
+ result[L"ky"] = L"Kyrgyz";
+ result[L"lo"] = L"Lao";
+ result[L"la"] = L"Latin";
+ result[L"lv"] = L"Latvian";
+ result[L"lb"] = L"Letzeburgesch";
+ result[L"li"] = L"Limburgan";
+ result[L"li"] = L"Limburger";
+ result[L"li"] = L"Limburgish";
+ result[L"ln"] = L"Lingala";
+ result[L"lt"] = L"Lithuanian";
+ result[L"lu"] = L"Luba-Katanga";
+ result[L"lb"] = L"Luxembourgish";
+ result[L"mk"] = L"Macedonian";
+ result[L"mg"] = L"Malagasy";
+ result[L"ms"] = L"Malay";
+ result[L"ml"] = L"Malayalam";
+ result[L"dv"] = L"Maldivian";
+ result[L"mt"] = L"Maltese";
+ result[L"gv"] = L"Manx";
+ result[L"mi"] = L"Maori";
+ result[L"mr"] = L"Marathi";
+ result[L"mh"] = L"Marshallese";
+ result[L"ro"] = L"Moldavian";
+ result[L"ro"] = L"Moldovan";
+ result[L"mn"] = L"Mongolian";
+ result[L"na"] = L"Nauru";
+ result[L"nv"] = L"Navaho";
+ result[L"nv"] = L"Navajo";
+ result[L"nd"] = L"Ndebele, North";
+ result[L"nr"] = L"Ndebele, South";
+ result[L"ng"] = L"Ndonga";
+ result[L"ne"] = L"Nepali";
+ result[L"nd"] = L"North Ndebele";
+ result[L"se"] = L"Northern Sami";
+ result[L"no"] = L"Norwegian";
+ result[L"nb"] = L"Norwegian Bokmal";
+ result[L"nn"] = L"Norwegian Nynorsk";
+ result[L"ii"] = L"Nuosu";
+ result[L"ny"] = L"Nyanja";
+ result[L"nn"] = L"Nynorsk, Norwegian";
+ result[L"ie"] = L"Occidental";
+ result[L"oc"] = L"Occitan (post 1500)";
+ result[L"oj"] = L"Ojibwa";
+ result[L"cu"] = L"Old Bulgarian";
+ result[L"cu"] = L"Old Church Slavonic";
+ result[L"cu"] = L"Old Slavonic";
+ result[L"or"] = L"Oriya";
+ result[L"om"] = L"Oromo";
+ result[L"os"] = L"Ossetian";
+ result[L"os"] = L"Ossetic";
+ result[L"pi"] = L"Pali";
+ result[L"pa"] = L"Panjabi";
+ result[L"ps"] = L"Pashto";
+ result[L"fa"] = L"Persian";
+ result[L"pl"] = L"Polish";
+ result[L"pt"] = L"Portuguese";
+ result[L"pa"] = L"Punjabi";
+ result[L"ps"] = L"Pushto";
+ result[L"qu"] = L"Quechua";
+ result[L"ro"] = L"Romanian";
+ result[L"rm"] = L"Romansh";
+ result[L"rn"] = L"Rundi";
+ result[L"ru"] = L"Russian";
+ result[L"sm"] = L"Samoan";
+ result[L"sg"] = L"Sango";
+ result[L"sa"] = L"Sanskrit";
+ result[L"sc"] = L"Sardinian";
+ result[L"gd"] = L"Scottish Gaelic";
+ result[L"sr"] = L"Serbian";
+ result[L"sn"] = L"Shona";
+ result[L"ii"] = L"Sichuan Yi";
+ result[L"sd"] = L"Sindhi";
+ result[L"si"] = L"Sinhala";
+ result[L"si"] = L"Sinhalese";
+ result[L"sk"] = L"Slovak";
+ result[L"sl"] = L"Slovenian";
+ result[L"so"] = L"Somali";
+ result[L"st"] = L"Sotho, Southern";
+ result[L"nr"] = L"South Ndebele";
+ result[L"es"] = L"Spanish";
+ result[L"su"] = L"Sundanese";
+ result[L"sw"] = L"Swahili";
+ result[L"ss"] = L"Swati";
+ result[L"sv"] = L"Swedish";
+ result[L"tl"] = L"Tagalog";
+ result[L"ty"] = L"Tahitian";
+ result[L"tg"] = L"Tajik";
+ result[L"ta"] = L"Tamil";
+ result[L"tt"] = L"Tatar";
+ result[L"te"] = L"Telugu";
+ result[L"th"] = L"Thai";
+ result[L"bo"] = L"Tibetan";
+ result[L"ti"] = L"Tigrinya";
+ result[L"to"] = L"Tonga (Tonga Islands)";
+ result[L"ts"] = L"Tsonga";
+ result[L"tn"] = L"Tswana";
+ result[L"tr"] = L"Turkish";
+ result[L"tk"] = L"Turkmen";
+ result[L"tw"] = L"Twi";
+ result[L"ug"] = L"Uighur";
+ result[L"uk"] = L"Ukrainian";
+ result[L"ur"] = L"Urdu";
+ result[L"ug"] = L"Uyghur";
+ result[L"uz"] = L"Uzbek";
+ result[L"ca"] = L"Valencian";
+ result[L"ve"] = L"Venda";
+ result[L"vi"] = L"Vietnamese";
+ result[L"vo"] = L"Volapuk";
+ result[L"wa"] = L"Walloon";
+ result[L"cy"] = L"Welsh";
+ result[L"fy"] = L"Western Frisian";
+ result[L"wo"] = L"Wolof";
+ result[L"xh"] = L"Xhosa";
+ result[L"yi"] = L"Yiddish";
+ result[L"yo"] = L"Yoruba";
+ result[L"za"] = L"Zhuang";
+ result[L"zu"] = L"Zulu";
}
void CSkypeProto::UpdateProfileFirstName(const JSONNode &root, MCONTACT hContact)
@@ -268,7 +268,7 @@ void CSkypeProto::UpdateProfileDisplayName(const JSONNode &root, MCONTACT hConta if (firstname) {
CMString nick(firstname);
if (lastname)
- nick.AppendFormat(_T(" %s"), lastname);
+ nick.AppendFormat(L" %s", lastname);
setTString(hContact, "Nick", nick);
}
else if (lastname)
@@ -299,7 +299,7 @@ void CSkypeProto::UpdateProfileBirthday(const JSONNode &root, MCONTACT hContact) if (!birthday.IsEmpty() && birthday != "null")
{
int d, m, y;
- _stscanf(birthday.GetBuffer(), _T("%d-%d-%d"), &y, &m, &d);
+ _stscanf(birthday.GetBuffer(), L"%d-%d-%d", &y, &m, &d);
setWord(hContact, "BirthYear", y);
setByte(hContact, "BirthDay", d);
setByte(hContact, "BirthMonth", m);
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 0059de176b..a4ff764aef 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -42,7 +42,7 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) : CreateProtoService("/IncomingCallCLE", &CSkypeProto::OnIncomingCallCLE);
CreateProtoService("/IncomingCallPP", &CSkypeProto::OnIncomingCallPP);
- m_tszAvatarFolder = std::tstring(VARST(_T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName;
+ m_tszAvatarFolder = std::tstring(VARST(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName;
DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str());
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeT(m_tszAvatarFolder.c_str());
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index fa3abdeb3b..58d0ad84e4 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -507,11 +507,11 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) *(szSecondParam++) = 0;
// no command or message command
- if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("chat"))))
+ if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, L"chat")))
{
if (szSecondParam)
{
- TCHAR *szChatId = _tcsstr(szSecondParam, _T("id="));
+ TCHAR *szChatId = _tcsstr(szSecondParam, L"id=");
if (szChatId)
{
szChatId += 5;
@@ -523,14 +523,14 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL);
return 0;
}
- else if (!mir_tstrcmpi(szCommand, _T("call")))
+ else if (!mir_tstrcmpi(szCommand, L"call"))
{
MCONTACT hContact = AddContact(_T2A(szJid), true);
NotifyEventHooks(g_hCallEvent, (WPARAM)hContact, (LPARAM)0);
return 0;
}
- else if (!mir_tstrcmpi(szCommand, _T("userinfo"))){ return 0; }
- else if (!mir_tstrcmpi(szCommand, _T("add")))
+ else if (!mir_tstrcmpi(szCommand, L"userinfo")){ return 0; }
+ else if (!mir_tstrcmpi(szCommand, L"add"))
{
MCONTACT hContact = FindContact(_T2A(szJid));
if (hContact == NULL)
@@ -550,13 +550,13 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) }
return 0;
}
- if (!mir_tstrcmpi(szCommand, _T("sendfile")))
+ if (!mir_tstrcmpi(szCommand, L"sendfile"))
{
MCONTACT hContact = AddContact(_T2A(szJid), true);
CallService(MS_FILE_SENDFILE, hContact, NULL);
return 1;
}
- if (!mir_tstrcmpi(szCommand, _T("voicemail")))
+ if (!mir_tstrcmpi(szCommand, L"voicemail"))
{
return 1;
}
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 77382eb5c4..ad2348463d 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -3,7 +3,7 @@ TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -11,7 +11,7 @@ TCHAR* CSteamProto::GetAvatarFilePath(MCONTACT hContact) ptrA steamId(getStringA(hContact, "SteamID"));
if (steamId != NULL)
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s.jpg"), path, _A2T(steamId));
+ mir_sntprintf(path, MAX_PATH, L"%s\\%s.jpg", path, _A2T(steamId));
else
return NULL;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 9d3c9a88f8..de1253ad2e 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -186,23 +186,23 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) WORD status = getWord(hContact, "Status", ID_STATUS_OFFLINE); if (status == ID_STATUS_ONLINE || status == ID_STATUS_OUTTOLUNCH || status == ID_STATUS_FREECHAT) - setTString(hContact, "MirVer", _T("Steam")); + setTString(hContact, "MirVer", L"Steam"); } else if (stateflags & 2) { // game - setTString(hContact, "MirVer", _T("Steam (in game)")); + setTString(hContact, "MirVer", L"Steam (in game)"); } else if (stateflags & 256) { // on website - setTString(hContact, "MirVer", _T("Steam (website)")); + setTString(hContact, "MirVer", L"Steam (website)"); } else if (stateflags & 512) { // on mobile - setTString(hContact, "MirVer", _T("Steam (mobile)")); + setTString(hContact, "MirVer", L"Steam (mobile)"); } else if (stateflags & 1024) { // big picture mode - setTString(hContact, "MirVer", _T("Steam (Big Picture)")); + setTString(hContact, "MirVer", L"Steam (Big Picture)"); } else { // none/unknown (e.g. when contact is offline) @@ -268,7 +268,7 @@ void CSteamProto::ContactIsRemoved(MCONTACT hContact) TCHAR message[MAX_PATH]; mir_sntprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick); - ShowNotification(_T("Steam"), message); + ShowNotification(L"Steam", message); } } @@ -286,7 +286,7 @@ void CSteamProto::ContactIsFriend(MCONTACT hContact) TCHAR message[MAX_PATH]; mir_sntprintf(message, MAX_PATH, TranslateT("%s is back in your contact list"), nick); - ShowNotification(_T("Steam"), message); + ShowNotification(L"Steam", message); } } @@ -602,7 +602,7 @@ void CSteamProto::OnGotAvatar(const HttpResponse *response, void *arg) return; } - FILE *fp = _tfopen(ai.filename, _T("wb")); + FILE *fp = _tfopen(ai.filename, L"wb"); if (fp) { fwrite(response->pData, sizeof(char), response->dataLength, fp); diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 979fc03c7e..fd8d7399f7 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -31,7 +31,7 @@ bool CSteamProto::Relogin() JSONNode *node = json_get(root, "error"); ptrT error(json_as_string(node)); - if (!mir_tstrcmpi(error, _T("OK"))) + if (!mir_tstrcmpi(error, L"OK")) { node = json_get(root, "umqid"); setString("UMQID", ptrA(mir_u2a(ptrT(json_as_string(node))))); @@ -151,7 +151,7 @@ void CSteamProto::OnAuthorizationError(const JSONNode &node) ptrT messageT(mir_utf8decodeT(message.c_str())); debugLogA("CSteamProto::OnAuthorizationError: %s", message.c_str()); - if (!mir_tstrcmpi(messageT, _T("Incorrect login."))) + if (!mir_tstrcmpi(messageT, L"Incorrect login.")) { // We can't continue with incorrect login/password DeleteAuthSettings(); @@ -325,7 +325,7 @@ void CSteamProto::HandleTokenExpired() // Try to relogin automatically (but only once) if (isLoginAgain) { // Notify error to user - ShowNotification(_T("Steam"), TranslateT("Cannot obtain connection token.")); + ShowNotification(L"Steam", TranslateT("Cannot obtain connection token.")); // Just go offline; it also resets the isLoginAgain to false SetStatus(ID_STATUS_OFFLINE); @@ -358,7 +358,7 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) } // Probably timeout or no connection, we can do nothing here - ShowNotification(_T("Steam"), TranslateT("Unknown login error.")); + ShowNotification(L"Steam", TranslateT("Unknown login error.")); SetStatus(ID_STATUS_OFFLINE); return; @@ -368,7 +368,7 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) JSONNode *node = json_get(root, "error"); ptrT error(json_as_string(node)); - if (mir_tstrcmpi(error, _T("OK"))) + if (mir_tstrcmpi(error, L"OK")) { // Probably expired TokenSecret HandleTokenExpired(); diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 56cb5f2f62..bfcde18b1d 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -58,7 +58,7 @@ void CSteamProto::OnMessageSent(const HttpResponse *response, void *arg) }
}
- if (mir_tstrcmpi(error, _T("OK")) != 0)
+ if (mir_tstrcmpi(error, L"OK") != 0)
{
ptrA errorA(mir_t2a(error));
debugLogA("CSteamProto::OnMessageSent: failed to send message for %s (%s)", steamId, errorA);
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index 666e206978..66bc247ea8 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -7,9 +7,9 @@ CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwnd {
SetParent(hwndParent);
- CreateLink(m_username, "Username", _T(""));
- CreateLink(m_password, "Password", _T(""));
- CreateLink(m_group, "DefaultGroup", _T("Steam"));
+ CreateLink(m_username, "Username", L"");
+ CreateLink(m_password, "Password", L"");
+ CreateLink(m_group, "DefaultGroup", L"Steam");
CreateLink(m_biggerAvatars, "UseBigAvatars", DBVT_BYTE, FALSE);
CreateLink(m_showChatEvents, "ShowChatEvents", DBVT_BYTE, TRUE);
}
@@ -62,7 +62,7 @@ void CSteamOptionsBlockList::OnInitDialog() m_list.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
m_list.AddColumn(0, TranslateT("Name"), 220);
- m_list.AddColumn(1, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_list.AddColumn(1, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
}
void CSteamOptionsBlockList::OnBlock(CCtrlButton*)
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index 6b53d31763..9958bd334c 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -21,8 +21,8 @@ void CSteamProto::ParsePollData(JSONNode *data) node = json_get(item, "type"); ptrT type(json_as_string(node)); - if (!lstrcmpi(type, _T("saytext")) || !lstrcmpi(type, _T("emote")) || - !lstrcmpi(type, _T("my_saytext")) || !lstrcmpi(type, _T("my_emote"))) + if (!lstrcmpi(type, L"saytext") || !lstrcmpi(type, L"emote") || + !lstrcmpi(type, L"my_saytext") || !lstrcmpi(type, L"my_emote")) { MCONTACT hContact = FindContact(steamId); if (!hContact) @@ -35,7 +35,7 @@ void CSteamProto::ParsePollData(JSONNode *data) PROTORECVEVENT recv = { 0 }; recv.timestamp = timestamp; recv.szMessage = szMessage; - if (_tcsstr(type, _T("my_")) == NULL) + if (_tcsstr(type, L"my_") == NULL) { ProtoChainRecvMsg(hContact, &recv); } @@ -45,7 +45,7 @@ void CSteamProto::ParsePollData(JSONNode *data) Proto_RecvMessage(hContact, &recv); } } - else if (!lstrcmpi(type, _T("typing"))) + else if (!lstrcmpi(type, L"typing")) { MCONTACT hContact = FindContact(steamId); if (hContact) @@ -53,7 +53,7 @@ void CSteamProto::ParsePollData(JSONNode *data) CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)STEAM_TYPING_TIME); } } - else if (!lstrcmpi(type, _T("personastate"))) + else if (!lstrcmpi(type, L"personastate")) { node = json_get(item, "persona_state"); int status = node ? SteamToMirandaStatus(json_as_int(node)) : -1; @@ -68,7 +68,7 @@ void CSteamProto::ParsePollData(JSONNode *data) if (status != m_iStatus) { - debugLog(_T("CSteamProto::ParsePollData: Change own status to %i"), status); + debugLog(L"CSteamProto::ParsePollData: Change own status to %i", status); int oldStatus = m_iStatus; m_iStatus = m_iDesiredStatus = status; ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus); @@ -90,7 +90,7 @@ void CSteamProto::ParsePollData(JSONNode *data) // todo: find difference between state changing and info changing steamIds.append(steamId).append(","); } - else if (!lstrcmpi(type, _T("personarelationship"))) + else if (!lstrcmpi(type, L"personarelationship")) { node = json_get(item, "persona_state"); int state = json_as_int(node); @@ -146,7 +146,7 @@ void CSteamProto::ParsePollData(JSONNode *data) default: continue; } } - else if (!lstrcmpi(type, _T("leftconversation"))) + else if (!lstrcmpi(type, L"leftconversation")) { if (!getBool("ShowChatEvents", true)) continue; @@ -185,7 +185,7 @@ void CSteamProto::ParsePollData(JSONNode *data) void CSteamProto::PollingThread(void*) { - debugLog(_T("CSteamProto::PollingThread: entering")); + debugLog(L"CSteamProto::PollingThread: entering"); ptrA token(getStringA("TokenSecret")); ptrA umqId(getStringA("UMQID")); @@ -219,7 +219,7 @@ void CSteamProto::PollingThread(void*) if (node) { ptrT error(json_as_string(node)); - if (!lstrcmpi(error, _T("OK"))) + if (!lstrcmpi(error, L"OK")) { // Remember last message timestamp node = json_get(root, "utc_timestamp"); @@ -244,14 +244,14 @@ void CSteamProto::PollingThread(void*) // m_pollingConnection = response->nlc; } - else if (!lstrcmpi(error, _T("Timeout"))) + else if (!lstrcmpi(error, L"Timeout")) { // Do nothing as this is not necessarily an error } - else if (!lstrcmpi(error, _T("Not Logged On"))) // 'else' below will handle this error, we don't need this particular check right now + else if (!lstrcmpi(error, L"Not Logged On")) // 'else' below will handle this error, we don't need this particular check right now { // need to relogin - debugLog(_T("CSteamProto::PollingThread: Not Logged On")); + debugLog(L"CSteamProto::PollingThread: Not Logged On"); // try to reconnect only when we're actually online (during normal logout we will still got this error anyway, but in that case our status is already offline) if (IsOnline() && Relogin()) @@ -269,7 +269,7 @@ void CSteamProto::PollingThread(void*) else { // something wrong - debugLog(_T("CSteamProto::PollingThread: %s (%d)"), error, response->resultCode); + debugLog(L"CSteamProto::PollingThread: %s (%d)", error, response->resultCode); // token has expired if (response->resultCode == HTTP_CODE_UNAUTHORIZED) @@ -279,7 +279,7 @@ void CSteamProto::PollingThread(void*) node = json_get(root, "sectimeout"); int timeout = json_as_int(node); if (timeout < STEAM_API_TIMEOUT) - debugLog(_T("CSteamProto::PollingThread: Timeout is too low (%d)"), timeout); + debugLog(L"CSteamProto::PollingThread: Timeout is too low (%d)", timeout); // let it jump out of further processing errors = errorsLimit; @@ -295,10 +295,10 @@ void CSteamProto::PollingThread(void*) if (IsOnline()) { - debugLog(_T("CSteamProto::PollingThread: unexpected termination; switching protocol to offline")); + debugLog(L"CSteamProto::PollingThread: unexpected termination; switching protocol to offline"); SetStatus(ID_STATUS_OFFLINE); } m_hPollingThread = NULL; - debugLog(_T("CSteamProto::PollingThread: leaving")); + debugLog(L"CSteamProto::PollingThread: leaving"); }
\ No newline at end of file diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index e0ec091bee..a6aacedd65 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -18,7 +18,7 @@ CSteamProto::CSteamProto(const char* protoName, const TCHAR* userName) GetModuleFileName(g_hInstance, filePath, MAX_PATH); wchar_t sectionName[100]; - mir_sntprintf(sectionName, _T("%s/%s"), LPGENT("Protocols"), LPGENT(MODULE)); + mir_sntprintf(sectionName, L"%s/%s", LPGENT("Protocols"), LPGENT(MODULE)); char settingName[100]; mir_snprintf(settingName, "%s_%s", MODULE, "main"); @@ -245,7 +245,7 @@ HANDLE CSteamProto::SearchByName(const TCHAR* nick, const TCHAR* firstName, cons // Combine all fields to single text TCHAR keywordsT[200]; - mir_sntprintf(keywordsT, _T("%s %s %s"), nick, firstName, lastName); + mir_sntprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); ptrA token(getStringA("TokenSecret")); ptrA keywords(mir_utf8encodeW(keywordsT)); @@ -296,7 +296,7 @@ int CSteamProto::SetStatus(int new_status) if (new_status == m_iDesiredStatus) return 0; - debugLog(_T("CSteamProto::SetStatus: changing status from %i to %i"), m_iStatus, new_status); + debugLog(L"CSteamProto::SetStatus: changing status from %i to %i", m_iStatus, new_status); int old_status = m_iStatus; m_iDesiredStatus = new_status; @@ -375,7 +375,7 @@ void __cdecl CSteamProto::GetAwayMsgThread(void *arg) ptrT xStatusMsg(getTStringA(hContact, "XStatusMsg")); if (xStatusName) - message.AppendFormat(_T("%s: %s"), xStatusName, xStatusMsg); + message.AppendFormat(L"%s: %s", xStatusName, xStatusMsg); else message.Append(xStatusMsg); } diff --git a/protocols/Tlen/src/tlen_advsearch.cpp b/protocols/Tlen/src/tlen_advsearch.cpp index ad3bcc323e..b140736096 100644 --- a/protocols/Tlen/src/tlen_advsearch.cpp +++ b/protocols/Tlen/src/tlen_advsearch.cpp @@ -28,7 +28,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) {
int i, n;
- n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)L"");
SendMessage(hwndCombo, CB_SETITEMDATA, n, 0);
SendMessage(hwndCombo, CB_SETCURSEL, n, 0);
for (i=0;;i++) {
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 15c352612f..19466f5c10 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -37,9 +37,9 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts if (_taccess(ptszDest, 0)) { int ret = CreateDirectoryTreeT(ptszDest); if (ret == 0) - proto->debugLog(_T("getAvatarFilename(): Created new directory for avatar cache: %s."), ptszDest); + proto->debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", ptszDest); else { - proto->debugLog(_T("getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s"), ptszDest, errno, strerror(errno)); + proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); TCHAR buffer[512]; mir_sntprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _tcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index fe413beb9b..e3058a8526 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -416,7 +416,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, dbv.ptszVal); db_free(&dbv); } - else SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, _T("tlen.pl")); + else SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, L"tlen.pl"); EnableWindow(GetDlgItem(hwndDlg, IDC_HOST), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_HOSTPORT), TRUE); @@ -425,7 +425,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetDlgItemText(hwndDlg, IDC_HOST, dbv.ptszVal); db_free(&dbv); } - else SetDlgItemText(hwndDlg, IDC_HOST, _T("s1.tlen.pl")); + else SetDlgItemText(hwndDlg, IDC_HOST, L"s1.tlen.pl"); SetDlgItemInt(hwndDlg, IDC_HOSTPORT, db_get_w(NULL, proto->m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT), FALSE); @@ -458,8 +458,8 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_PASSWORD), bChecked); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Forwarding")); - SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("SOCKS4")); - SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)_T("SOCKS5")); + SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS4"); + SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS5"); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_SETCURSEL, db_get_w(NULL, proto->m_szModuleName, "FileProxyType", 0), 0); if (!db_get_ts(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) { SetDlgItemText(hwndDlg, IDC_FILE_PROXY_HOST, dbv.ptszVal); @@ -660,7 +660,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, MailPopupPreview((DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0), (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0), title, - _T("From: test@test.test\nSubject: test"), + L"From: test@test.test\nSubject: test", delay); } diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index 765792a643..a4d77111ca 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -263,7 +263,7 @@ BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) { ofn.Flags = OFN_FILEMUSTEXIST;
if (GetOpenFileName(&ofn)) {
long size;
- FILE* fp = _tfopen(tszFileName, _T("rb"));
+ FILE* fp = _tfopen(tszFileName, L"rb");
if (fp) {
fseek(fp, 0, SEEK_END);
size = ftell(fp);
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index fbe38e7a51..04ca98b5aa 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -32,46 +32,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen_avatar.h"
TLEN_FIELD_MAP tlenFieldGender[] = {
- { 1, _T("Male") },
- { 2, _T("Female") },
+ { 1, L"Male" },
+ { 2, L"Female" },
{ 0, NULL }
};
TLEN_FIELD_MAP tlenFieldLookfor[] = {
- { 1, _T("Somebody to talk") },
- { 2, _T("Friendship") },
- { 3, _T("Flirt/romance") },
- { 4, _T("Love") },
- { 5, _T("Nothing") },
+ { 1, L"Somebody to talk" },
+ { 2, L"Friendship" },
+ { 3, L"Flirt/romance" },
+ { 4, L"Love" },
+ { 5, L"Nothing" },
{ 0, NULL }
};
TLEN_FIELD_MAP tlenFieldStatus[] = {
- { 1, _T("All") },
- { 2, _T("Available") },
- { 3, _T("Free for chat") },
+ { 1, L"All" },
+ { 2, L"Available" },
+ { 3, L"Free for chat" },
{ 0, NULL }
};
TLEN_FIELD_MAP tlenFieldOccupation[] = {
- { 1, _T("Student") },
- { 2, _T("College student") },
- { 3, _T("Farmer") },
- { 4, _T("Manager") },
- { 5, _T("Specialist") },
- { 6, _T("Clerk") },
- { 7, _T("Unemployed") },
- { 8, _T("Pensioner") },
- { 9, _T("Housekeeper") },
- { 10, _T("Teacher") },
- { 11, _T("Doctor") },
- { 12, _T("Other") },
+ { 1, L"Student" },
+ { 2, L"College student" },
+ { 3, L"Farmer" },
+ { 4, L"Manager" },
+ { 5, L"Specialist" },
+ { 6, L"Clerk" },
+ { 7, L"Unemployed" },
+ { 8, L"Pensioner" },
+ { 9, L"Housekeeper" },
+ { 10, L"Teacher" },
+ { 11, L"Doctor" },
+ { 12, L"Other" },
{ 0, NULL }
};
TLEN_FIELD_MAP tlenFieldPlan[] = {
- { 1, _T("I'd like to go downtown") },
- { 2, _T("I'd like to go to the cinema") },
- { 3, _T("I'd like to take a walk") },
- { 4, _T("I'd like to go to the disco") },
- { 5, _T("I'd like to go on a blind date") },
- { 6, _T("Waiting for suggestion") },
+ { 1, L"I'd like to go downtown" },
+ { 2, L"I'd like to go to the cinema" },
+ { 3, L"I'd like to take a walk" },
+ { 4, L"I'd like to go to the disco" },
+ { 5, L"I'd like to go on a blind date" },
+ { 6, L"Waiting for suggestion" },
{ 0, NULL }
};
@@ -81,7 +81,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) {
int i, n;
- n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)L"");
SendMessage(hwndCombo, CB_SETITEMDATA, n, 0);
SendMessage(hwndCombo, CB_SETCURSEL, n, 0);
for (i=0;;i++) {
@@ -180,38 +180,38 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara int i;
TLEN_LIST_ITEM *item;
- SetDlgItemText(hwndDlg, IDC_INFO_JID, _T(""));
- SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, _T(""));
+ SetDlgItemText(hwndDlg, IDC_INFO_JID, L"");
+ SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_STATIC));
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "FirstName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FIRSTNAME, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, L"");
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "LastName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_LASTNAME, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_LASTNAME, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_LASTNAME, L"");
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "Nick", &dbv)) {
SetDlgItemText(hwndDlg, IDC_NICKNAME, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_NICKNAME, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_NICKNAME, L"");
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "e-mail", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EMAIL, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_EMAIL, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_EMAIL, L"");
if (!db_get(data->hContact, data->proto->m_szModuleName, "Age", &dbv)) {
SetDlgItemInt(hwndDlg, IDC_AGE, dbv.wVal, FALSE);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_AGE, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_AGE, L"");
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "City", &dbv)) {
SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_CITY, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_CITY, L"");
if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "School", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SCHOOL, dbv.ptszVal);
db_free(&dbv);
- } else SetDlgItemText(hwndDlg, IDC_SCHOOL, _T(""));
+ } else SetDlgItemText(hwndDlg, IDC_SCHOOL, L"");
switch (db_get_b(data->hContact, data->proto->m_szModuleName, "Gender", '?')) {
case 'M':
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 1, 0);
@@ -223,7 +223,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara break;
default:
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 0, 0);
- SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, _T(""));
+ SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, L"");
break;
}
i = db_get_w(data->hContact, data->proto->m_szModuleName, "Occupation", 0);
@@ -231,7 +231,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, TranslateTS(tlenFieldOccupation[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, i, 0);
} else {
- SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, _T(""));
+ SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, L"");
SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, 0, 0);
}
i = db_get_w(data->hContact, data->proto->m_szModuleName, "LookingFor", 0);
@@ -239,7 +239,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, TranslateTS(tlenFieldLookfor[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, i, 0);
} else {
- SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, _T(""));
+ SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, L"");
SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, 0, 0);
}
i = db_get_w(data->hContact, data->proto->m_szModuleName, "VoiceChat", 0);
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index 5548662415..0002d8c9c4 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -722,7 +722,7 @@ static HBITMAP TlenVoiceMakeBitmap(int w, int h, int bpp, void *ptr) bmih.bmiHeader.biYPelsPerMeter = 0;
bmih.bmiHeader.biClrUsed = 0;
bmih.bmiHeader.biClrImportant = 0;
- HDC hdc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
+ HDC hdc = CreateDC(L"DISPLAY", NULL, NULL, NULL);
HBITMAP hbm = CreateDIBitmap(hdc, (PBITMAPINFOHEADER)&bmih, CBM_INIT, ptr, &bmih, DIB_RGB_COLORS);
ReleaseDC(NULL, hdc);
return hbm;
@@ -779,10 +779,10 @@ static INT_PTR CALLBACK TlenVoiceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
proto->voiceDlgHWND = hwndDlg;
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("8000 Hz / 13.8 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("11025 Hz / 19.1 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("22050 Hz / 36.8 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)_T("44100 Hz / 72 kbps"));
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"8000 Hz / 13.8 kbps");
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"11025 Hz / 19.1 kbps");
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"22050 Hz / 36.8 kbps");
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM)L"44100 Hz / 72 kbps");
SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_SETCURSEL, 1, 0);
SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASFLATBTN, TRUE, 0);
diff --git a/protocols/Tox/src/tox.cpp b/protocols/Tox/src/tox.cpp index 5e45668519..cd67b0f8f0 100644 --- a/protocols/Tox/src/tox.cpp +++ b/protocols/Tox/src/tox.cpp @@ -36,7 +36,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void)
{
- g_hToxLibrary = LoadLibrary(_T("libtox.dll"));
+ g_hToxLibrary = LoadLibrary(L"libtox.dll");
if (g_hToxLibrary == NULL)
return 0;
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp index 109a4532f6..f4a2ad222d 100644 --- a/protocols/Tox/src/tox_accounts.cpp +++ b/protocols/Tox/src/tox_accounts.cpp @@ -46,7 +46,7 @@ int CToxProto::OnAccountRenamed(WPARAM, LPARAM) ptrT newPath(GetToxProfilePath());
TCHAR oldPath[MAX_PATH];
- mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName);
+ mir_sntprintf(oldPath, MAX_PATH, L"%s\\%s.tox", VARST(L"%miranda_userdata%"), accountName);
_trename(oldPath, newPath);
mir_free(accountName);
accountName = mir_tstrdup(m_tszUserName);
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index b7282e781f..b62328ae11 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -3,7 +3,7 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact)
{
TCHAR *path = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1);
- mir_sntprintf(path, MAX_PATH, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, MAX_PATH, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -12,12 +12,12 @@ TCHAR* CToxProto::GetAvatarFilePath(MCONTACT hContact) ptrT address(getTStringA(hContact, TOX_SETTINGS_ID));
if (address == NULL) {
mir_free(path);
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
}
if (hContact && mir_tstrlen(address) > TOX_PUBLIC_KEY_SIZE * 2)
address[TOX_PUBLIC_KEY_SIZE * 2] = 0;
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s.png"), path, address);
+ mir_sntprintf(path, MAX_PATH, L"%s\\%s.png", path, address);
return path;
}
@@ -231,7 +231,7 @@ void CToxProto::OnGotFriendAvatarInfo(AvatarTransferParam *transfer) }
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
OnFileAllow(transfer->pfts.hContact, transfer, path);
}
diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp index aba34e46b6..59580431a3 100644 --- a/protocols/Tox/src/tox_chatrooms.cpp +++ b/protocols/Tox/src/tox_chatrooms.cpp @@ -29,7 +29,7 @@ MCONTACT CToxProto::AddChatRoom(int groupNumber) setWord(hContact, TOX_SETTINGS_CHAT_ID, groupNumber);
TCHAR title[MAX_PATH];
- mir_sntprintf(title, _T("%s #%d"), TranslateT("Group chat"), groupNumber);
+ mir_sntprintf(title, L"%s #%d", TranslateT("Group chat"), groupNumber);
setTString(hContact, "Nick", title);
DBVARIANT dbv;
diff --git a/protocols/Tox/src/tox_network.cpp b/protocols/Tox/src/tox_network.cpp index 47b08a2396..f4e6d887f5 100644 --- a/protocols/Tox/src/tox_network.cpp +++ b/protocols/Tox/src/tox_network.cpp @@ -169,7 +169,7 @@ void CToxProto::UpdateNodes() CloseHandle(hProfile);
}
- FILE *hFile = _tfopen(path, _T("w"));
+ FILE *hFile = _tfopen(path, L"w");
if (!hFile)
{
debugLogA(__FUNCTION__": failed to open tox.json");
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 887ebe88ab..527144081b 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -9,10 +9,10 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog) m_enableUdp(this, IDC_ENABLE_UDP), m_enableIPv6(this, IDC_ENABLE_IPV6)
{
- CreateLink(m_toxAddress, TOX_SETTINGS_ID, _T(""));
- CreateLink(m_nickname, "Nick", _T(""));
- CreateLink(m_password, "Password", _T(""));
- CreateLink(m_group, TOX_SETTINGS_GROUP, _T("Tox"));
+ CreateLink(m_toxAddress, TOX_SETTINGS_ID, L"");
+ CreateLink(m_nickname, "Nick", L"");
+ CreateLink(m_password, "Password", L"");
+ CreateLink(m_group, TOX_SETTINGS_GROUP, L"Tox");
CreateLink(m_enableUdp, "EnableUDP", DBVT_BYTE, TRUE);
CreateLink(m_enableIPv6, "EnableIPv6", DBVT_BYTE, FALSE);
@@ -105,7 +105,7 @@ void CToxOptionsMain::ProfileCreate_OnClick(CCtrlButton*) void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"),
+ mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c",
TranslateT("Tox profile"), 0, 0, TranslateT("All files"), 0, 0, 0);
TCHAR profilePath[MAX_PATH] = { 0 };
@@ -118,7 +118,7 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*) ofn.lpstrTitle = TranslateT("Select Tox profile");
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER;
- ofn.lpstrInitialDir = _T("%APPDATA%\\Tox");
+ ofn.lpstrInitialDir = L"%APPDATA%\\Tox";
if (!GetOpenFileName(&ofn))
return;
@@ -163,11 +163,11 @@ void CToxOptionsMain::ProfileImport_OnClick(CCtrlButton*) void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*)
{
TCHAR filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s(*.tox)%c*.tox%c%c"),
+ mir_sntprintf(filter, L"%s(*.tox)%c*.tox%c%c",
TranslateT("Tox profile"), 0, 0, 0);
TCHAR profilePath[MAX_PATH];
- mir_tstrncpy(profilePath, _T("tox_save.tox"), _countof(profilePath));
+ mir_tstrncpy(profilePath, L"tox_save.tox", _countof(profilePath));
OPENFILENAME ofn = { sizeof(ofn) };
ofn.hwndOwner = m_hwnd;
@@ -177,7 +177,7 @@ void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*) ofn.lpstrTitle = TranslateT("Save Tox profile");
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_EXPLORER;
- ofn.lpstrInitialDir = _T("%HOMEPATH%");
+ ofn.lpstrInitialDir = L"%HOMEPATH%";
if (!GetSaveFileName(&ofn))
return;
@@ -392,8 +392,8 @@ void CToxNodeEditor::OnOk(CCtrlBase*) m_list->SetItem(m_iItem, 0, ipv4);
m_list->SetItem(m_iItem, 2, port);
m_list->SetItem(m_iItem, 3, pubKey);
- m_list->SetItem(m_iItem, 4, _T(""), 0);
- m_list->SetItem(m_iItem, 5, _T(""), 1);
+ m_list->SetItem(m_iItem, 4, L"", 0);
+ m_list->SetItem(m_iItem, 5, L"", 1);
SendMessage(GetParent(GetParent(m_list->GetHwnd())), PSM_CHANGED, 0, 0);
@@ -447,12 +447,12 @@ void CToxOptionsNodeList::OnInitDialog() icon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
ImageList_AddIcon(hImageList, icon); IcoLib_ReleaseIcon(icon);
- m_nodes.AddColumn(0, _T("IPv4"), 100);
- m_nodes.AddColumn(1, _T("IPv6"), 100);
+ m_nodes.AddColumn(0, L"IPv4", 100);
+ m_nodes.AddColumn(1, L"IPv6", 100);
m_nodes.AddColumn(2, TranslateT("Port"), 50);
m_nodes.AddColumn(3, TranslateT("Public key"), 130);
- m_nodes.AddColumn(4, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL));
- m_nodes.AddColumn(5, _T(""), 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_nodes.AddColumn(4, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_nodes.AddColumn(5, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
m_nodes.EnableGroupView(TRUE);
m_nodes.AddGroup(0, TranslateT("Common nodes"));
@@ -567,7 +567,7 @@ void CToxOptionsNodeList::ReloadNodeList() iItem = m_nodes.AddItem(ipv4, -1, NULL, 0);
ptrT ipv6(mir_utf8decodeT(node.at("ipv6").as_string().c_str()));
- if (mir_tstrcmp(ipv6, _T("-")))
+ if (mir_tstrcmp(ipv6, L"-"))
m_nodes.SetItem(iItem, 1, ipv6);
ptrT port(mir_utf8decodeT(node.at("port").as_string().c_str()));
@@ -606,8 +606,8 @@ void CToxOptionsNodeList::ReloadNodeList() value = db_get_tsa(NULL, module, setting);
m_nodes.SetItem(iItem, 3, value);
- m_nodes.SetItem(iItem, 4, _T(""), 0);
- m_nodes.SetItem(iItem, 5, _T(""), 1);
+ m_nodes.SetItem(iItem, 4, L"", 0);
+ m_nodes.SetItem(iItem, 5, L"", 1);
}
}
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 28cef7b286..8c4c49d442 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -11,8 +11,8 @@ TCHAR* CToxProto::GetToxProfilePath(const TCHAR *accountName) {
TCHAR *profilePath = (TCHAR*)mir_calloc(MAX_PATH * sizeof(TCHAR) + 1);
TCHAR profileRootPath[MAX_PATH];
- FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(_T("%miranda_userdata%")));
- mir_sntprintf(profilePath, MAX_PATH, _T("%s\\%s.tox"), profileRootPath, accountName);
+ FoldersGetCustomPathT(hProfileFolderPath, profileRootPath, _countof(profileRootPath), VARST(L"%miranda_userdata%"));
+ mir_sntprintf(profilePath, MAX_PATH, L"%s\\%s.tox", profileRootPath, accountName);
return profilePath;
}
@@ -26,7 +26,7 @@ bool CToxProto::LoadToxProfile(Tox_Options *options) if (!IsFileExists(profilePath))
return false;
- FILE *profile = _tfopen(profilePath, _T("rb"));
+ FILE *profile = _tfopen(profilePath, L"rb");
if (profile == NULL)
{
ShowNotification(TranslateT("Unable to open Tox profile"), MB_ICONERROR);
@@ -122,7 +122,7 @@ void CToxProto::SaveToxProfile(CToxThread *toxThread) }
ptrT profilePath(GetToxProfilePath());
- FILE *profile = _tfopen(profilePath, _T("wb"));
+ FILE *profile = _tfopen(profilePath, L"wb");
if (profile == NULL)
{
debugLogA(__FUNCTION__": failed to open tox profile");
diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index 5c9ca9b56d..e2b3286d22 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -20,7 +20,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u ptrT address(proto->getTStringA(hContact, TOX_SETTINGS_ID));
TCHAR avatarName[MAX_PATH];
- mir_sntprintf(avatarName, MAX_PATH, _T("%s.png"), address);
+ mir_sntprintf(avatarName, MAX_PATH, L"%s.png", address);
AvatarTransferParam *transfer = new AvatarTransferParam(friendNumber, fileNumber, avatarName, fileSize);
transfer->pfts.flags |= PFTS_RECEIVING;
@@ -56,7 +56,7 @@ void CToxProto::OnFriendFile(Tox*, uint32_t friendNumber, uint32_t fileNumber, u pre.dwFlags = PRFF_TCHAR;
pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.descr.t = _T("");
+ pre.descr.t = L"";
pre.files.t = &name;
pre.lParam = (LPARAM)transfer;
ProtoChainRecvFile(hContact, &pre);
@@ -78,7 +78,7 @@ HANDLE CToxProto::OnFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR * // stupid fix
TCHAR fullPath[MAX_PATH];
- mir_sntprintf(fullPath, _T("%s\\%s"), transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
+ mir_sntprintf(fullPath, L"%s\\%s", transfer->pfts.tszWorkingDir, transfer->pfts.tszCurrentFile);
transfer->ChangeName(fullPath);
if (!ProtoBroadcastAck(hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, (HANDLE)transfer, (LPARAM)&transfer->pfts))
@@ -111,7 +111,7 @@ int CToxProto::OnFileResume(HANDLE hTransfer, int *action, const TCHAR **szFilen ToxHexAddress pubKey = GetContactPublicKey(transfer->friendNumber);
- TCHAR *mode = *action == FILERESUME_OVERWRITE ? _T("wb") : _T("ab");
+ TCHAR *mode = *action == FILERESUME_OVERWRITE ? L"wb" : L"ab";
if (!transfer->OpenFile(mode))
{
debugLogA(__FUNCTION__": failed to open file (%d) from %s(%d)", transfer->fileNumber, (const char*)pubKey, transfer->friendNumber);
@@ -206,7 +206,7 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const TCHAR*, TCHAR **ppszFiles) if (friendNumber == UINT32_MAX)
return NULL;
- FILE *hFile = _tfopen(ppszFiles[0], _T("rb"));
+ FILE *hFile = _tfopen(ppszFiles[0], L"rb");
if (hFile == NULL)
{
debugLogA(__FUNCTION__": cannot open file %s", ppszFiles[0]);
diff --git a/protocols/Twitter/src/StringUtil.cpp b/protocols/Twitter/src/StringUtil.cpp index 0ac892cd1f..d9b7123216 100644 --- a/protocols/Twitter/src/StringUtil.cpp +++ b/protocols/Twitter/src/StringUtil.cpp @@ -71,7 +71,7 @@ tstring GetWord(const tstring& str, unsigned index, bool getRest) }
else ++end;
}
- return _T("");
+ return L"";
}
// takes a pointer to a string, and does an inplace replace of all the characters "from" found
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 9c5cb08cab..13d438c185 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -64,7 +64,7 @@ int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam) switch (hook->pDest->iType) {
case GC_USER_MESSAGE:
- debugLog(_T("**Chat - Outgoing message: %s"), hook->ptszText);
+ debugLog(L"**Chat - Outgoing message: %s", hook->ptszText);
{
T2Utf text(hook->ptszText);
@@ -95,7 +95,7 @@ void TwitterProto::AddChatContact(const char *name, const char *nick) gce.time = DWORD(time(0));
gce.ptszNick = mir_a2t(nick ? nick : name);
gce.ptszUID = mir_a2t(name);
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
mir_free(const_cast<TCHAR*>(gce.ptszNick));
@@ -130,7 +130,7 @@ INT_PTR TwitterProto::OnJoinChat(WPARAM, LPARAM suppress) // ***** Create a group
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
- gce.ptszStatus = _T("Normal");
+ gce.ptszStatus = L"Normal";
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
// ***** Hook events
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 642ccd08c3..87c5e25aaa 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -169,7 +169,7 @@ bool TwitterProto::NegotiateConnection() wchar_t buf[1024] = {};
mir_snwprintf(buf, _countof(buf), AuthorizeUrl.c_str(), oauthToken.c_str());
- debugLogW(_T("**NegotiateConnection - Launching %s"), buf);
+ debugLogW(L"**NegotiateConnection - Launching %s", buf);
ShellExecute(NULL, L"open", buf, NULL, NULL, SW_SHOWNORMAL);
ShowPinDialog();
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 3c1d34920b..ffa2245609 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -60,7 +60,7 @@ TwitterProto::TwitterProto(const char *proto_name, const TCHAR *username) : ConsumerKey = OAUTH_CONSUMER_KEY;
ConsumerSecret = OAUTH_CONSUMER_SECRET;
- AuthorizeUrl = _T("https://api.twitter.com/oauth/authorize?oauth_token=%s");
+ AuthorizeUrl = L"https://api.twitter.com/oauth/authorize?oauth_token=%s";
}
TwitterProto::~TwitterProto()
@@ -319,7 +319,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) if (m_hNetlibUser == NULL) {
TCHAR error[200];
mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
- MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR);
}
// Create avatar network connection (TODO: probably remove this)
@@ -332,7 +332,7 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM) if (hAvatarNetlib_ == NULL) {
TCHAR error[200];
mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), TranslateT("Twitter (avatars)"));
- MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR);
}
twit_.set_handle(this, m_hNetlibUser);
@@ -455,7 +455,7 @@ void TwitterProto::UpdateSettings() std::tstring TwitterProto::GetAvatarFolder()
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s\\%s"), VARST(_T("%miranda_avatarcache%")), m_tszUserName);
+ mir_sntprintf(path, L"%s\\%s", VARST(L"%miranda_avatarcache%"), m_tszUserName);
return path;
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index c042e43aa9..f82017d613 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "twitter.h"
static const TCHAR *sites[] = {
- _T("https://api.twitter.com/"),
- _T("https://identi.ca/api/")
+ L"https://api.twitter.com/",
+ L"https://identi.ca/api/"
};
INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -109,11 +109,11 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara proto = reinterpret_cast<TwitterProto*>(lParam);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
SendDlgItemMessage(hwndDlg, IDC_TWEETMSG, EM_LIMITTEXT, 140, 0);
- SetDlgItemText(hwndDlg, IDC_CHARACTERS, _T("140"));
+ SetDlgItemText(hwndDlg, IDC_CHARACTERS, L"140");
// Set window title
TCHAR title[512];
- mir_sntprintf(title, _T("Send Tweet for %s"), proto->m_tszUserName);
+ mir_sntprintf(title, L"Send Tweet for %s", proto->m_tszUserName);
SetWindowText(hwndDlg, title);
return true;
@@ -299,17 +299,17 @@ namespace popup_options TCHAR *text;
} const quotes[] = {
{
- _T("Dorothy Parker"), _T("If, with the literate, I am\n")
- _T("Impelled to try an epigram,\n")
- _T("I never seek to take the credit;\n")
- _T("We all assume that Oscar said it.") },
- { _T("Steve Ballmer"), _T("I have never, honestly, thrown a chair in my life.") },
- { _T("James Joyce"), _T("I think I would know Nora's fart anywhere. I think ")
- _T("I could pick hers out in a roomful of farting women.") },
- { _T("Brooke Shields"), _T("Smoking kills. If you're killed, you've lost a very ")
- _T("important part of your life.") },
- { _T("Yogi Berra"), _T("Always go to other peoples' funerals, otherwise ")
- _T("they won't go to yours.") },
+ L"Dorothy Parker", L"If, with the literate, I am\n"
+ L"Impelled to try an epigram,\n"
+ L"I never seek to take the credit;\n"
+ L"We all assume that Oscar said it." },
+ { L"Steve Ballmer", L"I have never, honestly, thrown a chair in my life." },
+ { L"James Joyce", L"I think I would know Nora's fart anywhere. I think "
+ L"I could pick hers out in a roomful of farting women." },
+ { L"Brooke Shields", L"Smoking kills. If you're killed, you've lost a very "
+ L"important part of your life." },
+ { L"Yogi Berra", L"Always go to other peoples' funerals, otherwise "
+ L"they won't go to yours." },
};
static void preview(HWND hwndDlg)
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 6c7724739a..e8056e02a8 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -149,7 +149,7 @@ bool save_url(HANDLE hNetlib, const std::string &url, const std::tstring &filena CreateDirectoryTreeT(dir.c_str());
// Write to file
- FILE *f = _tfopen(filename.c_str(), _T("wb"));
+ FILE *f = _tfopen(filename.c_str(), L"wb");
fwrite(resp->pData, 1, resp->dataLength, f);
fclose(f);
}
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index be8e69cb1f..0e835a8e35 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -594,46 +594,46 @@ void CVkProto::SetMirVer(MCONTACT hContact, int platform) switch (platform) {
case VK_APP_ID:
- MirVer = _T("Miranda NG VKontakte");
+ MirVer = L"Miranda NG VKontakte";
break;
case 2386311:
- MirVer = _T("QIP 2012 VKontakte");
+ MirVer = L"QIP 2012 VKontakte";
break;
case 1:
- MirVer = _T("VKontakte (Mobile)");
+ MirVer = L"VKontakte (Mobile)";
break;
case 3087106: // iPhone
case 3140623:
case 2:
- MirVer = _T("VKontakte (iPhone)");
+ MirVer = L"VKontakte (iPhone)";
break;
case 3682744: // iPad
case 3:
- MirVer = _T("VKontakte (iPad)");
+ MirVer = L"VKontakte (iPad)";
break;
case 2685278: // Android - Kate
- MirVer = _T("Kate Mobile (Android)");
+ MirVer = L"Kate Mobile (Android)";
break;
case 2890984: // Android
case 2274003:
case 4:
- MirVer = _T("VKontakte (Android)");
+ MirVer = L"VKontakte (Android)";
break;
case 3059453: // Windows Phone
case 2424737:
case 3502561:
case 5:
- MirVer = _T("VKontakte (WPhone)");
+ MirVer = L"VKontakte (WPhone)";
break;
case 3584591: // Windows 8.x
case 6:
- MirVer = _T("VKontakte (Windows)");
+ MirVer = L"VKontakte (Windows)";
break;
case 7:
- MirVer = _T("VKontakte (Website)");
+ MirVer = L"VKontakte (Website)";
break;
default:
- MirVer = _T("VKontakte (Other)");
+ MirVer = L"VKontakte (Other)";
bSetFlag = OldMirVer.IsEmpty();
}
@@ -679,7 +679,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact) TCHAR ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), _T("%X - %x"), localtime(&time), locale);
+ _tcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale);
_free_locale(locale);
StatusTextData st = { 0 };
@@ -834,36 +834,36 @@ CMString CVkProto::SpanVKNotificationType(CMString& tszType, VKObjType& vkFeedba {
CVKNotification vkNotification[] = {
// type, parent, feedback, string for translate
- { _T("group"), vkInvite, vkNull, TranslateT("has invited you to a group") },
- { _T("page"), vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") },
- { _T("event"), vkInvite, vkNull, TranslateT("invites you to event") },
-
- { _T("follow"), vkNull, vkUsers, _T("") },
- { _T("friend_accepted"), vkNull, vkUsers, _T("") },
- { _T("mention"), vkNull, vkPost, _T("") },
- { _T("wall"), vkNull, vkPost, _T("") },
- { _T("wall_publish"), vkNull, vkPost, _T("") },
-
- { _T("comment_post"), vkPost, vkComment, TranslateT("commented on your post") },
- { _T("comment_photo"), vkPhoto, vkComment, TranslateT("commented on your photo") },
- { _T("comment_video"), vkVideo, vkComment, TranslateT("commented on your video") },
- { _T("reply_comment"), vkComment, vkComment, TranslateT("replied to your comment") },
- { _T("reply_comment_photo"), vkComment, vkComment, TranslateT("replied to your comment to photo") },
- { _T("reply_comment_video"), vkComment, vkComment, TranslateT("replied to your comment to video") },
- { _T("reply_topic"), vkTopic, vkComment, TranslateT("replied to your topic") },
- { _T("like_post"), vkPost, vkUsers, TranslateT("liked your post") },
- { _T("like_comment"), vkComment, vkUsers, TranslateT("liked your comment") },
- { _T("like_photo"), vkPhoto, vkUsers, TranslateT("liked your photo") },
- { _T("like_video"), vkVideo, vkUsers, TranslateT("liked your video") },
- { _T("like_comment_photo"), vkComment, vkUsers, TranslateT("liked your comment to photo") },
- { _T("like_comment_video"), vkComment, vkUsers, TranslateT("liked your comment to video" ) },
- { _T("like_comment_topic"), vkComment, vkUsers, TranslateT("liked your comment to topic") },
- { _T("copy_post"), vkPost, vkCopy, TranslateT("shared your post") },
- { _T("copy_photo"), vkPhoto, vkCopy, TranslateT("shared your photo") },
- { _T("copy_video"), vkVideo, vkCopy, TranslateT("shared your video") },
- { _T("mention_comments"), vkPost, vkComment, _T("mentioned you in comment") },
- { _T("mention_comment_photo"), vkPhoto, vkComment, _T("mentioned you in comment to photo") },
- { _T("mention_comment_video"), vkVideo, vkComment, _T("mentioned you in comment to video") }
+ { L"group", vkInvite, vkNull, TranslateT("has invited you to a group") },
+ { L"page", vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") },
+ { L"event", vkInvite, vkNull, TranslateT("invites you to event") },
+
+ { L"follow", vkNull, vkUsers, L"" },
+ { L"friend_accepted", vkNull, vkUsers, L"" },
+ { L"mention", vkNull, vkPost, L"" },
+ { L"wall", vkNull, vkPost, L"" },
+ { L"wall_publish", vkNull, vkPost, L"" },
+
+ { L"comment_post", vkPost, vkComment, TranslateT("commented on your post") },
+ { L"comment_photo", vkPhoto, vkComment, TranslateT("commented on your photo") },
+ { L"comment_video", vkVideo, vkComment, TranslateT("commented on your video") },
+ { L"reply_comment", vkComment, vkComment, TranslateT("replied to your comment") },
+ { L"reply_comment_photo", vkComment, vkComment, TranslateT("replied to your comment to photo") },
+ { L"reply_comment_video", vkComment, vkComment, TranslateT("replied to your comment to video") },
+ { L"reply_topic", vkTopic, vkComment, TranslateT("replied to your topic") },
+ { L"like_post", vkPost, vkUsers, TranslateT("liked your post") },
+ { L"like_comment", vkComment, vkUsers, TranslateT("liked your comment") },
+ { L"like_photo", vkPhoto, vkUsers, TranslateT("liked your photo") },
+ { L"like_video", vkVideo, vkUsers, TranslateT("liked your video") },
+ { L"like_comment_photo", vkComment, vkUsers, TranslateT("liked your comment to photo") },
+ { L"like_comment_video", vkComment, vkUsers, TranslateT("liked your comment to video" ) },
+ { L"like_comment_topic", vkComment, vkUsers, TranslateT("liked your comment to topic") },
+ { L"copy_post", vkPost, vkCopy, TranslateT("shared your post") },
+ { L"copy_photo", vkPhoto, vkCopy, TranslateT("shared your photo") },
+ { L"copy_video", vkVideo, vkCopy, TranslateT("shared your video") },
+ { L"mention_comments", vkPost, vkComment, L"mentioned you in comment" },
+ { L"mention_comment_photo", vkPhoto, vkComment, L"mentioned you in comment to photo" },
+ { L"mention_comment_video", vkVideo, vkComment, L"mentioned you in comment to video" }
};
CMString tszRes;
@@ -896,7 +896,7 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) switch (m_vkOptions.iIMGBBCSupport) {
case imgNo:
- tszPreviewLink = _T("");
+ tszPreviewLink = L"";
break;
case imgFullSize:
tszPreviewLink = tszLink;
@@ -910,12 +910,12 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) int iWidth = jnPhoto["width"].as_int();
int iHeight = jnPhoto["height"].as_int();
- tszRes.AppendFormat(_T("%s (%dx%d)"), SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight);
+ tszRes.AppendFormat(L"%s (%dx%d)", SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
- tszRes.AppendFormat(_T("\n\t%s"), SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : _T("")), bbcBasic, vkbbcImg));
+ tszRes.AppendFormat(L"\n\t%s", SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : L""), bbcBasic, vkbbcImg));
CMString tszText(jnPhoto["text"].as_mstring());
if (!tszText.IsEmpty())
- tszRes += _T("\n") + tszText;
+ tszRes += L"\n" + tszText;
return tszRes;
}
@@ -923,33 +923,33 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC) CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType bbcType, LPCTSTR tszAddString)
{
CVKBBCItem bbcItem[] = {
- { vkbbcB, bbcNo, _T("%s") },
- { vkbbcB, bbcBasic, _T("[b]%s[/b]") },
- { vkbbcB, bbcAdvanced, _T("[b]%s[/b]") },
- { vkbbcI, bbcNo, _T("%s") },
- { vkbbcI, bbcBasic, _T("[i]%s[/i]") },
- { vkbbcI, bbcAdvanced, _T("[i]%s[/i]") },
- { vkbbcS, bbcNo, _T("%s") },
- { vkbbcS, bbcBasic, _T("[s]%s[/s]") },
- { vkbbcS, bbcAdvanced, _T("[s]%s[/s]") },
- { vkbbcU, bbcNo, _T("%s") },
- { vkbbcU, bbcBasic, _T("[u]%s[/u]") },
- { vkbbcU, bbcAdvanced, _T("[u]%s[/u]") },
- { vkbbcCode, bbcNo, _T("%s") },
- { vkbbcCode, bbcBasic, _T("%s") },
- { vkbbcCode, bbcAdvanced, _T("[code]%s[/code]") },
- { vkbbcImg, bbcNo, _T("%s") },
- { vkbbcImg, bbcBasic, _T("[img]%s[/img]") },
- { vkbbcImg, bbcAdvanced, _T("[img]%s[/img]") },
- { vkbbcUrl, bbcNo, _T("%s (%s)") },
- { vkbbcUrl, bbcBasic, _T("[i]%s[/i] (%s)") },
- { vkbbcUrl, bbcAdvanced, _T("[url=%s]%s[/url]") },
- { vkbbcSize, bbcNo, _T("%s") },
- { vkbbcSize, bbcBasic, _T("%s") },
- { vkbbcSize, bbcAdvanced, _T("[size=%s]%s[/size]") },
- { vkbbcColor, bbcNo, _T("%s") },
- { vkbbcColor, bbcBasic, _T("%s") },
- { vkbbcColor, bbcAdvanced, _T("[color=%s]%s[/color]") },
+ { vkbbcB, bbcNo, L"%s" },
+ { vkbbcB, bbcBasic, L"[b]%s[/b]" },
+ { vkbbcB, bbcAdvanced, L"[b]%s[/b]" },
+ { vkbbcI, bbcNo, L"%s" },
+ { vkbbcI, bbcBasic, L"[i]%s[/i]" },
+ { vkbbcI, bbcAdvanced, L"[i]%s[/i]" },
+ { vkbbcS, bbcNo, L"%s" },
+ { vkbbcS, bbcBasic, L"[s]%s[/s]" },
+ { vkbbcS, bbcAdvanced, L"[s]%s[/s]" },
+ { vkbbcU, bbcNo, L"%s" },
+ { vkbbcU, bbcBasic, L"[u]%s[/u]" },
+ { vkbbcU, bbcAdvanced, L"[u]%s[/u]" },
+ { vkbbcCode, bbcNo, L"%s" },
+ { vkbbcCode, bbcBasic, L"%s" },
+ { vkbbcCode, bbcAdvanced, L"[code]%s[/code]" },
+ { vkbbcImg, bbcNo, L"%s" },
+ { vkbbcImg, bbcBasic, L"[img]%s[/img]" },
+ { vkbbcImg, bbcAdvanced, L"[img]%s[/img]" },
+ { vkbbcUrl, bbcNo, L"%s (%s)" },
+ { vkbbcUrl, bbcBasic, L"[i]%s[/i] (%s)" },
+ { vkbbcUrl, bbcAdvanced, L"[url=%s]%s[/url]" },
+ { vkbbcSize, bbcNo, L"%s" },
+ { vkbbcSize, bbcBasic, L"%s" },
+ { vkbbcSize, bbcAdvanced, L"[size=%s]%s[/size]" },
+ { vkbbcColor, bbcNo, L"%s" },
+ { vkbbcColor, bbcBasic, L"%s" },
+ { vkbbcColor, bbcAdvanced, L"[color=%s]%s[/color]" },
};
if (IsEmpty(ptszString))
@@ -967,9 +967,9 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b return CMString(ptszString);
if (bbcType == vkbbcUrl && iBBC != bbcAdvanced)
- res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : _T(""));
+ res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : L"");
else if (iBBC == bbcAdvanced && bbcType >= vkbbcUrl)
- res.AppendFormat(ptszFormat, tszAddString ? tszAddString : _T(""), ptszString);
+ res.AppendFormat(ptszFormat, tszAddString ? tszAddString : L"", ptszString);
else
res.AppendFormat(ptszFormat, ptszString);
@@ -978,12 +978,12 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b CMString& CVkProto::ClearFormatNick(CMString& tszText)
{
- int iNameEnd = tszText.Find(_T("],")), iNameBeg = tszText.Find(_T("|"));
+ int iNameEnd = tszText.Find(L"],"), iNameBeg = tszText.Find(L"|");
if (iNameEnd != -1 && iNameBeg != -1 && iNameBeg < iNameEnd) {
CMString tszName = tszText.Mid(iNameBeg + 1, iNameEnd - iNameBeg - 1);
CMString tszBody = tszText.Mid(iNameEnd + 2);
if (!tszName.IsEmpty() && !tszBody.IsEmpty())
- tszText = tszName + _T(",") + tszBody;
+ tszText = tszName + L"," + tszBody;
}
return tszText;
@@ -1008,14 +1008,14 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport res.AppendChar('\t');
CMString tszType(jnAttach["type"].as_mstring());
- if (tszType == _T("photo")) {
+ if (tszType == L"photo") {
const JSONNode &jnPhoto = jnAttach["photo"];
if (!jnPhoto)
continue;
res += GetVkPhotoItem(jnPhoto, iBBC);
}
- else if (tszType ==_T("audio")) {
+ else if (tszType ==L"audio") {
const JSONNode &jnAudio = jnAttach["audio"];
if (!jnAudio)
continue;
@@ -1023,17 +1023,17 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszArtist(jnAudio["artist"].as_mstring());
CMString tszTitle(jnAudio["title"].as_mstring());
CMString tszUrl(jnAudio["url"].as_mstring());
- CMString tszAudio(FORMAT, _T("%s - %s"), tszArtist, tszTitle);
+ CMString tszAudio(FORMAT, L"%s - %s", tszArtist, tszTitle);
- int iParamPos = tszUrl.Find(_T("?"));
+ int iParamPos = tszUrl.Find(L"?");
if (m_vkOptions.bShortenLinksForAudio && iParamPos != -1)
tszUrl = tszUrl.Left(iParamPos);
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Audio"), iBBC, vkbbcB),
SetBBCString(tszAudio, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType ==_T("video")) {
+ else if (tszType ==L"video") {
const JSONNode &jnVideo = jnAttach["video"];
if (!jnVideo)
continue;
@@ -1041,23 +1041,23 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszTitle(jnVideo["title"].as_mstring());
int vid = jnVideo["id"].as_int();
int ownerID = jnVideo["owner_id"].as_int();
- CMString tszUrl(FORMAT, _T("https://vk.com/video%d_%d"), ownerID, vid);
- res.AppendFormat(_T("%s: %s"),
+ CMString tszUrl(FORMAT, L"https://vk.com/video%d_%d", ownerID, vid);
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Video"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType == _T("doc")) {
+ else if (tszType == L"doc") {
const JSONNode &jnDoc = jnAttach["doc"];
if (!jnDoc)
continue;
CMString tszTitle(jnDoc["title"].as_mstring());
CMString tszUrl(jnDoc["url"].as_mstring());
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Document"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType == _T("wall")) {
+ else if (tszType == L"wall") {
const JSONNode &jnWall = jnAttach["wall"];
if (!jnWall)
continue;
@@ -1065,10 +1065,10 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszText(jnWall["text"].as_mstring());
int id = jnWall["id"].as_int();
int fromID = jnWall["from_id"].as_int();
- CMString tszUrl(FORMAT, _T("https://vk.com/wall%d_%d"), fromID, id);
- res.AppendFormat(_T("%s: %s"),
+ CMString tszUrl(FORMAT, L"https://vk.com/wall%d_%d", fromID, id);
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszUrl),
- tszText.IsEmpty() ? _T(" ") : tszText);
+ tszText.IsEmpty() ? L" " : tszText);
const JSONNode &jnCopyHystory = jnWall["copy_history"];
for (auto aCHit = jnCopyHystory.begin(); aCHit != jnCopyHystory.end(); ++aCHit) {
@@ -1077,18 +1077,18 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszCHText(jnCopyHystoryItem["text"].as_mstring());
int iCHid = jnCopyHystoryItem["id"].as_int();
int iCHfromID = jnCopyHystoryItem["from_id"].as_int();
- CMString tszCHUrl(FORMAT, _T("https://vk.com/wall%d_%d"), iCHfromID, iCHid);
- tszCHText.Replace(_T("\n"), _T("\n\t\t"));
- res.AppendFormat(_T("\n\t\t%s: %s"),
+ CMString tszCHUrl(FORMAT, L"https://vk.com/wall%d_%d", iCHfromID, iCHid);
+ tszCHText.Replace(L"\n", L"\n\t\t");
+ res.AppendFormat(L"\n\t\t%s: %s",
SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszCHUrl),
- tszCHText.IsEmpty() ? _T(" ") : tszCHText);
+ tszCHText.IsEmpty() ? L" " : tszCHText);
const JSONNode &jnSubAttachments = jnCopyHystoryItem["attachments"];
if (jnSubAttachments) {
debugLogA("CVkProto::GetAttachmentDescr SubAttachments");
CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC);
- tszAttachmentDescr.Replace(_T("\n"), _T("\n\t\t"));
- res += _T("\n\t\t") + tszAttachmentDescr;
+ tszAttachmentDescr.Replace(L"\n", L"\n\t\t");
+ res += L"\n\t\t" + tszAttachmentDescr;
}
}
@@ -1096,11 +1096,11 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (jnSubAttachments) {
debugLogA("CVkProto::GetAttachmentDescr SubAttachments");
CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC);
- tszAttachmentDescr.Replace(_T("\n"), _T("\n\t"));
- res += _T("\n\t") + tszAttachmentDescr;
+ tszAttachmentDescr.Replace(L"\n", L"\n\t");
+ res += L"\n\t" + tszAttachmentDescr;
}
}
- else if (tszType == _T("sticker")) {
+ else if (tszType == L"sticker") {
const JSONNode &jnSticker = jnAttach["sticker"];
if (!jnSticker)
continue;
@@ -1108,7 +1108,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport if (m_vkOptions.bStikersAsSmyles) {
int id = jnSticker["id"].as_int();
- res.AppendFormat(_T("[sticker:%d]"), id);
+ res.AppendFormat(L"[sticker:%d]", id);
}
else {
CMString tszLink;
@@ -1119,13 +1119,13 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport break;
}
}
- res.AppendFormat(_T("%s"), tszLink);
+ res.AppendFormat(L"%s", tszLink);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
res += SetBBCString(tszLink, iBBC, vkbbcImg);
}
}
- else if (tszType == _T("link")) {
+ else if (tszType == L"link") {
const JSONNode &jnLink = jnAttach["link"];
if (!jnLink)
continue;
@@ -1135,20 +1135,20 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszCaption(jnLink["caption"].as_mstring());
CMString tszDescription(jnLink["description"].as_mstring());
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Link"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
if (!tszCaption.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), SetBBCString(tszCaption, iBBC, vkbbcI));
+ res.AppendFormat(L"\n\t%s", SetBBCString(tszCaption, iBBC, vkbbcI));
if (jnLink["photo"])
- res.AppendFormat(_T("\n\t%s"), GetVkPhotoItem(jnLink["photo"], iBBC));
+ res.AppendFormat(L"\n\t%s", GetVkPhotoItem(jnLink["photo"], iBBC));
if (!tszDescription.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), tszDescription);
+ res.AppendFormat(L"\n\t%s", tszDescription);
}
- else if (tszType == _T("market")) {
+ else if (tszType == L"market") {
const JSONNode &jnMarket = jnAttach["market"];
int id = jnMarket["id"].as_int();
@@ -1156,30 +1156,30 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport CMString tszTitle(jnMarket["title"].as_mstring());
CMString tszDescription(jnMarket["description"].as_mstring());
CMString tszPhoto(jnMarket["thumb_photo"].as_mstring());
- CMString tszUrl(FORMAT, _T("https://vk.com/%s%d?w=product%d_%d"),
- ownerID > 0 ? _T("id") : _T("club"),
+ CMString tszUrl(FORMAT, L"https://vk.com/%s%d?w=product%d_%d",
+ ownerID > 0 ? L"id" : L"club",
ownerID > 0 ? ownerID : (-1)*ownerID,
ownerID,
id);
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Product"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
if (!tszPhoto.IsEmpty())
- res.AppendFormat(_T("\n\t%s: %s"),
+ res.AppendFormat(L"\n\t%s: %s",
SetBBCString(TranslateT("Photo"), iBBC, vkbbcB),
SetBBCString(tszPhoto, iBBC, vkbbcImg));
if (jnMarket["price"] && jnMarket["price"]["text"])
- res.AppendFormat(_T("\n\t%s: %s"),
+ res.AppendFormat(L"\n\t%s: %s",
SetBBCString(TranslateT("Price"), iBBC, vkbbcB),
jnMarket["price"]["text"].as_mstring());
if (!tszDescription.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), tszDescription);
+ res.AppendFormat(L"\n\t%s", tszDescription);
}
- else if (tszType == _T("gift")) {
+ else if (tszType == L"gift") {
const JSONNode &jnGift = jnAttach["gift"];
if (!jnGift)
continue;
@@ -1197,7 +1197,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport res += SetBBCString(TranslateT("Gift"), iBBC, vkbbcUrl, tszLink);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
- res.AppendFormat(_T("\n\t%s"), SetBBCString(tszLink, iBBC, vkbbcImg));
+ res.AppendFormat(L"\n\t%s", SetBBCString(tszLink, iBBC, vkbbcImg));
}
else
res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), SetBBCString(tszType, iBBC, vkbbcB));
@@ -1223,8 +1223,8 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn const JSONNode &jnUser = (*it);
int iUserId = jnUser["id"].as_int();
- CMString tszNick(FORMAT, _T("%s %s"), jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring());
- CMString tszLink(FORMAT, _T("https://vk.com/id%d"), iUserId);
+ CMString tszNick(FORMAT, L"%s %s", jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring());
+ CMString tszLink(FORMAT, L"https://vk.com/id%d", iUserId);
CVkUserInfo *vkUser = new CVkUserInfo(jnUser["id"].as_int(), false, tszNick, tszLink, FindUser(iUserId));
vkUsers.insert(vkUser);
@@ -1248,13 +1248,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn tszNick = ptrT(db_get_tsa(hContact, m_szModuleName, "Nick"));
else
tszNick = TranslateT("(Unknown contact)");
- tszUrl.AppendFormat(_T("https://vk.com/id%d"), uid);
+ tszUrl.AppendFormat(L"https://vk.com/id%d", uid);
}
time_t datetime = (time_t)jnMsg["date"].as_int();
TCHAR ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), _T("%x %X"), localtime(&datetime), locale);
+ _tcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale);
_free_locale(locale);
CMString tszBody(jnMsg["body"].as_mstring());
@@ -1263,7 +1263,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -1271,13 +1271,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
- tszBody.Replace(_T("\n"), _T("\n\t"));
+ tszBody.Replace(L"\n", L"\n\t");
TCHAR tcSplit = m_vkOptions.bSplitFormatFwdMsg ? '\n' : ' ';
- CMString tszMes(FORMAT, _T("%s %s%c%s %s:\n\n%s\n"),
+ CMString tszMes(FORMAT, L"%s %s%c%s %s:\n\n%s\n",
SetBBCString(TranslateT("Message from"), iBBC, vkbbcB),
SetBBCString(tszNick, iBBC, vkbbcUrl, tszUrl),
tcSplit,
@@ -1313,17 +1313,17 @@ void CVkProto::SetInvisible(MCONTACT hContact) CMString CVkProto::RemoveBBC(CMString& tszSrc)
{
static const TCHAR *tszSimpleBBCodes[][2] = {
- { _T("[b]"), _T("[/b]") },
- { _T("[u]"), _T("[/u]") },
- { _T("[i]"), _T("[/i]") },
- { _T("[s]"), _T("[/s]") },
+ { L"[b]", L"[/b]" },
+ { L"[u]", L"[/u]" },
+ { L"[i]", L"[/i]" },
+ { L"[s]", L"[/s]" },
};
static const TCHAR *tszParamBBCodes[][2] = {
- { _T("[url="), _T("[/url]") },
- { _T("[img="), _T("[/img]") },
- { _T("[size="), _T("[/size]") },
- { _T("[color="), _T("[/color]") },
+ { L"[url=", L"[/url]" },
+ { L"[img=", L"[/img]" },
+ { L"[size=", L"[/size]" },
+ { L"[color=", L"[/color]" },
};
CMString tszRes(tszSrc);
@@ -1371,7 +1371,7 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc) if ((posOpen = tszLow.Find(tszOpenTag, posOpen)) < 0)
break;
- if ((posOpen2 = tszLow.Find(_T("]"), posOpen + lenOpen)) < 0)
+ if ((posOpen2 = tszLow.Find(L"]", posOpen + lenOpen)) < 0)
break;
if ((posClose = tszLow.Find(tszCloseTag, posOpen2 + 1)) < 0)
@@ -1393,12 +1393,12 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc) void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap)
{
TCHAR tszTempDir[MAX_PATH];
- if (!GetEnvironmentVariable(_T("TEMP"), tszTempDir, MAX_PATH))
+ if (!GetEnvironmentVariable(L"TEMP", tszTempDir, MAX_PATH))
return;
- CMString tszHTMLPath(FORMAT, _T("%s\\miranda_captcha.html"), tszTempDir);
+ CMString tszHTMLPath(FORMAT, L"%s\\miranda_captcha.html", tszTempDir);
- FILE *pFile = _tfopen(tszHTMLPath, _T("w"));
+ FILE *pFile = _tfopen(tszHTMLPath, L"w");
if (pFile == NULL)
return;
@@ -1417,6 +1417,6 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) fwrite(szHTML, 1, szHTML.GetLength(), pFile);
fclose(pFile);
- tszHTMLPath = _T("file://") + tszHTMLPath;
+ tszHTMLPath = L"file://" + tszHTMLPath;
Utils_OpenUrlT(tszHTMLPath);
}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index be383afcc9..38cb5d7057 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -27,7 +27,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) GetAvatarFileName(param->hContact, ai.filename, _countof(ai.filename));
ai.format = ProtoGetBufferFormat(reply->pData);
- FILE *out = _tfopen(ai.filename, _T("wb"));
+ FILE *out = _tfopen(ai.filename, L"wb");
if (out == NULL) {
ProtoBroadcastAck(param->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai);
delete param;
@@ -130,7 +130,7 @@ INT_PTR CVkProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam) void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -138,7 +138,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen pszDest[tPathLen++] = '\\';
- const TCHAR *szFileType = _T(".jpg");
+ const TCHAR *szFileType = L".jpg";
ptrT szUrl(getTStringA(hContact, "AvatarUrl"));
if (szUrl) {
TCHAR *p = _tcsrchr(szUrl, '.');
@@ -147,7 +147,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen }
LONG id = getDword(hContact, "ID", -1);
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%d%s"), id, szFileType);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%d%s", id, szFileType);
}
void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 41eeceb7eb..d931c85be0 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -30,7 +30,7 @@ extern JSONNode nullNode; CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
{
- debugLog(_T("CVkProto::AppendChat"));
+ debugLog(L"CVkProto::AppendChat");
if (id == 0)
return NULL;
@@ -46,11 +46,11 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) c = new CVkChatInfo(id);
if (jnDlg) {
tszTitle = jnDlg["title"].as_mstring();
- c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : _T(""));
+ c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : L"");
}
CMString sid;
- sid.Format(_T("%S_%d"), m_szModuleName, id);
+ sid.Format(L"%S_%d", m_szModuleName, id);
c->m_tszId = mir_tstrdup(sid);
GCSESSION gcw = { sizeof(gcw) };
@@ -79,7 +79,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) setDword(gci.hContact, "vk_chat_id", id);
- CMString tszHomepage(FORMAT, _T("https://vk.com/im?sel=c%d"), id);
+ CMString tszHomepage(FORMAT, L"https://vk.com/im?sel=c%d", id);
setTString(gci.hContact, "Homepage", tszHomepage);
db_unset(gci.hContact, m_szModuleName, "off");
@@ -187,7 +187,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (tszNick.IsEmpty()) {
CMString fName(jnUser["first_name"].as_mstring());
CMString lName(jnUser["last_name"].as_mstring());
- tszNick = fName.Trim() + _T(" ") + lName.Trim();
+ tszNick = fName.Trim() + L" " + lName.Trim();
}
cu->m_tszNick = mir_tstrdup(tszNick);
cu->m_bUnknown = false;
@@ -217,7 +217,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe gce.ptszUID = tszId;
gce.dwFlags = GCEF_REMOVECONTACT | GCEF_NOTNOTIFY;
gce.time = time(NULL);
- gce.ptszNick = mir_tstrdup(CMString(FORMAT, _T("%s (https://vk.com/id%s)"), cu.m_tszNick, tszId));
+ gce.ptszNick = mir_tstrdup(CMString(FORMAT, L"%s (https://vk.com/id%s)", cu.m_tszNick, tszId));
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
cc->m_users.remove(i);
@@ -268,7 +268,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe void CVkProto::SetChatTitle(CVkChatInfo *cc, LPCTSTR tszTopic)
{
- debugLog(_T("CVkProto::SetChatTitle"));
+ debugLog(L"CVkProto::SetChatTitle");
if (!cc)
return;
@@ -308,7 +308,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, bbcNo);
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -316,7 +316,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo);
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
@@ -324,75 +324,75 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode & bIsAction = true;
CMString tszAction = jnMsg["action"].as_mstring();
- if (tszAction == _T("chat_create")) {
+ if (tszAction == L"chat_create") {
CMString tszActionText = jnMsg["action_text"].as_mstring();
- tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("create chat"), tszActionText.IsEmpty() ? _T(" ") : tszActionText);
+ tszBody.AppendFormat(L"%s \"%s\"", TranslateT("create chat"), tszActionText.IsEmpty() ? L" " : tszActionText);
}
- else if (tszAction == _T("chat_kick_user")) {
+ else if (tszAction == L"chat_kick_user") {
CMString tszActionMid = jnMsg["action_mid"].as_mstring();
if (tszActionMid.IsEmpty())
tszBody = TranslateT("kick user");
else {
- CMString tszUid(FORMAT, _T("%d"), uid);
+ CMString tszUid(FORMAT, L"%d", uid);
if (tszUid == tszActionMid) {
if (cc->m_bHistoryRead)
return;
- tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("left chat"));
+ tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("left chat"));
}
else {
int a_uid = 0;
- int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
+ int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid);
if (iReadCount == 1) {
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
if (cu == NULL)
- tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("kick user"), a_uid);
+ tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("kick user"), a_uid);
else
- tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("kick user"), cu->m_tszNick, a_uid);
+ tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("kick user"), cu->m_tszNick, a_uid);
}
else
tszBody = TranslateT("kick user");
}
}
}
- else if (tszAction == _T("chat_invite_user")) {
+ else if (tszAction == L"chat_invite_user") {
CMString tszActionMid = jnMsg["action_mid"].as_mstring();
if (tszActionMid.IsEmpty())
tszBody = TranslateT("invite user");
else {
- CMString tszUid(FORMAT, _T("%d"), uid);
+ CMString tszUid(FORMAT, L"%d", uid);
if (tszUid == tszActionMid)
- tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("returned to chat"));
+ tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("returned to chat"));
else {
int a_uid = 0;
- int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
+ int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid);
if (iReadCount == 1) {
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
if (cu == NULL)
- tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("invite user"), a_uid);
+ tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("invite user"), a_uid);
else
- tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("invite user"), cu->m_tszNick, a_uid);
+ tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("invite user"), cu->m_tszNick, a_uid);
}
else
tszBody = TranslateT("invite user");
}
}
}
- else if (tszAction == _T("chat_title_update")) {
+ else if (tszAction == L"chat_title_update") {
CMString tszTitle = jnMsg["action_text"].as_mstring();
- tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("change chat title to"), tszTitle.IsEmpty() ? _T(" ") : tszTitle);
+ tszBody.AppendFormat(L"%s \"%s\"", TranslateT("change chat title to"), tszTitle.IsEmpty() ? L" " : tszTitle);
if (!bIsHistory)
SetChatTitle(cc, tszTitle);
}
- else if (tszAction == _T("chat_photo_update"))
+ else if (tszAction == L"chat_photo_update")
tszBody.Replace(TranslateT("Attachments:"), TranslateT("changed chat cover:"));
- else if (tszAction == _T("chat_photo_remove"))
+ else if (tszAction == L"chat_photo_remove")
tszBody = TranslateT("deleted chat cover");
else
- tszBody.AppendFormat(_T(": %s (%s)"), TranslateT("chat action not supported"), tszAction);
+ tszBody.AppendFormat(L": %s (%s)", TranslateT("chat action not supported"), tszAction);
}
- tszBody.Replace(_T("%"), _T("%%"));
+ tszBody.Replace(L"%", L"%%");
if (cc->m_bHistoryRead) {
if (jnMsg["title"])
@@ -434,7 +434,7 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR gce.time = msgTime;
gce.dwFlags = (bIsHistory) ? GCEF_NOTNOTIFY : GCEF_ADDTOLOG;
gce.ptszNick = cu->m_tszNick ? mir_tstrdup(cu->m_tszNick) : mir_tstrdup(hContact ? ptrT(db_get_tsa(hContact, m_szModuleName, "Nick")) : TranslateT("Unknown"));
- gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(_T("...")) : mir_tstrdup(ptszBody);
+ gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(L"...") : mir_tstrdup(ptszBody);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
StopChatContactTyping(cc->m_chatid, uid);
}
@@ -782,7 +782,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) case IDM_VISIT_PROFILE:
hContact = FindUser(cu->m_uid);
if (hContact == NULL)
- Utils_OpenUrlT(CMString(FORMAT, _T("https://vk.com/id%d"), cu->m_uid));
+ Utils_OpenUrlT(CMString(FORMAT, L"https://vk.com/id%d", cu->m_uid));
else
SvcVisitProfile(hContact, 0);
break;
@@ -933,7 +933,7 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId) StatusTextData st = { 0 };
st.cbSize = sizeof(st);
- mir_sntprintf(st.tszText, _T(" "));
+ mir_sntprintf(st.tszText, L" ");
// CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, NULL) clears statusbar very slowly.
// (1-10 sec(!!!) for me on tabSRMM O_o)
@@ -963,7 +963,7 @@ void CVkProto::CreateNewChat(LPCSTR uids, LPCTSTR ptszTitle) if (!IsOnline())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.createChat.json", true, &CVkProto::OnCreateNewChat)
- << TCHAR_PARAM("title", ptszTitle ? ptszTitle : _T(""))
+ << TCHAR_PARAM("title", ptszTitle ? ptszTitle : L"")
<< CHAR_PARAM("user_ids", uids));
}
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index 21fe217e6d..9e6ba15815 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -120,7 +120,7 @@ void CVkWallPostForm::OnInitDialog() {
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WALL));
- CMString tszTitle(FORMAT, _T("%s %s"), TranslateT("Wall message for"), m_param->ptszNick);
+ CMString tszTitle(FORMAT, L"%s %s", TranslateT("Wall message for"), m_param->ptszNick);
SetCaption(tszTitle);
m_btnShare.Disable();
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 4ed9786164..2bc441d403 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -32,12 +32,12 @@ void CVkProto::AddFeedSpecialUser() hContact = FindUser(VK_FEED_USER, true);
setTString(hContact, "Nick", TranslateT("VKontakte"));
- CMString tszUrl = _T("https://vk.com/press/Simple.png");
+ CMString tszUrl = L"https://vk.com/press/Simple.png";
SetAvatarUrl(hContact, tszUrl);
ReloadAvatarInfo(hContact);
- setTString(hContact, "domain", _T("feed"));
- setTString(hContact, "Homepage", _T("https://vk.com/feed"));
+ setTString(hContact, "domain", L"feed");
+ setTString(hContact, "Homepage", L"https://vk.com/feed");
}
if (getWord(hContact, "Status") != ID_STATUS_ONLINE)
@@ -103,10 +103,10 @@ CVkUserInfo* CVkProto::GetVkUserInfo(LONG iUserId, OBJLIST<CVkUserInfo> &vkUsers if (vkUser == NULL) {
CMString tszNick = TranslateT("Unknown");
- CMString tszLink(_T("https://vk.com/"));
+ CMString tszLink(L"https://vk.com/");
if (iUserId) {
tszLink += bIsGroup ? "club" : "id";
- tszLink.AppendFormat(_T("%d"), bIsGroup ? -iUserId : iUserId);
+ tszLink.AppendFormat(L"%d", bIsGroup ? -iUserId : iUserId);
}
vkUser = new CVkUserInfo(iUserId, bIsGroup, tszNick, tszLink, bIsGroup ? NULL : FindUser(iUserId));
vkUsers.insert(vkUser);
@@ -133,10 +133,10 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod CMString tszNick(jnProfile["first_name"].as_mstring());
tszNick.AppendChar(' ');
tszNick += jnProfile["last_name"].as_mstring();
- CMString tszLink = _T("https://vk.com/");
+ CMString tszLink = L"https://vk.com/";
CMString tszScreenName(jnProfile["screen_name"].as_mstring());
if (tszScreenName.IsEmpty())
- tszScreenName.AppendFormat(_T("id%d"), UserId);
+ tszScreenName.AppendFormat(L"id%d", UserId);
tszLink += tszScreenName;
CVkUserInfo *vkUser = new CVkUserInfo(UserId, false, tszNick, tszLink, FindUser(UserId));
vkUsers.insert(vkUser);
@@ -151,7 +151,7 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod LONG UserId = - jnProfile["id"].as_int();
CMString tszNick(jnProfile["name"].as_mstring());
- CMString tszLink = _T("https://vk.com/");
+ CMString tszLink = L"https://vk.com/";
tszLink += jnProfile["screen_name"].as_mstring();
CVkUserInfo *vkUser = new CVkUserInfo(UserId, true, tszNick, tszLink);
vkUsers.insert(vkUser);
@@ -178,11 +178,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo vkNewsItem->tDate = jnItem["date"].as_int();
if (!tszText.IsEmpty())
- tszText += _T("\n");
+ tszText += L"\n";
- debugLog(_T("CVkProto::GetVkNewsItem %d %d %s"), iSourceId, iPostId, vkNewsItem->tszType);
+ debugLog(L"CVkProto::GetVkNewsItem %d %d %s", iSourceId, iPostId, vkNewsItem->tszType);
- if (vkNewsItem->tszType == _T("photo_tag")) {
+ if (vkNewsItem->tszType == L"photo_tag") {
bPostLink = false;
const JSONNode &jnPhotos = jnItem["photo_tags"];
if (jnPhotos) {
@@ -191,11 +191,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo tszText = TranslateT("User was tagged in these photos:");
tszPopupText = tszText + TranslateT("(photos)");
for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it)
- tszText += _T("\n") + GetVkPhotoItem((*it), m_vkOptions.BBCForNews());
+ tszText += L"\n" + GetVkPhotoItem((*it), m_vkOptions.BBCForNews());
}
}
}
- else if (vkNewsItem->tszType == _T("photo") || vkNewsItem->tszType == _T("wall_photo")) {
+ else if (vkNewsItem->tszType == L"photo" || vkNewsItem->tszType == L"wall_photo") {
bPostLink = false;
const JSONNode &jnPhotos = jnItem["photos"];
int i = 0;
@@ -205,8 +205,8 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo tszPopupText += TranslateT("(photos)");
for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it) {
const JSONNode &jnPhotoItem = (*it);
- tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + _T("\n");
- if (i == 0 && vkNewsItem->tszType == _T("wall_photo")) {
+ tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + L"\n";
+ if (i == 0 && vkNewsItem->tszType == L"wall_photo") {
if (jnPhotoItem["post_id"]) {
bPostLink = true;
iPostId = jnPhotoItem["post_id"].as_int();
@@ -218,18 +218,18 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo }
}
}
- else if (vkNewsItem->tszType == _T("post") || vkNewsItem->tszType.IsEmpty()) {
+ else if (vkNewsItem->tszType == L"post" || vkNewsItem->tszType.IsEmpty()) {
bPostLink = true;
const JSONNode &jnRepost = jnItem["copy_history"];
if (jnRepost) {
CVKNewsItem *vkRepost = GetVkNewsItem((*jnRepost.begin()), vkUsers, true);
- vkRepost->tszText.Replace(_T("\n"), _T("\n\t"));
+ vkRepost->tszText.Replace(L"\n", L"\n\t");
tszText += vkRepost->tszText;
- tszText += _T("\n");
+ tszText += L"\n";
- tszPopupText += _T("\t");
+ tszPopupText += L"\t";
tszPopupText += vkRepost->tszPopupTitle;
- tszPopupText += _T("\n\t");
+ tszPopupText += L"\n\t";
tszPopupText += vkRepost->tszPopupText;
vkNewsItem->bIsRepost = true;
delete vkRepost;
@@ -264,14 +264,14 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo vkNewsItem->tszPopupTitle.AppendFormat(tszTitleFormat, vkNewsItem->vkUser->m_tszUserNick);
vkNewsItem->tszPopupText = tszPopupText;
- vkNewsItem->tszId.AppendFormat(_T("%d_%d"), vkNewsItem->vkUser->m_UserId, iPostId);
+ vkNewsItem->tszId.AppendFormat(L"%d_%d", vkNewsItem->vkUser->m_UserId, iPostId);
if (bPostLink) {
- vkNewsItem->tszLink = CMString(_T("https://vk.com/wall")) + vkNewsItem->tszId;
+ vkNewsItem->tszLink = CMString(L"https://vk.com/wall") + vkNewsItem->tszId;
vkNewsItem->tszText.AppendChar(_T('\n'));
vkNewsItem->tszText += SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNewsItem->tszLink);
}
- debugLog(_T("CVkProto::GetVkNewsItem %d %d <\n%s\n>"), iSourceId, iPostId, vkNewsItem->tszText);
+ debugLog(L"CVkProto::GetVkNewsItem %d %d <\n%s\n>", iSourceId, iPostId, vkNewsItem->tszText);
return vkNewsItem;
}
@@ -290,11 +290,11 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac if (vkFeedbackType == vkComment) {
iUserId = jnFeedback["from_id"].as_int();
- tszFormat = _T("%s %%s %%s\n%s");
+ tszFormat = L"%s %%s %%s\n%s";
}
else if (vkFeedbackType == vkPost) {
iUserId = jnFeedback["owner_id"].as_int();
- tszFormat = _T("%s %%s %%s\n%s");
+ tszFormat = L"%s %%s %%s\n%s";
}
else if (vkFeedbackType == VKObjType::vkUsers || vkFeedbackType == vkCopy) {
const JSONNode &jnUsers = jnFeedback["items"];
@@ -307,10 +307,10 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac iUserId = jnUserItem["from_id"].as_int();
vkUser = GetVkUserInfo(iUserId, vkUsers);
if (!tszUsers.IsEmpty())
- tszUsers += _T(", ");
+ tszUsers += L", ";
tszUsers += SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink);
}
- tszRes.AppendFormat(_T("%s %%s %%s"), tszUsers);
+ tszRes.AppendFormat(L"%s %%s %%s", tszUsers);
vkUser = NULL;
iUserId = 0;
}
@@ -318,7 +318,7 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac if (iUserId) {
vkUser = GetVkUserInfo(iUserId, vkUsers);
CMString tszText(jnFeedback["text"].as_mstring());
- tszText.Replace(_T("%"), _T("%%"));
+ tszText.Replace(L"%", L"%%");
tszRes.AppendFormat(tszFormat, SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink), ClearFormatNick(tszText));
}
@@ -338,84 +338,84 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT CMString tszPhoto = GetVkPhotoItem(jnParent, m_vkOptions.BBCForNews());
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/photo%s"), vkNotificationItem->tszId);
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), tszPhoto);
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/photo%s", vkNotificationItem->tszId);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", tszPhoto);
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkVideo) {
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
CMString tszTitle(jnParent["title"].as_mstring());
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/video%s"), vkNotificationItem->tszId);
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/video%s", vkNotificationItem->tszId);
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty())
- vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkPost) {
LONG iToId = jnParent["to_id"].as_int();
LONG iId = jnParent["id"].as_int();
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iToId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/wall%s%s"), vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T(""));
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iToId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/wall%s%s", vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L"");
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty()) {
- vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T("%s: %s"), TranslateT("Post text:"), tszText);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L"%s: %s", TranslateT("Post text:"), tszText);
}
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
if (!vkNotificationItem->tszPopupText.IsEmpty())
- vkNotificationItem->tszPopupText += _T("\n");
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszPopupText += L"\n";
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkTopic) {
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
CMString tszTitle(jnParent["title"].as_mstring());
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/topic%s%s"),
- vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T(""));
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/topic%s%s",
+ vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L"");
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty()) {
- vkNotificationItem->tszText.AppendFormat(_T("\n%s %s"), SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T("%s %s"), TranslateT("Topic text:"), tszText);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s %s", SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L"%s %s", TranslateT("Topic text:"), tszText);
}
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
if (!vkNotificationItem->tszPopupText.IsEmpty())
- vkNotificationItem->tszPopupText += _T("\n");
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszPopupText += L"\n";
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkComment) {
CMString tszText(jnParent["text"].as_mstring());
@@ -437,14 +437,14 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT const JSONNode &jnPost = jnParent["post"];
if (jnPost) {
- CMString tszRepl(FORMAT, _T("?reply=%d"), iId);
+ CMString tszRepl(FORMAT, L"?reply=%d", iId);
delete vkNotificationItem;
return GetVkParent(jnPost, vkPost, tszText, tszRepl);
}
const JSONNode &jnTopic = jnParent["topic"];
if (jnTopic) {
- CMString tszRepl(FORMAT, _T("?reply=%d"), iId);
+ CMString tszRepl(FORMAT, L"?reply=%d", iId);
delete vkNotificationItem;
return GetVkParent(jnTopic, vkTopic, tszText, tszRepl);
}
@@ -466,7 +466,7 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV const JSONNode &jnFeedback = jnItem["feedback"];
const JSONNode &jnParent = jnItem["parent"];
- if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == _T("friend_accepted") && jnFeedback && vkFeedbackType == VKObjType::vkUsers) {
+ if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == L"friend_accepted" && jnFeedback && vkFeedbackType == VKObjType::vkUsers) {
OnFriendAccepted(jnFeedback);
return NULL;
}
@@ -487,12 +487,12 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV vkNotification->tszText = tszNotificaton;
tszFeedback = RemoveBBC(tszFeedback);
- int idx = tszFeedback.Find(_T(" %s %s"));
+ int idx = tszFeedback.Find(L" %s %s");
- vkNotification->tszPopupTitle.AppendFormat(_T("%s %s"), tszFeedback.Mid(0, idx), tszNotificationTranslate);
+ vkNotification->tszPopupTitle.AppendFormat(L"%s %s", tszFeedback.Mid(0, idx), tszNotificationTranslate);
if (tszFeedback.GetLength() > idx + 7) {
if (!vkNotification->tszPopupText.IsEmpty())
- vkNotification->tszPopupText += _T("\n>> ");
+ vkNotification->tszPopupText += L"\n>> ";
vkNotification->tszPopupText += tszFeedback.Mid(idx + 7, tszFeedback.GetLength() - idx - 7);
}
@@ -540,7 +540,7 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser return NULL;
LONG iGroupId = jnItem["id"].as_int();
- CMString tszId(FORMAT, _T("%d,"), iGroupId);
+ CMString tszId(FORMAT, L"%d,", iGroupId);
CMString tszIds(ptrT(db_get_tsa(NULL, m_szModuleName, "InviteGroupIds")));
if (tszIds.Find(tszId, 0) != -1)
@@ -557,13 +557,13 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser CMString tszGroupName;
CMString tszGName = jnItem["name"].as_mstring();
- CMString tszGLink(FORMAT, _T("https://vk.com/%s"), jnItem["screen_name"].as_mstring());
+ CMString tszGLink(FORMAT, L"https://vk.com/%s", jnItem["screen_name"].as_mstring());
tszGroupName = SetBBCString(tszGName, m_vkOptions.BBCForNews(), vkbbcUrl, tszGLink);
- CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : _T("https://vk.com/"));
+ CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : L"https://vk.com/");
- vkNotification->tszText.AppendFormat(_T("%s %s %s"), tszUsers, tszNotificationTranslate, tszGroupName);
- vkNotification->tszPopupTitle.AppendFormat(_T("%s %s %s"), iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName);
+ vkNotification->tszText.AppendFormat(L"%s %s %s", tszUsers, tszNotificationTranslate, tszGroupName);
+ vkNotification->tszPopupTitle.AppendFormat(L"%s %s %s", iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName);
tszIds += tszId;
setTString("InviteGroupIds", tszIds);
@@ -672,7 +672,7 @@ void CVkProto::OnReceiveUnreadNews(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *p CVKNewsItem *vkNewsFoundItem = vkNews.find(vkNewsItem);
if (vkNewsFoundItem == NULL)
vkNews.insert(vkNewsItem);
- else if (vkNewsFoundItem->tszType == _T("wall_photo") && vkNewsItem->tszType == _T("post")) {
+ else if (vkNewsFoundItem->tszType == L"wall_photo" && vkNewsItem->tszType == L"post") {
vkNews.remove(vkNewsFoundItem);
vkNews.insert(vkNewsItem);
}
@@ -708,9 +708,9 @@ void CVkProto::RetrieveUnreadNotifications(time_t tLastNotificationsTime) if (time(NULL) - tLastNotificationsReqTime < 3 * 60)
return;
- CMString code(FORMAT, _T("return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s"),
+ CMString code(FORMAT, L"return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s",
(LONG)(tLastNotificationsTime + 1),
- m_vkOptions.bNotificationFilterInvites ? _T(",\"groupinvates\":API.groups.getInvites({\"extended\":1})};") : _T("};"));
+ m_vkOptions.bNotificationFilterInvites ? L",\"groupinvates\":API.groups.getInvites({\"extended\":1})};" : L"};");
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveUnreadNotifications)
<< TCHAR_PARAM("code", code) );
@@ -724,9 +724,9 @@ bool CVkProto::FilterNotification(CVKNewsItem* vkNotificationItem, bool& isComme if (vkNotificationItem->vkParentType == vkNull)
return false;
- if (vkNotificationItem->tszType == _T("mention_comments")
- || vkNotificationItem->tszType == _T("mention_comment_photo")
- || vkNotificationItem->tszType == _T("mention_comment_video")) {
+ if (vkNotificationItem->tszType == L"mention_comments"
+ || vkNotificationItem->tszType == L"mention_comment_photo"
+ || vkNotificationItem->tszType == L"mention_comment_video") {
isCommented = true;
return (m_vkOptions.bNotificationFilterMentions != 0);
}
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index 3e8d78ae2a..cb1e0bc607 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -89,7 +89,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode) tszError = TranslateT("Unknown error occurred");
}
ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ErrorCode== VKERR_AUDIO_DEL_COPYRIGHT ? ACKRESULT_DENIED : ACKRESULT_FAILED, (HANDLE)fup);
- debugLog(_T("CVkProto::SendFileFiled error code = %d (%s)"), ErrorCode, tszError);
+ debugLog(L"CVkProto::SendFileFiled error code = %d (%s)", ErrorCode, tszError);
MsgPopup(NULL, tszError, TranslateT("File upload error"), true);
delete fup;
}
@@ -97,7 +97,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode) void CVkProto::SendFileThread(void *p)
{
CVkFileUploadParam *fup = (CVkFileUploadParam *)p;
- debugLog(_T("CVkProto::SendFileThread %d %s"), fup->GetType(), fup->fileName());
+ debugLog(L"CVkProto::SendFileThread %d %s", fup->GetType(), fup->fileName());
if (!IsOnline()) {
SendFileFiled(fup, VKERR_OFFLINE);
return;
@@ -155,7 +155,7 @@ void CVkProto::OnReciveUploadServer(NETLIBHTTPREQUEST *reply, AsyncHttpRequest * return;
}
- FILE *pFile = _tfopen(fup->FileName, _T("rb"));
+ FILE *pFile = _tfopen(fup->FileName, L"rb");
if (pFile == NULL) {
SendFileFiled(fup, VKERR_ERR_OPEN_FILE);
return;
@@ -263,7 +263,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) switch (fup->GetType()) {
case CVkFileUploadParam::typeImg:
upload = jnRoot["photo"].as_mstring();
- if (upload == _T("[]")) {
+ if (upload == L"[]") {
SendFileFiled(fup, VKERR_INVALID_PARAMETERS);
return;
}
@@ -274,7 +274,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) break;
case CVkFileUploadParam::typeAudio:
upload = jnRoot["audio"].as_mstring();
- if (upload == _T("[]")) {
+ if (upload == L"[]") {
SendFileFiled(fup, VKERR_INVALID_PARAMETERS);
return;
}
@@ -334,13 +334,13 @@ void CVkProto::OnReciveUploadFile(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR switch (fup->GetType()) {
case CVkFileUploadParam::typeImg:
- Attachment.AppendFormat(_T("photo%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"photo%d_%d", owner_id, id);
break;
case CVkFileUploadParam::typeAudio:
- Attachment.AppendFormat(_T("audio%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"audio%d_%d", owner_id, id);
break;
case CVkFileUploadParam::typeDoc:
- Attachment.AppendFormat(_T("doc%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"doc%d_%d", owner_id, id);
break;
default:
SendFileFiled(fup, VKERR_FTYPE_NOT_SUPPORTED);
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp index 505b20ca54..ec6ed4100e 100644 --- a/protocols/VKontakte/src/vk_history.cpp +++ b/protocols/VKontakte/src/vk_history.cpp @@ -168,7 +168,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque mir_cslock lck(m_csLoadHistoryTask);
if (m_iLoadHistoryTask > 0)
m_iLoadHistoryTask--;
- debugLog(_T("CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d"), m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d", m_iLoadHistoryTask);
MsgPopup(NULL, TranslateT("Error loading message history from server"), TranslateT("Error"), true);
if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) {
@@ -189,10 +189,10 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque m_iLoadHistoryTask--;
ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
- CMString str(FORMAT, _T("%s %s %s"), TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick);
+ CMString str(FORMAT, L"%s %s %s", TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick);
MsgPopup(param->hContact, str, TranslateT("Error"), true);
- debugLog(_T("CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask);
if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) {
MsgPopup(NULL, TranslateT("Loading messages for all contacts is completed"), TranslateT("Loading history"));
@@ -233,7 +233,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -241,7 +241,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
@@ -282,7 +282,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
CMString str(FORMAT, TranslateT("Loading messages for %s is completed"), ptszNick);
- debugLog(_T("CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask);
if (m_bNotifyForEndLoadingHistory)
MsgPopup(param->hContact, str, TranslateT("Loading history"));
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 1a94e372a4..bdb6bdc3b0 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -104,7 +104,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) UINT mid;
if (jnResponse.type() != JSON_STRING)
mid = jnResponse.as_int();
- else if (_stscanf(jnResponse.as_mstring(), _T("%d"), &mid) != 1)
+ else if (_stscanf(jnResponse.as_mstring(), L"%d", &mid) != 1)
mid = 0;
if (param->iMsgID != -1)
@@ -252,7 +252,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -261,7 +261,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (jnAttachments) {
tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszBody += _T("\n");
+ tszBody += L"\n";
tszBody += tszAttachmentDescr;
}
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 631fe55d41..b2b6d7233a 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -36,7 +36,7 @@ CVkAccMgrForm::CVkAccMgrForm(CVkProto *proto, HWND hwndParent): {
SetParent(hwndParent);
- CreateLink(m_edtLogin, "Login", _T(""));
+ CreateLink(m_edtLogin, "Login", L"");
}
void CVkAccMgrForm::OnInitDialog()
@@ -111,14 +111,14 @@ int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM) static CVKLang vkLangCodes[] = {
{ NULL, LPGENT("Account language") },
- { _T("en"), LPGENT("English") },
- { _T("ru"), LPGENT("Russian") },
- { _T("be"), LPGENT("Belarusian") },
- { _T("ua"), LPGENT("Ukrainian") },
- { _T("es"), LPGENT("Spanish") },
- { _T("fi"), LPGENT("Finnish") },
- { _T("de"), LPGENT("German") },
- { _T("it"), LPGENT("Italian") },
+ { L"en", LPGENT("English") },
+ { L"ru", LPGENT("Russian") },
+ { L"be", LPGENT("Belarusian") },
+ { L"ua", LPGENT("Ukrainian") },
+ { L"es", LPGENT("Spanish") },
+ { L"fi", LPGENT("Finnish") },
+ { L"de", LPGENT("German") },
+ { L"it", LPGENT("Italian") },
};
static CVKSync vkHistorySyncMethods[] =
@@ -150,7 +150,7 @@ CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto): m_cbxMarkAsRead(this, IDC_COMBO_MARKASREAD),
m_cbxSyncHistory(this, IDC_COMBO_SYNCHISTORY)
{
- CreateLink(m_edtLogin, "Login", _T(""));
+ CreateLink(m_edtLogin, "Login", L"");
CreateLink(m_edtGroupName, m_proto->m_vkOptions.ptszDefaultGroup);
CreateLink(m_cbDelivery, m_proto->m_vkOptions.bServerDelivery);
CreateLink(m_cbUseLocalTime, m_proto->m_vkOptions.bUseLocalTime);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 10639738c0..f7c5c77900 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -425,7 +425,7 @@ void CVkProto::InitPopups(void) ppc.PluginWindowProc = PopupDlgProc;
ppc.lParam = APF_RETURN_HWND;
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -435,7 +435,7 @@ void CVkProto::InitPopups(void) ppc.iSeconds = 60;
m_hPopupClassError = Popup_RegisterClass(&ppc);
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notification"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notification"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
ppc.ptszDescription = desc;
ppc.pszName = name;
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp index b016302971..bc5ebb88d2 100644 --- a/protocols/VKontakte/src/vk_search.cpp +++ b/protocols/VKontakte/src/vk_search.cpp @@ -69,8 +69,8 @@ void __cdecl CVkProto::SearchThread(void *p) PROTOSEARCHBYNAME *pParam = (PROTOSEARCHBYNAME *)p;
TCHAR arg[200];
- mir_sntprintf(arg, _T("%s %s %s"), pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
- debugLog(_T("CVkProto::SearchThread %s"), arg);
+ mir_sntprintf(arg, L"%s %s %s", pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
+ debugLog(L"CVkProto::SearchThread %s", arg);
if (!IsOnline())
return;
@@ -120,7 +120,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
- CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int());
+ CMString Id(FORMAT, L"%d", jnRecord["id"].as_int());
CMString FirstName(jnRecord["first_name"].as_mstring());
CMString LastName(jnRecord["last_name"].as_mstring());
CMString Nick(jnRecord["nickname"].as_mstring());
@@ -178,7 +178,7 @@ void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
- CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int());
+ CMString Id(FORMAT, L"%d", jnRecord["id"].as_int());
CMString FirstName(jnRecord["first_name"].as_mstring());
CMString LastName(jnRecord["last_name"].as_mstring());
CMString Nick(jnRecord["nickname"].as_mstring());
diff --git a/protocols/VKontakte/src/vk_status.cpp b/protocols/VKontakte/src/vk_status.cpp index ef7d83b874..8a3566270c 100644 --- a/protocols/VKontakte/src/vk_status.cpp +++ b/protocols/VKontakte/src/vk_status.cpp @@ -240,11 +240,11 @@ INT_PTR __cdecl CVkProto::SvcSetListeningTo(WPARAM, LPARAM lParam) db_unset(NULL, m_szModuleName, "ListeningTo");
else if (pliInfo->dwFlags & LTI_UNICODE) {
if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT))
- tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%artist% - %title%"), (LPARAM)pliInfo));
+ tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%artist% - %title%", (LPARAM)pliInfo));
else
- tszListeningTo.Format(_T("%s - %s"),
- pliInfo->ptszArtist ? pliInfo->ptszArtist : _T(""),
- pliInfo->ptszTitle ? pliInfo->ptszTitle : _T(""));
+ tszListeningTo.Format(L"%s - %s",
+ pliInfo->ptszArtist ? pliInfo->ptszArtist : L"",
+ pliInfo->ptszTitle ? pliInfo->ptszTitle : L"");
setTString("ListeningTo", tszListeningTo);
}
RetrieveStatusMusic(tszListeningTo);
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp index eff1800b1a..ad7ff94525 100644 --- a/protocols/VKontakte/src/vk_struct.cpp +++ b/protocols/VKontakte/src/vk_struct.cpp @@ -125,8 +125,8 @@ CVkFileUploadParam::VKFileType CVkFileUploadParam::GetType() if (fname)
mir_free(fname);
- TCHAR img[] = _T(".jpg .jpeg .png .bmp");
- TCHAR audio[] = _T(".mp3");
+ TCHAR img[] = L".jpg .jpeg .png .bmp";
+ TCHAR audio[] = L".mp3";
TCHAR DRIVE[3], DIR[256], FNAME[256], EXT[256];
_tsplitpath(FileName, DRIVE, DIR, FNAME, EXT);
@@ -233,7 +233,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) : iInvisibleInterval(proto, "InvisibleInterval", 10),
iMaxFriendsCount(proto, "MaxFriendsCount", 1000),
- ptszDefaultGroup(proto, "ProtoGroup", _T("VKontakte")),
+ ptszDefaultGroup(proto, "ProtoGroup", L"VKontakte"),
ptszReturnChatMessage(proto, "ReturnChatMessage", TranslateT("I\'m back")),
ptszVKLang(proto, "VKLang", NULL)
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index e2985504b8..2f2dcdae8b 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -297,7 +297,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) tszValue = jnItem["bdate"].as_mstring();
if (!tszValue.IsEmpty()) {
int d, m, y, iReadCount;
- iReadCount = _stscanf(tszValue, _T("%d.%d.%d"), &d, &m, &y);
+ iReadCount = _stscanf(tszValue, L"%d.%d.%d", &d, &m, &y);
if (iReadCount > 1) {
if (iReadCount == 3)
setWord(hContact, "BirthYear", y);
@@ -362,7 +362,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) CMString tszOldListeningTo(ptrT(db_get_tsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
if (jnAudio) {
- CMString tszListeningTo(FORMAT, _T("%s - %s"), jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring());
+ CMString tszListeningTo(FORMAT, L"%s - %s", jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring());
if (tszListeningTo != tszOldListeningTo) {
setTString(hContact, "ListeningTo", tszListeningTo);
setTString(hContact, "AudioUrl", jnAudio["url"].as_mstring());
@@ -461,7 +461,7 @@ void CVkProto::RetrieveUserInfo(LONG userID) if (userID == VK_FEED_USER || !IsOnline())
return;
- CMString code(FORMAT, _T("var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};"),
+ CMString code(FORMAT, L"var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};",
userID, CMString(fieldsName));
Push(new AsyncHttpRequest(this, REQUEST_POST, "/method/execute.json", true, &CVkProto::OnReceiveUserInfo)
<< TCHAR_PARAM("code", code));
@@ -481,7 +481,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat) continue;
if (!userIDs.IsEmpty())
userIDs.AppendChar(',');
- userIDs.AppendFormat(_T("%i"), userID);
+ userIDs.AppendFormat(L"%i", userID);
if (i == MAX_CONTACTS_PER_REQUEST)
break;
@@ -491,7 +491,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat) CMString codeformat("var userIDs=\"%s\";var _fields=\"%s\";");
if (m_bNeedSendOnline)
- codeformat += _T("API.account.setOnline();");
+ codeformat += L"API.account.setOnline();";
if (bFreeOffline && !m_vkOptions.bLoadFullCList)
codeformat += CMString("var US=[];var res=[];var t=10;while(t>0){"
@@ -774,8 +774,8 @@ INT_PTR __cdecl CVkProto::SvcBanUser(WPARAM hContact, LPARAM) ptrT ptszNick(db_get_tsa(hContact, m_szModuleName, "Nick"));
CMString ptszMsg(FORMAT, TranslateT("Are you sure to ban %s? %s%sContinue?"),
IsEmpty(ptszNick) ? TranslateT("(Unknown contact)") : ptszNick,
- tszVarWarning.IsEmpty() ? _T(" ") : TranslateT("\nIt will also"),
- tszVarWarning.IsEmpty() ? _T("\n") : tszVarWarning);
+ tszVarWarning.IsEmpty() ? L" " : TranslateT("\nIt will also"),
+ tszVarWarning.IsEmpty() ? L"\n" : tszVarWarning);
if (IDNO == MessageBox(NULL, ptszMsg, TranslateT("Attention!"), MB_ICONWARNING | MB_YESNO))
return 1;
@@ -836,7 +836,7 @@ INT_PTR __cdecl CVkProto::SvcVisitProfile(WPARAM hContact, LPARAM) if (tszDomain)
tszUrl.Append(tszDomain);
else
- tszUrl.AppendFormat(_T("id%i"), userID);
+ tszUrl.AppendFormat(L"id%i", userID);
Utils_OpenUrlT(tszUrl);
return 0;
diff --git a/protocols/WhatsApp/src/avatars.cpp b/protocols/WhatsApp/src/avatars.cpp index 36d14bce77..2121430f62 100644 --- a/protocols/WhatsApp/src/avatars.cpp +++ b/protocols/WhatsApp/src/avatars.cpp @@ -46,24 +46,24 @@ INT_PTR WhatsAppProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam) std::tstring WhatsAppProto::GetAvatarFileName(MCONTACT hContact)
{
- std::tstring result = m_tszAvatarFolder + _T("\\");
+ std::tstring result = m_tszAvatarFolder + L"\\";
std::string jid;
if (hContact != NULL) {
ptrA szId(getStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : WHATSAPP_KEY_ID));
if (szId == NULL)
- return _T("");
+ return L"";
jid = szId;
}
else jid = m_szJid;
- return result + std::tstring(_A2T(jid.c_str())) + _T(".jpg");
+ return result + std::tstring(_A2T(jid.c_str())) + L".jpg";
}
INT_PTR WhatsAppProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
{
- std::tstring tszOwnAvatar(m_tszAvatarFolder + _T("\\myavatar.jpg"));
+ std::tstring tszOwnAvatar(m_tszAvatarFolder + L"\\myavatar.jpg");
_tcsncpy_s((TCHAR*)wParam, lParam, tszOwnAvatar.c_str(), _TRUNCATE);
return 0;
}
@@ -102,13 +102,13 @@ int WhatsAppProto::InternalSetAvatar(MCONTACT hContact, const char *szJid, const TCHAR tszTempFile[MAX_PATH], tszMyFile[MAX_PATH];
if (hContact == NULL) {
- mir_sntprintf(tszMyFile, _T("%s\\myavatar.jpg"), m_tszAvatarFolder.c_str());
- mir_sntprintf(tszTempFile, _T("%s\\myavatar.preview.jpg"), m_tszAvatarFolder.c_str());
+ mir_sntprintf(tszMyFile, L"%s\\myavatar.jpg", m_tszAvatarFolder.c_str());
+ mir_sntprintf(tszTempFile, L"%s\\myavatar.preview.jpg", m_tszAvatarFolder.c_str());
}
else {
std::tstring tszContactAva = GetAvatarFileName(hContact);
_tcsncpy_s(tszMyFile, tszContactAva.c_str(), _TRUNCATE);
- _tcsncpy_s(tszTempFile, (tszContactAva + _T(".preview")).c_str(), _TRUNCATE);
+ _tcsncpy_s(tszTempFile, (tszContactAva + L".preview").c_str(), _TRUNCATE);
}
IMGSRVC_INFO saveInfo = { sizeof(saveInfo), 0 };
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index ab84dfb4be..e55e8274cf 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -21,7 +21,7 @@ INT_PTR __cdecl WhatsAppProto::OnCreateGroup(WPARAM, LPARAM) ENTER_STRING es = { 0 };
es.cbSize = sizeof(es);
es.type = ESF_MULTILINE;
- es.caption = _T("Enter a subject for new group");
+ es.caption = L"Enter a subject for new group";
es.szModuleName = m_szModuleName;
if (EnterString(&es)) {
if (isOnline()) {
@@ -175,8 +175,8 @@ void WhatsAppProto::SetChatAvatar(WAChatInfo *pInfo) ofn.lpstrFile = tszFileName;
ofn.nMaxFile = ofn.nMaxFileTitle = _countof(tszFileName);
ofn.Flags = OFN_HIDEREADONLY;
- ofn.lpstrInitialDir = _T(".");
- ofn.lpstrDefExt = _T("");
+ ofn.lpstrInitialDir = L".";
+ ofn.lpstrDefExt = L"";
if (GetOpenFileName(&ofn))
if (_taccess(tszFileName, 4) != -1)
InternalSetAvatar(pInfo->hContact, _T2A(pInfo->tszJid), tszFileName);
@@ -513,7 +513,7 @@ void WhatsAppProto::onGetParticipants(const std::string &gjid, const std::vector GCEVENT gce = { sizeof(gce), &gcd };
gce.ptszNick = nick;
gce.ptszUID = utils::removeA(ujid);
- gce.ptszStatus = (bIsOwner) ? _T("Owners") : _T("Members");
+ gce.ptszStatus = (bIsOwner) ? L"Owners" : L"Members";
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
}
diff --git a/protocols/WhatsApp/src/constants.h b/protocols/WhatsApp/src/constants.h index 2fb002ab5b..e535eabded 100644 --- a/protocols/WhatsApp/src/constants.h +++ b/protocols/WhatsApp/src/constants.h @@ -2,7 +2,7 @@ #define CONSTANTS_H
// Version management
-#define PRODUCT_NAME _T("WhatsApp Protocol")
+#define PRODUCT_NAME L"WhatsApp Protocol"
// Limits
#define WHATSAPP_GROUP_NAME_LIMIT 420
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 413d3b80f1..3dfeec59a1 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -75,10 +75,10 @@ void WhatsAppProto::SetAllContactStatuses(int status, bool reset_client) for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (reset_client) {
ptrT tszMirVer(getTStringA(hContact, "MirVer"));
- if (mir_tstrcmp(tszMirVer, _T("WhatsApp")))
- setTString(hContact, "MirVer", _T("WhatsApp"));
+ if (mir_tstrcmp(tszMirVer, L"WhatsApp"))
+ setTString(hContact, "MirVer", L"WhatsApp");
- db_set_ws(hContact, "CList", "StatusMsg", _T(""));
+ db_set_ws(hContact, "CList", "StatusMsg", L"");
}
if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != status)
@@ -163,7 +163,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u // Save avatar
std::tstring filename = GetAvatarFileName(hContact);
- FILE *f = _tfopen(filename.c_str(), _T("wb"));
+ FILE *f = _tfopen(filename.c_str(), L"wb");
size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f);
fclose(f);
@@ -187,5 +187,5 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u TCHAR* WhatsAppProto::GetContactDisplayName(const string& jid)
{
MCONTACT hContact = ContactIDToHContact(jid);
- return (hContact) ? pcli->pfnGetContactDisplayName(hContact, 0) : _T("none");
+ return (hContact) ? pcli->pfnGetContactDisplayName(hContact, 0) : L"none";
}
diff --git a/protocols/WhatsApp/src/dialogs.cpp b/protocols/WhatsApp/src/dialogs.cpp index 069603bb2b..b770210dd6 100644 --- a/protocols/WhatsApp/src/dialogs.cpp +++ b/protocols/WhatsApp/src/dialogs.cpp @@ -31,10 +31,10 @@ public: CreateLink(m_remoteTime, WHATSAPP_KEY_USE_REMOTE_TIME, DBVT_BYTE, false);
CreateLink(m_autorun, WHATSAPP_KEY_AUTORUNCHATS, DBVT_BYTE, true);
- CreateLink(m_cc, WHATSAPP_KEY_CC, _T(""));
- CreateLink(m_nick, WHATSAPP_KEY_NICK, _T(""));
- CreateLink(m_login, WHATSAPP_KEY_LOGIN, _T(""));
- CreateLink(m_group, WHATSAPP_KEY_DEF_GROUP, _T(""));
+ CreateLink(m_cc, WHATSAPP_KEY_CC, L"");
+ CreateLink(m_nick, WHATSAPP_KEY_NICK, L"");
+ CreateLink(m_login, WHATSAPP_KEY_LOGIN, L"");
+ CreateLink(m_group, WHATSAPP_KEY_DEF_GROUP, L"");
m_requestSMS.OnClick = Callback(this, &COptionsDlg::OnRequestSMSClick);
m_requestVoice.OnClick = Callback(this, &COptionsDlg::OnRequestVoiceClick);
diff --git a/protocols/WhatsApp/src/media.cpp b/protocols/WhatsApp/src/media.cpp index 7136a3862a..c94d5ab6c8 100644 --- a/protocols/WhatsApp/src/media.cpp +++ b/protocols/WhatsApp/src/media.cpp @@ -17,7 +17,7 @@ HANDLE WhatsAppProto::SendFile(MCONTACT hContact, const TCHAR* desc, TCHAR **pps }
// get file size
- FILE *hFile = _tfopen(ppszFiles[0], _T("rb"));
+ FILE *hFile = _tfopen(ppszFiles[0], L"rb");
if (hFile == NULL) {
debugLogA(__FUNCTION__": cannot open file %s", ppszFiles[0]);
mir_free(name);
@@ -69,7 +69,7 @@ HANDLE WhatsAppProto::SendFile(MCONTACT hContact, const TCHAR* desc, TCHAR **pps SHA256_CONTEXT sha256;
mir_sha256_init(&sha256);
- FILE *fd = _tfopen(ppszFiles[0], _T("rb"));
+ FILE *fd = _tfopen(ppszFiles[0], L"rb");
int read = 0;
do {
char buf[1024];
diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp index 163144df5e..aa48df5444 100644 --- a/protocols/WhatsApp/src/messages.cpp +++ b/protocols/WhatsApp/src/messages.cpp @@ -132,6 +132,6 @@ void WhatsAppProto::onMessageStatusUpdate(const FMessage &fmsg) time_t ts = atol(fmsg.key.id.substr(0, delim).c_str());
TCHAR ttime[64];
- _tcsftime(ttime, _countof(ttime), _T("%X"), localtime(&ts));
+ _tcsftime(ttime, _countof(ttime), L"%X", localtime(&ts));
utils::setStatusMessage(hContact, CMString(FORMAT, TranslateT("Message received: %s by %s"), ttime, ptszBy));
}
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 63068ab57d..a361ad3e16 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -43,18 +43,18 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const TCHAR *username) if (m_hNetlibUser == NULL) {
TCHAR error[200];
mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
- MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR);
}
WASocketConnection::initNetwork(m_hNetlibUser);
- m_tszAvatarFolder = std::tstring(VARST(_T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName;
+ m_tszAvatarFolder = std::tstring(VARST(L"%miranda_avatarcache%")) + L"\\" + m_tszUserName;
DWORD dwAttributes = GetFileAttributes(m_tszAvatarFolder.c_str());
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeT(m_tszAvatarFolder.c_str());
if (m_tszDefaultGroup == NULL)
- m_tszDefaultGroup = mir_tstrdup(_T("WhatsApp"));
+ m_tszDefaultGroup = mir_tstrdup(L"WhatsApp");
Clist_GroupCreate(0, m_tszDefaultGroup);
SetAllContactStatuses(ID_STATUS_OFFLINE, true);
@@ -197,7 +197,7 @@ void WhatsAppProto::SearchAckThread(void *targ) PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
psr.flags = PSR_TCHAR;
- psr.nick.t = psr.firstName.t = psr.lastName.t = _T("");
+ psr.nick.t = psr.firstName.t = psr.lastName.t = L"";
psr.id.t = (TCHAR*)param->jid.c_str();
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)param->id, (LPARAM)&psr);
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 60a1579281..ec1696c65d 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -596,19 +596,19 @@ void CYahooProto::request_avatar(const char* who) void CYahooProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
if (_taccess(pszDest, 0))
CreateDirectoryTreeT(pszDest);
if (hContact != NULL) {
int ck_sum = getDword(hContact, "PictCK", 0);
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%lX"), ck_sum);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%lX", ck_sum);
}
else
- tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%S avatar"), m_szModuleName);
+ tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%S avatar", m_szModuleName);
- _tcsncpy_s((pszDest + tPathLen), (cbLen - tPathLen), (type == 1 ? _T(".swf") : _T(".png")), _TRUNCATE);
+ _tcsncpy_s((pszDest + tPathLen), (cbLen - tPathLen), (type == 1 ? L".swf" : L".png"), _TRUNCATE);
}
INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 4999c4947c..105f86f19e 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -54,7 +54,7 @@ void ext_yahoo_conf_userdecline(int id, const char*, const char *who, const char TCHAR info[1024];
TCHAR *whot = mir_utf8decodeT(who);
TCHAR *msgt = mir_utf8decodeT(msg);
- mir_sntprintf(info, TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : _T(""));
+ mir_sntprintf(info, TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : L"");
GETPROTOBYID(id)->ChatEvent(room, who, GC_EVENT_INFORMATION, info);
mir_free(msgt);
mir_free(whot);
@@ -316,7 +316,7 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) {
{ TranslateT("User &details"), 10, MENU_ITEM, FALSE },
{ TranslateT("User &history"), 20, MENU_ITEM, FALSE },
- { _T(""), 100, MENU_SEPARATOR, FALSE },
+ { L"", 100, MENU_SEPARATOR, FALSE },
{ TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE }
};
gcmi->nItems = _countof(Items);
@@ -356,7 +356,7 @@ static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, c int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
if (chk) {
if (IsHContactInfo(hItem)) {
- TCHAR buf[128] = _T("");
+ TCHAR buf[128] = L"";
SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
who = y_list_append(who, mir_t2a(buf));
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index aac588cf74..d5549b571c 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -297,7 +297,7 @@ static void dl_file(int id, INT_PTR fd, int error, const char*, unsigned long si *
* Don't rely on workingDir to be right, since it's not used to check if file exists.
*/
- mir_sntprintf(filefull, _T("%s\\%s"), sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile);
+ mir_sntprintf(filefull, L"%s\\%s", sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile);
FREE(sf->pfts.tszCurrentFile);
sf->pfts.tszCurrentFile = _tcsdup(filefull);
diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp index 48af9ef88e..18be749700 100644 --- a/protocols/Yahoo/src/links.cpp +++ b/protocols/Yahoo/src/links.cpp @@ -95,7 +95,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) if (!proto) return 1;
/* add a contact to the list */
- if (!_tcsnicmp(arg, _T("addfriend?"), 10)) {
+ if (!_tcsnicmp(arg, L"addfriend?", 10)) {
arg += 10;
char *id = get_buddy(&arg);
@@ -119,7 +119,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) return 0;
}
/* send a message to a contact */
- else if (!_tcsnicmp(arg, _T("sendim?"), 7)) {
+ else if (!_tcsnicmp(arg, L"sendim?", 7)) {
arg += 7;
char *id = get_buddy(&arg);
@@ -128,7 +128,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) TCHAR *msg = NULL;
while (arg) {
- if (!_tcsnicmp(arg, _T("m="), 2)) {
+ if (!_tcsnicmp(arg, L"m=", 2)) {
msg = arg + 2;
url_decode(msg);
break;
@@ -146,7 +146,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam) return 0;
}
/* open a chatroom */
- else if (!_tcsnicmp(arg, _T("chat?"), 5)) {
+ else if (!_tcsnicmp(arg, L"chat?", 5)) {
arg += 5;
// char *id = get_buddy(&arg);
diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp index 852a911a71..9a606c4245 100644 --- a/protocols/Yahoo/src/search.cpp +++ b/protocols/Yahoo/src/search.cpp @@ -174,10 +174,10 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND) psr.id.t = _tcslwr(searchid);
switch (SendDlgItemMessage(hwndDlg, IDC_SEARCH_PROTOCOL, CB_GETCURSEL, 0, 0)) {
- case 0: psr.firstName.t = _T("<Yahoo>"); psr.protocol = YAHOO_IM_YAHOO; break;
- case 1: psr.firstName.t = _T("<Lotus Sametime>"); psr.protocol = YAHOO_IM_SAMETIME; break;
- case 2: psr.firstName.t = _T("<LCS>"); psr.protocol = YAHOO_IM_LCS; break;
- case 3: psr.firstName.t = _T("<Windows Live (MSN)>"); psr.protocol = YAHOO_IM_MSN; break;
+ case 0: psr.firstName.t = L"<Yahoo>"; psr.protocol = YAHOO_IM_YAHOO; break;
+ case 1: psr.firstName.t = L"<Lotus Sametime>"; psr.protocol = YAHOO_IM_SAMETIME; break;
+ case 2: psr.firstName.t = L"<LCS>"; psr.protocol = YAHOO_IM_LCS; break;
+ case 3: psr.firstName.t = L"<Windows Live (MSN)>"; psr.protocol = YAHOO_IM_MSN; break;
}
/*
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index df465c1668..7cb6c76f34 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -926,7 +926,7 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt) TCHAR z[MAX_SECONDLINE], title[MAX_CONTACTNAME];
if (from == NULL) {
- mir_sntprintf(title, _T("%s: %s"), m_tszUserName, TranslateT("New Mail"));
+ mir_sntprintf(title, L"%s: %s", m_tszUserName, TranslateT("New Mail"));
mir_sntprintf(z, TranslateT("You have %i unread messages"), cnt);
}
else {
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;
diff --git a/src/mir_app/src/ExtraIconGroup.cpp b/src/mir_app/src/ExtraIconGroup.cpp index effbdd5862..5031889689 100644 --- a/src/mir_app/src/ExtraIconGroup.cpp +++ b/src/mir_app/src/ExtraIconGroup.cpp @@ -41,7 +41,7 @@ void ExtraIconGroup::addExtraIcon(BaseExtraIcon *extra) CMString description;
for (int i = 0; i < m_items.getCount(); i++) {
if (i > 0)
- description += _T(" / ");
+ description += L" / ";
description += m_items[i]->getDescription();
}
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp index 8d5eb6faa0..55653f7dbc 100644 --- a/src/mir_app/src/FontOptions.cpp +++ b/src/mir_app/src/FontOptions.cpp @@ -133,7 +133,7 @@ static void WriteLine(FILE *out, const char pszText[]) static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInternal>& flist, OBJLIST<ColourInternal>& clist, OBJLIST<EffectInternal>& elist)
{
- FILE *out = _tfopen(filename, _T("w"));
+ FILE *out = _tfopen(filename, L"w");
if (out == NULL) {
MessageBox(hwndDlg, filename, TranslateT("Failed to create file"), MB_ICONWARNING | MB_OK);
return FALSE;
@@ -164,7 +164,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte HDC hdc = GetDC(hwndDlg);
HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
- GetTextExtentPoint32(hdc, _T("_W"), 2, &size);
+ GetTextExtentPoint32(hdc, L"_W", 2, &size);
ReleaseDC(hwndDlg, hdc);
SelectObject(hdc, hOldFont);
DeleteObject(hFont);
@@ -518,7 +518,7 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F) HFONT hFont = CreateFontIndirect(&lf);
HDC hdc = GetDC(hwndDlg);
HFONT hOldFont = (HFONT)SelectObject(hdc, hFont);
- GetTextExtentPoint32(hdc, _T("_W"), 2, &size);
+ GetTextExtentPoint32(hdc, L"_W", 2, &size);
ReleaseDC(hwndDlg, hdc);
SelectObject(hdc, hOldFont);
DeleteObject(hFont);
@@ -639,7 +639,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_ADDSTRING, (WPARAM)-1, (LPARAM)itemData);
}
- if (mir_tstrcmp(C.name, _T("Background")) == 0)
+ if (mir_tstrcmp(C.name, L"Background") == 0)
hBkgColourBrush = CreateSolidBrush(C.value);
}
}
@@ -820,7 +820,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SetTextColor(dis->hDC, clText);
- DrawTextWithEffect(dis->hDC, _T("abc"), 3, &rc, DT_CENTER | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS, pEffect);
+ DrawTextWithEffect(dis->hDC, L"abc", 3, &rc, DT_CENTER | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER | DT_WORD_ELLIPSIS, pEffect);
if (dis->itemState & ODS_SELECTED) {
SetTextColor(dis->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
@@ -1028,7 +1028,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (itemData->colour_id < 0) continue;
colour_id_list_w2[itemData->colour_id].value = SendDlgItemMessage(hwndDlg, IDC_BKGCOLOUR, CPM_GETCOLOUR, 0, 0);
- if (mir_tstrcmp(colour_id_list_w2[itemData->colour_id].name, _T("Background")) == 0) {
+ if (mir_tstrcmp(colour_id_list_w2[itemData->colour_id].name, L"Background") == 0) {
if (hBkgColourBrush) DeleteObject(hBkgColourBrush);
hBkgColourBrush = CreateSolidBrush(colour_id_list_w2[itemData->colour_id].value);
}
@@ -1075,7 +1075,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_BTN_EXPORT:
{
TCHAR fname_buff[MAX_PATH], filter[MAX_PATH];
- mir_sntprintf(filter, _T("%s (*.ini)%c*.ini%c%s (*.txt)%c*.TXT%c%s (*.*)%c*.*%c"), TranslateT("Configuration files"), 0, 0, TranslateT("Text files"), 0, 0, TranslateT("All files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*.ini)%c*.ini%c%s (*.txt)%c*.TXT%c%s (*.*)%c*.*%c", TranslateT("Configuration files"), 0, 0, TranslateT("Text files"), 0, 0, TranslateT("All files"), 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(ofn);
@@ -1087,7 +1087,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, ofn.lpstrFilter = filter;
ofn.nFilterIndex = 1;
- ofn.lpstrDefExt = _T("ini");
+ ofn.lpstrDefExt = L"ini";
if (GetSaveFileName(&ofn) == TRUE)
if (!ExportSettings(hwndDlg, ofn.lpstrFile, font_id_list, colour_id_list, effect_id_list))
diff --git a/src/mir_app/src/FontService.h b/src/mir_app/src/FontService.h index 2f34931f07..d530c311d7 100644 --- a/src/mir_app/src/FontService.h +++ b/src/mir_app/src/FontService.h @@ -39,7 +39,7 @@ struct FontInternal : public FontIDT return true;
if ((flags & FIDF_CLASSMASK) == 0)
- if (_tcsstr(name, _T("Incoming nick")) || _tcsstr(name, _T("Outgoing nick")) || _tcsstr(name, _T("Incoming timestamp")) || _tcsstr(name, _T("Outgoing timestamp")))
+ if (_tcsstr(name, L"Incoming nick") || _tcsstr(name, L"Outgoing nick") || _tcsstr(name, L"Incoming timestamp") || _tcsstr(name, L"Outgoing timestamp"))
return true;
return false;
}
diff --git a/src/mir_app/src/button.cpp b/src/mir_app/src/button.cpp index 708b60e84b..d831d1b4d3 100644 --- a/src/mir_app/src/button.cpp +++ b/src/mir_app/src/button.cpp @@ -214,7 +214,7 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) //!! move it up, to text extent points?
if (ctl->cHot) {
SIZE szHot;
- GetTextExtentPoint32 (hdcMem, _T("&"), 1, &szHot);
+ GetTextExtentPoint32 (hdcMem, L"&", 1, &szHot);
sz.cx -= szHot.cx;
}
if (ctl->arrow)
@@ -471,7 +471,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR else {
TTooltips *ptt = (TTooltips*)mir_alloc(sizeof(TTooltips));
ptt->ThreadId = tt.ThreadId;
- ptt->hwnd = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), TTS_ALWAYSTIP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
+ ptt->hwnd = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, L"", TTS_ALWAYSTIP, 0, 0, 0, 0, NULL, NULL, g_hInst, NULL);
lToolTips.insert(ptt);
bct->hwndToolTips = ptt->hwnd;
}
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp index 1abd72c32b..1c47006d0b 100644 --- a/src/mir_app/src/chat_clist.cpp +++ b/src/mir_app/src/chat_clist.cpp @@ -29,7 +29,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi if (groupName)
_tcsncpy_s(pszGroup, groupName, _TRUNCATE);
else
- mir_tstrcpy(pszGroup, _T("Chat rooms"));
+ mir_tstrcpy(pszGroup, L"Chat rooms");
if (pszGroup[0]) {
MGROUP hGroup = Clist_GroupExists(pszGroup);
diff --git a/src/mir_app/src/chat_log.cpp b/src/mir_app/src/chat_log.cpp index 41eab518cb..ac2a9ba75e 100644 --- a/src/mir_app/src/chat_log.cpp +++ b/src/mir_app/src/chat_log.cpp @@ -227,12 +227,12 @@ static void AddEventToBuffer(char *&buffer, size_t &bufferEnd, size_t &bufferAll if (streamData->lin->ptszNick) {
if (g_Settings->bLogLimitNames && mir_tstrlen(streamData->lin->ptszNick) > 20) {
mir_tstrncpy(szTemp2, streamData->lin->ptszNick, 20);
- mir_tstrncpy(szTemp2 + 20, _T("..."), 4);
+ mir_tstrncpy(szTemp2 + 20, L"...", 4);
}
else mir_tstrncpy(szTemp2, streamData->lin->ptszNick, 511);
if (streamData->lin->ptszUserInfo)
- mir_sntprintf(szTemp, _T("%s (%s)"), szTemp2, streamData->lin->ptszUserInfo);
+ mir_sntprintf(szTemp, L"%s (%s)", szTemp2, streamData->lin->ptszUserInfo);
else
_tcsncpy_s(szTemp, szTemp2, _TRUNCATE);
pszNick = szTemp;
@@ -241,12 +241,12 @@ static void AddEventToBuffer(char *&buffer, size_t &bufferEnd, size_t &bufferAll switch (streamData->lin->iType) {
case GC_EVENT_MESSAGE:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ACTION:
if (streamData->lin->ptszNick && streamData->lin->ptszText) {
- Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, _T("%s "), streamData->lin->ptszNick);
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, L"%s ", streamData->lin->ptszNick);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_JOIN:
@@ -261,13 +261,13 @@ static void AddEventToBuffer(char *&buffer, size_t &bufferEnd, size_t &bufferAll if (pszNick)
Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, TranslateT("%s has left"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_QUIT:
if (pszNick)
Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, TranslateT("%s has disconnected"), pszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NICK:
if (pszNick && streamData->lin->ptszText) {
@@ -281,17 +281,17 @@ static void AddEventToBuffer(char *&buffer, size_t &bufferEnd, size_t &bufferAll if (streamData->lin->ptszNick && streamData->lin->ptszStatus)
Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, TranslateT("%s kicked %s"), streamData->lin->ptszStatus, streamData->lin->ptszNick);
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T(": %s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, L": %s", streamData->lin->ptszText);
break;
case GC_EVENT_NOTICE:
if (pszNick && streamData->lin->ptszText) {
Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, TranslateT("Notice from %s: "), pszNick);
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, L"%s", streamData->lin->ptszText);
}
break;
case GC_EVENT_TOPIC:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, _T("%r"));
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, TranslateT("The topic is '%s%s'"), streamData->lin->ptszText, L"%r");
if (streamData->lin->ptszNick)
Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced,
streamData->lin->ptszUserInfo ? TranslateT(" (set by %s on %s)") : TranslateT(" (set by %s)"),
@@ -299,7 +299,7 @@ static void AddEventToBuffer(char *&buffer, size_t &bufferEnd, size_t &bufferAll break;
case GC_EVENT_INFORMATION:
if (streamData->lin->ptszText)
- Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, (streamData->lin->bIsMe) ? _T("--> %s") : _T("%s"), streamData->lin->ptszText);
+ Log_AppendRTF(streamData, FALSE, buffer, bufferEnd, bufferAlloced, (streamData->lin->bIsMe) ? L"--> %s" : L"%s", streamData->lin->ptszText);
break;
case GC_EVENT_ADDSTATUS:
if (streamData->lin->ptszNick && streamData->lin->ptszText && streamData->lin->ptszStatus)
@@ -386,7 +386,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) mir_tstrncpy(szOldTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, streamData->si->LastTime), 30);
if (!g_Settings->bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) {
streamData->si->LastTime = lin->time;
- Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, _T("%s"), szTimeStamp);
+ Log_AppendRTF(streamData, TRUE, buffer, bufferEnd, bufferAlloced, L"%s", szTimeStamp);
}
Log_Append(buffer, bufferEnd, bufferAlloced, "\\tab ");
}
@@ -397,7 +397,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) Log_Append(buffer, bufferEnd, bufferAlloced, "%s ", Log_SetStyle(lin->bIsMe ? 2 : 1));
mir_tstrncpy(pszTemp, lin->bIsMe ? g_Settings->pszOutgoingNick : g_Settings->pszIncomingNick, 299);
- p1 = _tcsstr(pszTemp, _T("%n"));
+ p1 = _tcsstr(pszTemp, L"%n");
if (p1)
p1[1] = 's';
diff --git a/src/mir_app/src/chat_opts.cpp b/src/mir_app/src/chat_opts.cpp index b631984f2d..238cc43008 100644 --- a/src/mir_app/src/chat_opts.cpp +++ b/src/mir_app/src/chat_opts.cpp @@ -64,7 +64,7 @@ static FontOptionsList fontOptionsList[] = { LPGENT("User disables status for ..."), RGB(150, 70, 70), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("Action message"), RGB(160, 90, 160), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("Highlighted message"), RGB(180, 150, 80), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
- { _T(""), 0, lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
+ { L"", 0, lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("Nick list members (online)"), RGB(0, 0, 0), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 },
{ LPGENT("Nick list members (away)"), RGB(170, 170, 170), lfDefault.lfFaceName, DEFAULT_CHARSET, 0, -12 }
};
@@ -163,7 +163,7 @@ void RegisterFonts(void) }
_tcsncpy_s(fontid.name, LPGENT("Chat log symbols (Webdings)"), _TRUNCATE);
- FO.szDefFace = _T("Webdings");
+ FO.szDefFace = L"Webdings";
FO.defColour = RGB(170, 170, 170);
FO.defCharset = SYMBOL_CHARSET;
// fall through
@@ -237,13 +237,13 @@ void LoadGlobalSettings(void) if (chatApi.OnLoadSettings)
chatApi.OnLoadSettings();
- InitSetting(&g_Settings->pszTimeStamp, "HeaderTime", _T("[%H:%M]"));
- InitSetting(&g_Settings->pszTimeStampLog, "LogTimestamp", _T("[%d %b %y %H:%M]"));
- InitSetting(&g_Settings->pszIncomingNick, "HeaderIncoming", _T("%n:"));
- InitSetting(&g_Settings->pszOutgoingNick, "HeaderOutgoing", _T("%n:"));
- InitSetting(&g_Settings->pszHighlightWords, "HighlightWords", _T("%m"));
+ InitSetting(&g_Settings->pszTimeStamp, "HeaderTime", L"[%H:%M]");
+ InitSetting(&g_Settings->pszTimeStampLog, "LogTimestamp", L"[%d %b %y %H:%M]");
+ InitSetting(&g_Settings->pszIncomingNick, "HeaderIncoming", L"%n:");
+ InitSetting(&g_Settings->pszOutgoingNick, "HeaderOutgoing", L"%n:");
+ InitSetting(&g_Settings->pszHighlightWords, "HighlightWords", L"%m");
- InitSetting(&g_Settings->pszLogDir, "LogDirectory", _T("%miranda_logpath%\\%proto%\\%userid%.log"));
+ InitSetting(&g_Settings->pszLogDir, "LogDirectory", L"%miranda_logpath%\\%proto%\\%userid%.log");
g_Settings->bLogIndentEnabled = db_get_b(NULL, CHAT_MODULE, "LogIndentEnabled", 1) != 0;
LOGFONT lf;
@@ -313,7 +313,7 @@ int OptionsInit(void) LOGFONT lf;
LoadMsgDlgFont(18, &lf, NULL);
- mir_tstrcpy(lf.lfFaceName, _T("MS Shell Dlg"));
+ mir_tstrcpy(lf.lfFaceName, L"MS Shell Dlg");
lf.lfUnderline = lf.lfItalic = lf.lfStrikeOut = 0;
lf.lfHeight = -17;
lf.lfWeight = FW_BOLD;
diff --git a/src/mir_app/src/chat_rtf.cpp b/src/mir_app/src/chat_rtf.cpp index 43edf3925d..d4382834b0 100644 --- a/src/mir_app/src/chat_rtf.cpp +++ b/src/mir_app/src/chat_rtf.cpp @@ -28,23 +28,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // convert rich edit code to bbcode (if wanted). Otherwise, strip all RTF formatting // tags and return plain text -static TCHAR tszRtfBreaks[] = _T(" \\\n\r"); +static TCHAR tszRtfBreaks[] = L" \\\n\r"; static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst) { const TCHAR *pszText = Text; int iIndex = 1; - static const TCHAR *lpszFmt = _T("\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];"); + static const TCHAR *lpszFmt = L"\\red%[^ \x5b\\]\\green%[^ \x5b\\]\\blue%[^ \x5b;];"; TCHAR szRed[10], szGreen[10], szBlue[10]; - const TCHAR *p1 = _tcsstr(pszText, _T("\\colortbl")); + const TCHAR *p1 = _tcsstr(pszText, L"\\colortbl"); if (!p1) return; const TCHAR *pEnd = _tcschr(p1, '}'); - const TCHAR *p2 = _tcsstr(p1, _T("\\red")); + const TCHAR *p2 = _tcsstr(p1, L"\\red"); for (int i = 0; i < iCount; i++) pDst[i] = -1; @@ -60,7 +60,7 @@ static void CreateColorMap(CMString &Text, int iCount, COLORREF *pSrc, int *pDst p1 = p2; p1++; - p2 = _tcsstr(p1, _T("\\red")); + p2 = _tcsstr(p1, L"\\red"); } } @@ -84,9 +84,9 @@ int DoRtfToTags(CMString &pszText, int iNumColors, COLORREF *pColors) CreateColorMap(pszText, iNumColors, pColors, pIndex); // scan the file for rtf commands and remove or parse them - int idx = pszText.Find(_T("\\pard")); + int idx = pszText.Find(L"\\pard"); if (idx == -1) { - if ((idx = pszText.Find(_T("\\ltrpar"))) == -1) + if ((idx = pszText.Find(L"\\ltrpar")) == -1) return FALSE; idx += 7; } @@ -108,61 +108,61 @@ int DoRtfToTags(CMString &pszText, int iNumColors, COLORREF *pColors) p += 2; break; } - if (!_tcsncmp(p, _T("\\cf"), 3)) { // foreground color + if (!_tcsncmp(p, L"\\cf", 3)) { // foreground color int iCol = _ttoi(p + 3); int iInd = GetRtfIndex(iCol, iNumColors, pIndex); bInsideColor = iInd > 0; } - else if (!_tcsncmp(p, _T("\\highlight"), 10)) { //background color + else if (!_tcsncmp(p, L"\\highlight", 10)) { //background color TCHAR szTemp[20]; int iCol = _ttoi(p + 10); - mir_sntprintf(szTemp, _T("%d"), iCol); + mir_sntprintf(szTemp, L"%d", iCol); } - else if (!_tcsncmp(p, _T("\\line"), 5)) { // soft line break; + else if (!_tcsncmp(p, L"\\line", 5)) { // soft line break; res.AppendChar('\n'); } - else if (!_tcsncmp(p, _T("\\endash"), 7)) { + else if (!_tcsncmp(p, L"\\endash", 7)) { res.AppendChar(0x2013); } - else if (!_tcsncmp(p, _T("\\emdash"), 7)) { + else if (!_tcsncmp(p, L"\\emdash", 7)) { res.AppendChar(0x2014); } - else if (!_tcsncmp(p, _T("\\bullet"), 7)) { + else if (!_tcsncmp(p, L"\\bullet", 7)) { res.AppendChar(0x2022); } - else if (!_tcsncmp(p, _T("\\ldblquote"), 10)) { + else if (!_tcsncmp(p, L"\\ldblquote", 10)) { res.AppendChar(0x201C); } - else if (!_tcsncmp(p, _T("\\rdblquote"), 10)) { + else if (!_tcsncmp(p, L"\\rdblquote", 10)) { res.AppendChar(0x201D); } - else if (!_tcsncmp(p, _T("\\lquote"), 7)) { + else if (!_tcsncmp(p, L"\\lquote", 7)) { res.AppendChar(0x2018); } - else if (!_tcsncmp(p, _T("\\rquote"), 7)) { + else if (!_tcsncmp(p, L"\\rquote", 7)) { res.AppendChar(0x2019); } - else if (!_tcsncmp(p, _T("\\b"), 2)) { //bold - res.Append((p[2] != '0') ? _T("[b]") : _T("[/b]")); + else if (!_tcsncmp(p, L"\\b", 2)) { //bold + res.Append((p[2] != '0') ? L"[b]" : L"[/b]"); } - else if (!_tcsncmp(p, _T("\\i"), 2)) { // italics - res.Append((p[2] != '0') ? _T("[i]") : _T("[/i]")); + else if (!_tcsncmp(p, L"\\i", 2)) { // italics + res.Append((p[2] != '0') ? L"[i]" : L"[/i]"); } - else if (!_tcsncmp(p, _T("\\strike"), 7)) { // strike-out - res.Append((p[7] != '0') ? _T("[s]") : _T("[/s]")); + else if (!_tcsncmp(p, L"\\strike", 7)) { // strike-out + res.Append((p[7] != '0') ? L"[s]" : L"[/s]"); } - else if (!_tcsncmp(p, _T("\\ul"), 3)) { // underlined + else if (!_tcsncmp(p, L"\\ul", 3)) { // underlined if (p[3] == 0 || _tcschr(tszRtfBreaks, p[3])) { - res.Append(_T("[u]")); + res.Append(L"[u]"); bInsideUl = true; } - else if (!_tcsnccmp(p + 3, _T("none"), 4)) { + else if (!_tcsnccmp(p + 3, L"none", 4)) { if (bInsideUl) - res.Append(_T("[/u]")); + res.Append(L"[/u]"); bInsideUl = false; } } - else if (!_tcsncmp(p, _T("\\tab"), 4)) { // tab + else if (!_tcsncmp(p, L"\\tab", 4)) { // tab res.AppendChar('\t'); } else if (p[1] == '\'') { // special character @@ -197,7 +197,7 @@ int DoRtfToTags(CMString &pszText, int iNumColors, COLORREF *pColors) } if (bInsideUl) - res.Append(_T("[/u]")); + res.Append(L"[/u]"); pszText = res; return TRUE; diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index e0801e8218..3d50d2c559 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -250,7 +250,7 @@ static INT_PTR Service_NewChat(WPARAM, LPARAM lParam) TCHAR szTemp[256];
if (si->iType == GCW_SERVER)
- mir_sntprintf(szTemp, _T("Server: %s"), si->ptszName);
+ mir_sntprintf(szTemp, L"Server: %s", si->ptszName);
else
_tcsncpy_s(szTemp, si->ptszName, _TRUNCATE);
si->hContact = chatApi.AddRoom(gcw->pszModule, gcw->ptszID, szTemp, si->iType);
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 2497dabec7..4f822f1779 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -184,7 +184,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa pd.lchIcon = LoadIconEx("window", FALSE);
PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName);
- mir_sntprintf(pd.lptzContactName, _T("%s - %s"), (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, cli.pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(pd.lptzContactName, L"%s - %s", (pa == NULL) ? _A2T(pszProtoName) : pa->tszAccountName, cli.pfnGetContactDisplayName(hContact, 0));
mir_tstrncpy(pd.lptzText, TranslateTS(szBuf), _countof(pd.lptzText));
pd.iSeconds = g_Settings->iPopupTimeout;
@@ -213,13 +213,13 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) chatApi.ShowPopup(si->hContact, si, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, chatApi.aFonts[16].color, TranslateT("%s says: %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_ACTION | GC_EVENT_HIGHLIGHT:
- chatApi.ShowPopup(si->hContact, si, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, chatApi.aFonts[16].color, _T("%s %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ chatApi.ShowPopup(si->hContact, si, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, chatApi.aFonts[16].color, L"%s %s", gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_MESSAGE:
chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_MESSAGE], si->pszModule, si->ptszName, chatApi.aFonts[9].color, TranslateT("%s says: %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_ACTION:
- chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_ACTION], si->pszModule, si->ptszName, chatApi.aFonts[15].color, _T("%s %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_ACTION], si->pszModule, si->ptszName, chatApi.aFonts[15].color, L"%s %s", gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_JOIN:
chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_JOIN], si->pszModule, si->ptszName, chatApi.aFonts[3].color, TranslateT("%s has joined"), gce->ptszNick);
@@ -255,7 +255,7 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_TOPIC], si->pszModule, si->ptszName, chatApi.aFonts[11].color, TranslateT("The topic is '%s' (set by %s)"), RemoveFormatting(gce->ptszText), gce->ptszNick);
break;
case GC_EVENT_INFORMATION:
- chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_INFO], si->pszModule, si->ptszName, chatApi.aFonts[12].color, _T("%s"), RemoveFormatting(gce->ptszText));
+ chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_INFO], si->pszModule, si->ptszName, chatApi.aFonts[12].color, L"%s", RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_ADDSTATUS:
chatApi.ShowPopup(si->hContact, si, chatApi.hIcons[ICON_ADDSTATUS], si->pszModule, si->ptszName, chatApi.aFonts[13].color, TranslateT("%s enables '%s' status for %s"), gce->ptszText, (char *)gce->ptszStatus, gce->ptszNick);
@@ -411,7 +411,7 @@ const TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2) return NULL;
}
-static TCHAR szTrimString[] = _T(":,.!?;\'>)");
+static TCHAR szTrimString[] = L":,.!?;\'>)";
BOOL IsHighlighted(SESSION_INFO *si, GCEVENT *gce)
{
@@ -427,20 +427,20 @@ BOOL IsHighlighted(SESSION_INFO *si, GCEVENT *gce) CMString tszHighlightWords(g_Settings->pszHighlightWords);
while (true) {
- CMString tszToken = tszHighlightWords.Tokenize(_T("\t "), iStart);
+ CMString tszToken = tszHighlightWords.Tokenize(L"\t ", iStart);
if (iStart == -1)
break;
// replace %m with the users nickname
- if (tszToken == _T("%m"))
+ if (tszToken == L"%m")
tszToken = si->pMe->pszNick;
if (tszToken.Find('*') == -1)
tszToken = '*' + tszToken + '*';
// time to get the next/first word in the incoming text string
- for (const TCHAR *p = buf; *p != '\0'; p += _tcscspn(p, _T(" "))) {
- p += _tcsspn(p, _T(" "));
+ for (const TCHAR *p = buf; *p != '\0'; p += _tcscspn(p, L" ")) {
+ p += _tcsspn(p, L" ");
// compare the words, using wildcards
if (wildcmpit(p, tszToken))
@@ -470,7 +470,7 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) TCHAR szTime[100];
mir_tstrncpy(szTime, chatApi.MakeTimeStamp(g_Settings->pszTimeStampLog, gce->time), 99);
- FILE *hFile = _tfopen(si->pszLogFileName, _T("ab+"));
+ FILE *hFile = _tfopen(si->pszLogFileName, L"ab+");
if (hFile == NULL)
return FALSE;
@@ -481,12 +481,12 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) if (gce->ptszNick) {
if (g_Settings->bLogLimitNames && mir_tstrlen(gce->ptszNick) > 20) {
mir_tstrncpy(szTemp2, gce->ptszNick, 20);
- mir_tstrncpy(szTemp2 + 20, _T("..."), 4);
+ mir_tstrncpy(szTemp2 + 20, L"...", 4);
}
else mir_tstrncpy(szTemp2, gce->ptszNick, 511);
if (gce->ptszUserInfo)
- mir_sntprintf(szTemp, _T("%s (%s)"), szTemp2, gce->ptszUserInfo);
+ mir_sntprintf(szTemp, L"%s (%s)", szTemp2, gce->ptszUserInfo);
else
_tcsncpy_s(szTemp, szTemp2, _TRUNCATE);
pszNick = szTemp;
@@ -496,12 +496,12 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) case GC_EVENT_MESSAGE:
case GC_EVENT_MESSAGE | GC_EVENT_HIGHLIGHT:
p = '*';
- mir_sntprintf(szBuffer, _T("%s: %s"), gce->ptszNick, chatApi.RemoveFormatting(gce->ptszText));
+ mir_sntprintf(szBuffer, L"%s: %s", gce->ptszNick, chatApi.RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_ACTION:
case GC_EVENT_ACTION | GC_EVENT_HIGHLIGHT:
p = '*';
- mir_sntprintf(szBuffer, _T("%s %s"), gce->ptszNick, chatApi.RemoveFormatting(gce->ptszText));
+ mir_sntprintf(szBuffer, L"%s %s", gce->ptszNick, chatApi.RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_JOIN:
p = '>';
@@ -560,9 +560,9 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) // formatting strings don't need to be translatable - changing them via language pack would
// only screw up the log format.
if (p)
- mir_sntprintf(szLine, _T("%s %c %s\r\n"), szTime, p, szBuffer);
+ mir_sntprintf(szLine, L"%s %c %s\r\n", szTime, p, szBuffer);
else
- mir_sntprintf(szLine, _T("%s %s\r\n"), szTime, szBuffer);
+ mir_sntprintf(szLine, L"%s %s\r\n", szTime, szBuffer);
if (szLine[0]) {
_fputts(szLine, hFile);
@@ -577,7 +577,7 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) time_t now = time(0);
TCHAR tszTimestamp[20];
- _tcsftime(tszTimestamp, 20, _T("%Y%m%d-%H%M%S"), _localtime32((__time32_t *)&now));
+ _tcsftime(tszTimestamp, 20, L"%Y%m%d-%H%M%S", _localtime32((__time32_t *)&now));
tszTimestamp[19] = 0;
// max size reached, rotate the log
@@ -587,11 +587,11 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) _tsplitpath(si->pszLogFileName, tszDrive, tszDir, tszName, tszExt);
TCHAR tszNewPath[_MAX_DRIVE + _MAX_DIR + _MAX_FNAME + _MAX_EXT + 20];
- mir_sntprintf(tszNewPath, _T("%s%sarchived\\"), tszDrive, tszDir);
+ mir_sntprintf(tszNewPath, L"%s%sarchived\\", tszDrive, tszDir);
CreateDirectoryTreeT(tszNewPath);
TCHAR tszNewName[_MAX_DRIVE + _MAX_DIR + _MAX_FNAME + _MAX_EXT + 20];
- mir_sntprintf(tszNewName, _T("%s%s-%s%s"), tszNewPath, tszName, tszTimestamp, tszExt);
+ mir_sntprintf(tszNewName, L"%s%s-%s%s", tszNewPath, tszName, tszTimestamp, tszExt);
fclose(hFile);
hFile = 0;
if (!PathFileExists(tszNewName))
@@ -679,7 +679,7 @@ BOOL IsEventSupported(int eventType) void ValidateFilename(TCHAR *filename)
{
TCHAR *p1 = filename;
- TCHAR szForbidden[] = _T("\\/:*?\"<>|");
+ TCHAR szForbidden[] = L"\\/:*?\"<>|";
while (*p1 != '\0') {
if (_tcschr(szForbidden, *p1))
*p1 = '_';
@@ -696,7 +696,7 @@ TCHAR* GetChatLogsFilename(SESSION_INFO *si, time_t tTime) // check whether relevant parts of the timestamp have changed and
// we have to reparse the filename
- TCHAR *tszNow = chatApi.MakeTimeStamp(_T("%a%d%m%Y"), tTime); // once a day
+ TCHAR *tszNow = chatApi.MakeTimeStamp(L"%a%d%m%Y", tTime); // once a day
if (mir_tstrcmp(tszOldTimeStamp, tszNow)) {
_tcsncpy_s(tszOldTimeStamp, tszNow, _TRUNCATE);
*si->pszLogFileName = 0;
@@ -704,42 +704,42 @@ TCHAR* GetChatLogsFilename(SESSION_INFO *si, time_t tTime) if (si->pszLogFileName[0] == 0) {
REPLACEVARSARRAY rva[11];
- rva[0].key.t = _T("d");
- rva[0].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%#d"), tTime));
+ rva[0].key.t = L"d";
+ rva[0].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%#d", tTime));
// day 01-31
- rva[1].key.t = _T("dd");
- rva[1].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%d"), tTime));
+ rva[1].key.t = L"dd";
+ rva[1].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%d", tTime));
// month 1-12
- rva[2].key.t = _T("m");
- rva[2].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%#m"), tTime));
+ rva[2].key.t = L"m";
+ rva[2].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%#m", tTime));
// month 01-12
- rva[3].key.t = _T("mm");
- rva[3].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%m"), tTime));
+ rva[3].key.t = L"mm";
+ rva[3].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%m", tTime));
// month text short
- rva[4].key.t = _T("mon");
- rva[4].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%b"), tTime));
+ rva[4].key.t = L"mon";
+ rva[4].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%b", tTime));
// month text
- rva[5].key.t = _T("month");
- rva[5].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%B"), tTime));
+ rva[5].key.t = L"month";
+ rva[5].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%B", tTime));
// year 01-99
- rva[6].key.t = _T("yy");
- rva[6].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%y"), tTime));
+ rva[6].key.t = L"yy";
+ rva[6].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%y", tTime));
// year 1901-9999
- rva[7].key.t = _T("yyyy");
- rva[7].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%Y"), tTime));
+ rva[7].key.t = L"yyyy";
+ rva[7].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%Y", tTime));
// weekday short
- rva[8].key.t = _T("wday");
- rva[8].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%a"), tTime));
+ rva[8].key.t = L"wday";
+ rva[8].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%a", tTime));
// weekday
- rva[9].key.t = _T("weekday");
- rva[9].value.t = mir_tstrdup(chatApi.MakeTimeStamp(_T("%A"), tTime));
+ rva[9].key.t = L"weekday";
+ rva[9].value.t = mir_tstrdup(chatApi.MakeTimeStamp(L"%A", tTime));
// end of array
rva[10].key.t = NULL;
rva[10].value.t = NULL;
TCHAR tszTemp[MAX_PATH], *ptszVarPath;
if (g_Settings->pszLogDir[mir_tstrlen(g_Settings->pszLogDir) - 1] == '\\') {
- mir_sntprintf(tszTemp, _T("%s%s"), g_Settings->pszLogDir, _T("%userid%.log"));
+ mir_sntprintf(tszTemp, L"%s%s", g_Settings->pszLogDir, L"%userid%.log");
ptszVarPath = tszTemp;
}
else ptszVarPath = g_Settings->pszLogDir;
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index afe24c34e7..e4ef46e543 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -401,7 +401,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam szFullName.Empty();
break;
}
- szFullName = CMString(cc->szText) + _T("\\") + szFullName;
+ szFullName = CMString(cc->szText) + L"\\" + szFullName;
group = group->parent;
}
@@ -1111,7 +1111,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)contacto->hContact, contactn->groupId);
else if (contacto->type == CLCIT_GROUP) { //dropee is a group
TCHAR szNewName[120];
- mir_sntprintf(szNewName, _T("%s\\%s"), Clist_GroupGetName(contactn->groupId, NULL), contacto->szText);
+ mir_sntprintf(szNewName, L"%s\\%s", Clist_GroupGetName(contactn->groupId, NULL), contacto->szText);
Clist_GroupRename(contacto->groupId, szNewName);
}
}
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp index aadd459d60..382512016c 100644 --- a/src/mir_app/src/clcfiledrop.cpp +++ b/src/mir_app/src/clcfiledrop.cpp @@ -182,13 +182,13 @@ static void AddToFileList(TCHAR ***pppFiles, int *totalCount, const TCHAR *szFil HANDLE hFind;
TCHAR szPath[MAX_PATH];
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\*"));
+ mir_tstrcat(szPath, L"\\*");
if (hFind = FindFirstFile(szPath, &fd)) {
do {
- if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T("..")))
+ if (!mir_tstrcmp(fd.cFileName, L".") || !mir_tstrcmp(fd.cFileName, L".."))
continue;
mir_tstrcpy(szPath, szFilename);
- mir_tstrcat(szPath, _T("\\"));
+ mir_tstrcat(szPath, L"\\");
mir_tstrcat(szPath, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
} while (FindNextFile(hFind, &fd));
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 407346a86a..c53da45fbe 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -707,7 +707,7 @@ void fnSaveStateAndRebuildList(HWND hwnd, ClcData *dat) group = contact->group; } - ClcContact *cc = cli.pfnAddInfoItemToGroup(group, saveInfo[i].contact.flags, _T("")); + ClcContact *cc = cli.pfnAddInfoItemToGroup(group, saveInfo[i].contact.flags, L""); *cc = saveInfo[i].contact; } diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index b8cdb04f8f..fdeae935e2 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -32,7 +32,7 @@ extern HANDLE hHideInfoTipEvent; TCHAR* fnGetGroupCountsText(ClcData *dat, ClcContact *contact)
{
if (contact->type != CLCIT_GROUP || !(dat->exStyle & CLS_EX_SHOWGROUPCOUNTS))
- return _T("");
+ return L"";
ClcGroup *group = contact->group, *topgroup = group;
int onlineCount = 0;
@@ -60,10 +60,10 @@ TCHAR* fnGetGroupCountsText(ClcData *dat, ClcContact *contact) group->scanIndex++;
}
if (onlineCount == 0 && dat->exStyle & CLS_EX_HIDECOUNTSWHENEMPTY)
- return _T("");
+ return L"";
static TCHAR szName[32];
- mir_sntprintf(szName, _T("(%u/%u)"), onlineCount, totalCount);
+ mir_sntprintf(szName, L"(%u/%u)", onlineCount, totalCount);
return szName;
}
@@ -174,7 +174,7 @@ int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contac TCHAR *szCounts;
szCounts = cli.pfnGetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
- GetTextExtentPoint32(hdc, _T(" "), 1, &textSize);
+ GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
SelectObject(hdc, dat->fontInfo[FONTID_GROUPCOUNTS].hFont);
GetTextExtentPoint32(hdc, szCounts, (int)mir_tstrlen(szCounts), &textSize);
@@ -417,11 +417,11 @@ void fnEndRename(HWND, ClcData *dat, int save) ClcContact *contact;
if (cli.pfnGetRowByIndex(dat, dat->selection, &contact, NULL) != -1) {
- if (mir_tstrcmp(contact->szText, text) && !_tcsstr(text, _T("\\"))) {
+ if (mir_tstrcmp(contact->szText, text) && !_tcsstr(text, L"\\")) {
if (contact->type == CLCIT_GROUP) {
if (contact->group->parent && contact->group->parent->parent) {
TCHAR szFullName[256];
- mir_sntprintf(szFullName, _T("%s\\%s"),
+ mir_sntprintf(szFullName, L"%s\\%s",
Clist_GroupGetName(contact->group->parent->groupId, NULL), text);
Clist_GroupRename(contact->groupId, szFullName);
}
@@ -508,7 +508,7 @@ void fnBeginRenameSelection(HWND hwnd, ClcData *dat) POINT pt;
cli.pfnCalcEipPosition(dat, contact, group, &pt);
int h = cli.pfnGetRowHeight(dat, dat->selection);
- dat->hwndRenameEdit = CreateWindow(_T("EDIT"), contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, pt.x, pt.y, clRect.right - pt.x, h, hwnd, NULL, cli.hInst, NULL);
+ dat->hwndRenameEdit = CreateWindow(L"EDIT", contact->szText, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, pt.x, pt.y, clRect.right - pt.x, h, hwnd, NULL, cli.hInst, NULL);
mir_subclassWindow(dat->hwndRenameEdit, RenameEditSubclassProc);
SendMessage(dat->hwndRenameEdit, WM_SETFONT, (WPARAM)(contact->type == CLCIT_GROUP ? dat->fontInfo[FONTID_GROUPS].hFont : dat->fontInfo[FONTID_CONTACTS].hFont), 0);
SendMessage(dat->hwndRenameEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index a903646839..720c4d0001 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -111,7 +111,7 @@ static INT_PTR CreateGroupInternal(MGROUP hParent, const TCHAR *ptszName) if (tmp == NULL)
return NULL;
- mir_sntprintf(newBaseName, _T("%s\\%s"), tmp->groupName+1, grpName);
+ mir_sntprintf(newBaseName, L"%s\\%s", tmp->groupName+1, grpName);
}
else _tcsncpy_s(newBaseName, grpName, _TRUNCATE);
@@ -123,7 +123,7 @@ static INT_PTR CreateGroupInternal(MGROUP hParent, const TCHAR *ptszName) }
else {
for (int idCopy = 1; GroupNameExists(newName + 1, -1); idCopy++)
- mir_sntprintf(newName + 1, _countof(newName) - 1, _T("%s (%d)"), newBaseName, idCopy);
+ mir_sntprintf(newName + 1, _countof(newName) - 1, L"%s (%d)", newBaseName, idCopy);
}
int newId = arByIds.getCount();
@@ -244,7 +244,7 @@ MIR_APP_DLL(int) Clist_GroupDelete(MGROUP hGroup) if (!_tcsncmp(pGroup->groupName+1, p->groupName+1, len) && p->groupName[len+1] == '\\' && _tcschr(p->groupName + len + 2, '\\') == NULL) {
if (szNewParent[0])
- mir_sntprintf(szNewName, _T("%s\\%s"), szNewParent, p->groupName + len + 2);
+ mir_sntprintf(szNewName, L"%s\\%s", szNewParent, p->groupName + len + 2);
else
mir_tstrncpy(szNewName, p->groupName + len + 2, _countof(szNewName));
Clist_GroupRename(i + 1, szNewName);
@@ -354,7 +354,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) CGroupInternal *p = arByIds[i];
if (!_tcsncmp(p->groupName+1, oldName, len) && p->groupName[len+1] == '\\' && _tcschr(p->groupName + len + 2, '\\') == NULL) {
TCHAR szNewName[256];
- mir_sntprintf(szNewName, _T("%s\\%s"), szName, p->groupName + len + 2);
+ mir_sntprintf(szNewName, L"%s\\%s", szName, p->groupName + len + 2);
RenameGroupWithMove(i, szNewName, 0); // luckily, child groups will never need reordering
}
}
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index 0e452807de..1732c9943a 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -57,7 +57,7 @@ void fnCheckCacheItem(ClcCacheEntry *p) if (p->tszGroup == NULL) {
p->tszGroup = db_get_tsa(p->hContact, "CList", "Group");
if (p->tszGroup == NULL)
- p->tszGroup = mir_tstrdup(_T(""));
+ p->tszGroup = mir_tstrdup(L"");
}
if (p->bIsHidden == -1)
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp index de2dae1621..abb54f5c9b 100644 --- a/src/mir_app/src/clisttray.cpp +++ b/src/mir_app/src/clisttray.cpp @@ -72,7 +72,7 @@ TCHAR* fnTrayIconMakeTooltip(const TCHAR *szPrefix, const char *szProto) initcheck NULL;
mir_cslock lck(trayLockCS);
- TCHAR *szSeparator = _T("\n");
+ TCHAR *szSeparator = L"\n";
if (szProto == NULL) {
if (accounts.getCount() == 0)
@@ -107,16 +107,16 @@ TCHAR* fnTrayIconMakeTooltip(const TCHAR *szPrefix, const char *szProto) if (!tszTip.IsEmpty())
tszTip.AppendChar('\n');
if (hasTips()) {
- tszTip.AppendFormat(_T("<b>%-12.12s</b>\t%s"), pa->tszAccountName, szStatus);
+ tszTip.AppendFormat(L"<b>%-12.12s</b>\t%s", pa->tszAccountName, szStatus);
ptrT ProtoXStatus(sttGetXStatus(pa->szModuleName));
if (ProtoXStatus != NULL) {
if (!tszTip.IsEmpty())
tszTip.AppendChar('\n');
- tszTip.AppendFormat(_T("%-24.24s\n"), ProtoXStatus);
+ tszTip.AppendFormat(L"%-24.24s\n", ProtoXStatus);
}
}
- else tszTip.AppendFormat(_T("%s %s"), pa->tszAccountName, szStatus);
+ else tszTip.AppendFormat(L"%s %s", pa->tszAccountName, szStatus);
}
_tcsncpy_s(cli.szTip, MAX_TIP_SIZE, tszTip, _TRUNCATE);
@@ -130,22 +130,22 @@ TCHAR* fnTrayIconMakeTooltip(const TCHAR *szPrefix, const char *szProto) if (db_get_b(NULL, "CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT)) {
if (hasTips()) {
if (ProtoXStatus != NULL)
- mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s<b>%-12.12s</b>\t%s%s%-24.24s"), szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus);
+ mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s%s%-24.24s", szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus);
else
- mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s<b>%-12.12s</b>\t%s"), szPrefix, szSeparator, pa->tszAccountName, szStatus);
+ mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s", szPrefix, szSeparator, pa->tszAccountName, szStatus);
}
- else mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s%s%s %s"), szPrefix, szSeparator, pa->tszAccountName, szStatus);
+ else mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"%s%s%s %s", szPrefix, szSeparator, pa->tszAccountName, szStatus);
}
else mir_tstrncpy(cli.szTip, szPrefix, MAX_TIP_SIZE);
}
else {
if (hasTips()) {
if (ProtoXStatus != NULL)
- mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("<b>%-12.12s</b>\t%s\n%-24.24s"), pa->tszAccountName, szStatus, ProtoXStatus);
+ mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"<b>%-12.12s</b>\t%s\n%-24.24s", pa->tszAccountName, szStatus, ProtoXStatus);
else
- mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("<b>%-12.12s</b>\t%s"), pa->tszAccountName, szStatus);
+ mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"<b>%-12.12s</b>\t%s", pa->tszAccountName, szStatus);
}
- else mir_sntprintf(cli.szTip, MAX_TIP_SIZE, _T("%s %s"), pa->tszAccountName, szStatus);
+ else mir_sntprintf(cli.szTip, MAX_TIP_SIZE, L"%s %s", pa->tszAccountName, szStatus);
}
}
}
@@ -645,8 +645,8 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam) MSG *msg = (MSG *)wParam;
switch (msg->message) {
case WM_CREATE: {
- WM_TASKBARCREATED = RegisterWindowMessage(_T("TaskbarCreated"));
- WM_TASKBARBUTTONCREATED = RegisterWindowMessage(_T("TaskbarButtonCreated"));
+ WM_TASKBARCREATED = RegisterWindowMessage(L"TaskbarCreated");
+ WM_TASKBARBUTTONCREATED = RegisterWindowMessage(L"TaskbarButtonCreated");
PostMessage(msg->hwnd, TIM_CREATE, 0, 0);
break;
}
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 23890363a2..3ba4cbc915 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -242,7 +242,7 @@ int LoadCLUIModule(void) DBVARIANT dbv;
TCHAR titleText[256];
- uMsgProcessProfile = RegisterWindowMessage(_T("Miranda::ProcessProfile"));
+ uMsgProcessProfile = RegisterWindowMessage(L"Miranda::ProcessProfile");
cli.pfnLoadCluiGlobalOpts();
HookEvent(ME_SYSTEM_MODULESLOADED, CluiModulesLoaded);
@@ -301,7 +301,7 @@ int LoadCLUIModule(void) NULL, NULL, cli.hInst, NULL);
if (db_get_b(NULL, "CList", "OnDesktop", 0)) {
- HWND hProgMan = FindWindow(_T("Progman"), NULL);
+ HWND hProgMan = FindWindow(L"Progman", NULL);
if (IsWindow(hProgMan))
SetParent(cli.hwndContactList, hProgMan);
}
@@ -412,7 +412,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (msg == uMsgProcessProfile) {
TCHAR profile[MAX_PATH];
if (GlobalGetAtomName((ATOM)wParam, profile, _countof(profile))) {
- int rc = mir_tstrcmpi(profile, VARST(_T("%miranda_userdata%\\%miranda_profilename%.dat"))) == 0;
+ int rc = mir_tstrcmpi(profile, VARST(L"%miranda_userdata%\\%miranda_profilename%.dat")) == 0;
ReplyMessage(rc);
if (rc) {
ShowWindow(hwnd, SW_RESTORE);
@@ -460,7 +460,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM return FALSE;
case M_CREATECLC:
- cli.hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), _T(""),
+ cli.hwndContactTree = CreateWindow(_T(CLISTCONTROL_CLASS), L"",
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
| CLS_CONTACTLIST
| (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
@@ -994,7 +994,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM PROTOACCOUNT *pa;
TCHAR tszName[64];
if ((pa = Proto_GetAccount(szProto)) != NULL)
- mir_sntprintf(tszName, _T("%s "), pa->tszAccountName);
+ mir_sntprintf(tszName, L"%s ", pa->tszAccountName);
else
tszName[0] = 0;
@@ -1005,7 +1005,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (showOpts & 4) {
TCHAR* szStatus = cli.pfnGetStatusModeDescription(status, 0);
if (!szStatus)
- szStatus = _T("");
+ szStatus = L"";
GetTextExtentPoint32(dis->hDC, szStatus, (int)mir_tstrlen(szStatus), &textSize);
TextOut(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - textSize.cy) >> 1, szStatus, (int)mir_tstrlen(szStatus));
}
diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp index 867187129f..8163c22124 100644 --- a/src/mir_app/src/cluiservices.cpp +++ b/src/mir_app/src/cluiservices.cpp @@ -114,12 +114,12 @@ void fnCluiProtocolStatusChanged(int, const char*) TCHAR tszName[64];
PROTOACCOUNT *pa = Proto_GetAccount(cli.menuProtos[i].szProto);
if (pa)
- mir_sntprintf(tszName, _T("%s "), pa->tszAccountName);
+ mir_sntprintf(tszName, L"%s ", pa->tszAccountName);
else
tszName[0] = 0;
if (showOpts & 4 && mir_tstrlen(tszName) < _countof(tszName) - 1)
- mir_tstrcat(tszName, _T(" "));
+ mir_tstrcat(tszName, L" ");
GetTextExtentPoint32(hdc, tszName, (int)mir_tstrlen(tszName), &textSize);
x += textSize.cx;
x += GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp index 9c9265807a..6fa2ae5bf0 100644 --- a/src/mir_app/src/database.cpp +++ b/src/mir_app/src/database.cpp @@ -38,7 +38,7 @@ bool fileExist(const TCHAR *fname) if (*fname == 0)
return false;
- FILE *fp = _tfopen(fname, _T("r+"));
+ FILE *fp = _tfopen(fname, L"r+");
bool res = (fp != NULL);
if (fp) fclose(fp);
return res;
@@ -56,13 +56,13 @@ static void fillProfileName(const TCHAR* ptszFileName) _tcsncpy_s(g_shortProfileName, p, _TRUNCATE);
TCHAR *pos = _tcsrchr(g_shortProfileName, '.');
- if (mir_tstrcmpi(pos, _T(".dat")) == 0)
+ if (mir_tstrcmpi(pos, L".dat") == 0)
*pos = 0;
}
bool IsInsideRootDir(TCHAR* profiledir, bool exact)
{
- VARST pfd(_T("%miranda_path%"));
+ VARST pfd(L"%miranda_path%");
if (exact)
return mir_tstrcmpi(profiledir, pfd) == 0;
@@ -73,10 +73,10 @@ bool IsInsideRootDir(TCHAR* profiledir, bool exact) int getProfilePath(TCHAR *buf, size_t)
{
TCHAR profiledir[MAX_PATH];
- GetPrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), profiledir, _countof(profiledir), mirandabootini);
+ GetPrivateProfileString(L"Database", L"ProfileDir", L"", profiledir, _countof(profiledir), mirandabootini);
if (profiledir[0] == 0)
- mir_tstrcpy(profiledir, _T("%miranda_path%\\Profiles"));
+ mir_tstrcpy(profiledir, L"%miranda_path%\\Profiles");
size_t len = PathToAbsoluteT(VARST(profiledir), buf);
@@ -90,7 +90,7 @@ int getProfilePath(TCHAR *buf, size_t) int isValidProfileName(const TCHAR *name)
{
size_t len = mir_tstrlen(name) - 4;
- return len > 0 && mir_tstrcmpi(&name[len], _T(".dat")) == 0;
+ return len > 0 && mir_tstrcmpi(&name[len], L".dat") == 0;
}
// returns 1 if the profile manager should be shown
@@ -102,8 +102,8 @@ static bool showProfileManager(void) return 1;
// wanna show it?
- GetPrivateProfileString(_T("Database"), _T("ShowProfileMgr"), _T("never"), Mgr, _countof(Mgr), mirandabootini);
- return (mir_tstrcmpi(Mgr, _T("yes")) == 0);
+ GetPrivateProfileString(L"Database", L"ShowProfileMgr", L"never", Mgr, _countof(Mgr), mirandabootini);
+ return (mir_tstrcmpi(Mgr, L"yes") == 0);
}
bool shouldAutoCreate(TCHAR *szProfile)
@@ -112,21 +112,21 @@ bool shouldAutoCreate(TCHAR *szProfile) return false;
TCHAR ac[32];
- GetPrivateProfileString(_T("Database"), _T("AutoCreate"), _T(""), ac, _countof(ac), mirandabootini);
- return mir_tstrcmpi(ac, _T("yes")) == 0;
+ GetPrivateProfileString(L"Database", L"AutoCreate", L"", ac, _countof(ac), mirandabootini);
+ return mir_tstrcmpi(ac, L"yes") == 0;
}
static void getDefaultProfile(TCHAR *szProfile, size_t cch)
{
TCHAR defaultProfile[MAX_PATH];
- GetPrivateProfileString(_T("Database"), _T("DefaultProfile"), _T(""), defaultProfile, _countof(defaultProfile), mirandabootini);
+ GetPrivateProfileString(L"Database", L"DefaultProfile", L"", defaultProfile, _countof(defaultProfile), mirandabootini);
if (defaultProfile[0] == 0)
return;
VARST res(defaultProfile);
if (res)
- mir_sntprintf(szProfile, cch, _T("%s\\%s\\%s%s"), g_profileDir, (TCHAR*)res, (TCHAR*)res, isValidProfileName(res) ? _T("") : _T(".dat"));
+ mir_sntprintf(szProfile, cch, L"%s\\%s\\%s%s", g_profileDir, (TCHAR*)res, (TCHAR*)res, isValidProfileName(res) ? L"" : L".dat");
else
szProfile[0] = 0;
}
@@ -139,17 +139,17 @@ static void loadProfileByShortName(const TCHAR* src, TCHAR *szProfile, size_t cc TCHAR *p = _tcsrchr(buf, '\\'); if (p) ++p; else p = buf;
if (!isValidProfileName(buf) && *p)
- mir_tstrcat(buf, _T(".dat"));
+ mir_tstrcat(buf, L".dat");
TCHAR profileName[MAX_PATH], newProfileDir[MAX_PATH];
_tcsncpy_s(profileName, p, _TRUNCATE);
if (!isValidProfileName(profileName) && *p)
- mir_tstrcat(profileName, _T(".dat"));
+ mir_tstrcat(profileName, L".dat");
_tcsncpy_s(profileName, p, _TRUNCATE);
p = _tcsrchr(profileName, '.'); if (p) *p = 0;
- mir_sntprintf(newProfileDir, cch, _T("%s\\%s\\"), g_profileDir, profileName);
+ mir_sntprintf(newProfileDir, cch, L"%s\\%s\\", g_profileDir, profileName);
PathToAbsoluteT(buf, szProfile, newProfileDir);
if (_tcschr(buf, '\\')) {
@@ -166,7 +166,7 @@ static void loadProfileByShortName(const TCHAR* src, TCHAR *szProfile, size_t cc void getProfileCmdLine(TCHAR *szProfile, size_t cch)
{
- LPCTSTR ptszProfileName = CmdLine_GetOption(_T("profile"));
+ LPCTSTR ptszProfileName = CmdLine_GetOption(L"profile");
if (ptszProfileName != NULL)
loadProfileByShortName(ptszProfileName, szProfile, cch);
}
@@ -184,9 +184,9 @@ static void moveProfileDirProfiles(TCHAR *profiledir, BOOL isRootDir = TRUE) {
TCHAR pfd[MAX_PATH];
if (isRootDir)
- _tcsncpy_s(pfd, VARST(_T("%miranda_path%\\*.dat")), _TRUNCATE);
+ _tcsncpy_s(pfd, VARST(L"%miranda_path%\\*.dat"), _TRUNCATE);
else
- mir_sntprintf(pfd, _T("%s\\*.dat"), profiledir);
+ mir_sntprintf(pfd, L"%s\\*.dat", profiledir);
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(pfd, &ffd);
@@ -196,23 +196,23 @@ static void moveProfileDirProfiles(TCHAR *profiledir, BOOL isRootDir = TRUE) TCHAR path[MAX_PATH], path2[MAX_PATH];
TCHAR* profile = mir_tstrdup(ffd.cFileName);
c = _tcsrchr(profile, '.'); if (c) *c = 0;
- mir_sntprintf(path, _T("%s\\%s"), pfd, ffd.cFileName);
- mir_sntprintf(path2, _T("%s\\%s"), profiledir, profile);
+ mir_sntprintf(path, L"%s\\%s", pfd, ffd.cFileName);
+ mir_sntprintf(path2, L"%s\\%s", profiledir, profile);
CreateDirectoryTreeT(path2);
- mir_sntprintf(path2, _T("%s\\%s\\%s"), profiledir, profile, ffd.cFileName);
+ mir_sntprintf(path2, L"%s\\%s\\%s", profiledir, profile, ffd.cFileName);
if (_taccess(path2, 0) == 0) {
TCHAR buf[512];
mir_sntprintf(buf,
TranslateT("Miranda is trying to upgrade your profile structure.\nIt cannot move profile %s to the new location %s\nBecause profile with this name already exists. Please resolve the issue manually."),
path, path2);
- MessageBox(NULL, buf, _T("Miranda NG"), MB_ICONERROR | MB_OK);
+ MessageBox(NULL, buf, L"Miranda NG", MB_ICONERROR | MB_OK);
}
else if (MoveFile(path, path2) == 0) {
TCHAR buf[512];
mir_sntprintf(buf,
TranslateT("Miranda is trying to upgrade your profile structure.\nIt cannot move profile %s to the new location %s automatically\nMost likely this is due to insufficient privileges. Please move profile manually."),
path, path2);
- MessageBox(NULL, buf, _T("Miranda NG"), MB_ICONERROR | MB_OK);
+ MessageBox(NULL, buf, L"Miranda NG", MB_ICONERROR | MB_OK);
mir_free(profile);
break;
}
@@ -240,18 +240,18 @@ static int getProfile1(TCHAR *szProfile, size_t cch, TCHAR *profiledir, BOOL * n if (bShowProfileManager || !reqfd) {
TCHAR searchspec[MAX_PATH];
- mir_sntprintf(searchspec, _T("%s\\*.*"), profiledir);
+ mir_sntprintf(searchspec, L"%s\\*.*", profiledir);
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(searchspec, &ffd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
// make sure the first hit is actually a *.dat file
- if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(ffd.cFileName, _T(".")) || !mir_tstrcmp(ffd.cFileName, _T("..")))
+ if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) || !mir_tstrcmp(ffd.cFileName, L".") || !mir_tstrcmp(ffd.cFileName, L".."))
continue;
TCHAR newProfile[MAX_PATH];
- mir_sntprintf(newProfile, _T("%s\\%s\\%s.dat"), profiledir, ffd.cFileName, ffd.cFileName);
+ mir_sntprintf(newProfile, L"%s\\%s\\%s.dat", profiledir, ffd.cFileName, ffd.cFileName);
if (_taccess(newProfile, 0) != 0)
continue;
@@ -285,8 +285,8 @@ static int getProfileAutoRun(TCHAR *szProfile) return false;
TCHAR Mgr[32];
- GetPrivateProfileString(_T("Database"), _T("ShowProfileMgr"), _T(""), Mgr, _countof(Mgr), mirandabootini);
- if (mir_tstrcmpi(Mgr, _T("never")))
+ GetPrivateProfileString(L"Database", L"ShowProfileMgr", L"", Mgr, _countof(Mgr), mirandabootini);
+ if (mir_tstrcmpi(Mgr, L"never"))
return 0;
return fileExist(szProfile) || shouldAutoCreate(szProfile);
@@ -297,7 +297,7 @@ static int getProfile(TCHAR *szProfile, size_t cch) {
getProfilePath(g_profileDir, _countof(g_profileDir));
if (IsInsideRootDir(g_profileDir, true))
- if (WritePrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), mirandabootini))
+ if (WritePrivateProfileString(L"Database", L"ProfileDir", L"", mirandabootini))
getProfilePath(g_profileDir, _countof(g_profileDir));
getDefaultProfile(szProfile, cch);
@@ -312,7 +312,7 @@ static int getProfile(TCHAR *szProfile, size_t cch) }
PROFILEMANAGERDATA pd = { 0 };
- if (CmdLine_GetOption(_T("ForceShowPM"))) {
+ if (CmdLine_GetOption(L"ForceShowPM")) {
LBL_Show:
pd.ptszProfile = szProfile;
pd.ptszProfileDir = g_profileDir;
@@ -454,7 +454,7 @@ static BOOL CALLBACK EnumMirandaWindows(HWND hwnd, LPARAM lParam) TCHAR classname[256];
ENUMMIRANDAWINDOW *x = (ENUMMIRANDAWINDOW *)lParam;
DWORD_PTR res = 0;
- if (GetClassName(hwnd, classname, _countof(classname)) && mir_tstrcmp(_T("Miranda"), classname) == 0) {
+ if (GetClassName(hwnd, classname, _countof(classname)) && mir_tstrcmp(L"Miranda", classname) == 0) {
if (SendMessageTimeout(hwnd, x->msg, (WPARAM)x->aPath, 0, SMTO_ABORTIFHUNG, 100, &res) && res) {
x->found++;
return FALSE;
@@ -467,7 +467,7 @@ static int FindMirandaForProfile(TCHAR *szProfile) {
ENUMMIRANDAWINDOW x = { 0 };
x.profile = szProfile;
- x.msg = RegisterWindowMessage(_T("Miranda::ProcessProfile"));
+ x.msg = RegisterWindowMessage(L"Miranda::ProcessProfile");
x.aPath = GlobalAddAtom(szProfile);
EnumWindows(EnumMirandaWindows, (LPARAM)&x);
GlobalDeleteAtom(x.aPath);
@@ -482,7 +482,7 @@ static TCHAR tszNoSuitableDriver[] = LPGENT("Miranda was unable to open '%s'\nTh int LoadDatabaseModule(void)
{
TCHAR szProfile[MAX_PATH];
- PathToAbsoluteT(_T("."), szProfile);
+ PathToAbsoluteT(L".", szProfile);
_tchdir(szProfile);
szProfile[0] = 0;
diff --git a/src/mir_app/src/dbini.cpp b/src/mir_app/src/dbini.cpp index b45e520ac8..855c624fce 100644 --- a/src/mir_app/src/dbini.cpp +++ b/src/mir_app/src/dbini.cpp @@ -38,12 +38,12 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wPa TCHAR szSecurity[11];
const TCHAR *pszSecurityInfo;
- GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, _countof(szSecurity), mirandabootini);
- if (!mir_tstrcmpi(szSecurity, _T("all")))
+ GetPrivateProfileString(L"AutoExec", L"Warn", L"notsafe", szSecurity, _countof(szSecurity), mirandabootini);
+ if (!mir_tstrcmpi(szSecurity, L"all"))
pszSecurityInfo = LPGENT("Security systems to prevent malicious changes are in place and you will be warned before every change that is made.");
- else if (!mir_tstrcmpi(szSecurity, _T("onlyunsafe")))
+ else if (!mir_tstrcmpi(szSecurity, L"onlyunsafe"))
pszSecurityInfo = LPGENT("Security systems to prevent malicious changes are in place and you will be warned before changes that are known to be unsafe.");
- else if (!mir_tstrcmpi(szSecurity, _T("none")))
+ else if (!mir_tstrcmpi(szSecurity, L"none"))
pszSecurityInfo = LPGENT("Security systems to prevent malicious changes have been disabled. You will receive no further warnings.");
else pszSecurityInfo = NULL;
if (pszSecurityInfo) SetDlgItemText(hwndDlg, IDC_SECURITYINFO, TranslateTS(pszSecurityInfo));
@@ -56,7 +56,7 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wPa {
TCHAR szPath[MAX_PATH];
GetDlgItemText(hwndDlg, IDC_ININAME, szPath, _countof(szPath));
- ShellExecute(hwndDlg, _T("open"), szPath, NULL, NULL, SW_SHOW);
+ ShellExecute(hwndDlg, L"open", szPath, NULL, NULL, SW_SHOW);
}
break;
@@ -232,7 +232,7 @@ static int EnumSettingsForDeletion(const char *szSetting, LPARAM param) static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsafeSections, int secur, bool secFN)
{
- FILE *fp = _tfopen(szIniPath, _T("rt"));
+ FILE *fp = _tfopen(szIniPath, L"rt");
if (fp == NULL)
return;
@@ -437,22 +437,22 @@ static void DoAutoExec(void) TCHAR szUse[7], szIniPath[MAX_PATH], szFindPath[MAX_PATH];
TCHAR buf[2048], szSecurity[11], szOverrideSecurityFilename[MAX_PATH], szOnCreateFilename[MAX_PATH];
- GetPrivateProfileString(_T("AutoExec"), _T("Use"), _T("prompt"), szUse, _countof(szUse), mirandabootini);
- if (!mir_tstrcmpi(szUse, _T("no"))) return;
- GetPrivateProfileString(_T("AutoExec"), _T("Safe"), _T("CLC Icons CLUI CList SkinSounds"), buf, _countof(buf), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"Use", L"prompt", szUse, _countof(szUse), mirandabootini);
+ if (!mir_tstrcmpi(szUse, L"no")) return;
+ GetPrivateProfileString(L"AutoExec", L"Safe", L"CLC Icons CLUI CList SkinSounds", buf, _countof(buf), mirandabootini);
ptrA szSafeSections(mir_t2a(buf));
- GetPrivateProfileString(_T("AutoExec"), _T("Unsafe"), _T("AIM Facebook GG ICQ IRC JABBER MRA MSN SKYPE Tlen TWITTER VKontakte XFire"), buf, _countof(buf), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"Unsafe", L"AIM Facebook GG ICQ IRC JABBER MRA MSN SKYPE Tlen TWITTER VKontakte XFire", buf, _countof(buf), mirandabootini);
ptrA szUnsafeSections(mir_t2a(buf));
- GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, _countof(szSecurity), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"Warn", L"notsafe", szSecurity, _countof(szSecurity), mirandabootini);
int secur = 0;
- if (!mir_tstrcmpi(szSecurity, _T("none"))) secur = 0;
- else if (!mir_tstrcmpi(szSecurity, _T("notsafe"))) secur = 1;
- else if (!mir_tstrcmpi(szSecurity, _T("onlyunsafe"))) secur = 2;
+ if (!mir_tstrcmpi(szSecurity, L"none")) secur = 0;
+ else if (!mir_tstrcmpi(szSecurity, L"notsafe")) secur = 1;
+ else if (!mir_tstrcmpi(szSecurity, L"onlyunsafe")) secur = 2;
- GetPrivateProfileString(_T("AutoExec"), _T("OverrideSecurityFilename"), _T(""), szOverrideSecurityFilename, _countof(szOverrideSecurityFilename), mirandabootini);
- GetPrivateProfileString(_T("AutoExec"), _T("OnCreateFilename"), _T(""), szOnCreateFilename, _countof(szOnCreateFilename), mirandabootini);
- GetPrivateProfileString(_T("AutoExec"), _T("Glob"), _T("autoexec_*.ini"), szFindPath, _countof(szFindPath), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"OverrideSecurityFilename", L"", szOverrideSecurityFilename, _countof(szOverrideSecurityFilename), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"OnCreateFilename", L"", szOnCreateFilename, _countof(szOnCreateFilename), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"Glob", L"autoexec_*.ini", szFindPath, _countof(szFindPath), mirandabootini);
if (g_bDbCreated && szOnCreateFilename[0]) {
PathToAbsoluteT(VARST(szOnCreateFilename), szIniPath);
@@ -475,8 +475,8 @@ static void DoAutoExec(void) do {
bool secFN = mir_tstrcmpi(fd.cFileName, szOverrideSecurityFilename) == 0;
- mir_sntprintf(szIniPath, _T("%s%s"), szFindPath, fd.cFileName);
- if (!mir_tstrcmpi(szUse, _T("prompt")) && !secFN) {
+ mir_sntprintf(szIniPath, L"%s%s", szFindPath, fd.cFileName);
+ if (!mir_tstrcmpi(szUse, L"prompt") && !secFN) {
int result = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_INSTALLINI), NULL, InstallIniDlgProc, (LPARAM)szIniPath);
if (result == IDC_NOTOALL) break;
if (result == IDCANCEL) continue;
@@ -488,10 +488,10 @@ static void DoAutoExec(void) DeleteFile(szIniPath);
else {
TCHAR szOnCompletion[8];
- GetPrivateProfileString(_T("AutoExec"), _T("OnCompletion"), _T("recycle"), szOnCompletion, _countof(szOnCompletion), mirandabootini);
- if (!mir_tstrcmpi(szOnCompletion, _T("delete")))
+ GetPrivateProfileString(L"AutoExec", L"OnCompletion", L"recycle", szOnCompletion, _countof(szOnCompletion), mirandabootini);
+ if (!mir_tstrcmpi(szOnCompletion, L"delete"))
DeleteFile(szIniPath);
- else if (!mir_tstrcmpi(szOnCompletion, _T("recycle"))) {
+ else if (!mir_tstrcmpi(szOnCompletion, L"recycle")) {
SHFILEOPSTRUCT shfo = { 0 };
shfo.wFunc = FO_DELETE;
shfo.pFrom = szIniPath;
@@ -499,15 +499,15 @@ static void DoAutoExec(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
SHFileOperation(&shfo);
}
- else if (!mir_tstrcmpi(szOnCompletion, _T("rename"))) {
+ else if (!mir_tstrcmpi(szOnCompletion, L"rename")) {
TCHAR szRenamePrefix[MAX_PATH], szNewPath[MAX_PATH];
- GetPrivateProfileString(_T("AutoExec"), _T("RenamePrefix"), _T("done_"), szRenamePrefix, _countof(szRenamePrefix), mirandabootini);
+ GetPrivateProfileString(L"AutoExec", L"RenamePrefix", L"done_", szRenamePrefix, _countof(szRenamePrefix), mirandabootini);
mir_tstrcpy(szNewPath, szFindPath);
mir_tstrcat(szNewPath, szRenamePrefix);
mir_tstrcat(szNewPath, fd.cFileName);
MoveFile(szIniPath, szNewPath);
}
- else if (!mir_tstrcmpi(szOnCompletion, _T("ask")))
+ else if (!mir_tstrcmpi(szOnCompletion, L"ask"))
DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_INIIMPORTDONE), NULL, IniImportDoneDlgProc, (LPARAM)szIniPath);
}
}
@@ -537,7 +537,7 @@ int InitIni(void) DoAutoExec();
TCHAR szMirandaDir[MAX_PATH];
- PathToAbsoluteT(_T("."), szMirandaDir);
+ PathToAbsoluteT(L".", szMirandaDir);
hIniChangeNotification = FindFirstChangeNotification(szMirandaDir, 0, FILE_NOTIFY_CHANGE_FILE_NAME);
if (hIniChangeNotification != INVALID_HANDLE_VALUE) {
CreateServiceFunction("DB/Ini/CheckImportNow", CheckIniImportNow);
diff --git a/src/mir_app/src/dbutils.cpp b/src/mir_app/src/dbutils.cpp index 093553c5a8..d7a958004f 100644 --- a/src/mir_app/src/dbutils.cpp +++ b/src/mir_app/src/dbutils.cpp @@ -120,21 +120,21 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) CMString nick, text;
if (tszFirst || tszLast) {
- nick.AppendFormat(_T("%s %s"), tszFirst, tszLast);
+ nick.AppendFormat(L"%s %s", tszFirst, tszLast);
nick.Trim();
}
if (tszEmail) {
if (!nick.IsEmpty())
- nick.Append(_T(", "));
+ nick.Append(L", ");
nick.Append(tszEmail);
}
if (uin != 0) {
if (!nick.IsEmpty())
- nick.Append(_T(", "));
- nick.AppendFormat(_T("%d"), uin);
+ nick.Append(L", ");
+ nick.AppendFormat(L"%d", uin);
}
if (!nick.IsEmpty())
- nick = _T("(") + nick + _T(")");
+ nick = L"(" + nick + L")";
if (dbei->eventType == EVENTTYPE_AUTHREQUEST) {
ptrT tszReason(getEventString(dbei, buf));
@@ -154,9 +154,9 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) ptrT tszUin(getEventString(dbei, buf));
ptrT tszNick(getEventString(dbei, buf));
if (tszNick && *tszNick)
- text.AppendFormat(_T("\"%s\" "), tszNick);
+ text.AppendFormat(L"\"%s\" ", tszNick);
if (tszUin && *tszUin)
- text.AppendFormat(_T("<%s>; "), tszUin);
+ text.AppendFormat(L"<%s>; ", tszUin);
}
return (egt->datatype == DBVT_WCHAR) ? (INT_PTR)mir_tstrdup(text) : (INT_PTR)mir_t2a(text);
}
diff --git a/src/mir_app/src/enterstring.cpp b/src/mir_app/src/enterstring.cpp index 1a54815172..09503a08d8 100644 --- a/src/mir_app/src/enterstring.cpp +++ b/src/mir_app/src/enterstring.cpp @@ -63,7 +63,7 @@ static void ComboLoadRecentStrings(HWND hwndDlg, EnterStringFormParam *pForm) }
if (!SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_GETCOUNT, 0, 0))
- SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_ADDSTRING, 0, (LPARAM)_T(""));
+ SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_ADDSTRING, 0, (LPARAM)L"");
}
static void ComboAddRecentString(HWND hwndDlg, EnterStringFormParam *pForm)
@@ -77,7 +77,7 @@ static void ComboAddRecentString(HWND hwndDlg, EnterStringFormParam *pForm) int id;
SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_ADDSTRING, 0, (LPARAM)string);
- if ((id = SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_FINDSTRING, (WPARAM)-1, (LPARAM)_T(""))) != CB_ERR)
+ if ((id = SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_FINDSTRING, (WPARAM)-1, (LPARAM)L"")) != CB_ERR)
SendDlgItemMessage(hwndDlg, pForm->idcControl, CB_DELETESTRING, id, 0);
id = db_get_b(NULL, pForm->szModuleName, pForm->szDataPrefix, 0);
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp index bdaa2d746f..03efd88a84 100644 --- a/src/mir_app/src/extraicons.cpp +++ b/src/mir_app/src/extraicons.cpp @@ -420,7 +420,7 @@ EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterIcolib(const char *name, const ch // Found one, now merge it
if (mir_tstrcmpi(extra->getDescription(), desc)) {
CMString newDesc = extra->getDescription();
- newDesc += _T(" / ");
+ newDesc += L" / ";
newDesc += desc;
extra->setDescription(newDesc.c_str());
}
diff --git a/src/mir_app/src/filter.cpp b/src/mir_app/src/filter.cpp index a51009897b..1470314864 100644 --- a/src/mir_app/src/filter.cpp +++ b/src/mir_app/src/filter.cpp @@ -85,13 +85,13 @@ void AddDialogString(HWND hWndDlg, const PageHash key) TCHAR szClass[64];
GetClassName(hWndDlg, szClass, _countof(szClass));
- if (mir_tstrcmpi(szClass, _T("SysTreeView32")) == 0) {
+ if (mir_tstrcmpi(szClass, L"SysTreeView32") == 0) {
HTREEITEM hItem = TreeView_GetRoot(hWndDlg);
AddTreeViewNodes(hWndDlg, key, hItem);
return;
}
- if (mir_tstrcmpi(szClass, _T("listbox")) == 0) {
+ if (mir_tstrcmpi(szClass, L"listbox") == 0) {
if (GetWindowStyle(hWndDlg) & LBS_HASSTRINGS) {
int count = ListBox_GetCount(hWndDlg);
for (int i=0; i < count; i++) {
@@ -107,7 +107,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) return;
}
- if (mir_tstrcmpi(szClass, _T("SysListView32")) == 0) {
+ if (mir_tstrcmpi(szClass, L"SysListView32") == 0) {
int count = ListView_GetItemCount(hWndDlg);
for (int i=0; i < count; i++) {
title[0] = 0; //safety
@@ -119,7 +119,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) return;
}
- if (mir_tstrcmpi(szClass, _T("combobox")) == 0) {
+ if (mir_tstrcmpi(szClass, L"combobox") == 0) {
if (GetWindowStyle(hWndDlg) & CBS_HASSTRINGS) {
int count = ComboBox_GetCount(hWndDlg);
for (int i=0; i < count; i++) {
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index 582dd53c2a..0cad9fcd93 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -354,7 +354,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP int partWidth[3]; partWidth[0] = textSize.cx; - GetTextExtentPoint32(hdc, _T("01234567890123456789"), 20, &textSize); + GetTextExtentPoint32(hdc, L"01234567890123456789", 20, &textSize); partWidth[0] += textSize.cx; ReleaseDC(GetDlgItem(hwndDlg, IDC_STATUSBAR), hdc); partWidth[1] = partWidth[0] + 150; diff --git a/src/mir_app/src/headerbar.cpp b/src/mir_app/src/headerbar.cpp index f372781bf6..1230ca922f 100644 --- a/src/mir_app/src/headerbar.cpp +++ b/src/mir_app/src/headerbar.cpp @@ -72,7 +72,7 @@ int LoadHeaderbarModule() {
WNDCLASSEX wc = { 0 };
wc.cbSize = sizeof(wc);
- wc.lpszClassName = _T("MHeaderbarCtrl");
+ wc.lpszClassName = L"MHeaderbarCtrl";
wc.lpfnWndProc = MHeaderbarWndProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.cbWndExtra = sizeof(MHeaderbarCtrl*);
diff --git a/src/mir_app/src/hotkey_opts.cpp b/src/mir_app/src/hotkey_opts.cpp index 1db90d6693..cec2a06d5f 100644 --- a/src/mir_app/src/hotkey_opts.cpp +++ b/src/mir_app/src/hotkey_opts.cpp @@ -43,7 +43,7 @@ static TCHAR* sttHokeyVkToName(WORD vkKey) case VK_NUMLOCK: case VK_CAPITAL: case VK_SCROLL: - return _T(""); + return L""; case VK_BROWSER_BACK: return TranslateT("Browser: Back"); case VK_BROWSER_FORWARD: @@ -101,11 +101,11 @@ static TCHAR* sttHokeyVkToName(WORD vkKey) void HotkeyToName(TCHAR *buf, int size, BYTE shift, BYTE key) { - mir_sntprintf(buf, size, _T("%s%s%s%s%s"), - (shift & HOTKEYF_CONTROL) ? TranslateT("Ctrl + ") : _T(""), - (shift & HOTKEYF_ALT) ? TranslateT("Alt + ") : _T(""), - (shift & HOTKEYF_SHIFT) ? TranslateT("Shift + ") : _T(""), - (shift & HOTKEYF_EXT) ? TranslateT("Win + ") : _T(""), + mir_sntprintf(buf, size, L"%s%s%s%s%s", + (shift & HOTKEYF_CONTROL) ? TranslateT("Ctrl + ") : L"", + (shift & HOTKEYF_ALT) ? TranslateT("Alt + ") : L"", + (shift & HOTKEYF_SHIFT) ? TranslateT("Shift + ") : L"", + (shift & HOTKEYF_EXT) ? TranslateT("Win + ") : L"", sttHokeyVkToName(key)); } diff --git a/src/mir_app/src/hotkeys.cpp b/src/mir_app/src/hotkeys.cpp index 2dfaaed5fe..6d3946840d 100644 --- a/src/mir_app/src/hotkeys.cpp +++ b/src/mir_app/src/hotkeys.cpp @@ -357,13 +357,13 @@ int LoadSkinHotkeys(void) wcl.hCursor = LoadCursor(NULL, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = _T("MirandaHotkeyHostWnd");
+ wcl.lpszClassName = L"MirandaHotkeyHostWnd";
wcl.hIconSm = NULL;
RegisterClassEx(&wcl);
g_pid = GetCurrentProcessId();
- g_hwndHotkeyHost = CreateWindow(_T("MirandaHotkeyHostWnd"), NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInst, NULL);
+ g_hwndHotkeyHost = CreateWindow(L"MirandaHotkeyHostWnd", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, g_hInst, NULL);
SetWindowPos(g_hwndHotkeyHost, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW);
hhkKeyboard = SetWindowsHookEx(WH_KEYBOARD, sttKeyboardProc, NULL, hMainThreadId);
diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index d25898780f..ec21467e84 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -352,7 +352,7 @@ IconSourceItem* GetIconSourceItemFromPath(const TCHAR *path, int cxIcon, int cyI IconSourceItem* CreateStaticIconSourceItem(int cxIcon, int cyIcon)
{
TCHAR tszName[100];
- mir_sntprintf(tszName, _T("*StaticIcon_%d"), iStaticCount++);
+ mir_sntprintf(tszName, L"*StaticIcon_%d", iStaticCount++);
IconSourceItemKey key = { IconSourceFile_Get(tszName, false), 0, cxIcon, cyIcon };
IconSourceItem *newItem = new IconSourceItem(key);
diff --git a/src/mir_app/src/keyboard.cpp b/src/mir_app/src/keyboard.cpp index 83c1d00ec2..576e239747 100644 --- a/src/mir_app/src/keyboard.cpp +++ b/src/mir_app/src/keyboard.cpp @@ -56,35 +56,35 @@ int InitClistHotKeys(void) shk.dwFlags = HKD_TCHAR;
shk.ptszDescription = LPGENT("Show/Hide contact list");
shk.pszName = "ShowHide";
- shk.ptszSection = _T("Main");
+ shk.ptszSection = L"Main";
shk.pszService = "CLIST/HK/SHOWHIDE";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'A');
Hotkey_Register(&shk);
shk.ptszDescription = LPGENT("Read message");
shk.pszName = "ReadMessage";
- shk.ptszSection = _T("Main");
+ shk.ptszSection = L"Main";
shk.pszService = "CLIST/HK/Read";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'I');
Hotkey_Register(&shk);
shk.ptszDescription = LPGENT("Open Options page");
shk.pszName = "ShowOptions";
- shk.ptszSection = _T("Main");
+ shk.ptszSection = L"Main";
shk.pszService = "CLIST/HK/Opts";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'O') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&shk);
shk.ptszDescription = LPGENT("Open logging options");
shk.pszName = "ShowLogOptions";
- shk.ptszSection = _T("Main");
+ shk.ptszSection = L"Main";
shk.pszService = "Netlib/Log/Win";
shk.DefHotKey = 0;
Hotkey_Register(&shk);
shk.ptszDescription = LPGENT("Open 'Find user' dialog");
shk.pszName = "FindUsers";
- shk.ptszSection = _T("Main");
+ shk.ptszSection = L"Main";
shk.pszService = "FindAdd/FindAddCommand";
shk.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL|HOTKEYF_SHIFT, 'F') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&shk);
diff --git a/src/mir_app/src/langpack.cpp b/src/mir_app/src/langpack.cpp index dec933cbe4..c418707a34 100644 --- a/src/mir_app/src/langpack.cpp +++ b/src/mir_app/src/langpack.cpp @@ -37,7 +37,7 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam) ptrT langpack(db_get_tsa(NULL, "Langpack", "Current"));
TCHAR tszFullPath[MAX_PATH];
- PathToAbsoluteT(_T("\\Languages\\langpack_*.txt"), tszFullPath);
+ PathToAbsoluteT(L"\\Languages\\langpack_*.txt", tszFullPath);
BOOL fPackFound = FALSE;
WIN32_FIND_DATA wfd;
@@ -46,7 +46,7 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam) do {
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue;
/* get data */
- PathToAbsoluteT(_T("\\Languages\\"), tszFullPath);
+ PathToAbsoluteT(L"\\Languages\\", tszFullPath);
mir_tstrcat(tszFullPath, wfd.cFileName);
LANGPACK_INFO pack;
@@ -69,14 +69,14 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam) if (callback != NULL) {
LANGPACK_INFO pack;
pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
- mir_tstrcpy(pack.tszLanguage, _T("English"));
+ mir_tstrcpy(pack.tszLanguage, L"English");
pack.szAuthors = "Miranda NG Development Team";
pack.szAuthorEmail = "project-info@miranda-ng.org";
DWORD v = CallService(MS_SYSTEM_GETVERSION, 0, 0);
pack.szLastModifiedUsing.Format("%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
/* file date */
if (GetModuleFileName(NULL, pack.tszFullPath, _countof(pack.tszFullPath))) {
- mir_tstrcpy(pack.tszFileName, _T("default"));
+ mir_tstrcpy(pack.tszFileName, L"default");
HANDLE hFile = CreateFile(pack.tszFileName, 0, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
if (hFile != INVALID_HANDLE_VALUE) {
GetFileTime(hFile, NULL, NULL, &pack.ftFileDate);
diff --git a/src/mir_app/src/lpopts.cpp b/src/mir_app/src/lpopts.cpp index 2d2091e078..d34dc23152 100644 --- a/src/mir_app/src/lpopts.cpp +++ b/src/mir_app/src/lpopts.cpp @@ -43,12 +43,12 @@ static void DisplayPackInfo(HWND hwndDlg, const LANGPACK_INFO *pack) /* add some note if its incompatible */
if (szLanguageName[0] && szContryName[0]) {
- mir_sntprintf(szLocaleName, _T("%s (%s)"), TranslateTS(szLanguageName), TranslateTS(szContryName));
+ mir_sntprintf(szLocaleName, L"%s (%s)", TranslateTS(szLanguageName), TranslateTS(szContryName));
if (!IsValidLocale(pack->Locale, LCID_INSTALLED)) {
TCHAR *pszIncompat;
pszIncompat = TranslateT("(incompatible)");
szLocaleName[_countof(szLocaleName) - mir_tstrlen(pszIncompat) - 1] = 0;
- mir_tstrcat(mir_tstrcat(szLocaleName, _T(" ")), pszIncompat);
+ mir_tstrcat(mir_tstrcat(szLocaleName, L" "), pszIncompat);
}
SetDlgItemText(hwndDlg, IDC_LANGLOCALE, szLocaleName);
}
@@ -77,7 +77,7 @@ static BOOL InsertPackItemEnumProc(LANGPACK_INFO *pack, WPARAM wParam, LPARAM) /* insert */
TCHAR tszName[512];
- mir_sntprintf(tszName, _T("%s [%s]"),
+ mir_sntprintf(tszName, L"%s [%s]",
TranslateTS(pack->tszLanguage),
pack->flags & LPF_DEFAULT ? TranslateT("built-in") : pack->tszFileName);
UINT message = pack->flags & LPF_DEFAULT ? CB_INSERTSTRING : CB_ADDSTRING;
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 0661fbcd48..cfd1447b66 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -928,7 +928,7 @@ void RebuildMenuOrder(void) TCHAR buf[256], hotkeyName[100];
WORD hotKey = GetHotkeyValue(statusHotkeys[j]);
HotkeyToName(hotkeyName, _countof(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey));
- mir_sntprintf(buf, _T("%s\t%s"), cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
+ mir_sntprintf(buf, L"%s\t%s", cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
mi.name.t = buf;
hStatusMainMenuHandles[j] = Menu_AddItem(hStatusMenuObject, &mi, smep);
@@ -958,7 +958,7 @@ static int sttRebuildHotkeys(WPARAM, LPARAM) TCHAR buf[256], hotkeyName[100];
WORD hotKey = GetHotkeyValue(statusHotkeys[j]);
HotkeyToName(hotkeyName, _countof(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey));
- mir_sntprintf(buf, _T("%s\t%s"), cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
+ mir_sntprintf(buf, L"%s\t%s", cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
Menu_ModifyItem(hStatusMainMenuHandles[j], buf);
hStatusMainMenuHandles[j]->hotKey = MAKELONG(HIBYTE(hotKey), LOBYTE(hotKey));
@@ -1145,7 +1145,7 @@ void InitCustomMenus(void) CreateServiceFunction(MS_CLIST_HKSTATUS, HotkeySetStatus);
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.ptszSection = _T("Status");
+ hkd.ptszSection = L"Status";
hkd.dwFlags = HKD_TCHAR;
for (int i = 0; i < _countof(statusHotkeys); i++) {
char szName[30];
diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp index f5348f8b43..6245ae2a13 100644 --- a/src/mir_app/src/menu_options.cpp +++ b/src/mir_app/src/menu_options.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "genmenu.h" #include "plugins.h" -#define STR_SEPARATOR _T("-----------------------------------") +#define STR_SEPARATOR L"-----------------------------------" extern bool bIconsDisabled; extern int DefaultImageListColorDepth; @@ -94,9 +94,9 @@ class CGenMenuOptionsPage : public CDlgBase if (iod->name != NULL && iod->defname != NULL && mir_tstrcmp(iod->name, iod->defname) != 0) ptszCustomName = iod->name; else - ptszCustomName = _T(""); + ptszCustomName = L""; - CMString tszValue(FORMAT, _T("%d;%d;%S;%s"), visible, runtimepos, pszParent, ptszCustomName); + CMString tszValue(FORMAT, L"%d;%d;%S;%s", visible, runtimepos, pszParent, ptszCustomName); db_set_ts(NULL, szModule, menuItemName, tszValue); if (pimi->mi.flags & CMIF_CUSTOM) diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index e2bb5df76a..b03cec352a 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -898,7 +898,7 @@ static int sttDumpItem(TMO_IntMenuItem *pmi, void *szModule) bin2hex(&pmi->mi.uid, sizeof(pmi->mi.uid), menuItemName);
int bVisible = (pmi->mi.flags & CMIF_HIDDEN) == 0;
- const TCHAR *ptszName = (pmi->ptszCustomName != NULL) ? pmi->ptszCustomName : _T("");
+ const TCHAR *ptszName = (pmi->ptszCustomName != NULL) ? pmi->ptszCustomName : L"";
char szRootUid[33];
if (pmi->mi.root == NULL)
@@ -906,7 +906,7 @@ static int sttDumpItem(TMO_IntMenuItem *pmi, void *szModule) else
bin2hex(&pmi->mi.root->mi.uid, sizeof(MUUID), szRootUid);
- CMString szNewValue(FORMAT, _T("%d;%d;%S;%s"), bVisible, pmi->mi.position, szRootUid, ptszName);
+ CMString szNewValue(FORMAT, L"%d;%d;%S;%s", bVisible, pmi->mi.position, szRootUid, ptszName);
db_set_ts(NULL, (char*)szModule, menuItemName, szNewValue);
Netlib_Logf(NULL, "MENU[%s] => %s, %d, %d", menuItemName, pmi->pszUniqName, bVisible, pmi->mi.position);
@@ -1128,7 +1128,7 @@ static HMENU BuildRecursiveMenu(HMENU hMenu, TMO_IntMenuItem *pRootMenu, WPARAM #ifdef PUTPOSITIONSONMENU
if (GetKeyState(VK_CONTROL) & 0x8000) {
TCHAR str[256];
- mir_sntprintf(str, _T("%s (%d, id %x)"), mi->name.a, mi->position, mii.dwItemData);
+ mir_sntprintf(str, L"%s (%d, id %x)", mi->name.a, mi->position, mii.dwItemData);
mii.dwTypeData = str;
}
#endif
@@ -1142,7 +1142,7 @@ static HMENU BuildRecursiveMenu(HMENU hMenu, TMO_IntMenuItem *pRootMenu, WPARAM #ifdef PUTPOSITIONSONMENU
if (GetKeyState(VK_CONTROL) & 0x8000) {
TCHAR str[256];
- mir_sntprintf(str, _T("%s (%d, id %x)"), mi->name.a, mi->position, mii.dwItemData);
+ mir_sntprintf(str, L"%s (%d, id %x)", mi->name.a, mi->position, mii.dwItemData);
mii.dwTypeData = str;
}
#endif
@@ -1221,7 +1221,7 @@ static int MO_RegisterIcon(TMO_IntMenuItem *pmi, void*) HICON hIcon = ImageList_GetIcon(pmi->parent->m_hMenuIcons, pmi->iconId, 0);
TCHAR sectionName[256];
- mir_sntprintf(sectionName, LPGENT("Menu icons") _T("/%s"), TranslateTS(pmi->parent->ptszDisplayName));
+ mir_sntprintf(sectionName, LPGENT("Menu icons") L"/%s", TranslateTS(pmi->parent->ptszDisplayName));
char iconame[256], uname[100];
bin2hex(&pmi->mi.uid, sizeof(pmi->mi.uid), uname);
diff --git a/src/mir_app/src/meta_edit.cpp b/src/mir_app/src/meta_edit.cpp index 87dc0aa609..376c431a73 100644 --- a/src/mir_app/src/meta_edit.cpp +++ b/src/mir_app/src/meta_edit.cpp @@ -167,7 +167,7 @@ static void ApplyChanges() PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = g_data.hMeta;
ai.format = PA_FORMAT_UNKNOWN;
- _tcsncpy_s(ai.filename, _T("X"), _TRUNCATE);
+ _tcsncpy_s(ai.filename, L"X", _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&ai) == GAIR_SUCCESS)
db_set_ts(g_data.hMeta, "ContactPhoto", "File", ai.filename);
}
@@ -370,7 +370,7 @@ static INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wPara }
else {
g_data.hDefaultContact = 0;
- SetDlgItemText(hwndDlg, IDC_ED_DEFAULT, _T("None"));
+ SetDlgItemText(hwndDlg, IDC_ED_DEFAULT, L"None");
}
}
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp index b2ded22f38..54f41af521 100644 --- a/src/mir_app/src/meta_menu.cpp +++ b/src/mir_app/src/meta_menu.cpp @@ -164,7 +164,7 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = ccMeta->contactID;
ai.format = PA_FORMAT_UNKNOWN;
- _tcsncpy_s(ai.filename, _T("X"), _TRUNCATE);
+ _tcsncpy_s(ai.filename, L"X", _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&ai) == GAIR_SUCCESS)
db_set_ts(ccMeta->contactID, "ContactPhoto", "File", ai.filename);
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index a4c9d1988b..4961d73f12 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -446,7 +446,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = ccMeta->contactID;
ai.format = PA_FORMAT_UNKNOWN;
- _tcsncpy_s(ai.filename, _T("X"), _TRUNCATE);
+ _tcsncpy_s(ai.filename, L"X", _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&ai) == GAIR_SUCCESS)
db_set_ts(ccMeta->contactID, "ContactPhoto", "File", ai.filename);
}
@@ -612,7 +612,7 @@ static int Meta_SrmmIconClicked(WPARAM hMeta, LPARAM lParam) tszNick = cli.pfnGetContactDisplayName(cc->pSubs[i], 0);
else
Meta_GetSubNick(hMeta, i, tszNick);
- tszNick.AppendFormat(_T(" [%s]"), pa->tszAccountName);
+ tszNick.AppendFormat(L" [%s]", pa->tszAccountName);
mii.wID = i + 1;
mii.fState = (i == iDefault) ? MFS_CHECKED : MFS_ENABLED;
@@ -796,7 +796,7 @@ INT_PTR Meta_GetInfo(WPARAM, LPARAM lParam) PROTO_AVATAR_INFORMATION ai;
ai.hContact = ccs->hContact;
ai.format = PA_FORMAT_UNKNOWN;
- _tcsncpy_s(ai.filename, _T("X"), _TRUNCATE);
+ _tcsncpy_s(ai.filename, L"X", _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&ai) == GAIR_SUCCESS)
db_set_ts(ccs->hContact, "ContactPhoto", "File", ai.filename);
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp index a8499971a4..99e307af66 100644 --- a/src/mir_app/src/meta_utils.cpp +++ b/src/mir_app/src/meta_utils.cpp @@ -170,7 +170,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default) PROTO_AVATAR_INFORMATION ai;
ai.hContact = hMeta;
ai.format = PA_FORMAT_UNKNOWN;
- _tcsncpy_s(ai.filename, _T("X"), _TRUNCATE);
+ _tcsncpy_s(ai.filename, L"X", _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&ai) == GAIR_SUCCESS)
db_set_ts(hMeta, "ContactPhoto", "File", ai.filename);
@@ -512,13 +512,13 @@ void Meta_GetSubNick(MCONTACT hMeta, int i, CMString &tszDest) tszDest = dbv.pszVal;
break;
case DBVT_BYTE:
- tszDest.Format(_T("%d"), dbv.bVal);
+ tszDest.Format(L"%d", dbv.bVal);
break;
case DBVT_WORD:
- tszDest.Format(_T("%d"), dbv.wVal);
+ tszDest.Format(L"%d", dbv.wVal);
break;
case DBVT_DWORD:
- tszDest.Format(_T("%d"), dbv.dVal);
+ tszDest.Format(L"%d", dbv.dVal);
break;
default:
tszDest.Empty();
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index 1dd8ccc0a6..12886122d8 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -177,7 +177,7 @@ static INT_PTR CALLBACK WaitForProcessDlgProc(HWND hwnd, UINT msg, WPARAM wParam INT_PTR CheckRestart()
{
- LPCTSTR tszPID = CmdLine_GetOption(_T("restart"));
+ LPCTSTR tszPID = CmdLine_GetOption(L"restart");
if (tszPID) {
HANDLE hProcess = OpenProcess(SYNCHRONIZE, FALSE, _ttol(tszPID));
if (hProcess) {
@@ -205,18 +205,18 @@ int WINAPI mir_main(LPTSTR cmdLine) setlocale(LC_ALL, "");
#ifdef _DEBUG
- if (CmdLine_GetOption(_T("memdebug")))
+ if (CmdLine_GetOption(L"memdebug"))
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
HMODULE hDwmApi, hThemeAPI;
if (IsWinVerVistaPlus()) {
- hDwmApi = LoadLibrary(_T("dwmapi.dll"));
+ hDwmApi = LoadLibrary(L"dwmapi.dll");
if (hDwmApi) {
dwmExtendFrameIntoClientArea = (pfnDwmExtendFrameIntoClientArea)GetProcAddress(hDwmApi, "DwmExtendFrameIntoClientArea");
dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi, "DwmIsCompositionEnabled");
}
- hThemeAPI = LoadLibrary(_T("uxtheme.dll"));
+ hThemeAPI = LoadLibrary(L"uxtheme.dll");
if (hThemeAPI) {
drawThemeTextEx = (pfnDrawThemeTextEx)GetProcAddress(hThemeAPI, "DrawThemeTextEx");
setWindowThemeAttribute = (pfnSetWindowThemeAttribute)GetProcAddress(hThemeAPI, "SetWindowThemeAttribute");
@@ -333,7 +333,7 @@ static INT_PTR GetMirandaVersion(WPARAM, LPARAM) UINT blockSize;
VS_FIXEDFILEINFO *vsffi;
- VerQueryValue(pVerInfo, _T("\\"), (PVOID*)&vsffi, &blockSize);
+ VerQueryValue(pVerInfo, L"\\", (PVOID*)&vsffi, &blockSize);
DWORD ver = (((vsffi->dwProductVersionMS >> 16) & 0xFF) << 24) |
((vsffi->dwProductVersionMS & 0xFF) << 16) |
(((vsffi->dwProductVersionLS >> 16) & 0xFF) << 8) |
@@ -352,7 +352,7 @@ static INT_PTR GetMirandaFileVersion(WPARAM, LPARAM lParam) UINT blockSize;
VS_FIXEDFILEINFO *vsffi;
- VerQueryValue(pVerInfo, _T("\\"), (PVOID*)&vsffi, &blockSize);
+ VerQueryValue(pVerInfo, L"\\", (PVOID*)&vsffi, &blockSize);
WORD* p = (WORD*)lParam;
p[0] = HIWORD(vsffi->dwProductVersionMS);
@@ -372,7 +372,7 @@ static INT_PTR GetMirandaVersionText(WPARAM wParam, LPARAM lParam) GetFileVersionInfo(filename, 0, verInfoSize, pVerInfo);
UINT blockSize;
- VerQueryValue(pVerInfo, _T("\\StringFileInfo\\000004b0\\ProductVersion"), (LPVOID*)&productVersion, &blockSize);
+ VerQueryValue(pVerInfo, L"\\StringFileInfo\\000004b0\\ProductVersion", (LPVOID*)&productVersion, &blockSize);
strncpy((char*)lParam, _T2A(productVersion), wParam);
#if defined(_WIN64)
strcat_s((char*)lParam, wParam, " x64");
diff --git a/src/mir_app/src/netlibhttp.cpp b/src/mir_app/src/netlibhttp.cpp index cb811f339c..e641c08209 100644 --- a/src/mir_app/src/netlibhttp.cpp +++ b/src/mir_app/src/netlibhttp.cpp @@ -267,7 +267,7 @@ struct HttpSecurityContext szAuthHdr = NtlmCreateResponseFromChallenge(m_hNtlmSecurity, szChallenge, szLogin, szPassw, true, complete);
if (!szAuthHdr)
- NetlibLogf(NULL, "Security login %s failed, user: %S pssw: %S", szProvider, szLogin ? szLogin.get() : _T("(no user)"), szPassw ? _T("(exist)") : _T("(no psw)"));
+ NetlibLogf(NULL, "Security login %s failed, user: %S pssw: %S", szProvider, szLogin ? szLogin.get() : L"(no user)", szPassw ? L"(exist)" : L"(no psw)");
else if (justCreated)
proxyAuthList.add(m_szHost, m_szProvider);
}
diff --git a/src/mir_app/src/netliblog.cpp b/src/mir_app/src/netliblog.cpp index 9957a631c4..b65e7f1d0a 100644 --- a/src/mir_app/src/netliblog.cpp +++ b/src/mir_app/src/netliblog.cpp @@ -73,7 +73,7 @@ static void InitLog() logOptions.tszFile = path;
}
else {
- db_set_ts(NULL, "Netlib", "File", logOptions.tszUserFile = _T("%miranda_logpath%\\netlog.txt"));
+ db_set_ts(NULL, "Netlib", "File", logOptions.tszUserFile = L"%miranda_logpath%\\netlog.txt");
logOptions.tszFile = Utils_ReplaceVarsT(logOptions.tszUserFile);
}
@@ -160,7 +160,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa GetWindowText(GetWindow((HWND)lParam, GW_HWNDPREV), str, _countof(str));
{
TCHAR filter[200];
- mir_sntprintf(filter, _T("%s (*)%c*%c"), TranslateT("All files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*)%c*%c", TranslateT("All files"), 0, 0);
OPENFILENAME ofn = { 0 };
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
@@ -185,7 +185,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa if (LOWORD(wParam) == IDC_RUNATSTARTBROWSE && _tcschr(str, ' ') != NULL) {
memmove(str + 1, str, ((_countof(str) - 2) * sizeof(TCHAR)));
str[0] = '"';
- mir_tstrcat(str, _T("\""));
+ mir_tstrcat(str, L"\"");
}
SetWindowText(GetWindow((HWND)lParam, GW_HWNDPREV), str);
}
diff --git a/src/mir_app/src/netlibopts.cpp b/src/mir_app/src/netlibopts.cpp index d02b4c5794..1423761260 100644 --- a/src/mir_app/src/netlibopts.cpp +++ b/src/mir_app/src/netlibopts.cpp @@ -67,7 +67,7 @@ static const UINT specifyPortsControls[] = { IDC_PORTSRANGE,
IDC_STATIC52};
-static const TCHAR* szProxyTypes[] = {LPGENT("<mixed>"), _T("SOCKS4"), _T("SOCKS5"), _T("HTTP"), _T("HTTPS"), _T("Internet Explorer")};
+static const TCHAR* szProxyTypes[] = {LPGENT("<mixed>"), L"SOCKS4", L"SOCKS5", L"HTTP", L"HTTPS", L"Internet Explorer"};
static const WORD oftenProxyPorts[] = {1080, 1080, 1080, 8080, 8080, 8080};
#define M_REFRESHALL (WM_USER+100)
diff --git a/src/mir_app/src/netlibsecurity.cpp b/src/mir_app/src/netlibsecurity.cpp index 827c52bb5b..24d095ec00 100644 --- a/src/mir_app/src/netlibsecurity.cpp +++ b/src/mir_app/src/netlibsecurity.cpp @@ -77,7 +77,7 @@ HANDLE NetlibInitSecurityProvider(const TCHAR* szProvider, const TCHAR* szPrinci {
HANDLE hSecurity = NULL;
- if (mir_tstrcmpi(szProvider, _T("Basic")) == 0) {
+ if (mir_tstrcmpi(szProvider, L"Basic") == 0) {
NtlmHandleType* hNtlm = (NtlmHandleType*)mir_calloc(sizeof(NtlmHandleType));
hNtlm->szProvider = mir_tstrdup(szProvider);
SecInvalidateHandle(&hNtlm->hClientContext);
@@ -90,8 +90,8 @@ HANDLE NetlibInitSecurityProvider(const TCHAR* szProvider, const TCHAR* szPrinci mir_cslock lck(csSec);
PSecPkgInfo ntlmSecurityPackageInfo;
- bool isGSSAPI = mir_tstrcmpi(szProvider, _T("GSSAPI")) == 0;
- const TCHAR *szProviderC = isGSSAPI ? _T("Kerberos") : szProvider;
+ bool isGSSAPI = mir_tstrcmpi(szProvider, L"GSSAPI") == 0;
+ const TCHAR *szProviderC = isGSSAPI ? L"Kerberos" : szProvider;
SECURITY_STATUS sc = QuerySecurityPackageInfo((LPTSTR)szProviderC, &ntlmSecurityPackageInfo);
if (sc == SEC_E_OK) {
NtlmHandleType* hNtlm;
@@ -101,7 +101,7 @@ HANDLE NetlibInitSecurityProvider(const TCHAR* szProvider, const TCHAR* szPrinci FreeContextBuffer(ntlmSecurityPackageInfo);
hNtlm->szProvider = mir_tstrdup(szProvider);
- hNtlm->szPrincipal = mir_tstrdup(szPrincipal ? szPrincipal : _T(""));
+ hNtlm->szPrincipal = mir_tstrdup(szPrincipal ? szPrincipal : L"");
SecInvalidateHandle(&hNtlm->hClientContext);
SecInvalidateHandle(&hNtlm->hClientCredential);
ntlmCnt++;
@@ -213,9 +213,9 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge, char *szOutputToken;
NtlmHandleType* hNtlm = (NtlmHandleType*)hSecurity;
- if (mir_tstrcmpi(hNtlm->szProvider, _T("Basic"))) {
- bool isGSSAPI = mir_tstrcmpi(hNtlm->szProvider, _T("GSSAPI")) == 0;
- TCHAR *szProvider = isGSSAPI ? (TCHAR*)_T("Kerberos") : hNtlm->szProvider;
+ if (mir_tstrcmpi(hNtlm->szProvider, L"Basic")) {
+ bool isGSSAPI = mir_tstrcmpi(hNtlm->szProvider, L"GSSAPI") == 0;
+ TCHAR *szProvider = isGSSAPI ? (TCHAR*)L"Kerberos" : hNtlm->szProvider;
bool hasChallenge = szChallenge != NULL && szChallenge[0] != '\0';
if (hasChallenge) {
unsigned tokenLen;
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index e6a9f23a5e..6b187cc73f 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -127,19 +127,19 @@ static bool isPluginBanned(const MUUID& u1) static MuuidReplacement pluginDefault[] =
{
- { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0
- { MIID_SREMAIL, _T("stdemail"), NULL }, // 1
- { MIID_SRAUTH, _T("stdauth"), NULL }, // 2
- { MIID_SRFILE, _T("stdfile"), NULL }, // 3
- { MIID_UIHELP, _T("stdhelp"), NULL }, // 4
- { MIID_UIHISTORY, _T("stduihist"), NULL }, // 5
- { MIID_IDLE, _T("stdidle"), NULL }, // 6
- { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 7
- { MIID_USERONLINE, _T("stduseronline"), NULL }, // 8
- { MIID_SRAWAY, _T("stdaway"), NULL }, // 9
- { MIID_CLIST, _T("stdclist"), NULL }, // 10
- { MIID_CHAT, _T("stdchat"), NULL }, // 11
- { MIID_SRMM, _T("stdmsg"), NULL } // 12
+ { MIID_UIUSERINFO, L"stduserinfo", NULL }, // 0
+ { MIID_SREMAIL, L"stdemail", NULL }, // 1
+ { MIID_SRAUTH, L"stdauth", NULL }, // 2
+ { MIID_SRFILE, L"stdfile", NULL }, // 3
+ { MIID_UIHELP, L"stdhelp", NULL }, // 4
+ { MIID_UIHISTORY, L"stduihist", NULL }, // 5
+ { MIID_IDLE, L"stdidle", NULL }, // 6
+ { MIID_AUTOAWAY, L"stdautoaway", NULL }, // 7
+ { MIID_USERONLINE, L"stduseronline", NULL }, // 8
+ { MIID_SRAWAY, L"stdaway", NULL }, // 9
+ { MIID_CLIST, L"stdclist", NULL }, // 10
+ { MIID_CHAT, L"stdchat", NULL }, // 11
+ { MIID_SRMM, L"stdmsg", NULL } // 12
};
int getDefaultPluginIdx(const MUUID &muuid)
@@ -162,7 +162,7 @@ int LoadStdPlugins() }
if (pluginDefault[12].pImpl == NULL)
- MessageBox(NULL, TranslateT("No messaging plugins loaded. Please install/enable one of the messaging plugins, for instance, \"StdMsg.dll\""), _T("Miranda NG"), MB_OK | MB_ICONWARNING);
+ MessageBox(NULL, TranslateT("No messaging plugins loaded. Please install/enable one of the messaging plugins, for instance, \"StdMsg.dll\""), L"Miranda NG", MB_OK | MB_ICONWARNING);
return 0;
}
@@ -373,7 +373,7 @@ int Plugin_UnloadDyn(pluginEntry *p) static int valid_library_name(TCHAR *name)
{
TCHAR *dot = _tcsrchr(name, '.');
- if (dot != NULL && mir_tstrcmpi(dot + 1, _T("dll")) == 0)
+ if (dot != NULL && mir_tstrcmpi(dot + 1, L"dll") == 0)
if (dot[4] == 0)
return 1;
@@ -389,7 +389,7 @@ void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam) // create the search filter
TCHAR search[MAX_PATH];
- mir_sntprintf(search, _T("%s\\Plugins\\*.dll"), exe);
+ mir_sntprintf(search, L"%s\\Plugins\\*.dll", exe);
// FFFN will return filenames for things like dot dll+ or dot dllx
WIN32_FIND_DATA ffd;
@@ -413,7 +413,7 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) pluginList.insert(p);
TCHAR tszFullPath[MAX_PATH];
- mir_sntprintf(tszFullPath, _T("%s\\%s\\%s"), path, dir, tszFileName);
+ mir_sntprintf(tszFullPath, L"%s\\%s\\%s", path, dir, tszFileName);
// map dll into the memory and check its exports
bool bIsPlugin = false;
@@ -506,7 +506,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) if (!(p->pclass & PCLASS_BASICAPI)) {
BASIC_PLUGIN_INFO bpi;
- mir_sntprintf(tszFullPath, _T("%s\\%s\\%s"), exe, (p->pclass & PCLASS_CORE) ? _T("Core") : _T("Plugins"), p->pluginname);
+ mir_sntprintf(tszFullPath, L"%s\\%s\\%s", exe, (p->pclass & PCLASS_CORE) ? L"Core" : L"Plugins", p->pluginname);
if (!checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) {
p->pclass |= PCLASS_FAILED;
return false;
@@ -565,8 +565,8 @@ bool LoadCorePlugin(MuuidReplacement &mr) GetModuleFileName(NULL, exe, _countof(exe));
TCHAR *p = _tcsrchr(exe, '\\'); if (p) *p = 0;
- mir_sntprintf(tszPlugName, _T("%s.dll"), mr.stdplugname);
- pluginEntry* pPlug = OpenPlugin(tszPlugName, _T("Core"), exe);
+ mir_sntprintf(tszPlugName, L"%s.dll", mr.stdplugname);
+ pluginEntry* pPlug = OpenPlugin(tszPlugName, L"Core", exe);
if (pPlug->pclass & PCLASS_FAILED) {
LBL_Error:
MessageBox(NULL, CMString(FORMAT, TranslateTS(tszCoreErr), mr.stdplugname), TranslateT("Fatal error"), MB_OK | MB_ICONSTOP);
@@ -623,14 +623,14 @@ static pluginEntry* getCListModule(TCHAR *exe) if (!isPluginOnWhiteList(p->pluginname))
continue;
- mir_sntprintf(tszFullPath, _T("%s\\Plugins\\%s"), exe, p->pluginname);
+ mir_sntprintf(tszFullPath, L"%s\\Plugins\\%s", exe, p->pluginname);
if (loadClistModule(tszFullPath, p))
return p;
}
MuuidReplacement& stdClist = pluginDefault[10];
if (LoadCorePlugin(stdClist)) {
- mir_sntprintf(tszFullPath, _T("%s\\Core\\%s.dll"), exe, stdClist.stdplugname);
+ mir_sntprintf(tszFullPath, L"%s\\Core\\%s.dll", exe, stdClist.stdplugname);
if (loadClistModule(tszFullPath, stdClist.pImpl))
return stdClist.pImpl;
}
@@ -682,7 +682,7 @@ static int LaunchServicePlugin(pluginEntry *p) int LoadDefaultServiceModePlugin()
{
- LPCTSTR param = CmdLine_GetOption(_T("svc"));
+ LPCTSTR param = CmdLine_GetOption(L"svc");
if (param == NULL || *param == 0)
return SERVICE_CONTINUE;
@@ -709,7 +709,7 @@ void EnsureCheckerLoaded(bool bEnable) {
for (int i = 0; i < pluginList.getCount(); i++) {
pluginEntry *p = pluginList[i];
- if (mir_tstrcmpi(p->pluginname, _T("dbchecker.dll")))
+ if (mir_tstrcmpi(p->pluginname, L"dbchecker.dll"))
continue;
if (bEnable) {
@@ -744,7 +744,7 @@ int LoadSslModule(void) }
if (!bExtSSLLoaded)
{
- MuuidReplacement stdSsl = { MIID_SSL, _T("stdssl"), NULL };
+ MuuidReplacement stdSsl = { MIID_SSL, L"stdssl", NULL };
if (!LoadCorePlugin(stdSsl))
return 1;
}
@@ -779,7 +779,7 @@ int LoadNewPluginsModule(void) *slice = 0;
// remember some useful options
- askAboutIgnoredPlugins = (UINT)GetPrivateProfileInt(_T("PluginLoader"), _T("AskAboutIgnoredPlugins"), 0, mirandabootini);
+ askAboutIgnoredPlugins = (UINT)GetPrivateProfileInt(L"PluginLoader", L"AskAboutIgnoredPlugins", 0, mirandabootini);
// if Crash Dumper is present, load it to provide Crash Reports
if (plugin_crshdmp != NULL && isPluginOnWhiteList(plugin_crshdmp->pluginname))
@@ -789,7 +789,7 @@ int LoadNewPluginsModule(void) // if freeimage is present, load it to provide the basic core functions
if (plugin_freeimg != NULL) {
BASIC_PLUGIN_INFO bpi;
- mir_sntprintf(fullPath, _T("%s\\Plugins\\%s"), exe, plugin_freeimg->pluginname);
+ mir_sntprintf(fullPath, L"%s\\Plugins\\%s", exe, plugin_freeimg->pluginname);
if (checkAPI(fullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) {
plugin_freeimg->bpi = bpi;
plugin_freeimg->pclass |= PCLASS_OK | PCLASS_BASICAPI;
@@ -807,9 +807,9 @@ int LoadNewPluginsModule(void) if (clist == NULL) {
// result = 0, no clist_* can be found
if (clistPlugins.getCount())
- MessageBox(NULL, TranslateT("Unable to start any of the installed contact list plugins, I even ignored your preferences for which contact list couldn't load any."), _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, TranslateT("Unable to start any of the installed contact list plugins, I even ignored your preferences for which contact list couldn't load any."), L"Miranda NG", MB_OK | MB_ICONERROR);
else
- MessageBox(NULL, TranslateT("Can't find a contact list plugin! You need StdClist or any other contact list plugin."), _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, TranslateT("Can't find a contact list plugin! You need StdClist or any other contact list plugin."), L"Miranda NG", MB_OK | MB_ICONERROR);
return 1;
}
@@ -836,14 +836,14 @@ int LoadNewPluginsModule(void) static BOOL scanPluginsDir(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM)
{
- pluginEntry *p = OpenPlugin(fd->cFileName, _T("Plugins"), path);
+ pluginEntry *p = OpenPlugin(fd->cFileName, L"Plugins", path);
if (!(p->pclass & PCLASS_FAILED)) {
- if (plugin_freeimg == NULL && mir_tstrcmpi(fd->cFileName, _T("advaimg.dll")) == 0) {
+ if (plugin_freeimg == NULL && mir_tstrcmpi(fd->cFileName, L"advaimg.dll") == 0) {
plugin_freeimg = p;
p->pclass |= PCLASS_LAST;
}
- if (plugin_crshdmp == NULL && mir_tstrcmpi(fd->cFileName, _T("crashdumper.dll")) == 0) {
+ if (plugin_crshdmp == NULL && mir_tstrcmpi(fd->cFileName, L"crashdumper.dll") == 0) {
plugin_crshdmp = p;
p->pclass |= PCLASS_LAST;
}
@@ -862,12 +862,12 @@ int LoadNewPluginsModuleInfos(void) mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
// remember where the mirandaboot.ini goes
- PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini);
+ PathToAbsoluteT(L"mirandaboot.ini", mirandabootini);
// look for all *.dll's
enumPlugins(scanPluginsDir, 0, 0);
- MuuidReplacement stdCrypt = { MIID_CRYPTO, _T("stdcrypt"), NULL };
+ MuuidReplacement stdCrypt = { MIID_CRYPTO, L"stdcrypt", NULL };
return !LoadCorePlugin(stdCrypt);
}
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index bb41ab3100..61d1d81b16 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -195,7 +195,7 @@ static BOOL CALLBACK BoldGroupTitlesEnumChildren(HWND hwnd, LPARAM lParam) TCHAR szClass[64];
GetClassName(hwnd, szClass, _countof(szClass));
- if (!mir_tstrcmp(szClass, _T("Button")) && (GetWindowLongPtr(hwnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX)
+ if (!mir_tstrcmp(szClass, L"Button") && (GetWindowLongPtr(hwnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX)
SendMessage(hwnd, WM_SETFONT, lParam, 0);
return TRUE;
}
@@ -676,7 +676,7 @@ static void RebuildPageTree(HWND hdlg, OptionsDlgData *dat) }
if (dat->szFilterString[0] == 0) // Clear the keyword combo box
- SetDlgItemText(hdlg, IDC_KEYWORD_FILTER, _T(""));
+ SetDlgItemText(hdlg, IDC_KEYWORD_FILTER, L"");
if (!bRemoveFocusFromFilter)
SetFocus(GetDlgItem(hdlg, IDC_KEYWORD_FILTER)); //set the focus back to the combo box
@@ -835,7 +835,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L TCITEM tie;
tie.mask = TCIF_TEXT | TCIF_IMAGE;
tie.iImage = -1;
- tie.pszText = _T("X");
+ tie.pszText = L"X";
TabCtrl_InsertItem(GetDlgItem(hdlg, IDC_TAB), 0, &tie);
GetWindowRect(GetDlgItem(hdlg, IDC_TAB), &dat->rcTab);
diff --git a/src/mir_app/src/options_ei.cpp b/src/mir_app/src/options_ei.cpp index c64d025d70..ff8d2861c1 100644 --- a/src/mir_app/src/options_ei.cpp +++ b/src/mir_app/src/options_ei.cpp @@ -121,7 +121,7 @@ class CExtraIconOptsDlg : public CDlgBase img = extra->getID();
if (i > 0)
- desc += _T(" / ");
+ desc += L" / ";
desc += extra->getDescription();
}
diff --git a/src/mir_app/src/path.cpp b/src/mir_app/src/path.cpp index 07d5ddee3f..96cc60358a 100644 --- a/src/mir_app/src/path.cpp +++ b/src/mir_app/src/path.cpp @@ -121,13 +121,13 @@ static __forceinline char* GetPathVarX(const char*, int code) if (hAvatarFolder != NULL)
_tcsncpy_s(szFullPath, tszAvatarRoot, _TRUNCATE);
else
- mir_sntprintf(szFullPath, _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s\\AvatarCache", g_profileDir, g_shortProfileName);
break;
case 2:
- mir_sntprintf(szFullPath, _T("%s\\%s\\Logs"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s\\Logs", g_profileDir, g_shortProfileName);
break;
case 3:
- mir_sntprintf(szFullPath, _T("%s\\%s"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s", g_profileDir, g_shortProfileName);
break;
}
return makeFileName(szFullPath);
@@ -205,13 +205,13 @@ static __forceinline TCHAR* GetPathVarX(const TCHAR*, int code) if (hAvatarFolder != NULL)
_tcsncpy_s(szFullPath, tszAvatarRoot, _TRUNCATE);
else
- mir_sntprintf(szFullPath, _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s\\AvatarCache", g_profileDir, g_shortProfileName);
break;
case 2:
- mir_sntprintf(szFullPath, _T("%s\\%s\\Logs"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s\\Logs", g_profileDir, g_shortProfileName);
break;
case 3:
- mir_sntprintf(szFullPath, _T("%s\\%s"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(szFullPath, L"%s\\%s", g_profileDir, g_shortProfileName);
break;
}
return mir_tstrdup(szFullPath);
@@ -364,7 +364,7 @@ MIR_APP_DLL(wchar_t*) Utils_ReplaceVarsW(const wchar_t *wszData, MCONTACT hConta static int OnFoldersChanged(WPARAM, LPARAM)
{
- mir_sntprintf(tszAvatarRoot, _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(tszAvatarRoot, L"%s\\%s\\AvatarCache", g_profileDir, g_shortProfileName);
TCHAR tmpVar[MAX_PATH];
if (!FoldersGetCustomPathT(hAvatarFolder, tmpVar, _countof(tmpVar), tszAvatarRoot))
@@ -374,7 +374,7 @@ static int OnFoldersChanged(WPARAM, LPARAM) void InitPathVar()
{
- mir_sntprintf(tszAvatarRoot, _T("%s\\%s\\AvatarCache"), g_profileDir, g_shortProfileName);
+ mir_sntprintf(tszAvatarRoot, L"%s\\%s\\AvatarCache", g_profileDir, g_shortProfileName);
if (hAvatarFolder = FoldersRegisterCustomPathT( LPGEN("Avatars"), LPGEN("Avatars root folder"), tszAvatarRoot)) {
TCHAR tmpVar[MAX_PATH];
if (!FoldersGetCustomPathT(hAvatarFolder, tmpVar, _countof(tmpVar), tszAvatarRoot))
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 8f26724714..eda32700e3 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -61,7 +61,7 @@ static LIST<PluginListItemData> arPluginList(10, sttSortPlugins); static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM lParam)
{
TCHAR buf[MAX_PATH];
- mir_sntprintf(buf, _T("%s\\Plugins\\%s"), path, fd->cFileName);
+ mir_sntprintf(buf, L"%s\\Plugins\\%s", path, fd->cFileName);
HINSTANCE hInst = GetModuleHandle(buf);
BASIC_PLUGIN_INFO pi;
@@ -135,13 +135,13 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM l VS_FIXEDFILEINFO *fi;
void *pVerInfo = mir_alloc(verInfoSize);
GetFileVersionInfo(buf, 0, verInfoSize, pVerInfo);
- VerQueryValue(pVerInfo, _T("\\"), (LPVOID*)&fi, &blockSize);
- mir_sntprintf(buf, _T("%d.%d.%d.%d"), HIWORD(fi->dwProductVersionMS),
+ VerQueryValue(pVerInfo, L"\\", (LPVOID*)&fi, &blockSize);
+ mir_sntprintf(buf, L"%d.%d.%d.%d", HIWORD(fi->dwProductVersionMS),
LOWORD(fi->dwProductVersionMS), HIWORD(fi->dwProductVersionLS), LOWORD(fi->dwProductVersionLS));
mir_free(pVerInfo);
}
else
- mir_sntprintf(buf, _T("%d.%d.%d.%d"), HIBYTE(HIWORD(pi.pluginInfo->version)),
+ mir_sntprintf(buf, L"%d.%d.%d.%d", HIBYTE(HIWORD(pi.pluginInfo->version)),
LOBYTE(HIWORD(pi.pluginInfo->version)), HIBYTE(LOWORD(pi.pluginInfo->version)),
LOBYTE(LOWORD(pi.pluginInfo->version)));
@@ -187,7 +187,7 @@ static bool LoadPluginDynamically(PluginListItemData *dat) GetModuleFileName(NULL, exe, _countof(exe));
TCHAR *p = _tcsrchr(exe, '\\'); if (p) *p = 0;
- pluginEntry* pPlug = OpenPlugin(dat->fileName, _T("Plugins"), exe);
+ pluginEntry* pPlug = OpenPlugin(dat->fileName, L"Plugins", exe);
if (pPlug->pclass & PCLASS_FAILED) {
LBL_Error:
Plugin_UnloadDyn(pPlug);
@@ -305,7 +305,7 @@ static int CALLBACK SortPlugins(WPARAM i1, LPARAM i2, LPARAM) static TCHAR *latin2t(const char *p)
{
if (p == NULL)
- return mir_tstrdup(_T(""));
+ return mir_tstrdup(L"");
return mir_a2t_cp(p, 1250);
}
@@ -331,7 +331,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
- col.pszText = _T("");
+ col.pszText = L"";
col.cx = 40;
ListView_InsertColumn(hwndList, 0, &col);
@@ -425,7 +425,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar TCHAR buf[1024];
ListView_GetItemText(hwndList, hdr->iItem, 2, buf, _countof(buf));
- SetDlgItemText(hwndDlg, IDC_PLUGININFOFRAME, sel ? buf : _T(""));
+ SetDlgItemText(hwndDlg, IDC_PLUGININFOFRAME, sel ? buf : L"");
ptrT tszAuthor(latin2t(sel ? dat->author : NULL));
SetDlgItemText(hwndDlg, IDC_PLUGINAUTHOR, tszAuthor);
@@ -434,7 +434,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar SetDlgItemText(hwndDlg, IDC_PLUGINEMAIL, tszEmail);
ptrT p(Langpack_PcharToTchar(dat->description));
- SetDlgItemText(hwndDlg, IDC_PLUGINLONGINFO, sel ? p.get() : _T(""));
+ SetDlgItemText(hwndDlg, IDC_PLUGINLONGINFO, sel ? p.get() : L"");
ptrT tszCopyright(latin2t(sel ? dat->copyright : NULL));
SetDlgItemText(hwndDlg, IDC_PLUGINCPYR, tszCopyright);
@@ -447,7 +447,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar uuidToString(dat->uuid, szUID, sizeof(szUID));
SetDlgItemTextA(hwndDlg, IDC_PLUGINPID, sel ? szUID : "");
}
- else SetDlgItemText(hwndDlg, IDC_PLUGINPID, sel ? TranslateT("<none>") : _T(""));
+ else SetDlgItemText(hwndDlg, IDC_PLUGINPID, sel ? TranslateT("<none>") : L"");
}
}
}
@@ -455,7 +455,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar if (hdr->hdr.code == PSN_APPLY) {
bool needRestart = false;
TCHAR bufRestart[1024];
- int bufLen = mir_sntprintf(bufRestart, _T("%s\n"), TranslateT("Miranda NG must be restarted to apply changes for these plugins:"));
+ int bufLen = mir_sntprintf(bufRestart, L"%s\n", TranslateT("Miranda NG must be restarted to apply changes for these plugins:"));
HWND hwndList = GetDlgItem(hwndDlg, IDC_PLUGLIST);
for (int iRow = 0; iRow != -1;) {
@@ -482,7 +482,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar ListView_SetItem(hwndList, &lvi);
}
else {
- bufLen += mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, _T(" - %s\n"), buf);
+ bufLen += mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, L" - %s\n", buf);
needRestart = true;
}
}
@@ -495,7 +495,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar ListView_SetItem(hwndList, &lvi);
}
else {
- bufLen += mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, _T(" - %s\n"), buf);
+ bufLen += mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, L" - %s\n", buf);
needRestart = true;
}
}
@@ -509,8 +509,8 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar ShowWindow(GetDlgItem(hwndDlg, IDC_RESTART), needRestart);
if (needRestart) {
- mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, _T("\n%s"), TranslateT("Do you want to restart it now?"));
- if (MessageBox(hwndDlg, bufRestart, _T("Miranda NG"), MB_ICONWARNING | MB_YESNO) == IDYES)
+ mir_sntprintf(bufRestart + bufLen, _countof(bufRestart) - bufLen, L"\n%s", TranslateT("Do you want to restart it now?"));
+ if (MessageBox(hwndDlg, bufRestart, L"Miranda NG", MB_ICONWARNING | MB_YESNO) == IDYES)
CallService(MS_SYSTEM_RESTART, 1, 0);
}
}
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp index 8828a2de55..9ab844d821 100644 --- a/src/mir_app/src/profilemanager.cpp +++ b/src/mir_app/src/profilemanager.cpp @@ -46,7 +46,7 @@ static int findProfiles(TCHAR *szProfileDir, ENUMPROFILECALLBACK callback, LPARA { // find in Miranda NG profile subfolders TCHAR searchspec[MAX_PATH]; - mir_sntprintf(searchspec, _T("%s\\*.*"), szProfileDir); + mir_sntprintf(searchspec, L"%s\\*.*", szProfileDir); WIN32_FIND_DATA ffd; HANDLE hFind = FindFirstFile(searchspec, &ffd); @@ -55,11 +55,11 @@ static int findProfiles(TCHAR *szProfileDir, ENUMPROFILECALLBACK callback, LPARA do { // find all subfolders except "." and ".." - if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(ffd.cFileName, _T(".")) && mir_tstrcmp(ffd.cFileName, _T(".."))) { + if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(ffd.cFileName, L".") && mir_tstrcmp(ffd.cFileName, L"..")) { TCHAR buf[MAX_PATH], profile[MAX_PATH]; - mir_sntprintf(buf, _T("%s\\%s\\%s.dat"), szProfileDir, ffd.cFileName, ffd.cFileName); + mir_sntprintf(buf, L"%s\\%s\\%s.dat", szProfileDir, ffd.cFileName, ffd.cFileName); if (_taccess(buf, 0) == 0) { - mir_sntprintf(profile, _T("%s.dat"), ffd.cFileName); + mir_sntprintf(profile, L"%s.dat", ffd.cFileName); if (!callback(buf, profile, lParam)) break; } @@ -74,7 +74,7 @@ static int findProfiles(TCHAR *szProfileDir, ENUMPROFILECALLBACK callback, LPARA static LRESULT CALLBACK ProfileNameValidate(HWND edit, UINT msg, WPARAM wParam, LPARAM lParam) { if (msg == WM_CHAR) { - if (_tcschr(_T(".?/\\#' "), (TCHAR)wParam) != 0) + if (_tcschr(L".?/\\#' ", (TCHAR)wParam) != 0) return 0; PostMessage(GetParent(edit), WM_INPUTCHANGED, 0, 0); } @@ -106,7 +106,7 @@ class CCreateProfileDlg : public CDlgBase sf.wFunc = FO_DELETE; sf.pFrom = buf; sf.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO; - mir_sntprintf(buf, _T("%s\0"), profile); + mir_sntprintf(buf, L"%s\0", profile); if (SHFileOperation(&sf) != 0) { mir_sntprintf(buf, TranslateT("Couldn't move '%s' to the Recycle Bin. Please select another profile name."), file); MessageBox(m_hwnd, buf, TranslateT("Problem moving profile"), MB_ICONINFORMATION | MB_OK); @@ -217,7 +217,7 @@ public: return; // profile placed in "profile_name" subfolder - mir_sntprintf(m_pd->ptszProfile, MAX_PATH, _T("%s\\%s\\%s.dat"), m_pd->ptszProfileDir, szName, szName); + mir_sntprintf(m_pd->ptszProfile, MAX_PATH, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, szName, szName); m_pd->newProfile = 1; m_pd->dblink = (DATABASELINK *)m_driverList.GetItemData(curSel); @@ -257,7 +257,7 @@ class CChooseProfileDlg : public CDlgBase bool bFileLocked = true; TCHAR *p = _tcsrchr(profile, '.'); - mir_tstrcpy(sizeBuf, _T("0 KB")); + mir_tstrcpy(sizeBuf, L"0 KB"); if (p != NULL) *p = 0; LVITEM item = { 0 }; @@ -268,12 +268,12 @@ class CChooseProfileDlg : public CDlgBase struct _stat statbuf; if (_tstat(tszFullPath, &statbuf) == 0) { if (statbuf.st_size > 1000000) { - mir_sntprintf(sizeBuf, _T("%.3lf"), (double)statbuf.st_size / 1048576.0); - mir_tstrcpy(sizeBuf + 5, _T(" MB")); + mir_sntprintf(sizeBuf, L"%.3lf", (double)statbuf.st_size / 1048576.0); + mir_tstrcpy(sizeBuf + 5, L" MB"); } else { - mir_sntprintf(sizeBuf, _T("%.3lf"), (double)statbuf.st_size / 1024.0); - mir_tstrcpy(sizeBuf + 5, _T(" KB")); + mir_sntprintf(sizeBuf, L"%.3lf", (double)statbuf.st_size / 1024.0); + mir_tstrcpy(sizeBuf + 5, L" KB"); } bFileLocked = !fileExist(tszFullPath); } @@ -323,7 +323,7 @@ class CChooseProfileDlg : public CDlgBase if (!m_profileList.GetItem(&item)) return; - mir_sntprintf(fullName, _T("%s\\%s\\%s.dat"), m_pd->ptszProfileDir, profile, profile); + mir_sntprintf(fullName, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, profile, profile); CallService(MS_DB_CHECKPROFILE, (WPARAM)fullName, item.iImage == 2); } @@ -343,10 +343,10 @@ class CChooseProfileDlg : public CDlgBase return; mir_sntprintf(profilef, TranslateT("Are you sure you want to remove profile \"%s\"?"), profile); - if (IDYES != MessageBox(NULL, profilef, _T("Miranda NG"), MB_YESNO | MB_TASKMODAL | MB_ICONWARNING)) + if (IDYES != MessageBox(NULL, profilef, L"Miranda NG", MB_YESNO | MB_TASKMODAL | MB_ICONWARNING)) return; - mir_sntprintf(profilef, _T("%s\\%s%c"), m_pd->ptszProfileDir, profile, 0); + mir_sntprintf(profilef, L"%s\\%s%c", m_pd->ptszProfileDir, profile, 0); SHFILEOPSTRUCT sf = { 0 }; sf.wFunc = FO_DELETE; @@ -387,9 +387,9 @@ class CChooseProfileDlg : public CDlgBase // profile is placed in "profile_name" subfolder TCHAR tmpPath[MAX_PATH]; - mir_sntprintf(tmpPath, _T("%s\\%s.dat"), m_pd->ptszProfileDir, profile); + mir_sntprintf(tmpPath, L"%s\\%s.dat", m_pd->ptszProfileDir, profile); if (_taccess(tmpPath, 2)) - mir_sntprintf(m_pd->ptszProfile, MAX_PATH, _T("%s\\%s\\%s.dat"), m_pd->ptszProfileDir, profile, profile); + mir_sntprintf(m_pd->ptszProfile, MAX_PATH, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, profile, profile); else _tcsncpy_s(m_pd->ptszProfile, MAX_PATH, tmpPath, _TRUNCATE); } @@ -524,9 +524,9 @@ public: TCHAR profilename[MAX_PATH], tszFullPath[MAX_PATH]; struct _stat statbuf; m_profileList.GetItemText(pTip->iItem, 0, profilename, _countof(profilename)); - mir_sntprintf(tszFullPath, _T("%s\\%s\\%s.dat"), m_pd->ptszProfileDir, profilename, profilename); + mir_sntprintf(tszFullPath, L"%s\\%s\\%s.dat", m_pd->ptszProfileDir, profilename, profilename); _tstat(tszFullPath, &statbuf); - mir_sntprintf(pTip->pszText, pTip->cchTextMax, _T("%s\n%s: %s\n%s: %s"), tszFullPath, TranslateT("Created"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_ctime))), TranslateT("Modified"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_mtime)))); + mir_sntprintf(pTip->pszText, pTip->cchTextMax, L"%s\n%s: %s\n%s: %s", tszFullPath, TranslateT("Created"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_ctime))), TranslateT("Modified"), rtrimt(NEWTSTR_ALLOCA(_tctime(&statbuf.st_mtime)))); } } diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index 43178651aa..096fdf0ed0 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -143,13 +143,13 @@ static bool OnCreateAccount(HWND hwndDlg) if (param->action == PRAC_UPGRADED) {
BOOL oldProto = pa->bOldProto;
TCHAR szPlugin[MAX_PATH];
- mir_sntprintf(szPlugin, _T("%s.dll"), _A2T(pa->szProtoName));
+ mir_sntprintf(szPlugin, L"%s.dll", _A2T(pa->szProtoName));
int idx = accounts.getIndex(pa);
UnloadAccount(pa, false, false);
accounts.remove(idx);
if (oldProto && UnloadPlugin(szPlugin, _countof(szPlugin))) {
TCHAR szNewName[MAX_PATH];
- mir_sntprintf(szNewName, _T("%s~"), szPlugin);
+ mir_sntprintf(szNewName, L"%s~", szPlugin);
MoveFile(szPlugin, szNewName);
}
param->action = PRAC_ADDED;
@@ -202,9 +202,9 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam TCHAR str[200];
if (param->action == PRAC_CHANGED) { // update
EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOTYPECOMBO), FALSE);
- mir_sntprintf(str, _T("%s: %s"), TranslateT("Editing account"), param->pa->tszAccountName);
+ mir_sntprintf(str, L"%s: %s", TranslateT("Editing account"), param->pa->tszAccountName);
}
- else mir_sntprintf(str, _T("%s: %s"), TranslateT("Upgrading account"), param->pa->tszAccountName);
+ else mir_sntprintf(str, L"%s: %s", TranslateT("Upgrading account"), param->pa->tszAccountName);
SetWindowText(hwndDlg, str);
SetDlgItemText(hwndDlg, IDC_ACCNAME, param->pa->tszAccountName);
@@ -351,7 +351,7 @@ static LRESULT CALLBACK AccListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA rc.bottom = rc.top + max(g_iIconSX, parentDat->titleHeight) + 4 - 1;
++rc.top; --rc.right;
- dat->hwndEdit = CreateWindow(_T("EDIT"), pa->tszAccountName, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hwnd, NULL, g_hInst, NULL);
+ dat->hwndEdit = CreateWindow(L"EDIT", pa->tszAccountName, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hwnd, NULL, g_hInst, NULL);
mir_subclassWindow(dat->hwndEdit, sttEditSubclassProc);
SendMessage(dat->hwndEdit, WM_SETFONT, (WPARAM)parentDat->hfntTitle, 0);
SendMessage(dat->hwndEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN | EC_USEFONTINFO, 0);
@@ -618,7 +618,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM if (lps->itemID == (unsigned)dat->iSelected) {
SelectObject(lps->hDC, dat->hfntText);
- mir_sntprintf(text, size, _T("%s: %S"), TranslateT("Protocol"), acc->szProtoName);
+ mir_sntprintf(text, size, L"%s: %S", TranslateT("Protocol"), acc->szProtoName);
length = (int)mir_tstrlen(text);
DrawText(lps->hDC, text, -1, &lps->rcItem, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_END_ELLIPSIS);
GetTextExtentPoint32(lps->hDC, text, length, &sz);
@@ -629,9 +629,9 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM ptrT tszIdName(szIdName ? mir_a2t(szIdName) : mir_tstrdup(TranslateT("Account ID")));
ptrT tszUniqueID(Contact_GetInfo(CNF_UNIQUEID, NULL, acc->szModuleName));
if (tszUniqueID != NULL)
- mir_sntprintf(text, size, _T("%s: %s"), tszIdName, tszUniqueID);
+ mir_sntprintf(text, size, L"%s: %s", tszIdName, tszUniqueID);
else
- mir_sntprintf(text, size, _T("%s: %s"), tszIdName, TranslateT("<unknown>"));
+ mir_sntprintf(text, size, L"%s: %s", tszIdName, TranslateT("<unknown>"));
}
else mir_sntprintf(text, size, TranslateT("Protocol is not loaded."));
diff --git a/src/mir_app/src/proto_ui.cpp b/src/mir_app/src/proto_ui.cpp index 7d54485e58..ed0ac48b16 100644 --- a/src/mir_app/src/proto_ui.cpp +++ b/src/mir_app/src/proto_ui.cpp @@ -144,7 +144,7 @@ void CProtoIntDlgBase::UpdateProtoTitle(const TCHAR *szText) if (!_tcsstr(curText, m_proto_interface->m_tszUserName)) {
size_t length = curLength + mir_tstrlen(m_proto_interface->m_tszUserName) + 256;
TCHAR *text = (TCHAR *)_alloca(length * sizeof(TCHAR));
- mir_sntprintf(text, length, _T("%s [%s: %s]"), curText, TranslateT("Account"), m_proto_interface->m_tszUserName);
+ mir_sntprintf(text, length, L"%s [%s: %s]", curText, TranslateT("Account"), m_proto_interface->m_tszUserName);
SetWindowText(m_hwnd, text);
}
}
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index fc3aac1354..3274381078 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -155,21 +155,21 @@ MIR_APP_DLL(void) ProtoWindowRemove(PROTO_INTERFACE *pThis, HWND hwnd) MIR_APP_DLL(LPCTSTR) ProtoGetAvatarExtension(int format)
{
if (format == PA_FORMAT_PNG)
- return _T(".png");
+ return L".png";
if (format == PA_FORMAT_JPEG)
- return _T(".jpg");
+ return L".jpg";
if (format == PA_FORMAT_ICON)
- return _T(".ico");
+ return L".ico";
if (format == PA_FORMAT_BMP)
- return _T(".bmp");
+ return L".bmp";
if (format == PA_FORMAT_GIF)
- return _T(".gif");
+ return L".gif";
if (format == PA_FORMAT_SWF)
- return _T(".swf");
+ return L".swf";
if (format == PA_FORMAT_XML)
- return _T(".xml");
+ return L".xml";
- return _T("");
+ return L"";
}
MIR_APP_DLL(int) ProtoGetAvatarFormat(const TCHAR *ptszFileName)
@@ -181,25 +181,25 @@ MIR_APP_DLL(int) ProtoGetAvatarFormat(const TCHAR *ptszFileName) if (ptszExt == NULL)
return PA_FORMAT_UNKNOWN;
- if (!_tcsicmp(ptszExt, _T(".png")))
+ if (!_tcsicmp(ptszExt, L".png"))
return PA_FORMAT_PNG;
- if (!_tcsicmp(ptszExt, _T(".jpg")) || !_tcsicmp(ptszExt, _T(".jpeg")))
+ if (!_tcsicmp(ptszExt, L".jpg") || !_tcsicmp(ptszExt, L".jpeg"))
return PA_FORMAT_JPEG;
- if (!_tcsicmp(ptszExt, _T(".ico")))
+ if (!_tcsicmp(ptszExt, L".ico"))
return PA_FORMAT_ICON;
- if (!_tcsicmp(ptszExt, _T(".bmp")) || !_tcsicmp(ptszExt, _T(".rle")))
+ if (!_tcsicmp(ptszExt, L".bmp") || !_tcsicmp(ptszExt, L".rle"))
return PA_FORMAT_BMP;
- if (!_tcsicmp(ptszExt, _T(".gif")))
+ if (!_tcsicmp(ptszExt, L".gif"))
return PA_FORMAT_GIF;
- if (!_tcsicmp(ptszExt, _T(".swf")))
+ if (!_tcsicmp(ptszExt, L".swf"))
return PA_FORMAT_SWF;
- if (!_tcsicmp(ptszExt, _T(".xml")))
+ if (!_tcsicmp(ptszExt, L".xml"))
return PA_FORMAT_XML;
return PA_FORMAT_UNKNOWN;
@@ -208,31 +208,31 @@ MIR_APP_DLL(int) ProtoGetAvatarFormat(const TCHAR *ptszFileName) MIR_APP_DLL(int) ProtoGetBufferFormat(const void *pBuffer, const TCHAR **ptszExtension)
{
if (!memcmp(pBuffer, "\x89PNG", 4)) {
- if (ptszExtension) *ptszExtension = _T(".png");
+ if (ptszExtension) *ptszExtension = L".png";
return PA_FORMAT_PNG;
}
if (!memcmp(pBuffer, "GIF8", 4)) {
- if (ptszExtension) *ptszExtension = _T(".gif");
+ if (ptszExtension) *ptszExtension = L".gif";
return PA_FORMAT_GIF;
}
if (!memicmp(pBuffer, "<?xml", 5)) {
- if (ptszExtension) *ptszExtension = _T(".xml");
+ if (ptszExtension) *ptszExtension = L".xml";
return PA_FORMAT_XML;
}
if (!memcmp(pBuffer, "\xFF\xD8\xFF\xE0", 4) || !memcmp(pBuffer, "\xFF\xD8\xFF\xE1", 4)) {
- if (ptszExtension) *ptszExtension = _T(".jpg");
+ if (ptszExtension) *ptszExtension = L".jpg";
return PA_FORMAT_JPEG;
}
if (!memcmp(pBuffer, "BM", 2)) {
- if (ptszExtension) *ptszExtension = _T(".bmp");
+ if (ptszExtension) *ptszExtension = L".bmp";
return PA_FORMAT_BMP;
}
- if (ptszExtension) *ptszExtension = _T("");
+ if (ptszExtension) *ptszExtension = L"";
return PA_FORMAT_UNKNOWN;
}
diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp index 657ac0f526..3aa2455e7a 100644 --- a/src/mir_app/src/searchresults.cpp +++ b/src/mir_app/src/searchresults.cpp @@ -54,7 +54,7 @@ void SaveColumnSizes(HWND hwndResults) db_set_b(NULL, "FindAdd", "SortAscending", (BYTE)dat->bSortAscending);
}
-static const TCHAR *szColumnNames[] = { NULL, NULL, _T("Nick"), _T("First Name"), _T("Last Name"), _T("E-mail") };
+static const TCHAR *szColumnNames[] = { NULL, NULL, L"Nick", L"First Name", L"Last Name", L"E-mail" };
static int defaultColumnSizes[] = { 0, 90, 100, 100, 100, 2000 };
void LoadColumnSizes(HWND hwndResults, const char *szProto)
{
@@ -74,7 +74,7 @@ void LoadColumnSizes(HWND hwndResults, const char *szProto) lvc.pszText = TranslateTS(szColumnNames[i]);
else {
if (i == COLUMNID_HANDLE) {
- lvc.pszText = _T("ID");
+ lvc.pszText = L"ID";
if (szProto) {
INT_PTR ret = CallProtoServiceInt(NULL, szProto, PS_GETCAPS, PFLAG_UNIQUEIDTEXT, 0);
if (ret != CALLSERVICE_NOTFOUND) {
@@ -252,7 +252,7 @@ void SetStatusBarSearchInfo(HWND hwndStatus, struct FindAddDlgData *dat) if (!pa)
continue;
- str.Append(i ? _T(", ") : _T(" "));
+ str.Append(i ? L", " : L" ");
str.Append(pa->tszAccountName);
}
}
@@ -317,9 +317,9 @@ void SetStatusBarResultInfo(HWND hwndDlg) continue;
if (i)
- str.Append(_T(", "));
+ str.Append(L", ");
- str.AppendFormat(_T("%d %s"), subtotal[i].count, pa->tszAccountName);
+ str.AppendFormat(L"%d %s", subtotal[i].count, pa->tszAccountName);
}
str.AppendChar(')');
}
diff --git a/src/mir_app/src/services.cpp b/src/mir_app/src/services.cpp index 22206c3800..08eaadbbff 100644 --- a/src/mir_app/src/services.cpp +++ b/src/mir_app/src/services.cpp @@ -258,7 +258,7 @@ static int sttRegisterFontWorker(FontIDW *font_id, int _hLang) memcpy(newItem, font_id, font_id->cbSize);
newItem->hLangpack = _hLang;
- if (!mir_tstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) {
+ if (!mir_tstrcmp(newItem->deffontsettings.szFace, L"MS Shell Dlg")) {
LOGFONT lf;
SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, FALSE);
mir_tstrncpy(newItem->deffontsettings.szFace, lf.lfFaceName, _countof(newItem->deffontsettings.szFace));
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index 853a80cf3f..b8563f05ec 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -118,7 +118,7 @@ static void __fastcall MySetCursor(TCHAR* nCursor) static void LoadSectionIcons(TCHAR *filename, SectionItem* sectionActive)
{
TCHAR path[MAX_PATH];
- mir_sntprintf(path, _T("%s,"), filename);
+ mir_sntprintf(path, L"%s,", filename);
size_t suffIndx = mir_tstrlen(path);
mir_cslock lck(csIconList);
@@ -230,26 +230,26 @@ static TCHAR* OpenFileDlg(HWND hParent, const TCHAR* szFile, BOOL bAll) mir_tstrcpy(filter, TranslateT("Icon sets"));
if (bAll)
- mir_tstrcat(filter, _T(" (*.dll;*.mir;*.icl;*.exe;*.ico)"));
+ mir_tstrcat(filter, L" (*.dll;*.mir;*.icl;*.exe;*.ico)");
else
- mir_tstrcat(filter, _T(" (*.dll;*.mir)"));
+ mir_tstrcat(filter, L" (*.dll;*.mir)");
pfilter = filter + mir_tstrlen(filter) + 1;
if (bAll)
- mir_tstrcpy(pfilter, _T("*.DLL;*.MIR;*.ICL;*.EXE;*.ICO"));
+ mir_tstrcpy(pfilter, L"*.DLL;*.MIR;*.ICL;*.EXE;*.ICO");
else
- mir_tstrcpy(pfilter, _T("*.DLL;*.MIR"));
+ mir_tstrcpy(pfilter, L"*.DLL;*.MIR");
pfilter += mir_tstrlen(pfilter) + 1;
mir_tstrcpy(pfilter, TranslateT("All files"));
- mir_tstrcat(pfilter, _T(" (*)"));
+ mir_tstrcat(pfilter, L" (*)");
pfilter += mir_tstrlen(pfilter) + 1;
- mir_tstrcpy(pfilter, _T("*"));
+ mir_tstrcpy(pfilter, L"*");
pfilter += mir_tstrlen(pfilter) + 1;
*pfilter = '\0';
ofn.lpstrFilter = filter;
- ofn.lpstrDefExt = _T("dll");
+ ofn.lpstrDefExt = L"dll";
mir_tstrncpy(file, szFile, _countof(file));
ofn.lpstrFile = file;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_DONTADDTORECENT;
@@ -387,7 +387,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SHAutoComplete(GetDlgItem(hwndDlg, IDC_ICONSET), 1);
- SetDlgItemText(hwndDlg, IDC_ICONSET, _T("icons.dll"));
+ SetDlgItemText(hwndDlg, IDC_ICONSET, L"icons.dll");
return TRUE;
case DM_REBUILDICONSPREVIEW:
@@ -418,7 +418,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lvi.iItem = 0;
int count = (int)_ExtractIconEx(filename, -1, 16, 16, NULL, LR_DEFAULTCOLOR);
for (int i = 0; i < count; lvi.iItem++, i++) {
- mir_sntprintf(caption, _T("%d"), i + 1);
+ mir_sntprintf(caption, L"%d", i + 1);
lvi.pszText = caption;
HICON hIcon = NULL;
@@ -520,7 +520,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lvi.mask = LVIF_PARAM;
lvi.iItem = dragItem; lvi.iSubItem = 0;
ListView_GetItem(hPreview, &lvi);
- mir_sntprintf(path, _T("%s,%d"), filename, (int)lvi.lParam);
+ mir_sntprintf(path, L"%s,%d", filename, (int)lvi.lParam);
SendMessage(hwndParent, DM_CHANGEICON, dropHiLite, (LPARAM)path);
ListView_SetItemState(GetDlgItem(hwndParent, IDC_PREVIEW), dropHiLite, 0, LVIS_DROPHILITED);
}
@@ -934,7 +934,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (item->temp_file)
_tcsncpy_s(pInfoTip->pszText, pInfoTip->cchTextMax, item->temp_file, _TRUNCATE);
else if (item->default_file)
- mir_sntprintf(pInfoTip->pszText, pInfoTip->cchTextMax, _T("%s, %d"), item->default_file->file, item->default_indx);
+ mir_sntprintf(pInfoTip->pszText, pInfoTip->cchTextMax, L"%s, %d", item->default_file->file, item->default_indx);
}
}
if (bNeedRebuild) {
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index b1639ae6a2..858ccabc22 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -278,7 +278,7 @@ MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big) // Queried protocol isn't in list, adding
TCHAR tszSection[MAX_PATH];
- mir_sntprintf(tszSection, _T(PROTOCOLS_PREFIX)_T("/%s"), pa->tszAccountName);
+ mir_sntprintf(tszSection, _T(PROTOCOLS_PREFIX)L"/%s", pa->tszAccountName);
SKINICONDESC sid = { 0 };
sid.section.t = tszSection;
@@ -287,11 +287,11 @@ MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big) str = _tcsrchr(szPath, '\\');
if (str != NULL)
*str = 0;
- mir_sntprintf(szFullPath, _T("%s\\Icons\\proto_%S.dll"), szPath, pa->szProtoName);
+ mir_sntprintf(szFullPath, L"%s\\Icons\\proto_%S.dll", szPath, pa->szProtoName);
if (GetFileAttributes(szFullPath) != INVALID_FILE_ATTRIBUTES)
sid.defaultFile.t = szFullPath;
else {
- mir_sntprintf(szFullPath, _T("%s\\Plugins\\%S.dll"), szPath, szProto);
+ mir_sntprintf(szFullPath, L"%s\\Plugins\\%S.dll", szPath, szProto);
if (int(ExtractIconEx(szFullPath, statusIcons[statusIndx].resource_id, NULL, &hIcon, 1)) > 0) {
DestroyIcon(hIcon);
sid.defaultFile.t = szFullPath;
diff --git a/src/mir_app/src/sounds.cpp b/src/mir_app/src/sounds.cpp index 7492025ef3..abda0e43fd 100644 --- a/src/mir_app/src/sounds.cpp +++ b/src/mir_app/src/sounds.cpp @@ -86,7 +86,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM wParam, LPARAM lParam) TCHAR* ptszDefaultFile;
if (ssd->dwFlags & SSDF_UNICODE) {
item->ptszDescription = mir_tstrdup(ssd->ptszDescription);
- item->ptszSection = mir_tstrdup((ssd->pszSection != NULL) ? ssd->ptszSection : _T("Other"));
+ item->ptszSection = mir_tstrdup((ssd->pszSection != NULL) ? ssd->ptszSection : L"Other");
ptszDefaultFile = mir_tstrdup(ssd->ptszDefaultFile);
}
else {
@@ -301,15 +301,15 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM db_free(&dbv);
} } }
- _tcsncpy_s(strFull, (snd.ptszTempFile ? snd.ptszTempFile : _T("")), _TRUNCATE);
+ _tcsncpy_s(strFull, (snd.ptszTempFile ? snd.ptszTempFile : L""), _TRUNCATE);
PathToAbsoluteT(strFull, strdir);
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
- 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("WAV files"), 0, 0, TranslateT("All files"), 0, 0);
+ mir_sntprintf(filter, L"%s (*.wav)%c*.wav%c%s (*)%c*%c", TranslateT("WAV files"), 0, 0, TranslateT("All files"), 0, 0);
ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
ofn.hwndOwner = GetParent(hwndDlg);
ofn.hInstance = NULL;
@@ -326,7 +326,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM ofn.Flags = OFN_FILEMUSTEXIST|OFN_HIDEREADONLY|OFN_EXPLORER|OFN_LONGNAMES|OFN_NOCHANGEDIR;
ofn.nMaxFile = _countof(str);
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = _T("wav");
+ ofn.lpstrDefExt = L"wav";
if (!GetOpenFileName(&ofn))
break;
@@ -388,7 +388,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SendMessage(hwndDlg, DM_HIDEPANE, 0, 0);
else {
TCHAR buf[256];
- mir_sntprintf(buf, _T("%s: %s"), arSounds[tvi.lParam].getSection(), arSounds[tvi.lParam].getDescr());
+ mir_sntprintf(buf, L"%s: %s", arSounds[tvi.lParam].getSection(), arSounds[tvi.lParam].getDescr());
SetDlgItemText(hwndDlg, IDC_NAMEVAL, buf);
if (arSounds[tvi.lParam].ptszTempFile)
SetDlgItemText(hwndDlg, IDC_LOCATION, arSounds[tvi.lParam].ptszTempFile);
diff --git a/src/mir_core/src/bitmaps.cpp b/src/mir_core/src/bitmaps.cpp index ee964c482c..c997a61a93 100644 --- a/src/mir_core/src/bitmaps.cpp +++ b/src/mir_core/src/bitmaps.cpp @@ -43,10 +43,10 @@ MIR_CORE_DLL(void) Bitmap_GetFilter(TCHAR *dest, size_t destLen) return;
mir_sntprintf(dest, destLen,
- _T("%s (*.bmp;*.jpg;*.gif;*.png)%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG%c")
- _T("%s (*.bmp;*.rle)%c*.BMP;*.RLE%c")
- _T("%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c")
- _T("%s (*.gif)%c*.GIF%c")
- _T("%s (*.png)%c*.PNG%c%c"),
+ L"%s (*.bmp;*.jpg;*.gif;*.png)%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG%c"
+ L"%s (*.bmp;*.rle)%c*.BMP;*.RLE%c"
+ L"%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c"
+ L"%s (*.gif)%c*.GIF%c"
+ L"%s (*.png)%c*.PNG%c%c",
TranslateT("All Files"), 0, 0, TranslateT("Windows bitmaps"), 0, 0, TranslateT("JPEG bitmaps"), 0, 0, TranslateT("GIF bitmaps"), 0, 0, TranslateT("PNG bitmaps"), 0, 0, 0);
}
diff --git a/src/mir_core/src/cmdline.cpp b/src/mir_core/src/cmdline.cpp index aa83fc2a2b..4896cdf347 100644 --- a/src/mir_core/src/cmdline.cpp +++ b/src/mir_core/src/cmdline.cpp @@ -60,13 +60,13 @@ MIR_CORE_DLL(void) CmdLine_Parse(LPTSTR ptszCmdLine) else continue; // skip a text that isn't an option
TCHAR *pOptionName = p+1;
- if ((p = _tcspbrk(pOptionName, _T(" \t=:"))) == NULL) { // no more text in string
- arParams.insert(new CmdLineParam(pOptionName, _T("")));
+ if ((p = _tcspbrk(pOptionName, L" \t=:")) == NULL) { // no more text in string
+ arParams.insert(new CmdLineParam(pOptionName, L""));
break;
}
if (*p == ' ' || *p == '\t') {
- arParams.insert(new CmdLineParam(pOptionName, _T("")));
+ arParams.insert(new CmdLineParam(pOptionName, L""));
p--; // the cycle will wipe this space automatically
continue;
}
@@ -74,7 +74,7 @@ MIR_CORE_DLL(void) CmdLine_Parse(LPTSTR ptszCmdLine) // parameter with value
*p = 0;
arParams.insert(new CmdLineParam(pOptionName, ++p));
- if ((p = _tcspbrk(p, _T(" \t"))) == NULL) // no more text in string
+ if ((p = _tcspbrk(p, L" \t")) == NULL) // no more text in string
break;
p--; // the cycle will wipe this space automatically
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp index 0412510b1e..348719b1a0 100644 --- a/src/mir_core/src/langpack.cpp +++ b/src/mir_core/src/langpack.cpp @@ -219,11 +219,11 @@ static void LoadLangPackFile(FILE *fp, char *line) TCHAR *p = _tcsrchr(langPack.tszFullPath, '\\');
if (p)
*p = 0;
- mir_sntprintf(tszFileName, _T("%s\\%S"), langPack.tszFullPath, ltrim(line + 9));
+ mir_sntprintf(tszFileName, L"%s\\%S", langPack.tszFullPath, ltrim(line + 9));
if (p)
*p = '\\';
- FILE *fpNew = _tfopen(tszFileName, _T("r"));
+ FILE *fpNew = _tfopen(tszFileName, L"r");
if (fpNew) {
line[0] = 0;
fgets(line, LANGPACK_BUF_SIZE, fpNew);
@@ -374,13 +374,13 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack)
{
- if (ptszLangPack == NULL || !mir_tstrcmpi(ptszLangPack, _T("")))
+ if (ptszLangPack == NULL || !mir_tstrcmpi(ptszLangPack, L""))
return 1;
// ensure that a lang's name is a full file name
TCHAR tszFullPath[MAX_PATH];
if (!PathIsAbsoluteT(ptszLangPack))
- mir_sntprintf(tszFullPath, _T("%s\\%s"), g_tszRoot, ptszLangPack);
+ mir_sntprintf(tszFullPath, L"%s\\%s", g_tszRoot, ptszLangPack);
else
_tcsncpy_s(tszFullPath, ptszLangPack, _TRUNCATE);
@@ -403,7 +403,7 @@ MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack) _tcsncpy_s(langPack.tszFileName, (p == NULL) ? tszFullPath : p + 1, _TRUNCATE);
CharLower(langPack.tszFileName);
- FILE *fp = _tfopen(tszFullPath, _T("rt"));
+ FILE *fp = _tfopen(tszFullPath, L"rt");
if (fp == NULL)
return 1;
@@ -435,7 +435,7 @@ MIR_CORE_DLL(int) LoadLangPackDescr(const TCHAR *ptszLangPack, LANGPACK_INFO *lp _tcsncpy_s(lpInfo->tszFileName, (p == NULL) ? ptszLangPack : p+1, _TRUNCATE);
CharLower(lpInfo->tszFileName);
- FILE *fp = _tfopen(ptszLangPack, _T("rt"));
+ FILE *fp = _tfopen(ptszLangPack, L"rt");
if (fp == NULL)
return 1;
@@ -563,9 +563,9 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd, LPARAM lParam) TCHAR szClass[32];
GetClassName(hwnd, szClass, _countof(szClass));
- if (!mir_tstrcmpi(szClass, _T("static")) || !mir_tstrcmpi(szClass, _T("hyperlink")) || !mir_tstrcmpi(szClass, _T("button")) || !mir_tstrcmpi(szClass, _T("MButtonClass")) || !mir_tstrcmpi(szClass, _T("MHeaderbarCtrl")))
+ if (!mir_tstrcmpi(szClass, L"static") || !mir_tstrcmpi(szClass, L"hyperlink") || !mir_tstrcmpi(szClass, L"button") || !mir_tstrcmpi(szClass, L"MButtonClass") || !mir_tstrcmpi(szClass, L"MHeaderbarCtrl"))
TranslateWindow(uuid, hwnd);
- else if (!mir_tstrcmpi(szClass, _T("edit"))) {
+ else if (!mir_tstrcmpi(szClass, L"edit")) {
if (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY)
TranslateWindow(uuid, hwnd);
}
@@ -632,17 +632,17 @@ MIR_CORE_DLL(void) Langpack_SortDuplicates(void) void GetDefaultLang()
{
// calculate the langpacks' root
- PathToAbsoluteT(_T("\\Languages"), g_tszRoot);
+ PathToAbsoluteT(L"\\Languages", g_tszRoot);
if (_taccess(g_tszRoot, 0) != 0) // directory Languages exists
- PathToAbsoluteT(_T("."), g_tszRoot);
+ PathToAbsoluteT(L".", g_tszRoot);
// look into mirandaboot.ini
TCHAR tszPath[MAX_PATH], tszLangName[256];
- PathToAbsoluteT(_T("\\mirandaboot.ini"), tszPath);
- GetPrivateProfileString(_T("Language"), _T("DefaultLanguage"), _T(""), tszLangName, _countof(tszLangName), tszPath);
+ PathToAbsoluteT(L"\\mirandaboot.ini", tszPath);
+ GetPrivateProfileString(L"Language", L"DefaultLanguage", L"", tszLangName, _countof(tszLangName), tszPath);
if (tszLangName[0]) {
- if (!mir_tstrcmpi(tszLangName, _T("default"))) {
- db_set_ts(NULL, "Langpack", "Current", _T("default"));
+ if (!mir_tstrcmpi(tszLangName, L"default")) {
+ db_set_ts(NULL, "Langpack", "Current", L"default");
return;
}
if (!LoadLangPack(tszLangName)) {
@@ -653,7 +653,7 @@ void GetDefaultLang() // try to load langpack that matches UserDefaultUILanguage
if (GetLocaleInfo(MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT), LOCALE_SENGLANGUAGE, tszLangName, _countof(tszLangName))) {
- mir_sntprintf(tszPath, _T("langpack_%s.txt"), _tcslwr(tszLangName));
+ mir_sntprintf(tszPath, L"langpack_%s.txt", _tcslwr(tszLangName));
if (!LoadLangPack(tszPath)) {
db_set_ts(NULL, "Langpack", "Current", tszPath);
return;
@@ -661,7 +661,7 @@ void GetDefaultLang() }
// finally try to load first file
- mir_sntprintf(tszPath, _T("%s\\langpack_*.txt"), g_tszRoot);
+ mir_sntprintf(tszPath, L"%s\\langpack_*.txt", g_tszRoot);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(tszPath, &fd);
@@ -678,7 +678,7 @@ void GetDefaultLang() } while (FindNextFile(hFind, &fd));
FindClose(hFind);
}
- else db_set_ts(NULL, "Langpack", "Current", _T("default"));
+ else db_set_ts(NULL, "Langpack", "Current", L"default");
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/logger.cpp b/src/mir_core/src/logger.cpp index 4a229c367b..27b9f58e18 100644 --- a/src/mir_core/src/logger.cpp +++ b/src/mir_core/src/logger.cpp @@ -108,7 +108,7 @@ MIR_CORE_DLL(HANDLE) mir_createLog(const char* pszName, const TCHAR *ptszDescr, return &arLoggers[idx];
}
- FILE *fp = _tfopen(ptszFile, _T("ab"));
+ FILE *fp = _tfopen(ptszFile, L"ab");
if (fp == NULL) {
TCHAR tszPath[MAX_PATH];
_tcsncpy_s(tszPath, ptszFile, _TRUNCATE);
@@ -149,7 +149,7 @@ MIR_C_CORE_DLL(int) mir_writeLogA(HANDLE hLogger, const char *format, ...) mir_cslock lck(p->m_cs);
if (p->m_out == NULL)
- if ((p->m_out = _tfopen(p->m_fileName, _T("ab"))) == NULL)
+ if ((p->m_out = _tfopen(p->m_fileName, L"ab")) == NULL)
return 2;
va_list args;
@@ -171,7 +171,7 @@ MIR_C_CORE_DLL(int) mir_writeLogW(HANDLE hLogger, const WCHAR *format, ...) mir_cslock lck(p->m_cs);
if (p->m_out == NULL)
- if ((p->m_out = _tfopen(p->m_fileName, _T("ab"))) == NULL)
+ if ((p->m_out = _tfopen(p->m_fileName, L"ab")) == NULL)
return 2;
va_list args;
@@ -195,7 +195,7 @@ MIR_CORE_DLL(int) mir_writeLogVA(HANDLE hLogger, const char *format, va_list arg mir_cslock lck(p->m_cs);
if (p->m_out == NULL)
- if ((p->m_out = _tfopen(p->m_fileName, _T("ab"))) == NULL)
+ if ((p->m_out = _tfopen(p->m_fileName, L"ab")) == NULL)
return 2;
vfprintf(p->m_out, format, args);
@@ -214,7 +214,7 @@ MIR_CORE_DLL(int) mir_writeLogVW(HANDLE hLogger, const WCHAR *format, va_list ar mir_cslock lck(p->m_cs);
if (p->m_out == NULL)
- if ((p->m_out = _tfopen(p->m_fileName, _T("ab"))) == NULL)
+ if ((p->m_out = _tfopen(p->m_fileName, L"ab")) == NULL)
return 2;
vfwprintf(p->m_out, format, args);
diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp index f5a2997367..514aaa4306 100644 --- a/src/mir_core/src/miranda.cpp +++ b/src/mir_core/src/miranda.cpp @@ -57,10 +57,10 @@ static INT_PTR RestartMiranda(WPARAM wParam, LPARAM lParam) GetModuleFileName(NULL, mirandaPath, _countof(mirandaPath));
if (wParam) {
- VARST profilename(_T("%miranda_profilename%"));
- mir_sntprintf(cmdLine, _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), (TCHAR*)profilename);
+ VARST profilename(L"%miranda_profilename%");
+ mir_sntprintf(cmdLine, L"\"%s\" /restart:%d /profile=%s", mirandaPath, GetCurrentProcessId(), (TCHAR*)profilename);
}
- else mir_sntprintf(cmdLine, _T("\"%s\" /restart:%d"), mirandaPath, GetCurrentProcessId());
+ else mir_sntprintf(cmdLine, L"\"%s\" /restart:%d", mirandaPath, GetCurrentProcessId());
CallService("CloseAction", 0, 0);
@@ -98,11 +98,11 @@ static void LoadCoreModule(void) icce.dwICC = ICC_WIN95_CLASSES | ICC_USEREX_CLASSES;
InitCommonControlsEx(&icce);
- hAPCWindow = CreateWindowEx(0, _T("ComboLBox"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
+ hAPCWindow = CreateWindowEx(0, L"ComboLBox", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetClassLongPtr(hAPCWindow, GCL_STYLE, GetClassLongPtr(hAPCWindow, GCL_STYLE) | CS_DROPSHADOW);
DestroyWindow(hAPCWindow);
- hAPCWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
+ hAPCWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc);
SetTimer(hAPCWindow, 1, 1000, NULL);
hStackMutex = CreateMutex(NULL, FALSE, NULL);
diff --git a/src/mir_core/src/openurl.cpp b/src/mir_core/src/openurl.cpp index dcd2516543..084bba84a7 100644 --- a/src/mir_core/src/openurl.cpp +++ b/src/mir_core/src/openurl.cpp @@ -43,24 +43,24 @@ static void OpenURLThread(void *arg) // wack a protocol on it
CMString tszUrl;
if ((isalpha(hUrlInfo->szUrl[0]) && hUrlInfo->szUrl[1] == ':') || hUrlInfo->szUrl[0] == '\\')
- tszUrl.Format(_T("file:///%s"), hUrlInfo->szUrl);
+ tszUrl.Format(L"file:///%s", hUrlInfo->szUrl);
else {
int i;
for (i = 0; _istalpha(hUrlInfo->szUrl[i]); i++);
if (hUrlInfo->szUrl[i] == ':')
tszUrl = hUrlInfo->szUrl;
- else if (!_tcsnicmp(hUrlInfo->szUrl, _T("ftp."), 4))
- tszUrl.Format(_T("ftp://%s"), hUrlInfo->szUrl);
+ else if (!_tcsnicmp(hUrlInfo->szUrl, L"ftp.", 4))
+ tszUrl.Format(L"ftp://%s", hUrlInfo->szUrl);
else
- tszUrl.Format(_T("http://%s"), hUrlInfo->szUrl);
+ tszUrl.Format(L"http://%s", hUrlInfo->szUrl);
}
// check user defined browser for opening urls
ptrT tszBrowser(db_get_tsa(NULL, "Miranda", "OpenUrlBrowser"));
if (tszBrowser)
- ShellExecute(NULL, _T("open"), tszBrowser, tszUrl, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT);
+ ShellExecute(NULL, L"open", tszBrowser, tszUrl, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT);
else
- ShellExecute(NULL, _T("open"), tszUrl, NULL, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT);
+ ShellExecute(NULL, L"open", tszUrl, NULL, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT);
delete hUrlInfo;
}
diff --git a/src/mir_core/src/path.cpp b/src/mir_core/src/path.cpp index 7327f619c8..64d00da713 100644 --- a/src/mir_core/src/path.cpp +++ b/src/mir_core/src/path.cpp @@ -156,7 +156,7 @@ MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, const WCHAR *b WCHAR buf[MAX_PATH];
if (pSrc[0] < ' ')
- return mir_sntprintf(pOut, MAX_PATH, _T("%s"), pSrc);
+ return mir_sntprintf(pOut, MAX_PATH, L"%s", pSrc);
if (PathIsAbsoluteW(pSrc))
return GetFullPathName(pSrc, MAX_PATH, pOut, NULL);
@@ -167,7 +167,7 @@ MIR_CORE_DLL(int) PathToAbsoluteW(const WCHAR *pSrc, WCHAR *pOut, const WCHAR *b if (pSrc[0] == '\\')
pSrc++;
- mir_sntprintf(buf, MAX_PATH, _T("%s%s"), base, pSrc);
+ mir_sntprintf(buf, MAX_PATH, L"%s%s", base, pSrc);
return GetFullPathName(buf, MAX_PATH, pOut, NULL);
}
diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp index cdd7ca4621..91d4c281b7 100644 --- a/src/mir_core/src/threads.cpp +++ b/src/mir_core/src/threads.cpp @@ -290,7 +290,7 @@ typedef LONG (WINAPI *pNtQIT)(HANDLE, LONG, PVOID, ULONG, PULONG); static void* GetCurrentThreadEntryPoint()
{
- pNtQIT NtQueryInformationThread = (pNtQIT)GetProcAddress(GetModuleHandle(_T("ntdll.dll")), "NtQueryInformationThread");
+ pNtQIT NtQueryInformationThread = (pNtQIT)GetProcAddress(GetModuleHandle(L"ntdll.dll"), "NtQueryInformationThread");
if (NtQueryInformationThread == NULL)
return 0;
diff --git a/src/mir_core/src/timezones.cpp b/src/mir_core/src/timezones.cpp index 322bdbf747..38281b123f 100644 --- a/src/mir_core/src/timezones.cpp +++ b/src/mir_core/src/timezones.cpp @@ -128,7 +128,7 @@ void FormatTime(const SYSTEMTIME *st, const TCHAR *szFormat, TCHAR *szDest, size TCHAR dateTimeStr[64];
if (iso)
- tszTemp.AppendFormat(_T("%d-%02d-%02dT%02d:%02d:%02dZ"), st->wYear, st->wMonth, st->wDay, st->wHour, st->wMinute, st->wSecond);
+ tszTemp.AppendFormat(L"%d-%02d-%02dT%02d:%02d:%02dZ", st->wYear, st->wMonth, st->wDay, st->wHour, st->wMinute, st->wSecond);
else if (date) {
GetDateFormat(LOCALE_USER_DEFAULT, fmt, st, NULL, dateTimeStr, _countof(dateTimeStr));
tszTemp.Append(dateTimeStr);
@@ -166,7 +166,7 @@ MIR_CORE_DLL(LPCTSTR) TimeZone_GetName(HANDLE hTZ) if (tz == NULL)
return myInfo.myTZ.tszName;
else if (tz == UTC_TIME_HANDLE)
- return _T("UTC");
+ return L"UTC";
return tz->tszName;
}
@@ -179,7 +179,7 @@ MIR_CORE_DLL(LPCTSTR) TimeZone_GetDescription(LPCTSTR TZname) if (!mir_tstrcmp(tz->tszName, TZname))
return tz->szDisplay;
}
- return _T("");
+ return L"";
}
static void CalcTsOffset(MIM_TIMEZONE *tz)
@@ -381,9 +381,9 @@ static const ListMessages* GetListMessages(HWND hWnd, DWORD dwFlags) if (!(dwFlags & (TZF_PLF_CB | TZF_PLF_LB))) {
TCHAR tszClassName[128];
GetClassName(hWnd, tszClassName, _countof(tszClassName));
- if (!mir_tstrcmpi(tszClassName, _T("COMBOBOX")))
+ if (!mir_tstrcmpi(tszClassName, L"COMBOBOX"))
dwFlags |= TZF_PLF_CB;
- else if (!mir_tstrcmpi(tszClassName, _T("LISTBOX")))
+ else if (!mir_tstrcmpi(tszClassName, L"LISTBOX"))
dwFlags |= TZF_PLF_LB;
}
if (dwFlags & TZF_PLF_CB)
@@ -531,7 +531,7 @@ void InitTimeZones(void) REG_TZI_FORMAT tzi;
HKEY hKey;
- const TCHAR *tszKey = _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones");
+ const TCHAR *tszKey = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones";
/*
* use GetDynamicTimeZoneInformation() on Vista+ - this will return a structure with
@@ -539,7 +539,7 @@ void InitTimeZones(void) * localized systems or systems with a MUI pack installed
*/
if (IsWinVerVistaPlus())
- pfnGetDynamicTimeZoneInformation = (pfnGetDynamicTimeZoneInformation_t)GetProcAddress(GetModuleHandle(_T("kernel32")), "GetDynamicTimeZoneInformation");
+ pfnGetDynamicTimeZoneInformation = (pfnGetDynamicTimeZoneInformation_t)GetProcAddress(GetModuleHandle(L"kernel32"), "GetDynamicTimeZoneInformation");
if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, tszKey, 0, KEY_ENUMERATE_SUB_KEYS, &hKey)) {
DWORD dwIndex = 0;
@@ -552,7 +552,7 @@ void InitTimeZones(void) dwSize = sizeof(tszName);
DWORD dwLength = sizeof(tzi);
- if (ERROR_SUCCESS != RegQueryValueEx(hSubKey, _T("TZI"), NULL, NULL, (unsigned char *)&tzi, &dwLength))
+ if (ERROR_SUCCESS != RegQueryValueEx(hSubKey, L"TZI", NULL, NULL, (unsigned char *)&tzi, &dwLength))
continue;
MIM_TIMEZONE *tz = new MIM_TIMEZONE;
@@ -567,9 +567,9 @@ void InitTimeZones(void) tz->hash = mir_hashstrT(tszName);
tz->offset = INT_MIN;
- GetLocalizedString(hSubKey, _T("Display"), tz->szDisplay, _countof(tz->szDisplay));
- GetLocalizedString(hSubKey, _T("Std"), tz->tzi.StandardName, _countof(tz->tzi.StandardName));
- GetLocalizedString(hSubKey, _T("Dlt"), tz->tzi.DaylightName, _countof(tz->tzi.DaylightName));
+ GetLocalizedString(hSubKey, L"Display", tz->szDisplay, _countof(tz->szDisplay));
+ GetLocalizedString(hSubKey, L"Std", tz->tzi.StandardName, _countof(tz->tzi.StandardName));
+ GetLocalizedString(hSubKey, L"Dlt", tz->tzi.DaylightName, _countof(tz->tzi.DaylightName));
g_timezones.insert(tz);
g_timezonesBias.insert(tz);
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index f9dec18581..0860e797f9 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -2372,7 +2372,7 @@ void CCtrlBase::SetTextA(const char *text) void CCtrlBase::SetInt(int value)
{
TCHAR buf[32] = { 0 };
- mir_sntprintf(buf, _T("%d"), value);
+ mir_sntprintf(buf, L"%d", value);
SetWindowText(m_hwnd, buf);
}
diff --git a/src/mir_core/src/winver.cpp b/src/mir_core/src/winver.cpp index 5c7e983761..cdda5b55cc 100644 --- a/src/mir_core/src/winver.cpp +++ b/src/mir_core/src/winver.cpp @@ -69,9 +69,9 @@ MIR_CORE_DLL(BOOL) IsFullScreen() // check foregroundwindow
HWND hWnd = GetForegroundWindow();
if (hWnd && hWnd != hWndDesktop && hWnd != hWndShell) {
- TCHAR tszClassName[128] = _T("");
+ TCHAR tszClassName[128] = L"";
GetClassName(hWnd, tszClassName, _countof(tszClassName));
- if (_tcscmp(tszClassName, _T("WorkerW"))) {
+ if (_tcscmp(tszClassName, L"WorkerW")) {
RECT rect, rectw, recti;
GetWindowRect(hWnd, &rectw);
@@ -95,7 +95,7 @@ MIR_CORE_DLL(BOOL) IsWorkstationLocked(void) TCHAR tszName[100];
DWORD cbName;
- BOOL bLocked = (!GetUserObjectInformation(hDesk, UOI_NAME, tszName, _countof(tszName), &cbName) || mir_tstrcmpi(tszName, _T("default")) != 0);
+ BOOL bLocked = (!GetUserObjectInformation(hDesk, UOI_NAME, tszName, _countof(tszName), &cbName) || mir_tstrcmpi(tszName, L"default") != 0);
CloseDesktop(hDesk);
return bLocked;
}
@@ -220,192 +220,192 @@ MIR_CORE_DLL(BOOL) GetOSDisplayString(TCHAR *buf, size_t bufSize) SYSTEM_INFO sysInfo = { 0 };
GetNativeSystemInfo(&sysInfo);
- CMString ret(_T("Microsoft "));
+ CMString ret(L"Microsoft ");
// Test for the specific product.
if (osvi.dwMajorVersion >= 6) {
if (osvi.dwMajorVersion == 10) {
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Windows 10 "));
+ ret.Append(L"Windows 10 ");
else
- ret.Append(_T("Windows Server 10 "));
+ ret.Append(L"Windows Server 10 ");
}
else switch (osvi.dwMinorVersion) {
case 0:
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Windows Vista "));
+ ret.Append(L"Windows Vista ");
else
- ret.Append(_T("Windows Server 2008 "));
+ ret.Append(L"Windows Server 2008 ");
break;
case 1:
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Windows 7 "));
+ ret.Append(L"Windows 7 ");
else
- ret.Append(_T("Windows Server 2008 R2 "));
+ ret.Append(L"Windows Server 2008 R2 ");
break;
case 2:
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Windows 8 "));
+ ret.Append(L"Windows 8 ");
else
- ret.Append(_T("Windows Server 2012 "));
+ ret.Append(L"Windows Server 2012 ");
break;
case 3:
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Windows 8.1 "));
+ ret.Append(L"Windows 8.1 ");
else
- ret.Append(_T("Windows Server 2012 R2 "));
+ ret.Append(L"Windows Server 2012 R2 ");
break;
}
DWORD dwType = 0;
- HMODULE hKernel = GetModuleHandle(_T("kernel32.dll"));
+ HMODULE hKernel = GetModuleHandle(L"kernel32.dll");
PGPI pGPI = (PGPI)GetProcAddress(hKernel, "GetProductInfo");
if (pGPI != NULL)
pGPI(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &dwType);
switch (dwType) {
case PRODUCT_ULTIMATE:
- ret.Append(_T("Ultimate Edition"));
+ ret.Append(L"Ultimate Edition");
break;
case PRODUCT_PROFESSIONAL:
- ret.Append(_T("Professional Edition"));
+ ret.Append(L"Professional Edition");
break;
case PRODUCT_PROFESSIONAL_WMC:
- ret.Append(_T("Professional Edition with Media Center"));
+ ret.Append(L"Professional Edition with Media Center");
break;
case PRODUCT_HOME_PREMIUM:
- ret.Append(_T("Home Premium Edition"));
+ ret.Append(L"Home Premium Edition");
break;
case PRODUCT_HOME_BASIC:
- ret.Append(_T("Home Basic Edition"));
+ ret.Append(L"Home Basic Edition");
break;
case PRODUCT_ENTERPRISE:
- ret.Append(_T("Enterprise Edition"));
+ ret.Append(L"Enterprise Edition");
break;
case PRODUCT_BUSINESS:
- ret.Append(_T("Business Edition"));
+ ret.Append(L"Business Edition");
break;
case PRODUCT_STARTER:
- ret.Append(_T("Starter Edition"));
+ ret.Append(L"Starter Edition");
break;
case PRODUCT_CLUSTER_SERVER:
- ret.Append(_T("Cluster Server Edition"));
+ ret.Append(L"Cluster Server Edition");
break;
case PRODUCT_DATACENTER_SERVER:
- ret.Append(_T("Datacenter Edition"));
+ ret.Append(L"Datacenter Edition");
break;
case PRODUCT_DATACENTER_SERVER_CORE:
- ret.Append(_T("Datacenter Edition (core installation)"));
+ ret.Append(L"Datacenter Edition (core installation)");
break;
case PRODUCT_ENTERPRISE_SERVER:
- ret.Append(_T("Enterprise Edition"));
+ ret.Append(L"Enterprise Edition");
break;
case PRODUCT_ENTERPRISE_SERVER_CORE:
- ret.Append(_T("Enterprise Edition (core installation)"));
+ ret.Append(L"Enterprise Edition (core installation)");
break;
case PRODUCT_ENTERPRISE_SERVER_IA64:
- ret.Append(_T("Enterprise Edition for Itanium-based Systems"));
+ ret.Append(L"Enterprise Edition for Itanium-based Systems");
break;
case PRODUCT_SMALLBUSINESS_SERVER:
- ret.Append(_T("Small Business Server"));
+ ret.Append(L"Small Business Server");
break;
case PRODUCT_SMALLBUSINESS_SERVER_PREMIUM:
- ret.Append(_T("Small Business Server Premium Edition"));
+ ret.Append(L"Small Business Server Premium Edition");
break;
case PRODUCT_STANDARD_SERVER:
- ret.Append(_T("Standard Edition"));
+ ret.Append(L"Standard Edition");
break;
case PRODUCT_STANDARD_SERVER_CORE:
- ret.Append(_T("Standard Edition (core installation)"));
+ ret.Append(L"Standard Edition (core installation)");
break;
case PRODUCT_WEB_SERVER:
- ret.Append(_T("Web Server Edition"));
+ ret.Append(L"Web Server Edition");
break;
}
if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
- ret.Append(_T(", 64-bit"));
+ ret.Append(L", 64-bit");
else if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
- ret.Append(_T(", 32-bit"));
+ ret.Append(L", 32-bit");
}
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) {
if (GetSystemMetrics(SM_SERVERR2))
- ret.Append(_T("Windows Server 2003 R2, "));
+ ret.Append(L"Windows Server 2003 R2, ");
else if (osvi.wSuiteMask == VER_SUITE_STORAGE_SERVER)
- ret.Append(_T("Windows Storage Server 2003"));
+ ret.Append(L"Windows Storage Server 2003");
else if (osvi.wSuiteMask == VER_SUITE_WH_SERVER)
- ret.Append(_T("Windows Home Server"));
+ ret.Append(L"Windows Home Server");
else if (osvi.wProductType == VER_NT_WORKSTATION && sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
- ret.Append(_T("Windows XP Professional x64 Edition"));
+ ret.Append(L"Windows XP Professional x64 Edition");
else
- ret.Append(_T("Windows Server 2003, "));
+ ret.Append(L"Windows Server 2003, ");
// Test for the server type.
if (osvi.wProductType != VER_NT_WORKSTATION) {
if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) {
if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
- ret.Append(_T("Datacenter Edition for Itanium-based Systems"));
+ ret.Append(L"Datacenter Edition for Itanium-based Systems");
else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
- ret.Append(_T("Enterprise Edition for Itanium-based Systems"));
+ ret.Append(L"Enterprise Edition for Itanium-based Systems");
}
else if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
- ret.Append(_T("Datacenter x64 Edition"));
+ ret.Append(L"Datacenter x64 Edition");
else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
- ret.Append(_T("Enterprise x64 Edition"));
- else ret.Append(_T("Standard x64 Edition"));
+ ret.Append(L"Enterprise x64 Edition");
+ else ret.Append(L"Standard x64 Edition");
}
else {
if (osvi.wSuiteMask & VER_SUITE_COMPUTE_SERVER)
- ret.Append(_T("Compute Cluster Edition"));
+ ret.Append(L"Compute Cluster Edition");
else if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
- ret.Append(_T("Datacenter Edition"));
+ ret.Append(L"Datacenter Edition");
else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
- ret.Append(_T("Enterprise Edition"));
+ ret.Append(L"Enterprise Edition");
else if (osvi.wSuiteMask & VER_SUITE_BLADE)
- ret.Append(_T("Web Edition"));
- else ret.Append(_T("Standard Edition"));
+ ret.Append(L"Web Edition");
+ else ret.Append(L"Standard Edition");
}
}
}
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) {
- ret.Append(_T("Windows XP "));
+ ret.Append(L"Windows XP ");
if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
- ret.Append(_T("Home Edition"));
- else ret.Append(_T("Professional"));
+ ret.Append(L"Home Edition");
+ else ret.Append(L"Professional");
}
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) {
- ret.Append(_T("Windows 2000 "));
+ ret.Append(L"Windows 2000 ");
if (osvi.wProductType == VER_NT_WORKSTATION)
- ret.Append(_T("Professional"));
+ ret.Append(L"Professional");
else {
if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
- ret.Append(_T("Datacenter Server"));
+ ret.Append(L"Datacenter Server");
else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
- ret.Append(_T("Advanced Server"));
- else ret.Append(_T("Server"));
+ ret.Append(L"Advanced Server");
+ else ret.Append(L"Server");
}
}
// Include service pack (if any) and build number.
if (mir_tstrlen(osvi.szCSDVersion) > 0) {
- ret.Append(_T(" "));
+ ret.Append(L" ");
ret.Append(osvi.szCSDVersion);
}
- ret.AppendFormat(_T(" (build %d)"), osvi.dwBuildNumber);
+ ret.AppendFormat(L" (build %d)", osvi.dwBuildNumber);
HMODULE hNtDll = GetModuleHandleA("ntdll.dll");
if (WGV wine_get_version = (WGV)GetProcAddress(hNtDll, "wine_get_version"))
{
- ret.AppendFormat(_T(" (Wine %s)"), _A2T(wine_get_version()));
+ ret.AppendFormat(L" (Wine %s)", _A2T(wine_get_version()));
}
mir_tstrncpy(buf, ret, bufSize);
diff --git a/src/miranda32/src/miranda.cpp b/src/miranda32/src/miranda.cpp index fdb2ec3a0e..d8c1b60ad2 100644 --- a/src/miranda32/src/miranda.cpp +++ b/src/miranda32/src/miranda.cpp @@ -39,26 +39,26 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int) p[1] = 0;
SetCurrentDirectory(tszPath);
- _tcsncat_s(tszPath, _T("libs"), _TRUNCATE);
+ _tcsncat_s(tszPath, L"libs", _TRUNCATE);
DWORD cbPath = (DWORD)_tcslen(tszPath);
- DWORD cbSize = GetEnvironmentVariable(_T("PATH"), NULL, 0);
+ DWORD cbSize = GetEnvironmentVariable(L"PATH", NULL, 0);
TCHAR *ptszVal = new TCHAR[cbSize + MAX_PATH + 2];
_tcscpy(ptszVal, tszPath);
- _tcscat(ptszVal, _T(";"));
- GetEnvironmentVariable(_T("PATH"), ptszVal + cbPath + 1, cbSize);
- SetEnvironmentVariable(_T("PATH"), ptszVal);
+ _tcscat(ptszVal, L";");
+ GetEnvironmentVariable(L"PATH", ptszVal + cbPath + 1, cbSize);
+ SetEnvironmentVariable(L"PATH", ptszVal);
int retVal;
- HINSTANCE hMirApp = LoadLibrary(_T("mir_app.mir"));
+ HINSTANCE hMirApp = LoadLibrary(L"mir_app.mir");
if (hMirApp == NULL) {
- MessageBox(NULL, _T("mir_app.mir cannot be loaded"), _T("Fatal error"), MB_ICONERROR | MB_OK);
+ MessageBox(NULL, L"mir_app.mir cannot be loaded", L"Fatal error", MB_ICONERROR | MB_OK);
retVal = 1;
}
else {
pfnMain fnMain = (pfnMain)GetProcAddress(hMirApp, "mir_main");
if (fnMain == NULL) {
- MessageBox(NULL, _T("invalid mir_app.mir present, program exiting"), _T("Fatal error"), MB_ICONERROR | MB_OK);
+ MessageBox(NULL, L"invalid mir_app.mir present, program exiting", L"Fatal error", MB_ICONERROR | MB_OK);
retVal = 2;
}
else
diff --git a/tools/checksum/checksum.cpp b/tools/checksum/checksum.cpp index 6318cc66a6..e57afaebae 100644 --- a/tools/checksum/checksum.cpp +++ b/tools/checksum/checksum.cpp @@ -106,16 +106,16 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) if ( debug ) {
switch(machine) {
case IMAGE_FILE_MACHINE_I386:
- _ftprintf( stderr, _T("Build: x86\n"));
+ _ftprintf( stderr, L"Build: x86\n");
break;
case IMAGE_FILE_MACHINE_AMD64:
- _ftprintf( stderr, _T("Build: x64\n"));
+ _ftprintf( stderr, L"Build: x64\n");
break;
case IMAGE_FILE_MACHINE_IA64:
- _ftprintf( stderr, _T("Build: IA64 :-)\n"));
+ _ftprintf( stderr, L"Build: IA64 :-)\n");
break;
default:
- _ftprintf( stderr, _T("Build: unknown :-(\n"));
+ _ftprintf( stderr, L"Build: unknown :-(\n");
break;
}
}
@@ -157,7 +157,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) #ifdef DEBUG_REALLOCS
if ( debug )
- _ftprintf( stderr, _T("Image base is 0x%I64x \n"), base );
+ _ftprintf( stderr, L"Image base is 0x%I64x \n", base );
#endif
if ( pIDD ) {
// Debugging information entry
@@ -199,7 +199,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) #ifdef DEBUG_SECTIONS
if ( debug )
- _ftprintf( stderr, _T("Found debug section entry at 0x%08X (%d), data at 0x%08X (%d)\n"), pISH->PointerToRawData + shift, dbgSize, pDBG->PointerToRawData, pDBG->SizeOfData );
+ _ftprintf( stderr, L"Found debug section entry at 0x%08X (%d), data at 0x%08X (%d)\n", pISH->PointerToRawData + shift, dbgSize, pDBG->PointerToRawData, pDBG->SizeOfData );
#endif
}
@@ -214,7 +214,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) pEXP->TimeDateStamp = 0;
#ifdef DEBUG_SECTIONS
if ( debug )
- _ftprintf( stderr, _T("Found export section entry at 0x%08X\n"), pISH->PointerToRawData + shift );
+ _ftprintf( stderr, L"Found export section entry at 0x%08X\n", pISH->PointerToRawData + shift );
#endif
}
@@ -227,7 +227,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) pRealloc = ptr + shift + pISH->PointerToRawData;
#ifdef DEBUG_SECTIONS
if ( debug )
- _ftprintf( stderr, _T("Found reallocation table entry at 0x%08X (%d)\n"), pISH->PointerToRawData + shift, relocSize );
+ _ftprintf( stderr, L"Found reallocation table entry at 0x%08X (%d)\n", pISH->PointerToRawData + shift, relocSize );
#endif
}
}
@@ -288,7 +288,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) pw = (PWORD)((PBYTE)pIBR + sizeof(IMAGE_BASE_RELOCATION));
#ifdef DEBUG_REALLOCS
if ( debug )
- _ftprintf( stderr, _T("Realloc block at %08X (%d)\n"), pIBR->VirtualAddress, pIBR->SizeOfBlock );
+ _ftprintf( stderr, L"Realloc block at %08X (%d)\n", pIBR->VirtualAddress, pIBR->SizeOfBlock );
#endif
while( len > 0 )
@@ -308,7 +308,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) }
#ifdef DEBUG_REALLOCS
if ( debug && ( *(PDWORD)pAddr < (DWORD)base ))
- _ftprintf( stderr, _T("Realloc address is less than base\n"));
+ _ftprintf( stderr, L"Realloc address is less than base\n");
#endif
*(PDWORD)pAddr = (DWORD)((*(PDWORD)pAddr) - (DWORD)base );
break;
@@ -321,7 +321,7 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) }
#ifdef DEBUG_REALLOCS
if ( debug && ( *(ULONGLONG*)pAddr < base ))
- _ftprintf( stderr, _T("Realloc address is less than base\n"));
+ _ftprintf( stderr, L"Realloc address is less than base\n");
#endif
*(ULONGLONG*)pAddr = (ULONGLONG)((*(ULONGLONG*)pAddr) - base );
break;
@@ -336,14 +336,14 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) case IMAGE_REL_BASED_HIGHADJ:
#ifdef DEBUG_REALLOCS
if ( debug )
- _ftprintf( stderr, _T("Unexpected block type %d\n"), type );
+ _ftprintf( stderr, L"Unexpected block type %d\n", type );
#endif
break;
default:
#ifdef DEBUG_REALLOCS
if ( debug )
- _ftprintf( stderr, _T("Unknown block type %d\n"), type );
+ _ftprintf( stderr, L"Unknown block type %d\n", type );
#endif
break;
}
@@ -371,11 +371,11 @@ int PEChecksum( TCHAR *filename, BYTE digest[16] ) mir_md5_append( &pms2, ptr + pISH->PointerToRawData, pISH->SizeOfRawData );
mir_md5_finish( &pms2, digest2 );
- _ftprintf( stderr, _T("%s - %08X - %d "), pISH->Name, pISH->PointerToRawData, pISH->SizeOfRawData);
+ _ftprintf( stderr, L"%s - %08X - %d ", pISH->Name, pISH->PointerToRawData, pISH->SizeOfRawData);
for ( i = 0; i < sizeof( digest2 ) / sizeof( digest2[0] ); i++ )
- _ftprintf( stderr, _T("%02X"), digest2[i] );
- _ftprintf( stderr, _T("\n"));
+ _ftprintf( stderr, L"%02X", digest2[i] );
+ _ftprintf( stderr, L"\n");
}
#endif
@@ -429,24 +429,24 @@ int process(TCHAR *filename) switch(res) {
case RESULT_NOTFOUND:
- _ftprintf( stderr, _T("'%s'... not found!\n"), filename );
+ _ftprintf( stderr, L"'%s'... not found!\n", filename );
break;
case RESULT_READERROR:
- _ftprintf( stderr, _T("'%s'... read error!\n"), filename );
+ _ftprintf( stderr, L"'%s'... read error!\n", filename );
break;
case RESULT_NOTPE:
- _ftprintf( stderr, _T("'%s'... not PE type!\n"), filename );
+ _ftprintf( stderr, L"'%s'... not PE type!\n", filename );
break;
case RESULT_CORRUPTED:
- _ftprintf( stderr, _T("'%s'... corrupted!\n"), filename );
+ _ftprintf( stderr, L"'%s'... corrupted!\n", filename );
break;
case RESULT_OK:
{
int i;
- _ftprintf( stdout, _T("%s "), filename );
+ _ftprintf( stdout, L"%s ", filename );
for ( i = 0; i < sizeof( digest ) / sizeof( digest[0] ); i++ )
- _ftprintf( stdout, _T("%02X"), digest[i] );
- _ftprintf( stdout, _T("\n"));
+ _ftprintf( stdout, L"%02X", digest[i] );
+ _ftprintf( stdout, L"\n");
break;
}
default:
@@ -463,7 +463,7 @@ int _tmain( int argc, TCHAR *argv[] ) int cnt = 0;
int i;
- _ftprintf( stderr, _T("* PE CHECKSUM TOOL * VERSION %s * by Bio (c) 2012\n\n"), _VERSION_ );
+ _ftprintf( stderr, L"* PE CHECKSUM TOOL * VERSION %s * by Bio (c) 2012\n\n", _VERSION_ );
if ( argc > 1 )
{
@@ -472,18 +472,18 @@ int _tmain( int argc, TCHAR *argv[] ) for ( i = 1; i < argc; i++ )
{
- if ( !_tcscmp( argv[i], _T("/debug")) || !_tcscmp( argv[i], _T("/DEBUG")))
+ if ( !_tcscmp( argv[i], L"/debug") || !_tcscmp( argv[i], L"/DEBUG"))
{
debug = 1;
break;
}
}
- _ftprintf( stderr, _T("Processing ... \n"));
+ _ftprintf( stderr, L"Processing ... \n");
for ( i = 1; i < argc; i++ )
{
- if ( !_tcscmp( argv[i], _T("/stdin")) || !_tcscmp( argv[i], _T("/STDIN")))
+ if ( !_tcscmp( argv[i], L"/stdin") || !_tcscmp( argv[i], L"/STDIN"))
{
while ( _fgetts( buf, sizeof( buf ), stdin ) != NULL )
{
@@ -510,12 +510,12 @@ int _tmain( int argc, TCHAR *argv[] ) FindClose( hFind );
}
- _ftprintf( stderr, _T("%d file(s) processed.\n"), cnt );
+ _ftprintf( stderr, L"%d file(s) processed.\n", cnt );
}
else
{
- _ftprintf( stderr, _T("Usage: checksum.exe [/debug] [/stdin] [*.dll] ... [*.exe]\n"));
- _ftprintf( stderr, _T("Example: dir /b /s | checksum.exe /stdin > hashes.txt\n"));
+ _ftprintf( stderr, L"Usage: checksum.exe [/debug] [/stdin] [*.dll] ... [*.exe]\n");
+ _ftprintf( stderr, L"Example: dir /b /s | checksum.exe /stdin > hashes.txt\n");
res = RESULT_NONE;
}
diff --git a/utils/mir_buffer.h b/utils/mir_buffer.h index 6c58b538d2..584ca12149 100644 --- a/utils/mir_buffer.h +++ b/utils/mir_buffer.h @@ -457,14 +457,14 @@ static void ReplaceVars(Buffer<TCHAR> *buffer, MCONTACT hContact, TCHAR **variab if (buffer->str[j] == _T('%')) { size_t foundLen = i - j + 1; - if (foundLen == 9 && _tcsncmp(&buffer->str[j], _T("%contact%"), 9) == 0) + if (foundLen == 9 && _tcsncmp(&buffer->str[j], L"%contact%", 9) == 0) { buffer->replace(j, i + 1, pcli->pfnGetContactDisplayName(hContact, 0)); } - else if (foundLen == 6 && _tcsncmp(&buffer->str[j], _T("%date%"), 6) == 0) + else if (foundLen == 6 && _tcsncmp(&buffer->str[j], L"%date%", 6) == 0) { TCHAR tmp[128]; - TimeZone_ToStringT(time(NULL), _T("d s"), tmp, _countof(tmp)); + TimeZone_ToStringT(time(NULL), L"d s", tmp, _countof(tmp)); buffer->replace(j, i + 1, tmp); } else diff --git a/utils/mir_options.cpp b/utils/mir_options.cpp index acf9ff9531..afdc407708 100644 --- a/utils/mir_options.cpp +++ b/utils/mir_options.cpp @@ -71,7 +71,7 @@ static void PathToRelative(TCHAR *pOut, size_t outSize, const TCHAR *pSrc) if (dbPath[0] == _T('\0')) { char tmp[1024]; CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp); - mir_sntprintf(dbPath, _T("%S\\"), tmp); + mir_sntprintf(dbPath, L"%S\\", tmp); } size_t len = mir_tstrlen(dbPath); @@ -89,10 +89,10 @@ static void PathToAbsolute(TCHAR *pOut, size_t outSize, const TCHAR *pSrc) if (dbPath[0] == _T('\0')) { char tmp[1024]; CallService(MS_DB_GETPROFILEPATH, _countof(tmp), (LPARAM)tmp); - mir_sntprintf(dbPath, _T("%S\\"), tmp); + mir_sntprintf(dbPath, L"%S\\", tmp); } - mir_sntprintf(pOut, outSize, _T("%s%s"), dbPath, pSrc); + mir_sntprintf(pOut, outSize, L"%s%s", dbPath, pSrc); } } diff --git a/utils/mir_smileys.cpp b/utils/mir_smileys.cpp index 375a5bba64..a337b5b2f1 100644 --- a/utils/mir_smileys.cpp +++ b/utils/mir_smileys.cpp @@ -276,7 +276,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort i = 0; // Get real height of the line - text_height = skin_DrawText(hdcMem, _T("A"), 1, &tmp_rc, DT_CALCRECT | uTextFormat); + text_height = skin_DrawText(hdcMem, L"A", 1, &tmp_rc, DT_CALCRECT | uTextFormat); if (uTextFormat & DT_RESIZE_SMILEYS) row_height = text_height; else @@ -285,7 +285,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort // Just draw ellipsis if (free_rc.right <= free_rc.left) { - skin_DrawText(hdcMem, _T("..."), 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS); + skin_DrawText(hdcMem, L"...", 3, &free_rc, uTextFormat & ~DT_END_ELLIPSIS); } else { @@ -349,7 +349,7 @@ void DrawTextSmiley(HDC hdcMem, RECT free_rc, const TCHAR *szText, int len, Sort else { text_rc.top += (row_height - text_height) >> 1; - skin_DrawText(hdcMem, _T("..."), 3, &text_rc, uTextFormat); + skin_DrawText(hdcMem, L"...", 3, &text_rc, uTextFormat); } pos_x += (LONG)(piece->smiley_width * factor); diff --git a/utils/std_string_utils.cpp b/utils/std_string_utils.cpp index be23aaeeeb..5991106b45 100644 --- a/utils/std_string_utils.cpp +++ b/utils/std_string_utils.cpp @@ -381,17 +381,17 @@ std::string utils::text::source_get_form_data(std::string* data, boolean hiddenO std::tstring utils::text::prepare_name(const std::tstring &name, bool withSurnameLetter)
{
- std::tstring::size_type pos = name.find(_T(" "));
+ std::tstring::size_type pos = name.find(L" ");
if (pos == std::tstring::npos)
return name;
std::tstring result = name.substr(0, pos);
if (withSurnameLetter) {
- pos = name.rfind(_T(" ")) + 1; // we're sure there is some space in name so we can do +1 safely
+ pos = name.rfind(L" ") + 1; // we're sure there is some space in name so we can do +1 safely
if (pos < name.length())
- result += _T(" ") + name.substr(pos, 1) + std::tstring(_T("."));
+ result += L" " + name.substr(pos, 1) + std::tstring(L".");
}
return result;
diff --git a/utils/utf8_helpers.h b/utils/utf8_helpers.h index 25e243c203..4928f04557 100644 --- a/utils/utf8_helpers.h +++ b/utils/utf8_helpers.h @@ -33,11 +33,11 @@ public: { int size = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); if (size <= 0) - throw _T("Could not convert string to WCHAR"); + throw L"Could not convert string to WCHAR"; WCHAR *tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR)); if (tmp == NULL) - throw _T("mir_alloc returned NULL"); + throw L"mir_alloc returned NULL"; MultiByteToWideChar(CP_ACP, 0, str, -1, tmp, size); @@ -88,11 +88,11 @@ private: { int size = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); if (size <= 0) - throw _T("Could not convert string to UTF8"); + throw L"Could not convert string to UTF8"; utf8 = (char *) mir_alloc(size); if (utf8 == NULL) - throw _T("mir_alloc returned NULL"); + throw L"mir_alloc returned NULL"; WideCharToMultiByte(CP_UTF8, 0, str, -1, utf8, size, NULL, NULL); } @@ -110,11 +110,11 @@ public: int size = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); if (size <= 0) - throw _T("Could not convert string to WCHAR"); + throw L"Could not convert string to WCHAR"; WCHAR *tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR)); if (tmp == NULL) - throw _T("mir_alloc returned NULL"); + throw L"mir_alloc returned NULL"; MultiByteToWideChar(CP_UTF8, 0, str, -1, tmp, size); @@ -128,14 +128,14 @@ public: if (size <= 0) { mir_free(tmp); - throw _T("Could not convert string to ACP"); + throw L"Could not convert string to ACP"; } tchar = (TCHAR *) mir_alloc(size * sizeof(char)); if (tchar == NULL) { mir_free(tmp); - throw _T("mir_alloc returned NULL"); + throw L"mir_alloc returned NULL"; } WideCharToMultiByte(CP_ACP, 0, tmp, -1, tchar, size, NULL, NULL); |