diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-28 11:32:10 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-08-28 11:32:10 +0000 |
commit | 4402f6924f14847c1570b22ef06ba54125a9c41c (patch) | |
tree | b474f5c3ef8660c0919474eb8c6e4a4dc15bb0a0 /plugins/Toaster/src/main.cpp | |
parent | f056d6596882aa7cfecc21a61e8ef48f2b514460 (diff) |
Toaster: hiding toasts
git-svn-id: http://svn.miranda-ng.org/main/trunk@15053 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/main.cpp')
-rw-r--r-- | plugins/Toaster/src/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 6ce8fd69af..4f3515ffdf 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -39,7 +39,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
-
+ HookEvent(ME_SYSTEM_SHUTDOWN, &OnPreShutdown);
InitServices();
return 0;
@@ -49,3 +49,14 @@ extern "C" int __declspec(dllexport) Unload(void) {
return 0;
}
+
+int OnPreShutdown(WPARAM, LPARAM)
+{
+ mir_cslock lck(csNotifications);
+ for (int i = 0; i < lstNotifications.getCount(); i++)
+ lstNotifications[0].Hide();
+
+ lstNotifications.destroy();
+
+ return 0;
+}
\ No newline at end of file |