#include <ui.h>
#include <cfg.h>
+#include <graph.h>
#include <ui_pref.h>
#include <ui_color.h>
#include <pxdg.h>
GtkComboBox *w_sensorlist_pos;
GtkToggleButton *w_hide_window_decoration, *w_keep_window_below,
*w_enable_menu, *w_enable_launcher_counter, *w_hide_on_startup,
- *w_win_restore, *w_slog_enabled, *w_autostart;
+ *w_win_restore, *w_slog_enabled, *w_autostart, *w_smooth_curves;
GtkComboBoxText *w_temp_unit;
GtkEntry *w_notif_script;
char *notif_script;
gtk_toggle_button_set_active(w_enable_launcher_counter,
!cfg->unity_launcher_count_disabled);
+ w_smooth_curves = GTK_TOGGLE_BUTTON
+ (gtk_builder_get_object(builder, "graph_smooth_curves"));
+ gtk_toggle_button_set_active(w_smooth_curves,
+ config_is_smooth_curves_enabled());
+
w_slog_enabled = GTK_TOGGLE_BUTTON
(gtk_builder_get_object(builder, "enable_slog"));
gtk_toggle_button_set_active(w_slog_enabled, cfg->slog_enabled);
= gtk_spin_button_get_value_as_int
(w_monitoring_duration);
- cfg->sensor_values_max_length
- = (cfg->graph_monitoring_duration * 60) /
- cfg->sensor_update_interval;
-
cfg->hide_on_startup
= gtk_toggle_button_get_active(w_hide_on_startup);
cfg->temperature_unit
= gtk_combo_box_get_active(GTK_COMBO_BOX(w_temp_unit));
+ cfg->sensor_values_max_length = compute_values_max_length(cfg);
+
config_save(cfg);
+ config_set_smooth_curves_enabled
+ (gtk_toggle_button_get_active(w_smooth_curves));
+
pxdg_set_autostart(gtk_toggle_button_get_active(w_autostart));
pthread_mutex_unlock(&ui->sensors_mutex);