NULL);
vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
- master = get_dive(index);
+ master = single_dive;
if (!master)
master = current_dive;
- dive_info_widget(vbox, master, &info, !single_dive);
+
+ /* See if we should use multi dive mode */
+ multi = FALSE;
- if (index < 0)
- {
++ if (!single_dive) {
+ int i;
+ struct dive *dive;
+
- for (i = 0; (dive = get_dive(i)) != NULL; i++) {
++ for_each_dive(i, dive) {
+ if (dive != master && dive->selected) {
+ multi = TRUE;
+ break;
+ }
+ }
+ }
+
+ dive_info_widget(vbox, master, &info, multi);
show_dive_equipment(master, W_IDX_SECONDARY);
save_equipment_data(master);
gtk_widget_show_all(dialog);