From 18a50b787d96aed8f2e1fae4fe6cf0fa3bbbd344 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Tue, 20 May 2008 04:26:10 +0000 Subject: [PATCH] only do containment-style removal if it's *really* a containment svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810132 --- containment.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/containment.cpp b/containment.cpp index 4c17edec3..406c7133a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -933,11 +933,15 @@ void Containment::destroy() if (immutability() != Mutable) { return; } - //FIXME maybe that %1 should be the containment type not the name - if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()), - i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) { - clearApplets(); - corona()->destroyContainment(this); + if (isContainment()) { + //FIXME maybe that %1 should be the containment type not the name + if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()), + i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) { + clearApplets(); + corona()->destroyContainment(this); + } + } else { + Applet::destroy(); } }