diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-30 18:15:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-30 18:15:50 +0300 |
commit | 1a4f30d78b1986f3f79558de725c8f34dae3ee75 (patch) | |
tree | 5f945598e45365b42a9c1820f8949a72e2f0d6c7 /plugins/WhenWasIt/src/hooked_events.cpp | |
parent | f1c1e760bed3593799a48e0b2ca12b5cbed3ba47 (diff) |
WhenWasIt: all dialogs -> UI classes
Diffstat (limited to 'plugins/WhenWasIt/src/hooked_events.cpp')
-rw-r--r-- | plugins/WhenWasIt/src/hooked_events.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 71d19ec82f..789b36a4cc 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -28,6 +28,7 @@ UINT_PTR hCheckTimer = NULL; UINT_PTR hDateChangeTimer = NULL;
static int currentDay = 0;
+void CloseUpcoming();
static int OnTopToolBarModuleLoaded(WPARAM, LPARAM)
{
@@ -49,7 +50,19 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
-int OnModulesLoaded(WPARAM, LPARAM)
+static int OnShutdown(WPARAM, LPARAM)
+{
+ if (hBirthdaysDlg)
+ SendMessage(hBirthdaysDlg, WM_CLOSE, 0, 0);
+
+ CloseUpcoming();
+
+ WindowList_Broadcast(hAddBirthdayWndsList, WM_CLOSE, 0, 0);
+ WindowList_Destroy(hAddBirthdayWndsList);
+ return 0;
+}
+
+static int OnModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_TTB_MODULELOADED, OnTopToolBarModuleLoaded);
@@ -60,6 +73,7 @@ int OnModulesLoaded(WPARAM, LPARAM) int HookEvents()
{
+ HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
return 0;
|