diff options
author | Jasmine Hassan <[email protected]> | 2012-11-23 11:18:34 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-23 11:18:34 +0200 |
commit | b00cccb74307a49df74deb785936e3cd9cf3a5ad (patch) | |
tree | f2bcc459a2bef12678e642d0a14ce7f02373b71d /src/file-manager/fm-list-view.c | |
parent | b12a7f6ea3309ecddfc7e3ae839a7b558c862533 (diff) | |
download | caja-b00cccb74307a49df74deb785936e3cd9cf3a5ad.tar.bz2 caja-b00cccb74307a49df74deb785936e3cd9cf3a5ad.tar.xz |
[all] include src/glibcompat.h & use g_list_free_full() where needed
Also fixes a double-free regression in lc-p/caja-query from 7a42b9b0
Diffstat (limited to 'src/file-manager/fm-list-view.c')
-rw-r--r-- | src/file-manager/fm-list-view.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index f487c333..f35fb656 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -61,6 +61,8 @@ #include <libcaja-private/caja-clipboard.h> #include <libcaja-private/caja-cell-renderer-text-ellipsized.h> +#include <src/glibcompat.h> /* for g_list_free_full */ + struct FMListViewDetails { GtkTreeView *tree_view; @@ -449,8 +451,7 @@ get_filtered_selection_refs (GtkTreeView *tree_view) static void ref_list_free (GList *ref_list) { - g_list_foreach (ref_list, (GFunc) gtk_tree_row_reference_free, NULL); - g_list_free (ref_list); + g_list_free_full (ref_list, gtk_tree_row_reference_free); } static void @@ -2325,8 +2326,7 @@ fm_list_view_set_selection (FMDirectoryView *view, GList *selection) gtk_tree_selection_select_iter (tree_selection, (GtkTreeIter *)l->data); } - g_list_foreach(iters, (GFunc) g_free, NULL); - g_list_free(iters); + g_list_free_full (iters, g_free); } g_signal_handlers_unblock_by_func (tree_selection, list_selection_changed_callback, view); @@ -2363,8 +2363,7 @@ fm_list_view_invert_selection (FMDirectoryView *view) gtk_tree_selection_unselect_iter (tree_selection, (GtkTreeIter *)l->data); } - g_list_foreach(iters, (GFunc) g_free, NULL); - g_list_free(iters); + g_list_free_full (iters, g_free); } g_list_free (selection); |