diff options
author | raveit65 <[email protected]> | 2016-06-14 23:05:32 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-06-15 09:47:26 +0200 |
commit | a5649ef2832cbb2690e1a44799298bca86556a30 (patch) | |
tree | a8d646699f0b60ccdeb92e3e8731925f528c8f66 | |
parent | 0c4d431d0407e0c77a58e3eb35f7037cf84e5471 (diff) | |
download | mate-desktop-a5649ef2832cbb2690e1a44799298bca86556a30.tar.bz2 mate-desktop-a5649ef2832cbb2690e1a44799298bca86556a30.tar.xz |
GTK+-3 mate-colorsel: do not use deprecated gtk_widget_size_request
-rw-r--r-- | libmate-desktop/mate-colorsel.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 <glib/gi18n-lib.h> #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); |