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

so this function was completely broken. Fix it and improve readability.

Thu Apr 18 00:23:31 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c
        (gtk_tree_model_sort_convert_path_to_child_path): so this function
        was completely broken. Fix it and improve readability.
parent 9d03f7d6
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelsort.c
(gtk_tree_model_sort_convert_path_to_child_path): so this function
was completely broken. Fix it and improve readability.
2002-04-17 Anders Carlsson <andersca@gnu.org>
* tests/testtreeedit.c (button_press_event): Add a small
......
......@@ -1964,19 +1964,26 @@ gtk_tree_model_sort_convert_path_to_child_path (GtkTreeModelSort *tree_model_sor
for (i = 0; i < gtk_tree_path_get_depth (sorted_path); i++)
{
gint count = sorted_indices[i];
if ((level == NULL) ||
(level->array->len <= sorted_indices[i]))
(level->array->len <= count))
{
gtk_tree_path_free (retval);
return NULL;
}
if (g_array_index (level->array, SortElt, sorted_indices[i]).children == NULL)
gtk_tree_model_sort_build_level (tree_model_sort, level, &g_array_index (level->array, SortElt, sorted_indices[i]));
if (g_array_index (level->array, SortElt, count).children == NULL)
gtk_tree_model_sort_build_level (tree_model_sort, level, &g_array_index (level->array, SortElt, count));
if (level == NULL)
break;
{
gtk_tree_path_free (retval);
break;
}
gtk_tree_path_append_index (retval, g_array_index (level->array, SortElt, i).offset);
gtk_tree_path_append_index (retval, g_array_index (level->array, SortElt, count).offset);
level = g_array_index (level->array, SortElt, count).children;
}
return retval;
......
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