mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
bring zero ref count loops in sync with each other and the sort model.
2006-09-26 Kristian Rietveld <kris@imendio.com> * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_free_level), (gtk_tree_model_filter_ref_node), (gtk_tree_model_filter_real_unref_node): bring zero ref count loops in sync with each other and the sort model.
This commit is contained in:
parent
2d7405d9c6
commit
38dc73faee
@ -1,3 +1,10 @@
|
||||
2006-09-26 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_free_level),
|
||||
(gtk_tree_model_filter_ref_node),
|
||||
(gtk_tree_model_filter_real_unref_node): bring zero ref count loops
|
||||
in sync with each other and the sort model.
|
||||
|
||||
2006-09-26 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_init),
|
||||
|
@ -629,18 +629,14 @@ gtk_tree_model_filter_free_level (GtkTreeModelFilter *filter,
|
||||
FilterLevel *parent_level = filter_level->parent_level;
|
||||
FilterElt *parent_elt = filter_level->parent_elt;
|
||||
|
||||
do
|
||||
while (parent_level)
|
||||
{
|
||||
if (parent_elt)
|
||||
parent_elt->zero_ref_count--;
|
||||
parent_elt->zero_ref_count--;
|
||||
|
||||
if (parent_level)
|
||||
{
|
||||
parent_elt = parent_level->parent_elt;
|
||||
parent_level = parent_level->parent_level;
|
||||
}
|
||||
parent_elt = parent_level->parent_elt;
|
||||
parent_level = parent_level->parent_level;
|
||||
}
|
||||
while (parent_level);
|
||||
|
||||
if (filter_level != filter->priv->root)
|
||||
filter->priv->zero_ref_count--;
|
||||
}
|
||||
@ -2574,19 +2570,16 @@ gtk_tree_model_filter_ref_node (GtkTreeModel *model,
|
||||
FilterElt *parent_elt = level->parent_elt;
|
||||
|
||||
/* we were at zero -- time to decrease the zero_ref_count val */
|
||||
do
|
||||
while (parent_level)
|
||||
{
|
||||
if (parent_elt)
|
||||
parent_elt->zero_ref_count--;
|
||||
parent_elt->zero_ref_count--;
|
||||
|
||||
if (parent_level)
|
||||
{
|
||||
parent_elt = parent_level->parent_elt;
|
||||
parent_level = parent_level->parent_level;
|
||||
}
|
||||
parent_elt = parent_level->parent_elt;
|
||||
parent_level = parent_level->parent_level;
|
||||
}
|
||||
while (parent_level);
|
||||
filter->priv->zero_ref_count--;
|
||||
|
||||
if (filter->priv->root != level)
|
||||
filter->priv->zero_ref_count--;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2637,7 +2630,9 @@ gtk_tree_model_filter_real_unref_node (GtkTreeModel *model,
|
||||
parent_elt = parent_level->parent_elt;
|
||||
parent_level = parent_level->parent_level;
|
||||
}
|
||||
filter->priv->zero_ref_count++;
|
||||
|
||||
if (filter->priv->root != level)
|
||||
filter->priv->zero_ref_count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user