widget: Get rid of unused flags

Now that we clear the cache immediately, there's no need anymore to
track if a request has been queued.
This commit is contained in:
Benjamin Otte 2012-11-13 22:16:51 +01:00
parent c08efb2b32
commit 14c8e33ab9
5 changed files with 3 additions and 51 deletions

View File

@ -1754,8 +1754,6 @@ _gtk_container_queue_resize_internal (GtkContainer *container,
do
{
_gtk_widget_set_alloc_needed (widget, TRUE);
_gtk_widget_set_width_request_needed (widget, TRUE);
_gtk_widget_set_height_request_needed (widget, TRUE);
_gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
if (GTK_IS_RESIZE_CONTAINER (widget))

View File

@ -197,8 +197,6 @@ real_queue_resize (GtkWidget *widget,
GtkWidget *container;
_gtk_widget_set_alloc_needed (widget, TRUE);
_gtk_widget_set_width_request_needed (widget, TRUE);
_gtk_widget_set_height_request_needed (widget, TRUE);
_gtk_size_request_cache_clear (_gtk_widget_peek_request_cache (widget));
container = gtk_widget_get_parent (widget);

View File

@ -354,11 +354,6 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
G_OBJECT_TYPE_NAME (widget), widget, min_size, nat_size, get_vfunc_name (orientation, for_size));
}
if (orientation == GTK_SIZE_GROUP_HORIZONTAL)
_gtk_widget_set_width_request_needed (widget, FALSE);
else
_gtk_widget_set_height_request_needed (widget, FALSE);
adjusted_min = min_size;
adjusted_natural = nat_size;
GTK_WIDGET_GET_CLASS (widget)->adjust_size_request (widget,

View File

@ -344,8 +344,6 @@ struct _GtkWidgetPrivate
/* Queue-resize related flags */
guint alloc_needed : 1;
guint width_request_needed : 1;
guint height_request_needed : 1;
/* Expand-related flags */
guint need_compute_expand : 1; /* Need to recompute computed_[hv]_expand */
@ -3674,8 +3672,6 @@ gtk_widget_init (GtkWidget *widget)
priv->composite_child = composite_child_stack != 0;
priv->double_buffered = TRUE;
priv->redraw_on_alloc = TRUE;
priv->width_request_needed = TRUE;
priv->height_request_needed = TRUE;
priv->alloc_needed = TRUE;
/* this will be set to TRUE if the widget gets a child or if the
@ -4833,7 +4829,6 @@ gtk_widget_size_allocate (GtkWidget *widget,
#endif /* G_ENABLE_DEBUG */
alloc_needed = priv->alloc_needed;
if (!priv->width_request_needed && !priv->height_request_needed)
/* Preserve request/allocate ordering */
priv->alloc_needed = FALSE;
@ -4927,8 +4922,6 @@ gtk_widget_size_allocate (GtkWidget *widget,
g_signal_emit (widget, widget_signals[SIZE_ALLOCATE], 0, &real_allocation);
/* Size allocation is god... after consulting god, no further requests or allocations are needed */
priv->width_request_needed = FALSE;
priv->height_request_needed = FALSE;
priv->alloc_needed = FALSE;
if (gtk_widget_get_mapped (widget))
@ -13793,32 +13786,6 @@ _gtk_widget_set_alloc_needed (GtkWidget *widget,
widget->priv->alloc_needed = alloc_needed;
}
gboolean
_gtk_widget_get_width_request_needed (GtkWidget *widget)
{
return widget->priv->width_request_needed;
}
void
_gtk_widget_set_width_request_needed (GtkWidget *widget,
gboolean width_request_needed)
{
widget->priv->width_request_needed = width_request_needed;
}
gboolean
_gtk_widget_get_height_request_needed (GtkWidget *widget)
{
return widget->priv->height_request_needed;
}
void
_gtk_widget_set_height_request_needed (GtkWidget *widget,
gboolean height_request_needed)
{
widget->priv->height_request_needed = height_request_needed;
}
void
_gtk_widget_add_sizegroup (GtkWidget *widget,
gpointer group)

View File

@ -45,12 +45,6 @@ void _gtk_widget_set_shadowed (GtkWidget *widget,
gboolean _gtk_widget_get_alloc_needed (GtkWidget *widget);
void _gtk_widget_set_alloc_needed (GtkWidget *widget,
gboolean alloc_needed);
gboolean _gtk_widget_get_width_request_needed (GtkWidget *widget);
void _gtk_widget_set_width_request_needed (GtkWidget *widget,
gboolean width_request_needed);
gboolean _gtk_widget_get_height_request_needed (GtkWidget *widget);
void _gtk_widget_set_height_request_needed (GtkWidget *widget,
gboolean height_request_needed);
void _gtk_widget_add_sizegroup (GtkWidget *widget,
gpointer group);