diff options
author | Jasmine Hassan <[email protected]> | 2012-10-18 10:30:31 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-16 09:49:19 +0200 |
commit | 7a42b9b076d6b831c89bd0b9e996368c1c95aef3 (patch) | |
tree | e878419f312aa059effcd796b11b7f84125e7ad2 /libcaja-private/caja-directory-async.c | |
parent | decb73c787a2709f977305a4a6da052227d7b37d (diff) | |
download | caja-7a42b9b076d6b831c89bd0b9e996368c1c95aef3.tar.bz2 caja-7a42b9b076d6b831c89bd0b9e996368c1c95aef3.tar.xz |
[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
Diffstat (limited to 'libcaja-private/caja-directory-async.c')
-rw-r--r-- | libcaja-private/caja-directory-async.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c index a20d90d7..9694b1b0 100644 --- a/libcaja-private/caja-directory-async.c +++ b/libcaja-private/caja-directory-async.c @@ -34,7 +34,6 @@ #include "caja-link.h" #include "caja-marshal.h" #include <eel/eel-glib-extensions.h> -#include <eel/eel-string.h> #include <gtk/gtk.h> #include <libxml/parser.h> #include <stdio.h> @@ -1080,7 +1079,8 @@ dequeue_pending_idle_callback (gpointer callback_data) file->details->got_mime_list = TRUE; file->details->mime_list_is_up_to_date = TRUE; - eel_g_list_free_deep (file->details->mime_list); + g_list_foreach (file->details->mime_list, (GFunc) g_free, NULL); + g_list_free(file->details->mime_list); file->details->mime_list = istr_set_get_as_list (dir_load_state->load_mime_list_hash); @@ -1093,7 +1093,8 @@ dequeue_pending_idle_callback (gpointer callback_data) } drain: - eel_g_object_list_free (pending_file_info); + g_list_foreach (pending_file_info, (GFunc) g_object_unref, NULL); + g_list_free(pending_file_info); /* Get the state machine running again. */ caja_directory_async_state_changed (directory); @@ -1181,7 +1182,8 @@ file_list_cancel (CajaDirectory *directory) if (directory->details->pending_file_info != NULL) { - eel_g_object_list_free (directory->details->pending_file_info); + g_list_foreach (directory->details->pending_file_info, (GFunc) g_object_unref, NULL); + g_list_free(directory->details->pending_file_info); directory->details->pending_file_info = NULL; } @@ -2786,7 +2788,8 @@ count_more_files_callback (GObject *source_object, state); } - eel_g_object_list_free (files); + g_list_foreach (files, (GFunc) g_object_unref, NULL); + g_list_free(files); if (error) { @@ -3011,7 +3014,8 @@ deep_count_state_free (DeepCountState *state) { g_object_unref (state->deep_count_location); } - eel_g_object_list_free (state->deep_count_subdirectories); + g_list_foreach (state->deep_count_subdirectories, (GFunc) g_object_unref, NULL); + g_list_free(state->deep_count_subdirectories); g_array_free (state->seen_deep_count_inodes, TRUE); g_free (state); } @@ -3319,7 +3323,8 @@ mime_list_done (MimeListState *state, gboolean success) file = state->mime_list_file; file->details->mime_list_is_up_to_date = TRUE; - eel_g_list_free_deep (file->details->mime_list); + g_list_foreach(file->details->mime_list, (GFunc) g_free, NULL); + g_list_free(file->details->mime_list); if (success) { file->details->mime_list_failed = TRUE; @@ -4574,7 +4579,8 @@ get_mount_at (GFile *target) g_object_unref (root); } - eel_g_object_list_free (mounts); + g_list_foreach (mounts, (GFunc) g_object_unref, NULL); + g_list_free(mounts); g_object_unref (monitor); |