+static int delete_dive_info(struct dive *dive)
+{
+ int success;
+ GtkWidget *dialog;
+
+ if (!dive)
+ return 0;
+
+ dialog = gtk_dialog_new_with_buttons("Delete Dive",
+ GTK_WINDOW(main_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ NULL);
+
+ gtk_widget_show_all(dialog);
+ success = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT;
+ if (success) {
+ delete_dive(dive);
+ mark_divelist_changed(TRUE);
+ dive_list_update_dives();
+ }
+
+ gtk_widget_destroy(dialog);
+
+ return success;
+}
+