mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
emitting row-has-child-toggled when the level is not in the cache does not
2005-10-24 Kristian Rietveld <kris@gtk.org> * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): emitting row-has-child-toggled when the level is not in the cache does not make sense. (This bug probably crept in during the early stages of GtkTreeModelSort when there wasn't a correct row-has-child-toggled implementation yet), (gtk_tree_model_sort_real_unref_node): only get the child iter when we will actually also use it.
This commit is contained in:
parent
890f4a1789
commit
3fe6e98689
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2005-10-24 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): emitting
|
||||||
|
row-has-child-toggled when the level is not in the cache does not
|
||||||
|
make sense. (This bug probably crept in during the early stages
|
||||||
|
of GtkTreeModelSort when there wasn't a correct row-has-child-toggled
|
||||||
|
implementation yet),
|
||||||
|
(gtk_tree_model_sort_real_unref_node): only get the child iter
|
||||||
|
when we will actually also use it.
|
||||||
|
|
||||||
2005-10-22 Michael Natterer <mitch@imendio.com>
|
2005-10-22 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2005-10-24 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): emitting
|
||||||
|
row-has-child-toggled when the level is not in the cache does not
|
||||||
|
make sense. (This bug probably crept in during the early stages
|
||||||
|
of GtkTreeModelSort when there wasn't a correct row-has-child-toggled
|
||||||
|
implementation yet),
|
||||||
|
(gtk_tree_model_sort_real_unref_node): only get the child iter
|
||||||
|
when we will actually also use it.
|
||||||
|
|
||||||
2005-10-22 Michael Natterer <mitch@imendio.com>
|
2005-10-22 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
|
||||||
|
@ -700,22 +700,6 @@ gtk_tree_model_sort_row_inserted (GtkTreeModel *s_model,
|
|||||||
|
|
||||||
if (!elt->children)
|
if (!elt->children)
|
||||||
{
|
{
|
||||||
GtkTreePath *tmppath;
|
|
||||||
GtkTreeIter tmpiter;
|
|
||||||
|
|
||||||
tmpiter.stamp = tree_model_sort->stamp;
|
|
||||||
tmpiter.user_data = level;
|
|
||||||
tmpiter.user_data2 = elt;
|
|
||||||
|
|
||||||
tmppath = gtk_tree_model_get_path (GTK_TREE_MODEL (data), &tmpiter);
|
|
||||||
if (tmppath)
|
|
||||||
{
|
|
||||||
gtk_tree_model_row_has_child_toggled (GTK_TREE_MODEL (data),
|
|
||||||
tmppath,
|
|
||||||
&tmpiter);
|
|
||||||
gtk_tree_path_free (tmppath);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* not covering this signal */
|
/* not covering this signal */
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -1286,7 +1270,6 @@ gtk_tree_model_sort_real_unref_node (GtkTreeModel *tree_model,
|
|||||||
gboolean propagate_unref)
|
gboolean propagate_unref)
|
||||||
{
|
{
|
||||||
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model;
|
GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model;
|
||||||
GtkTreeIter child_iter;
|
|
||||||
SortLevel *level;
|
SortLevel *level;
|
||||||
SortElt *elt;
|
SortElt *elt;
|
||||||
|
|
||||||
@ -1294,10 +1277,13 @@ gtk_tree_model_sort_real_unref_node (GtkTreeModel *tree_model,
|
|||||||
g_return_if_fail (GTK_TREE_MODEL_SORT (tree_model)->child_model != NULL);
|
g_return_if_fail (GTK_TREE_MODEL_SORT (tree_model)->child_model != NULL);
|
||||||
g_return_if_fail (GTK_TREE_MODEL_SORT (tree_model)->stamp == iter->stamp);
|
g_return_if_fail (GTK_TREE_MODEL_SORT (tree_model)->stamp == iter->stamp);
|
||||||
|
|
||||||
GET_CHILD_ITER (tree_model, &child_iter, iter);
|
|
||||||
|
|
||||||
if (propagate_unref)
|
if (propagate_unref)
|
||||||
gtk_tree_model_unref_node (GTK_TREE_MODEL_SORT (tree_model)->child_model, &child_iter);
|
{
|
||||||
|
GtkTreeIter child_iter;
|
||||||
|
|
||||||
|
GET_CHILD_ITER (tree_model, &child_iter, iter);
|
||||||
|
gtk_tree_model_unref_node (GTK_TREE_MODEL_SORT (tree_model)->child_model, &child_iter);
|
||||||
|
}
|
||||||
|
|
||||||
level = iter->user_data;
|
level = iter->user_data;
|
||||||
elt = iter->user_data2;
|
elt = iter->user_data2;
|
||||||
|
Loading…
Reference in New Issue
Block a user