Implement wxNotificationMessage using libnotify in wxGTK.
Use libnotify -- if detected by configure -- to provide native notifications in wxGTK. Our API maps to libnotify one in rather straightforward way, we might consider extending it to cover more of libnotify functionality (categories, user-defined icons and, especially, actions) later. Also update the dialogs sample to show another kind of notification and the documentation to clarify the behaviour of various methods. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1747,6 +1747,9 @@ void MyFrame::OnRequestUserAttention(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MyFrame::OnNotifMsgAuto(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// Notice that the notification remains shown even after the
|
||||
// wxNotificationMessage object itself is destroyed so we can show simple
|
||||
// notifications using temporary objects.
|
||||
if ( !wxNotificationMessage
|
||||
(
|
||||
"Automatic Notification",
|
||||
@@ -1756,6 +1759,11 @@ void MyFrame::OnNotifMsgAuto(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxLogStatus("Failed to show notification message");
|
||||
}
|
||||
|
||||
// But it doesn't have to be a temporary, of course.
|
||||
wxNotificationMessage n("Dummy Warning", "Example of a warning notification.");
|
||||
n.SetFlags(wxICON_ERROR);
|
||||
n.Show(5); // Just for testing, use 5 second delay.
|
||||
}
|
||||
|
||||
void MyFrame::OnNotifMsgShow(wxCommandEvent& WXUNUSED(event))
|
||||
|
Reference in New Issue
Block a user