* take advantage of constraint flushing

* return the _desktop_ constraint from constraintForScreen
* don't use the arg list to set the location of the panel, use the setLocation method as per usual

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=729445
This commit is contained in:
Aaron J. Seigo 2007-10-26 01:08:19 +00:00
parent 7afcb9ffca
commit 0a73264688

View File

@ -199,6 +199,13 @@ void Corona::loadApplets(const QString& configname)
}
}
foreach (Containment* containment, d->containments) {
// we need to manually flush the constraints changes
// because we may not get back to the event loop before
// view set up
containment->flushUpdatedConstraints();
}
setImmutable(config.isImmutable());
}
@ -220,8 +227,9 @@ void Corona::loadDefaultSetup()
}
// make a panel at the bottom
Containment* panel = addContainment("panel", (QVariantList() << (int)Plasma::BottomEdge));
Containment* panel = addContainment("panel");
panel->setScreen(0);
panel->setLocation(Plasma::BottomEdge);
// some default applets to get a usable UI
panel->addApplet("launcher");
@ -233,7 +241,8 @@ void Corona::loadDefaultSetup()
Containment* Corona::containmentForScreen(int screen) const
{
foreach (Containment* containment, d->containments) {
if (containment->screen() == screen) {
if (containment->screen() == screen &&
containment->type() == Containment::DesktopContainment) {
return containment;
}
}