X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fui_unity.c;h=9f9bd046b1af83076e95d5a7c3549aca140d745b;hb=51450a36b7143fe230197dfa89b5fd072af7421c;hp=0ab2e1290d9517dd90f1471971e830d4c996f4be;hpb=d6141b1d4fea0db9b115b06c668be6195ac4e5c6;p=psensor.git diff --git a/src/ui_unity.c b/src/ui_unity.c index 0ab2e12..9f9bd04 100644 --- a/src/ui_unity.c +++ b/src/ui_unity.c @@ -72,12 +72,18 @@ void ui_unity_launcher_entry_update(struct psensor **sensors, last_visible = show; } - if (sensors && *sensors) { + if (show && sensors && *sensors) { v = get_max_current_value(sensors, SENSOR_TYPE_TEMP); - if (!use_celsius) - v = celsius_to_fahrenheit(v); + if (v != UNKNOWN_DBL_VALUE) { + if (!use_celsius) + v = celsius_to_fahrenheit(v); - unity_launcher_entry_set_count(psensor_entry, v); + unity_launcher_entry_set_count(psensor_entry, v); + } } } + +void ui_unity_init(void) +{ +}