summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-window.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-window.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-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);