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 --- src/caja-application.c | 3 ++- src/caja-bookmark-list.c | 9 ++++---- src/caja-emblem-sidebar.c | 5 ++--- src/caja-history-sidebar.c | 5 ++--- src/caja-information-panel.c | 3 ++- src/caja-navigation-window-slot.c | 6 ++++-- src/caja-notes-viewer.c | 5 ++--- src/caja-pathbar.c | 9 +++----- src/caja-places-sidebar.c | 7 +++--- src/caja-property-browser.c | 10 +++++---- src/caja-query-editor.c | 4 ++-- src/caja-spatial-window.c | 4 ++-- src/caja-trash-bar.c | 3 ++- src/caja-window-manage-views.c | 22 ++++++++++++------- src/caja-window-slot.c | 3 ++- src/caja-window.c | 11 +++++----- src/file-manager/fm-directory-view.c | 38 ++++++++++++++++++++++----------- src/file-manager/fm-list-model.c | 11 +++++----- src/file-manager/fm-list-view.c | 6 ++++-- src/file-manager/fm-properties-window.c | 35 +++++++++++++++++++----------- src/file-manager/fm-tree-model.c | 4 ++-- src/file-manager/fm-tree-view.c | 11 +++++----- 22 files changed, 126 insertions(+), 88 deletions(-) (limited to 'src') diff --git a/src/caja-application.c b/src/caja-application.c index 978af2d6..edba1d5c 100644 --- a/src/caja-application.c +++ b/src/caja-application.c @@ -257,7 +257,8 @@ automount_all_volumes (CajaApplication *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_foreach(volumes, (GFunc) g_object_unref, NULL); + g_list_free(volumes); } } diff --git a/src/caja-bookmark-list.c b/src/caja-bookmark-list.c index cde07a1c..db594cf7 100644 --- a/src/caja-bookmark-list.c +++ b/src/caja-bookmark-list.c @@ -31,9 +31,9 @@ #include #include #include -#include -#include + #include +#include #define MAX_BOOKMARK_LENGTH 80 #define LOAD_JOB 1 @@ -167,7 +167,8 @@ static void clear (CajaBookmarkList *bookmarks) { g_list_foreach (bookmarks->list, stop_monitoring_one, bookmarks); - eel_g_object_list_free (bookmarks->list); + g_list_foreach(bookmarks->list, (GFunc) g_object_unref, NULL); + g_list_free(bookmarks->list); bookmarks->list = NULL; } @@ -407,7 +408,7 @@ caja_bookmark_list_delete_items_with_uri (CajaBookmarkList *bookmarks, next = node->next; bookmark_uri = caja_bookmark_get_uri (CAJA_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, CAJA_BOOKMARK (node->data)); diff --git a/src/caja-emblem-sidebar.c b/src/caja-emblem-sidebar.c index ea21bec9..1de86f9b 100644 --- a/src/caja-emblem-sidebar.c +++ b/src/caja-emblem-sidebar.c @@ -32,8 +32,6 @@ #include "caja-emblem-sidebar.h" #include -#include -#include #include #include #include @@ -1008,7 +1006,8 @@ caja_emblem_sidebar_populate (CajaEmblemSidebar *emblem_sidebar) widgets = g_list_prepend (widgets, emblem_widget); } - eel_g_list_free_deep (icons); + g_list_foreach(icons, (GFunc) g_free, NULL); + g_list_free(icons); /* sort the emblems by display name */ widgets = g_list_sort (widgets, emblem_widget_sort_func); diff --git a/src/caja-history-sidebar.c b/src/caja-history-sidebar.c index 2375a046..b69dce51 100644 --- a/src/caja-history-sidebar.c +++ b/src/caja-history-sidebar.c @@ -27,9 +27,7 @@ #include -#include #include -#include #include #include #include @@ -123,7 +121,8 @@ update_history (CajaHistorySidebar *sidebar) } g_free (name); } - eel_g_object_list_free (history); + g_list_foreach(history, (GFunc) g_object_unref, NULL); + g_list_free(history); selection = GTK_TREE_SELECTION (gtk_tree_view_get_selection (sidebar->tree_view)); diff --git a/src/caja-information-panel.c b/src/caja-information-panel.c index 5585457e..7aa17908 100644 --- a/src/caja-information-panel.c +++ b/src/caja-information-panel.c @@ -1228,7 +1228,8 @@ selection_changed_callback (CajaWindowInfo *window, caja_information_panel_set_uri (panel, uri, name); - eel_g_object_list_unref (selection); + g_list_foreach (selection, (GFunc) g_object_unref, NULL); + g_list_free (selection); g_free (uri); g_free (name); } diff --git a/src/caja-navigation-window-slot.c b/src/caja-navigation-window-slot.c index 703cca90..14963733 100644 --- a/src/caja-navigation-window-slot.c +++ b/src/caja-navigation-window-slot.c @@ -88,7 +88,8 @@ caja_navigation_window_slot_clear_forward_list (CajaNavigationWindowSlot *slot) { g_assert (CAJA_IS_NAVIGATION_WINDOW_SLOT (slot)); - eel_g_object_list_free (slot->forward_list); + g_list_foreach(slot->forward_list, (GFunc) g_object_unref, NULL); + g_list_free(slot->forward_list); slot->forward_list = NULL; } @@ -97,7 +98,8 @@ caja_navigation_window_slot_clear_back_list (CajaNavigationWindowSlot *slot) { g_assert (CAJA_IS_NAVIGATION_WINDOW_SLOT (slot)); - eel_g_object_list_free (slot->back_list); + g_list_foreach(slot->back_list, (GFunc) g_object_unref, NULL); + g_list_free(slot->back_list); slot->back_list = NULL; } diff --git a/src/caja-notes-viewer.c b/src/caja-notes-viewer.c index dc2df7fd..e62a0f14 100644 --- a/src/caja-notes-viewer.c +++ b/src/caja-notes-viewer.c @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -141,7 +140,7 @@ set_saved_text (CajaNotesViewer *notes, char *new_notes) old_text = notes->details->previous_saved_text; notes->details->previous_saved_text = new_notes; - if (eel_strcmp (old_text, new_notes) != 0) + if (g_strcmp0 (old_text, new_notes) != 0) { g_signal_emit_by_name (CAJA_SIDEBAR (notes), "tab_icon_changed"); @@ -207,7 +206,7 @@ load_note_text_from_metadata (CajaFile *file, /* This fn is called for any change signal on the file, so make sure that the * metadata has actually changed. */ - if (eel_strcmp (saved_text, notes->details->previous_saved_text) != 0) + if (g_strcmp0 (saved_text, notes->details->previous_saved_text) != 0) { set_saved_text (notes, saved_text); cancel_pending_save (notes); diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c index cc79e497..57821d60 100644 --- a/src/caja-pathbar.c +++ b/src/caja-pathbar.c @@ -20,10 +20,6 @@ #include #include -#include -#include -#include -#include #include #include #include @@ -1754,7 +1750,8 @@ 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_foreach(mounts, (GFunc) g_object_unref, NULL); + g_list_free(mounts); return result; } @@ -1963,7 +1960,7 @@ button_data_file_changed (CajaFile *file, if (button_data->type != MOUNT_BUTTON) { display_name = caja_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/caja-places-sidebar.c b/src/caja-places-sidebar.c index c12c6200..a6b3f022 100644 --- a/src/caja-places-sidebar.c +++ b/src/caja-places-sidebar.c @@ -417,7 +417,7 @@ compare_for_selection (CajaPlacesSidebar *sidebar, { int res; - res = eel_strcmp (added_uri, last_uri); + res = g_strcmp0 (added_uri, last_uri); if (res == 0) { @@ -429,7 +429,7 @@ compare_for_selection (CajaPlacesSidebar *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) { @@ -842,7 +842,8 @@ update_places (CajaPlacesSidebar *sidebar) g_free (tooltip); } - eel_g_object_list_free (network_mounts); + g_list_foreach (network_mounts, (GFunc) g_object_unref, NULL); + g_list_free(network_mounts); /* network:// */ mount_uri = "network:///"; /* No need to strdup */ diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c index 5fb5c249..e3ee8dd7 100644 --- a/src/caja-property-browser.c +++ b/src/caja-property-browser.c @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -233,7 +232,8 @@ caja_property_browser_dispose (GObject *object) g_free (property_browser->details->dragged_file); g_free (property_browser->details->drag_type); - eel_g_list_free_deep (property_browser->details->keywords); + g_list_foreach (property_browser->details->keywords, (GFunc) g_free, NULL); + g_list_free(property_browser->details->keywords); if (property_browser->details->property_chit) { @@ -1796,7 +1796,8 @@ make_properties_from_directories (CajaPropertyBrowser *property_browser) if (property_browser->details->category_type == CAJA_PROPERTY_EMBLEM) { - eel_g_list_free_deep (property_browser->details->keywords); + g_list_foreach(property_browser->details->keywords, (GFunc) g_free, NULL); + g_list_free(property_browser->details->keywords); property_browser->details->keywords = NULL; icons = caja_emblem_list_available (); @@ -1850,7 +1851,8 @@ make_properties_from_directories (CajaPropertyBrowser *property_browser) g_object_unref (object_pixbuf); } } - eel_g_list_free_deep (icons); + g_list_foreach(icons, (GFunc) g_free, NULL); + g_list_free(icons); } else { diff --git a/src/caja-query-editor.c b/src/caja-query-editor.c index 1b7ea10f..b0d04008 100644 --- a/src/caja-query-editor.c +++ b/src/caja-query-editor.c @@ -864,8 +864,8 @@ type_add_rows_from_query (CajaQueryEditor *editor, &iter); } - eel_g_list_free_deep (mime_types); - + g_list_foreach(mime_types, (GFunc) g_free, NULL); + g_list_free(mime_types); } /* End of row types */ diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c index 5dd3bbce..94e43956 100644 --- a/src/caja-spatial-window.c +++ b/src/caja-spatial-window.c @@ -42,7 +42,6 @@ #include "caja-search-bar.h" #include "caja-window-manage-views.h" #include "caja-zoom-control.h" -#include #include #include #include @@ -556,7 +555,8 @@ location_menu_item_activated_callback (GtkWidget *menu_item, caja_window_slot_open_location_with_selection (slot, dest, selection, close_behind); - eel_g_object_list_free (selection); + g_list_foreach(selection, (GFunc) g_object_unref, NULL); + g_list_free(selection); } if (event != NULL) { diff --git a/src/caja-trash-bar.c b/src/caja-trash-bar.c index 77e60f88..beb993bd 100644 --- a/src/caja-trash-bar.c +++ b/src/caja-trash-bar.c @@ -70,7 +70,8 @@ restore_button_clicked_cb (GtkWidget *button, caja_restore_files_from_trash (files, GTK_WINDOW (gtk_widget_get_toplevel (button))); caja_file_list_free (files); - eel_g_object_list_free (locations); + g_list_foreach(locations, (GFunc) g_object_unref, NULL); + g_list_free(locations); } static void diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c index aba56377..5156cb18 100644 --- a/src/caja-window-manage-views.c +++ b/src/caja-window-manage-views.c @@ -860,7 +860,7 @@ caja_window_slot_content_view_matches_iid (CajaWindowSlot *slot, { return FALSE; } - return eel_strcmp (caja_view_get_view_id (slot->content_view), iid) == 0; + return g_strcmp0 (caja_view_get_view_id (slot->content_view), iid) == 0; } static gboolean @@ -1390,7 +1390,7 @@ create_content_view (CajaWindowSlot *slot, } if (slot->content_view != NULL && - eel_strcmp (caja_view_get_view_id (slot->content_view), + g_strcmp0 (caja_view_get_view_id (slot->content_view), view_id) == 0) { /* reuse existing content view */ @@ -1421,7 +1421,8 @@ create_content_view (CajaWindowSlot *slot, FALSE, TRUE); - eel_g_object_list_free (slot->pending_selection); + g_list_foreach(slot->pending_selection, (GFunc) g_object_unref, NULL); + g_list_free(slot->pending_selection); slot->pending_selection = NULL; } else if (slot->location != NULL) @@ -1432,7 +1433,8 @@ create_content_view (CajaWindowSlot *slot, selection, FALSE, TRUE); - eel_g_object_list_free (selection); + g_list_foreach(selection, (GFunc) g_object_unref, NULL); + g_list_free(selection); } else { @@ -1490,7 +1492,8 @@ load_new_location (CajaWindowSlot *slot, caja_view_set_selection (view, selection_copy); } - eel_g_object_list_free (selection_copy); + g_list_foreach(selection_copy, (GFunc) g_object_unref, NULL); + g_list_free(selection_copy); } /* A view started to load the location its viewing, either due to @@ -1947,7 +1950,8 @@ free_location_change (CajaWindowSlot *slot) } slot->pending_location = NULL; - eel_g_object_list_free (slot->pending_selection); + g_list_foreach(slot->pending_selection, (GFunc) g_object_unref, NULL); + g_list_free(slot->pending_selection); slot->pending_selection = NULL; /* Don't free pending_scroll_to, since thats needed until @@ -2001,7 +2005,8 @@ cancel_location_change (CajaWindowSlot *slot) selection, TRUE, FALSE); - eel_g_object_list_free (selection); + g_list_foreach(selection, (GFunc) g_object_unref, NULL); + g_list_free(selection); } end_location_change (slot); @@ -2351,7 +2356,8 @@ caja_window_slot_reload (CajaWindowSlot *slot) NULL, NULL); g_free (current_pos); g_object_unref (location); - eel_g_object_list_free (selection); + g_list_foreach(selection, (GFunc) g_object_unref, NULL); + g_list_free(selection); } void diff --git a/src/caja-window-slot.c b/src/caja-window-slot.c index e82bcb00..5d87a60f 100644 --- a/src/caja-window-slot.c +++ b/src/caja-window-slot.c @@ -662,7 +662,8 @@ caja_window_slot_dispose (GObject *object) g_object_ref (slot->location); } - eel_g_list_free_deep (slot->pending_selection); + g_list_foreach(slot->pending_selection, (GFunc) g_free, NULL); + g_list_free(slot->pending_selection); slot->pending_selection = NULL; if (slot->current_location_bookmark != NULL) diff --git a/src/caja-window.c b/src/caja-window.c index 142ae4a1..35b78432 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -343,7 +343,8 @@ caja_window_go_up (CajaWindow *window, gboolean close_behind, gboolean new_tab) g_object_unref (parent); - eel_g_object_list_free (selection); + g_list_foreach(selection, (GFunc) g_object_unref, NULL); + g_list_free(selection); } static void @@ -605,9 +606,8 @@ caja_window_get_property (GObject *object, static void free_stored_viewers (CajaWindow *window) { - eel_g_list_free_deep_custom (window->details->short_list_viewers, - (GFunc) g_free, - NULL); + g_list_foreach(window->details->short_list_viewers, (GFunc) g_free, NULL); + g_list_free(window->details->short_list_viewers); window->details->short_list_viewers = NULL; g_free (window->details->extra_viewer); window->details->extra_viewer = NULL; @@ -1760,7 +1760,8 @@ caja_send_history_list_changed (void) static void free_history_list (void) { - eel_g_object_list_free (history_list); + g_list_foreach(history_list, (GFunc) g_object_unref, NULL); + g_list_free(history_list); history_list = NULL; } diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index a4119ec4..c40a40ba 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -1025,7 +1025,8 @@ delete_selected_files (FMDirectoryView *view) caja_file_operations_delete (locations, fm_directory_view_get_containing_window (view), NULL, NULL); - eel_g_object_list_free (locations); + g_list_foreach(locations, (GFunc) g_object_unref, NULL); + g_list_free(locations); caja_file_list_free (selection); } @@ -1934,7 +1935,8 @@ fm_directory_view_set_selection_locations (CajaView *caja_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_foreach(view->details->pending_locations_selected, (GFunc) g_object_unref, NULL); + g_list_free(view->details->pending_locations_selected); view->details->pending_locations_selected = eel_g_object_list_copy (selection_locations); } @@ -2548,7 +2550,8 @@ done_loading (FMDirectoryView *view, fm_directory_view_reveal_selection (view); } } - eel_g_object_list_free (locations_selected); + g_list_foreach(locations_selected, (GFunc) g_object_unref, NULL); + g_list_free(locations_selected); fm_directory_view_display_selection_info (view); } @@ -3790,7 +3793,8 @@ fm_directory_view_create_links_for_files (FMDirectoryView *view, GList *files, caja_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_foreach(uris, (GFunc) g_free, NULL); + g_list_free(uris); } static void @@ -3822,7 +3826,8 @@ fm_directory_view_duplicate_selection (FMDirectoryView *view, GList *files, copy_move_done_data = pre_copy_move (view); caja_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_foreach(uris, (GFunc) g_free, NULL); + g_list_free(uris); } /* special_link_in_selection @@ -3926,7 +3931,8 @@ trash_or_delete_files (GtkWindow *parent_window, parent_window, (CajaDeleteCallback) trash_or_delete_done_cb, view); - eel_g_object_list_free (locations); + g_list_foreach(locations, (GFunc) g_object_unref, NULL); + g_list_free(locations); } static gboolean @@ -4675,7 +4681,8 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection) index, menu_path, popup_path, submenu_visible); } - eel_g_object_list_free (applications); + g_list_foreach(applications, (GFunc) g_object_unref, NULL); + g_list_free(applications); if (default_app != NULL) { g_object_unref (default_app); } @@ -5970,7 +5977,8 @@ move_copy_selection_to_location (FMDirectoryView *view, 0, 0, view); - eel_g_list_free_deep (uris); + g_list_foreach(uris, (GFunc) g_free, NULL); + g_list_free(uris); caja_file_list_free (selection); } @@ -6110,7 +6118,10 @@ paste_clipboard_data (FMDirectoryView *view, gtk_clipboard_clear (caja_clipboard_get (GTK_WIDGET (view))); } - eel_g_list_free_deep (item_uris); + g_list_foreach(item_uris, (GFunc) g_free, NULL); + g_list_free(item_uris); + g_list_foreach(item_uris, (GFunc) g_free, NULL); + g_list_free(item_uris); } } @@ -7104,7 +7115,8 @@ action_location_delete_callback (GtkAction *action, caja_file_operations_delete (files, fm_directory_view_get_containing_window (view), NULL, NULL); - eel_g_object_list_free (files); + g_list_foreach(files, (GFunc) g_object_unref, NULL); + g_list_free(files); } static void @@ -9787,7 +9799,8 @@ 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_foreach(view->details->pending_locations_selected, (GFunc) g_object_unref, NULL); + g_list_free(view->details->pending_locations_selected); view->details->pending_locations_selected = NULL; if (view->details->model != NULL) { @@ -10565,7 +10578,8 @@ 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_foreach(real_uri_list, (GFunc) g_free, NULL); + g_list_free(real_uri_list); 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 b814a313..f6ba0168 100644 --- a/src/file-manager/fm-list-model.c +++ b/src/file-manager/fm-list-model.c @@ -29,8 +29,6 @@ #include #include -#include -#include #include #include #include @@ -373,7 +371,8 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column g_object_unref (emblem); } - eel_g_object_list_free (emblem_icons); + g_list_foreach (emblem_icons, (GFunc) g_object_unref, NULL); + g_list_free(emblem_icons); g_object_unref (gicon); gicon = emblemed_icon; @@ -679,7 +678,8 @@ fm_list_model_get_first_iter_for_file (FMListModel *model, res = TRUE; *iter = *(GtkTreeIter *)list->data; } - eel_g_list_free_deep (list); + g_list_foreach(list, (GFunc) g_free, NULL); + g_list_free(list); return res; } @@ -1806,7 +1806,8 @@ refresh_row (gpointer data, gtk_tree_path_free (path); } - eel_g_list_free_deep (iters); + g_list_foreach(iters, (GFunc) g_free, NULL); + g_list_free(iters); } void diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index e9fdd88b..f487c333 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -2325,7 +2325,8 @@ 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_foreach(iters, (GFunc) g_free, NULL); + g_list_free(iters); } g_signal_handlers_unblock_by_func (tree_selection, list_selection_changed_callback, view); @@ -2362,7 +2363,8 @@ 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_foreach(iters, (GFunc) g_free, NULL); + g_list_free(iters); } g_list_free (selection); diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index ea07b1c4..4a7b7c54 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -700,7 +699,7 @@ update_name_field (FMPropertiesWindow *window) set_name_field (window, original_name, current_name); if (original_name == NULL || - eel_strcmp (original_name, current_name) != 0) { + g_strcmp0 (original_name, current_name) != 0) { g_object_set_data_full (G_OBJECT (window->details->name_field), "original_name", current_name, @@ -842,7 +841,8 @@ file_has_keyword (CajaFile *file, const char *keyword) keywords = caja_file_get_keywords (file); word = g_list_find_custom (keywords, keyword, (GCompareFunc) strcmp); - eel_g_list_free_deep (keywords); + g_list_foreach(keywords, (GFunc) g_free, NULL); + g_list_free(keywords); return (word != NULL); } @@ -932,7 +932,8 @@ emblem_button_toggled (GtkToggleButton *button, keywords = g_list_prepend (keywords, g_strdup (name)); } caja_file_set_keywords (file, keywords); - eel_g_list_free_deep (keywords); + g_list_foreach(keywords, (GFunc) g_free, NULL); + g_list_free(keywords); } for (l = files_off; l != NULL; l = l->next) { @@ -945,10 +946,12 @@ emblem_button_toggled (GtkToggleButton *button, word = g_list_find_custom (keywords, name, (GCompareFunc)strcmp); if (word) { keywords = g_list_remove_link (keywords, word); - eel_g_list_free_deep (word); + g_list_foreach(word, (GFunc) g_free, NULL); + g_list_free(word); } caja_file_set_keywords (file, keywords); - eel_g_list_free_deep (keywords); + g_list_foreach(keywords, (GFunc) g_free, NULL); + g_list_free(keywords); } g_list_free (files_on); @@ -1204,7 +1207,8 @@ properties_window_update (FMPropertiesWindow *window, refresh_extension_pages (window); } - eel_g_list_free_deep (window->details->mime_list); + g_list_foreach(window->details->mime_list, (GFunc) g_free, NULL); + g_list_free(window->details->mime_list); window->details->mime_list = mime_list; } } @@ -1813,7 +1817,8 @@ synch_groups_combo_box (GtkComboBox *combo_box, CajaFile *file) gtk_combo_box_set_active (combo_box, current_group_index); g_free (current_group_name); - eel_g_list_free_deep (groups); + g_list_foreach(groups, (GFunc) g_free, NULL); + g_list_free(groups); } static gboolean @@ -2168,7 +2173,8 @@ synch_user_menu (GtkComboBox *combo_box, CajaFile *file) gtk_combo_box_set_active (combo_box, owner_index); g_free (owner_name); - eel_g_list_free_deep (users); + g_list_foreach(users, (GFunc) g_free, NULL); + g_list_free(users); } static GtkComboBox* @@ -3424,7 +3430,7 @@ get_initial_emblems (GList *files) ret = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, - (GDestroyNotify)eel_g_list_free_deep); + (GFunc) g_free); for (l = files; l != NULL; l = l->next) { CajaFile *file; @@ -3563,7 +3569,8 @@ create_emblems_page (FMPropertiesWindow *window) gtk_container_add (GTK_CONTAINER (emblems_table), button); } - eel_g_list_free_deep (icons); + g_list_foreach(icons, (GFunc) g_free, NULL); + g_list_free(icons); gtk_widget_show_all (emblems_table); } @@ -5047,7 +5054,8 @@ get_pending_key (GList *file_list) g_string_append (key, ";"); } - eel_g_list_free_deep (uris); + g_list_foreach(uris, (GFunc) g_free, NULL); + g_list_free(uris); ret = key->str; g_string_free (key, FALSE); @@ -5620,7 +5628,8 @@ real_finalize (GObject *object) window = FM_PROPERTIES_WINDOW (object); - eel_g_list_free_deep (window->details->mime_list); + g_list_foreach(window->details->mime_list, (GFunc) g_free, NULL); + g_list_free(window->details->mime_list); 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 3a3e3604..3423e2d1 100644 --- a/src/file-manager/fm-tree-model.c +++ b/src/file-manager/fm-tree-model.c @@ -29,7 +29,6 @@ #include #include "fm-tree-model.h" -#include #include #include #include @@ -320,7 +319,8 @@ get_menu_icon_for_file (TreeNode *node, } } - eel_g_object_list_free (emblem_icons); + g_list_foreach (emblem_icons, (GFunc) g_object_unref, NULL); + g_list_free(emblem_icons); info = caja_icon_info_lookup (gicon, size); retval = caja_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 d673c70b..37559f53 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 -#include #include -#include #include #include #include @@ -1061,7 +1059,8 @@ paste_clipboard_data (FMTreeView *view, gtk_clipboard_clear (caja_clipboard_get (GTK_WIDGET (view))); } - eel_g_list_free_deep (item_uris); + g_list_foreach(item_uris, (GFunc) g_free, NULL); + g_list_free(item_uris); } } @@ -1124,7 +1123,8 @@ fm_tree_view_trash_cb (GtkWidget *menu_item, caja_file_operations_trash_or_delete (list, fm_tree_view_get_containing_window (view), NULL, NULL); - eel_g_object_list_free (list); + g_list_foreach(list, (GFunc) g_object_unref, NULL); + g_list_free(list); } static void @@ -1142,7 +1142,8 @@ fm_tree_view_delete_cb (GtkWidget *menu_item, caja_file_get_location (view->details->popup_file)); caja_file_operations_delete (location_list, fm_tree_view_get_containing_window (view), NULL, NULL); - eel_g_object_list_free (location_list); + g_list_foreach(location_list, (GFunc) g_object_unref, NULL); + g_list_free(location_list); } static void -- cgit v1.2.1