diff --git a/src/plasma/applet.cpp b/src/plasma/applet.cpp index 81b14a1c5..550c4ecb7 100644 --- a/src/plasma/applet.cpp +++ b/src/plasma/applet.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include @@ -254,6 +254,12 @@ void Applet::destroy() return; //don't double delete } + if (isContainment()) { + if (QMessageBox::warning(0, i18nc("@title:window %1 is the name of the containment", "Remove %1", title()), i18nc("%1 is the name of the containment", "Do you really want to remove this %1?", title()), QMessageBox::StandardButtons( QMessageBox::Yes | QMessageBox::No ), QMessageBox::No) != QMessageBox::Yes) { + return; + } + } + d->transient = true; //FIXME: an animation on leave if !isContainment() would be good again .. which should be handled by the containment class d->cleanUpAndDelete();