summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-sidebar.c
diff options
context:
space:
mode:
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);