don't automatically add a remove action to custom containments

svn path=/trunk/KDE/kdelibs/; revision=939041
This commit is contained in:
Aaron J. Seigo 2009-03-13 17:07:58 +00:00
parent 9117a796eb
commit 9024aa28bb

View File

@ -1580,8 +1580,8 @@ void ContainmentPrivate::checkRemoveAction()
{
q->enableAction("remove", (q->immutability() == Mutable &&
(screen == -1 ||
type == Plasma::Containment::PanelContainment ||
type == Plasma::Containment::CustomPanelContainment)));
type == Plasma::Containment::PanelContainment ||
type == Plasma::Containment::CustomPanelContainment)));
}
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constraints)
@ -1637,7 +1637,9 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
positionToolBox();
}
if (toolBox && constraints & Plasma::StartupCompletedConstraint) {
if (toolBox &&
constraints & Plasma::StartupCompletedConstraint &&
type < Containment::CustomContainment) {
toolBox->addTool(q->action("remove"));
checkRemoveAction();
}