summaryrefslogtreecommitdiff
path: root/src/terminal-window.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-03-09 23:16:53 +0100
committerraveit65 <[email protected]>2016-03-09 23:16:53 +0100
commitb0a09479dc94e9da575c47976fcd98a69177d968 (patch)
treedf26f593859852db582c2a8cdcf14341e73573c5 /src/terminal-window.c
parent5102ba128c64fc606caec483ed7e3c84974a1073 (diff)
downloadmate-terminal-b0a09479dc94e9da575c47976fcd98a69177d968.tar.bz2
mate-terminal-b0a09479dc94e9da575c47976fcd98a69177d968.tar.xz
GTK3: don't use deprecated gtk_widget_size_request
gtk_widget_size_request --> gtk_widget_get_preferred_size
Diffstat (limited to 'src/terminal-window.c')
-rw-r--r--src/terminal-window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index b2b1295..7415083 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -395,8 +395,13 @@ position_menu_under_widget (GtkMenu *menu,
gtk_widget_get_allocation (widget, &widget_allocation);
container = gtk_widget_get_ancestor (widget, GTK_TYPE_CONTAINER);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_get_preferred_size (widget, &req, NULL);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
+#else
gtk_widget_size_request (widget, &req);
gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
+#endif
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
monitor_num = gdk_screen_get_monitor_at_window (screen, widget_window);