From 346ae348ae7ee5a594c9fcd17114ae949c1ce201 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Jun 2022 15:09:41 +0300 Subject: Popup+: fix for a madness with default popup class values --- plugins/Nudge/src/main.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 8dbf4c33a2..ee2ad72b2f 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -217,13 +217,11 @@ static int OnShutdown(WPARAM, LPARAM) void LoadPopupClass() { - POPUPCLASS ppc = { sizeof(ppc) }; + POPUPCLASS ppc = {}; + ppc.flags = PCF_UNICODE; ppc.pszName = "Nudge"; - ppc.pszDescription.a = LPGEN("Show Nudge"); + ppc.pszDescription.w = TranslateT("Show Nudge"); ppc.hIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib); - ppc.colorBack = NULL; - ppc.colorText = NULL; - ppc.iSeconds = 0; ppc.PluginWindowProc = NudgePopupProc; if (hPopupClass = Popup_RegisterClass(&ppc)) HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); @@ -272,8 +270,7 @@ void Nudge_ShowPopup(CNudgeElement*, MCONTACT hContact, wchar_t * Message) hContact = db_mc_tryMeta(hContact); wchar_t *lpzContactName = Clist_GetContactDisplayName(hContact); - POPUPDATACLASS NudgePopup = { 0 }; - NudgePopup.cbSize = sizeof(NudgePopup); + POPUPDATACLASS NudgePopup = {}; NudgePopup.hContact = hContact; NudgePopup.szText.w = Message; NudgePopup.szTitle.w = lpzContactName; -- cgit v1.2.3