Commit 7af24a89 authored by Cosimo Cecchi's avatar Cosimo Cecchi

all: don't use eel_g_object_list_copy()

Use g_list_copy_deep() instead.
parent d5492dc6
......@@ -237,19 +237,6 @@ eel_g_hash_table_safe_for_each (GHashTable *hash_table,
g_list_free (flattened.values);
}
/**
* eel_g_object_list_copy
*
* Copy the list of objects, ref'ing each one.
* @list: GList of objects.
**/
GList *
eel_g_object_list_copy (GList *list)
{
g_list_foreach (list, (GFunc) g_object_ref, NULL);
return g_list_copy (list);
}
#if !defined (EEL_OMIT_SELF_CHECK)
static gboolean
......
......@@ -50,9 +50,6 @@ gboolean eel_g_str_list_equal (GList *
GList *str_list_b);
GList * eel_g_str_list_copy (GList *str_list);
/* List functions for lists of objects */
GList * eel_g_object_list_copy (GList *list);
/* GHashTable functions */
void eel_g_hash_table_safe_for_each (GHashTable *hash_table,
GHFunc callback,
......
......@@ -1978,7 +1978,7 @@ trash_or_delete_internal (GList *files,
/* TODO: special case desktop icon link files ... */
job = op_job_new (DeleteJob, parent_window);
job->files = eel_g_object_list_copy (files);
job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
job->try_trash = try_trash;
job->user_cancel = FALSE;
job->done_callback = done_callback;
......@@ -4656,7 +4656,7 @@ nautilus_file_operations_copy (GList *files,
job->desktop_location = nautilus_get_desktop_location ();
job->done_callback = done_callback;
job->done_callback_data = done_callback_data;
job->files = eel_g_object_list_copy (files);
job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
job->destination = g_object_ref (target_dir);
if (relative_item_points != NULL &&
relative_item_points->len > 0) {
......@@ -5194,7 +5194,7 @@ nautilus_file_operations_move (GList *files,
job->is_move = TRUE;
job->done_callback = done_callback;
job->done_callback_data = done_callback_data;
job->files = eel_g_object_list_copy (files);
job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
job->destination = g_object_ref (target_dir);
if (relative_item_points != NULL &&
relative_item_points->len > 0) {
......@@ -5520,7 +5520,7 @@ nautilus_file_operations_link (GList *files,
job = op_job_new (CopyMoveJob, parent_window);
job->done_callback = done_callback;
job->done_callback_data = done_callback_data;
job->files = eel_g_object_list_copy (files);
job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
job->destination = g_object_ref (target_dir);
if (relative_item_points != NULL &&
relative_item_points->len > 0) {
......@@ -5561,7 +5561,7 @@ nautilus_file_operations_duplicate (GList *files,
job = op_job_new (CopyMoveJob, parent_window);
job->done_callback = done_callback;
job->done_callback_data = done_callback_data;
job->files = eel_g_object_list_copy (files);
job->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
job->destination = NULL;
if (relative_item_points != NULL &&
relative_item_points->len > 0) {
......
......@@ -2577,7 +2577,7 @@ nautilus_view_set_selection (NautilusView *nautilus_view,
*/
g_list_free_full (view->details->pending_selection, g_object_unref);
view->details->pending_selection =
eel_g_object_list_copy (selection);
g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
}
}
......
......@@ -876,7 +876,7 @@ begin_location_change (NautilusWindowSlot *slot,
slot->details->location_change_type = type;
slot->details->location_change_distance = distance;
slot->details->tried_mount = FALSE;
slot->details->pending_selection = eel_g_object_list_copy (new_selection);
slot->details->pending_selection = g_list_copy_deep (new_selection, (GCopyFunc) g_object_ref, NULL);
slot->details->pending_scroll_to = g_strdup (scroll_pos);
......@@ -1397,7 +1397,7 @@ load_new_location (NautilusWindowSlot *slot,
g_assert (slot != NULL);
g_assert (location != NULL);
selection_copy = eel_g_object_list_copy (selection);
selection_copy = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
view = NULL;
nautilus_profile_start (NULL);
......
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