+
+ *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 = dive->location ? : "";
+ gtk_entry_set_text(location, text);
+ gtk_label_set_text(GTK_LABEL(locationnote), text);
+
+ text = dive->notes ? : "";
+ gtk_text_buffer_set_text(notes, text, -1);