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/ClientChangeNotify/src/ClientChangeNotify.cpp | 10 +++++----- plugins/ClientChangeNotify/src/Misc.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/ClientChangeNotify/src') diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 51dd8c9265..3c9bd66d4f 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -149,7 +149,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) } PLUGIN_DATA *pdata = (PLUGIN_DATA*)calloc(1, sizeof(PLUGIN_DATA)); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = sd->hContact; char *szProto = GetContactProto(sd->hContact); pdata->hIcon = ppd.lchIcon = Finger_GetClientIcon(sd->MirVer, false); @@ -159,8 +159,8 @@ void ShowPopup(SHOWPOPUP_DATA *sd) ppd.lchIcon = Skin_LoadProtoIcon(szProto, db_get_w(sd->hContact, szProto, "Status", ID_STATUS_OFFLINE)); pdata->hIcon = nullptr; } - wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(sd->hContact), _countof(ppd.lptzContactName) - 1); - wcsncpy(ppd.lptzText, PopupText, _countof(ppd.lptzText) - 1); + wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(sd->hContact), _countof(ppd.lpwzContactName) - 1); + wcsncpy(ppd.lpwzText, PopupText, _countof(ppd.lpwzText) - 1); ppd.colorBack = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFBGCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_BGCOLOUR)); ppd.colorText = (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_DEFTEXTCOLOUR) ? 0 : sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_TEXTCOLOUR)); ppd.PluginWindowProc = PopupWndProc; @@ -168,7 +168,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) pdata->PopupRClickAction = sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_RCLICK_ACTION); ppd.iSeconds = sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_POPUPDELAY); ppd.PluginData = pdata; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } int ContactSettingChanged(WPARAM hContact, LPARAM lParam) @@ -301,7 +301,7 @@ INT_PTR CALLBACK CCNErrorDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM) static int ModuleLoad(WPARAM, LPARAM) { - bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPT); + bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPW); bFingerprintExists = ServiceExists(MS_FP_SAMECLIENTST) && ServiceExists(MS_FP_GETCLIENTICONT); bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING); return 0; diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h index feb0ef296e..ccd6df194e 100644 --- a/plugins/ClientChangeNotify/src/Misc.h +++ b/plugins/ClientChangeNotify/src/Misc.h @@ -25,14 +25,14 @@ extern BOOL bPopupExists; __inline void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine = L"", bool IsErrorMsg = false, int Timeout = 0) { if (bPopupExists) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchIcon = LoadIcon(NULL, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION); - mir_wstrcpy(ppd.lptzContactName, FirstLine); - mir_wstrcpy(ppd.lptzText, SecondLine); + mir_wstrcpy(ppd.lpwzContactName, FirstLine); + mir_wstrcpy(ppd.lpwzText, SecondLine); ppd.colorBack = IsErrorMsg ? 0x0202E3 : 0xE8F1FD; ppd.colorText = IsErrorMsg ? 0xE8F1FD : 0x000000; ppd.iSeconds = Timeout; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } else { MessageBox(NULL, SecondLine, FirstLine, MB_OK | (IsErrorMsg ? MB_ICONEXCLAMATION : MB_ICONINFORMATION)); -- cgit v1.2.3