SVN commit 989520 by mart:
allow applet configuration and extenderitems config nested into the
group of another applet
this thing is possibly dangerous, so better plasma-devel is informed
CCMAIL:[email protected]
M +5 -1 applet.cpp
M +1 -0 extender.cpp
--- trunk/KDE/kdelibs/plasma/applet.cpp #989519:989520
@@ -2108,6 +2108,7 @@
d->modificationsTimerId = 0;
// invalid group, will result in save using the default group
KConfigGroup cg;
+
save(cg);
emit configNeedsSaving();
}
@@ -2408,7 +2409,10 @@
mainConfig = new KConfigGroup(&containmentConfig,
QString::number(appletId));
} else {
KConfigGroup appletConfig;
- if (q->containment()) {
+ Plasma::Applet *parentApplet = qobject_cast<Plasma::Applet
*>(q->parent());
+ if (parentApplet && q->containment() && parentApplet !=
q->containment()) {
+ appletConfig = KConfigGroup(&parentApplet->config(), "Applets");
+ } else if (q->containment()) {
appletConfig = q->containment()->config();
appletConfig = KConfigGroup(&appletConfig, "Applets");
} else {
--- trunk/KDE/kdelibs/plasma/extender.cpp #989519:989520
@@ -662,6 +662,7 @@
item = new ExtenderItem(q, extenderItemId.toInt());
}
sourceApplet->initExtenderItem(item);
+ item->d->sourceApplet = sourceApplet;
if (temporarySourceApplet) {
delete sourceApplet;
_______________________________________________
Plasma-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/plasma-devel