From f580be3d9dcccb14831d6bed9e7dfca600f5b6f8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Mar 2019 16:15:45 +0300 Subject: popups: - internal implementation details & all service declarations moved to m_popup_int.h; - all service calls removed and replaced with function calls; - direct access to popup serttings replaced with Popup_Enable / Popup_Enabled; --- plugins/NewXstatusNotify/src/main.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'plugins/NewXstatusNotify') diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index cd52dde535..c2bfa62a6e 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -816,21 +816,15 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) BYTE hlpDisablePopup = g_plugin.getByte(szSetting, 0); if (hlpDisablePopup != opt.PopupAutoDisabled) { - BYTE hlpPopupStatus = (BYTE)CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0); + bool hlpPopupStatus = Popup_Enabled(); opt.PopupAutoDisabled = hlpDisablePopup; if (hlpDisablePopup) { g_plugin.setByte("OldPopupStatus", hlpPopupStatus); - CallService(MS_POPUP_QUERY, PUQS_DISABLEPOPUPS, 0); - } - else { - if (hlpPopupStatus == FALSE) { - if (g_plugin.getByte("OldPopupStatus", TRUE) == TRUE) - CallService(MS_POPUP_QUERY, PUQS_ENABLEPOPUPS, 0); - else - CallService(MS_POPUP_QUERY, PUQS_DISABLEPOPUPS, 0); - } + Popup_Enable(false); } + else if (!hlpPopupStatus) + Popup_Enable(g_plugin.getByte("OldPopupStatus", true)); } } -- cgit v1.2.3