only do containment-style removal if it's *really* a containment

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810132
This commit is contained in:
Chani Armitage 2008-05-20 04:26:10 +00:00
parent ccde7ded20
commit 18a50b787d

View File

@ -933,11 +933,15 @@ void Containment::destroy()
if (immutability() != Mutable) { if (immutability() != Mutable) {
return; return;
} }
//FIXME maybe that %1 should be the containment type not the name if (isContainment()) {
if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()), //FIXME maybe that %1 should be the containment type not the name
i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) { if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()),
clearApplets(); i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) {
corona()->destroyContainment(this); clearApplets();
corona()->destroyContainment(this);
}
} else {
Applet::destroy();
} }
} }