From 9a453d1254e48a6aac6864cbf01366af13fd045a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sun, 6 Nov 2011 13:47:51 +0000 Subject: [PATCH] fixed error about 'expose-event' (signal replaced by 'draw') when compiled with gtk3. --- src/ui_graph.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ui_graph.c b/src/ui_graph.c index 2edd8c7..f5ef501 100644 --- a/src/ui_graph.c +++ b/src/ui_graph.c @@ -136,8 +136,16 @@ GtkWidget *ui_graph_create(struct ui_psensor * ui) w_graph = gtk_drawing_area_new(); - g_signal_connect(GTK_WIDGET(w_graph), - "expose-event", G_CALLBACK(on_expose_event), ui); + if (GTK_MAJOR_VERSION == 2) + g_signal_connect(GTK_WIDGET(w_graph), + "expose-event", + G_CALLBACK(on_expose_event), + ui); + else + g_signal_connect(GTK_WIDGET(w_graph), + "draw", + G_CALLBACK(on_expose_event), + ui); gtk_widget_add_events(w_graph, GDK_BUTTON_PRESS_MASK); -- 2.7.4