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/CmdLine/src/mimcmd_handlers.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/CmdLine/src') diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index eafd2961f3..3ac2a26b0a 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -386,29 +386,29 @@ void Set2StateReply(PReply reply, int state, int failure, wchar_t *successTrue, void HandlePopupsCommand(PCommand command, TArgument *argv, int argc, PReply reply) { - int state, failure; + int state, failure = 0; switch (argc) { case 2: - state = CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0); + state = Popup_Enabled(); Set2StateReply(reply, state, 0, LPGENW("Popups are currently enabled."), L"", LPGENW("Popups are currently disabled."), L""); break; case 3: switch (Get2StateValue(argv[2])) { case STATE_ON: - failure = CallService(MS_POPUP_QUERY, PUQS_ENABLEPOPUPS, 0); + Popup_Enable(true); state = TRUE; break; case STATE_OFF: - failure = CallService(MS_POPUP_QUERY, PUQS_DISABLEPOPUPS, 0); + Popup_Enable(false); state = FALSE; break; case STATE_TOGGLE: - state = CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0); - failure = CallService(MS_POPUP_QUERY, (state) ? PUQS_DISABLEPOPUPS : PUQS_ENABLEPOPUPS, 0); + state = Popup_Enabled(); + Popup_Enable(!state); state = !state; break; -- cgit v1.2.3