GNOME Bugzilla – Bug 792777
g_notification_set_urgent() unconditionally sets G_NOTIFICATION_PRIORITY_URGENT, ignores parameter
Last modified: 2018-01-23 14:24:59 UTC
After g_notification_set_urgent(…, FALSE), the expectation is not that the notification is urgent.
g_notification_set_urgent() has been deprecated in favour of g_notification_set_priority() since GLib 2.41.2. Use that instead. I’ll push a commit to make the deprecation notice more obvious.
Fully aware of the deprecated notice. Rather than than rushing to absolve oneself of all responsibility, please would you document the failing and resolve as WONTFIX.
(In reply to Matthew W. S. Bell from comment #2) > Fully aware of the deprecated notice. Rather than than rushing to absolve > oneself of all responsibility, please would you document the failing and > resolve as WONTFIX. commit 01098e34c188b4ec93944e14dbece6818d786aec Author: Lars Uebernickel <lars.uebernickel@canonical.com> Date: Sun Jun 15 15:42:31 2014 +0200 Not sure where you're seeing a rush there. Been broken in the same way for 3 1/2 years.
Created attachment 367292 [details] [review] GNotification: Don't ignore set_urgent()'s argument set_urgent() would behave is if @urgent was always true. The regression was introduced in commit 01098e34c188b4ec93944e14dbece6818d786aec
Review of attachment 367292 [details] [review]: ::: gio/gnotification.c @@ +323,3 @@ + notification->priority |= G_NOTIFICATION_PRIORITY_URGENT; + else + notification->priority &= ~G_NOTIFICATION_PRIORITY_URGENT; priority is an enum, not a bit mask. If (!urgent), the best we can do is set it to G_NOTIFICATION_PRIORITY_NORMAL.
(In reply to Matthew W. S. Bell from comment #2) > Fully aware of the deprecated notice. Rather than than rushing to absolve > oneself of all responsibility, please would you document the failing and > resolve as WONTFIX. The deprecation is documented, and the particular way the bug is resolved does not really matter. I rush because 10 bugs come in per day and this one is really not important.
Created attachment 367293 [details] [review] GNotification: Don't ignore set_urgent()'s argument set_urgent() would behave is if @urgent was always true. The regression was introduced in commit 01098e34c188b4ec93944e14dbece6818d786aec
Review of attachment 367293 [details] [review]: Sure, thanks.
Pushed to master. Thanks Bastien! Attachment 367293 [details] pushed as 801accf - GNotification: Don't ignore set_urgent()'s argument