summaryrefslogtreecommitdiff
path: root/eel/eel-art-gtk-extensions.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-15 12:24:20 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-15 12:24:20 +0100
commit7b5604b7e1af03445e7209b8a067ef359c2b4846 (patch)
treef4e828c67e0f7d09e9a392c80f5219279622d0fd /eel/eel-art-gtk-extensions.c
parent4c7f59163c415140d76330a1b3c57b1efe35ca14 (diff)
downloadcaja-7b5604b7e1af03445e7209b8a067ef359c2b4846.tar.bz2
caja-7b5604b7e1af03445e7209b8a067ef359c2b4846.tar.xz
GTK3: don't use deprecated gtk_widget_size_request
gtk_widget_size_request --> gtk_widget_get_preferred_size
Diffstat (limited to 'eel/eel-art-gtk-extensions.c')
-rw-r--r--eel/eel-art-gtk-extensions.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/eel/eel-art-gtk-extensions.c b/eel/eel-art-gtk-extensions.c
index 59963583..f7009991 100644
--- a/eel/eel-art-gtk-extensions.c
+++ b/eel/eel-art-gtk-extensions.c
@@ -27,6 +27,10 @@
#include "eel-art-gtk-extensions.h"
#include <gdk/gdkx.h>
+#if !GTK_CHECK_VERSION(3,0,0)
+#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
+#endif
+
/**
* eel_gdk_rectangle_to_eel_irect:
* @gdk_rectangle: The source GdkRectangle.
@@ -191,7 +195,7 @@ eel_gtk_widget_get_preferred_dimensions (GtkWidget *gtk_widget)
g_return_val_if_fail (GTK_IS_WIDGET (gtk_widget), eel_dimensions_empty);
- gtk_widget_size_request (gtk_widget, &requisition);
+ gtk_widget_get_preferred_size (gtk_widget, &requisition, NULL);
preferred_dimensions.width = (int) requisition.width;
preferred_dimensions.height = (int) requisition.height;