- gtk_label_set_text(GTK_LABEL(depth), buffer);
-
- snprintf(buffer, sizeof(buffer),
- "%d min",
- dive->duration.seconds / 60);
- gtk_label_set_text(GTK_LABEL(duration), buffer);
-
- *buffer = 0;
- if (dive->watertemp.mkelvin) {
- switch (output_units.temperature) {
- case CELSIUS:
- snprintf(buffer, sizeof(buffer),
- "%d C",
- to_C(dive->watertemp));
- break;
- case FAHRENHEIT:
- snprintf(buffer, sizeof(buffer),
- "%d F",
- to_F(dive->watertemp));
- break;
- case KELVIN:
- snprintf(buffer, sizeof(buffer),
- "%d K",
- to_K(dive->watertemp));
- break;
- }
- }
- gtk_label_set_text(GTK_LABEL(temperature), buffer);
+ text = buffer;
+ if (!dive->number)
+ text += 10; /* Skip the "Dive #0 - " part */
+ gtk_window_set_title(GTK_WINDOW(main_window), text);
+
+ SET_TEXT_ENTRY(divemaster);
+ SET_TEXT_ENTRY(buddy);
+ SET_TEXT_ENTRY(location);
+ gtk_text_buffer_set_text(notes, dive && dive->notes ? dive->notes : "", -1);
+}