aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/controller/GnuPGControllerDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/controller/GnuPGControllerDialog.cpp')
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/dialog/controller/GnuPGControllerDialog.cpp b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
index fe334e45..d911d52e 100644
--- a/src/ui/dialog/controller/GnuPGControllerDialog.cpp
+++ b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
@@ -70,6 +70,8 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
tr("Tips: notice that modify any of these settings will cause an "
"Application restart."));
+
+
popup_menu_ = new QMenu(this);
popup_menu_->addAction(ui_->actionMove_Key_Database_Up);
popup_menu_->addAction(ui_->actionMove_Key_Database_Down);
@@ -429,6 +431,16 @@ void GnuPGControllerDialog::slot_remove_existing_key_database() {
for (int i = 0; i < row_size; i++) {
auto* const item = ui_->keyDatabaseTable->item(i, 1);
if (!item->isSelected()) continue;
+
+ QMessageBox::StandardButton reply = QMessageBox::question(
+ this, tr("Confirm Deletion"),
+ tr("Are you sure you want to delete the selected key database?"),
+ QMessageBox::Yes | QMessageBox::No);
+
+ if (reply != QMessageBox::Yes) {
+ return;
+ }
+
key_databases.remove(i);
break;
}