diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-06 16:15:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-06 16:15:55 +0300 |
commit | f580be3d9dcccb14831d6bed9e7dfca600f5b6f8 (patch) | |
tree | 468913d477b9d2a9fb430df9a886d24a8cf41887 /plugins/CmdLine/src/mimcmd_handlers.cpp | |
parent | 827dbce0a554ccc313fd0b14b45bd57dffeead95 (diff) |
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;
Diffstat (limited to 'plugins/CmdLine/src/mimcmd_handlers.cpp')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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;
|