From cec5516cb84a7ecc9489a36cd19bfe28d1bba54e Mon Sep 17 00:00:00 2001 From: Elias Aebi Date: Thu, 21 Nov 2013 17:35:20 +0100 Subject: add support for GTK3 --- src/sysinfo.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/sysinfo.cpp') diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp index 9ddf31c..2cc163d 100644 --- a/src/sysinfo.cpp +++ b/src/sysinfo.cpp @@ -411,10 +411,11 @@ namespace { #define LOGO_H 351 #define RADIUS 5 -static gboolean -sysinfo_logo_expose (GtkWidget *widget, - GdkEventExpose *event, - gpointer data_ptr) +#if GTK_CHECK_VERSION(3,0,0) +static gboolean sysinfo_logo_expose (GtkWidget *widget, cairo_t *context, gpointer data_ptr) +#else +static gboolean sysinfo_logo_expose (GtkWidget *widget, GdkEventExpose *event, gpointer data_ptr) +#endif { GtkAllocation allocation; GtkStyle *style; @@ -546,8 +547,11 @@ procman_create_sysinfo_view(void) gtk_misc_set_padding(GTK_MISC(logo), 5, 12); gtk_box_pack_start(GTK_BOX(hbox), logo, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(logo), "expose-event", - G_CALLBACK(sysinfo_logo_expose), NULL); +#if GTK_CHECK_VERSION(3,0,0) + g_signal_connect(G_OBJECT(logo), "draw", G_CALLBACK(sysinfo_logo_expose), NULL); +#else + g_signal_connect(G_OBJECT(logo), "expose-event", G_CALLBACK(sysinfo_logo_expose), NULL); +#endif vbox = gtk_vbox_new(FALSE, 12); gtk_container_set_border_width(GTK_CONTAINER(vbox), 12); -- cgit v1.2.1