update the lock action once, instead of having every containment do it
svn path=/trunk/KDE/kdelibs/; revision=938042
This commit is contained in:
parent
14869d0fb8
commit
9af884bad7
@ -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) {
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user