need help in containments development

Aaron J. Seigo aseigo at kde.org
Tue Jul 20 20:52:17 CEST 2010


On July 20, 2010, Giulio Camuffo wrote:
> I need to create an object on the startup of the containment that will be
> restored the next time plasma starts.

you haven't really given much details as to what this object is or how it is 
supposed to work, but given that, here's my suggestion:

if it isn't configurable, then create it in init()

if it is configurable, create it in configChanged() and call configChanged() 
from init()

it seems you've already tried something like that, but are tripping up on this 
issue:

> so if I had previously swapped
> from my own containment to the default one it will first create the default
> one and then restore the previously saved object, resulting in one useless
> object.

is this "object" a Plasma::Applet, and the default containment is restoring 
it? otherwise, i'm completely lost by what you mean here :)

perhaps you could provide a clearer description of exactly what you are trying 
to achieve?

> I tried by reading the config entry I save in config() regarding my object,
> but in init() or when receiving StartupCompletedConstraint there are only
> the entries of the previous containment.

well, yes, when switching from one containment to anoter containment, there 
won't be any settings for the new containment yet. switching between 
containment types carries no guarantees with regards to configuration data.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100720/e3d60038/attachment.sig 


More information about the Plasma-devel mailing list