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/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 +++--- 4 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src/core/stdchat') 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"%%"); -- cgit v1.2.3