summaryrefslogtreecommitdiff
path: root/plugins/YAPP/src/services.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 19:03:04 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-10-02 19:03:04 +0000
commit0603b6d7050a237f899d29f5557e3682447dd811 (patch)
tree8a33d8a921edf866432f677ec6794f93300b6152 /plugins/YAPP/src/services.cpp
parent195e0f57ed995f77b5e7296708ecaab982533591 (diff)
popup hiding moved in plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@15498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP/src/services.cpp')
-rw-r--r--plugins/YAPP/src/services.cpp15
1 files changed, 11 insertions, 4 deletions
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()