save/restore lock status
CCMAIL:tokoe@kde.org svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745809
This commit is contained in:
parent
1adb4d7387
commit
059505f639
@ -433,6 +433,9 @@ uint Applet::id() const
|
|||||||
|
|
||||||
void Applet::save(KConfigGroup* group) const
|
void Applet::save(KConfigGroup* group) const
|
||||||
{
|
{
|
||||||
|
// we call the dptr member directly for locked since isImmutable()
|
||||||
|
// also checks kiosk and parent containers
|
||||||
|
group->writeEntry("locked", d->immutable);
|
||||||
group->writeEntry("plugin", pluginName());
|
group->writeEntry("plugin", pluginName());
|
||||||
//FIXME: for containments, we need to have some special values here w/regards to
|
//FIXME: for containments, we need to have some special values here w/regards to
|
||||||
// screen affinity (e.g. "bottom of screen 0")
|
// screen affinity (e.g. "bottom of screen 0")
|
||||||
|
@ -138,6 +138,7 @@ void Containment::loadConstraints(KConfigGroup* group)
|
|||||||
|
|
||||||
void Containment::saveConstraints(KConfigGroup* group) const
|
void Containment::saveConstraints(KConfigGroup* group) const
|
||||||
{
|
{
|
||||||
|
// locking is saved in Applet::save
|
||||||
group->writeEntry("screen", d->screen);
|
group->writeEntry("screen", d->screen);
|
||||||
group->writeEntry("formfactor", (int)d->formFactor);
|
group->writeEntry("formfactor", (int)d->formFactor);
|
||||||
group->writeEntry("location", (int)d->location);
|
group->writeEntry("location", (int)d->location);
|
||||||
|
13
corona.cpp
13
corona.cpp
@ -100,6 +100,11 @@ Corona::Corona(qreal x, qreal y, qreal width, qreal height, QObject * parent)
|
|||||||
|
|
||||||
Corona::~Corona()
|
Corona::~Corona()
|
||||||
{
|
{
|
||||||
|
KConfigGroup cg(config(), "General");
|
||||||
|
|
||||||
|
// we call the dptr member directly for locked since isImmutable()
|
||||||
|
// also checks kiosk and parent containers
|
||||||
|
cg.writeEntry("locked", d->immutable);
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +154,7 @@ void Corona::loadApplets(const QString& configName)
|
|||||||
clearApplets();
|
clearApplets();
|
||||||
d->configName = configName;
|
d->configName = configName;
|
||||||
|
|
||||||
KConfig config(configName, KConfig::SimpleConfig);
|
KConfigGroup containments(config(), "Containments");
|
||||||
KConfigGroup containments(&config, "Containments");
|
|
||||||
|
|
||||||
foreach (const QString& group, containments.groupList()) {
|
foreach (const QString& group, containments.groupList()) {
|
||||||
KConfigGroup containmentConfig(&containments, group);
|
KConfigGroup containmentConfig(&containments, group);
|
||||||
@ -225,7 +229,9 @@ void Corona::loadApplets(const QString& configName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d->kioskImmutable = config.isImmutable();
|
d->kioskImmutable = config()->isImmutable();
|
||||||
|
KConfigGroup coronaConfig(config(), "General");
|
||||||
|
setImmutable(coronaConfig.readEntry("locked", false));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Corona::loadApplets()
|
void Corona::loadApplets()
|
||||||
@ -467,6 +473,7 @@ bool Corona::isKioskImmutable() const
|
|||||||
|
|
||||||
void Corona::setImmutable(bool immutable)
|
void Corona::setImmutable(bool immutable)
|
||||||
{
|
{
|
||||||
|
kDebug() << "setting immutability to" << immutable;
|
||||||
if (d->immutable == immutable) {
|
if (d->immutable == immutable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user