diff options
author | Elias Aebi <[email protected]> | 2013-11-21 17:35:20 +0100 |
---|---|---|
committer | Elias Aebi <[email protected]> | 2013-11-21 17:35:20 +0100 |
commit | cec5516cb84a7ecc9489a36cd19bfe28d1bba54e (patch) | |
tree | 57f472180ae1fb84be63be95e81611d656c5c787 /src/sysinfo.cpp | |
parent | 11c4069c618a6253db551fa5300b0ee5fc4f5de6 (diff) | |
download | mate-system-monitor-cec5516cb84a7ecc9489a36cd19bfe28d1bba54e.tar.bz2 mate-system-monitor-cec5516cb84a7ecc9489a36cd19bfe28d1bba54e.tar.xz |
add support for GTK3
Diffstat (limited to 'src/sysinfo.cpp')
-rw-r--r-- | src/sysinfo.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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); |