From: Jean-Philippe Orsini Date: Thu, 11 Sep 2014 22:56:29 +0000 (+0200) Subject: added support of smooth curves setting X-Git-Tag: v1.1.2~106 X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=4f6190ae1f52363f008bd84f4f82ff1bdb60eae5 added support of smooth curves setting --- diff --git a/src/ui_graph.c b/src/ui_graph.c index 0b9b41b..e5e0e76 100644 --- a/src/ui_graph.c +++ b/src/ui_graph.c @@ -45,6 +45,11 @@ on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) return FALSE; } +void smooth_curves_enabled_changed_cbk(void *data) +{ + is_smooth_curves_enabled = config_is_smooth_curves_enabled(); +} + void ui_graph_create(struct ui_psensor *ui) { GtkWidget *w_graph; @@ -53,6 +58,12 @@ void ui_graph_create(struct ui_psensor *ui) w_graph = ui->w_graph; + is_smooth_curves_enabled = config_is_smooth_curves_enabled(); + g_signal_connect_after(config_get_GSettings(), + "changed::graph-smooth-curves-enabled", + G_CALLBACK(smooth_curves_enabled_changed_cbk), + NULL); + g_signal_connect(GTK_WIDGET(w_graph), "draw", G_CALLBACK(on_expose_event),