[Notifications] Introduce "settings" action

Authored by broulik on Apr 13 2017, 10:09 AM.



We've been having the configure button on notifications for a long time but so far it would only ever invoke KNotification configuration UI with no way for an application to provide its own, more versatile or extensive, UI.

When an action named "settings" is present in the notification the "configure" button will instead invoke this action.

Test Plan


After: (don't mind the changed text, I wanted to text how Chrome handles line breaks in its notifications)

Yes, this seems proprietary to Chrome which sends this along for its soon-to-be-released native notifications (above screenshot is from Chrome 59 with native notifications flag enabled) *but* I have wanted to have something like this for a long time and it's a good opportunity to introduce a de-facto standard for that now. I'll look into adding support for that in KNotifications, similar to the default action that was recently added.

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Apr 13 2017, 10:09 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 13 2017, 10:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
markg accepted this revision.Apr 15 2017, 11:29 AM
markg added a subscriber: markg.

Imho, it looks a lot better! Nice job!
Don't push it just yet though. Wait for the VDG to chime in.

This revision is now accepted and ready to land.Apr 15 2017, 11:29 AM
mck182 added a subscriber: mck182.Apr 15 2017, 8:15 PM

While I like this, I wonder - for apps that will send "settings"
action there will now be no way to access the KNotification
settings, right (from the notification itself)? As in, the app can
use the "settings" action for an entirely different thing, thus
blocking the standard config UI, maybe?

if you use KNotifications you cannot influence the name of the action anyway, it's just Action %1

mck182 accepted this revision.Apr 15 2017, 8:54 PM

Ah, I see. Good to go then, unless you want to wait for VDG input.

look good to me +1

thanks for the improvement

I like the change, the text button was too striking. the icon is much better

This revision was automatically updated to reflect the committed changes.