Don't load containment actions for embedded containments (system trays)

Also load the correct default actions for custom panels.

REVIEW: 129078
This commit is contained in:
David Edmundson 2016-10-03 11:45:22 +01:00 committed by David Edmundson
parent 048d5243f0
commit 752626ad55

View File

@ -199,11 +199,19 @@ void Containment::restore(KConfigGroup &group)
}
} else { //shell defaults
KConfigGroup defaultActionsCfg;
if (d->type == Plasma::Types::PanelContainment) {
switch (d->type) {
case Plasma::Types::PanelContainment:
/* fall through*/
case Plasma::Types::CustomPanelContainment:
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel");
//Plasma::Types::DesktopContainment
} else {
break;
case Plasma::Types::DesktopContainment:
defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Desktop");
break;
default:
//for any other type of containment, there are no defaults
break;
}
defaultActionsCfg = KConfigGroup(&defaultActionsCfg, "ContainmentActions");