move all the init to loadDefaultSetup if we are loading a default setup; as an extra bonus this prevents Containment::init() being called twice
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=723422
This commit is contained in:
parent
599a527eb0
commit
3e90dfe02b
17
corona.cpp
17
corona.cpp
@ -176,9 +176,7 @@ void Corona::loadApplets(const QString& configname)
|
||||
continue;
|
||||
}
|
||||
|
||||
kDebug() << "loading containment " << cid;
|
||||
|
||||
kDebug() << "creating applet " << cg.name();
|
||||
kDebug() << "creating applet " << cg.name() << "in containment" << cid;
|
||||
int appId = cg.name().left(cg.name().indexOf('-')).toUInt();
|
||||
c->addApplet(cg.readEntry("plugin", QString()), QVariantList(),
|
||||
appId, cg.readEntry("geometry", QRectF()), true);
|
||||
@ -192,13 +190,13 @@ void Corona::loadApplets(const QString& configname)
|
||||
|
||||
if (d->containments.count() < 1) {
|
||||
loadDefaultSetup();
|
||||
}
|
||||
} else {
|
||||
foreach (Containment* containment, d->containments) {
|
||||
containment->init();
|
||||
|
||||
foreach (Containment* containment, d->containments) {
|
||||
containment->init(); //FIXME: is this being called twice?
|
||||
|
||||
foreach(Applet* applet, containment->applets()) {
|
||||
applet->init();
|
||||
foreach(Applet* applet, containment->applets()) {
|
||||
applet->init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,6 +233,7 @@ void Corona::loadDefaultSetup()
|
||||
|
||||
foreach (Plasma::Applet* applet , applets) {
|
||||
// If we have a Panel class (is a Container), this should move there
|
||||
applet->init();
|
||||
applet->setDrawStandardBackground(false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user