summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-03-05 08:17:55 +0100
committerZenWalker <[email protected]>2019-03-29 15:51:25 +0100
commit26800580d62402e4b3390743205fefe2732ac394 (patch)
treecca685061aecaa60512bbb3872acf3ca7d3435b3
parent6b9bed243b886ba59033addf172c857048f074c2 (diff)
downloadcaja-26800580d62402e4b3390743205fefe2732ac394.tar.bz2
caja-26800580d62402e4b3390743205fefe2732ac394.tar.xz
eel: remove g_object_list_copy
GNOME/nautilus@7af24a8 Replace GList * eel_g_object_list_copy (GList *list) with g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL)
-rw-r--r--eel/eel-glib-extensions.c12
-rw-r--r--eel/eel-glib-extensions.h1
-rw-r--r--libcaja-private/caja-file-operations.c10
-rw-r--r--libcaja-private/caja-progress-info.c2
-rw-r--r--src/caja-window-manage-views.c4
-rw-r--r--src/caja-window.c2
-rw-r--r--src/file-manager/fm-directory-view.c2
7 files changed, 10 insertions, 23 deletions
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c
index 3d8ba1a5..a32c2bba 100644
--- a/eel/eel-glib-extensions.c
+++ b/eel/eel-glib-extensions.c
@@ -697,18 +697,6 @@ eel_g_object_list_ref (GList *list)
}
/**
- * 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)
-{
- return g_list_copy (eel_g_object_list_ref (list));
-}
-
-/**
* eel_add_weak_pointer
*
* Nulls out a saved reference to an object when the object gets destroyed.
diff --git a/eel/eel-glib-extensions.h b/eel/eel-glib-extensions.h
index a8b45ff7..089bbe98 100644
--- a/eel/eel-glib-extensions.h
+++ b/eel/eel-glib-extensions.h
@@ -66,7 +66,6 @@ int eel_g_str_list_index (GList *
/* List functions for lists of objects */
GList * eel_g_object_list_ref (GList *list);
-GList * eel_g_object_list_copy (GList *list);
/* GHashTable functions */
GHashTable *eel_g_hash_table_new_free_at_exit (GHashFunc hash_function,
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c
index c5223d0e..968cf5e6 100644
--- a/libcaja-private/caja-file-operations.c
+++ b/libcaja-private/caja-file-operations.c
@@ -2078,7 +2078,7 @@ trash_or_delete_internal (GList *files,
/* TODO: special case desktop icon link files ... */
job = op_job_new (DeleteJob, parent_window, TRUE, FALSE);
- 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;
@@ -4716,7 +4716,7 @@ caja_file_operations_copy (GList *files,
job->desktop_location = caja_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) {
@@ -5258,7 +5258,7 @@ caja_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) {
@@ -5577,7 +5577,7 @@ caja_file_operations_link (GList *files,
job = op_job_new (CopyMoveJob, parent_window, TRUE, FALSE);
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) {
@@ -5618,7 +5618,7 @@ caja_file_operations_duplicate (GList *files,
job = op_job_new (CopyMoveJob, parent_window, FALSE, contains_multiple_items (files));
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) {
diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c
index dbf3db55..39eb4b71 100644
--- a/libcaja-private/caja-progress-info.c
+++ b/libcaja-private/caja-progress-info.c
@@ -106,7 +106,7 @@ caja_get_all_progress_info (void)
G_LOCK (progress_info);
- l = eel_g_object_list_copy (active_progress_infos);
+ l = g_list_copy_deep (active_progress_infos, (GCopyFunc) g_object_ref, NULL);
G_UNLOCK (progress_info);
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index cf06f8d1..e44240af 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -940,7 +940,7 @@ begin_location_change (CajaWindowSlot *slot,
slot->location_change_type = type;
slot->location_change_distance = distance;
slot->tried_mount = FALSE;
- slot->pending_selection = eel_g_object_list_copy (new_selection);
+ slot->pending_selection = g_list_copy_deep (new_selection, (GCopyFunc) g_object_ref, NULL);
slot->pending_scroll_to = g_strdup (scroll_pos);
@@ -1466,7 +1466,7 @@ load_new_location (CajaWindowSlot *slot,
window = slot->pane->window;
g_assert (CAJA_IS_WINDOW (window));
- selection_copy = eel_g_object_list_copy (selection);
+ selection_copy = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
view = NULL;
diff --git a/src/caja-window.c b/src/caja-window.c
index 9983414e..0cdb2aaf 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -1916,7 +1916,7 @@ caja_get_history_list (void)
static GList *
caja_window_get_history (CajaWindow *window)
{
- return eel_g_object_list_copy (history_list);
+ return g_list_copy_deep (history_list, (GCopyFunc) g_object_ref, NULL);
}
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 1387464b..835d5e81 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1964,7 +1964,7 @@ fm_directory_view_set_selection_locations (CajaView *caja_view,
*/
g_list_free_full (view->details->pending_locations_selected, g_object_unref);
view->details->pending_locations_selected =
- eel_g_object_list_copy (selection_locations);
+ g_list_copy_deep (selection_locations, (GCopyFunc) g_object_ref, NULL);
}
}