From 423be683866fd8e305457eb725d8cdbe1f297fbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Feb 2019 12:43:20 +0300 Subject: popup code cleaning (cause we have no tchar.h) --- plugins/Weather/src/weather_opt.cpp | 2 +- plugins/Weather/src/weather_popup.cpp | 20 ++++++++++---------- plugins/Weather/src/weather_svcs.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/Weather/src') 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"); -- cgit v1.2.3