Make System Tray use a ProxyModel rather than three independent ones

Review Request #124380 - Created July 18, 2015 and submitted

Kai Uwe Broulik

This makes System Tray use the all tasks model with a proxy model that filters shown or hidden tasks. This way we don't need to keep three different models in sync which has shown to often break, especially when item status change. Makes the code significantly easier to understand.

One thing I noticed is that there doesn't seem to be a way for a plasmoid to specify a category, so when I uncheck "Miscellaneous", all items but KMix (which is in the hardware category) disappear. Since we're moving away from most SNI apps to plasmoids, it would make sense to allow an applet so specify a category (either through Plasmoid attached object or in the desktop file (or we do a mapping from the PluginInfo-Categories to sys tray categories))

Edit: Tried the PluginInfo-Categories mapping but it doesn't really fit. Eg. Battery is "System information" but should show up in the Hardware category or systray, likewise for Device NOtifier, and many other systray applets.

  • Checking and unchecking "show all items" works
  • Forcing various items shown/hidden works
  • An item changing its state (eg. new notification, goes from passive to active) works
  • Both lists (compact and expanded) look fine
  • Arrow properly appears/disappears depending on how many inactive items there are

Touchpad kcm no longer messes up my systray. Looks like the same bug mediacontroller exposed, where the applet was briefly active during initialization and then went passive, getting the models ouf of sync.


  • 0
  • 3
  • 0
  • 3
Description From Last Updated
Kai Uwe Broulik
Mark Gaiser
Aleix Pol Gonzalez
Sebastian Kügler
Kai Uwe Broulik
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit e64d41cc2fe549e4efcb60c7561dd83648294903 by Kai Uwe Broulik to branch master.