After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776043 - Notifications are not revoked by the application when focused (or on exit)
Notifications are not revoked by the application when focused (or on exit)
Status: RESOLVED FIXED
Product: gnome-clocks
Classification: Applications
Component: timer
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Clocks maintainer(s)
Clocks maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-12-13 16:26 UTC by Bastian Ilsø
Modified: 2017-02-01 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: Withdraw system notifications on exit (3.13 KB, patch)
2017-02-01 11:28 UTC, Felipe Borges
committed Details | Review
window: Withdraw notifications when the windows is focused (1.87 KB, patch)
2017-02-01 11:48 UTC, Felipe Borges
accepted-commit_now Details | Review
window: Withdraw notifications when the windows is focused (1.87 KB, patch)
2017-02-01 11:52 UTC, Felipe Borges
reviewed Details | Review
application: Withdraw notifications when the windows is focused (1.75 KB, patch)
2017-02-01 12:17 UTC, Felipe Borges
committed Details | Review

Description Bastian Ilsø 2016-12-13 16:26:17 UTC
To quote the HIG[1]:

"Notifications in GNOME 3 persist after they have been initially displayed. It is therefore important to remove notification messages that are no longer relevant to the user."

I don't think Clocks does this sufficiently. I would expect Clocks to remove its notifications when I exit it or has its window focused.

[1] https://developer.gnome.org/hig/stable/notifications.html.en
Comment 1 Felipe Borges 2017-02-01 11:28:46 UTC
Created attachment 344695 [details] [review]
application: Withdraw system notifications on exit

This patch keeps track of the system notifications as they appear
and withdraws them when the application quits.

The HIG[0] says that "Notifications in GNOME 3 persist after they
have been initially displayed. It is therefore important to remove
notification messages that are no longer relevant to the user."

[0] https://developer.gnome.org/hig/stable/notifications.html.en
Comment 2 Paolo Borelli 2017-02-01 11:43:48 UTC
Review of attachment 344695 [details] [review]:

Thanks! Just one minor nitpick to amend before pushing: please use curly brackets for the foreach even if it is a oneliner
Comment 3 Felipe Borges 2017-02-01 11:48:23 UTC
Created attachment 344700 [details] [review]
window: Withdraw notifications when the windows is focused

Clocks should dismiss (withdraw) its notifications when the windows
is focused.

The HIG[0] says that "Notifications in GNOME 3 persist after they
have been initially displayed. It is therefore important to remove
notification messages that are no longer relevant to the user."

[0] https://developer.gnome.org/hig/stable/notifications.html.en
Comment 4 Felipe Borges 2017-02-01 11:50:54 UTC
Comment on attachment 344695 [details] [review]
application: Withdraw system notifications on exit

Attachment 344695 [details] pushed as be09d98 - application: Withdraw system notifications on exit
Comment 5 Felipe Borges 2017-02-01 11:52:32 UTC
Created attachment 344701 [details] [review]
window: Withdraw notifications when the windows is focused

Clocks should dismiss (withdraw) its notifications when the windows
is focused.

The HIG[0] says that "Notifications in GNOME 3 persist after they
have been initially displayed. It is therefore important to remove
notification messages that are no longer relevant to the user."

[0] https://developer.gnome.org/hig/stable/notifications.html.en
Comment 6 Paolo Borelli 2017-02-01 11:52:59 UTC
Review of attachment 344700 [details] [review]:

Thank you!
Comment 7 Paolo Borelli 2017-02-01 11:55:19 UTC
Review of attachment 344701 [details] [review]:

Actually now that I look more closely maybe it is cleaner to connect to the windows signal and keep the withdraw method private
Comment 8 Felipe Borges 2017-02-01 12:17:08 UTC
Created attachment 344704 [details] [review]
application: Withdraw notifications when the windows is focused

Clocks should dismiss (withdraw) its notifications when the windows
is focused.

The HIG[0] says that "Notifications in GNOME 3 persist after they
have been initially displayed. It is therefore important to remove
notification messages that are no longer relevant to the user."

[0] https://developer.gnome.org/hig/stable/notifications.html.en
Comment 9 Paolo Borelli 2017-02-01 12:40:40 UTC
Review of attachment 344704 [details] [review]:

Looks good
Comment 10 Felipe Borges 2017-02-01 13:00:14 UTC
Thank you!

Attachment 344704 [details] pushed as b848116 - application: Withdraw notifications when the windows is focused