summaryrefslogtreecommitdiff
path: root/eel/eel-art-gtk-extensions.c
diff options
context:
space:
mode:
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;