* Avoid multiple sensor preferences dialog at the same time.
* Support max/min sensor information from providers.
* Fixed string not translatable. (Closes: #138076).
+* Added a default high threshold for temperature.
v1.1.3
------
static const char *KEY_PROVIDER_NVCTRL_ENABLED = "provider-nvctrl-enabled";
static const char *KEY_PROVIDER_UDISKS2_ENABLED = "provider-udisks2-enabled";
+static const char *KEY_DEFAULT_HIGH_THRESHOLD_TEMPERATURE
+= "default-high-threshold-temperature";
+
static GSettings *settings;
static char *user_dir;
set_bool(KEY_GRAPH_SMOOTH_CURVES_ENABLED, b);
}
+double config_get_default_high_threshold_temperature(void)
+{
+ return get_double(KEY_DEFAULT_HIGH_THRESHOLD_TEMPERATURE);
+}
static void init(void)
{
{
bool ret;
struct psensor *s;
+ double d, high_temp;
+
+ high_temp = config_get_default_high_threshold_temperature();
while (*sensors) {
s = *sensors;
ret = config_get_sensor_alarm_high_threshold
(s->id, &s->alarm_high_threshold);
- if (!ret && s->max != UNKNOWN_DBL_VALUE)
- s->alarm_high_threshold = s->max;
+ if (!ret) {
+ if (s->max == UNKNOWN_DBL_VALUE) {
+ if (s->type & SENSOR_TYPE_TEMP)
+ s->alarm_high_threshold = high_temp;
+ } else {
+ s->alarm_high_threshold = s->max;
+ }
+ }
ret = config_get_sensor_alarm_low_threshold
(s->id, &s->alarm_low_threshold);