mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-27 10:44:21 +08:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user