Investigate KMessageBoxNotifyInterface
Open, Needs TriagePublic

Description

There is a whole plugin system inside KWidgetAddons that defines plugins for adding notification capability to KMessageBox. The only implementation appears to be in frameworkintegration.

Usually apps should use KNotifications directly for creating popups, even more given that we will reduce the dependencies further.

The main use case for this seems to be creating sound for the KMessageBox popups by (ab)using KNotifications. This is troublesome since we talked about removing sound capabilities from KNotifications

nicolasfella moved this task from Backlog to Needs Input on the KF6 board.

This is also the main user of the taskbar notify capabilities of KNotification. KMessageBoxes are typically a result of direct user interaction so taskbar notification neither is needed nor does it work (the entry is only marked when the window does not have focus). T12531 discusses the removal of taskbar notifications

Where is removing sound capabilities from KNotifications discussed? That would be a loss, as one does not always stare at the screen, but also walks around (think lab) and would like some audio options to be notified about certain things one set as important to get back to the device.
Not knowning the discussion I might misunderstand something, so please point me to that place :) Actually, given mobile phones also happily make use of sound to notify (given they share the same fate of not always being looked at), I expect to get this wrong ;) But just in case...

It was mostly discussed at Akademy (can't find the notes right now). The idea is to move the sound into the notification server, so e.g. Plasma handles it. This matches better what we do on the other platforms (windows, android, mac), gives us sound for non-KNotifications apps and makes KNotifications lighter dependency-wise.

That stuff is used also used so KMessageBox (tier 1) can play sounds through KNotification which it cannot depend on.

I think we're mixing up two concepts here. KMessageBox is (ab)using KNotification for playing sound, imho, and apps should still be able to do that outside of Plasma.
However, we ideally used the platform's sound feature for that (e.g. Windows has a standard sound function). I think message box sounds are orthogonal to KNotification. Not sure...

For the notification sound discussion see T12536

https://invent.kde.org/frameworks/frameworkintegration/-/merge_requests/5 changes the messagebox integration plugin to use Canberra directly without going via KNotifications

vkrause moved this task from Needs Input to Backlog on the KF6 board.May 8 2021, 1:26 PM

Conclusion from the weekly meeting:
Using Canberra in the implementation is the way to go.
This way we would lose the configurability provided by KNotifications, but that is virtually undiscoverable anyway
To keep this we want a KCM to select/edit the sound theme plus maybe an option to en/disable "Messageboxes have sound" in the "General Behavior" KCM