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

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

Details

Reviewers
None
Group Reviewers
Plasma
VDG
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.

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.

I am not sure if I should disable the entire KCM in this case. I hate how on Android you cannot change the Bluetooth device name when Bluetooth is disabled, so I don't really want to disable those options when the notification service isn't available.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Thu, Oct 31, 4:48 PM
Restricted Application added a project: Plasma. · View Herald TranscriptThu, Oct 31, 4:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Thu, Oct 31, 4:48 PM
broulik edited the test plan for this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)Thu, Oct 31, 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
56

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.Thu, Oct 31, 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.