Review Request: update the data when the predicate files change
Giulio Camuffo
giuliocamuffo at gmail.com
Mon Dec 7 18:38:59 CET 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2331/
-----------------------------------------------------------
(Updated 2009-12-07 17:38:58.991153)
Review request for Plasma and Aaron Seigo.
Changes
-------
when the predicates are created check if there are some devices that now have an action, while before they didn't; opposite thing on remove.
Summary
-------
This patch uses a KDirWatch to watch the folders where the predicate files are in. If one of them gets created, modified, deleted, it updates its data so the applets using it receive a dataUpdated() and can adjust their things.
Diffs (updated)
-----
/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/hotplug/CMakeLists.txt 1059391
/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/hotplug/hotplugengine.h 1059391
/trunk/KDE/kdebase/workspace/plasma/generic/dataengines/hotplug/hotplugengine.cpp 1059391
Diff: http://reviewboard.kde.org/r/2331/diff
Testing (updated)
-------
tested, works. the notifier changes its "x actions for this device" instantly. (the notifier needs a fix for it anyway, since the actions themselves aren't changed. i'll do it once this is committed)
However, maybe would be a goog idea to cache somehow the value of the function predicatesForDevice() in order to avoid to parse everytime all the predicates and so parse only the new or changed ones, cause it seems to have quite a big impact on performances.
Thanks,
Giulio
More information about the Plasma-devel
mailing list