From e0e8197e1cb326dca0d34b1aec05bc03f75a940c Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Fri, 8 Feb 2002 17:13:14 +0000 Subject: [PATCH] Pass the ref_node and unref_node calls through to the child model. * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), (gtk_tree_model_sort_unref_node): Pass the ref_node and unref_node calls through to the child model. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktreemodelsort.c | 10 ++++++++++ 8 files changed, 52 insertions(+) diff --git a/ChangeLog b/ChangeLog index b83d399a9d..555002c443 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b83d399a9d..555002c443 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-02-08 Darin Adler + + * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node), + (gtk_tree_model_sort_unref_node): Pass the ref_node and + unref_node calls through to the child model. + 2002-02-08 Laszlo Peter * gtk/gtktextchild.c: s/__FUNCTION__/G_GNUC_FUNCTION/ diff --git a/gtk/gtktreemodelsort.c b/gtk/gtktreemodelsort.c index 50211a9a52..96d8bd6442 100644 --- a/gtk/gtktreemodelsort.c +++ b/gtk/gtktreemodelsort.c @@ -1091,6 +1091,7 @@ gtk_tree_model_sort_ref_node (GtkTreeModel *tree_model, GtkTreeIter *iter) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; + GtkTreeIter child_iter; SortLevel *level; SortElt *elt; @@ -1098,6 +1099,10 @@ gtk_tree_model_sort_ref_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)->stamp == iter->stamp); + GET_CHILD_ITER (tree_model, &child_iter, iter); + + gtk_tree_model_ref_node (GTK_TREE_MODEL_SORT (tree_model)->child_model, &child_iter); + level = iter->user_data; elt = iter->user_data2; @@ -1130,6 +1135,7 @@ gtk_tree_model_sort_unref_node (GtkTreeModel *tree_model, GtkTreeIter *iter) { GtkTreeModelSort *tree_model_sort = (GtkTreeModelSort *) tree_model; + GtkTreeIter child_iter; SortLevel *level; SortElt *elt; @@ -1137,6 +1143,10 @@ gtk_tree_model_sort_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)->stamp == iter->stamp); + 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; elt = iter->user_data2;