summaryrefslogtreecommitdiff
path: root/libslab
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-17 20:06:28 +0200
committerraveit65 <[email protected]>2016-06-17 20:06:28 +0200
commit554624bdc4019360fd3d04ccd5fc5e5be8ebdce5 (patch)
tree6d02039439450f9f19cc9f5546cc7f6af14ddf35 /libslab
parentdce84e781fc99d25ce99aa63b18a139f097743bb (diff)
downloadmate-control-center-554624bdc4019360fd3d04ccd5fc5e5be8ebdce5.tar.bz2
mate-control-center-554624bdc4019360fd3d04ccd5fc5e5be8ebdce5.tar.xz
GTK+-search-context-picker: don't use deprecated gtk_widget_size_request
Diffstat (limited to 'libslab')
-rw-r--r--libslab/search-context-picker.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libslab/search-context-picker.c b/libslab/search-context-picker.c
index d1aca98e..a28cea14 100644
--- a/libslab/search-context-picker.c
+++ b/libslab/search-context-picker.c
@@ -22,6 +22,10 @@
#include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3,0,0)
+#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
+#endif
+
typedef struct
{
GtkImage *cur_icon;
@@ -115,7 +119,7 @@ menu_position_func (GtkMenu * menu, int *x, int *y, gboolean * push_in, gpointer
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{
GtkRequisition req;
- gtk_widget_size_request (GTK_WIDGET (menu), &req);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
*x += allocation.width - req.width;
}