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/Ping/src/log.cpp | 6 +++--- plugins/Ping/src/menu.cpp | 2 +- plugins/Ping/src/options.cpp | 2 +- plugins/Ping/src/ping.cpp | 2 +- plugins/Ping/src/pinglist.cpp | 16 ++++++++-------- plugins/Ping/src/pingthread.cpp | 22 +++++++++++----------- plugins/Ping/src/utils.cpp | 6 +++--- 7 files changed, 28 insertions(+), 28 deletions(-) (limited to 'plugins/Ping/src') diff --git a/plugins/Ping/src/log.cpp b/plugins/Ping/src/log.cpp index c99af91c06..ef50c5cb0b 100644 --- a/plugins/Ping/src/log.cpp +++ b/plugins/Ping/src/log.cpp @@ -32,8 +32,8 @@ INT_PTR Log(WPARAM wParam, LPARAM) { INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv; wchar_t *filename = (wchar_t *)lParam; - if (db_get_ts(0, PLUG, "LogFilename", &dbv)) { - CallService(MS_DB_GETPROFILEPATHT, wParam, (LPARAM)filename); + if (db_get_ws(0, PLUG, "LogFilename", &dbv)) { + CallService(MS_DB_GETPROFILEPATHW, wParam, (LPARAM)filename); mir_wstrncat(filename, L"\\ping_log.txt", wParam - mir_wstrlen(filename)); } else { @@ -47,7 +47,7 @@ INT_PTR GetLogFilename(WPARAM wParam, LPARAM lParam) { } INT_PTR SetLogFilename(WPARAM, LPARAM lParam) { - db_set_ts(0, PLUG, "LogFilename", (wchar_t *)lParam); + db_set_ws(0, PLUG, "LogFilename", (wchar_t *)lParam); return 0; } diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp index 1fd1ce70dd..3f2a0bd198 100644 --- a/plugins/Ping/src/menu.cpp +++ b/plugins/Ping/src/menu.cpp @@ -7,7 +7,7 @@ void InitMenus() { // main menu CMenuItem mi; - mi.flags = CMIF_TCHAR; + mi.flags = CMIF_UNICODE; mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Ping"), 500099900); Menu_ConfigureItem(mi.root, MCI_OPT_UID, "FF273885-6AEC-4C8A-B8BC-9247D920F223"); diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp index 1f77da46d2..0d763f466a 100644 --- a/plugins/Ping/src/options.cpp +++ b/plugins/Ping/src/options.cpp @@ -505,7 +505,7 @@ int PingOptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; odp.pwszGroup = LPGENW("Network"); odp.pwszTitle = LPGENW("Ping"); diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 9533ff3d83..2255dca874 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -86,7 +86,7 @@ int OnModulesLoaded(WPARAM, LPARAM) NETLIBUSER nl_user = { 0 }; nl_user.cbSize = sizeof(nl_user); nl_user.szSettingsModule = PLUG; - nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; + nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nl_user.ptszDescriptiveName = TranslateT("Ping Plugin"); nl_user.szHttpGatewayHello = 0; nl_user.szHttpGatewayUserAgent = 0; diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp index 9ba42dad03..92e094e74b 100644 --- a/plugins/Ping/src/pinglist.cpp +++ b/plugins/Ping/src/pinglist.cpp @@ -63,17 +63,17 @@ void write_ping_address(PINGADDRESS &i) } db_set_dw(0, buff, "Id", i.item_id); - db_set_ts(0, buff, "Address", i.pszName); - db_set_ts(0, buff, "Label", i.pszLabel); + db_set_ws(0, buff, "Address", i.pszName); + db_set_ws(0, buff, "Label", i.pszLabel); db_set_w(0, buff, "Status", i.status); db_set_dw(0, buff, "Port", i.port); db_set_s(0, buff, "Proto", i.pszProto); if (mir_wstrlen(i.pszCommand)) - db_set_ts(0, buff, "Command", i.pszCommand); + db_set_ws(0, buff, "Command", i.pszCommand); else db_unset(0, buff, "Command"); if (mir_wstrlen(i.pszParams)) - db_set_ts(0, buff, "CommandParams", i.pszParams); + db_set_ws(0, buff, "CommandParams", i.pszParams); else db_unset(0, buff, "CommandParams"); db_set_w(0, buff, "SetStatus", i.set_status); @@ -115,13 +115,13 @@ bool read_ping_address(PINGADDRESS &pa) { if ((pa.item_id = db_get_dw(0, buff, "Id", 0)) == 0) return false; DBVARIANT dbv; - if (!db_get_ts(0, buff, "Address", &dbv)) { + if (!db_get_ws(0, buff, "Address", &dbv)) { mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName)); db_free(&dbv); } else return false; - if (!db_get_ts(0, buff, "Label", &dbv)) { + if (!db_get_ws(0, buff, "Label", &dbv)) { mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel)); db_free(&dbv); } @@ -138,13 +138,13 @@ bool read_ping_address(PINGADDRESS &pa) { } else pa.pszProto[0] = '\0'; - if (!db_get_ts(0, buff, "Command", &dbv)) { + if (!db_get_ws(0, buff, "Command", &dbv)) { mir_wstrncpy(pa.pszCommand, dbv.ptszVal, _countof(pa.pszCommand)); db_free(&dbv); } else pa.pszCommand[0] = '\0'; - if (!db_get_ts(0, buff, "CommandParams", &dbv)) { + if (!db_get_ws(0, buff, "CommandParams", &dbv)) { mir_wstrncpy(pa.pszParams, dbv.ptszVal, _countof(pa.pszParams)); db_free(&dbv); } diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 7e6ccdbfc4..b0df01d290 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -19,8 +19,8 @@ int frame_id = -1; HBRUSH tbrush = 0; -FontIDT font_id; -ColourIDT bk_col_id; +FontIDW font_id; +ColourIDW bk_col_id; HFONT hFont = 0; COLORREF bk_col = RGB(255, 255, 255); @@ -312,8 +312,8 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) else mir_snwprintf(TBcapt, L"Ping"); - CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt); - CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_TCHAR, frame_id), (LPARAM)TBcapt); + CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBNAME | FO_UNICODETEXT, frame_id), (LPARAM)TBcapt); + CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME | FO_UNICODETEXT, frame_id), (LPARAM)TBcapt); CallService(MS_CLIST_FRAMES_UPDATEFRAME, frame_id, FU_TBREDRAW); } } @@ -781,11 +781,11 @@ int ReloadFont(WPARAM, LPARAM) if (hFont) DeleteObject(hFont); LOGFONT log_font; - CallService(MS_FONT_GETT, (WPARAM)&font_id, (LPARAM)&log_font); + CallService(MS_FONT_GETW, (WPARAM)&font_id, (LPARAM)&log_font); hFont = CreateFontIndirect(&log_font); SendMessage(list_hwnd, WM_SETFONT, (WPARAM)hFont, TRUE); - bk_col = CallService(MS_COLOUR_GETT, (WPARAM)&bk_col_id, 0); + bk_col = CallService(MS_COLOUR_GETW, (WPARAM)&bk_col_id, 0); RefreshWindow(0, 0); return 0; @@ -906,7 +906,7 @@ void InitList() Menu_ConfigureItem(mi.root, MCI_OPT_UID, "7CFBF239-86B5-48B2-8D5B-39E09A7DB514"); SET_UID(mi, 0x4adbd753, 0x27d6, 0x457a, 0xa6, 0x6, 0xdf, 0x4f, 0x2c, 0xd8, 0xb9, 0x3b); - mi.flags = CMIF_TCHAR; + mi.flags = CMIF_UNICODE; mi.position = 3000320001; mi.name.w = LPGENW("Show/Hide &Ping Window"); mi.pszService = PLUG "/ShowWindow"; @@ -916,7 +916,7 @@ void InitList() else ShowWindow(hpwnd, SW_SHOW); } - font_id.cbSize = sizeof(FontIDT); + font_id.cbSize = sizeof(FontIDW); mir_wstrncpy(font_id.group, LPGENW("Ping"), _countof(font_id.group)); mir_wstrncpy(font_id.name, LPGENW("List"), _countof(font_id.name)); mir_strncpy(font_id.dbSettingsGroup, "PING", _countof(font_id.dbSettingsGroup)); @@ -931,15 +931,15 @@ void InitList() font_id.deffontsettings.colour = RGB(255, 255, 255); mir_wstrncpy(font_id.deffontsettings.szFace, L"Tahoma", _countof(font_id.deffontsettings.szFace)); - FontRegisterT(&font_id); + FontRegisterW(&font_id); - bk_col_id.cbSize = sizeof(ColourIDT); + bk_col_id.cbSize = sizeof(ColourIDW); mir_wstrncpy(bk_col_id.group, L"Ping", _countof(bk_col_id.group)); mir_wstrncpy(bk_col_id.name, L"Background", _countof(bk_col_id.name)); mir_strncpy(bk_col_id.dbSettingsGroup, "PING", _countof(bk_col_id.dbSettingsGroup)); mir_strncpy(bk_col_id.setting, "BgColor", _countof(bk_col_id.setting)); bk_col_id.defcolour = RGB(0, 0, 0); - ColourRegisterT(&bk_col_id); + ColourRegisterW(&bk_col_id); HookEvent(ME_FONT_RELOAD, ReloadFont); diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index 37c01d0d28..8eb2002532 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -221,7 +221,7 @@ void import_ping_address(int index, PINGADDRESS &pa) { DBVARIANT dbv; char buf[256]; mir_snprintf(buf, "Address%d", index); - if (!db_get_ts(0, "PingPlug", buf, &dbv)) { + if (!db_get_ws(0, "PingPlug", buf, &dbv)) { mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName)); db_free(&dbv); } @@ -229,7 +229,7 @@ void import_ping_address(int index, PINGADDRESS &pa) { mir_wstrncpy(pa.pszName, TranslateT("Unknown Address"), _countof(pa.pszName)); mir_snprintf(buf, "Label%d", index); - if (!db_get_ts(0, "PingPlug", buf, &dbv)) { + if (!db_get_ws(0, "PingPlug", buf, &dbv)) { mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel)); db_free(&dbv); } @@ -314,7 +314,7 @@ void InitUtils() test.flags = PCF_TCHAR; test.hIcon = hIconResponding; test.iSeconds = -1; - test.ptszDescription = TranslateT("Ping"); + test.pwszDescription = TranslateT("Ping"); test.pszName = "pingpopups"; test.PluginWindowProc = NullWindowProc; if (hPopupClass = Popup_RegisterClass(&test)) -- cgit v1.2.3