diff options
Diffstat (limited to 'plugins')
694 files changed, 6906 insertions, 6906 deletions
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),
|