make PlasmoidProtocol::loadFromConfig behave properly in all situations
author Aaron Seigo
()
committer Aaron Seigo
()
commit efc0ebf3f42e8d1fb769236fc24fb96379d55d4e
tree 17c0a6f0213da12dd7258cc3e1602c21e1732408
parent 5d5b1610d87427b111c6965225a8edb5fd749907
make PlasmoidProtocol::loadFromConfig behave properly in all situations

this is done by greatly simplifying PlasmoidProtocol::loadFromConfig and putting a check
in PlasmoidProtocol::addApplet to see if the host already contains the applet. this is needed
anyways since addApplet can be (and is) called from the manager.

this also adds a check such that if for whatever reason more than one instance of the same
applet was present in this system tray (something which the current design expressly prohibits
though i do wonder if it doesn't make sense to have more than one, e.g., weather widget at a time)
then delete the stray config group, preventing endless #s of configs for the same applet
piling up in the config should anything have gone wrong in the past
plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.cpp
plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.h
plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtaskprotocol.cpp