From 7a42b9b076d6b831c89bd0b9e996368c1c95aef3 Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Thu, 18 Oct 2012 10:30:31 +0200 Subject: [all] use g_list_free() and g_strcmp0 instead of eel functions Was: general: use g_list_free_full() instead of eel functions http://git.gnome.org/browse/nautilus/commit/?id=5e669515fd7f760382e6b7aa1449734a35a2d7f4 . Instead of g_list_free_full(), we use g_list_foreach and g_list_free() to avoid unnecessary glib dependency bump to 2.28 --- libcaja-private/caja-file-changes-queue.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'libcaja-private/caja-file-changes-queue.c') diff --git a/libcaja-private/caja-file-changes-queue.c b/libcaja-private/caja-file-changes-queue.c index b3cd1db0..39cf123e 100644 --- a/libcaja-private/caja-file-changes-queue.c +++ b/libcaja-private/caja-file-changes-queue.c @@ -24,7 +24,6 @@ #include "caja-file-changes-queue.h" #include "caja-directory-notify.h" -#include #ifdef G_THREADS_ENABLED #define MUTEX_LOCK(a) if ((a) != NULL) g_mutex_lock (a) @@ -289,7 +288,8 @@ pairs_list_free (GList *pairs) } /* delete the list and the now empty pair structs */ - eel_g_list_free_deep (pairs); + g_list_foreach(pairs, (GFunc) g_free, NULL); + g_list_free(pairs); } static void @@ -304,7 +304,8 @@ position_set_list_free (GList *list) g_object_unref (item->location); } /* delete the list and the now empty structs */ - eel_g_list_free_deep (list); + g_list_foreach(list, (GFunc) g_free, NULL); + g_list_free(list); } /* go through changes in the change queue, send ones with the same kind @@ -386,7 +387,8 @@ caja_file_changes_consume_changes (gboolean consume_all) { deletions = g_list_reverse (deletions); caja_directory_notify_files_removed (deletions); - eel_g_object_list_free (deletions); + g_list_foreach(deletions, (GFunc) g_object_unref, NULL); + g_list_free(deletions); deletions = NULL; } if (moves != NULL) @@ -400,14 +402,16 @@ caja_file_changes_consume_changes (gboolean consume_all) { additions = g_list_reverse (additions); caja_directory_notify_files_added (additions); - eel_g_object_list_free (additions); + g_list_foreach(additions, (GFunc) g_object_unref, NULL); + g_list_free(additions); additions = NULL; } if (changes != NULL) { changes = g_list_reverse (changes); caja_directory_notify_files_changed (changes); - eel_g_object_list_free (changes); + g_list_foreach(changes, (GFunc) g_object_unref, NULL); + g_list_free(changes); changes = NULL; } if (position_set_requests != NULL) -- cgit v1.2.1