diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-15 12:24:20 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-15 12:24:20 +0100 |
commit | 7b5604b7e1af03445e7209b8a067ef359c2b4846 (patch) | |
tree | f4e828c67e0f7d09e9a392c80f5219279622d0fd /eel/eel-art-gtk-extensions.c | |
parent | 4c7f59163c415140d76330a1b3c57b1efe35ca14 (diff) | |
download | caja-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.c | 6 |
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; |