[nautilus] general: use g_list_free_full() instead of eel functions
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] general: use g_list_free_full() instead of eel functions
- Date: Sun, 31 Oct 2010 14:30:20 +0000 (UTC)
commit 5e669515fd7f760382e6b7aa1449734a35a2d7f4
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Oct 31 15:31:46 2010 +0100
general: use g_list_free_full() instead of eel functions
configure.in | 2 +-
eel/eel-gdk-pixbuf-extensions.c | 12 ---
eel/eel-gdk-pixbuf-extensions.h | 3 -
eel/eel-glib-extensions.c | 92 +------------------
eel/eel-glib-extensions.h | 14 ---
libnautilus-private/nautilus-autorun.c | 3 +-
libnautilus-private/nautilus-clipboard.c | 3 +-
libnautilus-private/nautilus-debug-log.c | 3 +-
libnautilus-private/nautilus-directory-async.c | 15 ++--
libnautilus-private/nautilus-directory.c | 10 +-
libnautilus-private/nautilus-dnd.c | 4 +-
libnautilus-private/nautilus-file-changes-queue.c | 11 +--
libnautilus-private/nautilus-file-operations.c | 18 ++--
libnautilus-private/nautilus-file-utilities.c | 2 +-
libnautilus-private/nautilus-file.c | 19 ++--
libnautilus-private/nautilus-icon-canvas-item.c | 4 +-
libnautilus-private/nautilus-icon-container.c | 2 +-
libnautilus-private/nautilus-merged-directory.c | 2 +-
libnautilus-private/nautilus-mime-actions.c | 6 +-
.../nautilus-mime-application-chooser.c | 8 +-
libnautilus-private/nautilus-open-with-dialog.c | 3 +-
libnautilus-private/nautilus-program-choosing.c | 14 ++--
libnautilus-private/nautilus-query.c | 2 +-
.../nautilus-search-engine-beagle.c | 3 +-
.../nautilus-search-engine-simple.c | 9 +-
.../nautilus-search-engine-tracker.c | 3 +-
src/file-manager/fm-directory-view.c | 26 +++---
src/file-manager/fm-list-model.c | 8 +-
src/file-manager/fm-list-view.c | 4 +-
src/file-manager/fm-properties-window.c | 12 ++--
src/file-manager/fm-tree-model.c | 3 +-
src/file-manager/fm-tree-view.c | 10 +--
src/nautilus-application.c | 2 +-
src/nautilus-bookmark-list.c | 8 +-
src/nautilus-history-sidebar.c | 4 +-
src/nautilus-navigation-window-slot.c | 4 +-
src/nautilus-pathbar.c | 8 +--
src/nautilus-places-sidebar.c | 6 +-
src/nautilus-query-editor.c | 3 +-
src/nautilus-spatial-window.c | 4 +-
src/nautilus-trash-bar.c | 2 +-
src/nautilus-window-manage-views.c | 18 ++--
src/nautilus-window-slot.c | 2 +-
src/nautilus-window.c | 10 +--
44 files changed, 130 insertions(+), 271 deletions(-)
---
diff --git a/configure.in b/configure.in
index 5375f0e..01c5dfb 100644
--- a/configure.in
+++ b/configure.in
@@ -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)
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c
index e0386cc..f7ec2db 100644
--- a/eel/eel-gdk-pixbuf-extensions.c
+++ b/eel/eel-gdk-pixbuf-extensions.c
@@ -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,
diff --git a/eel/eel-gdk-pixbuf-extensions.h b/eel/eel-gdk-pixbuf-extensions.h
index 5fdf3ad..ae30114 100644
--- a/eel/eel-gdk-pixbuf-extensions.h
+++ b/eel/eel-gdk-pixbuf-extensions.h
@@ -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,
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c
index b0642b6..0817cb9 100644
--- a/eel/eel-glib-extensions.c
+++ b/eel/eel-glib-extensions.c
@@ -353,63 +353,6 @@ eel_g_str_list_index (GList *str_list,
}
/**
- * 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
*
* Get index of string in array of strings.
@@ -715,31 +658,6 @@ eel_g_object_list_ref (GList *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
*
* Copy the list of objects, ref'ing each one.
@@ -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 */
diff --git a/eel/eel-glib-extensions.h b/eel/eel-glib-extensions.h
index 478feb8..72838c1 100644
--- a/eel/eel-glib-extensions.h
+++ b/eel/eel-glib-extensions.h
@@ -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 */
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index c0b99a6..51dc103 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -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));
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 386cf71..2e12d49 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -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);
}
}
diff --git a/libnautilus-private/nautilus-debug-log.c b/libnautilus-private/nautilus-debug-log.c
index e9dd2bc..a2bbe8b 100644
--- a/libnautilus-private/nautilus-debug-log.c
+++ b/libnautilus-private/nautilus-debug-log.c
@@ -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
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
index a669439..4783b6f 100644
--- a/libnautilus-private/nautilus-directory-async.c
+++ b/libnautilus-private/nautilus-directory-async.c
@@ -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);
diff --git a/libnautilus-private/nautilus-directory.c b/libnautilus-private/nautilus-directory.c
index 870aa5b..1c82ba6 100644
--- a/libnautilus-private/nautilus-directory.c
+++ b/libnautilus-private/nautilus-directory.c
@@ -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
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 7858bc3..89c2bcc 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -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,
diff --git a/libnautilus-private/nautilus-file-changes-queue.c b/libnautilus-private/nautilus-file-changes-queue.c
index 50913bf..2e0c309 100644
--- a/libnautilus-private/nautilus-file-changes-queue.c
+++ b/libnautilus-private/nautilus-file-changes-queue.c
@@ -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) {
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index af866c4..1ec07d6 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -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);
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index f7165be..60756a2 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -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);
}
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 489413e..f5bc723 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -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;
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index 8c2e6ea..6808d31 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -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);
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 4e497a4..401744e 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -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);
diff --git a/libnautilus-private/nautilus-merged-directory.c b/libnautilus-private/nautilus-merged-directory.c
index 0810479..2099c81 100644
--- a/libnautilus-private/nautilus-merged-directory.c
+++ b/libnautilus-private/nautilus-merged-directory.c
@@ -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
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index 31aa8f0..8089f18 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -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
diff --git a/libnautilus-private/nautilus-mime-application-chooser.c b/libnautilus-private/nautilus-mime-application-chooser.c
index 08e6109..5e00171 100644
--- a/libnautilus-private/nautilus-mime-application-chooser.c
+++ b/libnautilus-private/nautilus-mime-application-chooser.c
@@ -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;
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index fd6fce9..72cf14c 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -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);
}
}
diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c
index 8d8f749..6ed9b90 100644
--- a/libnautilus-private/nautilus-program-choosing.c
+++ b/libnautilus-private/nautilus-program-choosing.c
@@ -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);
}
diff --git a/libnautilus-private/nautilus-query.c b/libnautilus-private/nautilus-query.c
index 267620d..392aea3 100644
--- a/libnautilus-private/nautilus-query.c
+++ b/libnautilus-private/nautilus-query.c
@@ -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);
}
diff --git a/libnautilus-private/nautilus-search-engine-beagle.c b/libnautilus-private/nautilus-search-engine-beagle.c
index 930923f..5806e82 100644
--- a/libnautilus-private/nautilus-search-engine-beagle.c
+++ b/libnautilus-private/nautilus-search-engine-beagle.c
@@ -25,7 +25,6 @@
#include "nautilus-search-engine-beagle.h"
#include <eel/eel-gtk-macros.h>
-#include <eel/eel-glib-extensions.h>
#include <gmodule.h>
typedef struct _BeagleHit BeagleHit;
@@ -329,7 +328,7 @@ nautilus_search_engine_beagle_start (NautilusSearchEngine *engine)
/* These must live during the lifetime of the query */
g_free (text);
- eel_g_list_free_deep (mimetypes);
+ g_list_free_full (mimetypes, g_free);
}
static void
diff --git a/libnautilus-private/nautilus-search-engine-simple.c b/libnautilus-private/nautilus-search-engine-simple.c
index 3579023..a357704 100644
--- a/libnautilus-private/nautilus-search-engine-simple.c
+++ b/libnautilus-private/nautilus-search-engine-simple.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <glib.h>
#include <eel/eel-gtk-macros.h>
-#include <eel/eel-glib-extensions.h>
#include <gio/gio.h>
#define BATCH_SIZE 500
@@ -132,8 +131,8 @@ search_thread_data_free (SearchThreadData *data)
g_hash_table_destroy (data->visited);
g_object_unref (data->cancellable);
g_strfreev (data->words);
- eel_g_list_free_deep (data->mime_types);
- eel_g_list_free_deep (data->uri_hits);
+ g_list_free_full (data->mime_types, g_free);
+ g_list_free_full (data->uri_hits, g_free);
g_free (data);
}
@@ -171,8 +170,8 @@ search_thread_add_hits_idle (gpointer user_data)
nautilus_search_engine_hits_added (NAUTILUS_SEARCH_ENGINE (hits->thread_data->engine),
hits->uris);
}
-
- eel_g_list_free_deep (hits->uris);
+
+ g_list_free_full (hits->uris, g_free);
g_free (hits);
return FALSE;
diff --git a/libnautilus-private/nautilus-search-engine-tracker.c b/libnautilus-private/nautilus-search-engine-tracker.c
index 775de56..a368c24 100644
--- a/libnautilus-private/nautilus-search-engine-tracker.c
+++ b/libnautilus-private/nautilus-search-engine-tracker.c
@@ -24,7 +24,6 @@
#include <config.h>
#include "nautilus-search-engine-tracker.h"
#include <eel/eel-gtk-macros.h>
-#include <eel/eel-glib-extensions.h>
#include <gmodule.h>
#include <string.h>
@@ -415,7 +414,7 @@ nautilus_search_engine_tracker_start (NautilusSearchEngine *engine)
tracker->details->query_pending = TRUE;
g_free (search_text);
- eel_g_list_free_deep (mimetypes);
+ g_list_free_full (mimetypes, g_free);
}
static void
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 6bab36f..da3207f 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -997,8 +997,8 @@ delete_selected_files (FMDirectoryView *view)
locations = g_list_reverse (locations);
nautilus_file_operations_delete (locations, fm_directory_view_get_containing_window (view), NULL, NULL);
-
- eel_g_object_list_free (locations);
+
+ g_list_free_full (locations, g_object_unref);
nautilus_file_list_free (selection);
}
@@ -1867,7 +1867,7 @@ fm_directory_view_set_selection_locations (NautilusView *nautilus_view,
/* If we are still loading, set the list of pending URIs instead.
* done_loading() will eventually select the pending URIs and reveal them.
*/
- eel_g_object_list_free (view->details->pending_locations_selected);
+ g_list_free_full (view->details->pending_locations_selected, g_object_unref);
view->details->pending_locations_selected =
eel_g_object_list_copy (selection_locations);
}
@@ -2452,7 +2452,7 @@ done_loading (FMDirectoryView *view,
fm_directory_view_reveal_selection (view);
}
}
- eel_g_object_list_free (locations_selected);
+ g_list_free_full (locations_selected, g_object_unref);
fm_directory_view_display_selection_info (view);
}
@@ -3650,7 +3650,7 @@ fm_directory_view_create_links_for_files (FMDirectoryView *view, GList *files,
nautilus_file_operations_copy_move (uris, relative_item_points, dir_uri, GDK_ACTION_LINK,
GTK_WIDGET (view), copy_move_done_callback, copy_move_done_data);
g_free (dir_uri);
- eel_g_list_free_deep (uris);
+ g_list_free_full (uris, g_free);
}
static void
@@ -3682,7 +3682,7 @@ fm_directory_view_duplicate_selection (FMDirectoryView *view, GList *files,
copy_move_done_data = pre_copy_move (view);
nautilus_file_operations_copy_move (uris, relative_item_points, NULL, GDK_ACTION_COPY,
GTK_WIDGET (view), copy_move_done_callback, copy_move_done_data);
- eel_g_list_free_deep (uris);
+ g_list_free_full (uris, g_free);
}
/* special_link_in_selection
@@ -3786,7 +3786,7 @@ trash_or_delete_files (GtkWindow *parent_window,
parent_window,
(NautilusDeleteCallback) trash_or_delete_done_cb,
view);
- eel_g_object_list_free (locations);
+ g_list_free_full (locations, g_object_unref);
}
static gboolean
@@ -4535,7 +4535,7 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection)
index,
menu_path, popup_path, submenu_visible);
}
- eel_g_object_list_free (applications);
+ g_list_free_full (applications, g_object_unref);
if (default_app != NULL) {
g_object_unref (default_app);
}
@@ -5805,7 +5805,7 @@ move_copy_selection_to_location (FMDirectoryView *view,
0, 0,
view);
- eel_g_list_free_deep (uris);
+ g_list_free_full (uris, g_free);
nautilus_file_list_free (selection);
}
@@ -5945,7 +5945,7 @@ paste_clipboard_data (FMDirectoryView *view,
gtk_clipboard_clear (nautilus_clipboard_get (GTK_WIDGET (view)));
}
- eel_g_list_free_deep (item_uris);
+ g_list_free_full (item_uris, g_free);
}
}
@@ -6913,7 +6913,7 @@ action_location_delete_callback (GtkAction *action,
nautilus_file_operations_delete (files, fm_directory_view_get_containing_window (view),
NULL, NULL);
- eel_g_object_list_free (files);
+ g_list_free_full (files, g_object_unref);
}
static void
@@ -9574,7 +9574,7 @@ fm_directory_view_stop (FMDirectoryView *view)
view->details->old_added_files = NULL;
file_and_directory_list_free (view->details->old_changed_files);
view->details->old_changed_files = NULL;
- eel_g_object_list_free (view->details->pending_locations_selected);
+ g_list_free_full (view->details->pending_locations_selected, g_object_unref);
view->details->pending_locations_selected = NULL;
if (view->details->model != NULL) {
@@ -10352,7 +10352,7 @@ fm_directory_view_handle_uri_list_drop (FMDirectoryView *view,
target_uri != NULL ? target_uri : container_uri,
action, x, y, view);
- eel_g_list_free_deep (real_uri_list);
+ g_list_free_full (real_uri_list, g_free);
if (points != NULL)
g_array_free (points, TRUE);
diff --git a/src/file-manager/fm-list-model.c b/src/file-manager/fm-list-model.c
index f4905ab..306ae5d 100644
--- a/src/file-manager/fm-list-model.c
+++ b/src/file-manager/fm-list-model.c
@@ -29,8 +29,6 @@
#include <libegg/eggtreemultidnd.h>
#include <string.h>
-#include <eel/eel-gtk-macros.h>
-#include <eel/eel-glib-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
@@ -345,7 +343,7 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column
}
}
- eel_g_object_list_free (emblem_icons);
+ g_list_free_full (emblem_icons, g_object_unref);
icon_info = nautilus_icon_info_lookup (gicon, icon_size);
icon = nautilus_icon_info_get_pixbuf_at_size (icon_info, icon_size);
@@ -616,7 +614,7 @@ fm_list_model_get_first_iter_for_file (FMListModel *model,
res = TRUE;
*iter = *(GtkTreeIter *)list->data;
}
- eel_g_list_free_deep (list);
+ g_list_free_full (list, g_free);
return res;
}
@@ -1658,7 +1656,7 @@ refresh_row (gpointer data,
gtk_tree_path_free (path);
}
- eel_g_list_free_deep (iters);
+ g_list_free_full (iters, g_free);
}
void
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index fc85c9b..31d09c9 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2136,7 +2136,7 @@ fm_list_view_set_selection (FMDirectoryView *view, GList *selection)
gtk_tree_selection_select_iter (tree_selection,
(GtkTreeIter *)l->data);
}
- eel_g_list_free_deep (iters);
+ g_list_free_full (iters, g_free);
}
g_signal_handlers_unblock_by_func (tree_selection, list_selection_changed_callback, view);
@@ -2171,7 +2171,7 @@ fm_list_view_invert_selection (FMDirectoryView *view)
gtk_tree_selection_unselect_iter (tree_selection,
(GtkTreeIter *)l->data);
}
- eel_g_list_free_deep (iters);
+ g_list_free_full (iters, g_free);
}
g_list_free (selection);
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index e8f8fed..2469e26 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -1037,8 +1037,8 @@ properties_window_update (FMPropertiesWindow *window,
if (!mime_list_equal (window->details->mime_list, mime_list)) {
refresh_extension_pages (window);
}
-
- eel_g_list_free_deep (window->details->mime_list);
+
+ g_list_free_full (window->details->mime_list, g_free);
window->details->mime_list = mime_list;
}
}
@@ -1647,7 +1647,7 @@ synch_groups_combo_box (GtkComboBox *combo_box, NautilusFile *file)
gtk_combo_box_set_active (combo_box, current_group_index);
g_free (current_group_name);
- eel_g_list_free_deep (groups);
+ g_list_free_full (groups, g_free);
}
static gboolean
@@ -2002,7 +2002,7 @@ synch_user_menu (GtkComboBox *combo_box, NautilusFile *file)
gtk_combo_box_set_active (combo_box, owner_index);
g_free (owner_name);
- eel_g_list_free_deep (users);
+ g_list_free_full (users, g_free);
}
static GtkComboBox*
@@ -4711,7 +4711,7 @@ get_pending_key (GList *file_list)
g_string_append (key, ";");
}
- eel_g_list_free_deep (uris);
+ g_list_free_full (uris, g_free);
ret = key->str;
g_string_free (key, FALSE);
@@ -5264,7 +5264,7 @@ real_finalize (GObject *object)
window = FM_PROPERTIES_WINDOW (object);
- eel_g_list_free_deep (window->details->mime_list);
+ g_list_free_full (window->details->mime_list, g_free);
g_free (window->details->pending_name);
g_free (window->details);
diff --git a/src/file-manager/fm-tree-model.c b/src/file-manager/fm-tree-model.c
index 38a092b..2003368 100644
--- a/src/file-manager/fm-tree-model.c
+++ b/src/file-manager/fm-tree-model.c
@@ -29,7 +29,6 @@
#include <config.h>
#include "fm-tree-model.h"
-#include <eel/eel-glib-extensions.h>
#include <eel/eel-gdk-pixbuf-extensions.h>
#include <glib/gi18n.h>
#include <libnautilus-private/nautilus-directory.h>
@@ -308,7 +307,7 @@ get_menu_icon_for_file (TreeNode *node,
}
}
- eel_g_object_list_free (emblem_icons);
+ g_list_free_full (emblem_icons, g_object_unref);
info = nautilus_icon_info_lookup (gicon, size);
retval = nautilus_icon_info_get_pixbuf_nodefault_at_size (info, size);
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index cb741e0..3df30f0 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -35,9 +35,7 @@
#include "fm-tree-model.h"
#include "fm-properties-window.h"
#include <string.h>
-#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-extensions.h>
-#include <eel/eel-stock-dialogs.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
@@ -969,8 +967,8 @@ paste_clipboard_data (FMTreeView *view,
if (cut) {
gtk_clipboard_clear (nautilus_clipboard_get (GTK_WIDGET (view)));
}
-
- eel_g_list_free_deep (item_uris);
+
+ g_list_free_full (item_uris, g_free);
}
}
@@ -1031,7 +1029,7 @@ fm_tree_view_trash_cb (GtkWidget *menu_item,
nautilus_file_operations_trash_or_delete (list,
fm_tree_view_get_containing_window (view),
NULL, NULL);
- eel_g_object_list_free (list);
+ g_list_free_full (list, g_free);
}
static void
@@ -1048,7 +1046,7 @@ fm_tree_view_delete_cb (GtkWidget *menu_item,
nautilus_file_get_location (view->details->popup_file));
nautilus_file_operations_delete (location_list, fm_tree_view_get_containing_window (view), NULL, NULL);
- eel_g_object_list_free (location_list);
+ g_list_free_full (location_list, g_object_unref);
}
static void
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index cee93d6..e4d83dd 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -156,7 +156,7 @@ automount_all_volumes (NautilusApplication *application)
/* pass NULL as GMountOperation to avoid user interaction */
g_volume_mount (volume, 0, NULL, NULL, startup_volume_mount_cb, NULL);
}
- eel_g_object_list_free (volumes);
+ g_list_free_full (volumes, g_object_unref);
}
}
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c
index d21b814..37f0f32 100644
--- a/src/nautilus-bookmark-list.c
+++ b/src/nautilus-bookmark-list.c
@@ -31,9 +31,9 @@
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-file.h>
#include <libnautilus-private/nautilus-icon-names.h>
-#include <eel/eel-glib-extensions.h>
-#include <eel/eel-string.h>
+
#include <gio/gio.h>
+#include <string.h>
#define MAX_BOOKMARK_LENGTH 80
#define LOAD_JOB 1
@@ -159,7 +159,7 @@ static void
clear (NautilusBookmarkList *bookmarks)
{
g_list_foreach (bookmarks->list, stop_monitoring_one, bookmarks);
- eel_g_object_list_free (bookmarks->list);
+ g_list_free_full (bookmarks->list, g_object_unref);
bookmarks->list = NULL;
}
@@ -391,7 +391,7 @@ nautilus_bookmark_list_delete_items_with_uri (NautilusBookmarkList *bookmarks,
next = node->next;
bookmark_uri = nautilus_bookmark_get_uri (NAUTILUS_BOOKMARK (node->data));
- if (eel_strcmp (bookmark_uri, uri) == 0) {
+ if (g_strcmp0 (bookmark_uri, uri) == 0) {
bookmarks->list = g_list_remove_link (bookmarks->list, node);
stop_monitoring_bookmark (bookmarks, NAUTILUS_BOOKMARK (node->data));
g_object_unref (node->data);
diff --git a/src/nautilus-history-sidebar.c b/src/nautilus-history-sidebar.c
index 4b2572f..3ee3e0b 100644
--- a/src/nautilus-history-sidebar.c
+++ b/src/nautilus-history-sidebar.c
@@ -27,9 +27,7 @@
#include <config.h>
-#include <eel/eel-debug.h>
#include <eel/eel-gtk-extensions.h>
-#include <eel/eel-glib-extensions.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libnautilus-private/nautilus-bookmark.h>
@@ -117,7 +115,7 @@ update_history (NautilusHistorySidebar *sidebar)
}
g_free (name);
}
- eel_g_object_list_free (history);
+ g_list_free_full (history, g_object_unref);
selection = GTK_TREE_SELECTION (gtk_tree_view_get_selection (sidebar->tree_view));
diff --git a/src/nautilus-navigation-window-slot.c b/src/nautilus-navigation-window-slot.c
index 2d0e907..d450ae7 100644
--- a/src/nautilus-navigation-window-slot.c
+++ b/src/nautilus-navigation-window-slot.c
@@ -85,7 +85,7 @@ nautilus_navigation_window_slot_clear_forward_list (NautilusNavigationWindowSlot
{
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_SLOT (slot));
- eel_g_object_list_free (slot->forward_list);
+ g_list_free_full (slot->forward_list, g_object_unref);
slot->forward_list = NULL;
}
@@ -94,7 +94,7 @@ nautilus_navigation_window_slot_clear_back_list (NautilusNavigationWindowSlot *s
{
g_assert (NAUTILUS_IS_NAVIGATION_WINDOW_SLOT (slot));
- eel_g_object_list_free (slot->back_list);
+ g_list_free_full (slot->back_list, g_object_unref);
slot->back_list = NULL;
}
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 8303ba9..3c8da68 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -20,10 +20,6 @@
#include <config.h>
#include <string.h>
-#include <eel/eel-debug.h>
-#include <eel/eel-gtk-extensions.h>
-#include <eel/eel-glib-extensions.h>
-#include <eel/eel-string.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
@@ -1455,7 +1451,7 @@ setup_file_path_mounted_mount (GFile *location, ButtonData *button_data)
g_object_unref (default_location);
g_object_unref (root);
}
- eel_g_object_list_free (mounts);
+ g_list_free_full (mounts, g_object_unref);
return result;
}
@@ -1624,7 +1620,7 @@ button_data_file_changed (NautilusFile *file,
/* MOUNTs use the GMount as the name, so don't update for those */
if (button_data->type != MOUNT_BUTTON) {
display_name = nautilus_file_get_display_name (file);
- if (eel_strcmp (display_name, button_data->dir_name) != 0) {
+ if (g_strcmp0 (display_name, button_data->dir_name) != 0) {
g_free (button_data->dir_name);
button_data->dir_name = g_strdup (display_name);
}
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 1941352..622ceb6 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -401,7 +401,7 @@ compare_for_selection (NautilusPlacesSidebar *sidebar,
{
int res;
- res = eel_strcmp (added_uri, last_uri);
+ res = g_strcmp0 (added_uri, last_uri);
if (res == 0) {
/* last_uri always comes first */
@@ -410,7 +410,7 @@ compare_for_selection (NautilusPlacesSidebar *sidebar,
}
*path = gtk_tree_model_get_path (sidebar->filter_model,
iter);
- } else if (eel_strcmp (location, added_uri) == 0) {
+ } else if (g_strcmp0 (location, added_uri) == 0) {
if (*path == NULL) {
*path = gtk_tree_model_get_path (sidebar->filter_model,
iter);
@@ -803,7 +803,7 @@ update_places (NautilusPlacesSidebar *sidebar)
g_free (tooltip);
}
- eel_g_object_list_free (network_mounts);
+ g_list_free_full (network_mounts, g_object_unref);
/* network:// */
mount_uri = "network:///"; /* No need to strdup */
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index d7812ee..36aae48 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -803,9 +803,8 @@ type_add_rows_from_query (NautilusQueryEditor *editor,
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (row->type_widget),
&iter);
}
-
- eel_g_list_free_deep (mime_types);
+ g_list_free_full (mime_types, g_free);
}
/* End of row types */
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index e18bb0f..ca7c088 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -41,9 +41,7 @@
#include "nautilus-search-bar.h"
#include "nautilus-window-manage-views.h"
#include "nautilus-zoom-control.h"
-#include <eel/eel-glib-extensions.h>
#include <eel/eel-gtk-extensions.h>
-#include <eel/eel-gtk-macros.h>
#include <eel/eel-string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdkkeysyms.h>
@@ -531,7 +529,7 @@ location_menu_item_activated_callback (GtkWidget *menu_item,
nautilus_window_slot_open_location_with_selection
(slot, dest, selection, close_behind);
- eel_g_object_list_free (selection);
+ g_list_free_full (selection, g_object_unref);
}
if (event != NULL) {
diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c
index c8a11d2..f86e8af 100644
--- a/src/nautilus-trash-bar.c
+++ b/src/nautilus-trash-bar.c
@@ -68,7 +68,7 @@ restore_button_clicked_cb (GtkWidget *button,
nautilus_restore_files_from_trash (files, GTK_WINDOW (gtk_widget_get_toplevel (button)));
nautilus_file_list_free (files);
- eel_g_object_list_free (locations);
+ g_list_free_full (locations, g_object_unref);
}
static void
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index f93fc56..af0e75a 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -801,7 +801,7 @@ nautilus_window_slot_content_view_matches_iid (NautilusWindowSlot *slot,
if (slot->content_view == NULL) {
return FALSE;
}
- return eel_strcmp (nautilus_view_get_view_id (slot->content_view), iid) == 0;
+ return g_strcmp0 (nautilus_view_get_view_id (slot->content_view), iid) == 0;
}
static gboolean
@@ -1274,7 +1274,7 @@ create_content_view (NautilusWindowSlot *slot,
}
if (slot->content_view != NULL &&
- eel_strcmp (nautilus_view_get_view_id (slot->content_view),
+ g_strcmp0 (nautilus_view_get_view_id (slot->content_view),
view_id) == 0) {
/* reuse existing content view */
view = slot->content_view;
@@ -1301,7 +1301,7 @@ create_content_view (NautilusWindowSlot *slot,
FALSE,
TRUE);
- eel_g_object_list_free (slot->pending_selection);
+ g_list_free_full (slot->pending_selection, g_object_unref);
slot->pending_selection = NULL;
} else if (slot->location != NULL) {
selection = nautilus_view_get_selection (slot->content_view);
@@ -1310,7 +1310,7 @@ create_content_view (NautilusWindowSlot *slot,
selection,
FALSE,
TRUE);
- eel_g_object_list_free (selection);
+ g_list_free_full (selection, g_object_unref);
} else {
/* Something is busted, there was no location to load.
Just load the homedir. */
@@ -1362,8 +1362,8 @@ load_new_location (NautilusWindowSlot *slot,
report_load_underway was called from load_location */
nautilus_view_set_selection (view, selection_copy);
}
-
- eel_g_object_list_free (selection_copy);
+
+ g_list_free_full (selection_copy, g_object_unref);
}
/* A view started to load the location its viewing, either due to
@@ -1782,7 +1782,7 @@ free_location_change (NautilusWindowSlot *slot)
}
slot->pending_location = NULL;
- eel_g_object_list_free (slot->pending_selection);
+ g_list_free_full (slot->pending_selection, g_object_unref);
slot->pending_selection = NULL;
/* Don't free pending_scroll_to, since thats needed until
@@ -1832,7 +1832,7 @@ cancel_location_change (NautilusWindowSlot *slot)
selection,
TRUE,
FALSE);
- eel_g_object_list_free (selection);
+ g_list_free_full (selection, g_object_unref);
}
end_location_change (slot);
@@ -2152,7 +2152,7 @@ nautilus_window_slot_reload (NautilusWindowSlot *slot)
NULL, NULL);
g_free (current_pos);
g_object_unref (location);
- eel_g_object_list_free (selection);
+ g_list_free_full (selection, g_object_unref);
}
void
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index e690d7f..d7313c0 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -622,7 +622,7 @@ nautilus_window_slot_dispose (GObject *object)
g_object_ref (slot->location);
}
- eel_g_list_free_deep (slot->pending_selection);
+ g_list_free_full (slot->pending_selection, g_free);
slot->pending_selection = NULL;
if (slot->current_location_bookmark != NULL) {
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 9b5980c..8b81d38 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -326,8 +326,8 @@ nautilus_window_go_up (NautilusWindow *window, gboolean close_behind, gboolean n
NULL, NULL);
g_object_unref (parent);
-
- eel_g_object_list_free (selection);
+
+ g_list_free_full (selection, g_object_unref);
}
static void
@@ -567,9 +567,7 @@ nautilus_window_get_property (GObject *object,
static void
free_stored_viewers (NautilusWindow *window)
{
- eel_g_list_free_deep_custom (window->details->short_list_viewers,
- (GFunc) g_free,
- NULL);
+ g_list_free_full (window->details->short_list_viewers, g_free);
window->details->short_list_viewers = NULL;
g_free (window->details->extra_viewer);
window->details->extra_viewer = NULL;
@@ -1601,7 +1599,7 @@ nautilus_send_history_list_changed (void)
static void
free_history_list (void)
{
- eel_g_object_list_free (history_list);
+ g_list_free_full (history_list, g_object_unref);
history_list = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]