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 --- plugins/BasicHistory/src/BasicHistory.cpp | 2 +- plugins/BasicHistory/src/EventList.cpp | 2 +- plugins/BasicHistory/src/HistoryWindow.cpp | 10 +++---- plugins/BasicHistory/src/Options.cpp | 42 +++++++++++++++--------------- plugins/BasicHistory/src/Scheduler.cpp | 2 +- plugins/BasicHistory/src/Searcher.cpp | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) (limited to 'plugins/BasicHistory/src') diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 91150ad439..8c91b57629 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -143,7 +143,7 @@ void InitTaskMenuItems() int pos = (int)taskMenus.size(); for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) { CMenuItem mi; - mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; + mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED; mi.pszService = MS_HISTORY_EXECUTE_TASK; mi.root = hTaskMainMenu; mi.name.w = (wchar_t*)taskIt->taskName.c_str(); diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index bea541c11a..932242a65d 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -448,7 +448,7 @@ std::wstring HistoryEventList::GetContactId() 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_s(buf, cbBuf, msg ? msg : TranslateT("Invalid Message"), _TRUNCATE); buf[cbBuf - 1] = 0; mir_free(msg); diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index be1dac8781..6d5017ce14 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -505,7 +505,7 @@ void __stdcall ShowMessageWindow(void* arg) if (dt->m_str.empty()) CallService(MS_MSG_SENDMESSAGE, dt->m_hContact, 0); else - CallService(MS_MSG_SENDMESSAGET, dt->m_hContact, (LPARAM)dt->m_str.c_str()); + CallService(MS_MSG_SENDMESSAGEW, dt->m_hContact, (LPARAM)dt->m_str.c_str()); delete dt; } @@ -566,14 +566,14 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP if (HIWORD(wParam) == BN_CLICKED) { if (Button_GetCheck(GetDlgItem(hwndDlg, IDC_SHOWHIDE)) & BST_CHECKED) { SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)historyWindow->minusIco); - SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_TCHAR); + SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_UNICODE); historyWindow->isContactList = true; ShowWindow(GetDlgItem(hwndDlg, IDC_LIST_CONTACTS), SW_SHOW); ShowWindow(historyWindow->splitterYhWnd, SW_SHOW); } else { SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)historyWindow->plusIco); - SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_TCHAR); + SendDlgItemMessage(hwndDlg, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_UNICODE); historyWindow->isContactList = false; ShowWindow(GetDlgItem(hwndDlg, IDC_LIST_CONTACTS), SW_HIDE); ShowWindow(historyWindow->splitterYhWnd, SW_HIDE); @@ -988,13 +988,13 @@ void HistoryWindow::Initialise() SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONSETASFLATBTN, TRUE, 0); if (m_hContact == NULL || Options::instance->showContacts) { SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)minusIco); - SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_TCHAR); + SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Hide Contacts"), BATF_UNICODE); Button_SetCheck(GetDlgItem(m_hWnd, IDC_SHOWHIDE), BST_CHECKED); isContactList = true; } else { SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)plusIco); - SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_TCHAR); + SendDlgItemMessage(m_hWnd, IDC_SHOWHIDE, BUTTONADDTOOLTIP, (WPARAM)LPGENW("Show Contacts"), BATF_UNICODE); Button_SetCheck(GetDlgItem(m_hWnd, IDC_SHOWHIDE), BST_UNCHECKED); ShowWindow(GetDlgItem(m_hWnd, IDC_LIST_CONTACTS), SW_HIDE); ShowWindow(splitterYhWnd, SW_HIDE); diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 4e243c3682..f27b62597d 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -122,7 +122,7 @@ int Options::InitOptions(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = { 0 }; odp.position = 100000000; odp.hInstance = hInst; - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; odp.pwszTitle = LPGENW("History"); odp.pwszTab = LPGENW("Group list"); @@ -174,8 +174,8 @@ struct ColorOptionsList { struct HotkeyOptionsList { const char *pszName; - const wchar_t *ptszDescription; - const wchar_t *ptszSection; + const wchar_t *pwszDescription; + const wchar_t *pwszSection; const char *pszService; WORD DefHotKey; LPARAM lParam; @@ -231,11 +231,11 @@ const int g_hotkeysSize = _countof(g_HotkeyOptionsList); void Options::Load(void) { - FontIDT fid = {0}; - ColourIDT cid = {0}; + FontIDW fid = {0}; + ColourIDW cid = {0}; HOTKEYDESC hid = {0}; - fid.cbSize = sizeof(FontIDT); - cid.cbSize = sizeof(ColourIDT); + fid.cbSize = sizeof(FontIDW); + cid.cbSize = sizeof(ColourIDW); hid.cbSize = sizeof(HOTKEYDESC); strncpy_s(fid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE); wcsncpy_s(fid.backgroundGroup, L"History", _TRUNCATE); @@ -251,7 +251,7 @@ void Options::Load(void) wcsncpy_s(fid.name, g_FontOptionsList[i].szDescr, _TRUNCATE); wcsncpy_s(fid.backgroundName, g_FontOptionsList[i].szBackgroundName, _TRUNCATE); fid.flags = FIDF_DEFAULTVALID | FIDF_CLASSGENERAL | g_FontOptionsList[i].flags; - FontRegisterT(&fid); + FontRegisterW(&fid); } strncpy_s(cid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE); @@ -261,14 +261,14 @@ void Options::Load(void) mir_snprintf(cid.setting, _countof(cid.setting), "Color%d", i); cid.order = i; cid.defcolour = g_ColorOptionsList[i].def; - ColourRegisterT(&cid); + ColourRegisterW(&cid); } - hid.dwFlags = HKD_TCHAR; + hid.dwFlags = HKD_UNICODE; for (int i = 0; i < g_hotkeysSize; ++i) { hid.pszName = g_HotkeyOptionsList[i].pszName; - hid.ptszDescription = g_HotkeyOptionsList[i].ptszDescription; - hid.ptszSection = g_HotkeyOptionsList[i].ptszSection; + hid.pwszDescription = g_HotkeyOptionsList[i].pwszDescription; + hid.pwszSection = g_HotkeyOptionsList[i].pwszSection; hid.pszService = g_HotkeyOptionsList[i].pszService; hid.DefHotKey = g_HotkeyOptionsList[i].DefHotKey; hid.lParam = g_HotkeyOptionsList[i].lParam; @@ -408,20 +408,20 @@ void Options::Load(void) COLORREF Options::GetFont(Fonts fontId, PLOGFONT font) { - FontIDT fid = {0}; - fid.cbSize = sizeof(FontIDT); + FontIDW fid = {0}; + fid.cbSize = sizeof(FontIDW); wcsncpy_s(fid.group, LPGENW("History"), _TRUNCATE); wcsncpy_s(fid.name, g_FontOptionsList[fontId].szDescr, _TRUNCATE); - return (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)font); + return (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)font); } COLORREF Options::GetColor(Colors colorId) { - ColourIDT cid = {0}; - cid.cbSize = sizeof(ColourIDT); + ColourIDW cid = {0}; + cid.cbSize = sizeof(ColourIDW); wcsncpy_s(cid.group, LPGENW("History"), _TRUNCATE); wcsncpy_s(cid.name, g_ColorOptionsList[colorId].tszName, _TRUNCATE); - return (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, NULL); + return (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, NULL); } void Options::Save() @@ -780,7 +780,7 @@ void ReloadEventLB(HWND hwndLB, const FilterOptions &sel) mir_snwprintf(buf, L"%d", *it); ListBox_AddString(hwndLB, buf); } - else ListBox_AddString(hwndLB, TranslateTS(EventNames[selCpIdx].name)); + else ListBox_AddString(hwndLB, TranslateW(EventNames[selCpIdx].name)); } } @@ -872,7 +872,7 @@ INT_PTR CALLBACK Options::DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, ComboBox_AddString(events, TranslateT("Incoming events")); ComboBox_AddString(events, TranslateT("Outgoing events")); for (int i = 0 ; i < _countof(EventNames); ++i) - ComboBox_AddString(events, TranslateTS(EventNames[i].name)); + ComboBox_AddString(events, TranslateW(EventNames[i].name)); ComboBox_AddString(defFilter, TranslateT("Default history events")); ComboBox_AddString(defFilter, TranslateT("All events")); @@ -1276,7 +1276,7 @@ void InitCodepageCB(HWND hwndCB, unsigned int codepage, const std::wstring& name int selCpIdx = -1; ComboBox_LimitText(hwndCB, 256); for (int i = 0; i < cpCount; ++i) { - ComboBox_AddString(hwndCB, TranslateTS(cpTable[i].cpName)); + ComboBox_AddString(hwndCB, TranslateW(cpTable[i].cpName)); if (cpTable[i].cpId == codepage && name == cpTable[i].cpName) selCpIdx = i; } diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 238a65cfdf..9c391dce1a 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -74,7 +74,7 @@ void InitScheduler() test.flags = PCF_TCHAR; test.hIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY); test.iSeconds = 10; - test.ptszDescription = TranslateT("History task"); + test.pwszDescription = TranslateT("History task"); test.pszName = MODULE; if (hPopupClass = Popup_RegisterClass(&test)) HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index 97158d7796..a2f09eb24c 100644 --- a/plugins/BasicHistory/src/Searcher.cpp +++ b/plugins/BasicHistory/src/Searcher.cpp @@ -302,7 +302,7 @@ void Searcher::Find() mir_snwprintf(buf, TranslateT("\"%s\" not found"), str); MessageBox(context->m_hWnd, buf, TranslateT("Search"), MB_OK | MB_ICONINFORMATION); } - else MessageBox(context->m_hWnd, TranslateTS(onlyGroup ? LPGENW("You have reached the end of the group.") : LPGENW("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION); + else MessageBox(context->m_hWnd, TranslateW(onlyGroup ? LPGENW("You have reached the end of the group.") : LPGENW("You have reached the end of the history.")), TranslateT("Search"), MB_OK | MB_ICONINFORMATION); } bool Searcher::IsInSel(int sel, wchar_t *strFind) -- cgit v1.2.3