X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=divelist.c;h=acaf08d38a8e5ce29e26d95c932b7d9b43bd182d;hb=56980579514f2900e43441b483e435b3e3235266;hp=ca984b4eb169ed90b520ce0541ae3670c3765daf;hpb=a487f6c9314f0fe5e4173b670d9653067285da21;p=ext%2Fsubsurface.git diff --git a/divelist.c b/divelist.c index ca984b4..acaf08d 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);