container: Remove duplicated flag

GtkContainer::need_resize and GtkWidget::alloc_needed are the same
thing.
This commit is contained in:
Benjamin Otte 2012-04-09 20:53:37 +02:00
parent 8bda7442c8
commit 090f30c559
4 changed files with 2 additions and 32 deletions

View File

@ -238,7 +238,6 @@ struct _GtkContainerPrivate
guint border_width : 16;
guint has_focus_chain : 1;
guint need_resize : 1;
guint reallocate_redraws : 1;
guint resize_mode : 2;
guint request_mode : 2;
@ -1342,7 +1341,6 @@ gtk_container_init (GtkContainer *container)
priv->focus_child = NULL;
priv->border_width = 0;
priv->need_resize = FALSE;
priv->resize_mode = GTK_RESIZE_PARENT;
priv->reallocate_redraws = FALSE;
}
@ -1724,14 +1722,6 @@ _gtk_container_queue_resize_internal (GtkContainer *container,
break;
}
}
else
{
/* we need to let hidden resize containers know that something
* changed while they where hidden (currently only evaluated by
* toplevels).
*/
GTK_CONTAINER (widget)->priv->need_resize = TRUE;
}
}
}
@ -3346,19 +3336,6 @@ gtk_container_propagate_draw (GtkContainer *container,
cairo_restore (cr);
}
gboolean
_gtk_container_get_need_resize (GtkContainer *container)
{
return container->priv->need_resize;
}
void
_gtk_container_set_need_resize (GtkContainer *container,
gboolean need_resize)
{
container->priv->need_resize = need_resize;
}
gboolean
_gtk_container_get_reallocate_redraws (GtkContainer *container)
{

View File

@ -34,9 +34,6 @@ GList * _gtk_container_focus_sort (GtkContainer *container,
GList *children,
GtkDirectionType direction,
GtkWidget *old_focus);
gboolean _gtk_container_get_need_resize (GtkContainer *container);
void _gtk_container_set_need_resize (GtkContainer *container,
gboolean need_resize);
gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container);

View File

@ -220,13 +220,10 @@ static void
gtk_offscreen_window_show (GtkWidget *widget)
{
gboolean need_resize;
GtkContainer *container;
_gtk_widget_set_visible_flag (widget, TRUE);
container = GTK_CONTAINER (widget);
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
_gtk_container_set_need_resize (container, FALSE);
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
if (need_resize)
gtk_offscreen_window_resize (widget);

View File

@ -4805,8 +4805,7 @@ gtk_window_show (GtkWidget *widget)
_gtk_widget_set_visible_flag (widget, TRUE);
need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
_gtk_container_set_need_resize (container, FALSE);
need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
if (need_resize)
{