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/AutoShutdown/src/options.cpp | 2 +- plugins/AutoShutdown/src/settingsdlg.cpp | 8 ++++---- plugins/AutoShutdown/src/shutdownsvc.cpp | 6 +++--- plugins/AutoShutdown/src/utils.cpp | 6 +++--- plugins/AutoShutdown/src/watcher.cpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/AutoShutdown') diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp index 358f3e04af..267959c1d6 100644 --- a/plugins/AutoShutdown/src/options.cpp +++ b/plugins/AutoShutdown/src/options.cpp @@ -113,7 +113,7 @@ static int ShutdownOptInit(WPARAM wParam, LPARAM) odp.pwszGroup = LPGENW("Events"); /* autotranslated */ odp.pwszTitle = LPGENW("Automatic shutdown"); /* autotranslated */ odp.pwszTab = LPGENW("Automatic shutdown"); /* autotranslated, can be made a tab */ - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; odp.pfnDlgProc = ShutdownOptDlgProc; Options_AddPage(wParam, &odp); return 0; diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 0488ef6a65..ce4504eb4d 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -121,7 +121,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L SendMessage(hwndCombo, CB_SETLOCALE, (WPARAM)locale, 0); /* sort order */ SendMessage(hwndCombo, CB_INITSTORAGE, _countof(unitNames), _countof(unitNames) * 16); /* approx. */ for (int i = 0; i < _countof(unitNames); ++i) { - int index = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(unitNames[i])); + int index = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(unitNames[i])); if (index != LB_ERR) { SendMessage(hwndCombo, CB_SETITEMDATA, index, (LPARAM)unitValues[i]); if (i == 0 || unitValues[i] == lastUnit) SendMessage(hwndCombo, CB_SETCURSEL, index, 0); @@ -130,7 +130,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L } { DBVARIANT dbv; - if (!db_get_ts(NULL, "AutoShutdown", "Message", &dbv)) { + if (!db_get_ws(NULL, "AutoShutdown", "Message", &dbv)) { SetDlgItemText(hwndDlg, IDC_EDIT_MESSAGE, dbv.ptszVal); mir_free(dbv.ptszVal); } @@ -355,7 +355,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L wchar_t *pszText = (wchar_t*)mir_alloc(len*sizeof(wchar_t)); if (pszText != NULL && GetWindowText(hwndEdit, pszText, len + 1)) { TrimString(pszText); - db_set_ts(NULL, "AutoShutdown", "Message", pszText); + db_set_ws(NULL, "AutoShutdown", "Message", pszText); } mir_free(pszText); /* does NULL check */ } @@ -460,7 +460,7 @@ void SetShutdownMenuItem(bool fActive) mi.name.w = LPGENW("Automatic &shutdown..."); } mi.pszService = "AutoShutdown/MenuCommand"; - mi.flags = CMIF_TCHAR; + mi.flags = CMIF_UNICODE; if (hMainMenuItem != NULL) Menu_ModifyItem(hMainMenuItem, mi.name.w, mi.hIcolibItem); else diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index e8ba15d8a0..d21934975e 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -384,7 +384,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case M_UPDATE_COUNTDOWN: /* lParam=(WORD)countdown */ { wchar_t szText[256]; - mir_snwprintf(szText, TranslateTS(desc[shutdownType - 1]), lParam); + mir_snwprintf(szText, TranslateW(desc[shutdownType - 1]), lParam); SetDlgItemText(hwndDlg, IDC_TEXT_HEADER, szText); /* countdown finished */ if (!lParam) @@ -477,7 +477,7 @@ INT_PTR ServiceGetTypeDescription(WPARAM wParam, LPARAM lParam) if (!wParam || (BYTE)wParam > SDSDT_MAX) return 0; /* select description */ wchar_t *pszDesc = (wchar_t*)((lParam&GSTDF_LONGDESC) ? apszLong : apszShort)[wParam - 1]; - if (!(lParam&GSTDF_UNTRANSLATED)) pszDesc = TranslateTS(pszDesc); + if (!(lParam&GSTDF_UNTRANSLATED)) pszDesc = TranslateW(pszDesc); /* convert as needed */ if (!(lParam&GSTDF_UNICODE)) { static char szConvBuf[128]; @@ -496,7 +496,7 @@ void InitShutdownSvc(void) { /* Shutdown Dialog */ hwndShutdownDlg = NULL; - SkinAddNewSoundExT("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown")); + SkinAddNewSoundExW("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown")); /* Events */ hEventOkToShutdown = CreateHookableEvent(ME_AUTOSHUTDOWN_OKTOSHUTDOWN); diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index c6724ab982..d071125a2c 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -210,10 +210,10 @@ void AddHotkey() { HOTKEYDESC hkd = { 0 }; hkd.cbSize = sizeof(hkd); - hkd.dwFlags = HKD_TCHAR; + hkd.dwFlags = HKD_UNICODE; hkd.pszName = "AutoShutdown_Toggle"; - hkd.ptszDescription = LPGENW("Toggle automatic shutdown"); - hkd.ptszSection = LPGENW("Main"); + hkd.pwszDescription = LPGENW("Toggle automatic shutdown"); + hkd.pwszSection = LPGENW("Main"); hkd.pszService = "AutoShutdown/MenuCommand"; hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL | HOTKEYF_SHIFT, 'T') | HKF_MIRANDA_LOCAL; hkd.lParam = FALSE; diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 65a69c73f9..8a7301518b 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -100,7 +100,7 @@ static int MsgEventAdded(WPARAM, LPARAM hDbEvent) if (!db_event_get(hDbEvent, &dbe)) if (dbe.eventType == EVENTTYPE_MESSAGE && !(dbe.flags & DBEF_SENT)) { DBVARIANT dbv; - if (!db_get_ts(NULL, "AutoShutdown", "Message", &dbv)) { + if (!db_get_ws(NULL, "AutoShutdown", "Message", &dbv)) { TrimString(dbv.ptszVal); wchar_t *pszMsg = GetMessageText(&dbe.pBlob, &dbe.cbBlob); if (pszMsg != NULL && wcsstr(pszMsg, dbv.ptszVal) != NULL) -- cgit v1.2.3