GNOME Bugzilla – Bug 630939
Don't automatically show the summary when an icon gets removed from it
Last modified: 2010-10-05 20:23:50 UTC
Don't show the summary if its content changes while the message tray is not in use (e.g. because the user focused on the window which caused the icon for that window to be removed from the message tray).
We actually never want to show the summary automatically when an icon got removed from it. We only want to show summary automatically when an item got added to it because a) some notification was shown that resulted in a new icon landing in the summary b) a new tray icon was added.
Created attachment 171360 [details] [review] messageTray: Do not show the summary when removing a source Having the summary pop up automatically after a source icon has been removed is pretty useless ("Hey, there was something interesting going on, but you missed it and it's gone now, kthxbye").
Attachment 171360 [details] pushed as 109de6a - messageTray: Do not show the summary when removing a source
Created attachment 171454 [details] [review] Don't show the summary if a new item got removed before we had a chance to show it It's possible that an item that was added to the summary got removed before we had a chance to show the summary because the user has interacted with the notification (e.g. clicked on an application ready notification). We should not be showing the summary with an unchanged set of items in this case. However, it is possible that multiple items were added to the summary before we had a chance to show the summary, and only some of them got removed. In view of this scenario, we can't just use a boolean flag to indicate if the summary needs to be shown, but have to maintain an array of new summary items instead.
Review of attachment 171454 [details] [review]: Works as expected and looks reasonable - I had been wondering whether adding a flag to summary items (hasBeenShown) and using an integer count for newSummaryItems would have been nicer, but probably not ...