elementary / notifications

Gtk Notifications Server
https://elementary.io
GNU General Public License v3.0
38 stars 6 forks source link

Notification: Use Right Values for Urgency Levels #189

Closed Marukesu closed 1 year ago

Marukesu commented 1 year ago

Urgency levels in the freedesktop specification and GLib.NotificationPriority values doesn't share the same values, this make the conversion between the two matches the conversion made by GLib before sending the notification.

Closes: #196 Closes: #86

zeebok commented 1 year ago

What happens if an app dev tries to send a High priority notification? Is it treated as a Normal priority notification?

Marukesu commented 1 year ago

Yes, the fdo spec has only low, normal and urgent priority. GLib (and the GTK portal) converts high to normal priority before sending the notification. So there won't be any change in the behaviour for developers.

tintou commented 1 year ago

We shouldn't align to the "fdo" spec as it is the legacy implementation, the one we want to align with is the GTK/Portal implementation

Marukesu commented 1 year ago

We shouldn't align to the "fdo" spec as it is the legacy implementation, the one we want to align with is the GTK/Portal implementation

We implement the org.freedesktop.Notifications interface, so we are already aligned to the fdo spec. This PR only correct a error in the codebase. there's only tree levels, LOW, NORMAL, and URGENT.

Using URGENT here is not only semantic correct, but allow us to have different behaviour for HIGH and URGENT notifications when/if we implement the Gtk/Portal interfaces in the future.