diff options
Diffstat (limited to 'plugins/Toaster/src/services.cpp')
-rw-r--r-- | plugins/Toaster/src/services.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp index b75719acb3..7f2ce75ab7 100644 --- a/plugins/Toaster/src/services.cpp +++ b/plugins/Toaster/src/services.cpp @@ -1,7 +1,5 @@ #include "stdafx.h"
-mir_cs csNotifications;
-OBJLIST<ToastNotification> lstNotifications(2, PtrKeySortT);
std::map<std::string, ClassData*> mp_Classes;
wchar_t wszTempDir[MAX_PATH];
@@ -182,20 +180,11 @@ static INT_PTR ShowMessage(WPARAM wParam, LPARAM lParam) static INT_PTR HideToast(WPARAM, LPARAM lParam)
{
- ToastNotification *pNotification = reinterpret_cast<ToastNotification *>(lParam);
- mir_cslock lck(csNotifications);
- if (lstNotifications.getIndex(pNotification) != -1)
- lstNotifications.remove(pNotification);
+ auto *pNotification = (ToastNotification*)lParam;
+ pNotification->Destroy();
return 0;
}
-void HideAllToasts()
-{
- mir_cslock lck(csNotifications);
- while (lstNotifications.getCount())
- lstNotifications.remove(0);
-}
-
void InitServices()
{
CreateServiceFunction(MS_POPUP_SHOWMESSAGE, ShowMessage);
|