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/StartupSilence/src/main.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'plugins/StartupSilence') 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; } -- cgit v1.2.3