X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Fui_sensorlist.c;h=9d4b748717e7537b04c321569bc7111ea4c07e68;hp=52df001878309e0c207e917e6041daf3540bf9db;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hpb=de58b641143d1fb9622fa4021c2dd1ab50149dee diff --git a/src/ui_sensorlist.c b/src/ui_sensorlist.c index 52df001..9d4b748 100644 --- a/src/ui_sensorlist.c +++ b/src/ui_sensorlist.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 jeanfi@gmail.com + * Copyright (C) 2010-2016 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -63,7 +63,7 @@ static void populate(struct ui_psensor *ui) struct psensor **ordered_sensors, **s_cur, *s; unsigned int enabled; - ordered_sensors = ui_get_sensors_ordered_by_position(ui); + ordered_sensors = ui_get_sensors_ordered_by_position(ui->sensors); store = ui->sensors_store; gtk_list_store_clear(store); @@ -110,7 +110,10 @@ void ui_sensorlist_update(struct ui_psensor *ui, bool complete) store = ui->sensors_store; - use_celsius = ui->config->temperature_unit == CELSIUS; + if (config_get_temperature_unit() == CELSIUS) + use_celsius = 1; + else + use_celsius = 0; valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { @@ -119,8 +122,12 @@ void ui_sensorlist_update(struct ui_psensor *ui, bool complete) value = psensor_value_to_str(s->type, psensor_get_current_value(s), use_celsius); - min = psensor_value_to_str(s->type, s->min, use_celsius); - max = psensor_value_to_str(s->type, s->max, use_celsius); + min = psensor_value_to_str(s->type, + s->sess_lowest, + use_celsius); + max = psensor_value_to_str(s->type, + s->sess_highest, + use_celsius); gtk_list_store_set(store, &iter, COL_TEMP, value,