Skip to content

Refactor the notifications watcher interface

Bhushan Shah requested to merge work/bshah/notifications-watcher-refactor into master

After adding it in 5.19 release, we realized various shortcomings of the NotificationsWatcher interface. After discussing this with @broulik and @nicolasfella at last Plasma Sprint this is work in progress attempt to refactor it.

Main changes

  • Explicit Register/UnRegisterWatcher methods from the notifications manager interface is removed.
  • Registrations of watcher is handled by the "plugin" files installed on filesystem
  • Plugin file is simple .desktop file, example below

These changes opens up possibility of ability to enable/disable the notification watcher based on user's selection/choice. I have not thought about user interface for this just yet though, maybe needs talking with VDG about this.

Examples

Lock-screen

[Desktop Entry]
Name=Lock Screen
Type=Service
Icon=lock
Id=org.kde.kscreenlocker.greeter
X-KDE-Notifier-DBus-Service=org.kde.kscreenlocker.greeter

KDE Connect

[Desktop Entry]
Name=KDE Connect
Type=Service
Icon=kdeconnect
Id=org.kde.kdeconnectd
X-KDE-Notifier-DBus-Service=org.kde.kdeconnectd
Edited by Nicolas Fella

Merge request reports

Loading