diff --git a/containment.cpp b/containment.cpp index 74f386988..16a04f7f3 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1599,11 +1599,6 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra action->setVisible(unlocked); action->setEnabled(unlocked); }*/ - QAction *action = actions().action("lock widgets"); - if (action) { - action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets")); - action->setIcon(KIcon(unlocked ? "object-locked" : "object-unlocked")); - } // tell the applets too foreach (Applet *a, applets) { diff --git a/corona.cpp b/corona.cpp index 519879ff8..f43beae1c 100644 --- a/corona.cpp +++ b/corona.cpp @@ -567,6 +567,14 @@ void Corona::setImmutability(const ImmutabilityType immutable) d->immutability = immutable; d->updateContainmentImmutability(); + //update our actions + bool unlocked = d->immutability == Mutable; + QAction *action = d->actions.action("lock widgets"); + if (action) { + action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets")); + action->setIcon(KIcon(unlocked ? "object-locked" : "object-unlocked")); + } + KConfigGroup cg(config(), "General"); // we call the dptr member directly for locked since isImmutable()