diff options
Diffstat (limited to 'src/caja-application.c')
-rw-r--r-- | src/caja-application.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/caja-application.c b/src/caja-application.c index edba1d5c..6c68198f 100644 --- a/src/caja-application.c +++ b/src/caja-application.c @@ -75,6 +75,8 @@ #include <libcaja-extension/caja-menu-provider.h> #include <libcaja-private/caja-autorun.h> +#include "glibcompat.h" /* for g_list_free_full */ + enum { COMMAND_0, /* unused: 0 is an invalid command */ @@ -257,8 +259,7 @@ 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); } - g_list_foreach(volumes, (GFunc) g_object_unref, NULL); - g_list_free(volumes); + g_list_free_full (volumes, g_object_unref); } } @@ -761,8 +762,7 @@ finish_startup (CajaApplication *application, /* listen for eject button presses */ drives = g_volume_monitor_get_connected_drives (application->volume_monitor); g_list_foreach (drives, (GFunc) drive_listen_for_eject_button, application); - g_list_foreach (drives, (GFunc) g_object_unref, NULL); - g_list_free (drives); + g_list_free_full (drives, g_object_unref); application->automount_idle_id = g_idle_add_full (G_PRIORITY_LOW, @@ -1171,9 +1171,7 @@ caja_application_close_desktop (void) { if (caja_application_desktop_windows != NULL) { - g_list_foreach (caja_application_desktop_windows, - (GFunc) gtk_widget_destroy, NULL); - g_list_free (caja_application_desktop_windows); + g_list_free_full (caja_application_desktop_windows, gtk_widget_destroy); caja_application_desktop_windows = NULL; } } |