Expose reason for notification dismissal through SetInt()

On all platforms, except macOS, the reason why a notification was
dismissed is known. Specifically, it can be useful to distinguish whether
the notification closed because of a timeout, or a click by the user.
This commit is contained in:
Lauri Nurmi
2024-03-20 22:45:56 +02:00
parent 75c552811f
commit 8b26611c64
8 changed files with 74 additions and 5 deletions
+2 -1
View File
@@ -2782,7 +2782,8 @@ private:
void OnNotificationDismissed(wxCommandEvent& event)
{
ShowStatus("Notification was dismissed");
// See wxNotificationMessage::DismissalReason for reason explanations.
ShowStatus(wxString::Format("Notification was dismissed (reason: %d)", event.GetInt()));
Raise();