Skip to content

Commit e8323a0

Browse files
authored
Added confirmation dialog on delete. (#269)
1 parent 081687d commit e8323a0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Gtk/MainWindow.vala

+18-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,24 @@ class MainWindow : Gtk.Window{
550550
return;
551551
}
552552
}
553-
553+
554+
// confirm deletion ------------------
555+
556+
var confirm_dialog = new Gtk.MessageDialog(
557+
this,
558+
Gtk.DialogFlags.MODAL,
559+
Gtk.MessageType.QUESTION,
560+
Gtk.ButtonsType.YES_NO,
561+
"Are you sure you want to delete this snapshot?"
562+
);
563+
564+
var confirm_response = confirm_dialog.run();
565+
confirm_dialog.destroy();
566+
567+
if (confirm_response != Gtk.ResponseType.YES) {
568+
return;
569+
}
570+
554571
// get selected snapshots
555572

556573
if (!App.thread_delete_running){

0 commit comments

Comments
 (0)