[Notifications KCM] Show hint if notifications aren't available or provided by someone else
ClosedPublic

Authored by broulik on Oct 31 2019, 4:48 PM.

Details

Summary

I've seen people complaining about ugly notification popups when they were in fact running Dunst instead of Plasma.
Since the KCM won't work with notifications other than Plasma's, this patch adds a hint informing the user when there is no notification widget or notifications are provided by another service than Plasma.
Notification API provides a way to query server identity which is used to determine if it's Plasma or not. The process name isn't used as you could have a notifications widget in e.g. Latte Dock.

Depends on D25772

Test Plan

Actually the notification service isn't running/registered but from a user's POV they might just not have a notification widget.


Service owned by someone else

The KCM watches the services so the info message updates live if you restart plasma or whatever.
Perhaps I should also make the notification widget aware of the fact that the service isn't registered and then show a crossed out notification icon, or even a "try again" button.

Suggestions on wording welcome, of course.

Current iteration with controls disabled:

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Oct 31 2019, 4:48 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 31 2019, 4:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Oct 31 2019, 4:48 PM
broulik edited the test plan for this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)Oct 31 2019, 4:51 PM

+1 conceptually. Would it makes sense to also disable all the controls in the KCM when either of these messages are open?

kcms/notifications/package/contents/ui/main.qml
61

Maybe connect this with the reason why one the widget is needed:

"Could not find a 'Notifications' widget which is required for displaying notifications."

Would it makes sense to also disable all the controls in the KCM when either of these messages are open?

I was wondering that, too, but not sure I want to artificially block those settings. Perhaps for the upper check boxes. Progress reporting is unaffected and KNotification settings would still work.

If there are any settings that have no effect while something else is handling notifications or there's no widget, I think it makes sense to disable those. Other settings that are more universal can stay enabled for sure.

broulik planned changes to this revision.Oct 31 2019, 9:39 PM

Alright, will disable those

I think it might make sense to move that to libnotification Server so the applet can get the same information without duplicating code there.

broulik updated this revision to Diff 70981.Dec 5 2019, 8:38 PM
  • Use NotificationManager.ServerInfo from D25772
broulik updated this revision to Diff 71137.Dec 9 2019, 7:48 PM
broulik edited the test plan for this revision. (Show Details)
  • Disable controls which won't affect other notification services - Job tracking is independent of notification service
ngraham accepted this revision as: VDG.Dec 9 2019, 8:56 PM
davidedmundson accepted this revision.Dec 12 2019, 5:49 PM
This revision is now accepted and ready to land.Dec 12 2019, 5:49 PM
This revision was automatically updated to reflect the committed changes.