diff options
Diffstat (limited to 'plugins/YAPP/src/services.cpp')
-rw-r--r-- | plugins/YAPP/src/services.cpp | 15 |
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()
|