From a5649ef2832cbb2690e1a44799298bca86556a30 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Tue, 14 Jun 2016 23:05:32 +0200 Subject: GTK+-3 mate-colorsel: do not use deprecated gtk_widget_size_request --- libmate-desktop/mate-colorsel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libmate-desktop') diff --git a/libmate-desktop/mate-colorsel.c b/libmate-desktop/mate-colorsel.c index 03b30ae..b3a8723 100644 --- a/libmate-desktop/mate-colorsel.c +++ b/libmate-desktop/mate-colorsel.c @@ -35,6 +35,10 @@ #include #include "mate-colorsel.h" +#if !GTK_CHECK_VERSION(3,0,0) +#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y) +#endif + #define DEFAULT_COLOR_PALETTE "#ef2929:#fcaf3e:#fce94f:#8ae234:#729fcf:#ad7fa8:#e9b96e:#888a85:#eeeeec:#cc0000:#f57900:#edd400:#73d216:#3465a4:#75507b:#c17d11:#555753:#d3d7cf:#a40000:#ce5c00:#c4a000:#4e9a06:#204a87:#5c3566:#8f5902:#2e3436:#babdb6:#000000:#2e3436:#555753:#888a85:#babdb6:#d3d7cf:#eeeeec:#f3f3f3:#ffffff" /* Number of elements in the custom palatte */ @@ -1445,7 +1449,7 @@ popup_position_func (GtkMenu *menu, gdk_window_get_origin (gtk_widget_get_window (widget), &root_x, &root_y); - gtk_widget_size_request (GTK_WIDGET (menu), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL); /* Put corner of menu centered on color cell */ gtk_widget_get_allocation (widget, &allocation); -- cgit v1.2.1