need help in containments development

Giulio Camuffo giuliocamuffo at gmail.com
Tue Jul 20 19:58:22 CEST 2010


Hi all,

I'm developing a desktop and a panel containment, and I'm stuck with a
problem i really don't know how to solve:
I need to create an object on the startup of the containment that will be
restored the next time plasma starts. So I can reimplement
Containment::restore or Containment::restoreContents. I can check if the
config of the object is saved otherwise I construct a default one.
The problem is that when creating a new panel restore isn't called, so it
doesn't create the object.
I thought of creating the default one when receiving the
StartupCompletedConstraints, but when changing the desktop activity to my
containment it receives that before restore, 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.
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.

I'd need a method or a signal *always called* and called *always after*
restore, but i couldn't find any.
Do you have any hint? Should it be added to Containment?

Greets, Giulio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100720/3780e834/attachment-0001.htm 


More information about the Plasma-devel mailing list