From b140884fec56d0ac5f15fe3937879a7a1dd6f0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 14 Sep 2010 03:33:06 +0200 Subject: Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598 Signed-off-by: Javier Jardón Signed-off-by: Tristan Van Berkom --- gtk/gtktoolbar.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'gtk/gtktoolbar.c') diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index b6abc357e5..8c943c47e8 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -928,8 +928,9 @@ gtk_toolbar_size_request (GtkWidget *widget, if (priv->show_arrow) { - gtk_widget_size_request (priv->arrow_button, &arrow_requisition); - + gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->arrow_button), + &arrow_requisition, NULL); + if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) long_req = arrow_requisition.width; else @@ -2325,9 +2326,9 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar, g_assert (content); g_assert (toolbar_content_is_placeholder (content)); - - gtk_widget_size_request (GTK_WIDGET (priv->highlight_tool_item), - &requisition); + + gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->highlight_tool_item), + &requisition, NULL); toolbar_content_set_expand (content, gtk_tool_item_get_expand (tool_item)); @@ -2590,10 +2591,12 @@ menu_position_func (GtkMenu *menu, GdkRectangle monitor; gint monitor_num; GdkScreen *screen; - - gtk_widget_size_request (priv->arrow_button, &req); - gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); - + + gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->arrow_button), + &req, NULL); + gtk_size_request_get_size (GTK_SIZE_REQUEST (menu), + &menu_req, NULL); + screen = gtk_widget_get_screen (GTK_WIDGET (menu)); monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (priv->arrow_button)); @@ -3322,8 +3325,8 @@ toolbar_content_size_request (ToolbarContent *content, GtkToolbar *toolbar, GtkRequisition *requisition) { - gtk_widget_size_request (GTK_WIDGET (content->item), - requisition); + gtk_size_request_get_size (GTK_SIZE_REQUEST (content->item), + requisition, NULL); if (content->is_placeholder && content->disappearing) { -- cgit v1.2.1