From 59dbfeeab66f782870aa10678ad93537430648f0 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 13 Feb 2014 15:29:44 +0100 Subject: [PATCH] ask confirmation to delete containments --- src/plasma/applet.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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();