mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
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.
This commit is contained in:
parent
9d03f7d622
commit
a3045c84ef
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user