Added confirmation dialog on delete. (#269)

This commit is contained in:
mostghost 2024-05-17 15:33:31 +00:00 committed by GitHub
parent 081687d4e9
commit e8323a02bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -550,7 +550,24 @@ class MainWindow : Gtk.Window{
return;
}
}
// confirm deletion ------------------
var confirm_dialog = new Gtk.MessageDialog(
this,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.QUESTION,
Gtk.ButtonsType.YES_NO,
"Are you sure you want to delete this snapshot?"
);
var confirm_response = confirm_dialog.run();
confirm_dialog.destroy();
if (confirm_response != Gtk.ResponseType.YES) {
return;
}
// get selected snapshots
if (!App.thread_delete_running){