ask confirmation to delete containments
This commit is contained in:
parent
566e2a8a42
commit
59dbfeeab6
@ -30,7 +30,7 @@
|
||||
|
||||
#include <QFile>
|
||||
#include <QList>
|
||||
#include <QUiLoader>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <kactioncollection.h>
|
||||
#include <kauthorized.h>
|
||||
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user