X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fui_graph.c;h=31db6893a24fdbe083c5fa7d7fb9a714270c90a2;hb=d280db5907574f0d29458dd5d301ce030a13189b;hp=a50d6a13c13ca683fa9dc438cb7b2eac3ff070dd;hpb=b6211b9c17d3c35702adcbb69d9c5884cb85f028;p=psensor.git diff --git a/src/ui_graph.c b/src/ui_graph.c index a50d6a1..31db689 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 @@ -38,20 +38,31 @@ on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) struct ui_psensor *ui_psensor = (struct ui_psensor *)data; graph_update(ui_psensor->sensors, - ui_psensor->w_graph, + ui_get_graph(), ui_psensor->config, ui_psensor->main_window); return FALSE; } +static 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; log_debug("ui_graph_create()"); - w_graph = ui->w_graph; + w_graph = ui_get_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",