From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/cache.cpp | 2 +- plugins/AVS/src/main.cpp | 8 +++---- plugins/AVS/src/options.cpp | 12 +++++------ plugins/AVS/src/services.cpp | 50 ++++++++++++++++++++++---------------------- 4 files changed, 36 insertions(+), 36 deletions(-) (limited to 'plugins/AVS/src') 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]; -- cgit v1.2.3