put the applet notification of immutability in the containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=780750
This commit is contained in:
parent
241f31a32a
commit
8c1990f49b
@ -176,16 +176,18 @@ void Containment::saveConstraints(KConfigGroup* group) const
|
||||
void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints)
|
||||
{
|
||||
//kDebug() << "got containmentConstraintsUpdated" << constraints << (QObject*)d->toolbox;
|
||||
if (d->toolbox) {
|
||||
if (constraints & Plasma::ScreenConstraint) {
|
||||
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), 0);
|
||||
if (constraints & Plasma::ImmutableConstraint) {
|
||||
// tell the applets too
|
||||
foreach (Applet *a, d->applets) {
|
||||
a->constraintsUpdated(ImmutableConstraint);
|
||||
}
|
||||
}
|
||||
|
||||
if (constraints & Plasma::ImmutableConstraint) {
|
||||
if (constraints & Plasma::ScreenConstraint && d->toolbox) {
|
||||
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), 0);
|
||||
d->toolbox->enableTool("addwidgets", !isImmutable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Containment::Type Containment::containmentType() const
|
||||
{
|
||||
|
@ -97,10 +97,6 @@ public:
|
||||
foreach (Containment *c, containments) {
|
||||
// we need to tell each containment that immutability has been altered
|
||||
c->updateConstraints(ImmutableConstraint);
|
||||
// tell the applets too
|
||||
foreach (Applet *a, c->applets()) {
|
||||
a->constraintsUpdated(ImmutableConstraint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user