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/stdaway/src/sendmsg.cpp | 12 ++++++------ src/core/stdchat/src/main.cpp | 12 ++++++------ src/core/stdchat/src/options.cpp | 18 +++++++++--------- src/core/stdchat/src/tools.cpp | 4 ++-- src/core/stdchat/src/window.cpp | 6 +++--- src/core/stdclist/src/clcfonts.cpp | 16 ++++++++-------- src/core/stdclist/src/clcopts.cpp | 2 +- src/core/stdclist/src/cluiopts.cpp | 4 ++-- 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 ++++---- src/core/stdmsg/src/msgdialog.cpp | 4 ++-- src/core/stdmsg/src/msglog.cpp | 4 ++-- src/core/stdmsg/src/msgoptions.cpp | 12 ++++++------ src/core/stdmsg/src/msgs.cpp | 2 +- src/core/stduihist/src/history.cpp | 4 ++-- src/core/stduserinfo/src/contactinfo.cpp | 18 +++++++++--------- src/core/stduserinfo/src/stdinfo.cpp | 16 ++++++++-------- src/core/stduserinfo/src/userinfo.cpp | 12 ++++++------ 21 files changed, 93 insertions(+), 93 deletions(-) (limited to 'src/core') diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp index 409e598a07..982820b259 100644 --- a/src/core/stdaway/src/sendmsg.cpp +++ b/src/core/stdaway/src/sendmsg.cpp @@ -89,11 +89,11 @@ static wchar_t* GetAwayMessage(int statusMode, char *szProto) DBVARIANT dbv; if ( GetStatusModeByte(statusMode, "UsePrev")) { - if ( db_get_ts(NULL, "SRAway", StatusModeToDbSetting(statusMode, "Msg"), &dbv)) + if ( db_get_ws(NULL, "SRAway", StatusModeToDbSetting(statusMode, "Msg"), &dbv)) dbv.ptszVal = mir_wstrdup(GetDefaultMessage(statusMode)); } else { - if ( db_get_ts(NULL, "SRAway", StatusModeToDbSetting(statusMode, "Default"), &dbv)) + if ( db_get_ws(NULL, "SRAway", StatusModeToDbSetting(statusMode, "Default"), &dbv)) dbv.ptszVal = mir_wstrdup(GetDefaultMessage(statusMode)); for (int i=0; dbv.ptszVal[i]; i++) { @@ -272,7 +272,7 @@ static INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wPa wchar_t str[1024]; GetDlgItemText(hwndDlg, IDC_MSG, str, _countof(str)); ChangeAllProtoMessages(dat->szProto, dat->statusMode, str); - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(dat->statusMode, "Msg"), str); + db_set_ws(NULL, "SRAway", StatusModeToDbSetting(dat->statusMode, "Msg"), str); DestroyWindow(hwndDlg); } else PostMessage(hwndDlg, WM_CLOSE, 0, 0); @@ -395,8 +395,8 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam dat->info[j].usePrevious = GetStatusModeByte(statusModes[i], "UsePrev"); DBVARIANT dbv; - if (db_get_ts(NULL, "SRAway", StatusModeToDbSetting(statusModes[i], "Default"), &dbv)) - if (db_get_ts(NULL, "SRAway", StatusModeToDbSetting(statusModes[i], "Msg"), &dbv)) + if (db_get_ws(NULL, "SRAway", StatusModeToDbSetting(statusModes[i], "Default"), &dbv)) + if (db_get_ws(NULL, "SRAway", StatusModeToDbSetting(statusModes[i], "Msg"), &dbv)) dbv.ptszVal = mir_wstrdup(GetDefaultMessage(statusModes[i])); mir_wstrcpy(dat->info[j].msg, dbv.ptszVal); mir_free(dbv.ptszVal); @@ -501,7 +501,7 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam SetStatusModeByte(status, "Ignore", (BYTE)dat->info[i].ignore); SetStatusModeByte(status, "NoDlg", (BYTE)dat->info[i].noDialog); SetStatusModeByte(status, "UsePrev", (BYTE)dat->info[i].usePrevious); - db_set_ts(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), dat->info[i].msg); + db_set_ws(NULL, "SRAway", StatusModeToDbSetting(status, "Default"), dat->info[i].msg); } return TRUE; } diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 430992defb..07859e361a 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -285,34 +285,34 @@ static void OnLoadSettings() static void RegisterFonts() { - ColourIDT colourid = { sizeof(colourid) }; + ColourIDW colourid = { sizeof(colourid) }; strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup)); wcsncpy(colourid.group, LPGENW("Chat module"), _countof(colourid.group)); strncpy(colourid.setting, "ColorLogBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Group chat log background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "ColorMessageBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Message background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistLines", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list lines"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistSelectedBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list background (selected)"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); } static int OnCheckPlugins(WPARAM, LPARAM) diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp index 79ea5fc3d2..0635bd0b54 100644 --- a/src/core/stdchat/src/options.cpp +++ b/src/core/stdchat/src/options.cpp @@ -161,7 +161,7 @@ static void FillBranch(HWND hwndTree, HTREEITEM hParent, const struct branch_t * tvis.hInsertAfter = TVI_LAST; tvis.item.mask = TVIF_TEXT | TVIF_STATE; for (int i = 0; i < nValues; i++) { - tvis.item.pszText = TranslateTS(branch[i].szDescr); + tvis.item.pszText = TranslateW(branch[i].szDescr); tvis.item.stateMask = TVIS_STATEIMAGEMASK; if (branch[i].iMode) iState = ((db_get_dw(NULL, CHAT_MODULE, branch[i].szDBName, defaultval)&branch[i].iMode)&branch[i].iMode) != 0 ? 2 : 1; @@ -323,7 +323,7 @@ HANDLE GetIconHandle(const char *pszIcoLibName) static void InitSetting(wchar_t** ppPointer, char* pszSetting, wchar_t* pszDefault) { DBVARIANT dbv; - if (!db_get_ts(NULL, CHAT_MODULE, pszSetting, &dbv)) { + if (!db_get_ws(NULL, CHAT_MODULE, pszSetting, &dbv)) { replaceStrW(*ppPointer, dbv.ptszVal); db_free(&dbv); } @@ -574,7 +574,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, *p2 = ' '; p2 = wcschr(ptszText, ','); } - db_set_ts(NULL, CHAT_MODULE, "HighlightWords", ptszText); + db_set_ws(NULL, CHAT_MODULE, "HighlightWords", ptszText); mir_free(ptszText); } } @@ -584,7 +584,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "LogDirectory", pszText); + db_set_ws(NULL, CHAT_MODULE, "LogDirectory", pszText); } else db_unset(NULL, CHAT_MODULE, "LogDirectory"); pci->SM_InvalidateLogDirectories(); @@ -593,7 +593,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_LOGTIMESTAMP, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "LogTimestamp", pszText); + db_set_ws(NULL, CHAT_MODULE, "LogTimestamp", pszText); } else db_unset(NULL, CHAT_MODULE, "LogTimestamp"); @@ -601,7 +601,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_TIMESTAMP, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "HeaderTime", pszText); + db_set_ws(NULL, CHAT_MODULE, "HeaderTime", pszText); } else db_unset(NULL, CHAT_MODULE, "HeaderTime"); @@ -609,7 +609,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_INSTAMP, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "HeaderIncoming", pszText); + db_set_ws(NULL, CHAT_MODULE, "HeaderIncoming", pszText); } else db_unset(NULL, CHAT_MODULE, "HeaderIncoming"); @@ -617,7 +617,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_OUTSTAMP, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "HeaderOutgoing", pszText); + db_set_ws(NULL, CHAT_MODULE, "HeaderOutgoing", pszText); } else db_unset(NULL, CHAT_MODULE, "HeaderOutgoing"); @@ -636,7 +636,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iLen > 0) { pszText = (wchar_t *)mir_realloc(pszText, (iLen + 1) * sizeof(wchar_t)); GetDlgItemText(hwndDlg, IDC_GROUP, pszText, iLen + 1); - db_set_ts(NULL, CHAT_MODULE, "AddToGroup", pszText); + db_set_ws(NULL, CHAT_MODULE, "AddToGroup", pszText); } else db_set_s(NULL, CHAT_MODULE, "AddToGroup", ""); mir_free(pszText); diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 3568f75caf..54dd4cb3e8 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -50,7 +50,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour) mir_snprintf(str, "SRMFont%d", i); DBVARIANT dbv; - if (db_get_ts(NULL, "SRMM", str, &dbv)) + if (db_get_ws(NULL, "SRMM", str, &dbv)) mir_wstrcpy(lf->lfFaceName, L"Arial"); else { mir_wstrncpy(lf->lfFaceName, dbv.ptszVal, _countof(lf->lfFaceName)); @@ -160,7 +160,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO AppendMenu(*hMenu, MF_SEPARATOR, 0, 0); for (int i = 0; i < gcmi.nItems; i++) { - wchar_t* ptszText = TranslateTS(gcmi.Item[i].pszDesc); + wchar_t* ptszText = TranslateW(gcmi.Item[i].pszDesc); DWORD dwState = gcmi.Item[i].bDisabled ? MF_GRAYED : 0; if (gcmi.Item[i].uType == MENU_NEWPOPUP) { diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index b6b54681b8..c9525b7723 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -2236,14 +2236,14 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case ID_SEARCH_GOOGLE: if (pszWord[0]) - Utils_OpenUrlT(CMString(FORMAT, L"http://www.google.com/search?q=%s", pszWord)); + Utils_OpenUrlT(CMStringW(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, L"http://en.wikipedia.org/wiki/%s", pszWord)); + Utils_OpenUrlT(CMStringW(FORMAT, L"http://en.wikipedia.org/wiki/%s", pszWord)); PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0); break; @@ -2388,7 +2388,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar pci->SM_AddCommand(si->ptszID, si->pszModule, pszRtf); - CMString ptszText(ptrW(mir_utf8decodeW(pszRtf))); + CMStringW ptszText(ptrW(mir_utf8decodeW(pszRtf))); pci->DoRtfToTags(ptszText, mi->nColorCount, mi->crColors); ptszText.Trim(); ptszText.Replace(L"%", L"%%"); diff --git a/src/core/stdclist/src/clcfonts.cpp b/src/core/stdclist/src/clcfonts.cpp index 74c09a7278..dc53eed62d 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -51,7 +51,7 @@ static int FS_FontsChanged(WPARAM, LPARAM) void RegisterCListFonts() { - FontIDT fontid = { sizeof(fontid) }; + FontIDW fontid = { sizeof(fontid) }; fontid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWREREGISTER | FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS; strncpy(fontid.dbSettingsGroup, "CLC", sizeof(fontid.dbSettingsGroup)); wcsncpy(fontid.group, LPGENW("Contact list"), _countof(fontid.group)); @@ -76,13 +76,13 @@ void RegisterCListFonts() mir_snprintf(idstr, "Font%d", i); strncpy(fontid.prefix, idstr, _countof(fontid.prefix)); fontid.order = i; - FontRegisterT(&fontid); + FontRegisterW(&fontid); } ReleaseDC(NULL, hdc); // and colours - ColourIDT colourid = { 0 }; - colourid.cbSize = sizeof(ColourIDT); + ColourIDW colourid = { 0 }; + colourid.cbSize = sizeof(ColourIDW); colourid.order = 0; strncpy(colourid.dbSettingsGroup, "CLC", sizeof(colourid.dbSettingsGroup)); @@ -90,25 +90,25 @@ void RegisterCListFonts() wcsncpy(colourid.name, LPGENW("Background"), _countof(colourid.name)); wcsncpy(colourid.group, LPGENW("Contact list"), _countof(colourid.group)); colourid.defcolour = CLCDEFAULT_BKCOLOUR; - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Selected text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR; - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Hottrack text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR; - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Quicksearch text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR; - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); HookEvent(ME_FONT_RELOAD, FS_FontsChanged); } diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 53d42c65c3..d0c625c2c7 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -94,7 +94,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE; for (int i = 0; i < nValues; i++) { tvis.item.lParam = values[i].style; - tvis.item.pszText = TranslateTS(values[i].szDescr); + tvis.item.pszText = TranslateW(values[i].szDescr); tvis.item.stateMask = TVIS_STATEIMAGEMASK; tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1); TreeView_InsertItem(hwndTree, &tvis); diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp index fdd473a268..d911261f71 100644 --- a/src/core/stdclist/src/cluiopts.cpp +++ b/src/core/stdclist/src/cluiopts.cpp @@ -74,7 +74,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L } { DBVARIANT dbv; - if (!db_get_ts(NULL, "CList", "TitleText", &dbv)) { + if (!db_get_ws(NULL, "CList", "TitleText", &dbv)) { SetDlgItemText(hwndDlg, IDC_TITLETEXT, dbv.ptszVal); db_free(&dbv); } @@ -172,7 +172,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L { wchar_t title[256]; GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title)); - db_set_ts(NULL, "CList", "TitleText", title); + db_set_ws(NULL, "CList", "TitleText", title); SetWindowText(pcli->hwndContactList, title); } 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; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 0c68e5b22d..2c335fec1a 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -763,7 +763,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l //restore saved msg if any... if (dat->hContact) { DBVARIANT dbv; - if (!db_get_ts(dat->hContact, SRMSGMOD, DBSAVEDMSG, &dbv)) { + if (!db_get_ws(dat->hContact, SRMSGMOD, DBSAVEDMSG, &dbv)) { if (dbv.ptszVal[0]) { SetDlgItemText(hwndDlg, IDC_MESSAGE, dbv.ptszVal); EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE); @@ -1589,7 +1589,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l wchar_t *msg = (wchar_t*)alloca(sizeof(wchar_t)*len); GetDlgItemText(hwndDlg, IDC_MESSAGE, msg, len); if (msg[0]) - db_set_ts(dat->hContact, SRMSGMOD, DBSAVEDMSG, msg); + db_set_ws(dat->hContact, SRMSGMOD, DBSAVEDMSG, msg); else db_unset(dat->hContact, SRMSGMOD, DBSAVEDMSG); } diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 7096284dac..4771ce1622 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -305,7 +305,7 @@ static char* CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT AppendToBufferWithRTF(buffer, szName); AppendToBufferWithRTF(buffer, L" "); - msg = DbGetEventTextT(&dbei, CP_ACP); + msg = DbGetEventTextW(&dbei, CP_ACP); if (msg) { AppendToBufferWithRTF(buffer, msg); mir_free(msg); @@ -334,7 +334,7 @@ static char* CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, MEVENT case EVENTTYPE_MESSAGE: default: - msg = DbGetEventTextT(&dbei, CP_ACP); + msg = DbGetEventTextW(&dbei, CP_ACP); buffer.AppendFormat(" %s ", SetToStyle((dbei.eventType == EVENTTYPE_MESSAGE) ? ((dbei.flags & DBEF_SENT) ? MSGFONTID_MYMSG : MSGFONTID_YOURMSG) : MSGFONTID_NOTICE)); AppendToBufferWithRTF(buffer, msg); mir_free(msg); diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index f5968b5cce..5fb40206cf 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -81,7 +81,7 @@ bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF * colour) mir_snprintf(str, "SRMFont%d", i); DBVARIANT dbv; - if (db_get_ts(NULL, SRMMMOD, str, &dbv)) + if (db_get_ws(NULL, SRMMMOD, str, &dbv)) wcsncpy(lf->lfFaceName, fontOptionsList[i].szDefFace, _countof(lf->lfFaceName)-1); else { mir_wstrncpy(lf->lfFaceName, dbv.ptszVal, _countof(lf->lfFaceName)); @@ -97,7 +97,7 @@ void RegisterSRMMFonts(void) { char idstr[10]; - FontIDT fontid = { sizeof(fontid) }; + FontIDW fontid = { sizeof(fontid) }; fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID; for (int i = 0; i < _countof(fontOptionsList); i++) { strncpy_s(fontid.dbSettingsGroup, SRMMMOD, _TRUNCATE); @@ -117,16 +117,16 @@ void RegisterSRMMFonts(void) fontid.deffontsettings.charset = MsgDlgGetFontDefaultCharset(fontOptionsList[i].szDefFace); wcsncpy_s(fontid.backgroundGroup, LPGENW("Message log"), _TRUNCATE); wcsncpy_s(fontid.backgroundName, LPGENW("Background"), _TRUNCATE); - FontRegisterT(&fontid); + FontRegisterW(&fontid); } - ColourIDT colourid = { sizeof(colourid) }; + ColourIDW colourid = { sizeof(colourid) }; strncpy_s(colourid.dbSettingsGroup, SRMMMOD, _TRUNCATE); strncpy_s(colourid.setting, SRMSGSET_BKGCOLOUR, _TRUNCATE); colourid.defcolour = SRMSGDEFSET_BKGCOLOUR; wcsncpy_s(colourid.name, LPGENW("Background"), _TRUNCATE); wcsncpy_s(colourid.group, LPGENW("Message log"), _TRUNCATE); - ColourRegisterT(&colourid); + ColourRegisterW(&colourid); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -158,7 +158,7 @@ static void FillCheckBoxTree(HWND hwndTree, const struct CheckBoxValues_t *value tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE; for (int i = 0; i < nValues; i++) { tvis.item.lParam = values[i].style; - tvis.item.pszText = TranslateTS(values[i].szDescr); + tvis.item.pszText = TranslateW(values[i].szDescr); tvis.item.stateMask = TVIS_STATEIMAGEMASK; tvis.item.state = INDEXTOSTATEIMAGEMASK((style & tvis.item.lParam) != 0 ? 2 : 1); TreeView_InsertItem(hwndTree, &tvis); diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 2737384610..b38fea7b07 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -407,7 +407,7 @@ static wchar_t tszError[] = LPGENW("Miranda could not load the built-in message int LoadSendRecvMessageModule(void) { if ((hMsftEdit = LoadLibrary(L"Msftedit.dll")) == NULL) { - if (IDYES != MessageBox(0, TranslateTS(tszError), TranslateT("Information"), MB_YESNO | MB_ICONINFORMATION)) + if (IDYES != MessageBox(0, TranslateW(tszError), TranslateT("Information"), MB_YESNO | MB_ICONINFORMATION)) return 1; return 0; } diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 193e730b19..d87b602c8d 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -39,7 +39,7 @@ static HGENMENU hContactMenu = 0; static void GetMessageDescription(DBEVENTINFO *dbei, wchar_t* buf, int cbBuf) { - wchar_t *msg = DbGetEventTextT(dbei, CP_ACP); + wchar_t *msg = DbGetEventTextW(dbei, CP_ACP); wcsncpy(buf, msg ? msg : TranslateT("Invalid message"), cbBuf); buf[ cbBuf-1 ] = 0; mir_free(msg); @@ -118,7 +118,7 @@ static void GetObjectSummary(DBEVENTINFO *dbei, wchar_t* str, int cbStr) DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); if (et && (et->flags & DETF_HISTORY)) { pszTmp = mir_a2u(et->descr); - pszSrc = TranslateTS(pszTmp); + pszSrc = TranslateW(pszTmp); break; } *str = 0; diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index ca14e50201..79511853a8 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -274,13 +274,13 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.iItem = 0; for (i = -1;; i++) { if (i == -1) { - if (db_get_ts(hContact, szProto, "e-mail", &dbv)) + if (db_get_ws(hContact, szProto, "e-mail", &dbv)) continue; lvi.pszText = TranslateT("Primary"); } else { mir_snprintf(idstr, "e-mail%d", i); - if (db_get_ts(hContact, szProto, idstr, &dbv)) + if (db_get_ws(hContact, szProto, idstr, &dbv)) break; lvi.pszText = idstr2; @@ -295,7 +295,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP for (i = 0;; i++) { lvi.lParam = i; mir_snprintf(idstr, "Mye-mail%d", i); - if (db_get_ts(hContact, "UserInfo", idstr, &dbv)) + if (db_get_ws(hContact, "UserInfo", idstr, &dbv)) break; lvi.pszText = idstr2; mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1); @@ -313,21 +313,21 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.lParam = -1; lvi.iSubItem = 0; lvi.iItem = 0; - if (!db_get_ts(hContact, szProto, "Phone", &dbv)) { + if (!db_get_ws(hContact, szProto, "Phone", &dbv)) { lvi.pszText = TranslateT("Primary"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal); db_free(&dbv); lvi.iItem++; } - if (!db_get_ts(hContact, szProto, "Fax", &dbv)) { + if (!db_get_ws(hContact, szProto, "Fax", &dbv)) { lvi.pszText = TranslateT("Fax"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal); db_free(&dbv); lvi.iItem++; } - if (!db_get_ts(hContact, szProto, "Cellular", &dbv)) { + if (!db_get_ws(hContact, szProto, "Cellular", &dbv)) { lvi.pszText = TranslateT("Mobile"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); if (mir_strlen(dbv.pszVal) > 4 && !mir_strcmp(dbv.pszVal + mir_strlen(dbv.pszVal) - 4, " SMS")) { @@ -338,14 +338,14 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_free(&dbv); lvi.iItem++; } - if (!db_get_ts(hContact, szProto, "CompanyPhone", &dbv)) { + if (!db_get_ws(hContact, szProto, "CompanyPhone", &dbv)) { lvi.pszText = TranslateT("Work phone"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal); db_free(&dbv); lvi.iItem++; } - if (!db_get_ts(hContact, szProto, "CompanyFax", &dbv)) { + if (!db_get_ws(hContact, szProto, "CompanyFax", &dbv)) { lvi.pszText = TranslateT("Work fax"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 1, dbv.ptszVal); @@ -356,7 +356,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP for (i = 0;; i++) { lvi.lParam = i; mir_snprintf(idstr, "MyPhone%d", i); - if (db_get_ts(hContact, "UserInfo", idstr, &dbv)) + if (db_get_ws(hContact, "UserInfo", idstr, &dbv)) break; lvi.pszText = idstr2; mir_snwprintf(idstr2, TranslateT("Custom %d"), i + 1); diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index bd2420bdca..fd3ae677bc 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -47,11 +47,11 @@ static int Proto_GetContactInfoSetting(MCONTACT hContact, const char *szProto, c static wchar_t* Proto_GetContactInfoSettingStr(bool proto_service, MCONTACT hContact, const char *szModule, const char *szSetting) { if (!proto_service) - return db_get_tsa(hContact, szModule, szSetting); + return db_get_wsa(hContact, szModule, szSetting); DBVARIANT dbv; DBCONTACTGETSETTING cgs = { szModule, szSetting, &dbv }; - dbv.type = DBVT_TCHAR; + dbv.type = DBVT_WCHAR; if (CallProtoService(szModule, PS_GETINFOSETTING, hContact, (LPARAM)&cgs)) return NULL; @@ -148,7 +148,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule if (wSave == (WORD)-1) { char szSettingName[100]; mir_snprintf(szSettingName, "%sName", szSetting); - if (!db_get_ts(hContact, szModule, szSettingName, &dbv)) { + if (!db_get_ws(hContact, szModule, szSettingName, &dbv)) { ptstr = dbv.ptszVal; unspecified = false; break; @@ -185,7 +185,7 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule if (!unspecified) { WCHAR *wszStr; Utf8Decode(dbv.pszVal, &wszStr); - SetDlgItemTextW(hwndDlg, idCtrl, TranslateTS(wszStr)); + SetDlgItemTextW(hwndDlg, idCtrl, TranslateW(wszStr)); mir_free(wszStr); goto LBL_Exit; } @@ -446,7 +446,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (tszColText == NULL) break; mir_snprintf(idstr, "Past%dText", i); - ptrW tszText(db_get_tsa(hContact, szProto, idstr)); + ptrW tszText(db_get_wsa(hContact, szProto, idstr)); if (tszText == NULL) break; @@ -463,7 +463,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (tszColText == NULL) break; mir_snprintf(idstr, "Affiliation%dText", i); - ptrW tszText(db_get_tsa(hContact, szProto, idstr)); + ptrW tszText(db_get_wsa(hContact, szProto, idstr)); if (tszText == NULL) break; @@ -486,7 +486,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (tszColText == NULL) break; mir_snprintf(idstr, "Interest%dText", i); - ptrW tszText(db_get_tsa(hContact, szProto, idstr)); + ptrW tszText(db_get_wsa(hContact, szProto, idstr)); if (tszText == NULL) break; @@ -548,7 +548,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HFONT hFont = CreateFontIndirect(&lf); SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0)); - ptrW szNotes(db_get_tsa(lParam, "UserInfo", "MyNotes")); + ptrW szNotes(db_get_wsa(lParam, "UserInfo", "MyNotes")); if (szNotes != nullptr) SetDlgItemText(hwndDlg, IDC_MYNOTES, szNotes); } diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index bcb7e20a39..82ce214f67 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -66,12 +66,12 @@ struct DetailsData wchar_t* getTitle(OPTIONSDIALOGPAGE *p) { - return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTitle : TranslateTH(p->hLangpack, p->pwszTitle); + return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTitle : TranslateW_LP(p->pwszTitle, p->hLangpack); } wchar_t* getTab(OPTIONSDIALOGPAGE *p) { - return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTab : TranslateTH(p->hLangpack, p->pwszTab); + return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTab : TranslateW_LP(p->pwszTab, p->hLangpack); } static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2) @@ -183,7 +183,7 @@ static void CreateDetailsTabs(HWND hwndDlg, DetailsData *dat, DetailsPageData *p if (!odp.ptszTab || mir_wstrcmp(odp.ptszTitle, ppg->ptszTitle)) continue; - tie.pszText = TranslateTH(odp.hLangpack, odp.ptszTab); + tie.pszText = TranslateW_LP(odp.ptszTab, odp.hLangpack); tie.lParam = i; TabCtrl_InsertItem(hwndTab, pages, &tie); if (!mir_wstrcmp(odp.ptszTab, ppg->ptszTab)) @@ -268,7 +268,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP LPTSTR ptszLastTab; DBVARIANT dbv; - if (!db_get_ts(NULL, "UserInfo", "LastTab", &dbv)) { + if (!db_get_ws(NULL, "UserInfo", "LastTab", &dbv)) { ptszLastTab = NEWWSTR_ALLOCA(dbv.ptszVal); db_free(&dbv); } @@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (odp[i].flags & ODPF_DONTTRANSLATE) tvis.item.pszText = p.ptszTitle; else - tvis.item.pszText = TranslateTH(p.hLangpack, p.ptszTitle); + tvis.item.pszText = TranslateW_LP(p.ptszTitle, p.hLangpack); if (ptszLastTab && !mir_wstrcmp(tvis.item.pszText, ptszLastTab)) dat->currentPage = i; p.hItem = TreeView_InsertItem(hwndTree, &tvis); @@ -587,7 +587,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP tvi.pszText = name; tvi.cchTextMax = _countof(name); TreeView_GetItem(GetDlgItem(hwndDlg, IDC_PAGETREE), &tvi); - db_set_ts(NULL, "UserInfo", "LastTab", name); + db_set_ws(NULL, "UserInfo", "LastTab", name); Window_FreeIcon_IcoLib(hwndDlg); SendDlgItemMessage(hwndDlg, IDC_NAME, WM_SETFONT, SendDlgItemMessage(hwndDlg, IDC_WHITERECT, WM_GETFONT, 0, 0), 0); -- cgit v1.2.3