GNOME Bugzilla – Bug 763129
application: handle notifications internally
Last modified: 2016-03-07 20:11:37 UTC
See patch.
Created attachment 323142 [details] [review] application: handle notifications internally In Nautilus, operations such as unmounts create notifications that are not withdrawn on application closing. This leads to issues such as notifications that persist even after reboot. In order to fix this, the application should keep track of the notifications sent in order to withdraw them when it is closed. Add helper functions for sending and withdrawing notifications. Add "shutdown" signal handler for removing notifications on application closing.
Created attachment 323143 [details] [review] window, progress-persistence-handler: change notifications API In Nautilus, notifications are sent using GApplication functions and are not tracked. This leads to notifications that are not being cleared when Nautilus is closed. In order to fix this, sending and withdrawing notifications should be done with the methods of NautilusApplication. These methods automatically track and clear them when the application is shutdown. Replace GApplication functions for sending and withdrawing notifications with corresponding NautilusApplication functions.
Review of attachment 323142 [details] [review]: right
Review of attachment 323143 [details] [review]: I'm going to pus this patch with the issue below fixed, since I want to do a release with this in. Thanks for these patches! ::: src/nautilus-progress-persistence-handler.c @@ -204,3 @@ - g_application_send_notification (g_application_get_default (), - "transfer-complete", - complete_notification); these id are notunique. You can have multple notifications here. This needs something similar to what we do in the window.
Review of attachment 323143 [details] [review]: we actually don't have multiple instances of this kind of notification, since we only use it when all the progress are done. So this patch is good!
Attachment 323142 [details] pushed as 1ba5e62 - application: handle notifications internally Attachment 323143 [details] pushed as 075e9c1 - window, progress-persistence-handler: change notifications API