summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-11-01 20:13:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-11-01 20:13:14 -0700
commitb26ca781b87371e77b851298093b0a7136be64fa (patch)
tree287bc1a886661a5bf6f2eb49c778d40347edb36a /divelist.c
parenta487f6c9314f0fe5e4173b670d9653067285da21 (diff)
downloadsubsurface-b26ca781b87371e77b851298093b0a7136be64fa.tar.gz
Use unit functions to get column headers, add unit function for pressure
Finally getting more consistent overall in how we convert between the different units and how we decide which units to display. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/divelist.c b/divelist.c
index ca984b4eb..acaf08d38 100644
--- a/divelist.c
+++ b/divelist.c
@@ -420,27 +420,10 @@ void update_dive_list_units(void)
const char *unit;
GtkTreeModel *model = GTK_TREE_MODEL(dive_list.model);
- switch (output_units.length) {
- case METERS:
- unit = "m";
- break;
- case FEET:
- unit = "ft";
- break;
- }
+ (void) get_depth_units(0, NULL, &unit);
gtk_tree_view_column_set_title(dive_list.depth, unit);
- switch (output_units.temperature) {
- case CELSIUS:
- unit = UTF8_DEGREE "C";
- break;
- case FAHRENHEIT:
- unit = UTF8_DEGREE "F";
- break;
- case KELVIN:
- unit = "Kelvin";
- break;
- }
+ (void) get_temp_units(0, &unit);
gtk_tree_view_column_set_title(dive_list.temperature, unit);
gtk_tree_model_foreach(model, set_one_dive, NULL);