From 423be683866fd8e305457eb725d8cdbe1f297fbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Feb 2019 12:43:20 +0300 Subject: popup code cleaning (cause we have no tchar.h) --- plugins/SeenPlugin/src/options.cpp | 10 +++++----- plugins/SeenPlugin/src/utils.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/SeenPlugin/src') diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index cb9ce008b0..7d2ed64fd5 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -138,7 +138,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp else idText = wparam + 20, idBack = wparam; - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.colorBack = SendDlgItemMessage(hdlg, idBack, CPM_GETCOLOUR, 0, 0); ppd.colorText = SendDlgItemMessage(hdlg, idText, CPM_GETCOLOUR, 0, 0); DWORD temp = GetDWordFromColors(ppd.colorBack, ppd.colorText); @@ -148,12 +148,12 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp ppd.lchIcon = Skin_LoadProtoIcon(nullptr, idBack); GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, _countof(szstamp)); - wcsncpy(ppd.lptzContactName, ParseString(szstamp, NULL), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzContactName, ParseString(szstamp, NULL), MAX_CONTACTNAME); GetDlgItemText(hdlg, IDC_POPUPSTAMPTEXT, szstamp, _countof(szstamp)); - wcsncpy(ppd.lptzText, ParseString(szstamp, NULL), MAX_SECONDLINE); + wcsncpy(ppd.lpwzText, ParseString(szstamp, NULL), MAX_SECONDLINE); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); SendMessage(GetParent(hdlg), PSM_CHANGED, 0, 0); } @@ -495,7 +495,7 @@ int OptionsInit(WPARAM wparam, LPARAM) odp.pfnDlgProc = OptsSettingsDlgProc; g_plugin.addOptions(wparam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPS); odp.szGroup.w = LPGENW("Popups"); odp.szTitle.w = LPGENW("Last seen"); diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 5903d50db5..3d0fb768ef 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -476,25 +476,25 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus) mir_snprintf(szSetting, "Col_%d", newStatus - ID_STATUS_OFFLINE); DWORD sett = g_plugin.getDword(szSetting, StatusColors15bits[newStatus - ID_STATUS_OFFLINE]); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, sett); ppd.lchContact = hcontact; ppd.lchIcon = Skin_LoadProtoIcon(lpzProto, newStatus); if (!g_plugin.getWString("PopupStamp", &dbv)) { - wcsncpy(ppd.lptzContactName, ParseString(dbv.pwszVal, hcontact), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzContactName, ParseString(dbv.pwszVal, hcontact), MAX_CONTACTNAME); db_free(&dbv); } - else wcsncpy(ppd.lptzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact), MAX_CONTACTNAME); + else wcsncpy(ppd.lpwzContactName, ParseString(DEFAULT_POPUPSTAMP, hcontact), MAX_CONTACTNAME); if (!g_plugin.getWString("PopupStampText", &dbv)) { - wcsncpy(ppd.lptzText, ParseString(dbv.pwszVal, hcontact), MAX_SECONDLINE); + wcsncpy(ppd.lpwzText, ParseString(dbv.pwszVal, hcontact), MAX_SECONDLINE); db_free(&dbv); } - else wcsncpy(ppd.lptzText, ParseString(DEFAULT_POPUPSTAMPTEXT, hcontact), MAX_SECONDLINE); + else wcsncpy(ppd.lpwzText, ParseString(DEFAULT_POPUPSTAMPTEXT, hcontact), MAX_SECONDLINE); ppd.PluginWindowProc = PopupDlgProc; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus) -- cgit v1.2.3