Commit e1634f47 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

replace gboolean free_last in the function parameters with gint depth.

Tue Nov 20 23:01:01 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
        replace gboolean free_last in the function parameters with
        gint depth. Changes to reflect new situation.

        * gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
        replace gboolean free_last, with gint depth, add gint current_depth.
        Changes to reflect new situation.

        * gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
        to reflect new situation

        * gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
parent cbab8636
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
Tue Nov 20 23:01:01 2001 Kristian Rietveld <kristian@planet.nl>
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path):
replace gboolean free_last in the function parameters with
gint depth. Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
replace gboolean free_last, with gint depth, add gint current_depth.
Changes to reflect new situation.
* gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): changes
to reflect new situation
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): ditto
Tue Nov 20 12:37:10 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
......
......@@ -1182,7 +1182,8 @@ gtk_tree_model_foreach (GtkTreeModel *model,
static void gtk_tree_row_reference_unref_path (GtkTreePath *path,
GtkTreeModel *model,
gboolean free_last);
gint depth);
#define ROW_REF_DATA_STRING "gtk-tree-row-refs"
......@@ -1323,7 +1324,7 @@ gtk_tree_row_ref_deleted_callback (GObject *object,
/* We know it affects us. */
if (path->indices[i] == reference->path->indices[i])
{
gtk_tree_row_reference_unref_path (reference->path, reference->model, FALSE);
gtk_tree_row_reference_unref_path (reference->path, reference->model, reference->path->depth - 1);
gtk_tree_path_free (reference->path);
reference->path = NULL;
}
......@@ -1412,32 +1413,30 @@ gtk_tree_row_reference_unref_path_helper (GtkTreePath *path,
GtkTreeModel *model,
GtkTreeIter *parent_iter,
gint depth,
gboolean free_last)
gint current_depth)
{
GtkTreeIter iter;
if (free_last == FALSE && path->depth - 1 == depth)
return;
if (path->depth == depth)
if (depth == current_depth)
return;
gtk_tree_model_iter_nth_child (model, &iter, parent_iter, path->indices[depth]);
gtk_tree_row_reference_unref_path_helper (path, model, &iter, depth + 1, free_last);
gtk_tree_model_iter_nth_child (model, &iter, parent_iter, path->indices[current_depth]);
gtk_tree_row_reference_unref_path_helper (path, model, &iter, depth, current_depth + 1);
gtk_tree_model_unref_node (model, &iter);
}
static void
gtk_tree_row_reference_unref_path (GtkTreePath *path,
GtkTreeModel *model,
gboolean free_last)
gint depth)
{
GtkTreeIter iter;
if (free_last == FALSE && path->depth == 1)
if (depth <= 0)
return;
gtk_tree_model_iter_nth_child (model, &iter, NULL, path->indices[0]);
gtk_tree_row_reference_unref_path_helper (path, model, &iter, 1, free_last);
gtk_tree_row_reference_unref_path_helper (path, model, &iter, depth, 1);
gtk_tree_model_unref_node (model, &iter);
}
......@@ -1620,7 +1619,7 @@ gtk_tree_row_reference_free (GtkTreeRowReference *reference)
if (reference->path)
{
gtk_tree_row_reference_unref_path (reference->path, reference->model, TRUE);
gtk_tree_row_reference_unref_path (reference->path, reference->model, reference->path->depth);
gtk_tree_path_free (reference->path);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment