summaryrefslogtreecommitdiff
path: root/plugins/DbChecker
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/DbChecker
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbChecker')
-rw-r--r--plugins/DbChecker/src/progress.cpp2
-rw-r--r--plugins/DbChecker/src/selectdb.cpp42
2 files changed, 22 insertions, 22 deletions
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);