summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-sidebar.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-05-30 17:16:15 +0200
committerraveit65 <[email protected]>2016-05-30 17:16:15 +0200
commitb446782d0f4a7ce1c91a1092c979c5fe2fdbb9dd (patch)
tree1ba68b5ea9267737a91daee002bfa269ac0a25e9 /mate-dictionary/src/gdict-sidebar.c
parente07af0d9049af36e1670a12deff39ea09616b6cd (diff)
downloadmate-utils-b446782d0f4a7ce1c91a1092c979c5fe2fdbb9dd.tar.bz2
mate-utils-b446782d0f4a7ce1c91a1092c979c5fe2fdbb9dd.tar.xz
GTK+3 mdict: do not use deprecated gtk_widget_size_request
Diffstat (limited to 'mate-dictionary/src/gdict-sidebar.c')
-rw-r--r--mate-dictionary/src/gdict-sidebar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mate-dictionary/src/gdict-sidebar.c b/mate-dictionary/src/gdict-sidebar.c
index 9709a78d..c88aebb0 100644
--- a/mate-dictionary/src/gdict-sidebar.c
+++ b/mate-dictionary/src/gdict-sidebar.c
@@ -36,6 +36,10 @@
#include "gdict-sidebar.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
{
guint index;
@@ -176,7 +180,7 @@ gdict_sidebar_select_button_press_cb (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
gtk_widget_set_size_request (sidebar->priv->menu, -1, -1);
- gtk_widget_size_request (sidebar->priv->menu, &req);
+ gtk_widget_get_preferred_size (sidebar->priv->menu, &req, NULL);
gtk_widget_set_size_request (sidebar->priv->menu,
MAX (width, req.width), -1);
gtk_widget_grab_focus (widget);