summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-22 23:26:38 +0100
committerStefano Karapetsas <[email protected]>2014-01-22 23:26:38 +0100
commita45172bcbc96d1b519a620aa07aa080c26617044 (patch)
treeee6217e8a4a49e4544a9bee2c7f4ffff0ce2c59f /shell/ev-sidebar.c
parent28bc8921c748c954027007ec9dfa1e9970c0ad08 (diff)
downloadatril-a45172bcbc96d1b519a620aa07aa080c26617044.tar.bz2
atril-a45172bcbc96d1b519a620aa07aa080c26617044.tar.xz
Use gtk_widget_get_preferred_size with GTK3
Diffstat (limited to 'shell/ev-sidebar.c')
-rw-r--r--shell/ev-sidebar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c
index 322717b5..4d8a1de0 100644
--- a/shell/ev-sidebar.c
+++ b/shell/ev-sidebar.c
@@ -253,7 +253,11 @@ ev_sidebar_select_button_press_cb (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
gtk_widget_set_size_request (ev_sidebar->priv->menu, -1, -1);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (ev_sidebar->priv->menu, &requisition, NULL);
+#else
gtk_widget_size_request (ev_sidebar->priv->menu, &requisition);
+#endif
gtk_widget_set_size_request (ev_sidebar->priv->menu,
MAX (width, requisition.width), -1);