summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-18 10:30:31 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:49:19 +0200
commit7a42b9b076d6b831c89bd0b9e996368c1c95aef3 (patch)
treee878419f312aa059effcd796b11b7f84125e7ad2 /libcaja-private/caja-file.c
parentdecb73c787a2709f977305a4a6da052227d7b37d (diff)
downloadcaja-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-file.c')
-rw-r--r--libcaja-private/caja-file.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 31863c9c..788eec68 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -816,11 +816,14 @@ finalize (GObject *object)
eel_ref_str_unref (file->details->filesystem_id);
- eel_g_list_free_deep (file->details->mime_list);
-
- eel_g_list_free_deep (file->details->pending_extension_emblems);
- eel_g_list_free_deep (file->details->extension_emblems);
- eel_g_object_list_free (file->details->pending_info_providers);
+ g_list_foreach(file->details->mime_list, (GFunc) g_free, NULL);
+ g_list_free(file->details->mime_list);
+ g_list_foreach(file->details->pending_extension_emblems, (GFunc) g_free, NULL);
+ g_list_free(file->details->pending_extension_emblems);
+ g_list_foreach(file->details->extension_emblems, (GFunc) g_free, NULL);
+ g_list_free(file->details->extension_emblems);
+ g_list_foreach(file->details->pending_info_providers, (GFunc) g_object_unref, NULL);
+ g_list_free(file->details->pending_info_providers);
if (file->details->pending_extension_attributes) {
g_hash_table_destroy (file->details->pending_extension_attributes);
@@ -2994,7 +2997,8 @@ fill_emblem_cache_if_needed (CajaFile *file)
/* Zero-terminate so we can tell where the list ends. */
*scanner = 0;
- eel_g_list_free_deep (keywords);
+ g_list_foreach(keywords, (GFunc) g_free, NULL);
+ g_list_free(keywords);
}
static int
@@ -6601,7 +6605,8 @@ caja_file_get_emblem_icons (CajaFile *file,
icons = g_list_prepend (icons, icon);
}
- eel_g_list_free_deep (keywords);
+ g_list_foreach(keywords, (GFunc) g_free, NULL);
+ g_list_free(keywords);
return icons;
}
@@ -6660,7 +6665,8 @@ sort_keyword_list_and_remove_duplicates (GList *keywords)
if (strcmp ((const char *) p->data, (const char *) p->next->data) == 0) {
duplicate_link = p->next;
keywords = g_list_remove_link (keywords, duplicate_link);
- eel_g_list_free_deep (duplicate_link);
+ g_list_foreach(duplicate_link, (GFunc) g_free, NULL);
+ g_list_free(duplicate_link);
} else {
p = p->next;
}
@@ -7554,7 +7560,8 @@ void
caja_file_invalidate_extension_info_internal (CajaFile *file)
{
if (file->details->pending_info_providers)
- eel_g_object_list_free (file->details->pending_info_providers);
+ g_list_foreach(file->details->pending_info_providers, (GFunc) g_object_unref, NULL);
+ g_list_free(file->details->pending_info_providers);
file->details->pending_info_providers =
caja_module_get_extensions_for_type (CAJA_TYPE_INFO_PROVIDER);
@@ -8376,7 +8383,8 @@ caja_file_invalidate_extension_info (CajaFile *file)
void
caja_file_info_providers_done (CajaFile *file)
{
- eel_g_list_free_deep (file->details->extension_emblems);
+ g_list_foreach(file->details->extension_emblems, (GFunc) g_free, NULL);
+ g_list_free(file->details->extension_emblems);
file->details->extension_emblems = file->details->pending_extension_emblems;
file->details->pending_extension_emblems = NULL;