Review Request 124380: Make System Tray use a ProxyModel rather than three independent ones
Kai Uwe Broulik
kde at privat.broulik.de
Mon Jul 20 08:26:18 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124380/
-----------------------------------------------------------
(Updated July 20, 2015, 8:26 a.m.)
Status
------
This change has been marked as submitted.
Review request for Plasma.
Changes
-------
Submitted with commit e64d41cc2fe549e4efcb60c7561dd83648294903 by Kai Uwe Broulik to branch master.
Bugs: 347554
https://bugs.kde.org/show_bug.cgi?id=347554
Repository: plasma-workspace
Description
-------
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.
Diffs
-----
applets/systemtray/package/contents/ui/CompactRepresentation.qml 3cf774c
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml 04de968
applets/systemtray/package/contents/ui/main.qml 34b9e4d
applets/systemtray/plugin/CMakeLists.txt 9e85a7a
applets/systemtray/plugin/host.h adb2c64
applets/systemtray/plugin/host.cpp 6d68a43
applets/systemtray/plugin/systemtrayplugin.cpp 2c97056
applets/systemtray/plugin/tasksproxymodel.h PRE-CREATION
applets/systemtray/plugin/tasksproxymodel.cpp PRE-CREATION
Diff: https://git.reviewboard.kde.org/r/124380/diff/
Testing
-------
- 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.
Thanks,
Kai Uwe Broulik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150720/83f54130/attachment-0001.html>
More information about the Plasma-devel
mailing list