summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-navigation-action-widget.c4
-rw-r--r--shell/ev-sidebar.c4
-rw-r--r--shell/ev-utils.c8
3 files changed, 16 insertions, 0 deletions
diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c
index 95c7fdff..57a490ea 100644
--- a/shell/ev-navigation-action-widget.c
+++ b/shell/ev-navigation-action-widget.c
@@ -134,7 +134,11 @@ menu_position_func (GtkMenu *menu,
gint monitor_num;
GdkScreen *screen;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (button->menu), &menu_req, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (button->menu), &menu_req);
+#endif
direction = gtk_widget_get_direction (widget);
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
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);
diff --git a/shell/ev-utils.c b/shell/ev-utils.c
index 83cfcdbc..1363cace 100644
--- a/shell/ev-utils.c
+++ b/shell/ev-utils.c
@@ -225,7 +225,11 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
g_return_if_fail (widget != NULL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (menu), &req);
+#endif
monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
gtk_menu_set_monitor (menu, monitor_num);
@@ -251,7 +255,11 @@ ev_gui_menu_position_tree_selection (GtkMenu *menu,
GtkAllocation allocation;
GdkRectangle visible;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (menu), &req);
+#endif
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
gtk_widget_get_allocation (widget, &allocation);