summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-dictionary/src/gdict-window.c')
-rw-r--r--mate-dictionary/src/gdict-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index 7c917d36..90356d46 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -61,6 +61,10 @@
#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
#endif
+#if !GTK_CHECK_VERSION(3,0,0)
+#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
+#endif
+
enum
{
COMPLETION_TEXT_COLUMN,
@@ -1651,7 +1655,7 @@ set_window_default_size (GdictWindow *window)
height = font_size * GDICT_WINDOW_ROWS;
/* Use at least the requisition size of the window... */
- gtk_widget_size_request (widget, &req);
+ gtk_widget_get_preferred_size (widget, NULL, &req);
width = MAX (width, req.width);
height = MAX (height, req.height);