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-labeled-image.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-labeled-image.c')
-rw-r--r-- | eel/eel-labeled-image.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c index dbaa47aa..2292978a 100644 --- a/eel/eel-labeled-image.c +++ b/eel/eel-labeled-image.c @@ -41,6 +41,10 @@ #define DEFAULT_X_ALIGNMENT 0.5 #define DEFAULT_Y_ALIGNMENT 0.5 +#if !GTK_CHECK_VERSION(3,0,0) +#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y) +#endif + /* Signals */ enum { @@ -731,7 +735,7 @@ labeled_image_get_image_dimensions (const EelLabeledImage *labeled_image) return eel_dimensions_empty; } - gtk_widget_size_request (labeled_image->details->image, &image_requisition); + gtk_widget_get_preferred_size (labeled_image->details->image, &image_requisition, NULL); image_dimensions.width = (int) image_requisition.width; image_dimensions.height = (int) image_requisition.height; @@ -757,7 +761,7 @@ labeled_image_get_label_dimensions (const EelLabeledImage *labeled_image) return eel_dimensions_empty; } - gtk_widget_size_request (labeled_image->details->label, &label_requisition); + gtk_widget_get_preferred_size (labeled_image->details->label, &label_requisition, NULL); label_dimensions.width = (int) label_requisition.width; label_dimensions.height = (int) label_requisition.height; @@ -852,7 +856,7 @@ eel_labeled_image_get_image_bounds (const EelLabeledImage *labeled_image) /* get true real dimensions if we're in fixed height mode */ if (is_fixed_height (labeled_image) && labeled_image_show_image (labeled_image)) { - gtk_widget_size_request (labeled_image->details->image, &image_requisition); + gtk_widget_get_preferred_size (labeled_image->details->image, &image_requisition, NULL); image_dimensions.width = (int) image_requisition.width; image_dimensions.height = (int) image_requisition.height; } |