Commit b140884f authored by Javier Jardon's avatar Javier Jardon

Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598Signed-off-by: Javier Jardon's avatarJavier Jardón <jjardon@gnome.org>
Signed-off-by: default avatarTristan Van Berkom <tristanvb@openismus.com>
parent a18e2370
......@@ -392,7 +392,8 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
s = sin (bin->angle);
c = cos (bin->angle);
......
......@@ -316,7 +316,8 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
requisition->width = border_width * 2 + child_requisition.width + 10;
......
......@@ -58,7 +58,7 @@ of their children.
<para>
The size requisition phase of the widget layout process operates top-down.
It starts at a top-level widget, typically a #GtkWindow. The top-level widget
asks its child for its size requisition by calling gtk_widget_size_request().
asks its child for its size requisition by calling gtk_size_request_get_size().
To determine its requisition, the child asks its own children for their
requisitions and so on. Finally, the top-level widget will get a requisition
back from its child.
......
......@@ -37,7 +37,7 @@ The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
<para>
The #GtkFileChooserButton will ellipsize the label,
and thus will thus request little horizontal space. To give the button
more space, you should call gtk_widget_size_request(),
more space, you should call gtk_size_request_get_size(),
gtk_file_chooser_button_set_width_chars(), or pack the button in
such a way that other interface elements give space to the widget.
</para>
......
......@@ -405,7 +405,8 @@ gtk_accel_label_expose_event (GtkWidget *widget,
ac_width = gtk_accel_label_get_accel_width (accel_label);
gtk_widget_get_allocation (widget, &allocation);
gtk_widget_size_request (widget, &requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
&requisition, NULL);
if (allocation.width >= requisition.width + ac_width)
{
......
......@@ -1157,11 +1157,13 @@ gtk_assistant_size_request (GtkWidget *widget,
GtkAssistantPage *page = list->data;
gint w, h;
gtk_widget_size_request (page->page, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (page->page),
&child_requisition, NULL);
width = MAX (width, child_requisition.width);
height = MAX (height, child_requisition.height);
gtk_widget_size_request (page->title, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (page->title),
&child_requisition, NULL);
w = child_requisition.width;
h = child_requisition.height;
......@@ -1177,16 +1179,19 @@ gtk_assistant_size_request (GtkWidget *widget,
list = list->next;
}
gtk_widget_size_request (priv->sidebar_image, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->sidebar_image),
&child_requisition, NULL);
width += child_requisition.width;
height = MAX (height, child_requisition.height);
gtk_widget_set_size_request (priv->header_image, header_width, header_height);
gtk_widget_size_request (priv->header_image, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->header_image),
&child_requisition, NULL);
width = MAX (width, header_width) + 2 * header_padding;
height += header_height + 2 * header_padding;
gtk_widget_size_request (priv->action_area, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->action_area),
&child_requisition, NULL);
width = MAX (width, child_requisition.width);
height += child_requisition.height + ACTION_AREA_SPACING;
......
......@@ -451,7 +451,8 @@ gtk_button_box_child_requisition (GtkWidget *widget,
if (gtk_widget_get_visible (child))
{
nchildren += 1;
gtk_widget_size_request (child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
&child_requisition, NULL);
avg_w += child_requisition.width + ipad_w;
avg_h += child_requisition.height + ipad_h;
}
......
......@@ -18,15 +18,19 @@
*/
#include "config.h"
#include "gtkcellrendereraccel.h"
#include "gdk/gdkkeysyms.h"
#include "gtkintl.h"
#include "gtkaccelgroup.h"
#include "gtkmarshalers.h"
#include "gtkcellrendereraccel.h"
#include "gtklabel.h"
#include "gtkeventbox.h"
#include "gtkmain.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gdk/gdkkeysyms.h"
static void gtk_cell_renderer_accel_get_property (GObject *object,
......@@ -413,7 +417,8 @@ gtk_cell_renderer_accel_get_size (GtkCellRenderer *cell,
if (priv->sizing_label == NULL)
priv->sizing_label = gtk_label_new (_("New accelerator..."));
gtk_widget_size_request (priv->sizing_label, &requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->sizing_label),
&requisition, NULL);
GTK_CELL_RENDERER_CLASS (gtk_cell_renderer_accel_parent_class)->get_size (cell, widget, cell_area,
x_offset, y_offset, width, height);
......
......@@ -18,11 +18,15 @@
*/
#include "config.h"
#include <stdlib.h>
#include "gtkcellrenderertext.h"
#include <stdlib.h>
#include "gtkeditable.h"
#include "gtkcellsizerequest.h"
#include "gtkentry.h"
#include "gtksizerequest.h"
#include "gtkmarshalers.h"
#include "gtkintl.h"
#include "gtkprivate.h"
......@@ -1928,8 +1932,9 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
g_object_set_data_full (G_OBJECT (priv->entry), I_(GTK_CELL_RENDERER_TEXT_PATH), g_strdup (path), g_free);
gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
gtk_widget_size_request (priv->entry, &requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->entry),
&requisition, NULL);
if (requisition.height < cell_area->height)
{
GtkBorder *style_border;
......
......@@ -238,8 +238,9 @@ gtk_check_button_size_request (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
gtk_widget_size_request (child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
&child_requisition, NULL);
requisition->width += child_requisition.width + indicator_spacing;
requisition->height += child_requisition.height;
......
......@@ -26,12 +26,14 @@
*/
#include "config.h"
#include "gtkcolorsel.h"
#include <math.h>
#include <string.h>
#include "gdkconfig.h"
#include "gdk/gdkkeysyms.h"
#include "gtkcolorsel.h"
#include "gtkhsv.h"
#include "gtkwindow.h"
#include "gtkselection.h"
......@@ -57,6 +59,7 @@
#include "gtksettings.h"
#include "gtkstock.h"
#include "gtkaccessible.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
......@@ -1357,7 +1360,8 @@ popup_position_func (GtkMenu *menu,
gdk_window_get_origin (gtk_widget_get_window (widget),
&root_x, &root_y);
gtk_widget_size_request (GTK_WIDGET (menu), &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu),
&req, NULL);
gtk_widget_get_allocation (widget, &allocation);
/* Put corner of menu centered on color cell */
......
......@@ -1529,7 +1529,8 @@ gtk_combo_box_menu_position_below (GtkMenu *menu,
if (GTK_SHADOW_NONE != combo_box->priv->shadow_type)
sx -= gtk_widget_get_style (GTK_WIDGET (combo_box))->xthickness;
gtk_widget_size_request (GTK_WIDGET (menu), &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu),
&req, NULL);
if (gtk_widget_get_direction (GTK_WIDGET (combo_box)) == GTK_TEXT_DIR_LTR)
*x = sx;
......@@ -1705,14 +1706,16 @@ gtk_combo_box_list_position (GtkComboBox *combo_box,
hpolicy = vpolicy = GTK_POLICY_NEVER;
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
hpolicy, vpolicy);
gtk_widget_size_request (priv->scrolled_window, &popup_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->scrolled_window),
&popup_req, NULL);
if (popup_req.width > *width)
{
hpolicy = GTK_POLICY_ALWAYS;
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
hpolicy, vpolicy);
gtk_widget_size_request (priv->scrolled_window, &popup_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->scrolled_window),
&popup_req, NULL);
}
*height = popup_req.height;
......@@ -2168,7 +2171,8 @@ gtk_combo_box_update_requested_width (GtkComboBox *combo_box,
}
#define GTK_COMBO_BOX_SIZE_ALLOCATE_BUTTON \
gtk_widget_size_request (combo_box->priv->button, &req); \
gtk_size_request_get_size (GTK_SIZE_REQUEST (combo_box->priv->button), \
&req, NULL); \
\
if (is_rtl) \
child.x = allocation->x + shadow_width; \
......@@ -2254,7 +2258,8 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
/* handle the children */
gtk_widget_size_request (priv->arrow, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->arrow),
&req, NULL);
child.width = req.width;
if (!is_rtl)
child.x += width - req.width;
......@@ -2263,7 +2268,8 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (priv->arrow, &child);
if (is_rtl)
child.x += req.width;
gtk_widget_size_request (priv->separator, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->separator),
&req, NULL);
child.width = req.width;
if (!is_rtl)
child.x -= req.width;
......@@ -2910,7 +2916,8 @@ gtk_cell_view_menu_item_new (GtkComboBox *combo_box,
gtk_tree_path_free (path);
gtk_combo_box_sync_cells (combo_box, GTK_CELL_LAYOUT (cell_view));
gtk_widget_size_request (cell_view, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (cell_view),
&req, NULL);
gtk_widget_show (cell_view);
return item;
......
......@@ -25,16 +25,19 @@
*/
#include "config.h"
#include "gtkcontainer.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "gtkcontainer.h"
#include "gtkbuildable.h"
#include "gtkbuilderprivate.h"
#include "gtkprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtksizerequest.h"
#include "gtkwindow.h"
#include "gtkintl.h"
#include "gtktoolbar.h"
......@@ -1482,8 +1485,9 @@ gtk_container_real_check_resize (GtkContainer *container)
GtkWidget *widget = GTK_WIDGET (container);
GtkAllocation allocation;
GtkRequisition requisition;
gtk_widget_size_request (widget, &requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
&requisition, NULL);
gtk_widget_get_allocation (widget, &allocation);
if (requisition.width > allocation.width ||
......
......@@ -8508,7 +8508,8 @@ popup_position_func (GtkMenu *menu,
gtk_menu_set_monitor (menu, monitor_num);
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
gtk_widget_size_request (entry->popup_menu, &menu_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (entry->popup_menu),
&menu_req, NULL);
gdk_drawable_get_size (entry->text_area, NULL, &height);
gtk_entry_get_cursor_locations (entry, CURSOR_STANDARD, &strong_x, NULL);
_gtk_entry_effective_inner_border (entry, &inner_border);
......
......@@ -18,7 +18,9 @@
*/
#include "config.h"
#include "gtkentrycompletion.h"
#include "gtkentryprivate.h"
#include "gtkcelllayout.h"
......@@ -28,6 +30,7 @@
#include "gtktreeselection.h"
#include "gtktreeview.h"
#include "gtkscrolledwindow.h"
#include "gtksizerequest.h"
#include "gtkvbox.h"
#include "gtkwindow.h"
#include "gtkentry.h"
......@@ -1449,9 +1452,11 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
else
gtk_widget_hide (completion->priv->action_view);
gtk_widget_size_request (completion->priv->popup_window, &popup_req);
gtk_widget_size_request (completion->priv->entry, &entry_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (completion->priv->popup_window),
&popup_req, NULL);
gtk_size_request_get_size (GTK_SIZE_REQUEST (completion->priv->entry),
&entry_req, NULL);
if (x < monitor.x)
x = monitor.x;
else if (x + popup_req.width > monitor.x + monitor.width)
......
......@@ -25,7 +25,11 @@
*/
#include "config.h"
#include "gtkeventbox.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
......@@ -499,8 +503,9 @@ gtk_event_box_size_request (GtkWidget *widget,
if (child && gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
gtk_widget_size_request (child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
&child_requisition, NULL);
requisition->width += child_requisition.width;
requisition->height += child_requisition.height;
......
......@@ -21,6 +21,8 @@
#include "config.h"
#include "gtkfilechooserdefault.h"
#include "gdk/gdkkeysyms.h"
#include "gtkalignment.h"
#include "gtkbindings.h"
......@@ -33,7 +35,6 @@
#include "gtkentry.h"
#include "gtkexpander.h"
#include "gtkfilechooserprivate.h"
#include "gtkfilechooserdefault.h"
#include "gtkfilechooserdialog.h"
#include "gtkfilechooserembed.h"
#include "gtkfilechooserentry.h"
......@@ -61,6 +62,7 @@
#include "gtkscrolledwindow.h"
#include "gtkseparatormenuitem.h"
#include "gtksizegroup.h"
#include "gtksizerequest.h"
#include "gtkstock.h"
#include "gtktable.h"
#include "gtktooltip.h"
......@@ -4107,7 +4109,8 @@ popup_position_func (GtkMenu *menu,
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
gtk_widget_size_request (GTK_WIDGET (menu), &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu),
&req, NULL);
gtk_widget_get_allocation (widget, &allocation);
*x += (allocation.width - req.width) / 2;
......@@ -7849,20 +7852,23 @@ gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed,
impl->preview_widget &&
gtk_widget_get_visible (impl->preview_widget))
{
gtk_widget_size_request (impl->preview_box, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (impl->preview_box),
&req, NULL);
*default_width += PREVIEW_HBOX_SPACING + req.width;
}
if (impl->extra_widget &&
gtk_widget_get_visible (impl->extra_widget))
{
gtk_widget_size_request (impl->extra_align, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (impl->extra_align),
&req, NULL);
*default_height += gtk_box_get_spacing (GTK_BOX (chooser_embed)) + req.height;
}
}
else
{
gtk_widget_size_request (GTK_WIDGET (impl), &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (impl),
&req, NULL);
*default_width = req.width;
*default_height = req.height;
}
......
......@@ -20,13 +20,16 @@
*/
#include "config.h"
#include "gtkfilechooserprivate.h"
#include "gtkfilechooserdialog.h"
#include "gtkfilechooserprivate.h"
#include "gtkfilechooserwidget.h"
#include "gtkfilechooserutils.h"
#include "gtkfilechooserembed.h"
#include "gtkfilechoosersettings.h"
#include "gtkfilesystem.h"
#include "gtksizerequest.h"
#include "gtktypebuiltins.h"
#include "gtkintl.h"
......@@ -196,8 +199,10 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
{
/* Force a size request of everything before we start. This will make sure
* that widget->requisition is meaningful. */
gtk_widget_size_request (GTK_WIDGET (dialog), &req);
gtk_widget_size_request (widget, &widget_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (dialog),
&req, NULL);
gtk_size_request_get_size (GTK_SIZE_REQUEST (widget),
&widget_req, NULL);
}
_gtk_file_chooser_embed_get_default_size (GTK_FILE_CHOOSER_EMBED (priv->widget),
......
......@@ -19,15 +19,18 @@
*/
#include "config.h"
#include "gtkfilechooserentry.h"
#include <string.h>
#include "gtkalignment.h"
#include "gtkcelllayout.h"
#include "gtkcellrenderertext.h"
#include "gtkentry.h"
#include "gtkfilechooserentry.h"
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtksizerequest.h"
#include "gtkwindow.h"
#include "gtkintl.h"
......@@ -1023,7 +1026,8 @@ show_completion_feedback_window (GtkFileChooserEntry *chooser_entry)
GtkAllocation entry_allocation;
int feedback_x, feedback_y;
gtk_widget_size_request (chooser_entry->completion_feedback_window, &feedback_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (chooser_entry->completion_feedback_window),
&feedback_req, NULL);
gdk_window_get_origin (gtk_widget_get_window (widget), &entry_x, &entry_y);
gtk_widget_get_allocation (widget, &entry_allocation);
......
......@@ -352,7 +352,8 @@ gtk_fixed_size_request (GtkWidget *widget,
if (gtk_widget_get_visible (child->widget))
{
gtk_widget_size_request (child->widget, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
&child_requisition, NULL);
requisition->height = MAX (requisition->height,
child->y +
......
......@@ -581,7 +581,10 @@ gtk_handle_box_size_request (GtkWidget *widget,
* won't have any useful hint for our size otherwise.
*/
if (child)
gtk_widget_size_request (child, &child_requisition);
{
gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
&child_requisition, NULL);
}
else
{
child_requisition.width = 0;
......
......@@ -1455,8 +1455,9 @@ gtk_icon_view_size_request (GtkWidget *widget,
tmp_list = tmp_list->next;
if (gtk_widget_get_visible (child->widget))
gtk_widget_size_request (child->widget, &child_requisition);
}
gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
&child_requisition, NULL);
}
}
static void
......
......@@ -442,8 +442,8 @@ gtk_image_menu_item_size_request (GtkWidget *widget,
{
GtkRequisition child_requisition;
gtk_widget_size_request (priv->image,
&child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->image),
&child_requisition, NULL);
child_width = child_requisition.width;
child_height = child_requisition.height;
......
......@@ -6137,7 +6137,8 @@ popup_position_func (GtkMenu *menu,
*x += allocation.x;
*y += allocation.y;
gtk_widget_size_request (GTK_WIDGET (menu), &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu),
&req, NULL);
gtk_widget_get_allocation (widget, &allocation);
......
......@@ -995,7 +995,8 @@ gtk_layout_size_request (GtkWidget *widget,
tmp_list = tmp_list->next;
gtk_widget_size_request (child->widget, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child->widget),
&child_requisition, NULL);
}
}
......
......@@ -24,6 +24,8 @@
#include "config.h"
#include "gtklinkbutton.h"
#include <string.h>
#include "gtkclipboard.h"
......@@ -33,12 +35,11 @@
#include "gtkmain.h"
#include "gtkmenu.h"
#include "gtkmenuitem.h"
#include "gtksizerequest.h"
#include "gtkstock.h"
#include "gtkshow.h"
#include "gtktooltip.h"
#include "gtklinkbutton.h"
#include "gtkintl.h"
......@@ -368,7 +369,8 @@ popup_position_func (GtkMenu *menu,
gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
gtk_widget_size_request (priv->popup_menu, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->popup_menu),
&req, NULL);
gtk_widget_get_allocation (widget, &allocation);
*x += allocation.width / 2;
......
......@@ -2051,7 +2051,9 @@ gtk_menu_set_tearoff_hints (GtkMenu *menu,
if (gtk_widget_get_visible (menu->tearoff_scrollbar))
{
GtkRequisition requisition;
gtk_widget_size_request (menu->tearoff_scrollbar, &requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu->tearoff_scrollbar),
&requisition, NULL);
width += requisition.width;
}
......@@ -2203,8 +2205,9 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
/* Update menu->requisition
*/
gtk_widget_size_request (GTK_WIDGET (menu), NULL);
gtk_size_request_get_size (GTK_SIZE_REQUEST (menu),
NULL, NULL);
gtk_menu_set_tearoff_hints (menu, width);
gtk_widget_realize (menu->tearoff_window);
......@@ -5452,7 +5455,8 @@ child_at (GtkMenu *menu,
{
GtkRequisition child_requisition;
gtk_widget_size_request (children->data, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (children->data),
&child_requisition, NULL);
if (_gtk_menu_item_is_selectable (children->data) &&
child_offset >= lower &&
......
......@@ -311,7 +311,8 @@ gtk_menu_bar_size_request (GtkWidget *widget,
gint toggle_size;
GTK_MENU_ITEM (child)->show_submenu_indicator = FALSE;
gtk_widget_size_request (child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
&child_requisition, NULL);
gtk_menu_item_toggle_size_request (GTK_MENU_ITEM (child),
&toggle_size);
......
......@@ -22,12 +22,15 @@
#include "config.h"
#include "gtkmenutoolbutton.h"
#include "gtktogglebutton.h"
#include "gtkarrow.h"
#include "gtkhbox.h"
#include "gtkvbox.h"
#include "gtkmenu.h"
#include "gtkmain.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
......@@ -267,7 +270,8 @@ menu_position_func (GtkMenu *menu,
GdkScreen *screen;
GdkWindow *window;
gtk_widget_size_request (GTK_WIDGET (priv->menu), &menu_req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->menu),
&menu_req, NULL);
orientation = gtk_tool_item_get_orientation (GTK_TOOL_ITEM (button));
direction = gtk_widget_get_direction (widget);
......@@ -307,7 +311,8 @@ menu_position_func (GtkMenu *menu,
else
{
gdk_window_get_origin (GTK_BUTTON (priv->arrow_button)->event_window, x, y);
gtk_widget_size_request (priv->arrow_button, &req);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->arrow_button),
&req, NULL);
gtk_widget_get_allocation (priv->arrow_button, &arrow_allocation);
......
......@@ -1856,8 +1856,9 @@ gtk_notebook_size_request (GtkWidget *widget,
if (gtk_widget_get_visible (page->child))
{
vis_pages++;
gtk_widget_size_request (page->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (page->child),
&child_requisition, NULL);
requisition->width = MAX (requisition->width,
child_requisition.width);
requisition->height = MAX (requisition->height,
......@@ -1913,8 +1914,8 @@ gtk_notebook_size_request (GtkWidget *widget,
if (!gtk_widget_get_visible (page->tab_label))
gtk_widget_show (page->tab_label);
gtk_widget_size_request (page->tab_label,
&child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (page->tab_label),
&child_requisition, NULL);
page->requisition.width = child_requisition.width + 2 * style->xthickness;
page->requisition.height = child_requisition.height + 2 * style->ythickness;
......@@ -1949,7 +1950,8 @@ gtk_notebook_size_request (GtkWidget *widget,
{
if (priv->action_widget[i])
{
gtk_widget_size_request (priv->action_widget[i], &action_widget_requisition[i]);
gtk_size_request_get_size (GTK_SIZE_REQUEST (priv->action_widget[i]),
&action_widget_requisition[i], NULL);
action_widget_requisition[i].width += style->xthickness;
action_widget_requisition[i].height += style->ythickness;
}
......@@ -2711,7 +2713,8 @@ popup_position_func (GtkMenu *menu,
gdk_window_get_origin (gtk_widget_get_window (w), x, y);
gtk_widget_get_allocation (w, &allocation);
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);