From 752626ad550552232d73d8b009db62b0f8e86113 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 3 Oct 2016 11:45:22 +0100 Subject: [PATCH] Don't load containment actions for embedded containments (system trays) Also load the correct default actions for custom panels. REVIEW: 129078 --- src/plasma/containment.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 803887d20..dde5dd366 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -199,11 +199,19 @@ void Containment::restore(KConfigGroup &group) } } else { //shell defaults KConfigGroup defaultActionsCfg; - if (d->type == Plasma::Types::PanelContainment) { - defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel"); - //Plasma::Types::DesktopContainment - } else { - defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Desktop"); + + switch (d->type) { + case Plasma::Types::PanelContainment: + /* fall through*/ + case Plasma::Types::CustomPanelContainment: + defaultActionsCfg = KConfigGroup(KSharedConfig::openConfig(corona()->package().filePath("defaults")), "Panel"); + 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");