From 9c41b25138d7bff3554d4be038f92c16d56dc734 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Fri, 20 Nov 2015 00:40:13 +0100 Subject: GTK3: replace depracated gtk_widget_size_request with gtk_widget_get_preferred_size --- pluma/pluma-status-combo-box.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pluma/pluma-status-combo-box.c') diff --git a/pluma/pluma-status-combo-box.c b/pluma/pluma-status-combo-box.c index f138ab2c..aaae9824 100644 --- a/pluma/pluma-status-combo-box.c +++ b/pluma/pluma-status-combo-box.c @@ -180,8 +180,12 @@ menu_position_func (GtkMenu *menu, GtkAllocation allocation; *push_in = FALSE; - + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (gtk_widget_get_toplevel (GTK_WIDGET (menu)), NULL, &request); +#else gtk_widget_size_request (gtk_widget_get_toplevel (GTK_WIDGET (menu)), &request); +#endif /* get the origin... */ gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (combo)), x, y); @@ -205,8 +209,12 @@ button_press_event (GtkWidget *widget, GtkRequisition request; GtkAllocation allocation; gint max_height; - + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (combo->priv->menu, NULL, &request); +#else gtk_widget_size_request (combo->priv->menu, &request); +#endif gtk_widget_get_allocation (GTK_WIDGET (combo), &allocation); /* do something relative to our own height here, maybe we can do better */ -- cgit v1.2.1