add the containment after init, inc on delayed init

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=724312
This commit is contained in:
Aaron J. Seigo 2007-10-11 23:18:33 +00:00
parent 095b27e53b
commit 599f014cff

View File

@ -192,6 +192,7 @@ void Corona::loadApplets(const QString& configname)
} else { } else {
foreach (Containment* containment, d->containments) { foreach (Containment* containment, d->containments) {
containment->init(); containment->init();
addItem(containment);
foreach(Applet* applet, containment->applets()) { foreach(Applet* applet, containment->applets()) {
applet->init(); applet->init();
@ -222,7 +223,6 @@ void Corona::loadDefaultSetup()
// make a panel at the bottom // make a panel at the bottom
Containment* panel = addContainment("panel", (QVariantList() << (int)Plasma::BottomEdge)); Containment* panel = addContainment("panel", (QVariantList() << (int)Plasma::BottomEdge));
return;
// some default applets to get a usable UI // some default applets to get a usable UI
QList<Plasma::Applet*> applets; QList<Plasma::Applet*> applets;
Plasma::Applet *tasksApplet = panel->addApplet("tasks"); Plasma::Applet *tasksApplet = panel->addApplet("tasks");
@ -230,7 +230,6 @@ void Corona::loadDefaultSetup()
Plasma::Applet *clockApplet = panel->addApplet("digital-clock"); Plasma::Applet *clockApplet = panel->addApplet("digital-clock");
applets << tasksApplet << systemTrayApplet << clockApplet; applets << tasksApplet << systemTrayApplet << clockApplet;
} }
Containment* Corona::containmentForScreen(int screen) const Containment* Corona::containmentForScreen(int screen) const
@ -279,10 +278,9 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
containment->setFailedToLaunch(false); // we want to provide something and don't care about the failure to launch containment->setFailedToLaunch(false); // we want to provide something and don't care about the failure to launch
} }
addItem(containment);
if (!delayedInit) { if (!delayedInit) {
containment->init(); containment->init();
addItem(containment);
} }
d->containments.append(containment); d->containments.append(containment);