Commit d5a1402c authored by Ernestas Kulik's avatar Ernestas Kulik 🦑 Committed by Carlos Soriano

view-model: Remove unused function

The only use of nautilus_view_model_set_items() has been replaced with
nautilus_view_model_add_items().

Related: https://bugzilla.gnome.org/show_bug.cgi?id=795307
parent 8c9203d6
Pipeline #10369 passed with stage
in 7 minutes and 31 seconds
......@@ -284,31 +284,3 @@ nautilus_view_model_add_items (NautilusViewModel *self,
g_list_store_sort (self->internal_model, compare_data_func, self);
}
void
nautilus_view_model_set_items (NautilusViewModel *self,
GQueue *items)
{
g_autofree gpointer *array = NULL;
GList *l;
int i = 0;
array = g_malloc_n (g_queue_get_length (items),
sizeof (NautilusViewItemModel *));
g_hash_table_remove_all (self->map_files_to_model);
for (l = g_queue_peek_head_link (items); l != NULL; l = l->next)
{
array[i] = l->data;
g_hash_table_insert (self->map_files_to_model,
nautilus_view_item_model_get_file (l->data),
l->data);
i++;
}
g_list_store_splice (self->internal_model,
0, g_list_model_get_n_items (G_LIST_MODEL (self->internal_model)),
array, g_queue_get_length (items));
g_list_store_sort (self->internal_model, compare_data_func, self);
}
......@@ -36,6 +36,5 @@ void nautilus_view_model_add_item (NautilusViewModel *self,
NautilusViewItemModel *item);
void nautilus_view_model_add_items (NautilusViewModel *self,
GQueue *items);
void nautilus_view_model_set_items (NautilusViewModel *self,
GQueue *items);
G_END_DECLS
\ No newline at end of file
G_END_DECLS
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