From 0603b6d7050a237f899d29f5557e3682447dd811 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 2 Oct 2015 19:03:04 +0000 Subject: popup hiding moved in plugin git-svn-id: http://svn.miranda-ng.org/main/trunk@15498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAPP/src/services.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'plugins/YAPP/src/services.cpp') diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index bcee759527..88f6a65cfe 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -214,6 +214,7 @@ INT_PTR PopupQuery(WPARAM wParam, LPARAM) { bool enabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0; if (!enabled) db_set_b(0, "Popup", "ModuleIsEnabled", 1); + UpdateMenu(); return !enabled; } break; @@ -221,18 +222,17 @@ INT_PTR PopupQuery(WPARAM wParam, LPARAM) { bool enabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0; if (enabled) db_set_b(0, "Popup", "ModuleIsEnabled", 0); + UpdateMenu(); return enabled; } break; case PUQS_GETSTATUS: return db_get_b(0, "Popup", "ModuleIsEnabled", 1); - default: + UpdateMenu(); return 1; } - UpdateMenu(); - return 0; } static INT_PTR TogglePopups(WPARAM, LPARAM) @@ -410,6 +410,11 @@ static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam) return 0; } +INT_PTR Popup_DeletePopup(WPARAM, LPARAM lParam) +{ + return (INT_PTR)SendMessage((HWND)lParam, UM_DESTROYPOPUP, 0, 0); +} + ////////////////////////////////////////////////////////////////////////////// void InitServices() @@ -429,10 +434,12 @@ void InitServices() CreateServiceFunction(MS_POPUP_QUERY, PopupQuery); CreateServiceFunction(MS_POPUP_SHOWMESSAGE, ShowMessage); - CreateServiceFunction(MS_POPUP_SHOWMESSAGE"W", ShowMessageW); + CreateServiceFunction(MS_POPUP_SHOWMESSAGEW, ShowMessageW); CreateServiceFunction(MS_POPUP_SHOWHISTORY, Popup_ShowHistory); CreateServiceFunction("Popup/EnableDisableMenuCommand", TogglePopups); + + CreateServiceFunction(MS_POPUP_DESTROYPOPUP, Popup_DeletePopup); } void DeinitServices() -- cgit v1.2.3