X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Fui_graph.c;h=e5e0e76f638dbfed0e9cc7f42cf96333fe4762ca;hp=a50d6a13c13ca683fa9dc438cb7b2eac3ff070dd;hb=fdd86e53b447d603b951494efdfda8aeb299858b;hpb=dcd813f21c83592155f712ff1acf450b483d8072 diff --git a/src/ui_graph.c b/src/ui_graph.c index a50d6a1..e5e0e76 100644 --- a/src/ui_graph.c +++ b/src/ui_graph.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 jeanfi@gmail.com + * Copyright (C) 2010-2014 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -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),