#include "lmsensor.h"
#include "notify_cmd.h"
#include <pmutex.h>
+#include <pudisks2.h>
#include "slog.h"
#include "ui_pref.h"
#include "ui_graph.h"
#ifdef HAVE_LIBATIADL
amd_psensor_list_update(sensors);
#endif
+#ifdef HAVE_LIBUDISKS2
+ udisks2_psensor_list_update(sensors);
+#endif
psensor_log_measures(sensors);
associate_cb_alarm_raised(struct psensor **sensors, struct ui_psensor *ui)
{
struct psensor **sensor_cur = sensors;
+
while (*sensor_cur) {
struct psensor *s = *sensor_cur;
s->alarm_low_threshold
= config_get_sensor_alarm_low_threshold(s->id);
- if (is_temp_type(s->type) || is_fan_type(s->type)) {
- s->alarm_enabled
+ s->alarm_enabled
= config_get_sensor_alarm_enabled(s->id);
- } else {
- s->alarm_high_threshold = 0;
- s->alarm_enabled = 0;
- }
sensor_cur++;
}
static void associate_preferences(struct psensor **sensors)
{
struct psensor **sensor_cur = sensors;
+
while (*sensor_cur) {
char *n;
struct psensor *s = *sensor_cur;
dir = get_psensor_user_dir();
if (!dir)
- return ;
+ return;
path = malloc(strlen(dir)+1+strlen("log")+1);
sprintf(path, "%s/%s", dir, "log");
#endif
} else {
sensors = get_all_sensors(use_libatasmart, 600);
+
#ifdef HAVE_NVIDIA
- sensors = nvidia_psensor_list_add(sensors, 600);
+ if (config_is_nvctrl_enabled())
+ sensors = nvidia_psensor_list_add(sensors, 600);
#endif
#ifdef HAVE_LIBATIADL
- sensors = amd_psensor_list_add(sensors, 600);
+ if (config_is_atiadlsdk_enabled())
+ sensors = amd_psensor_list_add(sensors, 600);
#endif
#ifdef HAVE_GTOP
- sensors = cpu_psensor_list_add(sensors, 600);
+ if (config_is_gtop2_enabled())
+ cpu_psensor_list_append(&sensors, 600);
+#endif
+#ifdef HAVE_LIBUDISKS2
+ if (config_is_udisks2_enabled())
+ udisks2_psensor_list_append(&sensors, 600);
#endif
}
else
initial_window_show(&ui);
+ log_debug("translators: %s\n", _("translator-credits"));
+
/* main loop */
gtk_main();