Changed all the flush apis on GtkCellAreaContext for a single "reset" api.
This commit is contained in:
parent
cbc4416c8e
commit
5df7dab3cf
@ -160,7 +160,7 @@ static GList *list_consecutive_cells (GtkCellAreaBox *box);
|
|||||||
static gint count_expand_groups (GtkCellAreaBox *box);
|
static gint count_expand_groups (GtkCellAreaBox *box);
|
||||||
static void context_weak_notify (GtkCellAreaBox *box,
|
static void context_weak_notify (GtkCellAreaBox *box,
|
||||||
GtkCellAreaBoxContext *dead_context);
|
GtkCellAreaBoxContext *dead_context);
|
||||||
static void flush_contexts (GtkCellAreaBox *box);
|
static void reset_contexts (GtkCellAreaBox *box);
|
||||||
static void init_context_groups (GtkCellAreaBox *box);
|
static void init_context_groups (GtkCellAreaBox *box);
|
||||||
static void init_context_group (GtkCellAreaBox *box,
|
static void init_context_group (GtkCellAreaBox *box,
|
||||||
GtkCellAreaBoxContext *context);
|
GtkCellAreaBoxContext *context);
|
||||||
@ -526,7 +526,7 @@ init_context_group (GtkCellAreaBox *box,
|
|||||||
expand_groups[i] = (group->expand_cells > 0);
|
expand_groups[i] = (group->expand_cells > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This call implies flushing the request info */
|
/* This call implies reseting the request info */
|
||||||
gtk_cell_area_box_init_groups (context, priv->groups->len, expand_groups);
|
gtk_cell_area_box_init_groups (context, priv->groups->len, expand_groups);
|
||||||
g_free (expand_groups);
|
g_free (expand_groups);
|
||||||
}
|
}
|
||||||
@ -549,19 +549,19 @@ init_context_groups (GtkCellAreaBox *box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
flush_contexts (GtkCellAreaBox *box)
|
reset_contexts (GtkCellAreaBox *box)
|
||||||
{
|
{
|
||||||
GtkCellAreaBoxPrivate *priv = box->priv;
|
GtkCellAreaBoxPrivate *priv = box->priv;
|
||||||
GSList *l;
|
GSList *l;
|
||||||
|
|
||||||
/* When the box layout changes, contexts need to
|
/* When the box layout changes, contexts need to
|
||||||
* be flushed and sizes for the box get requested again
|
* be reset and sizes for the box get requested again
|
||||||
*/
|
*/
|
||||||
for (l = priv->contexts; l; l = l->next)
|
for (l = priv->contexts; l; l = l->next)
|
||||||
{
|
{
|
||||||
GtkCellAreaContext *context = l->data;
|
GtkCellAreaContext *context = l->data;
|
||||||
|
|
||||||
gtk_cell_area_context_flush (context);
|
gtk_cell_area_context_reset (context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,7 +858,7 @@ gtk_cell_area_box_set_property (GObject *object,
|
|||||||
box->priv->orientation = g_value_get_enum (value);
|
box->priv->orientation = g_value_get_enum (value);
|
||||||
|
|
||||||
/* Notify that size needs to be requested again */
|
/* Notify that size needs to be requested again */
|
||||||
flush_contexts (box);
|
reset_contexts (box);
|
||||||
break;
|
break;
|
||||||
case PROP_SPACING:
|
case PROP_SPACING:
|
||||||
gtk_cell_area_box_set_spacing (box, g_value_get_int (value));
|
gtk_cell_area_box_set_spacing (box, g_value_get_int (value));
|
||||||
@ -2022,6 +2022,6 @@ gtk_cell_area_box_set_spacing (GtkCellAreaBox *box,
|
|||||||
g_object_notify (G_OBJECT (box), "spacing");
|
g_object_notify (G_OBJECT (box), "spacing");
|
||||||
|
|
||||||
/* Notify that size needs to be requested again */
|
/* Notify that size needs to be requested again */
|
||||||
flush_contexts (box);
|
reset_contexts (box);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,14 @@
|
|||||||
static void gtk_cell_area_box_context_finalize (GObject *object);
|
static void gtk_cell_area_box_context_finalize (GObject *object);
|
||||||
|
|
||||||
/* GtkCellAreaContextClass */
|
/* GtkCellAreaContextClass */
|
||||||
static void gtk_cell_area_box_context_flush_preferred_width (GtkCellAreaContext *context);
|
static void gtk_cell_area_box_context_reset (GtkCellAreaContext *context);
|
||||||
static void gtk_cell_area_box_context_flush_preferred_height (GtkCellAreaContext *context);
|
|
||||||
static void gtk_cell_area_box_context_flush_allocation (GtkCellAreaContext *context);
|
|
||||||
static void gtk_cell_area_box_context_sum_preferred_width (GtkCellAreaContext *context);
|
static void gtk_cell_area_box_context_sum_preferred_width (GtkCellAreaContext *context);
|
||||||
static void gtk_cell_area_box_context_sum_preferred_height (GtkCellAreaContext *context);
|
static void gtk_cell_area_box_context_sum_preferred_height (GtkCellAreaContext *context);
|
||||||
static void gtk_cell_area_box_context_allocate (GtkCellAreaContext *context,
|
static void gtk_cell_area_box_context_allocate (GtkCellAreaContext *context,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
|
||||||
|
/* Internal functions */
|
||||||
static void free_cache_array (GArray *array);
|
static void free_cache_array (GArray *array);
|
||||||
static GArray *group_array_new (GtkCellAreaBoxContext *context);
|
static GArray *group_array_new (GtkCellAreaBoxContext *context);
|
||||||
static GArray *get_array (GtkCellAreaBoxContext *context,
|
static GArray *get_array (GtkCellAreaBoxContext *context,
|
||||||
@ -191,9 +190,7 @@ gtk_cell_area_box_context_class_init (GtkCellAreaBoxContextClass *class)
|
|||||||
/* GObjectClass */
|
/* GObjectClass */
|
||||||
object_class->finalize = gtk_cell_area_box_context_finalize;
|
object_class->finalize = gtk_cell_area_box_context_finalize;
|
||||||
|
|
||||||
context_class->flush_preferred_width = gtk_cell_area_box_context_flush_preferred_width;
|
context_class->reset = gtk_cell_area_box_context_reset;
|
||||||
context_class->flush_preferred_height = gtk_cell_area_box_context_flush_preferred_height;
|
|
||||||
context_class->flush_allocation = gtk_cell_area_box_context_flush_allocation;
|
|
||||||
context_class->sum_preferred_width = gtk_cell_area_box_context_sum_preferred_width;
|
context_class->sum_preferred_width = gtk_cell_area_box_context_sum_preferred_width;
|
||||||
context_class->sum_preferred_height = gtk_cell_area_box_context_sum_preferred_height;
|
context_class->sum_preferred_height = gtk_cell_area_box_context_sum_preferred_height;
|
||||||
|
|
||||||
@ -226,58 +223,37 @@ gtk_cell_area_box_context_finalize (GObject *object)
|
|||||||
* GtkCellAreaContextClass *
|
* GtkCellAreaContextClass *
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
static void
|
static void
|
||||||
gtk_cell_area_box_context_flush_preferred_width (GtkCellAreaContext *context)
|
gtk_cell_area_box_context_reset (GtkCellAreaContext *context)
|
||||||
{
|
{
|
||||||
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context);
|
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context);
|
||||||
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
|
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
|
||||||
|
CachedSize *size;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < priv->base_widths->len; i++)
|
for (i = 0; i < priv->base_widths->len; i++)
|
||||||
{
|
{
|
||||||
CachedSize *size = &g_array_index (priv->base_widths, CachedSize, i);
|
size = &g_array_index (priv->base_widths, CachedSize, i);
|
||||||
|
|
||||||
|
size->min_size = 0;
|
||||||
|
size->nat_size = 0;
|
||||||
|
|
||||||
|
size = &g_array_index (priv->base_heights, CachedSize, i);
|
||||||
|
|
||||||
size->min_size = 0;
|
size->min_size = 0;
|
||||||
size->nat_size = 0;
|
size->nat_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Flush context widths as well */
|
/* Reset context sizes as well */
|
||||||
g_hash_table_remove_all (priv->widths);
|
g_hash_table_remove_all (priv->widths);
|
||||||
|
|
||||||
GTK_CELL_AREA_CONTEXT_CLASS
|
|
||||||
(gtk_cell_area_box_context_parent_class)->flush_preferred_width (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_cell_area_box_context_flush_preferred_height (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context);
|
|
||||||
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
|
|
||||||
gint i;
|
|
||||||
|
|
||||||
for (i = 0; i < priv->base_heights->len; i++)
|
|
||||||
{
|
|
||||||
CachedSize *size = &g_array_index (priv->base_heights, CachedSize, i);
|
|
||||||
|
|
||||||
size->min_size = 0;
|
|
||||||
size->nat_size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Flush context heights as well */
|
|
||||||
g_hash_table_remove_all (priv->heights);
|
g_hash_table_remove_all (priv->heights);
|
||||||
|
|
||||||
GTK_CELL_AREA_CONTEXT_CLASS
|
/* Clear the allocation */
|
||||||
(gtk_cell_area_box_context_parent_class)->flush_preferred_height (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_cell_area_box_context_flush_allocation (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
GtkCellAreaBoxContext *box_context = GTK_CELL_AREA_BOX_CONTEXT (context);
|
|
||||||
GtkCellAreaBoxContextPrivate *priv = box_context->priv;
|
|
||||||
|
|
||||||
g_free (priv->orientation_allocs);
|
g_free (priv->orientation_allocs);
|
||||||
priv->orientation_allocs = NULL;
|
priv->orientation_allocs = NULL;
|
||||||
priv->n_orientation_allocs = 0;
|
priv->n_orientation_allocs = 0;
|
||||||
|
|
||||||
|
GTK_CELL_AREA_CONTEXT_CLASS
|
||||||
|
(gtk_cell_area_box_context_parent_class)->reset (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -522,10 +498,10 @@ gtk_cell_area_box_init_groups (GtkCellAreaBoxContext *box_context,
|
|||||||
g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (box_context));
|
g_return_if_fail (GTK_IS_CELL_AREA_BOX_CONTEXT (box_context));
|
||||||
g_return_if_fail (n_groups == 0 || expand_groups != NULL);
|
g_return_if_fail (n_groups == 0 || expand_groups != NULL);
|
||||||
|
|
||||||
/* When the group dimensions change, all info must be flushed
|
/* When the group dimensions change, all info must be reset
|
||||||
* Note this already clears the min/nat values on the CachedSizes
|
* Note this already clears the min/nat values on the CachedSizes
|
||||||
*/
|
*/
|
||||||
gtk_cell_area_context_flush (GTK_CELL_AREA_CONTEXT (box_context));
|
gtk_cell_area_context_reset (GTK_CELL_AREA_CONTEXT (box_context));
|
||||||
|
|
||||||
priv = box_context->priv;
|
priv = box_context->priv;
|
||||||
g_array_set_size (priv->base_widths, n_groups);
|
g_array_set_size (priv->base_widths, n_groups);
|
||||||
|
@ -39,9 +39,7 @@ static void gtk_cell_area_context_set_property (GObject
|
|||||||
GParamSpec *pspec);
|
GParamSpec *pspec);
|
||||||
|
|
||||||
/* GtkCellAreaContextClass */
|
/* GtkCellAreaContextClass */
|
||||||
static void gtk_cell_area_context_real_flush_preferred_width (GtkCellAreaContext *context);
|
static void gtk_cell_area_context_real_reset (GtkCellAreaContext *context);
|
||||||
static void gtk_cell_area_context_real_flush_preferred_height (GtkCellAreaContext *context);
|
|
||||||
static void gtk_cell_area_context_real_flush_allocation (GtkCellAreaContext *context);
|
|
||||||
static void gtk_cell_area_context_real_allocate (GtkCellAreaContext *context,
|
static void gtk_cell_area_context_real_allocate (GtkCellAreaContext *context,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
@ -96,9 +94,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
|||||||
object_class->set_property = gtk_cell_area_context_set_property;
|
object_class->set_property = gtk_cell_area_context_set_property;
|
||||||
|
|
||||||
/* GtkCellAreaContextClass */
|
/* GtkCellAreaContextClass */
|
||||||
class->flush_preferred_width = gtk_cell_area_context_real_flush_preferred_width;
|
class->reset = gtk_cell_area_context_real_reset;
|
||||||
class->flush_preferred_height = gtk_cell_area_context_real_flush_preferred_height;
|
|
||||||
class->flush_allocation = gtk_cell_area_context_real_flush_allocation;
|
|
||||||
class->sum_preferred_width = NULL;
|
class->sum_preferred_width = NULL;
|
||||||
class->sum_preferred_height = NULL;
|
class->sum_preferred_height = NULL;
|
||||||
class->allocate = gtk_cell_area_context_real_allocate;
|
class->allocate = gtk_cell_area_context_real_allocate;
|
||||||
@ -229,42 +225,25 @@ gtk_cell_area_context_get_property (GObject *object,
|
|||||||
* GtkCellAreaContextClass *
|
* GtkCellAreaContextClass *
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
static void
|
static void
|
||||||
gtk_cell_area_context_real_flush_preferred_width (GtkCellAreaContext *context)
|
gtk_cell_area_context_real_reset (GtkCellAreaContext *context)
|
||||||
{
|
{
|
||||||
GtkCellAreaContextPrivate *priv = context->priv;
|
GtkCellAreaContextPrivate *priv = context->priv;
|
||||||
|
|
||||||
priv->min_width = -1;
|
priv->min_width = -1;
|
||||||
priv->nat_width = -1;
|
priv->nat_width = -1;
|
||||||
|
priv->min_height = -1;
|
||||||
|
priv->nat_height = -1;
|
||||||
|
priv->alloc_width = 0;
|
||||||
|
priv->alloc_height = 0;
|
||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (context));
|
g_object_freeze_notify (G_OBJECT (context));
|
||||||
g_object_notify (G_OBJECT (context), "minimum-width");
|
g_object_notify (G_OBJECT (context), "minimum-width");
|
||||||
g_object_notify (G_OBJECT (context), "natural-width");
|
g_object_notify (G_OBJECT (context), "natural-width");
|
||||||
g_object_thaw_notify (G_OBJECT (context));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_cell_area_context_real_flush_preferred_height (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
GtkCellAreaContextPrivate *priv = context->priv;
|
|
||||||
|
|
||||||
priv->min_height = -1;
|
|
||||||
priv->nat_height = -1;
|
|
||||||
|
|
||||||
g_object_freeze_notify (G_OBJECT (context));
|
|
||||||
g_object_notify (G_OBJECT (context), "minimum-height");
|
g_object_notify (G_OBJECT (context), "minimum-height");
|
||||||
g_object_notify (G_OBJECT (context), "natural-height");
|
g_object_notify (G_OBJECT (context), "natural-height");
|
||||||
g_object_thaw_notify (G_OBJECT (context));
|
g_object_thaw_notify (G_OBJECT (context));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_cell_area_context_real_flush_allocation (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
GtkCellAreaContextPrivate *priv = context->priv;
|
|
||||||
|
|
||||||
priv->alloc_width = 0;
|
|
||||||
priv->alloc_height = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_cell_area_context_real_allocate (GtkCellAreaContext *context,
|
gtk_cell_area_context_real_allocate (GtkCellAreaContext *context,
|
||||||
gint width,
|
gint width,
|
||||||
@ -292,37 +271,11 @@ gtk_cell_area_context_get_area (GtkCellAreaContext *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_cell_area_context_flush (GtkCellAreaContext *context)
|
gtk_cell_area_context_reset (GtkCellAreaContext *context)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
|
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
|
||||||
|
|
||||||
gtk_cell_area_context_flush_preferred_width (context);
|
GTK_CELL_AREA_CONTEXT_GET_CLASS (context)->reset (context);
|
||||||
gtk_cell_area_context_flush_preferred_height (context);
|
|
||||||
gtk_cell_area_context_flush_allocation (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gtk_cell_area_context_flush_preferred_width (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
|
|
||||||
|
|
||||||
GTK_CELL_AREA_CONTEXT_GET_CLASS (context)->flush_preferred_width (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gtk_cell_area_context_flush_preferred_height (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
|
|
||||||
|
|
||||||
GTK_CELL_AREA_CONTEXT_GET_CLASS (context)->flush_preferred_height (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gtk_cell_area_context_flush_allocation (GtkCellAreaContext *context)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GTK_IS_CELL_AREA_CONTEXT (context));
|
|
||||||
|
|
||||||
GTK_CELL_AREA_CONTEXT_GET_CLASS (context)->flush_allocation (context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -53,22 +53,12 @@ struct _GtkCellAreaContextClass
|
|||||||
{
|
{
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
/* Subclasses can use this to flush their alignments/allocations */
|
|
||||||
void (* flush_preferred_width) (GtkCellAreaContext *context);
|
|
||||||
void (* flush_preferred_height) (GtkCellAreaContext *context);
|
|
||||||
void (* flush_allocation) (GtkCellAreaContext *context);
|
|
||||||
|
|
||||||
/* These must be invoked after a series of requests before consulting
|
|
||||||
* the context values, implementors use this to push the overall
|
|
||||||
* requests while acconting for any internal alignments */
|
|
||||||
void (* sum_preferred_width) (GtkCellAreaContext *context);
|
void (* sum_preferred_width) (GtkCellAreaContext *context);
|
||||||
void (* sum_preferred_height) (GtkCellAreaContext *context);
|
void (* sum_preferred_height) (GtkCellAreaContext *context);
|
||||||
|
|
||||||
/* Store an allocation value for a GtkCellArea contextual to a range of
|
|
||||||
* treemodel rows */
|
|
||||||
void (* allocate) (GtkCellAreaContext *context,
|
void (* allocate) (GtkCellAreaContext *context,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void (* reset) (GtkCellAreaContext *context);
|
||||||
|
|
||||||
/* Padding for future expansion */
|
/* Padding for future expansion */
|
||||||
void (*_gtk_reserved1) (void);
|
void (*_gtk_reserved1) (void);
|
||||||
@ -79,26 +69,16 @@ struct _GtkCellAreaContextClass
|
|||||||
|
|
||||||
GType gtk_cell_area_context_get_type (void) G_GNUC_CONST;
|
GType gtk_cell_area_context_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
/* Main apis */
|
||||||
GtkCellArea *gtk_cell_area_context_get_area (GtkCellAreaContext *context);
|
GtkCellArea *gtk_cell_area_context_get_area (GtkCellAreaContext *context);
|
||||||
|
|
||||||
/* Apis for GtkCellArea clients to flush the cache */
|
|
||||||
void gtk_cell_area_context_flush (GtkCellAreaContext *context);
|
|
||||||
void gtk_cell_area_context_flush_preferred_width (GtkCellAreaContext *context);
|
|
||||||
void gtk_cell_area_context_flush_preferred_height (GtkCellAreaContext *context);
|
|
||||||
void gtk_cell_area_context_flush_allocation (GtkCellAreaContext *context);
|
|
||||||
|
|
||||||
/* Apis for GtkCellArea clients to sum up the results of a series of requests, this
|
|
||||||
* call is required to reduce the processing while calculating the size of each row */
|
|
||||||
void gtk_cell_area_context_sum_preferred_width (GtkCellAreaContext *context);
|
void gtk_cell_area_context_sum_preferred_width (GtkCellAreaContext *context);
|
||||||
void gtk_cell_area_context_sum_preferred_height (GtkCellAreaContext *context);
|
void gtk_cell_area_context_sum_preferred_height (GtkCellAreaContext *context);
|
||||||
|
|
||||||
/* Apis to set an allocation size in one dimension or another, the subclass specific context
|
|
||||||
* will store allocated positions/sizes for individual cells or groups of cells */
|
|
||||||
void gtk_cell_area_context_allocate (GtkCellAreaContext *context,
|
void gtk_cell_area_context_allocate (GtkCellAreaContext *context,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
void gtk_cell_area_context_reset (GtkCellAreaContext *context);
|
||||||
|
|
||||||
/* Apis for GtkCellArea clients to consult cached values for multiple GtkTreeModel rows */
|
/* Apis for GtkCellArea clients to consult cached values for a series of GtkTreeModel rows */
|
||||||
void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context,
|
void gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context,
|
||||||
gint *minimum_width,
|
gint *minimum_width,
|
||||||
gint *natural_width);
|
gint *natural_width);
|
||||||
|
@ -1239,7 +1239,7 @@ remove_editable_cb (GtkCellArea *area,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rebuild_and_flush_internals (CellAreaScaffold *scaffold)
|
rebuild_and_reset_internals (CellAreaScaffold *scaffold)
|
||||||
{
|
{
|
||||||
CellAreaScaffoldPrivate *priv = scaffold->priv;
|
CellAreaScaffoldPrivate *priv = scaffold->priv;
|
||||||
gint n_rows;
|
gint n_rows;
|
||||||
@ -1255,9 +1255,9 @@ rebuild_and_flush_internals (CellAreaScaffold *scaffold)
|
|||||||
else
|
else
|
||||||
g_array_set_size (priv->row_data, 0);
|
g_array_set_size (priv->row_data, 0);
|
||||||
|
|
||||||
/* Data changed, lets flush the context and consequently queue resize and
|
/* Data changed, lets reset the context and consequently queue resize and
|
||||||
* start everything over again (note this is definitly far from optimized) */
|
* start everything over again (note this is definitly far from optimized) */
|
||||||
gtk_cell_area_context_flush (priv->context);
|
gtk_cell_area_context_reset (priv->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1266,7 +1266,7 @@ row_changed_cb (GtkTreeModel *model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
CellAreaScaffold *scaffold)
|
CellAreaScaffold *scaffold)
|
||||||
{
|
{
|
||||||
rebuild_and_flush_internals (scaffold);
|
rebuild_and_reset_internals (scaffold);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1275,7 +1275,7 @@ row_inserted_cb (GtkTreeModel *model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
CellAreaScaffold *scaffold)
|
CellAreaScaffold *scaffold)
|
||||||
{
|
{
|
||||||
rebuild_and_flush_internals (scaffold);
|
rebuild_and_reset_internals (scaffold);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1283,7 +1283,7 @@ row_deleted_cb (GtkTreeModel *model,
|
|||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
CellAreaScaffold *scaffold)
|
CellAreaScaffold *scaffold)
|
||||||
{
|
{
|
||||||
rebuild_and_flush_internals (scaffold);
|
rebuild_and_reset_internals (scaffold);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1293,7 +1293,7 @@ rows_reordered_cb (GtkTreeModel *model,
|
|||||||
gint *new_order,
|
gint *new_order,
|
||||||
CellAreaScaffold *scaffold)
|
CellAreaScaffold *scaffold)
|
||||||
{
|
{
|
||||||
rebuild_and_flush_internals (scaffold);
|
rebuild_and_reset_internals (scaffold);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************
|
/*********************************************************
|
||||||
@ -1362,7 +1362,7 @@ cell_area_scaffold_set_model (CellAreaScaffold *scaffold,
|
|||||||
G_CALLBACK (rows_reordered_cb), scaffold);
|
G_CALLBACK (rows_reordered_cb), scaffold);
|
||||||
}
|
}
|
||||||
|
|
||||||
rebuild_and_flush_internals (scaffold);
|
rebuild_and_reset_internals (scaffold);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user