diff options
author | Stefano Karapetsas <[email protected]> | 2013-11-23 07:42:37 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-11-23 07:42:37 -0800 |
commit | 43414fec3d31d10c8ca2c9fa227b7e4a75500719 (patch) | |
tree | dc02ba832518d84d7c1ae7a2d3ab65f076708ce6 /src/sysinfo.cpp | |
parent | 77940a42279f216e9707223e7f3320f13cb8d500 (diff) | |
parent | cec5516cb84a7ecc9489a36cd19bfe28d1bba54e (diff) | |
download | mate-system-monitor-43414fec3d31d10c8ca2c9fa227b7e4a75500719.tar.bz2 mate-system-monitor-43414fec3d31d10c8ca2c9fa227b7e4a75500719.tar.xz |
Merge pull request #29 from eyelash/gtk3
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); |