summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/services.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-30 10:31:02 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-30 10:31:02 +0000
commit10aaf104c7ad7f89fbc1a9eda713c99b21fdcfa2 (patch)
treef32fac989959bab724bacd6d437a838d0410661e /plugins/Toaster/src/services.cpp
parent5a18a53b28d4fa486069208d2f50a7216091e6e8 (diff)
Toaster: fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15115 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/services.cpp')
-rw-r--r--plugins/Toaster/src/services.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp
index a2747758e8..9c3d4b12bd 100644
--- a/plugins/Toaster/src/services.cpp
+++ b/plugins/Toaster/src/services.cpp
@@ -111,14 +111,7 @@ static 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);
-
- mir_cslock lck(csNotifications);
- while (lstNotifications.getCount())
- {
- lstNotifications[0].Hide();
- lstNotifications.remove(0);
- }
-
+ HideAllToasts();
return enabled;
}
break;
@@ -131,6 +124,16 @@ static INT_PTR PopupQuery(WPARAM wParam, LPARAM)
}
}
+void HideAllToasts()
+{
+ mir_cslock lck(csNotifications);
+ while (lstNotifications.getCount())
+ {
+ lstNotifications[0].Hide();
+ lstNotifications.remove(0);
+ }
+}
+
void InitServices()
{
CreateServiceFunction(MS_POPUP_ADDPOPUP, CreatePopup);