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) --- include/m_popup.h | 163 +++++++-------------- plugins/Alarms/src/alarmlist.cpp | 12 +- plugins/Alarms/src/alarms.cpp | 10 +- plugins/Alarms/src/options.cpp | 4 +- plugins/AvatarHistory/src/options.cpp | 2 +- plugins/AvatarHistory/src/popup.cpp | 12 +- plugins/BasicHistory/src/Scheduler.cpp | 14 +- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 32 ++-- plugins/BuddyExpectator/src/options.cpp | 16 +- plugins/ChangeKeyboardLayout/src/hook_events.cpp | 4 +- plugins/ChangeKeyboardLayout/src/options.cpp | 10 +- .../ChangeKeyboardLayout/src/text_operations.cpp | 8 +- .../ClientChangeNotify/src/ClientChangeNotify.cpp | 10 +- plugins/ClientChangeNotify/src/Misc.h | 8 +- plugins/CloudFile/src/utils.cpp | 6 +- plugins/CmdLine/src/services.cpp | 2 +- plugins/ConnectionNotify/src/ConnectionNotify.cpp | 10 +- plugins/CrashDumper/src/ui.cpp | 16 +- .../src/CurrencyRatesProviderBase.cpp | 10 +- plugins/CurrencyRates/src/SettingsDlg.cpp | 4 +- plugins/DbEditorPP/src/watchedvars.cpp | 8 +- plugins/Db_autobackups/src/backup.cpp | 8 +- plugins/Db_autobackups/src/options.cpp | 2 +- plugins/Exchange/src/dlg_handlers.cpp | 2 +- plugins/Exchange/src/emails.cpp | 10 +- plugins/Exchange/src/utils.cpp | 8 +- plugins/HTTPServer/src/GuiElements.cpp | 8 +- plugins/LotusNotify/src/LotusNotify.cpp | 10 +- plugins/MenuItemEx/src/main.cpp | 10 +- plugins/MirFox/src/MirandaUtils.cpp | 16 +- plugins/MirLua/Modules/m_popup/src/main.cpp | 16 +- plugins/MirLua/src/utils.cpp | 2 +- plugins/MirOTR/src/options.cpp | 2 +- plugins/MirOTR/src/utils.cpp | 18 +-- plugins/MsgPopup/src/main.cpp | 10 +- plugins/NewAwaySysMod/src/Notification.cpp | 10 +- plugins/NewEventNotify/src/options.cpp | 2 +- plugins/NewEventNotify/src/popup.cpp | 12 +- plugins/NewXstatusNotify/src/main.cpp | 2 +- plugins/NewXstatusNotify/src/options.cpp | 2 +- plugins/NewXstatusNotify/src/popup.cpp | 10 +- plugins/NotifyAnything/src/main.cpp | 10 +- plugins/Nudge/src/main.cpp | 10 +- plugins/OpenSSL/src/ssl_openssl.cpp | 2 +- plugins/PackUpdater/Src/Notifications.cpp | 16 +- plugins/PackUpdater/Src/Options.cpp | 6 +- plugins/PackUpdater/Src/Utils.cpp | 10 +- plugins/Ping/src/options.cpp | 2 +- plugins/Ping/src/utils.cpp | 16 +- plugins/PluginUpdater/src/DlgUpdate.cpp | 2 +- plugins/PluginUpdater/src/Notifications.cpp | 10 +- plugins/PluginUpdater/src/Options.cpp | 2 +- plugins/Popup/src/config.cpp | 10 +- plugins/Popup/src/history.cpp | 6 +- plugins/Popup/src/opt_class.cpp | 2 +- plugins/Popup/src/opt_skins.cpp | 2 +- plugins/Popup/src/popup_wnd2.cpp | 8 +- plugins/Popup/src/services.cpp | 4 +- plugins/Scriver/src/msgs.cpp | 2 +- plugins/SecureIM/src/main.cpp | 2 +- plugins/SeenPlugin/src/options.cpp | 10 +- plugins/SeenPlugin/src/utils.cpp | 12 +- plugins/SendScreenshotPlus/src/Main.cpp | 2 +- plugins/SendScreenshotPlus/src/dlg_msgbox.cpp | 10 +- plugins/SmileyAdd/src/general.cpp | 4 +- plugins/Spamotron/src/options.cpp | 2 +- plugins/Spamotron/src/popups.cpp | 16 +- plugins/SplashScreen/src/debug.h | 10 +- plugins/StartupSilence/src/main.cpp | 32 ++-- plugins/StatusManager/src/keepstatus.cpp | 10 +- plugins/StatusManager/src/ks_options.cpp | 20 +-- plugins/TabSRMM/src/chat_tools.cpp | 8 +- plugins/TabSRMM/src/eventpopups.cpp | 18 +-- plugins/TabSRMM/src/globals.cpp | 2 +- plugins/TabSRMM/src/msgs.cpp | 8 +- plugins/TabSRMM/src/nen.h | 2 +- plugins/TabSRMM/src/sendlater.cpp | 10 +- plugins/TabSRMM/src/typingnotify.cpp | 26 ++-- plugins/TrafficCounter/src/TrafficCounter.cpp | 18 +-- plugins/TranslitSwitcher/src/Layoutproc.cpp | 8 +- plugins/UserInfoEx/src/dlg_msgbox.cpp | 10 +- plugins/UserInfoEx/src/psp_options.cpp | 14 +- plugins/UserInfoEx/src/svc_refreshci.cpp | 14 +- plugins/UserInfoEx/src/svc_reminder.cpp | 12 +- plugins/Weather/src/weather_opt.cpp | 2 +- plugins/Weather/src/weather_popup.cpp | 20 +-- plugins/Weather/src/weather_svcs.cpp | 2 +- plugins/WebView/src/webview.cpp | 2 +- plugins/WebView/src/webview_alerts.cpp | 18 +-- plugins/WebView/src/webview_opts.cpp | 14 +- plugins/WhenWasIt/src/dlg_handlers.cpp | 2 +- plugins/WhenWasIt/src/notifiers.cpp | 32 ++-- plugins/WhenWasIt/src/services.cpp | 8 +- plugins/WhoUsesMyFiles/src/options.cpp | 4 +- plugins/WhoUsesMyFiles/src/wumfplug.cpp | 10 +- plugins/YAMN/src/browser/badconnect.cpp | 16 +- plugins/YAMN/src/browser/mailbrowser.cpp | 26 ++-- plugins/YAMN/src/proto/pop3/pop3opt.cpp | 26 ++-- plugins/YAPP/src/services.cpp | 8 +- protocols/FacebookRM/src/process.cpp | 8 +- protocols/ICQ-WIM/src/main.cpp | 2 +- protocols/ICQ-WIM/src/poll.cpp | 10 +- protocols/ICQ-WIM/src/proto.cpp | 1 + protocols/ICQ-WIM/src/server.cpp | 14 +- protocols/Sametime/src/options.cpp | 2 +- protocols/Steam/src/steam_utils.cpp | 6 +- protocols/Tox/src/tox_utils.cpp | 6 +- protocols/Twitter/src/connection.cpp | 10 +- protocols/Twitter/src/proto.cpp | 26 ++-- protocols/Twitter/src/ui.cpp | 8 +- src/core/stdmsg/src/chat_manager.cpp | 2 +- src/core/stdssl/src/netlibssl.cpp | 2 +- src/mir_app/src/chat_tools.cpp | 8 +- 113 files changed, 579 insertions(+), 637 deletions(-) diff --git a/include/m_popup.h b/include/m_popup.h index 4318ebb08d..18da5ebf0e 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -123,20 +123,12 @@ typedef struct // deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup // Unicode version of POPUPDATAEX_V2 -typedef struct +struct POPUPDATAW_V2 { MCONTACT lchContact; HICON lchIcon; - union - { - wchar_t lptzContactName[MAX_CONTACTNAME]; - wchar_t lpwzContactName[MAX_CONTACTNAME]; - }; - union - { - wchar_t lptzText[MAX_SECONDLINE]; - wchar_t lpwzText[MAX_SECONDLINE]; - }; + wchar_t lpwzContactName[MAX_CONTACTNAME]; + wchar_t lpwzText[MAX_SECONDLINE]; COLORREF colorBack; COLORREF colorText; WNDPROC PluginWindowProc; @@ -148,67 +140,37 @@ typedef struct int actionCount; LPPOPUPACTION lpActions; int cbSize; -} POPUPDATAW_V2, *LPPOPUPDATAW_V2; - -// deprecatet !!! (only for compatibility) use new POPUPDATA2 struct for extended popup -#if defined(_UNICODE) || defined(UNICODE) -typedef POPUPDATAW_V2 POPUPDATAT_V2; -typedef LPPOPUPDATAW_V2 LPPOPUPDATAT_V2; -#endif +}; // Extended popup data -typedef struct +struct POPUPDATA { MCONTACT lchContact; HICON lchIcon; - union - { - char lptzContactName[MAX_CONTACTNAME]; - char lpzContactName[MAX_CONTACTNAME]; - }; - union - { - char lptzText[MAX_SECONDLINE]; - char lpzText[MAX_SECONDLINE]; - }; + char lpzContactName[MAX_CONTACTNAME]; + char lpzText[MAX_SECONDLINE]; COLORREF colorBack; COLORREF colorText; WNDPROC PluginWindowProc; void *PluginData; int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time". char cZero[16]; // Some unused bytes which may come useful in the future. -} POPUPDATA, *LPPOPUPDATA; +}; // Unicode version of POPUPDATA -typedef struct +struct POPUPDATAW { MCONTACT lchContact; HICON lchIcon; - union - { - wchar_t lptzContactName[MAX_CONTACTNAME]; - wchar_t lpwzContactName[MAX_CONTACTNAME]; - }; - union - { - wchar_t lptzText[MAX_SECONDLINE]; - wchar_t lpwzText[MAX_SECONDLINE]; - }; + wchar_t lpwzContactName[MAX_CONTACTNAME]; + wchar_t lpwzText[MAX_SECONDLINE]; COLORREF colorBack; COLORREF colorText; WNDPROC PluginWindowProc; void *PluginData; int iSeconds; char cZero[16]; -} POPUPDATAW, *LPPOPUPDATAW; - -#if defined(_UNICODE) || defined(UNICODE) - typedef POPUPDATAW POPUPDATAT; - typedef LPPOPUPDATAW LPPOPUPDATAT; -#else - typedef POPUPDATA POPUPDATAT; - typedef LPPOPUPDATA LPPOPUPDATAT; -#endif +}; /* Popup/AddPopup Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer. @@ -233,28 +195,22 @@ You may pass additional creation flags via lParam: #define APF_NEWDATA 0x10 //deprecatet!! only for use with old POPUPDATAEX_V2/POPUPDATAW_V2 structs #define MS_POPUP_ADDPOPUP "Popup/AddPopupEx" -static INT_PTR __inline PUAddPopup(POPUPDATA* ppdp) { +__forceinline INT_PTR PUAddPopup(POPUPDATA *ppdp) +{ return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp, 0); } #define MS_POPUP_ADDPOPUPW "Popup/AddPopupW" -static INT_PTR __inline PUAddPopupW(POPUPDATAW* ppdp) { +__forceinline INT_PTR PUAddPopupW(POPUPDATAW *ppdp) +{ return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp, 0); } -static INT_PTR __inline PUAddPopupW(POPUPDATAW_V2* ppdp) { +__forceinline INT_PTR PUAddPopupW(POPUPDATAW_V2 *ppdp) +{ return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp, 0); } -#if defined(_UNICODE) || defined(UNICODE) - #define MS_POPUP_ADDPOPUPT MS_POPUP_ADDPOPUPW - #define PUAddPopupT PUAddPopupW -#else - #define MS_POPUP_ADDPOPUPT MS_POPUP_ADDPOPUP - #define PUAddPopupT PUAddPopup -#endif - - /* Popup/GetContact Returns the handle to the contact associated to the specified PopupWindow. @@ -264,7 +220,7 @@ lParam = 0; Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure. */ #define MS_POPUP_GETCONTACT "Popup/GetContact" -static MCONTACT __inline PUGetContact(HWND hPopupWindow) +__forceinline MCONTACT PUGetContact(HWND hPopupWindow) { return (MCONTACT)CallService(MS_POPUP_GETCONTACT, (WPARAM)hPopupWindow, 0); } @@ -286,9 +242,9 @@ and it will work. Just look at the example I've written above (PopupDlgProc). */ #define MS_POPUP_GETPLUGINDATA "Popup/GetPluginData" -static void __inline * PUGetPluginData(HWND hPopupWindow) { - long * uselessPointer = nullptr; - return (void*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hPopupWindow, (LPARAM)uselessPointer); +__forceinline void* PUGetPluginData(HWND hPopupWindow) +{ + return (void*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hPopupWindow, 0); } /* Popup/Query @@ -322,7 +278,8 @@ lParam = 0 */ #define MS_POPUP_DESTROYPOPUP "Popup/Delete" #define UM_DESTROYPOPUP (WM_USER + 0x0201) -static int __inline PUDeletePopup(HWND hWndPopup) { +__forceinline int PUDeletePopup(HWND hWndPopup) +{ return (int)CallService(MS_POPUP_DESTROYPOPUP, 0, (LPARAM)hWndPopup); } @@ -347,15 +304,12 @@ PUIsSecondLineShown() before changing the text...) */ #define MS_POPUP_CHANGETEXTW "Popup/ChangetextW" -static int __inline PUChangeTextW(HWND hWndPopup, LPCWSTR lpwzNewText) { + +__forceinline int PUChangeTextW(HWND hWndPopup, LPCWSTR lpwzNewText) +{ return (int)CallService(MS_POPUP_CHANGETEXTW, (WPARAM)hWndPopup, (LPARAM)lpwzNewText); } -#if defined(_UNICODE) || defined(UNICODE) - #define MS_POPUP_CHANGETEXTT MS_POPUP_CHANGETEXTW - #define PUChangeTextT PUChangeTextW -#endif - /* Popup/Change Changes the entire popup @@ -364,19 +318,16 @@ lParam = (LPARAM)(POPUPDATA*)newData */ #define MS_POPUP_CHANGEW "Popup/ChangeW" -static int __inline PUChangeW(HWND hWndPopup, POPUPDATAW *newData) { +__forceinline int PUChangeW(HWND hWndPopup, POPUPDATAW *newData) +{ return (int)CallService(MS_POPUP_CHANGEW, (WPARAM)hWndPopup, (LPARAM)newData); } -static int __inline PUChangeW(HWND hWndPopup, POPUPDATAW_V2 *newData) { +__forceinline int PUChangeW(HWND hWndPopup, POPUPDATAW_V2 *newData) +{ return (int)CallService(MS_POPUP_CHANGEW, (WPARAM)hWndPopup, (LPARAM)newData); } -#if defined(_UNICODE) || defined(UNICODE) - #define MS_POPUP_CHANGET MS_POPUP_CHANGEW - #define PUChangeT PUChangeW -#endif - /* UM_CHANGEPOPUP This message is triggered by Change/ChangeText services. You also may post it directly :) @@ -391,12 +342,6 @@ lParam = value of type defined by wParam #define UM_CHANGEPOPUP (WM_USER + 0x0203) -#if defined(_UNICODE) || defined(UNICODE) - #define CPT_TEXTT CPT_TEXTW - #define CPT_TITLET CPT_TITLEW - #define CPT_DATAT CPT_DATAW -#endif - /* UM_POPUPACTION Popup Action notification @@ -413,14 +358,15 @@ wParam = (WPARAM)(LPPOPUPACTIONID)&actionId lParam = (LPARAM)(HICON)hIcon */ -typedef struct +struct POPUPACTIONID { WPARAM wParam; LPARAM lParam; -} POPUPACTIONID, *LPPOPUPACTIONID; +}; #define UM_POPUPMODIFYACTIONICON (WM_USER + 0x0205) -static int __inline PUModifyActionIcon(HWND hWndPopup, WPARAM wParam, LPARAM lParam, HICON hIcon) { +__forceinline int PUModifyActionIcon(HWND hWndPopup, WPARAM wParam, LPARAM lParam, HICON hIcon) +{ POPUPACTIONID actionId = { wParam, lParam }; return (int)SendMessage(hWndPopup, UM_POPUPMODIFYACTIONICON, (WPARAM)&actionId, (LPARAM)hIcon); } @@ -443,7 +389,8 @@ Returns: 0 if the popup was shown, -1 in case of failure. */ #define MS_POPUP_REGISTERACTIONS "Popup/RegisterActions" -static int __inline PURegisterActions(LPPOPUPACTION actions, int count) { +__forceinline int PURegisterActions(LPPOPUPACTION actions, int count) +{ return (int)CallService(MS_POPUP_REGISTERACTIONS, (WPARAM)actions, (LPARAM)count); } @@ -505,7 +452,8 @@ typedef struct DLGPROC pfnReserved2; // reserved for future use } POPUPNOTIFICATION, *LPPOPUPNOTIFICATION; -static HANDLE __inline PURegisterNotification(LPPOPUPNOTIFICATION notification) { +__forceinline HANDLE PURegisterNotification(LPPOPUPNOTIFICATION notification) +{ return (HANDLE)CallService(MS_POPUP_REGISTERNOTIFICATION, (WPARAM)notification, 0); } @@ -540,7 +488,8 @@ lParam = (LPARAM)(HANDLE)hEventUnhooked */ #define UM_POPUPUNHOOKCOMPLETE (WM_USER + 0x0206) -static int __inline PUUnhookEventAsync(HWND hwndPopup, HANDLE hEvent) { +__forceinline int PUUnhookEventAsync(HWND hwndPopup, HANDLE hEvent) +{ if (ServiceExists(MS_POPUP_UNHOOKEVENTASYNC)) return (int)CallService(MS_POPUP_UNHOOKEVENTASYNC, (WPARAM)hwndPopup, (LPARAM)hEvent); @@ -604,20 +553,16 @@ Returns: 0 if the popup was shown, -1 in case of failure. #define MS_POPUP_SHOWMESSAGE "Popup/ShowMessage" #define MS_POPUP_SHOWMESSAGEW "Popup/ShowMessageW" -static int __inline PUShowMessage(char *lpzText, DWORD kind) { +__forceinline int PUShowMessage(char *lpzText, DWORD kind) +{ return (int)CallService(MS_POPUP_SHOWMESSAGE, (WPARAM)lpzText, (LPARAM)kind); } -static int __inline PUShowMessageW(wchar_t *lpwzText, DWORD kind) { +__forceinline int PUShowMessageW(wchar_t *lpwzText, DWORD kind) +{ return (int)CallService(MS_POPUP_SHOWMESSAGEW, (WPARAM)lpwzText, (LPARAM)kind); } -#ifdef _UNICODE -#define PUShowMessageT PUShowMessageW -#else -#define PUShowMessageT PUShowMessage -#endif - /* Popup/Filter Filters popups out @@ -655,7 +600,7 @@ struct POPUPCLASS // lParam = (POPUPCLASS *)&pc #define MS_POPUP_REGISTERCLASS "Popup/RegisterClass" -HANDLE __forceinline Popup_RegisterClass(POPUPCLASS *pc) +__forceinline HANDLE Popup_RegisterClass(POPUPCLASS *pc) { if (!ServiceExists(MS_POPUP_REGISTERCLASS)) return nullptr; @@ -664,7 +609,7 @@ HANDLE __forceinline Popup_RegisterClass(POPUPCLASS *pc) #define MS_POPUP_UNREGISTERCLASS "Popup/UnregisterClass" -void __forceinline Popup_UnregisterClass(HANDLE ppc) +__forceinline void Popup_UnregisterClass(HANDLE ppc) { if (ppc) CallService(MS_POPUP_UNREGISTERCLASS, 0, LPARAM(ppc)); @@ -672,7 +617,7 @@ void __forceinline Popup_UnregisterClass(HANDLE ppc) typedef struct { int cbSize; - char *pszClassName; + const char *pszClassName; union { const char *pszTitle; const wchar_t *pwszTitle; @@ -689,24 +634,20 @@ typedef struct { // lParam = (POPUPDATACLASS *)&pdc #define MS_POPUP_ADDPOPUPCLASS "Popup/AddPopupClass" -static INT_PTR __inline ShowClassPopup(char *name, char *title, char *text) { +__forceinline INT_PTR ShowClassPopup(const char *name, const char *title, const char *text) +{ POPUPDATACLASS d = {sizeof(d), name}; d.pszTitle = title; d.pszText = text; return CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); } -static INT_PTR __inline ShowClassPopupW(char *name, wchar_t *title, wchar_t *text) { +__forceinline INT_PTR ShowClassPopupW(const char *name, const wchar_t *title, const wchar_t *text) +{ POPUPDATACLASS d = {sizeof(d), name}; d.pwszTitle = title; d.pwszText = text; return CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d); } -#ifdef _UNICODE -#define ShowClassPopupT ShowClassPopupW -#else -#define ShowClassPopupT ShowClassPopup -#endif - #endif // __m_popup_h__ diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index 9d068cf908..515383f672 100755 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -611,19 +611,19 @@ static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam void ShowPopup(ALARM *alarm) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { ALARM *data = new ALARM; memset(data, 0, sizeof(ALARM)); copy_alarm_data(data, alarm); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchIcon = hIconMenuSet; - mir_wstrncpy(ppd.lptzContactName, data->szTitle, MAX_CONTACTNAME); - mir_wstrncpy(ppd.lptzText, data->szDesc, MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzContactName, data->szTitle, MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, data->szDesc, MAX_SECONDLINE); ppd.PluginWindowProc = PopupAlarmDlgProc; ppd.PluginData = data; ppd.iSeconds = -1; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } } @@ -658,7 +658,7 @@ void DoAlarm(ALARM *alarm) } if (alarm->action & AAF_POPUP) { - if (options.use_popup_module && ServiceExists(MS_POPUP_ADDPOPUPT)) + if (options.use_popup_module && ServiceExists(MS_POPUP_ADDPOPUPW)) ShowPopup(alarm); else { HWND hwndDlg = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_ALARM), GetDesktopWindow(), DlgProcAlarm); diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 50505dff78..d75f9688c4 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -60,14 +60,14 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA void ShowPopup(MCONTACT hContact, const wchar_t *msg) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked. ppd.lchIcon = hIconList1; - mir_wstrncpy(ppd.lptzContactName, lpzContactName, MAX_CONTACTNAME); - mir_wstrncpy(ppd.lptzText, msg, MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzContactName, lpzContactName, MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, msg, MAX_SECONDLINE); ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = RGB(0, 0, 0); ppd.PluginWindowProc = PopupDlgProc; @@ -75,7 +75,7 @@ void ShowPopup(MCONTACT hContact, const wchar_t *msg) ppd.iSeconds = 3; // Now that every field has been filled, we want to see the popup. - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } } diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index bf75d40ced..387275294a 100755 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -941,7 +941,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg, IDC_DEL), FALSE); } - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { CheckDlgButton(hwndDlg, IDC_CHK_POPUPS, temp_options.use_popup_module ? BST_CHECKED : BST_UNCHECKED); if (options.use_popup_module) bChecked = FALSE; @@ -1179,7 +1179,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA int reminder_period = GetDlgItemInt(hwndDlg, IDC_ED_PERIOD, &translated, FALSE); if (translated) temp_options.reminder_period = reminder_period; - if (!ServiceExists(MS_POPUP_ADDPOPUPT) || !options.use_popup_module) + if (!ServiceExists(MS_POPUP_ADDPOPUPW) || !options.use_popup_module) temp_options.loop_sound = IsDlgButtonChecked(hwndDlg, IDC_CHK_LOOPSOUND) ? true : false; options = temp_options; diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp index 900bdf1c7a..e0ee99b963 100644 --- a/plugins/AvatarHistory/src/options.cpp +++ b/plugins/AvatarHistory/src/options.cpp @@ -154,7 +154,7 @@ int OptInit(WPARAM wParam, LPARAM) odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szGroup.w = LPGENW("Popups"); odp.szTitle.w = LPGENW("Avatar change"); odp.pfnDlgProc = PopupsDlgProc; diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index fad9b3c33a..e45c2aa43b 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -90,9 +90,9 @@ PopupDataType; void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *description, void *plugin_data, int type, const Options *op) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { // Make popup - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.lchIcon = createProtoOverlayedIcon(hContact); @@ -102,12 +102,12 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip ((PopupDataType*)ppd.PluginData)->hIcon = ppd.lchIcon; if (title != nullptr) - mir_wstrncpy(ppd.lptzContactName, title, _countof(ppd.lptzContactName)); + mir_wstrncpy(ppd.lpwzContactName, title, _countof(ppd.lpwzContactName)); else if (hContact != NULL) - mir_wstrncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), _countof(ppd.lptzContactName)); + mir_wstrncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), _countof(ppd.lpwzContactName)); if (description != nullptr) - mir_wstrncpy(ppd.lptzText, description, _countof(ppd.lptzText)); + mir_wstrncpy(ppd.lpwzText, description, _countof(ppd.lpwzText)); if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST) { if (op->popup_use_default_colors) { @@ -159,7 +159,7 @@ void ShowPopupEx(MCONTACT hContact, const wchar_t *title, const wchar_t *descrip } // Now that every field has been filled, we want to see the popup. - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } else { MessageBox(nullptr, description, title ? title : Clist_GetContactDisplayName(hContact), MB_OK); diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 695f7b286d..9a6ceaee02 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -65,7 +65,7 @@ static int OnShutdown(WPARAM, LPARAM) void InitScheduler() { - bPopupsEnabled = ServiceExists(MS_POPUP_ADDPOPUPT) || ServiceExists(MS_POPUP_ADDPOPUPCLASS); + bPopupsEnabled = ServiceExists(MS_POPUP_ADDPOPUPW) || ServiceExists(MS_POPUP_ADDPOPUPCLASS); POPUPCLASS test = { sizeof(test) }; test.flags = PCF_UNICODE; @@ -1298,13 +1298,13 @@ void DoError(const TaskOptions& to, const std::wstring _error) return; if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) - ShowClassPopupT(MODULENAME, msg, (wchar_t*)_error.c_str()); - else if (ServiceExists(MS_POPUP_ADDPOPUPT)) { - POPUPDATAT ppd = { 0 }; + ShowClassPopupW(MODULENAME, msg, _error.c_str()); + else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { + POPUPDATAW ppd = { 0 }; ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY); - wcscpy_s(ppd.lptzContactName, msg); - wcscpy_s(ppd.lptzText, _error.c_str()); - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0); + wcscpy_s(ppd.lpwzContactName, msg); + wcscpy_s(ppd.lpwzText, _error.c_str()); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, 0); } } } diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 9baeda0297..03e7537982 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -224,13 +224,13 @@ bool isContactGoneFor(MCONTACT hContact, int days) if (options.hideInactive) if (daysSinceMessage >= options.iSilencePeriod) if (!db_get_b(hContact, "CList", "Hidden", 0) && !g_plugin.getByte(hContact, "NeverHide", 0)) { - POPUPDATAT_V2 ppd = { 0 }; + POPUPDATAW_V2 ppd = { 0 }; ppd.cbSize = sizeof(ppd); ppd.lchContact = hContact; ppd.lchIcon = IcoLib_GetIcon("enabled_icon"); - mir_snwprintf(ppd.lptzContactName, TranslateT("Hiding %s (%S)"), Clist_GetContactDisplayName(hContact), GetContactProto(hContact)); - mir_snwprintf(ppd.lptzText, TranslateT("%d days since last message"), daysSinceMessage); + mir_snwprintf(ppd.lpwzContactName, TranslateT("Hiding %s (%S)"), Clist_GetContactDisplayName(hContact), GetContactProto(hContact)); + mir_snwprintf(ppd.lpwzText, TranslateT("%d days since last message"), daysSinceMessage); if (!options.iUsePopupColors) { ppd.colorBack = options.iPopupColorBack; @@ -243,7 +243,7 @@ bool isContactGoneFor(MCONTACT hContact, int days) ppd.lpActions = hideactions; ppd.actionCount = 2; - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA); Skin_PlaySound("buddyExpectatorHide"); } @@ -260,11 +260,11 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) if (options.iShowPopup > 0) { // Display Popup - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, message, MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); if (!options.iUsePopupColors) { ppd.colorBack = options.iPopupColorBack; ppd.colorText = options.iPopupColorFore; @@ -272,7 +272,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) ppd.PluginWindowProc = PopupDlgProc; ppd.PluginData = nullptr; ppd.iSeconds = options.iPopupDelay; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } if (options.iShowEvent > 0) { @@ -297,11 +297,11 @@ void GoneNotify(MCONTACT hContact, wchar_t *message) if (options.iShowPopup2 > 0) { // Display Popup - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, message, MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); if (!options.iUsePopupColors) { ppd.colorBack = options.iPopupColorBack; ppd.colorText = options.iPopupColorFore; @@ -310,7 +310,7 @@ void GoneNotify(MCONTACT hContact, wchar_t *message) ppd.PluginData = nullptr; ppd.iSeconds = options.iPopupDelay; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } if (options.iShowEvent2 > 0) { @@ -478,13 +478,13 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) if (prevStatus == ID_STATUS_OFFLINE) { if (g_plugin.getByte(hContact, "MissYou", 0)) { // Display Popup - POPUPDATAT_V2 ppd = { 0 }; + POPUPDATAW_V2 ppd = { 0 }; ppd.cbSize = sizeof(ppd); ppd.lchContact = hContact; ppd.lchIcon = IcoLib_GetIcon("enabled_icon"); - wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE); if (!options.iUsePopupColors) { ppd.colorBack = options.iPopupColorBack; ppd.colorText = options.iPopupColorFore; @@ -497,7 +497,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) ppd.lpActions = missyouactions; ppd.actionCount = 1; - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA); Skin_PlaySound("buddyExpectatorMissYou"); } diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index 6296fd7b34..48d768140b 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -94,7 +94,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_POPUP), FALSE); //iAbsencePeriod @@ -313,7 +313,7 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP case WM_COMMAND: if (LOWORD(wParam) == IDC_PREVIEW) { - POPUPDATAT ppd; + POPUPDATAW ppd; memset(&ppd, 0, sizeof(ppd)); //iPopupDelay @@ -325,10 +325,10 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.lchContact = NULL; ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, TranslateT("Contact name"), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzContactName, TranslateT("Contact name"), MAX_CONTACTNAME); wchar_t szPreviewText[250]; mir_snwprintf(szPreviewText, TranslateT("has returned after being absent since %d days"), rand() % 30); - wcsncpy(ppd.lptzText, szPreviewText, MAX_SECONDLINE); + wcsncpy(ppd.lpwzText, szPreviewText, MAX_SECONDLINE); // Get current popups colors options if (IsDlgButtonChecked(hwndDlg, IDC_COLORS_POPUP)) @@ -344,12 +344,12 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.PluginData = nullptr; ppd.iSeconds = options.iPopupDelay; - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NO_HISTORY); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY); - wcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE); + wcsncpy(ppd.lpwzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE); ppd.lchIcon = IcoLib_GetIcon("enabled_icon"); - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NO_HISTORY); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NO_HISTORY); } else { if ((HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == CBN_SELCHANGE) || ((HIWORD(wParam) == EN_CHANGE) && !ChangeLock)) @@ -439,7 +439,7 @@ int OptionsInit(WPARAM wParam, LPARAM) odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szGroup.w = LPGENW("Popups"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPPANEL); odp.pfnDlgProc = PopupOptionsFrameProc; diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 15c18f7e28..7f8ef8a952 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -74,7 +74,7 @@ void WritePopupOptions() void RegPopupActions() { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { poOptions.paActions[0].cbSize = sizeof(POPUPACTION); strncpy_s(poOptions.paActions[0].lpzTitle, MODULENAME, _TRUNCATE); strncat_s(poOptions.paActions[0].lpzTitle, _countof(poOptions.paActions[0].lpzTitle), "/Copy to clipboard", _TRUNCATE); @@ -148,7 +148,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM) odp.pfnDlgProc = DlgMainProcOptions; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPTION_FORM); odp.szGroup.a = LPGEN("Popups"); odp.pfnDlgProc = DlgPopupsProcOptions; diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index a27d12566f..32261377bd 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -352,10 +352,10 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, if ((HIWORD(wParam) == BN_CLICKED )) { ptszPopupPreviewText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t)); - POPUPDATAT_V2 pdtData = { 0 }; + POPUPDATAW_V2 pdtData = { 0 }; pdtData.cbSize = sizeof(pdtData); - wcsncpy(pdtData.lptzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME); - wcsncpy(pdtData.lptzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE); + wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME); + wcsncpy(pdtData.lpwzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE); switch(poOptionsTemp.bColourType) { case PPC_POPUP: @@ -382,7 +382,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, pdtData.iSeconds = poOptionsTemp.bTimeout; break; } - mir_wstrcpy(ptszPopupPreviewText, pdtData.lptzText); + mir_wstrcpy(ptszPopupPreviewText, pdtData.lpwzText); pdtData.PluginData = ptszPopupPreviewText; pdtData.lchIcon = hPopupIcon; poOptions.paActions[0].lchIcon = hCopyIcon; @@ -390,7 +390,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, pdtData.actionCount = 1; pdtData.PluginWindowProc = (WNDPROC)CKLPopupDlgProc; - if ( CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &pdtData, APF_NEWDATA) < 0) + if ( CallService(MS_POPUP_ADDPOPUPW, (WPARAM) &pdtData, APF_NEWDATA) < 0) mir_free(ptszPopupPreviewText); } break; diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 8136933674..ae0f47645f 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -448,10 +448,10 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) LPTSTR ptszPopupText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t)); mir_wstrcpy(ptszPopupText, ptszMBox); - POPUPDATAT_V2 pdtData = { 0 }; + POPUPDATAW_V2 pdtData = { 0 }; pdtData.cbSize = sizeof(pdtData); - wcsncpy(pdtData.lptzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME); - wcsncpy(pdtData.lptzText, ptszPopupText, MAX_SECONDLINE); + wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME); + wcsncpy(pdtData.lpwzText, ptszPopupText, MAX_SECONDLINE); switch (poOptions.bColourType) { case PPC_POPUP: @@ -486,7 +486,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) pdtData.lpActions = poOptions.paActions; pdtData.actionCount = 1; - if (CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pdtData, APF_NEWDATA) < 0) { + if (CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pdtData, APF_NEWDATA) < 0) { mir_free(ptszPopupText); MessageBox(nullptr, ptszMBox, TranslateT(MODULENAME), MB_ICONINFORMATION); } 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)); diff --git a/plugins/CloudFile/src/utils.cpp b/plugins/CloudFile/src/utils.cpp index 5d75225db8..79b743f5c2 100644 --- a/plugins/CloudFile/src/utils.cpp +++ b/plugins/CloudFile/src/utils.cpp @@ -5,14 +5,14 @@ void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { - POPUPDATAT ppd = { 0 }; + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); ppd.lchIcon = IcoLib_GetIcon("Slack_main"); - if (!PUAddPopupT(&ppd)) + if (!PUAddPopupW(&ppd)) return; } diff --git a/plugins/CmdLine/src/services.cpp b/plugins/CmdLine/src/services.cpp index 333cc893a1..68a6245aa3 100644 --- a/plugins/CmdLine/src/services.cpp +++ b/plugins/CmdLine/src/services.cpp @@ -84,7 +84,7 @@ int StartServer() failure = 0; } - else PUShowMessageT(TranslateT("Could not create CommandLine listening server!"), SM_WARNING); + else PUShowMessageW(TranslateT("Could not create CommandLine listening server!"), SM_WARNING); } else MessageBox(nullptr, TranslateT("You can only run one instance of CmdLine plugin."), TranslateT("Error"), MB_ICONERROR | MB_OK); } diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index 13151f8b40..5c54926e0c 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -755,7 +755,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA void showMsg(wchar_t *pName, DWORD pid, wchar_t *intIp, wchar_t *extIp, int intPort, int extPort, int state) { - POPUPDATAT ppd; + POPUPDATAW ppd; //hContact = A_VALID_HANDLE_YOU_GOT_FROM_SOMEWHERE; //hIcon = A_VALID_HANDLE_YOU_GOT_SOMEWHERE; //char * lpzContactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)lhContact,0); @@ -772,11 +772,11 @@ void showMsg(wchar_t *pName, DWORD pid, wchar_t *intIp, wchar_t *extIp, int intP if (settingResolveIp) { wchar_t hostName[128]; getDnsName(extIp, hostName, _countof(hostName)); - mir_snwprintf(ppd.lptzText, L"%s:%d\n%s:%d", hostName, extPort, intIp, intPort); + mir_snwprintf(ppd.lpwzText, L"%s:%d\n%s:%d", hostName, extPort, intIp, intPort); } - else mir_snwprintf(ppd.lptzText, L"%s:%d\n%s:%d", extIp, extPort, intIp, intPort); + else mir_snwprintf(ppd.lpwzText, L"%s:%d\n%s:%d", extIp, extPort, intIp, intPort); - mir_snwprintf(ppd.lptzContactName, L"%s (%s)", pName, tcpStates[state - 1]); + mir_snwprintf(ppd.lpwzContactName, L"%s (%s)", pName, tcpStates[state - 1]); if (settingSetColours) { ppd.colorBack = settingBgColor; @@ -797,7 +797,7 @@ void showMsg(wchar_t *pName, DWORD pid, wchar_t *intIp, wchar_t *extIp, int intP ppd.PluginData = mpd; //Now that every field has been filled, we want to see the popup. - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } //called after all plugins loaded. diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp index 769cfd476f..390d0af67e 100644 --- a/plugins/CrashDumper/src/ui.cpp +++ b/plugins/CrashDumper/src/ui.cpp @@ -306,23 +306,23 @@ LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) return DefWindowProc(hWnd, msg, wParam, lParam); } -void ShowMessage(int type, const wchar_t* format, ...) +void ShowMessage(int type, const wchar_t *format, ...) { - POPUPDATAT pi = {}; + POPUPDATAW pi = {}; va_list va; va_start(va, format); - int len = mir_vsnwprintf(pi.lptzText, _countof(pi.lptzText) - 1, format, va); - pi.lptzText[len] = 0; + int len = mir_vsnwprintf(pi.lpwzText, _countof(pi.lpwzText) - 1, format, va); + pi.lpwzText[len] = 0; va_end(va); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { - mir_wstrcpy(pi.lptzContactName, _A2W(MODULENAME)); + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { + mir_wstrcpy(pi.lpwzContactName, _A2W(MODULENAME)); pi.lchIcon = LoadIconEx(IDI_VI); pi.PluginWindowProc = DlgProcPopup; pi.PluginData = (void*)type; - PUAddPopupT(&pi); + PUAddPopupW(&pi); } - else MessageBox(nullptr, pi.lptzText, _A2W(MODULENAME), MB_OK | MB_ICONINFORMATION); + else MessageBox(nullptr, pi.lpwzText, _A2W(MODULENAME), MB_OK | MB_ICONINFORMATION); } diff --git a/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp b/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp index 93f904b28a..592fd551ba 100644 --- a/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp +++ b/plugins/CurrencyRates/src/CurrencyRatesProviderBase.cpp @@ -443,10 +443,10 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, const tstring& rsFormat, const CPopupSettings& ps) { - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) return false; - POPUPDATAT ppd; + POPUPDATAW ppd; memset(&ppd, 0, sizeof(ppd)); ppd.lchContact = hContact; @@ -460,11 +460,11 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, ppd.lchIcon = CurrencyRates_LoadIconEx(IDI_ICON_DOWN); } - mir_wstrncpy(ppd.lptzContactName, pProvider->FormatSymbol(hContact, 's').c_str(), MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzContactName, pProvider->FormatSymbol(hContact, 's').c_str(), MAX_CONTACTNAME); { ptrW ss(variables_parsedup((wchar_t*)rsFormat.c_str(), nullptr, hContact)); tstring sText = format_rate(pProvider, hContact, tstring(ss)); - mir_wstrncpy(ppd.lptzText, sText.c_str(), MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzText, sText.c_str(), MAX_SECONDLINE); } if (CPopupSettings::colourDefault == ps.GetColourMode()) { @@ -494,7 +494,7 @@ bool show_popup(const ICurrencyRatesProvider *pProvider, if (false == ps.GetHistoryFlag()) lp |= 0x08; - return (0 == CallService(MS_POPUP_ADDPOPUPT, reinterpret_cast(&ppd), lp)); + return (0 == CallService(MS_POPUP_ADDPOPUPW, reinterpret_cast(&ppd), lp)); } void CCurrencyRatesProviderBase::WriteContactRate(MCONTACT hContact, double dRate, const tstring& rsSymbol/* = ""*/) diff --git a/plugins/CurrencyRates/src/SettingsDlg.cpp b/plugins/CurrencyRates/src/SettingsDlg.cpp index 164367450e..0d919d76a0 100644 --- a/plugins/CurrencyRates/src/SettingsDlg.cpp +++ b/plugins/CurrencyRates/src/SettingsDlg.cpp @@ -40,7 +40,7 @@ void update_popup_controls(HWND hDlg) bool enable_popup_controls(HWND hDlg) { - bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPT); + bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPW); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP), bIsPopupServiceEnabled); ::EnableWindow(::GetDlgItem(hDlg, IDC_EDIT_POPUP_FORMAT), bIsPopupServiceEnabled); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP_ONLY_VALUE_CHANGED), bIsPopupServiceEnabled); @@ -72,7 +72,7 @@ void update_all_controls(HWND hDlg) ::EnableWindow(::GetDlgItem(hDlg, IDC_BUTTON_HISTORY_DESCRIPTION), (bIsCheckedContactSpec&&bIsCheckedHistory)); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_HISTORY_CONDITION), (bIsCheckedContactSpec&&bIsCheckedHistory)); - bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPT); + bool bIsPopupServiceEnabled = 1 == ServiceExists(MS_POPUP_ADDPOPUPW); bool bIsCheckedShowPopup = (1 == ::IsDlgButtonChecked(hDlg, IDC_CHECK_SHOW_POPUP)); ::EnableWindow(::GetDlgItem(hDlg, IDC_CHECK_SHOW_POPUP), (bIsCheckedContactSpec&&bIsPopupServiceEnabled)); ::EnableWindow(::GetDlgItem(hDlg, IDC_EDIT_POPUP_FORMAT), (bIsCheckedContactSpec&&bIsPopupServiceEnabled&&bIsCheckedShowPopup)); diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index d117298fc9..333180ef33 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -359,13 +359,13 @@ void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting) int type = GetValue(hContact, module, setting, value, _countof(value)); mir_snwprintf(text, TranslateT("Database Setting Changed: \nModule: \"%s\", Setting: \"%s\"\nNew Value (%s): \"%s\""), _A2T(module), _A2T(setting), DBVType(type), value); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = (MCONTACT)hContact; ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(ICO_REGEDIT)); - mir_wstrncpy(ppd.lptzContactName, name, _countof(ppd.lptzContactName)); - mir_wstrncpy(ppd.lptzText, text, _countof(ppd.lptzText)); + mir_wstrncpy(ppd.lpwzContactName, name, _countof(ppd.lpwzContactName)); + mir_wstrncpy(ppd.lpwzText, text, _countof(ppd.lpwzText)); ppd.colorBack = colorBack; ppd.colorText = colorText; ppd.iSeconds = timeout ? timeout : -1; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index 2c5c9568cb..e36c994ea6 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -28,16 +28,16 @@ static LRESULT CALLBACK DlgProcPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM static void ShowPopup(const wchar_t *ptszText, wchar_t *ptszHeader, wchar_t *ptszPath) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; - wcsncpy_s(ppd.lptzText, ptszText, _TRUNCATE); - wcsncpy_s(ppd.lptzContactName, ptszHeader, _TRUNCATE); + wcsncpy_s(ppd.lpwzText, ptszText, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, ptszHeader, _TRUNCATE); if (ptszPath != nullptr) ppd.PluginData = (void*)mir_wstrdup(ptszPath); ppd.PluginWindowProc = DlgProcPopup; ppd.lchIcon = IcoLib_GetIcon(iconList[0].szName); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } static INT_PTR CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index 652ef103c4..0365fc5393 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -194,7 +194,7 @@ public: CreateToolTip(tszTooltipText, TranslateT("Variables")); } - m_disablePopups.Show(ServiceExists(MS_POPUP_ADDPOPUPT)); + m_disablePopups.Show(ServiceExists(MS_POPUP_ADDPOPUPW)); m_useCloudFile.Enable(ServiceExists(MS_CLOUDFILE_UPLOAD)); if (ServiceExists(MS_CLOUDFILE_ENUMSERVICES)) { diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp index 8fd8a3e1c9..0b084374cc 100644 --- a/plugins/Exchange/src/dlg_handlers.cpp +++ b/plugins/Exchange/src/dlg_handlers.cpp @@ -58,7 +58,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara SetDlgItemInt(hWnd, IDC_RECONNECT_INTERVAL, g_plugin.getDword("ReconnectInterval", DEFAULT_RECONNECT_INTERVAL), FALSE); CheckDlgButton(hWnd, IDC_USE_POPUPS, (BOOL)g_plugin.getByte("UsePopups", 0) ? BST_CHECKED : BST_UNCHECKED); - EnableWindow(GetDlgItem(hWnd, IDC_USE_POPUPS), ServiceExists(MS_POPUP_ADDPOPUPT)); //disable the popups checkbox if no popup module is present + EnableWindow(GetDlgItem(hWnd, IDC_USE_POPUPS), ServiceExists(MS_POPUP_ADDPOPUPW)); //disable the popups checkbox if no popup module is present CheckDlgButton(hWnd, IDC_CHECK_EMAILS, (bCheck) ? BST_CHECKED : BST_UNCHECKED); EnableWindow(GetDlgItem(hWnd, IDC_INTERVAL_EDIT), bCheck); diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp index dbf2e30884..58d0459db6 100644 --- a/plugins/Exchange/src/emails.cpp +++ b/plugins/Exchange/src/emails.cpp @@ -294,7 +294,7 @@ int CExchangeServer::Check(int bNoEmailsNotify) int ShowMessage(wchar_t *message, int cUnreadEmails) { - int usePopups = ServiceExists(MS_POPUP_ADDPOPUPT) ? g_plugin.getByte("UsePopups", 0) : 0; + int usePopups = ServiceExists(MS_POPUP_ADDPOPUPW) ? g_plugin.getByte("UsePopups", 0) : 0; if (usePopups) return ShowPopupMessage(TranslateT("Exchange email"), message, cUnreadEmails); @@ -303,16 +303,16 @@ int ShowMessage(wchar_t *message, int cUnreadEmails) int ShowPopupMessage(wchar_t *title, wchar_t *message, int cUnreadEmails) { - POPUPDATAT popup = {0}; + POPUPDATAW popup = {0}; popup.lchContact = NULL; popup.colorBack = NULL; popup.colorText = NULL; popup.lchIcon = hiMailIcon; - wcsncpy_s(popup.lptzContactName, MAX_CONTACTNAME, title, _TRUNCATE); - wcsncpy_s(popup.lptzText, MAX_SECONDLINE, message, _TRUNCATE); + wcsncpy_s(popup.lpwzContactName, MAX_CONTACTNAME, title, _TRUNCATE); + wcsncpy_s(popup.lpwzText, MAX_SECONDLINE, message, _TRUNCATE); popup.PluginWindowProc = DlgProcPopup; popup.PluginData = (int *) cUnreadEmails; - return PUAddPopupT(&popup); + return PUAddPopupW(&popup); } int ShowMessageBoxMessage(wchar_t *title, wchar_t *message, int cUnreadEmails) diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 8874775373..b5459483ef 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -220,9 +220,9 @@ int ThreadCheckEmail(int bForceAttempt) void _popupUtil(wchar_t* szMsg) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchIcon = hiMailIcon; - wcsncpy(ppd.lptzContactName, L"Exchange notifier", MAX_CONTACTNAME - 1); - wcsncpy(ppd.lptzText, szMsg, MAX_SECONDLINE - 1); - PUAddPopupT(&ppd); //show a popup to tell the user what we're doing. + wcsncpy(ppd.lpwzContactName, L"Exchange notifier", MAX_CONTACTNAME - 1); + wcsncpy(ppd.lpwzText, szMsg, MAX_SECONDLINE - 1); + PUAddPopupW(&ppd); //show a popup to tell the user what we're doing. } diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index bf3690caa8..a8b08272a7 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -1336,11 +1336,11 @@ int OptionsInitialize(WPARAM wParam, LPARAM /*lParam*/) void CALLBACK MainThreadCallback(void *param) { - POPUPDATAT *pclData = (POPUPDATAT*)param; + POPUPDATA *pclData = (POPUPDATA*)param; if (g_plugin.getByte("WriteLogFile", 0) != 0) LogEvent(pclData->lpzContactName, pclData->lpzText); - PUAddPopupT(pclData); + PUAddPopup(pclData); delete pclData; } @@ -1400,8 +1400,8 @@ void ShowPopupWindow(const char * pszName, const char * pszText, COLORREF ColorB if (!bShowPopups) return; - POPUPDATAT *pclData = new POPUPDATAT; - memset(pclData, 0, sizeof(POPUPDATAT)); + POPUPDATA *pclData = new POPUPDATA; + memset(pclData, 0, sizeof(POPUPDATA)); pclData->lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SHARE_NEW_FILE)); strncpy(pclData->lpzContactName, pszName, sizeof(pclData->lpzContactName) - 1); // -1 so that there aways will be a null termination !! strncpy(pclData->lpzText, pszText, sizeof(pclData->lpzText) - 1); diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 27f485002a..4f50ff2f54 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -447,7 +447,7 @@ BOOL checkNotesIniFile(BOOL bInfo) void showMsg(wchar_t* sender,wchar_t* text, DWORD id, char *strUID) { - POPUPDATAT ppd; + POPUPDATAW ppd; //hContact = A_VALID_HANDLE_YOU_GOT_FROM_SOMEWHERE; //hIcon = A_VALID_HANDLE_YOU_GOT_SOMEWHERE; //char * lpzContactName = (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)lhContact,0); @@ -460,8 +460,8 @@ void showMsg(wchar_t* sender,wchar_t* text, DWORD id, char *strUID) memset(&ppd, 0, sizeof(ppd)); //This is always a good thing to do. ppd.lchContact = NULL; //(HANDLE)hContact; //Be sure to use a GOOD handle, since this will not be checked. ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_ICON1)); - wcscpy_s(ppd.lptzContactName, _countof(ppd.lptzContactName), sender); - wcscpy_s(ppd.lptzText, _countof(ppd.lptzText), text); + wcscpy_s(ppd.lpwzContactName, _countof(ppd.lpwzContactName), sender); + wcscpy_s(ppd.lpwzText, _countof(ppd.lpwzText), text); if(settingSetColours) { ppd.colorBack = settingBgColor; @@ -479,7 +479,7 @@ void showMsg(wchar_t* sender,wchar_t* text, DWORD id, char *strUID) ppd.PluginData = mpd; //Now that every field has been filled, we want to see the popup. - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } @@ -499,7 +499,7 @@ void ErMsgT(wchar_t* msg) wcsncpy_s(buffer, L"LotusNotify: ", _TRUNCATE); wcscat_s(buffer, msg); isPopupWaiting = TRUE; - PUShowMessageT(buffer, SM_WARNING); + PUShowMessageW(buffer, SM_WARNING); isPopupWaiting = FALSE; } } diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 49db1367f3..cf5031a18c 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -199,13 +199,13 @@ static void ShowPopup(const wchar_t *pwszText, MCONTACT hContact) { if (!pwszText) return; - POPUPDATAT ppd = {}; + POPUPDATAW ppd = {}; ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); ppd.lchContact = hContact; - wcsncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME - 1); - wcsncpy(ppd.lptzText, pwszText, MAX_SECONDLINE - 1); + wcsncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME - 1); + wcsncpy(ppd.lpwzText, pwszText, MAX_SECONDLINE - 1); ppd.iSeconds = -1; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } BOOL DirectoryExists(MCONTACT hContact) @@ -897,7 +897,7 @@ static int ContactWindowOpen(WPARAM, LPARAM lParam) static int ModuleLoad(WPARAM, LPARAM) { - bPopupService = ServiceExists(MS_POPUP_ADDPOPUPT); + bPopupService = ServiceExists(MS_POPUP_ADDPOPUPW); return 0; } diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index e786c2fb00..5f829db480 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -207,9 +207,9 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ mir_snwprintf(buffer, 1024, TranslateT("Message sent")); if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) - ShowClassPopupT("MirFox_Notify", L"MirFox", buffer); + ShowClassPopupW("MirFox_Notify", L"MirFox", buffer); else - PUShowMessageT(buffer, SM_NOTIFY); + PUShowMessageW(buffer, SM_NOTIFY); delete[] buffer; } @@ -249,9 +249,9 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ } if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - ShowClassPopupT("MirFox_Error", TranslateT("MirFox error"), buffer); + ShowClassPopupW("MirFox_Error", TranslateT("MirFox error"), buffer); } else { - PUShowMessageT(buffer, SM_WARNING); + PUShowMessageW(buffer, SM_WARNING); } //if MFENUM_SMM_SEND_AND_SHOW_MW, even if error sending message - notify hook to open window @@ -396,9 +396,9 @@ void MirandaUtils::setStatusOnAccount(ActionThreadArgStruct* args) } if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - ShowClassPopupT("MirFox_Notify", L"MirFox", buffer); + ShowClassPopupW("MirFox_Notify", L"MirFox", buffer); } else { - PUShowMessageT(buffer, SM_NOTIFY); + PUShowMessageW(buffer, SM_NOTIFY); } } else { if (tszAccountName != nullptr){ @@ -410,9 +410,9 @@ void MirandaUtils::setStatusOnAccount(ActionThreadArgStruct* args) } if(ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - ShowClassPopupT("MirFox_Error", TranslateT("MirFox error"), buffer); + ShowClassPopupW("MirFox_Error", TranslateT("MirFox error"), buffer); } else { - PUShowMessageT(buffer, SM_WARNING); + PUShowMessageW(buffer, SM_WARNING); } } delete[] buffer; diff --git a/plugins/MirLua/Modules/m_popup/src/main.cpp b/plugins/MirLua/Modules/m_popup/src/main.cpp index 35f2b9bb28..da9c9afdff 100644 --- a/plugins/MirLua/Modules/m_popup/src/main.cpp +++ b/plugins/MirLua/Modules/m_popup/src/main.cpp @@ -1,15 +1,15 @@ #include "stdafx.h" -static POPUPDATAT* MakePopupData(lua_State *L) +static POPUPDATAW* MakePopupData(lua_State *L) { - POPUPDATAT *ppd = (POPUPDATAT*)mir_calloc(sizeof(POPUPDATAT)); + POPUPDATAW *ppd = (POPUPDATAW*)mir_calloc(sizeof(POPUPDATAW)); lua_getfield(L, -1, "ContactName"); - mir_wstrcpy(ppd->lptzContactName, ptrW(mir_utf8decodeW(lua_tostring(L, -1)))); + mir_wstrcpy(ppd->lpwzContactName, ptrW(mir_utf8decodeW(lua_tostring(L, -1)))); lua_pop(L, 1); lua_getfield(L, -1, "Text"); - mir_wstrcpy(ppd->lptzText, ptrW(mir_utf8decodeW(luaL_checkstring(L, -1)))); + mir_wstrcpy(ppd->lpwzText, ptrW(mir_utf8decodeW(luaL_checkstring(L, -1)))); lua_pop(L, 1); lua_getfield(L, -1, "hContact"); @@ -39,9 +39,9 @@ static int lua_AddPopup(lua_State *L) return 1; } - mir_ptr ppd(MakePopupData(L)); + mir_ptr ppd(MakePopupData(L)); - INT_PTR res = ::CallService(MS_POPUP_ADDPOPUPT, (WPARAM)ppd, 0); + INT_PTR res = ::CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppd, 0); lua_pushinteger(L, res); return 1; @@ -64,7 +64,7 @@ static POPUPDATA2* MakePopupData2(lua_State *L) lua_pop(L, 1); lua_getfield(L, -1, "Text"); - ppd->lptzText = mir_utf8decodeW(luaL_checkstring(L, -1)); + ppd->lpwzText = mir_utf8decodeW(luaL_checkstring(L, -1)); lua_pop(L, 1); lua_getfield(L, -1, "hContact"); @@ -108,7 +108,7 @@ static int lua_AddPopup2(lua_State *L) lua_pushinteger(L, res); mir_free(ppd->lptzTitle); - mir_free(ppd->lptzText); + mir_free(ppd->lpwzText); return 1; } diff --git a/plugins/MirLua/src/utils.cpp b/plugins/MirLua/src/utils.cpp index 1292a25f50..e36458a64d 100644 --- a/plugins/MirLua/src/utils.cpp +++ b/plugins/MirLua/src/utils.cpp @@ -21,7 +21,7 @@ void ShowNotification(const char *caption, const char *message, int flags, MCONT if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { POPUPDATA ppd = { 0 }; ppd.lchContact = hContact; diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index f71d65e2f0..ab0e698f32 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -87,7 +87,7 @@ void LoadOptions() options.end_offline = (g_plugin.getByte("EndOffline", 1) == 1); options.end_window_close = (g_plugin.getByte("EndWindowClose", 0) == 1); - options.bHavePopups = 0 != ServiceExists(MS_POPUP_ADDPOPUPT) && ServiceExists(MS_POPUP_SHOWMESSAGE); + options.bHavePopups = 0 != ServiceExists(MS_POPUP_ADDPOPUPW) && ServiceExists(MS_POPUP_SHOWMESSAGE); options.bHaveSecureIM = 0 != ServiceExists("SecureIM/IsContactSecured"); LoadFilenames(); diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 0dcd1e1cfe..e3dbd2164b 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -130,26 +130,26 @@ void ShowPopup(const wchar_t* line1, const wchar_t* line2, int timeout, const MC return; } - POPUPDATAT ppd = {0}; - //memset((void *)&ppd, 0, sizeof(POPUPDATAT)); + POPUPDATAW ppd = {0}; + //memset((void *)&ppd, 0, sizeof(POPUPDATAW)); ppd.lchContact = hContact; ppd.lchIcon = nullptr; if(line1 && line2) { - wcsncpy( ppd.lptzContactName, line1, MAX_CONTACTNAME-1 ); - wcsncpy( ppd.lptzText, line2, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzContactName, line1, MAX_CONTACTNAME-1 ); + wcsncpy( ppd.lpwzText, line2, MAX_SECONDLINE-1 ); } else if(line1) - wcsncpy( ppd.lptzText, line1, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzText, line1, MAX_SECONDLINE-1 ); else if(line2) - wcsncpy( ppd.lptzText, line2, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzText, line2, MAX_SECONDLINE-1 ); ppd.iSeconds = timeout; ppd.PluginWindowProc = nullptr; ppd.PluginData = nullptr; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } @@ -169,7 +169,7 @@ void ShowWarning(wchar_t *msg) { int size = int(mir_wstrlen(msg) + 515); wchar_t *message = new wchar_t[size]; // newline and null terminator mir_snwprintf(message, size, L"%s\r\n%s", buffer, msg); - PUShowMessageT(message, SM_WARNING); + PUShowMessageW(message, SM_WARNING); delete[] message; } break; @@ -199,7 +199,7 @@ void ShowError(wchar_t *msg) { int size = int(mir_wstrlen(msg) + 515); message = new wchar_t[size]; // newline and null terminator mir_snwprintf(message, size, L"%s\r\n%s", buffer, msg); - PUShowMessageT(message, SM_WARNING); + PUShowMessageW(message, SM_WARNING); delete[] message; } break; diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 1db3743488..e7f7dcdbc9 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -66,7 +66,7 @@ MSGBOXPROC prevMessageBox; void popupMessage(LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; int iIcon; int indx; @@ -94,9 +94,9 @@ void popupMessage(LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) ppd.iSeconds = options.Timeout[indx]; ppd.lchIcon = (HICON)LoadImage(nullptr, MAKEINTRESOURCE(iIcon), IMAGE_ICON, SM_CXSMICON, SM_CYSMICON, LR_SHARED); - mir_wstrcpy(ppd.lptzContactName, lpCaption); - mir_wstrcpy(ppd.lptzText, lpText); - PUAddPopupT(&ppd); + mir_wstrcpy(ppd.lpwzContactName, lpCaption); + mir_wstrcpy(ppd.lpwzText, lpText); + PUAddPopupW(&ppd); if (options.Sound) MessageBeep(uType); } @@ -189,7 +189,7 @@ int HookedInit(WPARAM, LPARAM) int HookedOptions(WPARAM wParam, LPARAM) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { OPTIONSDIALOGPAGE odp = {}; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); odp.szTitle.w = LPGENW("MessagePopup"); diff --git a/plugins/NewAwaySysMod/src/Notification.cpp b/plugins/NewAwaySysMod/src/Notification.cpp index 58b4eaf8dd..3a55cc7798 100644 --- a/plugins/NewAwaySysMod/src/Notification.cpp +++ b/plugins/NewAwaySysMod/src/Notification.cpp @@ -23,15 +23,15 @@ void ShowMsg(wchar_t *FirstLine, wchar_t *SecondLine, bool IsErrorMsg, int Timeout) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { - POPUPDATAT ppd = { 0 }; + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { + POPUPDATAW ppd = { 0 }; ppd.lchIcon = LoadIcon(nullptr, IsErrorMsg ? IDI_EXCLAMATION : IDI_INFORMATION); - mir_wstrncpy(ppd.lptzContactName, FirstLine, MAX_CONTACTNAME); - mir_wstrncpy(ppd.lptzText, SecondLine, MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzContactName, FirstLine, MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, SecondLine, MAX_SECONDLINE); ppd.colorBack = IsErrorMsg ? 0x0202E3 : 0xE8F1FD; ppd.colorText = IsErrorMsg ? 0xE8F1FD : 0x000000; ppd.iSeconds = Timeout; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } else MessageBox(nullptr, SecondLine, FirstLine, MB_OK | (IsErrorMsg ? MB_ICONEXCLAMATION : MB_ICONINFORMATION)); } diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index 6ee731879b..a3c3a39373 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -263,7 +263,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, L int OptionsAdd(WPARAM addInfo, LPARAM) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { OPTIONSDIALOGPAGE odp = {}; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT); odp.szTitle.a = LPGEN("Event Notify"); diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 24c697f4c3..92540ab0b0 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -393,12 +393,12 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) // if hContact is NULL, && hEvent is NULL then popup is only Test if ((hContact == NULL) && (hEvent == NULL)) { - wcsncpy(pudw.lptzContactName, TranslateT("Plugin Test"), MAX_CONTACTNAME); - wcsncpy(pudw.lptzText, TranslateW(sampleEvent), MAX_SECONDLINE); + wcsncpy(pudw.lpwzContactName, TranslateT("Plugin Test"), MAX_CONTACTNAME); + wcsncpy(pudw.lpwzText, TranslateW(sampleEvent), MAX_SECONDLINE); } else { // get the needed event data - wcsncpy(pudw.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); - wcsncpy(pudw.lptzText, ptrW(GetEventPreview(&dbe)), MAX_SECONDLINE); + wcsncpy(pudw.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); + wcsncpy(pudw.lpwzText, ptrW(GetEventPreview(&dbe)), MAX_SECONDLINE); } PopupCount++; @@ -406,7 +406,7 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) PopupList[NumberPopupData(NULL, -1)] = pdata; // send data to popup plugin - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { // popup creation failed, release popupdata if (PUAddPopupW(&pudw) < 0) { FreePopupEventData(pdata); @@ -503,7 +503,7 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) if ((doReverse && eventData->next) || (!doReverse && eventData->prev)) mir_snwprintf(lpzText, L"%s\n...", lpzText); - PUChangeTextT(pdata->hWnd, lpzText); + PUChangeTextW(pdata->hWnd, lpzText); return 0; } diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index b63428ef8a..c173aa2f79 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1084,7 +1084,7 @@ void InitMainMenuItem() CMenuItem mi(&g_plugin); SET_UID(mi, 0x22b7b4db, 0xa9a1, 0x4d43, 0x88, 0x80, 0x4c, 0x23, 0x20, 0x31, 0xc6, 0xa0); mi.flags = CMIF_UNICODE; - if (ServiceExists(MS_POPUP_ADDPOPUPT)) + if (ServiceExists(MS_POPUP_ADDPOPUPW)) mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0); mi.pszService = MS_STATUSCHANGE_MENUCOMMAND; hEnableDisableMenu = Menu_AddMainMenuItem(&mi); diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 6f59c4fd28..178b1b9301 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -1197,7 +1197,7 @@ int OptionsInitialize(WPARAM wParam, LPARAM) odp.pfnDlgProc = DlgProcFiltering; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szTitle.a = LPGEN("Status Notify"); odp.szGroup.a = LPGEN("Popups"); odp.szTab.a = LPGEN("General"); diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index 564183a572..32c9758b01 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -23,7 +23,7 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.lchIcon = hIcon; CMStringW buf(Clist_GetContactDisplayName(hContact)); @@ -34,8 +34,8 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar if (tszGroup) buf.AppendFormat(L" (%s)", tszGroup); } - wcsncpy_s(ppd.lptzContactName, buf, _TRUNCATE); - wcsncpy_s(ppd.lptzText, stzText, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, buf, _TRUNCATE); + wcsncpy_s(ppd.lpwzText, stzText, _TRUNCATE); switch (opt.Colors) { case POPUP_COLOR_OWN: @@ -55,7 +55,7 @@ void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar ppd.PluginData = pdp; ppd.iSeconds = opt.PopupTimeout; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } static int AwayMsgHook(WPARAM, LPARAM lParam, LPARAM pObj) @@ -88,7 +88,7 @@ static int AwayMsgHook(WPARAM, LPARAM lParam, LPARAM pObj) else wcsncpy(stzText, tszStatus, _countof(stzText)); SendMessage(pdp->hWnd, WM_SETREDRAW, FALSE, 0); - PUChangeTextT(pdp->hWnd, stzText); + PUChangeTextW(pdp->hWnd, stzText); SendMessage(pdp->hWnd, WM_SETREDRAW, TRUE, 0); return 0; } diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 3299040a02..19b433b087 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -480,9 +480,9 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA int showMessage(const popup_t &msg) { - POPUPDATAT ppd = { 0 }; - wcsncpy(ppd.lptzText, strip(msg.message).c_str(), MAX_SECONDLINE); - wcsncpy(ppd.lptzContactName, msg.contact.c_str(), MAX_CONTACTNAME); + POPUPDATAW ppd = { 0 }; + wcsncpy(ppd.lpwzText, strip(msg.message).c_str(), MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, msg.contact.c_str(), MAX_CONTACTNAME); ppd.colorBack = msg.background; ppd.colorText = msg.foreground; ppd.lchIcon = getIcon(msg.icon); @@ -498,7 +498,7 @@ int showMessage(const popup_t &msg) g_anon_popups.insert(msgp); ppd.PluginData = msgp; - return PUAddPopupT(&ppd); + return PUAddPopupW(&ppd); } void replaceMessage(const popup_t &msg) @@ -531,7 +531,7 @@ void replaceMessage(const popup_t &msg) if (!msg.closed.empty()) nmsg.closed = msg.closed; - PUChangeTextT(i->second->hwnd, strip(i->second->message).c_str()); + PUChangeTextW(i->second->hwnd, strip(i->second->message).c_str()); return; } } diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 48b387bfca..20dcad8548 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -285,8 +285,8 @@ void Nudge_ShowPopup(CNudgeElement*, MCONTACT hContact, wchar_t * Message) NudgePopup.pszClassName = "nudge"; CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&NudgePopup); } - else if (ServiceExists(MS_POPUP_ADDPOPUPT)) { - POPUPDATAT NudgePopup = { 0 }; + else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { + POPUPDATAW NudgePopup = { 0 }; NudgePopup.lchContact = hContact; NudgePopup.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib); NudgePopup.colorBack = 0; @@ -295,10 +295,10 @@ void Nudge_ShowPopup(CNudgeElement*, MCONTACT hContact, wchar_t * Message) NudgePopup.PluginWindowProc = NudgePopupProc; NudgePopup.PluginData = (void *)1; - wcscpy_s(NudgePopup.lptzText, Message); - wcscpy_s(NudgePopup.lptzContactName, lpzContactName); + wcscpy_s(NudgePopup.lpwzText, Message); + wcscpy_s(NudgePopup.lpwzContactName, lpzContactName); - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&NudgePopup, 0); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&NudgePopup, 0); } else MessageBox(nullptr, Message, lpzContactName, 0); } diff --git a/plugins/OpenSSL/src/ssl_openssl.cpp b/plugins/OpenSSL/src/ssl_openssl.cpp index 73a5936746..95a860318e 100644 --- a/plugins/OpenSSL/src/ssl_openssl.cpp +++ b/plugins/OpenSSL/src/ssl_openssl.cpp @@ -118,7 +118,7 @@ static void ReportSslError(SECURITY_STATUS scRet, int line, bool = false) Netlib_LogfW(nullptr, tszMsg); SetLastError(scRet); - PUShowMessageT(tszMsg.GetBuffer(), SM_WARNING); + PUShowMessageW(tszMsg.GetBuffer(), SM_WARNING); } void NetlibSslFree(SslHandle *ssl) diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index 1ad3c1cbe2..9512a700c7 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -111,12 +111,12 @@ void show_popup(HWND hDlg, LPCTSTR pszTitle, LPCTSTR pszText, int iNumber, int A if (!pmpd) return; - POPUPDATAT_V2 pd = { 0 }; + POPUPDATAW_V2 pd = { 0 }; pd.cbSize = sizeof(pd); pd.lchContact = NULL; //(HANDLE)wParam; pd.lchIcon = Skin_LoadIcon(PopupsList[iNumber].Icon); - mir_wstrncpy(pd.lptzText, pszText, _countof(pd.lptzText)); - mir_wstrncpy(pd.lptzContactName, pszTitle, _countof(pd.lptzContactName)); + mir_wstrncpy(pd.lpwzText, pszText, _countof(pd.lpwzText)); + mir_wstrncpy(pd.lpwzContactName, pszTitle, _countof(pd.lpwzContactName)); switch (MyOptions.DefColors) { case byCOLOR_WINDOWS: pd.colorBack = GetSysColor(COLOR_BTNFACE); @@ -148,7 +148,7 @@ void show_popup(HWND hDlg, LPCTSTR pszTitle, LPCTSTR pszText, int iNumber, int A MakePopupAction(pmpd->pa[pd.actionCount++], IDNO); } - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, APF_NEWDATA); } INT_PTR CALLBACK DlgDownload(HWND hDlg, UINT message, WPARAM, LPARAM) @@ -176,7 +176,7 @@ INT_PTR CALLBACK DlgDownloadPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM) static void __stdcall CreateDownloadDialog(void*) { - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups3", DEFAULT_POPUP_ENABLED)) + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups3", DEFAULT_POPUP_ENABLED)) hDlgDld = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_POPUPDUMMI), nullptr, DlgDownloadPop); else if (g_plugin.getByte("Popups3M", DEFAULT_MESSAGE_ENABLED)) { mir_wstrncpy(tszDialogMsg, Text, _countof(tszDialogMsg)); @@ -195,7 +195,7 @@ void DlgDownloadProc() if (!DownloadFile(pFileUrl->tszDownloadURL, pFileUrl->tszDiskPath)) { Title = TranslateT("Pack Updater"); Text = TranslateT("An error occurred while downloading the update."); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { Number = 1; show_popup(nullptr, Title, Text, Number, 0); } @@ -420,7 +420,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam INT rc = -1; Title = TranslateT("Pack Updater"); Text = tszBuff; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && ServiceExists(MS_POPUP_REGISTERACTIONS) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups0", DEFAULT_POPUP_ENABLED) && (db_get_dw(0, "Popup", "Actions", 0) & 1)) + if (ServiceExists(MS_POPUP_ADDPOPUPW) && ServiceExists(MS_POPUP_REGISTERACTIONS) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups0", DEFAULT_POPUP_ENABLED) && (db_get_dw(0, "Popup", "Actions", 0) & 1)) rc = DialogBox(g_plugin.getInst(), MAKEINTRESOURCE(IDD_POPUPDUMMI), nullptr, DlgMsgPop); else rc = MessageBox(nullptr, tszBuff, Title, MB_YESNO | MB_ICONQUESTION); @@ -508,7 +508,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam mir_snwprintf(tszBuff, TranslateT("You have chosen not to install the pack update immediately.\nYou can install it manually from this location:\n\n%s"), arFilePath[0].c_str()); Title = TranslateT("Pack Updater"); Text = tszBuff; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { Number = 2; show_popup(nullptr, Title, Text, Number, 0); } diff --git a/plugins/PackUpdater/Src/Options.cpp b/plugins/PackUpdater/Src/Options.cpp index e1768b9426..b662b16a54 100644 --- a/plugins/PackUpdater/Src/Options.cpp +++ b/plugins/PackUpdater/Src/Options.cpp @@ -55,7 +55,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ComboBox_SetCurSel(GetDlgItem(hwndDlg, IDC_PERIODMEASURE), PeriodMeasure); CheckDlgButton(hwndDlg, IDC_REMINDER, Reminder ? BST_CHECKED : BST_UNCHECKED); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { ShowWindow(GetDlgItem(hwndDlg, IDC_NOTIFY2), SW_HIDE); ShowWindow(GetDlgItem(hwndDlg, IDC_MSG_BOXES2), SW_HIDE); ShowWindow(GetDlgItem(hwndDlg, IDC_ERRORS2), SW_HIDE); @@ -141,7 +141,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA g_plugin.setByte("PeriodMeasure", PeriodMeasure); Reminder = IsDlgButtonChecked(hwndDlg, IDC_REMINDER); g_plugin.setByte("Reminder", Reminder); - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) { for (int i = 1; i < POPUPS; i++) { mir_snprintf(str, "Popups%dM", i); g_plugin.setByte(str, (BYTE)(IsDlgButtonChecked(hwndDlg, (i + 1029)))); @@ -389,7 +389,7 @@ int OptInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = UpdateNotifyOptsProc; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); odp.szGroup.w = LPGENW("Popups"); odp.szTitle.w = LPGENW("Pack Updater"); diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index 0502640ba3..2ff8415ef9 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -193,7 +193,7 @@ static void CheckUpdates(void *) if (!tszDownloadURL) { // URL is not set Title = TranslateT("Pack Updater"); Text = TranslateT("URL for checking updates not found."); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { Number = 1; show_popup(nullptr, Title, Text, Number, 0); } @@ -248,7 +248,7 @@ static void CheckUpdates(void *) if (wcsstr(tszBuff, L"\\")) { //check update name Title = TranslateT("Pack Updater"); Text = TranslateT("Name of Update's file is not supported."); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups1", DEFAULT_POPUP_ENABLED)) { Number = 1; show_popup(nullptr, Title, Text, Number, 0); } @@ -339,7 +339,7 @@ static void CheckUpdates(void *) if (!UpdatesCount && !Silent) { Title = TranslateT("Pack Updater"); Text = TranslateT("No updates found."); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { Number = 2; show_popup(nullptr, Title, Text, Number, 0); } @@ -350,7 +350,7 @@ static void CheckUpdates(void *) if (!FileCount) { Title = TranslateT("Pack Updater"); Text = TranslateT("No files for update."); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { Number = 2; show_popup(nullptr, Title, Text, Number, 0); } @@ -365,7 +365,7 @@ void DoCheck(int iFlag) if (hCheckThread != nullptr) { Title = TranslateT("Pack Updater"); Text = TranslateT("Update checking already started!"); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1) && g_plugin.getByte("Popups2", DEFAULT_POPUP_ENABLED)) { Number = 2; show_popup(nullptr, Title, Text, Number, 0); } diff --git a/plugins/Ping/src/options.cpp b/plugins/Ping/src/options.cpp index 71e62e2a9b..281d9b1456 100644 --- a/plugins/Ping/src/options.cpp +++ b/plugins/Ping/src/options.cpp @@ -37,7 +37,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_LOGCSV), FALSE); } - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) { EnableWindow(GetDlgItem(hwndDlg, IDC_CHECKPOPUP), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_CHECKPOPUP2), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_BLOCK), FALSE); diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index b94fe07bce..98a3db9024 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -18,10 +18,10 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l static INT_PTR CALLBACK sttMainThreadCallback(void *dwParam) { - POPUPDATAT* ppd = (POPUPDATAT*)dwParam; + POPUPDATAW* ppd = (POPUPDATAW*)dwParam; - if (ServiceExists(MS_POPUP_ADDPOPUPT)) - PUAddPopupT(ppd); + if (ServiceExists(MS_POPUP_ADDPOPUPW)) + PUAddPopupW(ppd); free(ppd); return 0; @@ -32,15 +32,15 @@ void __stdcall ShowPopup(wchar_t *line1, wchar_t *line2, int flags) if (Miranda_IsTerminated()) return; if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { - ShowClassPopupT("pingpopups", line1, line2); + ShowClassPopupW("pingpopups", line1, line2); } - else if (ServiceExists(MS_POPUP_ADDPOPUPT)) { - POPUPDATAT *ppd = (POPUPDATAT*)calloc(sizeof(POPUPDATAT), 1); + else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { + POPUPDATAW *ppd = (POPUPDATAW*)calloc(sizeof(POPUPDATAW), 1); ppd->lchContact = NULL; ppd->lchIcon = (flags ? hIconResponding : hIconNotResponding); - mir_wstrncpy(ppd->lptzContactName, line1, _countof(ppd->lptzContactName)); - mir_wstrncpy(ppd->lptzText, line2, _countof(ppd->lptzText)); + mir_wstrncpy(ppd->lpwzContactName, line1, _countof(ppd->lpwzContactName)); + mir_wstrncpy(ppd->lpwzText, line2, _countof(ppd->lpwzText)); ppd->colorBack = GetSysColor(COLOR_BTNFACE); ppd->colorText = GetSysColor(COLOR_WINDOWTEXT); diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 4698402af9..b8b9737b10 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -469,7 +469,7 @@ static void DlgUpdateSilent(void *param) wchar_t tszTitle[100]; mir_snwprintf(tszTitle, TranslateT("%d component(s) was updated"), count); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) ShowPopup(tszTitle,TranslateT("You need to restart your Miranda to apply installed updates."),POPUP_TYPE_MSG); else { if (Clist_TrayNotifyW(MODULEA, tszTitle, TranslateT("You need to restart your Miranda to apply installed updates."), NIIF_INFO, 30000)) { diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp index a7dec5cc32..2306462636 100644 --- a/plugins/PluginUpdater/src/Notifications.cpp +++ b/plugins/PluginUpdater/src/Notifications.cpp @@ -95,12 +95,12 @@ static LRESULT CALLBACK PopupDlgProcRestart(HWND hPopup, UINT uMsg, WPARAM wPara void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number) { - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { char setting[100]; mir_snprintf(setting, "Popups%d", Number); if (g_plugin.getByte(setting, DEFAULT_POPUP_ENABLED)) { - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; pd.lchContact = NULL; pd.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib); @@ -113,8 +113,8 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number) pd.iSeconds = PopupOptions.Timeout; } - lstrcpyn(pd.lptzText, ptszText, MAX_SECONDLINE); - lstrcpyn(pd.lptzContactName, ptszTitle, MAX_CONTACTNAME); + lstrcpyn(pd.lpwzText, ptszText, MAX_SECONDLINE); + lstrcpyn(pd.lpwzContactName, ptszTitle, MAX_CONTACTNAME); switch (PopupOptions.DefColors) { case byCOLOR_WINDOWS: @@ -129,7 +129,7 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number) pd.colorBack = pd.colorText = 0; break; } - PUAddPopupT(&pd); + PUAddPopupW(&pd); return; } } diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp index 092c096073..4e83dc07cd 100644 --- a/plugins/PluginUpdater/src/Options.cpp +++ b/plugins/PluginUpdater/src/Options.cpp @@ -565,7 +565,7 @@ int OptInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = UpdateNotifyOptsProc; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); odp.szGroup.w = LPGENW("Popups"); odp.szTitle.w = LPGENW("Plugin Updater"); diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index 5a023520ab..ecc5a02e78 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -78,7 +78,7 @@ void PopupPreview() ppd.flags = PU2_UNICODE; ppd.lptzTitle = lptzTitle1Eng; - ppd.lptzText = lptzText1Eng; + ppd.lpwzText = lptzText1Eng; ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause @@ -87,20 +87,20 @@ void PopupPreview() ppd.cbSize = sizeof(ppd); ppd.flags = PU2_UNICODE; ppd.lptzTitle = lptzTitle2; - ppd.lptzText = lptzText2; + ppd.lpwzText = lptzText2; ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); ppd.hbmAvatar = hbmNoAvatar; CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageT(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY | 0x80000000); + PUShowMessageW(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY | 0x80000000); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageT(TranslateT("This is a warning message"), (DWORD)SM_WARNING | 0x80000000); + PUShowMessageW(TranslateT("This is a warning message"), (DWORD)SM_WARNING | 0x80000000); if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause - PUShowMessageT(TranslateT("This is an error message"), (DWORD)SM_ERROR | 0x80000000); + PUShowMessageW(TranslateT("This is an error message"), (DWORD)SM_ERROR | 0x80000000); } ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index deed963c17..d0e745da64 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -75,7 +75,7 @@ void PopupHistoryAdd(POPUPDATA2 *ppdNew) *ppd = *ppdNew; if (ppd->flags & PU2_UNICODE) { ppd->lptzTitle = mir_wstrdup(ppd->lpwzTitle); - ppd->lptzText = mir_wstrdup(ppd->lptzText); + ppd->lpwzText = mir_wstrdup(ppd->lpwzText); } else { ppd->lpzTitle = mir_strdup(ppd->lpzTitle); @@ -188,7 +188,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara if (ppd->flags & PU2_UNICODE) { ieData.dwFlags |= IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK; ieData.pszNickW = ppd->lptzTitle; - ieData.pszTextW = ppd->lptzText; + ieData.pszTextW = ppd->lpwzText; ieData.pszText2W = nullptr; } else { @@ -372,7 +372,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara if (ppd->flags & PU2_UNICODE) { ieData.dwFlags |= IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK; ieData.pszNickW = ppd->lptzTitle; - ieData.pszTextW = ppd->lptzText; + ieData.pszTextW = ppd->lpwzText; ieData.pszText2W = nullptr; } else { diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 0d9bd89dec..b3fbfe469a 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ppd.cbSize = sizeof(ppd); ppd.flags = PU2_UNICODE; ppd.lptzTitle = ptd->pszDescription; - ppd.lptzText = TranslateT("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!"); + ppd.lpwzText = TranslateT("Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!"); ppd.iSeconds = ptd->timeoutValue; ppd.colorBack = ptd->colorBack; ppd.colorText = ptd->colorText; diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index ba678c497e..7dc2ac93f7 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -77,7 +77,7 @@ static void updatePreviewImage(HWND hwndBox) ppd.flags = PU2_UNICODE; ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE); ppd.lptzTitle = TranslateT("Skin preview"); - ppd.lptzText = TranslateT("Just take a look at this skin... ;)"); + ppd.lpwzText = TranslateT("Just take a look at this skin... ;)"); POPUPOPTIONS customOptions = PopupOptions; customOptions.DynamicResize = FALSE; diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 0f56959886..0b41e89e3c 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -688,8 +688,8 @@ void PopupWnd2::updateData(POPUPDATAW_V2 *ppd) if (m_textType == TT_NONE) m_textType = TT_UNICODE; - replaceStrW(m_lptzTitle, ppd->lptzContactName); - replaceStrW(m_lptzText, ppd->lptzText); + replaceStrW(m_lptzTitle, ppd->lpwzContactName); + replaceStrW(m_lptzText, ppd->lpwzText); setIcon(ppd->lchIcon); m_hNotification = ppd->hNotification; @@ -718,7 +718,7 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd) if (m_textType == TT_NONE) m_textType = TT_UNICODE; replaceStrW(m_lptzTitle, ppd->lptzTitle); - replaceStrW(m_lptzText, ppd->lptzText); + replaceStrW(m_lptzText, ppd->lpwzText); } else { replaceStrW(m_lptzTitle, nullptr); @@ -991,7 +991,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case UM_POPUPMODIFYACTIONICON: { - LPPOPUPACTIONID actionId = (LPPOPUPACTIONID)wParam; + POPUPACTIONID *actionId = (POPUPACTIONID*)wParam; for (int i = 0; i < m_actionCount; ++i) if ((m_actions[i].actionA.wParam == actionId->wParam) && (m_actions[i].actionA.lParam == actionId->lParam)) { diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index 058b565150..d14f0aa622 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -237,7 +237,7 @@ INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) POPUPDATA2 ppd2 = { 0 }; ppd2.cbSize = sizeof(ppd2); ppd2.flags = PU2_UNICODE; - ppd2.lptzText = (wchar_t*)wParam; + ppd2.lpwzText = (wchar_t*)wParam; switch (lParam & 0x7fffffff) { case SM_ERROR: ppd2.lchIcon = LoadIconEx(IDI_MB_STOP, 0); @@ -459,7 +459,7 @@ INT_PTR Popup_CreateClassPopup(WPARAM wParam, LPARAM lParam) if (pc->flags & PCF_UNICODE) { ppd2.flags = PU2_UNICODE; ppd2.lptzTitle = (wchar_t*)pdc->pwszTitle; - ppd2.lptzText = (wchar_t*)pdc->pwszText; + ppd2.lpwzText = (wchar_t*)pdc->pwszText; } else { ppd2.flags = PU2_ANSI; diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index e5142a38ed..88080137e9 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -550,7 +550,7 @@ int RegisterToolbarIcons(WPARAM, LPARAM) static int ModuleLoad(WPARAM, LPARAM) { g_dat.smileyAddInstalled = ServiceExists(MS_SMILEYADD_SHOWSELECTION) && ServiceExists(MS_SMILEYADD_REPLACESMILEYS); - g_dat.popupInstalled = ServiceExists(MS_POPUP_ADDPOPUPT); + g_dat.popupInstalled = ServiceExists(MS_POPUP_ADDPOPUPW); g_dat.ieviewInstalled = ServiceExists(MS_IEVIEW_WINDOW); return 0; } diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 297f5eb04e..5133342c1f 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -52,7 +52,7 @@ static HGENMENU MyAddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, L static int onModuleLoad(WPARAM, LPARAM) { - bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPT); + bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPW); return 0; } 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) diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 7dfac5cc4e..9e9237a3f5 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -227,7 +227,7 @@ CMPlugin::CMPlugin() : int hook_ModulesLoaded(WPARAM, LPARAM) { - g_myGlobals.PopupExist = ServiceExists(MS_POPUP_ADDPOPUPT); + g_myGlobals.PopupExist = ServiceExists(MS_POPUP_ADDPOPUPW); g_myGlobals.PopupActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS); g_myGlobals.PluginHTTPExist = ServiceExists(MS_HTTP_ACCEPT_CONNECTIONS); g_myGlobals.PluginFTPExist = ServiceExists(MS_FTPFILE_UPLOAD); diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index 394009353e..028ebd61e8 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -499,13 +499,13 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam) MoveWindow(hDlg, -10, -10, 0, 0, FALSE); LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA)); if (pmpd) { - POPUPDATAT_V2 pd = { 0 }; + POPUPDATAW_V2 pd = { 0 }; pd.cbSize = sizeof(pd); pd.lchContact = NULL; // (HANDLE)wParam; // icon pd.lchIcon = MsgLoadIcon(pMsgBox); - mir_wstrncpy(pd.lptzContactName, pMsgBox->ptszTitle, _countof(pd.lptzContactName)); - mir_wstrncpy(pd.lptzText, pMsgBox->ptszMsg, _countof(pd.lptzText)); + mir_wstrncpy(pd.lpwzContactName, pMsgBox->ptszTitle, _countof(pd.lpwzContactName)); + mir_wstrncpy(pd.lpwzText, pMsgBox->ptszMsg, _countof(pd.lpwzText)); // CALLBAC Proc pd.PluginWindowProc = PopupProc; @@ -576,7 +576,7 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam) } // create popup - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, APF_NEWDATA); if (MB_TYPE(pMsgBox->uType) == MB_OK) EndDialog(hDlg, IDOK); } @@ -652,7 +652,7 @@ INT_PTR MsgBoxService(WPARAM, LPARAM lParam) if (PtrIsValid(pMsgBox) && pMsgBox->cbSize == sizeof(MSGBOX)) { // Shall the MessageBox displayed as popup? if (!(pMsgBox->uType & (MB_INFOBAR | MB_NOPOPUP)) // message box can be a popup? - && ServiceExists(MS_POPUP_ADDPOPUPT) // popups exist? + && ServiceExists(MS_POPUP_ADDPOPUPW) // popups exist? && myGlobals.PopupActionsExist == 1 // popup support ext stuct? && (db_get_dw(0, "Popup", "Actions", 0) & 1) // popup++ actions on? && db_get_b(0, MODNAME, SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX)) // user likes popups? diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 06547da24a..84c6c01fae 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -197,10 +197,10 @@ void ReportError(const wchar_t *errmsg) { static const wchar_t title[] = L"Miranda SmileyAdd"; - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; mir_wstrcpy(pd.lpwzContactName, title); mir_wstrcpy(pd.lpwzText, errmsg); pd.iSeconds = -1; - if (PUAddPopupT(&pd) == CALLSERVICE_NOTFOUND) + if (PUAddPopupW(&pd) == CALLSERVICE_NOTFOUND) MessageBox(nullptr, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST); } diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 9d124fb5ce..144fd50b30 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -571,7 +571,7 @@ int OnOptInitialize(WPARAM wParam, LPARAM) odp.pfnDlgProc = DlgProcOptionsBayes; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_SPAMOTRON_POPUPS); odp.pfnDlgProc = DlgProcOptionsPopups; odp.szGroup.a = LPGEN("Popups"); diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index 19b17de683..dd53817a52 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -145,7 +145,7 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR int ShowPopupPreview(HWND optDlg, BYTE popupType, wchar_t *line1, wchar_t *line2) { - POPUPDATAT ppdp = {0}; + POPUPDATAW ppdp = {0}; switch (popupType) { case POPUP_DEFAULT: @@ -185,16 +185,16 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, wchar_t *line1, wchar_t *line2 ppdp.iSeconds = 0; ppdp.lchContact = NULL; - wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE); + wcsncpy_s(ppdp.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE); if (line2) - wcsncpy_s(ppdp.lptzText, line2, _TRUNCATE); - return PUAddPopupT(&ppdp); + wcsncpy_s(ppdp.lpwzText, line2, _TRUNCATE); + return PUAddPopupW(&ppdp); } int ShowPopup(MCONTACT hContact, BYTE popupType, wchar_t *line1, wchar_t *line2) { - POPUPDATAT ppdp = {0}; + POPUPDATAW ppdp = {0}; switch (popupType) { case POPUP_DEFAULT: @@ -234,8 +234,8 @@ int ShowPopup(MCONTACT hContact, BYTE popupType, wchar_t *line1, wchar_t *line2) ppdp.iSeconds = 0; ppdp.lchContact = hContact; - wcsncpy_s(ppdp.lptzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE); + wcsncpy_s(ppdp.lpwzContactName, (line1 ? line1 : _A2W(MODULENAME)), _TRUNCATE); if (line2) - wcsncpy_s(ppdp.lptzText, line2, _TRUNCATE); - return PUAddPopupT(&ppdp); + wcsncpy_s(ppdp.lpwzText, line2, _TRUNCATE); + return PUAddPopupW(&ppdp); } \ No newline at end of file diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 3e4117a119..95b23d3af7 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -20,17 +20,17 @@ int inline _DebugPopup(MCONTACT hContact, wchar_t *fmt, ...) mir_snwprintf(debug, fmt, va); if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); if(hContact != 0) - mir_wstrncpy(ppd.lptzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzContactName, Clist_GetContactDisplayName(hContact), MAX_CONTACTNAME); else - mir_wstrncpy(ppd.lptzContactName, _A2W(PlugName), MAX_CONTACTNAME); - mir_wstrncpy(ppd.lptzText, debug, MAX_SECONDLINE - 20); + mir_wstrncpy(ppd.lpwzContactName, _A2W(PlugName), MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, debug, MAX_SECONDLINE - 20); ppd.colorText = RGB(255,255,255); ppd.colorBack = RGB(255,0,0); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } return 0; } diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 56d4bd63d3..daac121659 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -87,20 +87,20 @@ static void __cdecl AdvSt(void*) Thread_SetName("StartupSilenc: AdvSt"); if ((Enabled == 1)) { - POPUPDATAT ppd = { 0 }; - wchar_t *lptzText = L""; + POPUPDATAW ppd = { 0 }; + wchar_t *lpwzText = L""; db_set_b(0, "Skin", "UseSound", 0); EnablePopupModule(); if (PopUp == 1) { - lptzText = NonStatusAllow == 1 ? ALL_DISABLED_FLT : ALL_DISABLED; + lpwzText = NonStatusAllow == 1 ? ALL_DISABLED_FLT : ALL_DISABLED; ppd.lchIcon = IcoLib_GetIconByHandle((NonStatusAllow == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME)); ppd.lchContact = NULL; ppd.iSeconds = PopUpTime; - wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); - lptzText = TranslateW(MENU_NAMEW); - wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE); - PUAddPopupT(&ppd); + wcsncpy_s(ppd.lpwzText, lpwzText, _TRUNCATE); + lpwzText = TranslateW(MENU_NAMEW); + wcsncpy_s(ppd.lpwzContactName, lpwzText, _TRUNCATE); + PUAddPopupW(&ppd); } timer = 2; @@ -108,10 +108,10 @@ static void __cdecl AdvSt(void*) timer = 0; if (PopUp == 1) { - lptzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED; + lpwzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED; ppd.lchIcon = IcoLib_GetIconByHandle((DefEnabled == 1 && DefPopup == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME)); - wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); - PUAddPopupT(&ppd); + wcsncpy_s(ppd.lpwzText, lpwzText, _TRUNCATE); + PUAddPopupW(&ppd); } if (DefEnabled == 1) { //predefined sound setting db_set_b(0, "Skin", "UseSound", DefSound); @@ -217,15 +217,15 @@ static INT_PTR StartupSilenceEnabled(WPARAM, LPARAM) if (MenuItem == 1) UpdateMenu(); if (PopUp == 1) { - wchar_t * lptzText = Enabled == 1 ? S_MODE_CHANGEDON : S_MODE_CHANGEDOFF; - POPUPDATAT ppd = { 0 }; + wchar_t * lpwzText = Enabled == 1 ? S_MODE_CHANGEDON : S_MODE_CHANGEDOFF; + POPUPDATAW ppd = { 0 }; ppd.lchIcon = IcoLib_GetIconByHandle((Enabled == 1) ? GetIconHandle(ENABLE_SILENCE) : GetIconHandle(DISABLE_SILENCE)); ppd.lchContact = NULL; ppd.iSeconds = PopUpTime; - wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE); - lptzText = TranslateW(MENU_NAMEW); - wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE); - PUAddPopupT(&ppd); + wcsncpy_s(ppd.lpwzText, lpwzText, _TRUNCATE); + lpwzText = TranslateW(MENU_NAMEW); + wcsncpy_s(ppd.lpwzContactName, lpwzText, _TRUNCATE); + PUAddPopupW(&ppd); } return 0; } diff --git a/plugins/StatusManager/src/keepstatus.cpp b/plugins/StatusManager/src/keepstatus.cpp index fde639d7e2..4d36e4e387 100644 --- a/plugins/StatusManager/src/keepstatus.cpp +++ b/plugins/StatusManager/src/keepstatus.cpp @@ -768,10 +768,10 @@ static VOID CALLBACK CheckContinueslyTimer(HWND, UINT, UINT_PTR, DWORD) static INT_PTR ShowPopup(const wchar_t *msg, HICON hIcon) { - POPUPDATAT ppd = {}; + POPUPDATAW ppd = {}; ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, msg, MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, msg, MAX_SECONDLINE); if (KSPlugin.getByte(SETTING_POPUP_USEWINCOLORS, 0)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); @@ -798,7 +798,7 @@ static INT_PTR ShowPopup(const wchar_t *msg, HICON hIcon) ppd.iSeconds = 0; break; } - return PUAddPopupT(&ppd); + return PUAddPopupW(&ppd); } static wchar_t* GetHumanName(LPARAM lParam) @@ -809,7 +809,7 @@ static wchar_t* GetHumanName(LPARAM lParam) static int ProcessPopup(int reason, LPARAM lParam) { - if (!KSPlugin.getByte(SETTING_SHOWCONNECTIONPOPUPS, FALSE) || !ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!KSPlugin.getByte(SETTING_SHOWCONNECTIONPOPUPS, FALSE) || !ServiceExists(MS_POPUP_ADDPOPUPW)) return -1; HICON hIcon = nullptr; diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/ks_options.cpp index 00fb0ac893..9415772b5f 100644 --- a/plugins/StatusManager/src/ks_options.cpp +++ b/plugins/StatusManager/src/ks_options.cpp @@ -289,14 +289,14 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L } // delay - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPW)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPW)); switch (db_get_b(0, KSMODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) { case POPUP_DELAYCUSTOM: CheckDlgButton(hwndDlg, IDC_DELAYCUSTOM, BST_CHECKED); - EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPW)); break; case POPUP_DELAYPERMANENT: @@ -375,10 +375,10 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_PREV: { - POPUPDATAT ppd = {}; + POPUPDATAW ppd = {}; ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); - wcsncpy(ppd.lptzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE); + wcsncpy(ppd.lpwzContactName, TranslateT("Keep status"), MAX_CONTACTNAME); + wcsncpy(ppd.lpwzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE); if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); @@ -402,7 +402,7 @@ static INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYPERMANENT)) { ppd.iSeconds = -1; } - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } break; } @@ -471,7 +471,7 @@ int KeepStatusOptionsInit(WPARAM wparam, LPARAM) odp.pfnDlgProc = DlgProcKSAdvOpts; KSPlugin.addOptions(wparam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { memset(&odp, 0, sizeof(odp)); odp.position = 150000000; odp.szGroup.a = LPGEN("Popups"); diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index cac75f3c7e..cb22e44284 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -86,7 +86,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, wchar_t*, COLORREF crBkg, const wchar_t* fmt, ...) { - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; va_list marker; static wchar_t szBuf[4 * 1024]; @@ -105,8 +105,8 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa pd.lchIcon = LoadIconEx("window"); PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName); - mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact)); - wcsncpy_s(pd.lptzText, TranslateW(szBuf), _TRUNCATE); + mir_snwprintf(pd.lpwzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact)); + wcsncpy_s(pd.lpwzText, TranslateW(szBuf), _TRUNCATE); pd.iSeconds = g_Settings.iPopupTimeout; if (g_Settings.iPopupStyle == 2) { @@ -124,7 +124,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa pd.PluginWindowProc = PopupDlgProc; pd.PluginData = si; - return PUAddPopupT(&pd); + return PUAddPopupW(&pd); } BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index bee5a8cb42..2f380b2169 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -369,7 +369,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) if (dbe.pBlob) mir_free(dbe.pBlob); - PUChangeTextT(pdata->hWnd, lpzText); + PUChangeTextW(pdata->hWnd, lpzText); return 0; } @@ -393,7 +393,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve if (hEvent == 0 && hContact == 0) dbe.szModule = Translate("Unknown module or contact"); - POPUPDATAT pud = { 0 }; + POPUPDATAW pud = { 0 }; long iSeconds; switch (eventType) { case EVENTTYPE_MESSAGE: @@ -426,27 +426,27 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve pud.PluginData = pdata; if (hContact) - wcsncpy_s(pud.lptzContactName, Clist_GetContactDisplayName(hContact), _TRUNCATE); + wcsncpy_s(pud.lpwzContactName, Clist_GetContactDisplayName(hContact), _TRUNCATE); else - wcsncpy_s(pud.lptzContactName, _A2T(dbe.szModule), _TRUNCATE); + wcsncpy_s(pud.lpwzContactName, _A2T(dbe.szModule), _TRUNCATE); wchar_t *szPreview = GetPreviewT((WORD)eventType, &dbe); if (szPreview) { - wcsncpy_s(pud.lptzText, szPreview, _TRUNCATE); + wcsncpy_s(pud.lpwzText, szPreview, _TRUNCATE); mir_free(szPreview); } - else wcsncpy(pud.lptzText, L" ", MAX_SECONDLINE); + else wcsncpy(pud.lpwzText, L" ", MAX_SECONDLINE); pdata->eventData = (EVENT_DATAT *)mir_alloc(NR_MERGED * sizeof(EVENT_DATAT)); pdata->eventData[0].hEvent = hEvent; pdata->eventData[0].timestamp = dbe.timestamp; - wcsncpy(pdata->eventData[0].tszText, pud.lptzText, MAX_SECONDLINE); + wcsncpy(pdata->eventData[0].tszText, pud.lpwzText, MAX_SECONDLINE); pdata->eventData[0].tszText[MAX_SECONDLINE - 1] = 0; pdata->nrEventsAlloced = NR_MERGED; pdata->nrMerged = 1; // fix for broken popups -- process failures - if (PUAddPopupT(&pud) < 0) { + if (PUAddPopupW(&pud) < 0) { mir_free(pdata->eventData); mir_free(pdata); } @@ -647,7 +647,7 @@ static INT_PTR CALLBACK DlgProcPopupOpts(HWND hWnd, UINT msg, WPARAM wParam, LPA void Popup_Options(WPARAM wParam) { - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) return; OPTIONSDIALOGPAGE odp = {}; diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index f7fd797a41..9c4d3b2fe1 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -113,7 +113,7 @@ void CGlobals::reloadSystemModulesChanged() m_hwndClist = g_clistApi.hwndContactList; - g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPT) != 0; + g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPW) != 0; CMenuItem mi(&g_plugin); SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8); diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index c501af13f9..694f823531 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -251,10 +251,10 @@ void CTabBaseDlg::NotifyDeliveryFailure() const if (CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) != 1) return; - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = m_hContact; - wcsncpy_s(ppd.lptzContactName, m_cache->getNick(), _TRUNCATE); - wcsncpy_s(ppd.lptzText, TranslateT("A message delivery has failed.\nClick to open the message window."), _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, m_cache->getNick(), _TRUNCATE); + wcsncpy_s(ppd.lpwzText, TranslateT("A message delivery has failed.\nClick to open the message window."), _TRUNCATE); if (!(BOOL)db_get_b(0, MODULE, OPT_COLDEFAULT_ERR, TRUE)) { ppd.colorText = (COLORREF)db_get_dw(0, MODULE, OPT_COLTEXT_ERR, DEFAULT_COLTEXT); @@ -266,7 +266,7 @@ void CTabBaseDlg::NotifyDeliveryFailure() const ppd.lchIcon = PluginConfig.g_iconErr; ppd.PluginData = nullptr; ppd.iSeconds = (int)db_get_dw(0, MODULE, OPT_DELAY_ERR, (DWORD)DEFAULT_DELAY); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h index aa8c70d568..c502738d99 100644 --- a/plugins/TabSRMM/src/nen.h +++ b/plugins/TabSRMM/src/nen.h @@ -142,7 +142,7 @@ struct PLUGIN_DATAT MCONTACT hContact; UINT eventType; NEN_OPTIONS *pluginOptions; - POPUPDATAT *pud; + POPUPDATAW *pud; HWND hWnd; long iSeconds; int nrMerged; diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 1ea1e7b940..8212a9f840 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -118,17 +118,17 @@ CSendLaterJob::~CSendLaterJob() if (PluginConfig.g_bPopupAvail && fShowPopup) { wchar_t *tszName = Clist_GetContactDisplayName(hContact); - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; - wcsncpy_s(ppd.lptzContactName, (tszName ? tszName : TranslateT("'(Unknown contact)'")), _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, (tszName ? tszName : TranslateT("'(Unknown contact)'")), _TRUNCATE); wchar_t *msgPreview = Utils::GetPreviewWithEllipsis(reinterpret_cast(&pBuf[mir_strlen((char *)pBuf) + 1]), 100); if (fSuccess) { - mir_snwprintf(ppd.lptzText, TranslateT("A send later job completed successfully.\nThe original message: %s"), + mir_snwprintf(ppd.lpwzText, TranslateT("A send later job completed successfully.\nThe original message: %s"), msgPreview); mir_free(msgPreview); } else if (fFailed) { - mir_snwprintf(ppd.lptzText, TranslateT("A send later job failed to complete.\nThe original message: %s"), + mir_snwprintf(ppd.lpwzText, TranslateT("A send later job failed to complete.\nThe original message: %s"), msgPreview); mir_free(msgPreview); } @@ -141,7 +141,7 @@ CSendLaterJob::~CSendLaterJob() ppd.lchIcon = fFailed ? PluginConfig.g_iconErr : PluginConfig.g_IconMsgEvent; ppd.PluginData = nullptr; ppd.iSeconds = fFailed ? -1 : nen_options.iDelayMsg; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } } if (fFailed && (bCode == JOB_AGE || bCode == JOB_REMOVABLE) && szId[0] == 'S') diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 335e9e8816..e4a59d5327 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -99,22 +99,22 @@ void TN_TypingMessage(MCONTACT hContact, int iMode) } int notyping; - POPUPDATAT_V2 ppd = { 0 }; + POPUPDATAW_V2 ppd = { 0 }; ppd.cbSize = sizeof(ppd); if (iMode == PROTOTYPE_CONTACTTYPING_OFF) { if (StopDisabled) return; - wcsncpy_s(ppd.lptzContactName, szContactName, _TRUNCATE); - wcsncpy_s(ppd.lptzText, szStop, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, szContactName, _TRUNCATE); + wcsncpy_s(ppd.lpwzText, szStop, _TRUNCATE); ppd.hNotification = hntfStopped; notyping = 1; } else { if (StartDisabled) return; - wcsncpy_s(ppd.lptzContactName, szContactName, _TRUNCATE); - wcsncpy_s(ppd.lptzText, szStart, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, szContactName, _TRUNCATE); + wcsncpy_s(ppd.lpwzText, szStart, _TRUNCATE); ppd.hNotification = hntfStarted; notyping = 0; } @@ -167,7 +167,7 @@ void TN_TypingMessage(MCONTACT hContact, int iMode) ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]; ppd.lchContact = hContact; ppd.PluginWindowProc = PopupDlgProc; - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, APF_NEWDATA); } static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -292,17 +292,17 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_PREVIEW: if (PluginConfig.g_bPopupAvail) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; for (int i = 0; i < 2; i++) { int notyping; if (i == PROTOTYPE_CONTACTTYPING_OFF) { - wcsncpy_s(ppd.lptzContactName, TranslateT("Contact"), _TRUNCATE); - wcsncpy_s(ppd.lptzText, szStop, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, TranslateT("Contact"), _TRUNCATE); + wcsncpy_s(ppd.lpwzText, szStop, _TRUNCATE); notyping = 1; } else { - wcsncpy_s(ppd.lptzContactName, TranslateT("Contact"), _TRUNCATE); - wcsncpy_s(ppd.lptzText, szStart, _TRUNCATE); + wcsncpy_s(ppd.lpwzContactName, TranslateT("Contact"), _TRUNCATE); + wcsncpy_s(ppd.lpwzText, szStart, _TRUNCATE); notyping = 0; } @@ -355,7 +355,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ppd.lchContact = wParam; ppd.PluginWindowProc = nullptr; ppd.PluginData = nullptr; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } } break; @@ -489,7 +489,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA int TN_OptionsInitialize(WPARAM wParam, LPARAM) { - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { OPTIONSDIALOGPAGE odp = {}; odp.position = 100000000; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TYPINGNOTIFYPOPUP); diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index dc5caf4b15..c79ab478d2 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -147,7 +147,7 @@ int TrafficCounterShutdown(WPARAM, LPARAM) int ModuleLoad(WPARAM, LPARAM) { - bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPT); + bPopupExists = ServiceExists(MS_POPUP_ADDPOPUPW); bVariablesExists = ServiceExists(MS_VARS_FORMATSTRING) && ServiceExists(MS_VARS_REGISTERTOKEN); bTooltipExists = ServiceExists("mToolTip/ShowTipW") || ServiceExists("mToolTip/ShowTip"); return 0; @@ -882,34 +882,34 @@ void UpdateNotifyTimer(void) void NotifyOnSend(void) { - POPUPDATAT ppd; + POPUPDATAW ppd; memset(&ppd, 0, sizeof(ppd)); ppd.lchContact = NULL; ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); - wcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME); - mir_snwprintf(ppd.lptzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10); + wcsncpy(ppd.lpwzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME); + mir_snwprintf(ppd.lpwzText, TranslateT("%d kilobytes sent"), notify_send_size = OverallInfo.CurrentSentTraffic >> 10); ppd.colorBack = Traffic_PopupBkColor; ppd.colorText = Traffic_PopupFontColor; ppd.PluginWindowProc = nullptr; ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } void NotifyOnRecv(void) { - POPUPDATAT ppd; + POPUPDATAW ppd; memset(&ppd, 0, sizeof(ppd)); ppd.lchContact = NULL; ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); - wcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME); - mir_snwprintf(ppd.lptzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10); + wcsncpy(ppd.lpwzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME); + mir_snwprintf(ppd.lpwzText, TranslateT("%d kilobytes received"), notify_recv_size = OverallInfo.CurrentRecvTraffic >> 10); ppd.colorBack = Traffic_PopupBkColor; ppd.colorText = Traffic_PopupFontColor; ppd.PluginWindowProc = nullptr; ppd.iSeconds = (Traffic_PopupTimeoutDefault ? 0 : Traffic_PopupTimeoutValue); - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } void CreateProtocolList(void) diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index f32d639fc6..f020743263 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -427,11 +427,11 @@ void SwitchLayout(bool lastword) if (smileyPrs != nullptr) CallService(MS_SMILEYADD_BATCHFREE, 0, (LPARAM)smileyPrs); - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; pd.lchIcon = IcoLib_GetIcon("Switch Layout and Send"); - mir_wstrncpy(pd.lptzText, buf, _countof(pd.lptzText)); - mir_wstrncpy(pd.lptzContactName, TranslateW_LP(L"TranslitSwitcher"), _countof(pd.lptzContactName)); - PUAddPopupT(&pd); + mir_wstrncpy(pd.lpwzText, buf, _countof(pd.lpwzText)); + mir_wstrncpy(pd.lpwzContactName, TranslateW_LP(L"TranslitSwitcher"), _countof(pd.lpwzContactName)); + PUAddPopupW(&pd); } } else if (mir_wstrcmpi(szClassName, L"RichEdit50W") == 0) { diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 98a74c248a..05583dbdf8 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -490,13 +490,13 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam) MoveWindow(hDlg, -10, -10, 0, 0, FALSE); LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA)); if (pmpd) { - POPUPDATAT_V2 pd = { 0 }; + POPUPDATAW_V2 pd = { 0 }; pd.cbSize = sizeof(pd); pd.lchContact = NULL; //(HANDLE)wParam; // icon pd.lchIcon = MsgLoadIcon(pMsgBox); - mir_wstrncpy(pd.lptzContactName, pMsgBox->ptszTitle, _countof(pd.lptzContactName)); - mir_wstrncpy(pd.lptzText, pMsgBox->ptszMsg, _countof(pd.lptzText)); + mir_wstrncpy(pd.lpwzContactName, pMsgBox->ptszTitle, _countof(pd.lpwzContactName)); + mir_wstrncpy(pd.lpwzText, pMsgBox->ptszMsg, _countof(pd.lpwzText)); // CALLBAC Proc pd.PluginWindowProc = PopupProc; @@ -567,7 +567,7 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM, LPARAM lParam) } // create popup - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, APF_NEWDATA); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, APF_NEWDATA); if (MB_TYPE(pMsgBox->uType) == MB_OK) EndDialog(hDlg, IDOK); } @@ -642,7 +642,7 @@ INT_PTR MsgBoxService(WPARAM, LPARAM lParam) if (PtrIsValid(pMsgBox) && pMsgBox->cbSize == sizeof(MSGBOX)) { // Shall the MessageBox displayed as popup? if (!(pMsgBox->uType & (MB_INFOBAR | MB_NOPOPUP)) // message box can be a popup? - && ServiceExists(MS_POPUP_ADDPOPUPT) // popups exist? + && ServiceExists(MS_POPUP_ADDPOPUPW) // popups exist? && myGlobals.PopupActionsExist == 1 // popup support ext stuct? && (db_get_dw(0, "Popup", "Actions", 0) & 1) // popup++ actions on? && g_plugin.getByte(SET_POPUPMSGBOX, DEFVAL_POPUPMSGBOX)) // user likes popups? diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index cd8ed8fb48..7888950cc6 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -886,12 +886,12 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR switch (LOWORD(wParam)) { case BTN_PREVIEW: { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.iSeconds = (int)g_plugin.getByte(SET_POPUP_DELAY, 0); - mir_wstrncpy(ppd.lptzText, TranslateT("This is the reminder message"), MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzText, TranslateT("This is the reminder message"), MAX_SECONDLINE); // Birthday - mir_wstrncpy(ppd.lptzContactName, TranslateT("Birthday"), _countof(ppd.lptzContactName)); + mir_wstrncpy(ppd.lpwzContactName, TranslateT("Birthday"), _countof(ppd.lpwzContactName)); ppd.lchIcon = IcoLib_GetIcon(ICO_RMD_DTB0); if (IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_WINCLR)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); @@ -901,10 +901,10 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR ppd.colorBack = SendDlgItemMessage(hDlg, CLR_BBACK, CPM_GETCOLOUR, 0, 0); ppd.colorText = SendDlgItemMessage(hDlg, CLR_BTEXT, CPM_GETCOLOUR, 0, 0); } - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); // Anniversary - mir_wstrncpy(ppd.lptzContactName, TranslateT("Anniversary"), _countof(ppd.lptzContactName)); + mir_wstrncpy(ppd.lpwzContactName, TranslateT("Anniversary"), _countof(ppd.lpwzContactName)); ppd.lchIcon = IcoLib_GetIcon(ICO_RMD_DTAX); if (IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_WINCLR)) { ppd.colorBack = GetSysColor(COLOR_BTNFACE); @@ -918,7 +918,7 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR ppd.colorBack = SendDlgItemMessage(hDlg, CLR_ABACK, CPM_GETCOLOUR, 0, 0); ppd.colorText = SendDlgItemMessage(hDlg, CLR_ATEXT, CPM_GETCOLOUR, 0, 0); } - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } break; @@ -1068,7 +1068,7 @@ int OnInitOptions(WPARAM wParam, LPARAM) g_plugin.addOptions(wParam, &odp); // Popups page - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szTitle.a = MODULELONGNAME; odp.szGroup.a = LPGEN("Popups"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP); diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 6f07273138..6ad7be5009 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -332,7 +332,7 @@ class CPopupUpdProgress : public CUpdProgress if (pb) { mir_wstrcpy(pb, _szText); - SendMessage(_hWnd, UM_CHANGEPOPUP, CPT_TITLET, (LPARAM)pb); + SendMessage(_hWnd, UM_CHANGEPOPUP, CPT_TITLEW, (LPARAM)pb); } } } @@ -393,7 +393,7 @@ public: **/ virtual HWND Create(LPCTSTR szTitle, PUpdCallback pFnCallBack) { - POPUPDATAT_V2 pd = { 0 }; + POPUPDATAW_V2 pd = { 0 }; pd.cbSize = sizeof(pd); pd.lchIcon = IcoLib_GetIcon(ICO_BTN_UPDATE); pd.iSeconds = -1; @@ -404,12 +404,12 @@ public: // dummy text _szText = mir_wstrdup(szTitle); - mir_wstrcpy(pd.lptzContactName, _szText); + mir_wstrcpy(pd.lpwzContactName, _szText); - mir_wstrcpy(pd.lptzText, L" "); + mir_wstrcpy(pd.lpwzText, L" "); _pFnCallBack = pFnCallBack; - _hWnd = (HWND)CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, APF_RETURN_HWND | APF_NEWDATA); + _hWnd = (HWND)CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, APF_RETURN_HWND | APF_NEWDATA); return _hWnd; } @@ -443,7 +443,7 @@ public: **/ virtual void SetText(LPCTSTR szText) { - SendMessage(_hWnd, UM_CHANGEPOPUP, CPT_TEXTT, (LPARAM)mir_wstrdup(szText)); + SendMessage(_hWnd, UM_CHANGEPOPUP, CPT_TEXTW, (LPARAM)mir_wstrdup(szText)); } }; @@ -635,7 +635,7 @@ public: iWait += 5000; if (Size() && !_pProgress) { - if (ServiceExists(MS_POPUP_CHANGETEXTT) && g_plugin.getByte("PopupProgress", FALSE)) { + if (ServiceExists(MS_POPUP_CHANGETEXTW) && g_plugin.getByte("PopupProgress", FALSE)) { _pProgress = new CPopupUpdProgress(this); } else { diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 005c1e711c..4f5677e4d6 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -249,17 +249,17 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT if (!gRemindOpts.bPopups) return 1; - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.PluginWindowProc = PopupWindowProc; ppd.iSeconds = (int)g_plugin.getByte(SET_POPUP_DELAY, 0); if (hContact) { ppd.lchContact = hContact; - mir_snwprintf(ppd.lptzContactName, L"%s - %s", TranslateW(pszDesc), Clist_GetContactDisplayName(hContact)); + mir_snwprintf(ppd.lpwzContactName, L"%s - %s", TranslateW(pszDesc), Clist_GetContactDisplayName(hContact)); } - else mir_wstrncpy(ppd.lptzContactName, TranslateT("Reminder"), _countof(ppd.lptzContactName)); + else mir_wstrncpy(ppd.lpwzContactName, TranslateT("Reminder"), _countof(ppd.lpwzContactName)); - mir_wstrncpy(ppd.lptzText, pszMsg, MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzText, pszMsg, MAX_SECONDLINE); ppd.lchIcon = GetAnnivIcon(CEvent(eventType, DaysToAnniv)); @@ -291,7 +291,7 @@ static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysT break; } } - return PUAddPopupT(&ppd); + return PUAddPopupW(&ppd); } /** @@ -830,7 +830,7 @@ void SvcReminderEnable(BYTE bEnable) gRemindOpts.bCListExtraIcon = g_plugin.getByte(SET_REMIND_EXTRAICON, 1); gRemindOpts.bCheckVisibleOnly = g_plugin.getByte(SET_REMIND_CHECKVISIBLE, DEFVAL_REMIND_CHECKVISIBLE); gRemindOpts.bFlashCList = g_plugin.getByte(SET_REMIND_FLASHICON, FALSE); - gRemindOpts.bPopups = ServiceExists(MS_POPUP_ADDPOPUPT) && g_plugin.getByte(SET_POPUP_ENABLED, DEFVAL_POPUP_ENABLED); + gRemindOpts.bPopups = ServiceExists(MS_POPUP_ADDPOPUPW) && g_plugin.getByte(SET_POPUP_ENABLED, DEFVAL_POPUP_ENABLED); // init the timer UpdateTimer(TRUE); diff --git a/plugins/Weather/src/weather_opt.cpp b/plugins/Weather/src/weather_opt.cpp index fdde8ff97a..35b72d77ed 100644 --- a/plugins/Weather/src/weather_opt.cpp +++ b/plugins/Weather/src/weather_opt.cpp @@ -588,7 +588,7 @@ int OptInit(WPARAM wParam, LPARAM) g_plugin.addOptions(wParam, &odp); // if popup service exists, load the weather popup options - if ((ServiceExists(MS_POPUP_ADDPOPUPT))) { + if ((ServiceExists(MS_POPUP_ADDPOPUPW))) { odp.position = 100000000; odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); odp.szGroup.a = LPGEN("Popups"); diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 19c56c5b73..151788503b 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -43,11 +43,11 @@ int WeatherError(WPARAM wParam, LPARAM lParam) wchar_t* tszMsg = (wchar_t*)wParam; if ((DWORD)lParam == SM_WARNING) - PUShowMessageT(tszMsg, SM_WARNING); + PUShowMessageW(tszMsg, SM_WARNING); else if ((DWORD)lParam == SM_NOTIFY) - PUShowMessageT(tszMsg, SM_NOTIFY); + PUShowMessageW(tszMsg, SM_NOTIFY); else if ((DWORD)lParam == SM_WEATHERALERT) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; wchar_t str1[512], str2[512]; // get the 2 strings @@ -67,12 +67,12 @@ int WeatherError(WPARAM wParam, LPARAM lParam) // setup the popup ppd.lchIcon = (HICON)LoadImage(nullptr, MAKEINTRESOURCE(OIC_BANG), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED); - mir_wstrcpy(ppd.lptzContactName, str1); - mir_wstrcpy(ppd.lptzText, str2); + mir_wstrcpy(ppd.lpwzContactName, str1); + mir_wstrcpy(ppd.lpwzText, str2); ppd.colorBack = (opt.UseWinColors) ? GetSysColor(COLOR_BTNFACE) : opt.BGColour; ppd.colorText = (opt.UseWinColors) ? GetSysColor(COLOR_WINDOWTEXT) : opt.TextColour; ppd.iSeconds = opt.pDelay; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } return 0; } @@ -129,16 +129,16 @@ int WeatherPopup(WPARAM hContact, LPARAM lParam) WEATHERINFO winfo = LoadWeatherInfo(hContact); // setup the popup - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; ppd.PluginData = ppd.lchIcon = Skin_LoadProtoIcon(MODULENAME, winfo.status); - GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName); - GetDisplay(&winfo, opt.pText, ppd.lptzText); + GetDisplay(&winfo, opt.pTitle, ppd.lpwzContactName); + GetDisplay(&winfo, opt.pText, ppd.lpwzText); ppd.PluginWindowProc = PopupDlgProc; ppd.colorBack = (opt.UseWinColors) ? GetSysColor(COLOR_BTNFACE) : opt.BGColour; ppd.colorText = (opt.UseWinColors) ? GetSysColor(COLOR_WINDOWTEXT) : opt.TextColour; ppd.iSeconds = opt.pDelay; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } return 0; } diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 61c03c473c..ef569a46e5 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -350,7 +350,7 @@ void AddMenuItems(void) Menu_AddMainMenuItem(&mi); // only run if popup service exists - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { SET_UID(mi, 0xdc5411cb, 0xb7c7, 0x443b, 0x88, 0x5a, 0x90, 0x24, 0x43, 0xde, 0x54, 0x3e); CreateServiceFunction(MODULENAME "/PopupMenu", MenuitemNotifyCmd); mi.name.a = LPGEN("Weather Notification"); diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 9f65d3e435..2a9f371377 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -299,7 +299,7 @@ int OptInitialise(WPARAM wParam, LPARAM) g_plugin.addOptions(wParam, &odp); // if popup service exists - if ((ServiceExists(MS_POPUP_ADDPOPUPT))) { + if ((ServiceExists(MS_POPUP_ADDPOPUPW))) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP); odp.szGroup.a = LPGEN("Popups"); odp.pfnDlgProc = DlgPopUpOpts; diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index d7f52a6cab..0c8e36cceb 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -111,21 +111,21 @@ int WAlertOSD(MCONTACT hContact, wchar_t *displaytext) /*****************************************************************************/ int PopupAlert(WPARAM hContact, LPARAM lParam) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; if (hContact != 0) - mir_wstrncpy(ppd.lptzContactName, ptrW(g_plugin.getWStringA(hContact, PRESERVE_NAME_KEY)), _countof(ppd.lptzContactName)); + mir_wstrncpy(ppd.lpwzContactName, ptrW(g_plugin.getWStringA(hContact, PRESERVE_NAME_KEY)), _countof(ppd.lpwzContactName)); else - mir_wstrcpy(ppd.lptzContactName, _A2W(MODULENAME)); + mir_wstrcpy(ppd.lpwzContactName, _A2W(MODULENAME)); ppd.lchContact = hContact; ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SITE)); wchar_t *displaytext = (wchar_t*)lParam; if ((mir_wstrlen(displaytext) == MAX_SECONDLINE) || (mir_wstrlen(displaytext) > MAX_SECONDLINE)) - mir_snwprintf(ppd.lptzText, displaytext); + mir_snwprintf(ppd.lpwzText, displaytext); else if (mir_wstrlen(displaytext) < MAX_SECONDLINE) - mir_snwprintf(ppd.lptzText, displaytext); + mir_snwprintf(ppd.lpwzText, displaytext); if (g_plugin.getByte(POP_USECUSTCLRS_KEY, 0)) { ppd.colorBack = g_plugin.getDword(POP_BG_CLR_KEY, Def_color_bg); @@ -143,8 +143,8 @@ int PopupAlert(WPARAM hContact, LPARAM lParam) ppd.PluginWindowProc = nullptr; ppd.iSeconds = g_plugin.getDword(POP_DELAY_KEY, 0); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0); + if (ServiceExists(MS_POPUP_ADDPOPUPW)) + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&ppd, 0); return 0; } @@ -184,9 +184,9 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) return 0; wchar_t *ptszContactName = Clist_GetContactDisplayName(hContact); - if (ServiceExists(MS_POPUP_ADDPOPUPT) && g_plugin.getByte(ERROR_POPUP_KEY, 0)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW) && g_plugin.getByte(ERROR_POPUP_KEY, 0)) { mir_snwprintf(newdisplaytext, L"%s\n%s", ptszContactName, displaytext); - PUShowMessageT(newdisplaytext, SM_WARNING); + PUShowMessageW(newdisplaytext, SM_WARNING); } else if (ServiceExists("OSD/Announce") && g_plugin.getByte(ERROR_POPUP_KEY, 0)) { mir_snwprintf(newdisplaytext, L"%s: %s", ptszContactName, TranslateW(displaytext)); diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index 655e17fd2e..135a78f528 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -187,7 +187,7 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) case IDC_PREVIEW: wchar_t str3[512]; - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; GetDlgItemText(hdlg, IDC_DELAY, str3, _countof(str3)); @@ -204,15 +204,15 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) TextColour = TextClr; } ppd.lchContact = NULL; - mir_wstrcpy(ppd.lptzContactName, _A2W(MODULENAME)); + mir_wstrcpy(ppd.lpwzContactName, _A2W(MODULENAME)); ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SITE)); - mir_wstrcpy(ppd.lptzText, TranslateT("This is a preview popup.")); + mir_wstrcpy(ppd.lpwzText, TranslateT("This is a preview popup.")); ppd.colorBack = BGColour; ppd.colorText = TextColour; ppd.PluginWindowProc = nullptr; ppd.iSeconds = _wtol(str3); // display popups - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } break; @@ -1092,11 +1092,11 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara } else { CheckDlgButton(hwndDlg, IDC_SUPPRESS, BST_UNCHECKED); - if ((ServiceExists(MS_POPUP_ADDPOPUPT) != 0)) + if ((ServiceExists(MS_POPUP_ADDPOPUPW) != 0)) EnableWindow(GetDlgItem(hwndDlg, IDC_ERROR_POPUP), 1); } - if (ServiceExists(MS_POPUP_ADDPOPUPT) == 0) + if (ServiceExists(MS_POPUP_ADDPOPUPW) == 0) EnableWindow(GetDlgItem(hwndDlg, IDC_ERROR_POPUP), 0); if (g_plugin.getByte(UPDATE_ONSTART_KEY, 0)) { @@ -1167,7 +1167,7 @@ INT_PTR CALLBACK DlgProcOpt(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara break; case IDC_SUPPRESS: - if ((ServiceExists(MS_POPUP_ADDPOPUPT) != 0)) + if ((ServiceExists(MS_POPUP_ADDPOPUPW) != 0)) EnableWindow(GetDlgItem(hwndDlg, IDC_ERROR_POPUP), (!(IsDlgButtonChecked(hwndDlg, IDC_SUPPRESS)))); break; diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index e2ff236ad5..af551c5107 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -217,7 +217,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara CheckDlgButton(hWnd, IDC_USE_DIALOG, (commonData.bUseDialog) ? BST_CHECKED : BST_UNCHECKED); EnableDialogGroup(hWnd, commonData.bUseDialog); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { CheckDlgButton(hWnd, IDC_USE_POPUPS, commonData.bUsePopups ? BST_CHECKED : BST_UNCHECKED); EnablePopupsGroup(hWnd, commonData.bUsePopups); } diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index ca672632c0..dfbf5d9d59 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -void FillPopupData(POPUPDATAT &pd, int dtb) +void FillPopupData(POPUPDATAW &pd, int dtb) { int popupTimeout = (dtb == 0) ? commonData.popupTimeoutToday : commonData.popupTimeout; @@ -31,13 +31,13 @@ void FillPopupData(POPUPDATAT &pd, int dtb) void PopupNotifyNoBirthdays() { - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; FillPopupData(pd, -1); pd.lchIcon = GetDTBIcon(-1); - wcsncpy(pd.lptzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1); - wcsncpy(pd.lptzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1); - PUAddPopupT(&pd); + wcsncpy(pd.lpwzContactName, TranslateT("WhenWasIt"), MAX_CONTACTNAME - 1); + wcsncpy(pd.lpwzText, TranslateT("No upcoming birthdays."), MAX_SECONDLINE - 1); + PUAddPopupW(&pd); } wchar_t *BuildDTBText(int dtb, wchar_t *name, wchar_t *text, int size) @@ -75,13 +75,13 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age) BuildDTBText(dtb, name, text, _countof(text)); int gender = GetContactGender(hContact); - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; FillPopupData(pd, dtb); pd.lchContact = hContact; pd.PluginWindowProc = DlgProcPopup; pd.lchIcon = GetDTBIcon(dtb); - mir_snwprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); + mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); wchar_t *sex; switch (toupper(gender)) { case 'M': @@ -96,14 +96,14 @@ int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age) } if (age > 0) { if (dtb > 0) - mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age); + mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s will be %d years old."), text, sex, age); else - mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); + mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); } else - mir_wstrncpy(pd.lptzText, text, MAX_SECONDLINE - 1); + mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1); - PUAddPopupT(&pd); + PUAddPopupW(&pd); return 0; } @@ -119,13 +119,13 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age) BuildDABText(dab, name, text, _countof(text)); int gender = GetContactGender(hContact); - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; FillPopupData(pd, dab); pd.lchContact = hContact; pd.PluginWindowProc = DlgProcPopup; pd.lchIcon = GetDTBIcon(dab); - mir_snwprintf(pd.lptzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); + mir_snwprintf(pd.lpwzContactName, MAX_CONTACTNAME, TranslateT("Birthday - %s"), name); wchar_t *sex; switch (toupper(gender)) { case 'M': @@ -139,11 +139,11 @@ int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age) break; } if (age > 0) - mir_snwprintf(pd.lptzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); + mir_snwprintf(pd.lpwzText, MAX_SECONDLINE, TranslateT("%s\n%s just turned %d."), text, sex, age); else - mir_wstrncpy(pd.lptzText, text, MAX_SECONDLINE - 1); + mir_wstrncpy(pd.lpwzText, text, MAX_SECONDLINE - 1); - PUAddPopupT(&pd); + PUAddPopupW(&pd); return 0; } diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index b0dfe5c516..3e5c89eee5 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -156,13 +156,13 @@ INT_PTR AddBirthdayService(WPARAM hContact, LPARAM) void ShowPopupMessage(const wchar_t *title, const wchar_t *message, HANDLE icon) { - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; pd.lchIcon = IcoLib_GetIconByHandle(icon); - wcsncpy_s(pd.lptzContactName, title, _TRUNCATE); - wcsncpy_s(pd.lptzText, message, _TRUNCATE); + wcsncpy_s(pd.lpwzContactName, title, _TRUNCATE); + wcsncpy_s(pd.lpwzText, message, _TRUNCATE); pd.colorText = commonData.foreground; pd.colorBack = commonData.background; - PUAddPopupT(&pd); + PUAddPopupW(&pd); } void __cdecl RefreshUserDetailsWorkerThread(void*) diff --git a/plugins/WhoUsesMyFiles/src/options.cpp b/plugins/WhoUsesMyFiles/src/options.cpp index f481edf829..50414b1e37 100644 --- a/plugins/WhoUsesMyFiles/src/options.cpp +++ b/plugins/WhoUsesMyFiles/src/options.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . void ShowThePreview() { - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) { MessageBox(nullptr, TranslateT("Popup plugin not found!"), TranslateT("Error"), MB_OK | MB_ICONSTOP); return; } @@ -108,7 +108,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara SendDlgItemMessage(hwndDlg,IDC_COLOR_BACK,CPM_SETCOLOUR,0,WumfOptions.ColorBack); SendDlgItemMessage(hwndDlg,IDC_COLOR_TEXT,CPM_SETCOLOUR,0,WumfOptions.ColorText); } - if ( !ServiceExists(MS_POPUP_ADDPOPUPT)) { + if ( !ServiceExists(MS_POPUP_ADDPOPUPW)) { DisableDelayOptions(hwndDlg); break; } diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 26ff252798..e393337547 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -55,7 +55,7 @@ void LoadOptions() WumfOptions.DelayInf = g_plugin.getByte(DELAY_INF, FALSE); WumfOptions.DelaySet = g_plugin.getByte(DELAY_SET, FALSE); WumfOptions.DelaySec = g_plugin.getByte(DELAY_SEC, 0); - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) { WumfOptions.DelayDef = TRUE; WumfOptions.DelaySet = FALSE; WumfOptions.DelayInf = FALSE; @@ -134,7 +134,7 @@ void ShowWumfPopup(PWumf w) void ShowThePopup(PWumf w, LPTSTR title, LPTSTR text) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = NULL; ppd.lchIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_DRIVE)); @@ -145,8 +145,8 @@ void ShowThePopup(PWumf w, LPTSTR title, LPTSTR text) else if (WumfOptions.DelaySet) ppd.iSeconds = WumfOptions.DelaySec; - mir_wstrncpy(ppd.lptzContactName, title, MAX_CONTACTNAME); - mir_wstrncpy(ppd.lptzText, text, MAX_SECONDLINE); + mir_wstrncpy(ppd.lpwzContactName, title, MAX_CONTACTNAME); + mir_wstrncpy(ppd.lpwzText, text, MAX_SECONDLINE); if (WumfOptions.UseWinColor) { ppd.colorBack = GetSysColor(COLOR_WINDOW); ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); @@ -158,7 +158,7 @@ void ShowThePopup(PWumf w, LPTSTR title, LPTSTR text) ppd.PluginWindowProc = PopupDlgProc; ppd.PluginData = w; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } void ThreadProc(LPVOID) diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 276d45ef4b..5df4bf076a 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP char* TitleStrA; char *Message1A = nullptr; wchar_t *Message1W = nullptr; - POPUPDATAT BadConnectPopup; + POPUPDATAW BadConnectPopup; ActualAccount = ((struct BadConnectionParam *)lParam)->account; ErrorCode = ((struct BadConnectionParam *)lParam)->errcode; @@ -117,29 +117,29 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg, UINT msg, WPARAM wParam, LP BadConnectPopup.PluginWindowProc = BadConnectPopupProc; BadConnectPopup.PluginData = ActualAccount; - mir_wstrncpy(BadConnectPopup.lptzContactName, _A2T(ActualAccount->Name), _countof(BadConnectPopup.lptzContactName)); + mir_wstrncpy(BadConnectPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(BadConnectPopup.lpwzContactName)); } if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr != nullptr) { Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); if (ShowPopup) - PUAddPopupT(&BadConnectPopup); + PUAddPopupW(&BadConnectPopup); } else if (ActualAccount->Plugin->Fcn != nullptr && ActualAccount->Plugin->Fcn->GetErrorStringAFcnPtr != nullptr) { Message1W = ActualAccount->Plugin->Fcn->GetErrorStringWFcnPtr(ErrorCode); SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); if (ShowPopup) - PUAddPopupT(&BadConnectPopup); + PUAddPopupW(&BadConnectPopup); } else { Message1W = TranslateT("Unknown error"); SetDlgItemText(hDlg, IDC_STATICMSG, Message1W); - wcsncpy_s(BadConnectPopup.lptzText, Message1W, _TRUNCATE); + wcsncpy_s(BadConnectPopup.lpwzText, Message1W, _TRUNCATE); if (ShowPopup) - PUAddPopupT(&BadConnectPopup); + PUAddPopupW(&BadConnectPopup); } if (!ShowMsg && !ShowIco) diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index 3cb68c9f90..bbac178d15 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -495,7 +495,7 @@ int AddNewMailsToListView(HWND hListView, HACCOUNT ActualAccount, DWORD nflags) lfoundi = 0; } - POPUPDATAT NewMailPopup = { 0 }; + POPUPDATAW NewMailPopup = { 0 }; NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; NewMailPopup.lchIcon = g_LoadIconEx(2); if (nflags & YAMN_ACC_POPC) { @@ -587,8 +587,8 @@ int AddNewMailsToListView(HWND hListView, HACCOUNT ActualAccount, DWORD nflags) } if ((nflags & YAMN_ACC_POP) && (ActualAccount->Flags & YAMN_ACC_POPN) && (msgq->Flags & YAMN_MSG_POPUP) && (msgq->Flags & YAMN_MSG_NEW)) { - mir_wstrncpy(NewMailPopup.lptzContactName, FromStr, _countof(NewMailPopup.lptzContactName)); - mir_wstrncpy(NewMailPopup.lptzText, UnicodeHeader.Subject, _countof(NewMailPopup.lptzText)); + mir_wstrncpy(NewMailPopup.lpwzContactName, FromStr, _countof(NewMailPopup.lpwzContactName)); + mir_wstrncpy(NewMailPopup.lpwzText, UnicodeHeader.Subject, _countof(NewMailPopup.lpwzText)); PYAMN_MAILSHOWPARAM MailParam = (PYAMN_MAILSHOWPARAM)malloc(sizeof(YAMN_MAILSHOWPARAM)); if (MailParam) { @@ -596,7 +596,7 @@ int AddNewMailsToListView(HWND hListView, HACCOUNT ActualAccount, DWORD nflags) MailParam->mail = msgq; MailParam->ThreadRunningEV = nullptr; NewMailPopup.PluginData = MailParam; - PUAddPopupT(&NewMailPopup); + PUAddPopupW(&NewMailPopup); } } @@ -656,7 +656,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D if ((nflags & YAMN_ACC_POP) && !(ActualAccount->Flags & YAMN_ACC_POPN) && (MN->Real.PopupRun + MN->Virtual.PopupRun)) { - POPUPDATAT NewMailPopup = { 0 }; + POPUPDATAW NewMailPopup = { 0 }; NewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; NewMailPopup.lchIcon = g_LoadIconEx(2); @@ -673,9 +673,9 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D NewMailPopup.PluginWindowProc = NewMailPopupProc; NewMailPopup.PluginData = (void *)nullptr; //multiple popups - mir_wstrncpy(NewMailPopup.lptzContactName, _A2T(ActualAccount->Name), _countof(NewMailPopup.lptzContactName)); - mir_snwprintf(NewMailPopup.lptzText, TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); - PUAddPopupT(&NewMailPopup); + mir_wstrncpy(NewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NewMailPopup.lpwzContactName)); + mir_snwprintf(NewMailPopup.lpwzText, TranslateT("%d new mail message(s), %d total"), MN->Real.PopupNC + MN->Virtual.PopupNC, MN->Real.PopupTC + MN->Virtual.PopupTC); + PUAddPopupW(&NewMailPopup); } // destroy tray icon if no new mail @@ -744,7 +744,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D Skin_PlaySound(YAMN_NEWMAILSOUND); if ((nnflags & YAMN_ACC_POP) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { - POPUPDATAT NoNewMailPopup; + POPUPDATAW NoNewMailPopup; NoNewMailPopup.lchContact = (ActualAccount->hContact != NULL) ? ActualAccount->hContact : (UINT_PTR)ActualAccount; NoNewMailPopup.lchIcon = g_LoadIconEx(1); @@ -761,12 +761,12 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D NoNewMailPopup.PluginWindowProc = NoNewMailPopupProc; NoNewMailPopup.PluginData = nullptr; //it's not new mail popup - mir_wstrncpy(NoNewMailPopup.lptzContactName, _A2T(ActualAccount->Name), _countof(NoNewMailPopup.lptzContactName)); + mir_wstrncpy(NoNewMailPopup.lpwzContactName, _A2T(ActualAccount->Name), _countof(NoNewMailPopup.lpwzContactName)); if (MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC) - mir_snwprintf(NoNewMailPopup.lptzText, TranslateT("No new mail message, %d spam(s)"), MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC); + mir_snwprintf(NoNewMailPopup.lpwzText, TranslateT("No new mail message, %d spam(s)"), MN->Real.PopupSL2NC + MN->Virtual.PopupSL2NC); else - mir_wstrncpy(NoNewMailPopup.lptzText, TranslateT("No new mail message"), _countof(NoNewMailPopup.lptzText)); - PUAddPopupT(&NoNewMailPopup); + mir_wstrncpy(NoNewMailPopup.lpwzText, TranslateT("No new mail message"), _countof(NoNewMailPopup.lpwzText)); + PUAddPopupW(&NoNewMailPopup); } if ((nflags & YAMN_ACC_CONT) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp index bd4e2c4220..79f424e8e0 100644 --- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp @@ -173,7 +173,7 @@ int YAMNOptInitSvc(WPARAM wParam, LPARAM) odp.pfnDlgProc = DlgProcPluginOpt; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szGroup.a = LPGEN("Popups"); odp.szTab.a = LPGEN("YAMN"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_POP3ACCOUNTPOPUP); @@ -1272,9 +1272,9 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM case IDC_PREVIEW: { - POPUPDATAT Tester; - POPUPDATAT TesterF; - POPUPDATAT TesterN; + POPUPDATAW Tester; + POPUPDATAW TesterF; + POPUPDATAW TesterN; BOOL TesterC = (IsDlgButtonChecked(hDlg, IDC_CHECKCOL) == BST_CHECKED); BOOL TesterFC = (IsDlgButtonChecked(hDlg, IDC_CHECKFCOL) == BST_CHECKED); BOOL TesterNC = (IsDlgButtonChecked(hDlg, IDC_CHECKNCOL) == BST_CHECKED); @@ -1286,12 +1286,12 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM TesterF.lchIcon = g_LoadIconEx(3); TesterN.lchIcon = g_LoadIconEx(1); - mir_wstrncpy(Tester.lptzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); - mir_wstrncpy(TesterF.lptzContactName, TranslateT("Account Test (failed)"), MAX_CONTACTNAME); - mir_wstrncpy(TesterN.lptzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); - mir_wstrncpy(Tester.lptzText, TranslateT("You have N new mail messages"), MAX_SECONDLINE); - mir_wstrncpy(TesterF.lptzText, TranslateT("Connection failed message"), MAX_SECONDLINE); - mir_wstrncpy(TesterN.lptzText, TranslateT("No new mail message"), MAX_SECONDLINE); + mir_wstrncpy(Tester.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); + mir_wstrncpy(TesterF.lpwzContactName, TranslateT("Account Test (failed)"), MAX_CONTACTNAME); + mir_wstrncpy(TesterN.lpwzContactName, TranslateT("Account Test"), MAX_CONTACTNAME); + mir_wstrncpy(Tester.lpwzText, TranslateT("You have N new mail messages"), MAX_SECONDLINE); + mir_wstrncpy(TesterF.lpwzText, TranslateT("Connection failed message"), MAX_SECONDLINE); + mir_wstrncpy(TesterN.lpwzText, TranslateT("No new mail message"), MAX_SECONDLINE); if (TesterC) { Tester.colorBack = SendDlgItemMessage(hDlg, IDC_CPB, CPM_GETCOLOUR, 0, 0); Tester.colorText = SendDlgItemMessage(hDlg, IDC_CPT, CPM_GETCOLOUR, 0, 0); @@ -1324,11 +1324,11 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg, UINT msg, WPARAM wParam, LPARAM TesterN.PluginData = nullptr; if (IsDlgButtonChecked(hDlg, IDC_CHECKPOP) == BST_CHECKED) - PUAddPopupT(&Tester); + PUAddPopupW(&Tester); if (IsDlgButtonChecked(hDlg, IDC_CHECKFPOP) == BST_CHECKED) - PUAddPopupT(&TesterF); + PUAddPopupW(&TesterF); if (IsDlgButtonChecked(hDlg, IDC_CHECKNPOP) == BST_CHECKED) - PUAddPopupT(&TesterN); + PUAddPopupW(&TesterN); Changed = TRUE; } break; diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 0a801b28b5..df1ee18e32 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -288,11 +288,11 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) return -1; if (db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { - POPUPDATAT pd = {0}; - mir_wstrcpy(pd.lptzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); + POPUPDATAW pd = {0}; + mir_wstrcpy(pd.lpwzContactName, lParam == SM_WARNING ? L"Warning" : L"Notification"); pd.lchIcon = LoadIcon(nullptr, lParam == SM_WARNING ? IDI_WARNING : IDI_INFORMATION); - wcsncpy(pd.lptzText, _A2T((char *)wParam), MAX_SECONDLINE); pd.lptzText[MAX_SECONDLINE-1] = 0; - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pd, 0); + wcsncpy(pd.lpwzText, _A2T((char *)wParam), MAX_SECONDLINE); pd.lpwzText[MAX_SECONDLINE-1] = 0; + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, 0); } return 0; } diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 9541b1d3a5..705e1ae521 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -325,8 +325,8 @@ void FacebookProto::LoadHistory(void *pParam) pd.iSeconds = 5; pd.lchContact = hContact; pd.lchIcon = IcoLib_GetIconByHandle(GetIconHandle("conversation")); // TODO: Use better icon - wcsncpy(pd.lptzContactName, m_tszUserName, MAX_CONTACTNAME); - wcsncpy(pd.lptzText, TranslateT("Loading history started."), MAX_SECONDLINE); + wcsncpy(pd.lpwzContactName, m_tszUserName, MAX_CONTACTNAME); + wcsncpy(pd.lpwzText, TranslateT("Loading history started."), MAX_SECONDLINE); HWND popupHwnd = nullptr; if (ServiceExists(MS_POPUP_ADDPOPUPW)) { @@ -413,7 +413,7 @@ void FacebookProto::LoadHistory(void *pParam) PUChangeTextW(popupHwnd, text); } else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { - wcsncpy(pd.lptzText, text, MAX_SECONDLINE); + wcsncpy(pd.lpwzText, text, MAX_SECONDLINE); pd.iSeconds = 1; popupHwnd = (HWND)CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, (LPARAM)0); } @@ -435,7 +435,7 @@ void FacebookProto::LoadHistory(void *pParam) PUChangeTextW(popupHwnd, TranslateT("Loading history completed.")); else if (ServiceExists(MS_POPUP_ADDPOPUPW)) { pd.iSeconds = 5; - wcsncpy(pd.lptzText, TranslateT("Loading history completed."), MAX_SECONDLINE); + wcsncpy(pd.lpwzText, TranslateT("Loading history completed."), MAX_SECONDLINE); popupHwnd = (HWND)CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pd, (LPARAM)0); } } diff --git a/protocols/ICQ-WIM/src/main.cpp b/protocols/ICQ-WIM/src/main.cpp index aaaacf0ea3..21232e7d25 100644 --- a/protocols/ICQ-WIM/src/main.cpp +++ b/protocols/ICQ-WIM/src/main.cpp @@ -96,7 +96,7 @@ static INT_PTR ICQPermitDeny(WPARAM hContact, LPARAM, LPARAM bAllow) static int ModuleLoad(WPARAM, LPARAM) { g_bSecureIM = ServiceExists("SecureIM/IsContactSecured"); - g_bPopupService = ServiceExists(MS_POPUP_ADDPOPUPT); + g_bPopupService = ServiceExists(MS_POPUP_ADDPOPUPW); g_bMessageState = ServiceExists(MS_MESSAGESTATE_UPDATE); return 0; } diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index cc3cb81027..25d34b5e8d 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -224,15 +224,15 @@ void CIcqProto::ProcessNotification(const JSONNode &ev) CMStringW wszSubj((*root)["subject"].as_mstring()); m_unreadEmails = (*root)["unreadCount"].as_int(); - POPUPDATAT Popup = {}; - mir_snwprintf(Popup.lptzText, LPGENW("You received e-mail from %s: %s"), wszFrom.c_str(), wszSubj.c_str()); + POPUPDATAW Popup = {}; + mir_snwprintf(Popup.lpwzText, LPGENW("You received e-mail from %s: %s"), wszFrom.c_str(), wszSubj.c_str()); Popup.lchIcon = IcoLib_GetIconByHandle(iconList[1].hIcolib); if (g_bPopupService) { - wcsncpy_s(Popup.lptzContactName, m_tszUserName, _TRUNCATE); - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&Popup, 0); + wcsncpy_s(Popup.lpwzContactName, m_tszUserName, _TRUNCATE); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&Popup, 0); } - EmailNotification(Popup.lptzText); + EmailNotification(Popup.lpwzText); } const JSONNode &status = fld["mailbox.status"]; diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index d4d8ea7d1d..b587c1976f 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -196,6 +196,7 @@ INT_PTR CIcqProto::GetEmailCount(WPARAM, LPARAM) INT_PTR CIcqProto::GotoInbox(WPARAM, LPARAM) { + Utils_OpenUrl("https://e.mail.ru/messages/inbox"); return 0; } diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 6567e8a390..f33d22eb1d 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -127,26 +127,26 @@ void CIcqProto::ConnectionFailed(int iReason, int iErrorCode) debugLogA("ConnectionFailed -> reason %d", iReason); if (g_bPopupService) { - POPUPDATAT Popup = {}; + POPUPDATAW Popup = {}; Popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true); - wcscpy_s(Popup.lptzContactName, m_tszUserName); + wcscpy_s(Popup.lpwzContactName, m_tszUserName); switch (iReason) { case LOGINERR_BADUSERID: - mir_snwprintf(Popup.lptzText, LPGENW("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); + mir_snwprintf(Popup.lpwzText, LPGENW("You have not entered an ICQ number.\nConfigure this in Options -> Network -> ICQ and try again.")); break; case LOGINERR_WRONGPASSWORD: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nYour ICQ number or password was rejected (%d)."), iErrorCode); break; case LOGINERR_NONETWORK: case LOGINERR_NOSERVER: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nThe server is temporarily unavailable (%d)."), iErrorCode); break; default: - mir_snwprintf(Popup.lptzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); + mir_snwprintf(Popup.lpwzText, LPGENW("Connection failed.\nUnknown error during sign on: %d"), iErrorCode); break; } - CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&Popup, 0); + CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&Popup, 0); } ProtoBroadcastAck(0, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, iReason); diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index aec8816c18..505a4d6538 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -160,7 +160,7 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA } - if (!ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW)) { HWND hw = GetDlgItem(hwndDlg, IDC_RAD_ERRPOP); EnableWindow(hw, FALSE); } diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index bdc714877f..3ddab742f8 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -51,15 +51,15 @@ void CSteamProto::ShowNotification(const wchar_t *caption, const wchar_t *messag if (Miranda_IsTerminated()) return; - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { - POPUPDATAT ppd = { 0 }; + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); ppd.lchIcon = IcoLib_GetIcon(MODULE"_main"); - if (!PUAddPopupT(&ppd)) + if (!PUAddPopupW(&ppd)) return; } diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 8e80c3bda9..3a80c48044 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -104,14 +104,14 @@ void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, return; } - if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { - POPUPDATAT ppd = { 0 }; + if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1)) { + POPUPDATAW ppd = { 0 }; ppd.lchContact = hContact; wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); ppd.lchIcon = IcoLib_GetIcon("Tox_main"); - if (!PUAddPopupT(&ppd)) + if (!PUAddPopupW(&ppd)) return; } diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 901f6994ca..195fca892f 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -484,11 +484,11 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, const std::string *url) { - if (!ServiceExists(MS_POPUP_ADDPOPUPT) || getByte(TWITTER_KEY_POPUP_SHOW) == 0) { + if (!ServiceExists(MS_POPUP_ADDPOPUPW) || getByte(TWITTER_KEY_POPUP_SHOW) == 0) { return; } - POPUPDATAT popup = {}; + POPUPDATAW popup = {}; popup.lchContact = hContact; popup.iSeconds = getDword(TWITTER_KEY_POPUP_TIMEOUT); @@ -501,7 +501,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, DBVARIANT dbv; if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !getWString(hContact, TWITTER_KEY_UN, &dbv)) { - wcsncpy(popup.lptzContactName, dbv.pwszVal, MAX_CONTACTNAME); + wcsncpy(popup.lpwzContactName, dbv.pwszVal, MAX_CONTACTNAME); db_free(&dbv); } @@ -510,8 +510,8 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, popup.PluginData = (void *)url; } - mbcs_to_tcs(CP_UTF8, text.c_str(), popup.lptzText, MAX_SECONDLINE); - PUAddPopupT(&popup); + mbcs_to_tcs(CP_UTF8, text.c_str(), popup.lpwzText, MAX_SECONDLINE); + PUAddPopupW(&popup); } void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg) diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 7ad53590e0..2664441c12 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -279,7 +279,7 @@ int TwitterProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.pfnDlgProc = options_proc; g_plugin.addOptions(wParam, &odp); - if (ServiceExists(MS_POPUP_ADDPOPUPT)) { + if (ServiceExists(MS_POPUP_ADDPOPUPW)) { odp.szTab.w = LPGENW("Popups"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS); odp.pfnDlgProc = popup_options_proc; @@ -335,9 +335,9 @@ int TwitterProto::ShowPinDialog() void TwitterProto::ShowPopup(const wchar_t *text, int Error) { - POPUPDATAT popup = {}; - mir_snwprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName); - wcsncpy_s(popup.lptzText, text, _TRUNCATE); + POPUPDATAW popup = {}; + mir_snwprintf(popup.lpwzContactName, TranslateT("%s Protocol"), m_tszUserName); + wcsncpy_s(popup.lpwzText, text, _TRUNCATE); if (Error) { popup.iSeconds = -1; @@ -345,27 +345,27 @@ void TwitterProto::ShowPopup(const wchar_t *text, int Error) popup.colorText = 0x00FFFFFF; } - if (ServiceExists(MS_POPUP_ADDPOPUPT)) - PUAddPopupT(&popup); + if (ServiceExists(MS_POPUP_ADDPOPUPW)) + PUAddPopupW(&popup); else - MessageBox(nullptr, popup.lptzText, popup.lptzContactName, 0); + MessageBox(nullptr, popup.lpwzText, popup.lpwzContactName, 0); } void TwitterProto::ShowPopup(const char *text, int Error) { - POPUPDATAT popup = {}; - mir_snwprintf(popup.lptzContactName, TranslateT("%s Protocol"), m_tszUserName); - mbcs_to_tcs(CP_UTF8, text, popup.lptzText, _countof(popup.lptzText)); + POPUPDATAW popup = {}; + mir_snwprintf(popup.lpwzContactName, TranslateT("%s Protocol"), m_tszUserName); + mbcs_to_tcs(CP_UTF8, text, popup.lpwzText, _countof(popup.lpwzText)); if (Error) { popup.iSeconds = -1; popup.colorBack = 0x000000FF; popup.colorText = 0x00FFFFFF; } - if (ServiceExists(MS_POPUP_ADDPOPUPT)) - PUAddPopupT(&popup); + if (ServiceExists(MS_POPUP_ADDPOPUPW)) + PUAddPopupW(&popup); else - MessageBox(nullptr, popup.lptzText, popup.lptzContactName, 0); + MessageBox(nullptr, popup.lpwzText, popup.lpwzContactName, 0); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index 65fde0c17c..c4d4e50a39 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -314,7 +314,7 @@ namespace popup_options static void preview(HWND hwndDlg) { - POPUPDATAT popup = {}; + POPUPDATAW popup = {}; // Pick a random contact MCONTACT hContact = 0; @@ -328,15 +328,15 @@ namespace popup_options // Pick a random quote int q = rand() % _countof(quotes); - wcsncpy(popup.lptzContactName, quotes[q].name, MAX_CONTACTNAME); - wcsncpy(popup.lptzText, quotes[q].text, MAX_SECONDLINE); + wcsncpy(popup.lpwzContactName, quotes[q].name, MAX_CONTACTNAME); + wcsncpy(popup.lpwzText, quotes[q].text, MAX_SECONDLINE); popup.lchContact = hContact; popup.iSeconds = get_timeout(hwndDlg); popup.colorText = get_text_color(hwndDlg, false); popup.colorBack = get_back_color(hwndDlg, false); - PUAddPopupT(&popup); + PUAddPopupW(&popup); } } diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 7ce4349f38..5f01aa640c 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -224,7 +224,7 @@ static void ShowRoom(SESSION_INFO *si) int OnCheckPlugins(WPARAM, LPARAM) { g_dat.bSmileyInstalled = ServiceExists(MS_SMILEYADD_REPLACESMILEYS); - g_dat.bPopupInstalled = ServiceExists(MS_POPUP_ADDPOPUPT); + g_dat.bPopupInstalled = ServiceExists(MS_POPUP_ADDPOPUPW); return 0; } diff --git a/src/core/stdssl/src/netlibssl.cpp b/src/core/stdssl/src/netlibssl.cpp index 5b070ce28f..9ce246b08b 100644 --- a/src/core/stdssl/src/netlibssl.cpp +++ b/src/core/stdssl/src/netlibssl.cpp @@ -87,7 +87,7 @@ static void ReportSslError(SECURITY_STATUS scRet, int line, bool = false) mir_free(szMsg); SetLastError(scRet); - PUShowMessageT(szMsgBuf2, SM_WARNING); + PUShowMessageW(szMsgBuf2, SM_WARNING); } static bool AcquireCredentials(void) diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index 51f1317b54..12e33f87eb 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -175,7 +175,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa mir_vsnwprintf(szBuf, 4096, fmt, marker); va_end(marker); - POPUPDATAT pd = { 0 }; + POPUPDATAW pd = { 0 }; pd.lchContact = hContact; if (hIcon) @@ -184,8 +184,8 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa pd.lchIcon = LoadIconEx("window", FALSE); PROTOACCOUNT *pa = Proto_GetAccount(pszProtoName); - mir_snwprintf(pd.lptzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact)); - mir_wstrncpy(pd.lptzText, TranslateW(szBuf), _countof(pd.lptzText)); + mir_snwprintf(pd.lpwzContactName, L"%s - %s", (pa == nullptr) ? _A2T(pszProtoName) : pa->tszAccountName, Clist_GetContactDisplayName(hContact)); + mir_wstrncpy(pd.lpwzText, TranslateW(szBuf), _countof(pd.lpwzText)); pd.iSeconds = g_Settings->iPopupTimeout; if (g_Settings->iPopupStyle == 2) { @@ -203,7 +203,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char *pszProtoNa pd.PluginWindowProc = PopupDlgProc; pd.PluginData = si; - return PUAddPopupT(&pd); + return PUAddPopupW(&pd); } BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) -- cgit v1.2.3