GTK3: don't use deprecated gtk_widget_size_request

gtk_widget_size_request --> gtk_widget_get_preferred_size
master-1.22
raveit65 2016-03-09 23:16:53 +01:00
parent 5102ba128c
commit b0a09479dc
1 changed files with 5 additions and 0 deletions

View File

@ -395,8 +395,13 @@ position_menu_under_widget (GtkMenu *menu,
gtk_widget_get_allocation (widget, &widget_allocation); gtk_widget_get_allocation (widget, &widget_allocation);
container = gtk_widget_get_ancestor (widget, GTK_TYPE_CONTAINER); 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 (widget, &req);
gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
#endif
screen = gtk_widget_get_screen (GTK_WIDGET (menu)); screen = gtk_widget_get_screen (GTK_WIDGET (menu));
monitor_num = gdk_screen_get_monitor_at_window (screen, widget_window); monitor_num = gdk_screen_get_monitor_at_window (screen, widget_window);