diff options
Diffstat (limited to 'plugins/NotesAndReminders/src/main.cpp')
-rw-r--r-- | plugins/NotesAndReminders/src/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 857cd06334..f717e33e4d 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -80,7 +80,7 @@ static void addMenuItem(CMenuItem &mi) Menu_AddMainMenuItem(&mi);
}
-int OnModulesLoaded(WPARAM, LPARAM)
+static int OnModulesLoaded(WPARAM, LPARAM)
{
// register fonts and hotkeys
RegisterFontServiceFonts();
@@ -159,6 +159,13 @@ int OnModulesLoaded(WPARAM, LPARAM) return 0;
}
+static int OnPreShutdown(WPARAM, LPARAM)
+{
+ CloseNotesList();
+ CloseReminderList();
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
CMPlugin::CMPlugin() :
@@ -191,6 +198,7 @@ int CMPlugin::Load() g_plugin.addSound("AlertReminder3", LPGENW("Alerts"), LPGENW("Reminder triggered (Alternative 2)"));
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
InitIcons();
return 0;
@@ -200,8 +208,6 @@ int CMPlugin::Load() int CMPlugin::Unload()
{
- CloseNotesList();
- CloseReminderList();
SaveNotes();
SaveReminders();
DestroyMsgWindow();
|