mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-13 04:51:15 +00:00
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:
parent
a5b074c0ea
commit
35bd03e33f
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue