Correctly pass iter to gtk_tree_model_rows_reordered() (#315704) Patch

2005-10-03  Alexander Larsson  <alexl@redhat.com>

	* src/file-manager/fm-list-model.c:
	(fm_list_model_sort_file_entries):
	Correctly pass iter to gtk_tree_model_rows_reordered() (#315704)
	Patch from Christian Neumair.
This commit is contained in:
Alexander Larsson 2005-10-03 08:46:24 +00:00 committed by Alexander Larsson
parent a5b074c0ea
commit 35bd03e33f
2 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2005-10-03 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-list-model.c:
(fm_list_model_sort_file_entries):
Correctly pass iter to gtk_tree_model_rows_reordered() (#315704)
Patch from Christian Neumair.
2005-10-03 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-metafile.c:

View file

@ -572,10 +572,12 @@ static void
fm_list_model_sort_file_entries (FMListModel *model, GSequence *files, GtkTreePath *path)
{
GSequencePtr *old_order;
GtkTreeIter iter;
int *new_order;
int length;
int i;
FileEntry *file_entry;
gboolean has_iter;
length = g_sequence_get_length (files);
@ -611,8 +613,17 @@ fm_list_model_sort_file_entries (FMListModel *model, GSequence *files, GtkTreePa
/* Let the world know about our new order */
g_assert (new_order != NULL);
has_iter = FALSE;
if (gtk_tree_path_get_depth (path) != 0) {
gboolean get_iter_result;
has_iter = TRUE;
get_iter_result = gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path);
g_assert (get_iter_result);
}
gtk_tree_model_rows_reordered (GTK_TREE_MODEL (model),
path, NULL, new_order);
path, has_iter ? &iter : NULL, new_order);
g_free (old_order);
g_free (new_order);