mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 08:40:08 +00:00
Fixed gtk_cell_area_box_context_copy() to also copy it's allocations.
This commit is contained in:
parent
d743ecf82e
commit
41cd9d1394
@ -527,27 +527,37 @@ for_size_copy (gpointer key,
|
|||||||
|
|
||||||
GtkCellAreaBoxContext *
|
GtkCellAreaBoxContext *
|
||||||
gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
|
gtk_cell_area_box_context_copy (GtkCellAreaBox *box,
|
||||||
GtkCellAreaBoxContext *box_context)
|
GtkCellAreaBoxContext *context)
|
||||||
{
|
{
|
||||||
GtkCellAreaBoxContext *context;
|
GtkCellAreaBoxContext *copy;
|
||||||
|
|
||||||
context = g_object_new (GTK_TYPE_CELL_AREA_BOX_CONTEXT,
|
copy = g_object_new (GTK_TYPE_CELL_AREA_BOX_CONTEXT,
|
||||||
"area", box, NULL);
|
"area", box, NULL);
|
||||||
|
|
||||||
gtk_cell_area_box_init_groups (context,
|
gtk_cell_area_box_init_groups (copy,
|
||||||
box_context->priv->base_widths->len,
|
context->priv->base_widths->len,
|
||||||
box_context->priv->expand);
|
context->priv->expand);
|
||||||
|
|
||||||
/* Copy all the arrays */
|
/* Copy the base arrays */
|
||||||
copy_size_array (box_context->priv->base_widths,
|
copy_size_array (context->priv->base_widths,
|
||||||
context->priv->base_widths);
|
copy->priv->base_widths);
|
||||||
copy_size_array (box_context->priv->base_heights,
|
copy_size_array (context->priv->base_heights,
|
||||||
context->priv->base_heights);
|
copy->priv->base_heights);
|
||||||
|
|
||||||
g_hash_table_foreach (box_context->priv->heights,
|
/* Copy each for size */
|
||||||
(GHFunc)for_size_copy, context->priv->heights);
|
g_hash_table_foreach (context->priv->heights,
|
||||||
g_hash_table_foreach (box_context->priv->widths,
|
(GHFunc)for_size_copy, copy->priv->heights);
|
||||||
(GHFunc)for_size_copy, context->priv->widths);
|
g_hash_table_foreach (context->priv->widths,
|
||||||
|
(GHFunc)for_size_copy, copy->priv->widths);
|
||||||
|
|
||||||
|
/* Copy any active allocation */
|
||||||
|
copy->priv->n_orientation_allocs =
|
||||||
|
context->priv->n_orientation_allocs;
|
||||||
|
|
||||||
|
if (copy->priv->n_orientation_allocs)
|
||||||
|
copy->priv->orientation_allocs =
|
||||||
|
g_memdup (context->priv->orientation_allocs,
|
||||||
|
copy->priv->n_orientation_allocs * sizeof (GtkCellAreaBoxAllocation));
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user