From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/src/file.cpp | 6 +++--- src/core/stdfile/src/fileopts.cpp | 8 ++++---- src/core/stdfile/src/filerecvdlg.cpp | 16 ++++++++-------- src/core/stdfile/src/filesenddlg.cpp | 2 +- src/core/stdfile/src/filexferdlg.cpp | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 2d394b6ab0..3de6a7e28a 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -36,7 +36,7 @@ wchar_t* GetContactID(MCONTACT hContact) { char *szProto = GetContactProto(hContact); if (db_get_b(hContact, szProto, "ChatRoom", 0) == 1) - if (wchar_t *theValue = db_get_tsa(hContact, szProto, "ChatRoomID")) + if (wchar_t *theValue = db_get_wsa(hContact, szProto, "ChatRoomID")) return theValue; return Contact_GetInfo(CNF_UNIQUEID, hContact, szProto); @@ -212,7 +212,7 @@ void CopyProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANSFE } if (src->tszWorkingDir) dest->tszWorkingDir = PFTS_StringToTchar(src->flags, src->tszWorkingDir); dest->flags &= ~PFTS_UTF; - dest->flags |= PFTS_TCHAR; + dest->flags |= PFTS_UNICODE; } void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANSFERSTATUS *src) @@ -266,7 +266,7 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS dest->currentFileProgress = src->currentFileProgress; dest->currentFileTime = src->currentFileTime; dest->flags &= ~PFTS_UTF; - dest->flags |= PFTS_TCHAR; + dest->flags |= PFTS_UNICODE; } static void RemoveUnreadFileEvents(void) diff --git a/src/core/stdfile/src/fileopts.cpp b/src/core/stdfile/src/fileopts.cpp index 93aca138ae..0a021853a4 100644 --- a/src/core/stdfile/src/fileopts.cpp +++ b/src/core/stdfile/src/fileopts.cpp @@ -90,7 +90,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L } DBVARIANT dbv; - if (db_get_ts(NULL, "SRFile", "ScanCmdLine", &dbv) == 0) { + if (db_get_ws(NULL, "SRFile", "ScanCmdLine", &dbv) == 0) { SetDlgItemText(hwndDlg, IDC_SCANCMDLINE, dbv.ptszVal); db_free(&dbv); } @@ -165,7 +165,7 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L wchar_t str[MAX_PATH + 2]; GetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str, _countof(str)); - CMString tszFilter; + CMStringW tszFilter; tszFilter.AppendFormat(L"%s (*.exe)%c*.exe%c", TranslateT("Executable files"), 0, 0); tszFilter.AppendFormat(L"%s (*)%c*%c", TranslateT("All files"), 0, 0); @@ -205,14 +205,14 @@ static INT_PTR CALLBACK DlgProcFileOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L wchar_t str[512]; GetDlgItemText(hwndDlg, IDC_FILEDIR, str, _countof(str)); RemoveInvalidPathChars(str); - db_set_ts(NULL, "SRFile", "RecvFilesDirAdv", str); + db_set_ws(NULL, "SRFile", "RecvFilesDirAdv", str); db_set_b(NULL, "SRFile", "AutoAccept", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOACCEPT)); db_set_b(NULL, "SRFile", "AutoMin", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOMIN)); db_set_b(NULL, "SRFile", "AutoClose", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOCLOSE)); db_set_b(NULL, "SRFile", "AutoClear", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOCLEAR)); db_set_b(NULL, "SRFile", "UseScanner", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SCANAFTERDL) ? VIRUSSCAN_AFTERDL : (IsDlgButtonChecked(hwndDlg, IDC_SCANDURINGDL) ? VIRUSSCAN_DURINGDL : VIRUSSCAN_DISABLE))); GetDlgItemText(hwndDlg, IDC_SCANCMDLINE, str, _countof(str)); - db_set_ts(NULL, "SRFile", "ScanCmdLine", str); + db_set_ws(NULL, "SRFile", "ScanCmdLine", str); db_set_b(NULL, "SRFile", "WarnBeforeOpening", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_WARNBEFOREOPENING)); db_set_b(NULL, "SRFile", "IfExists", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ASK) ? FILERESUME_ASK : (IsDlgButtonChecked(hwndDlg, IDC_RESUME) ? FILERESUME_RESUMEALL : (IsDlgButtonChecked(hwndDlg, IDC_OVERWRITE) ? FILERESUME_OVERWRITEALL : FILERESUME_RENAMEALL)))); return TRUE; diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 06f182cd42..660b717bae 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -125,7 +125,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, wchar_t *szDir, int cchDir, B { wchar_t tszTemp[MAX_PATH]; - ptrW tszRecvPath(db_get_tsa(NULL, "SRFile", "RecvFilesDirAdv")); + ptrW tszRecvPath(db_get_wsa(NULL, "SRFile", "RecvFilesDirAdv")); if (tszRecvPath) wcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE); else @@ -165,7 +165,7 @@ void GetReceivedFilesDir(wchar_t *szDir, int cchDir) { wchar_t tszTemp[MAX_PATH]; - ptrW tszRecvPath(db_get_tsa(NULL, "SRFile", "RecvFilesDirAdv")); + ptrW tszRecvPath(db_get_wsa(NULL, "SRFile", "RecvFilesDirAdv")); if (tszRecvPath) wcsncpy_s(tszTemp, tszRecvPath, _TRUNCATE); else @@ -214,7 +214,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l mir_snprintf(idstr, "MruDir%d", i); DBVARIANT dbv; - if (db_get_ts(NULL, "SRFile", idstr, &dbv)) + if (db_get_ws(NULL, "SRFile", idstr, &dbv)) break; SendDlgItemMessage(hwndDlg, IDC_FILEDIR, CB_ADDSTRING, 0, (LPARAM)dbv.ptszVal); db_free(&dbv); @@ -237,8 +237,8 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l unsigned len = (unsigned)mir_strlen(str) + 1; if (len + 4 < dbei.cbBlob) { str += len; - ptrW ptszDescription(DbGetEventStringT(&dbei, str)); - SetDlgItemText(hwndDlg, IDC_MSG, ptszDescription); + ptrW pwszDescription(DbGetEventStringT(&dbei, str)); + SetDlgItemText(hwndDlg, IDC_MSG, pwszDescription); } } else DestroyWindow(hwndDlg); @@ -313,12 +313,12 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DBVARIANT dbv; for (i = MAX_MRU_DIRS-2;i>=0;i--) { mir_snprintf(idstr, "MruDir%d", i); - if (db_get_ts(NULL, "SRFile", idstr, &dbv)) continue; + if (db_get_ws(NULL, "SRFile", idstr, &dbv)) continue; mir_snprintf(idstr, "MruDir%d", i+1); - db_set_ts(NULL, "SRFile", idstr, dbv.ptszVal); + db_set_ws(NULL, "SRFile", idstr, dbv.ptszVal); db_free(&dbv); } - db_set_ts(NULL, "SRFile", idstr, szRecvDir); + db_set_ws(NULL, "SRFile", idstr, szRecvDir); } } EnableWindow(GetDlgItem(hwndDlg, IDC_FILENAMES), FALSE); diff --git a/src/core/stdfile/src/filesenddlg.cpp b/src/core/stdfile/src/filesenddlg.cpp index 4c6089c8c5..3148d36c59 100644 --- a/src/core/stdfile/src/filesenddlg.cpp +++ b/src/core/stdfile/src/filesenddlg.cpp @@ -49,7 +49,7 @@ static void SetFileListAndSizeControls(HWND hwndDlg, FileDlgData *dat) if (i > 1) { wchar_t szFormat[32]; if (fileCount && dirCount) { - mir_snwprintf(szFormat, L"%s, %s", TranslateTS(fileCount == 1 ? L"%d file" : L"%d files"), TranslateTS(dirCount == 1 ? L"%d directory" : L"%d directories")); + mir_snwprintf(szFormat, L"%s, %s", TranslateW(fileCount == 1 ? L"%d file" : L"%d files"), TranslateW(dirCount == 1 ? L"%d directory" : L"%d directories")); mir_snwprintf(str, szFormat, fileCount, dirCount); } else if (fileCount) { diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index ed513f02bb..810587b75e 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -95,7 +95,7 @@ void FillSendData(FileDlgData *dat, DBEVENTINFO& dbei) static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info) { DBVARIANT dbv; - if (!db_get_ts(NULL, "SRFile", "ScanCmdLine", &dbv)) { + if (!db_get_ws(NULL, "SRFile", "ScanCmdLine", &dbv)) { if (dbv.ptszVal[0]) { STARTUPINFO si = { 0 }; si.cb = sizeof(si); @@ -168,8 +168,8 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE enum { FTS_TEXT, FTS_PROGRESS, FTS_OPEN }; static void SetFtStatus(HWND hwndDlg, wchar_t *text, int mode) { - SetDlgItemText(hwndDlg, IDC_STATUS, TranslateTS(text)); - SetDlgItemText(hwndDlg, IDC_TRANSFERCOMPLETED, TranslateTS(text)); + SetDlgItemText(hwndDlg, IDC_STATUS, TranslateW(text)); + SetDlgItemText(hwndDlg, IDC_TRANSFERCOMPLETED, TranslateW(text)); ShowWindow(GetDlgItem(hwndDlg, IDC_STATUS), (mode == FTS_TEXT) ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(hwndDlg, IDC_ALLFILESPROGRESS), (mode == FTS_PROGRESS) ? SW_SHOW : SW_HIDE); @@ -245,7 +245,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ShowWindow(GetDlgItem(hwndDlg, IDC_OPENFOLDER), SW_HIDE); } else { //recv - CreateDirectoryTreeT(dat->szSavePath); + CreateDirectoryTreeW(dat->szSavePath); dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath); dat->transferStatus.tszWorkingDir = mir_wstrdup(dat->szSavePath); if (db_get_b(dat->hContact, "CList", "NotOnList", 0)) dat->resumeBehaviour = FILERESUME_ASK; -- cgit v1.2.3