diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-09 19:28:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-09 19:28:03 +0300 |
commit | b08e4a9a301f9ae129ee320220e83bf9b14f6118 (patch) | |
tree | f34607fea0e292fab0deb75d3cc24be4452759d4 /plugins/NotesAndReminders/src/main.cpp | |
parent | 400034d289993400c7a301e42120f664effbe6e1 (diff) |
Notes & Reminders:
- fixes #2129 (Notes and Reminders: random crash);
- all list dialogs rewritten using UI classes;
- code cleaning;
- version bump
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();
|