Commit 5e669515 authored by Cosimo Cecchi's avatar Cosimo Cecchi

general: use g_list_free_full() instead of eel functions

parent 7d05f880
......@@ -2,7 +2,7 @@ AC_PREREQ(2.54)
dnl ===========================================================================
m4_define(glib_minver, 2.27.1)
m4_define(glib_minver, 2.27.2)
m4_define(gnome_desktop_minver, 2.91.0)
m4_define(pango_minver, 1.1.2)
m4_define(gtk_minver, 2.91.3)
......
......@@ -54,18 +54,6 @@ eel_gdk_pixbuf_list_ref (GList *pixbuf_list)
g_list_foreach (pixbuf_list, (GFunc) g_object_ref, NULL);
}
/**
* eel_gdk_pixbuf_list_free
* @pixbuf_list: A list of GdkPixbuf objects.
*
* Unrefs all the pixbufs, then frees the list.
**/
void
eel_gdk_pixbuf_list_free (GList *pixbuf_list)
{
eel_g_list_free_deep_custom (pixbuf_list, (GFunc) g_object_unref, NULL);
}
static void
pixbuf_loader_size_prepared (GdkPixbufLoader *loader,
int width,
......
......@@ -35,9 +35,6 @@
/* Convenience functions for lists of GdkPixbuf objects. */
void eel_gdk_pixbuf_list_ref (GList *pixbuf_list);
void eel_gdk_pixbuf_list_unref (GList *pixbuf_list);
void eel_gdk_pixbuf_list_free (GList *pixbuf_list);
/* Loading a GdkPixbuf with a URI. */
GdkPixbuf * eel_gdk_pixbuf_load_from_stream_at_size (GInputStream *stream,
......
......@@ -352,63 +352,6 @@ eel_g_str_list_index (GList *str_list,
return -1;
}
/**
* eel_g_list_free_deep_custom
*
* Frees the elements of a list and then the list, using a custom free function.
*
* @list: List of elements that can be freed with the provided free function.
* @element_free_func: function to call with the data pointer and user_data to free it.
* @user_data: User data to pass to element_free_func
**/
void
eel_g_list_free_deep_custom (GList *list, GFunc element_free_func, gpointer user_data)
{
g_list_foreach (list, element_free_func, user_data);
g_list_free (list);
}
/**
* eel_g_list_free_deep
*
* Frees the elements of a list and then the list.
* @list: List of elements that can be freed with g_free.
**/
void
eel_g_list_free_deep (GList *list)
{
eel_g_list_free_deep_custom (list, (GFunc) g_free, NULL);
}
/**
* eel_g_list_free_deep_custom
*
* Frees the elements of a list and then the list, using a custom free function.
*
* @list: List of elements that can be freed with the provided free function.
* @element_free_func: function to call with the data pointer and user_data to free it.
* @user_data: User data to pass to element_free_func
**/
void
eel_g_slist_free_deep_custom (GSList *list, GFunc element_free_func, gpointer user_data)
{
g_slist_foreach (list, element_free_func, user_data);
g_slist_free (list);
}
/**
* eel_g_slist_free_deep
*
* Frees the elements of a list and then the list.
* @list: List of elements that can be freed with g_free.
**/
void
eel_g_slist_free_deep (GSList *list)
{
eel_g_slist_free_deep_custom (list, (GFunc) g_free, NULL);
}
/**
* eel_g_strv_find
*
......@@ -714,31 +657,6 @@ eel_g_object_list_ref (GList *list)
return list;
}
/**
* eel_g_object_list_unref
*
* Unref all the objects in a list.
* @list: GList of objects.
**/
void
eel_g_object_list_unref (GList *list)
{
g_list_foreach (list, (GFunc) g_object_unref, NULL);
}
/**
* eel_g_object_list_free
*
* Free a list of objects after unrefing them.
* @list: GList of objects.
**/
void
eel_g_object_list_free (GList *list)
{
eel_g_object_list_unref (list);
g_list_free (list);
}
/**
* eel_g_object_list_copy
*
......@@ -1164,11 +1082,11 @@ eel_self_check_glib_extensions (void)
EEL_CHECK_BOOLEAN_RESULT (eel_g_str_list_equal (compare_list_1, compare_list_4), FALSE);
EEL_CHECK_BOOLEAN_RESULT (eel_g_str_list_equal (compare_list_1, compare_list_5), FALSE);
eel_g_list_free_deep (compare_list_1);
eel_g_list_free_deep (compare_list_2);
eel_g_list_free_deep (compare_list_3);
eel_g_list_free_deep (compare_list_4);
eel_g_list_free_deep (compare_list_5);
g_list_free_full (compare_list_1, g_free);
g_list_free_full (compare_list_2, g_free);
g_list_free_full (compare_list_3, g_free);
g_list_free_full (compare_list_4, g_free);
g_list_free_full (compare_list_5, g_free);
/* eel_g_list_partition */
......
......@@ -54,18 +54,6 @@ GList * eel_g_list_partition (GList *
gpointer user_data,
GList **removed);
/* List functions for lists of g_free'able objects. */
void eel_g_list_free_deep (GList *list);
void eel_g_list_free_deep_custom (GList *list,
GFunc element_free_func,
gpointer user_data);
/* List functions for slists of g_free'able objects. */
void eel_g_slist_free_deep (GSList *list);
void eel_g_slist_free_deep_custom (GSList *list,
GFunc element_free_func,
gpointer user_data);
/* List functions for lists of C strings. */
gboolean eel_g_str_list_equal (GList *str_list_a,
GList *str_list_b);
......@@ -76,8 +64,6 @@ int eel_g_str_list_index (GList *
/* List functions for lists of objects */
GList * eel_g_object_list_ref (GList *list);
void eel_g_object_list_unref (GList *list);
void eel_g_object_list_free (GList *list);
GList * eel_g_object_list_copy (GList *list);
/* GHashTable functions */
......
......@@ -33,7 +33,6 @@
#include <gdk/gdkkeysyms.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-stock-dialogs.h>
#include "nautilus-icon-info.h"
#include "nautilus-global-preferences.h"
......@@ -615,7 +614,7 @@ nautilus_autorun_prepare_combo_box (GtkWidget *combo_box,
if (default_app_info != NULL) {
g_object_unref (default_app_info);
}
eel_g_object_list_free (app_info_list);
g_list_free_full (app_info_list, g_object_unref);
gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (list_store));
g_object_unref (G_OBJECT (list_store));
......
......@@ -33,7 +33,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <eel/eel-glib-extensions.h>
#include <string.h>
typedef struct _TargetCallbackData TargetCallbackData;
......@@ -644,6 +643,6 @@ nautilus_clipboard_clear_if_colliding_uris (GtkWidget *widget,
}
if (clipboard_item_uris) {
eel_g_list_free_deep (clipboard_item_uris);
g_list_free_full (clipboard_item_uris, g_free);
}
}
......@@ -27,7 +27,6 @@
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <eel/eel-glib-extensions.h>
#include "nautilus-debug-log.h"
#include "nautilus-file.h"
......@@ -294,7 +293,7 @@ nautilus_debug_log_with_file_list (gboolean is_milestone, const char *domain, GL
nautilus_debug_logv (is_milestone, domain, uris, format, args);
va_end (args);
eel_g_list_free_deep (uris);
g_list_free_full (uris, g_free);
}
gboolean
......
......@@ -34,7 +34,6 @@
#include "nautilus-link.h"
#include "nautilus-marshal.h"
#include <eel/eel-glib-extensions.h>
#include <eel/eel-string.h>
#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <stdio.h>
......@@ -988,7 +987,7 @@ 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_free_full (file->details->mime_list, g_free);
file->details->mime_list = istr_set_get_as_list
(dir_load_state->load_mime_list_hash);
......@@ -1001,7 +1000,7 @@ dequeue_pending_idle_callback (gpointer callback_data)
}
drain:
eel_g_object_list_free (pending_file_info);
g_list_free_full (pending_file_info, g_object_unref);
/* Get the state machine running again. */
nautilus_directory_async_state_changed (directory);
......@@ -1082,7 +1081,7 @@ file_list_cancel (NautilusDirectory *directory)
}
if (directory->details->pending_file_info != NULL) {
eel_g_object_list_free (directory->details->pending_file_info);
g_list_free_full (directory->details->pending_file_info, g_object_unref);
directory->details->pending_file_info = NULL;
}
......@@ -2515,7 +2514,7 @@ count_more_files_callback (GObject *source_object,
state);
}
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
if (error) {
g_error_free (error);
......@@ -2718,7 +2717,7 @@ deep_count_state_free (DeepCountState *state)
if (state->deep_count_location) {
g_object_unref (state->deep_count_location);
}
eel_g_object_list_free (state->deep_count_subdirectories);
g_list_free_full (state->deep_count_subdirectories, g_object_unref);
g_array_free (state->seen_deep_count_inodes, TRUE);
g_free (state);
}
......@@ -3001,7 +3000,7 @@ 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_free_full (file->details->mime_list, g_free);
if (success) {
file->details->mime_list_failed = TRUE;
file->details->mime_list = NULL;
......@@ -4144,7 +4143,7 @@ get_mount_at (GFile *target)
g_object_unref (root);
}
eel_g_object_list_free (mounts);
g_list_free_full (mounts, g_object_unref);
g_object_unref (monitor);
......
......@@ -171,7 +171,7 @@ nautilus_directory_finalize (GObject *object)
if (directory->details->monitor_list != NULL) {
g_warning ("destroying a NautilusDirectory while it's being monitored");
eel_g_list_free_deep (directory->details->monitor_list);
g_list_free_full (directory->details->monitor_list, g_free);
}
if (directory->details->monitor != NULL) {
......@@ -203,7 +203,7 @@ nautilus_directory_finalize (GObject *object)
g_assert (directory->details->directory_load_in_progress == NULL);
g_assert (directory->details->count_in_progress == NULL);
g_assert (directory->details->dequeue_pending_idle_id == 0);
eel_g_object_list_free (directory->details->pending_file_info);
g_list_free_full (directory->details->pending_file_info, g_object_unref);
EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
......@@ -1030,7 +1030,7 @@ nautilus_directory_notify_files_added_by_uri (GList *uris)
files = nautilus_file_list_from_uris (uris);
nautilus_directory_notify_files_added (files);
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
}
void
......@@ -1077,7 +1077,7 @@ nautilus_directory_notify_files_changed_by_uri (GList *uris)
files = nautilus_file_list_from_uris (uris);
nautilus_directory_notify_files_changed (files);
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
}
void
......@@ -1135,7 +1135,7 @@ nautilus_directory_notify_files_removed_by_uri (GList *uris)
files = nautilus_file_list_from_uris (uris);
nautilus_directory_notify_files_changed (files);
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
}
static void
......
......@@ -128,7 +128,7 @@ nautilus_drag_uri_array_from_selection_list (const GList *selection_list)
uri_list = nautilus_drag_uri_list_from_selection_list (selection_list);
uris = nautilus_drag_uri_array_from_list (uri_list);
eel_g_list_free_deep (uri_list);
g_list_free_full (uri_list, g_free);
return uris;
}
......@@ -1144,7 +1144,7 @@ slot_proxy_handle_drop (GtkWidget *widget,
uri_list,
target_uri,
gdk_drag_context_get_selected_action (context));
eel_g_list_free_deep (uri_list);
g_list_free_full (uri_list, g_free);
} else if (drag_info->info == NAUTILUS_ICON_DND_URI_LIST) {
nautilus_view_drop_proxy_received_uris (target_view,
drag_info->data.uri_list,
......
......@@ -24,7 +24,6 @@
#include "nautilus-file-changes-queue.h"
#include "nautilus-directory-notify.h"
#include <eel/eel-glib-extensions.h>
#ifdef G_THREADS_ENABLED
#define MUTEX_LOCK(a) if ((a) != NULL) g_mutex_lock (a)
......@@ -276,7 +275,7 @@ pairs_list_free (GList *pairs)
}
/* delete the list and the now empty pair structs */
eel_g_list_free_deep (pairs);
g_list_free_full (pairs, g_free);
}
static void
......@@ -290,7 +289,7 @@ 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_free_full (list, g_free);
}
/* go through changes in the change queue, send ones with the same kind
......@@ -366,7 +365,7 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
if (deletions != NULL) {
deletions = g_list_reverse (deletions);
nautilus_directory_notify_files_removed (deletions);
eel_g_object_list_free (deletions);
g_list_free_full (deletions, g_object_unref);
deletions = NULL;
}
if (moves != NULL) {
......@@ -378,13 +377,13 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
if (additions != NULL) {
additions = g_list_reverse (additions);
nautilus_directory_notify_files_added (additions);
eel_g_object_list_free (additions);
g_list_free_full (additions, g_object_unref);
additions = NULL;
}
if (changes != NULL) {
changes = g_list_reverse (changes);
nautilus_directory_notify_files_changed (changes);
eel_g_object_list_free (changes);
g_list_free_full (changes, g_object_unref);
changes = NULL;
}
if (position_set_requests != NULL) {
......
......@@ -1836,8 +1836,8 @@ delete_job_done (gpointer user_data)
GHashTable *debuting_uris;
job = user_data;
eel_g_object_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);
......@@ -2157,7 +2157,7 @@ has_trash_files (GMount *mount)
}
}
eel_g_object_list_free (dirs);
g_list_free_full (dirs, g_object_unref);
return res;
}
......@@ -4421,7 +4421,7 @@ copy_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
eel_g_object_list_free (job->files);
g_list_free_full (job->files, g_object_unref);
if (job->destination) {
g_object_unref (job->destination);
}
......@@ -4934,7 +4934,7 @@ move_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
eel_g_object_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);
......@@ -5014,7 +5014,7 @@ move_job (GIOSchedulerJob *io_job,
&source_info, &transfer_info);
aborted:
eel_g_list_free_deep (fallbacks);
g_list_free_full (fallbacks, g_free);
g_free (dest_fs_id);
g_free (dest_fs_type);
......@@ -5251,7 +5251,7 @@ link_job_done (gpointer user_data)
job->done_callback (job->debuting_files, job->done_callback_data);
}
eel_g_object_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);
......@@ -5671,7 +5671,7 @@ nautilus_file_operations_copy_move (const GList *item_uris,
done_callback, done_callback_data);
}
eel_g_object_list_free (locations);
g_list_free_full (locations, g_object_unref);
if (dest) {
g_object_unref (dest);
}
......@@ -6110,7 +6110,7 @@ empty_trash_job_done (gpointer user_data)
job = user_data;
eel_g_object_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);
......
......@@ -1281,7 +1281,7 @@ nautilus_restore_files_from_trash (GList *files,
parent_window,
NULL, NULL);
eel_g_object_list_free (locations);
g_list_free_full (locations, g_object_unref);
g_object_unref (original_dir_location);
}
......
......@@ -811,12 +811,11 @@ 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_free_full (file->details->mime_list, g_free);
g_list_free_full (file->details->pending_extension_emblems, g_free);
g_list_free_full (file->details->extension_emblems, g_free);
g_list_free_full (file->details->pending_info_providers, g_object_unref);
if (file->details->pending_extension_attributes) {
g_hash_table_destroy (file->details->pending_extension_attributes);
......@@ -6423,8 +6422,8 @@ nautilus_file_get_emblem_icons (NautilusFile *file,
icons = g_list_prepend (icons, icon);
}
eel_g_list_free_deep (keywords);
g_list_free_full (keywords, g_free);
return icons;
}
......@@ -6483,7 +6482,7 @@ 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_free_full (duplicate_link, g_free);
} else {
p = p->next;
}
......@@ -7288,7 +7287,7 @@ void
nautilus_file_invalidate_extension_info_internal (NautilusFile *file)
{
if (file->details->pending_info_providers)
eel_g_object_list_free (file->details->pending_info_providers);
g_list_free_full (file->details->pending_info_providers, g_object_unref);
file->details->pending_info_providers =
nautilus_module_get_extensions_for_type (NAUTILUS_TYPE_INFO_PROVIDER);
......@@ -8111,7 +8110,7 @@ nautilus_file_invalidate_extension_info (NautilusFile *file)
void
nautilus_file_info_providers_done (NautilusFile *file)
{
eel_g_list_free_deep (file->details->extension_emblems);
g_list_free_full (file->details->extension_emblems, g_free);
file->details->extension_emblems = file->details->pending_extension_emblems;
file->details->pending_extension_emblems = NULL;
......
......@@ -299,7 +299,7 @@ nautilus_icon_canvas_item_finalize (GObject *object)
g_object_unref (details->text_util);
}
eel_gdk_pixbuf_list_free (details->emblem_pixbufs);
g_list_free_full (details->emblem_pixbufs, g_object_unref);
g_free (details->editable_text);
g_free (details->additional_text);
g_free (details->attach_points);
......@@ -634,7 +634,7 @@ nautilus_icon_canvas_item_set_emblems (NautilusIconCanvasItem *item,
/* Take in the new list of emblems. */
eel_gdk_pixbuf_list_ref (emblem_pixbufs);
eel_gdk_pixbuf_list_free (item->details->emblem_pixbufs);
g_list_free_full (item->details->emblem_pixbufs, g_object_unref);
item->details->emblem_pixbufs = g_list_copy (emblem_pixbufs);
nautilus_icon_canvas_item_invalidate_bounds_cache (item);
......
......@@ -7114,7 +7114,7 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
/* Let the pixbufs go. */
g_object_unref (pixbuf);
eel_gdk_pixbuf_list_free (emblem_pixbufs);
g_list_free_full (emblem_pixbufs, g_object_unref);
g_free (editable_text);
g_free (additional_text);
......
......@@ -559,7 +559,7 @@ real_directory_notify_files_removed (NautilusDirectory *real_directory)
nautilus_directory_notify_files_removed_by_uri (files);
}
eel_g_list_free_deep (files);
g_list_free_full (files, g_free);
}
static void
......
......@@ -223,7 +223,7 @@ static void
application_launch_parameters_free (ApplicationLaunchParameters *parameters)
{
g_object_unref (parameters->application);
eel_g_list_free_deep (parameters->uris);
g_list_free_full (parameters->uris, g_free);
g_free (parameters);
}
......@@ -481,7 +481,7 @@ nautilus_mime_has_any_applications_for_file (NautilusFile *file)
if (apps) {
result = TRUE;
eel_g_object_list_free (apps);
g_list_free_full (apps, g_object_unref);
} else {
result = FALSE;
}
......@@ -676,7 +676,7 @@ trash_or_delete_files (GtkWindow *parent_window,
nautilus_file_operations_trash_or_delete (locations,
parent_window,
NULL, NULL);
eel_g_object_list_free (locations);
g_list_free_full (locations, g_object_unref);
}
static void
......
......@@ -32,8 +32,6 @@
#include "nautilus-signaller.h"
#include "nautilus-file.h"
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-string.h>
#include <string.h>
#include <glib/gi18n-lib.h>
......@@ -538,8 +536,8 @@ refresh_model (NautilusMimeApplicationChooser *chooser)
if (default_app) {
g_object_unref (default_app);
}
eel_g_object_list_free (applications);
g_list_free_full (applications, g_object_unref);
}
static void
......@@ -642,7 +640,7 @@ set_uri_and_type_for_multiple_files (NautilusMimeApplicationChooser *chooser,
char *extension_current;
extension_current = get_extension_from_file (NAUTILUS_FILE (iter->data));
if (eel_strcmp (first_extension, extension_current)) {
if (g_strcmp0 (first_extension, extension_current)) {
same_extension = FALSE;
g_free (extension_current);
break;
......
......@@ -29,7 +29,6 @@
#include "nautilus-open-with-dialog.h"
#include "nautilus-signaller.h"
#include <eel/eel-glib-extensions.h>
#include <eel/eel-stock-dialogs.h>
#include <string.h>
......@@ -263,7 +262,7 @@ add_or_find_application (NautilusOpenWithDialog *dialog)
}
if (applications != NULL) {
eel_g_object_list_free (applications);
g_list_free_full (applications, g_object_unref);
}
}
......
......@@ -31,10 +31,8 @@
#include "nautilus-icon-info.h"
#include "nautilus-recent.h"
#include "nautilus-desktop-icon-file.h"
#include <eel/eel-glib-extensions.h>
#include <eel/eel-gnome-extensions.h>
#include <eel/eel-stock-dialogs.h>
#include <eel/eel-string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
......@@ -154,7 +152,7 @@ nautilus_launch_application (GAppInfo *application,
uris = g_list_reverse (uris);
nautilus_launch_application_by_uri (application, uris,
parent_window);
eel_g_list_free_deep (uris);
g_list_free_full (uris, g_free);
}
void
......@@ -250,7 +248,7 @@ nautilus_launch_application_by_uri (GAppInfo *application,
}
}
eel_g_object_list_free (locations);
g_list_free_full (locations, g_object_unref);
}
/**
......@@ -410,8 +408,8 @@ nautilus_launch_desktop_file (GdkScreen *screen,
_("To open non-local files copy them to a local folder and then"
" drop them again."),
parent_window);
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
g_object_unref (app_info);
return;
} else if (count != total) {
......@@ -456,8 +454,8 @@ nautilus_launch_desktop_file (GdkScreen *screen,
g_error_free (error);
g_free (message);
}
eel_g_object_list_free (files);
g_list_free_full (files, g_object_unref);
g_object_unref (context);
g_object_unref (app_info);
}
......@@ -117,7 +117,7 @@ nautilus_query_get_mime_types (NautilusQuery *query)
void
nautilus_query_set_mime_types (NautilusQuery *query, GList *mime_types)
{
eel_g_list_free_deep (query->details->mime_types);
g_list_free_full (query->details->mime_types, g_free);
query->details->mime_types = eel_g_str_list_copy (mime_types);