From d96cb59ae7c70cd3306bc1a7e313b69cfcc10105 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sun, 14 Sep 2014 19:53:03 +0200 Subject: [PATCH] add support of smooth curves in the preferences. --- src/ui_pref.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui_pref.c b/src/ui_pref.c index 55e2bb2..72322f4 100644 --- a/src/ui_pref.c +++ b/src/ui_pref.c @@ -54,7 +54,7 @@ void ui_pref_dialog_run(struct ui_psensor *ui) 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; @@ -142,6 +142,11 @@ void ui_pref_dialog_run(struct ui_psensor *ui) 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); @@ -249,6 +254,9 @@ void ui_pref_dialog_run(struct ui_psensor *ui) 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); -- 2.7.4