Skip to content

Commit

Permalink
Added confirmation dialog on delete. (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
mostghost authored May 17, 2024
1 parent 081687d commit e8323a0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/Gtk/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit e8323a0

Please sign in to comment.