GNOME Bugzilla – Bug 655818
notification-daemon: Add support for 'default' actions
Last modified: 2011-08-03 18:13:13 UTC
See attached patch. It doesn't appear that there are many applications using default actions at the moment (Evolution being the only prominent example), but in my opinion it's a useful mechanism to allow processes without windows (g-s-d comes to mind) to do something meaningful when their notifications are clicked (e.g. opening the related g-c-c panel, ...)
Created attachment 193077 [details] [review] notification-daemon: Add support for 'default' actions The notification spec supports the concept of a 'default' action: "The default action (usually invoked my clicking the notification) should have a key named "default". The name can be anything, though implementations are free not to display it." Support this by invoking the 'default' action rather than a emitting the 'clicked' signal when clicking notifications which specifie a default action. Also don't add an action button for the default action.
Comment on attachment 193077 [details] [review] notification-daemon: Add support for 'default' actions this should work, but I feel like it might be cleaner to do it all within notificationDaemon.js? Just connect to notification's 'clicked' signal there and call _emitActionInvoked?
Not immediately related, but shouldn't notifications have a close button so that you can dismiss them? If clicking on the notification's body invokes default action, how are we supposed to get rid of them?
Created attachment 193193 [details] [review] notification-daemon: Add support for 'default' actions (In reply to comment #2) > (From update of attachment 193077 [details] [review]) > this should work, but I feel like it might be cleaner to do it all within > notificationDaemon.js? Sure.
Attachment 193193 [details] pushed as ddd59f2 - notification-daemon: Add support for 'default' actions (In reply to comment #3) > Not immediately related, but shouldn't notifications have a close button so > that you can dismiss them? If clicking on the notification's body invokes > default action, how are we supposed to get rid of them? Clicking the notification body has never been a way to dismiss the notification, it will activate the application which emitted the notification (i.e. focus the most recently used window of that application). Some notifications don't have an associated application, so clicking the body apparently dismisses the notification - this inconsistency is pretty bad though. A close button on notifications has been discussed before, but wasn't really deemed necessary by the designers. Notifications can be removed from the summary using he right-click menu, maybe that is enough.