summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file-operations.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-23 03:09:17 -0800
committerStefano Karapetsas <[email protected]>2012-11-23 03:09:17 -0800
commitf6f5c1bb6d060aff5fb334017c640733675c2ae2 (patch)
treecde88ea4e11a2f0809da857feaefa6824d4ba8fa /libcaja-private/caja-file-operations.c
parentcbfe84ee50d01e523472a8e086add01245fad6bb (diff)
parentae06676815e24a27549e0c79a74bc81c77822554 (diff)
downloadcaja-f6f5c1bb6d060aff5fb334017c640733675c2ae2.tar.bz2
caja-f6f5c1bb6d060aff5fb334017c640733675c2ae2.tar.xz
Merge pull request #56 from jasmineaura/develop
[all] add and use glibcompat.h for glib-2.27.2 forward-compat
Diffstat (limited to 'libcaja-private/caja-file-operations.c')
-rw-r--r--libcaja-private/caja-file-operations.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c
index 067f52d5..baaa8843 100644
--- a/libcaja-private/caja-file-operations.c
+++ b/libcaja-private/caja-file-operations.c
@@ -68,6 +68,8 @@
#include "caja-file-conflict-dialog.h"
#include "caja-undostack-manager.h"
+#include <src/glibcompat.h> /* for g_list_free_full */
+
/* TODO: TESTING!!! */
typedef struct {
@@ -1858,8 +1860,7 @@ delete_job_done (gpointer user_data)
job = user_data;
- g_list_foreach(job->files, (GFunc) g_object_unref, NULL);
- g_list_free(job->files);
+ g_list_free_full (job->files, g_object_unref);
if (job->done_callback) {
debuting_uris = g_hash_table_new_full (g_file_hash, (GEqualFunc)g_file_equal, g_object_unref, NULL);
@@ -2188,8 +2189,7 @@ has_trash_files (GMount *mount)
}
}
- g_list_foreach(dirs, (GFunc) g_object_unref, NULL);
- g_list_free(dirs);
+ g_list_free_full (dirs, g_object_unref);
return res;
}
@@ -4462,8 +4462,7 @@ copy_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
- g_list_foreach(job->files, (GFunc) g_object_unref, NULL);
- g_list_free(job->files);
+ g_list_free_full (job->files, g_object_unref);
if (job->destination) {
g_object_unref (job->destination);
}
@@ -4990,8 +4989,7 @@ move_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
- g_list_foreach(job->files, (GFunc) g_object_unref, NULL);
- g_list_free(job->files);
+ g_list_free_full (job->files, g_object_unref);
g_object_unref (job->destination);
g_hash_table_unref (job->debuting_files);
g_free (job->icon_positions);
@@ -5071,8 +5069,7 @@ move_job (GIOSchedulerJob *io_job,
&source_info, &transfer_info);
aborted:
- g_list_foreach(fallbacks, (GFunc) g_free, NULL);
- g_list_free(fallbacks);
+ g_list_free_full (fallbacks, g_free);
g_free (dest_fs_id);
g_free (dest_fs_type);
@@ -5326,8 +5323,7 @@ link_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
- g_list_foreach(job->files, (GFunc) g_object_unref, NULL);
- g_list_free(job->files);
+ g_list_free_full (job->files, g_object_unref);
g_object_unref (job->destination);
g_hash_table_unref (job->debuting_files);
g_free (job->icon_positions);
@@ -5779,8 +5775,7 @@ caja_file_operations_copy_move (const GList *item_uris,
done_callback, done_callback_data);
}
- g_list_foreach(locations, (GFunc) g_object_unref, NULL);
- g_list_free(locations);
+ g_list_free_full (locations, g_object_unref);
if (dest) {
g_object_unref (dest);
}
@@ -6258,8 +6253,7 @@ empty_trash_job_done (gpointer user_data)
job = user_data;
- g_list_foreach(job->trash_dirs, (GFunc) g_object_unref, NULL);
- g_list_free(job->trash_dirs);
+ g_list_free_full (job->trash_dirs, g_object_unref);
if (job->done_callback) {
job->done_callback (job->done_callback_data);