#ifdef HAVE_UNITY
ui_unity_launcher_entry_update(ui->sensors,
- !cfg->unity_launcher_count_disabled);
+ !cfg->unity_launcher_count_disabled,
+ cfg->temperature_unit == CELCIUS);
#endif
if (ui->graph_update_interval != cfg->graph_update_interval) {
v = psensor_get_current_value(s);
- if (!use_celcius)
+ if (is_temp_type(s->type) && !use_celcius)
v = celcius_to_fahrenheit(v);
str = g_strdup_printf("%s: %2.f %s",
static unsigned int last_visible = -1;
void ui_unity_launcher_entry_update(struct psensor **sensors,
- unsigned int show)
+ unsigned int show,
+ int use_celcius)
{
+ double v;
+
+
if (!initialized) {
psensor_entry = unity_launcher_entry_get_for_desktop_file
("psensor.desktop");
}
if (sensors && *sensors) {
- double v;
-
v = psensor_get_max_current_value(sensors, SENSOR_TYPE_TEMP);
+ if (!use_celcius)
+ v = celcius_to_fahrenheit(v);
+
unity_launcher_entry_set_count(psensor_entry, v);
}
}
#include "psensor.h"
void ui_unity_launcher_entry_update(struct psensor **sensors,
- unsigned int show);
+ unsigned int show,
+ int use_celcius);
#endif