Index: src/dlg-file-utils.c
===================================================================
--- src/dlg-file-utils.c	(revisão 2408)
+++ src/dlg-file-utils.c	(cópia de trabalho)
@@ -35,6 +35,7 @@
 #include "comments.h"
 #include "dlg-file-utils.h"
 #include "file-utils.h"
+#include "gfile-utils.h"
 #include "glib-utils.h"
 #include "image-viewer.h"
 #include "main.h"
@@ -193,16 +194,16 @@
 
 
 static void
-real_files_delete__continue2 (GnomeVFSResult result,
+real_files_delete__continue2 (GError        *error,
 			      gpointer       data)
 {
 	ConfirmFileDeleteData *cfddata = data;
 
-	if ((result != GNOME_VFS_OK) && (result != GNOME_VFS_ERROR_INTERRUPTED))
+        if (error)
 		_gtk_error_dialog_run (GTK_WINDOW (cfddata->window),
 				       "%s %s",
 				       _("Could not delete the images:"),
-				       gnome_vfs_result_to_string (result));
+                                       error->message);
 
 	path_list_free (cfddata->file_list);
 	g_free (cfddata);
@@ -210,12 +211,12 @@
 
 
 static void
-real_files_delete__continue (GnomeVFSResult result,
+real_files_delete__continue (GError        *error,
 			     gpointer       data)
 {
 	ConfirmFileDeleteData *cfddata = data;
 
-	if (result == GNOME_VFS_ERROR_NOT_FOUND) {
+        if (error) {
 		int r = GTK_RESPONSE_YES;
 
 		if (eel_gconf_get_boolean (PREF_MSG_CANNOT_MOVE_TO_TRASH, TRUE)) {
@@ -239,9 +240,8 @@
 					  cfddata->file_list,
 					  real_files_delete__continue2,
 					  cfddata);
-	} 
-	else
-		real_files_delete__continue2 (result, data);
+        } else
+                real_files_delete__continue2 (error, data);
 }
 
 
@@ -309,7 +309,7 @@
 
 
 static void
-file_move_ask__continue (GnomeVFSResult result,
+file_move_ask__continue (GError        *error,
 			 gpointer       data)
 {
 	GtkWidget *file_sel = data;
@@ -410,7 +410,7 @@
 
 
 static void
-file_copy_ask__continue (GnomeVFSResult result,
+file_copy_ask__continue (GError        *error,
 			 gpointer       data)
 {
 	GtkWidget *file_sel = data;
@@ -1017,8 +1017,7 @@
 			files_created = my_list_remove (files_created, old_full_path);
 
 			o_scan = o_scan->next;
-		}
-		else {
+                } else {
 			old_names = g_list_remove_link (old_names, o_scan);
 			error_list = g_list_prepend (error_list, o_scan->data);
 			g_list_free (o_scan);
@@ -1055,7 +1054,6 @@
 	path_list_free (files_created);
 }
 
-
 /* -- dlg_files_copy -- */
 
 typedef struct {
@@ -1079,6 +1077,7 @@
 
 	guint                timeout_id;
 
+        GError              *error;
 	GnomeVFSAsyncHandle *handle;
 	GnomeVFSResult       result;
 	OverwriteResult      overwrite_result;
@@ -1142,6 +1141,10 @@
 					   gpointer   data)
 {
 	FileCopyData *fcdata = data;
+	GError *error = NULL;
+
+	g_set_error (&error, g_type_qname (G_TYPE_FILE),
+		     G_FILE_ERROR_INTR, _("Copy operation interrupted"));
 
 	if (response_id == GTK_RESPONSE_YES) {
 		gtk_widget_show (fcdata->progress_dialog);
@@ -1149,7 +1152,7 @@
 
 	} else {
 		if (fcdata->done_func != NULL)
-			(*fcdata->done_func) (GNOME_VFS_ERROR_INTERRUPTED, fcdata->done_data);
+                        (*fcdata->done_func) (error, fcdata->done_data);
 		file_copy_data_free (fcdata);
 	}
 
@@ -1215,6 +1218,63 @@
 	gtk_widget_show (d);
 }
 
+static void
+continue_or_abort_dialog_gio (FileCopyData   *fcdata,
+                              GError         *error)
+{
+        GtkWidget  *d;
+        const char *src_file;
+        const char *error_desc;
+        char       *message;
+        char       *utf8_name;
+        gboolean    last_file;
+
+        g_clear_error (&fcdata->error);
+        g_propagate_error (&fcdata->error, error);
+        src_file = fcdata->current_file->data;
+
+        if (fcdata->remove_source)
+                error_desc = _("Could not move the image:");
+        else
+                error_desc = _("Could not copy the image:");
+        utf8_name = basename_for_display (src_file);
+        message = g_strconcat (error_desc,
+                               " ",
+                               utf8_name,
+                               "\n\n",
+                               error->message,
+                               NULL);
+        g_free (utf8_name);
+
+        last_file = fcdata->current_file->next == NULL;
+
+        if (last_file)
+                d = _gtk_message_dialog_new (GTK_WINDOW (fcdata->window),
+                                             GTK_DIALOG_MODAL,
+                                             GTK_STOCK_DIALOG_ERROR,
+                                             message,
+                                             NULL,
+                                             GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
+                                             NULL);
+        else
+                d = _gtk_yesno_dialog_new (GTK_WINDOW (fcdata->window),
+                                           GTK_DIALOG_MODAL,
+                                           message,
+                                           _("_Abort"),
+                                           _("_Continue"));
+
+        g_free (message);
+
+        g_signal_connect (G_OBJECT (d),
+                          "response",
+                          G_CALLBACK (file_copy__continue_or_abort__response_cb),
+                          fcdata);
+
+        fcdata->continue_dialog_visible = TRUE;
+
+        gtk_widget_hide (fcdata->progress_dialog);
+        gtk_widget_show (d);
+}
 
 static void
 files_copy__done (FileCopyData *fcdata)
@@ -1225,7 +1285,7 @@
 	all_windows_add_monitor ();
 
 	if (fcdata->done_func != NULL)
-		(*fcdata->done_func) (fcdata->result, fcdata->done_data);
+                (*fcdata->done_func) (fcdata->error, fcdata->done_data);
 
 	file_copy_data_free (fcdata);
 }
@@ -1264,55 +1324,61 @@
 	return TRUE;
 }
 
+static void
+
+file_progress_update_cb_gio (GFile *source,
+			     GFile *destination,
+			     guint index,
+			     guint total_files,
+			     GError *error,
+			     AsyncXferData *data,
+			     gpointer user_data)
+{
+        FileCopyData *fcdata = user_data;
+
+        if (!error) {
+                if (! fcdata->copying_cache) { /* do not notify cache data. */
+                        char *src_file;
+                        char *dest_file;
+
+                        src_file = fcdata->current_file->data;
+                        dest_file = gfile_get_uri (destination);
+                        fcdata->copied_list = g_list_prepend (fcdata->copied_list, src_file);
+                        fcdata->created_list = g_list_prepend (fcdata->created_list, dest_file);
+                        copy_next_file (fcdata);
+                } else
+                        files_copy__done (fcdata);
+        } else
+                continue_or_abort_dialog_gio (fcdata, error);
+}
 
 static void
 xfer_file (FileCopyData *fcdata,
 	   const char   *src_file,
 	   const char   *dest_file)
 {
-	GnomeVFSURI               *src_uri, *dest_uri;
 	GList                     *src_list, *dest_list;
-	GnomeVFSXferOptions        xfer_options;
-	GnomeVFSXferErrorMode      xfer_error_mode;
-	GnomeVFSXferOverwriteMode  overwrite_mode;
-	GnomeVFSResult             result;
-
-	src_uri = new_uri_from_path (src_file);
-	src_list = g_list_append (NULL, src_uri);
 
-	dest_uri = new_uri_from_path (dest_file);
-	dest_list = g_list_append (NULL, dest_uri);
-
-	xfer_options    = fcdata->remove_source ? GNOME_VFS_XFER_REMOVESOURCE : 0;
-	xfer_error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
-	overwrite_mode  = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
+        src_list = g_list_append (NULL, gfile_new(src_file));
+        dest_list = g_list_append (NULL, gfile_new(dest_file));
 
 	/* Delete thumbnail from cache, if source file is removed */
 	if (fcdata->remove_source)
 		delete_thumbnail (src_file);
 
-	result = gnome_vfs_async_xfer (&fcdata->handle,
-				       src_list,
+        async_xfer_file_gio (src_list,
 				       dest_list,
-				       xfer_options,
-				       xfer_error_mode,
-				       overwrite_mode,
-				       GNOME_VFS_PRIORITY_DEFAULT,
-				       file_progress_update_cb,
-				       fcdata,
-				       NULL,
-				       NULL);
+                             fcdata->remove_source,
+                             G_FILE_COPY_OVERWRITE,
+                             NULL, NULL, NULL, NULL,
+                             file_progress_update_cb_gio,
+                             fcdata, G_PRIORITY_DEFAULT,
+                             NULL, NULL, NULL);
 
-	gnome_vfs_uri_unref (src_uri);
+        g_list_foreach (src_list, (GFunc) g_object_unref, NULL);
 	g_list_free (src_list);
-
-	gnome_vfs_uri_unref (dest_uri);
+        g_list_foreach (dest_list, (GFunc) g_object_unref, NULL);
 	g_list_free (dest_list);
-
-	/**/
-
-	if (result != GNOME_VFS_OK)
-		continue_or_abort_dialog (fcdata, result);
 }
 
 
@@ -1615,7 +1681,7 @@
 		fcdata->overwrite_result = OVERWRITE_RESULT_NO;
 	fcdata->cache_copied = FALSE;
 	fcdata->copying_cache = FALSE;
-
+        fcdata->error = NULL;
 	fcdata->file_index = 1;
 	fcdata->files_total = g_list_length (file_list);
 	fcdata->continue_dialog_visible = FALSE;
@@ -1657,6 +1723,46 @@
 	copy_current_file (fcdata);
 }
 
+void
+_after_each_file_trashed (GFile *source,
+			  GFile *destination,
+			  guint index,
+			  guint total,
+			  GError *error,
+			  AsyncXferData *data,
+			  gpointer user_data)
+{
+	FileCopyData *fcdata = user_data;
+	float fraction;
+	gchar *message;
+	g_return_if_fail (user_data != NULL);
+
+	fcdata->file_index++;
+	fraction = (float) total / (float) index;
+	gtk_window_set_title (GTK_WINDOW (fcdata->progress_dialog), _("Sending files to trash"));
+	gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (fcdata->progress_progressbar),
+				       CLAMP (fraction, 0.0, 1.0));
+
+        message = g_strdup_printf (_("Deleting file %d of %d"),
+                                   index, total);
+        gtk_label_set_text (GTK_LABEL (fcdata->progress_info), message);
+        g_free (message);
+
+	if (index == total) {
+		g_source_remove (fcdata->timeout_id);
+		fcdata->continue_dialog_visible = FALSE;
+		gtk_widget_destroy (fcdata->progress_dialog);
+	}
+}
+
+gboolean
+_trash_files_done (gpointer data)
+{
+	FileCopyData *fcdata = data;
+	g_message ("readding the monitor!");
+	all_windows_add_monitor ();
+	return FALSE;
+}
 
 void
 dlg_files_move_to_trash (GthWindow      *window,
@@ -1664,38 +1770,82 @@
 			 FileOpDoneFunc  done_func,
 			 gpointer        done_data)
 {
-	GnomeVFSURI *first_uri, *trash_uri = NULL;
-
 	g_return_if_fail (file_list != NULL);
 
-	first_uri = new_uri_from_path (file_list->data);
-	gnome_vfs_find_directory (first_uri,
-				  GNOME_VFS_DIRECTORY_KIND_TRASH,
-				  &trash_uri,
-				  TRUE,
-				  TRUE,
-				  0777);
+       FileCopyData *fcdata;
+       GList *source_list, *scan;
 
-	if (trash_uri != NULL) {
-		char *trash_path;
+       source_list = NULL;
 
-		trash_path = gnome_vfs_uri_to_string (trash_uri, GNOME_VFS_URI_HIDE_NONE);
-		dlg_files_copy (window,
-				file_list,
-				trash_path,
-				TRUE,
-				FALSE,
-				TRUE,
-				done_func,
-				done_data);
 
-		g_free (trash_path);
-		gnome_vfs_uri_unref (trash_uri);
+        g_return_if_fail (window != NULL);
+
+        fcdata = g_new0 (FileCopyData, 1);
+
+        fcdata->window = window;
+        fcdata->file_list = path_list_dup (file_list);
+        fcdata->copied_list = NULL;
+        fcdata->created_list = NULL;
+        fcdata->current_file = fcdata->file_list;
+        fcdata->destination = NULL;
+        fcdata->remove_source = TRUE;
+        fcdata->copy_cache = FALSE;
+        fcdata->done_func = done_func;
+        fcdata->done_data = done_data;
+	fcdata->overwrite_result = OVERWRITE_RESULT_NO;
+        fcdata->cache_copied = FALSE;
+        fcdata->copying_cache = FALSE;
+        fcdata->error = NULL;
+        fcdata->file_index = 1;
+        fcdata->files_total = g_list_length (file_list);
+        fcdata->continue_dialog_visible = FALSE;
+        fcdata->overwrite_dialog_visible = FALSE;
+
+       for (scan = file_list; scan != NULL; scan = g_list_next(scan))
+	       source_list = g_list_prepend(source_list,
+					    gfile_new (scan->data));
+
+       source_list = g_list_first (g_list_reverse (source_list));
+
+        /**/
+
+        fcdata->gui = glade_xml_new (GTHUMB_GLADEDIR "/" GLADE_PNG_EXP_FILE, NULL, NULL);
+        if (! fcdata->gui) {
+                file_copy_data_free (fcdata);
+                g_warning ("Could not find " GLADE_PNG_EXP_FILE "\n");
+                return;
+        }
+
+        fcdata->progress_dialog = glade_xml_get_widget (fcdata->gui, "progress_dialog");
+        fcdata->progress_progressbar = glade_xml_get_widget (fcdata->gui, "progress_progressbar");
+        fcdata->progress_info = glade_xml_get_widget (fcdata->gui, "progress_info");
+        fcdata->progress_cancel = glade_xml_get_widget (fcdata->gui, "progress_cancel");
+
+        g_signal_connect (G_OBJECT (fcdata->progress_dialog),
+                          "delete_event",
+                          G_CALLBACK (dlg_files_copy__interrupt_cb1),
+                          fcdata);
+        g_signal_connect (G_OBJECT (fcdata->progress_cancel),
+                          "clicked",
+                          G_CALLBACK (dlg_files_copy__interrupt_cb2),
+                          fcdata);
 
-	} else if (done_func != NULL)
-		(*done_func) (GNOME_VFS_ERROR_NOT_FOUND, done_data);
+        gtk_window_set_transient_for (GTK_WINDOW (fcdata->progress_dialog),
+                                      GTK_WINDOW (fcdata->window));
+        gtk_window_set_modal (GTK_WINDOW (fcdata->progress_dialog), FALSE);
 
-	gnome_vfs_uri_unref (first_uri);
+        fcdata->timeout_id = g_timeout_add (DISPLAY_PROGRESS_DELAY,
+                                            file_copy__display_progress_dialog,
+                                            fcdata);
+
+        all_windows_remove_monitor ();
+
+	async_file_trash (source_list,
+			  NULL, _after_each_file_trashed, fcdata,
+			  G_PRIORITY_DEFAULT,
+			  _trash_files_done, fcdata, NULL);
+
+	g_list_foreach (source_list, (GFunc)g_object_unref, NULL);
 }
 
 
@@ -1714,7 +1864,7 @@
 	FileOpDoneFunc       done_func;
 	gpointer             done_data;
 	GnomeVFSResult       result;
-
+	GError              *error;
 	guint                timeout_id;
 
 	GnomeVFSAsyncHandle *handle;
@@ -1766,7 +1916,7 @@
 	/*all_windows_add_monitor (); FIXME*/
 
 	if (fddata->done_func != NULL)
-		(*fddata->done_func) (fddata->result, fddata->done_data);
+                (*fddata->done_func) (fddata->error, fddata->done_data);
 
 	file_delete_data_free (fddata);
 }
@@ -1861,7 +2011,7 @@
 	fddata->file_list = path_list_dup (file_list);
 	fddata->done_func = done_func;
 	fddata->done_data = done_data;
-
+	fddata->error = NULL;
 	fddata->result = GNOME_VFS_OK;
 
 	/**/
@@ -1965,6 +2115,7 @@
 
 	GnomeVFSAsyncHandle *handle;
 	GnomeVFSResult       result;
+	GError              *error;
 } FolderCopyData;
 
 
@@ -2012,29 +2163,23 @@
 	if (info->status != GNOME_VFS_XFER_PROGRESS_STATUS_OK) {
 		fcdata->result = info->vfs_status;
 		return FALSE;
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_INITIAL) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_INITIAL) {
 		/**/
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_COLLECTING) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_COLLECTING) {
 		message = g_strdup (_("Collecting images info"));
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_COPYING) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_COPYING) {
 		message = g_strdup_printf (_("Copying file %ld of %ld"),
 					   info->file_index,
 					   info->files_total);
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_MOVING) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_MOVING) {
 		message = g_strdup_printf (_("Moving file %ld of %ld"),
 					   info->file_index,
 					   info->files_total);
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_DELETESOURCE) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_DELETESOURCE) {
 		message = g_strdup_printf (_("Deleting file %ld of %ld"),
 					   info->file_index,
 					   info->files_total);
-	} 
-	else if (info->phase == GNOME_VFS_XFER_PHASE_COMPLETED) {
+        } else if (info->phase == GNOME_VFS_XFER_PHASE_COMPLETED) {
 
 		if (fcdata->result == GNOME_VFS_OK) {
 			if (fcdata->file_op == FILE_OP_COPY)
@@ -2050,7 +2195,7 @@
 		destroy_progress_dialog (fcdata);
 
 		if (fcdata->done_func != NULL)
-			(*fcdata->done_func) (fcdata->result, fcdata->done_data);
+                        (*fcdata->done_func) (fcdata->error, fcdata->done_data);
 		folder_copy_data_free (fcdata);
 
 		return result;
@@ -2150,7 +2295,7 @@
 	GnomeVFSXferErrorMode      xfer_error_mode;
 	GnomeVFSXferOverwriteMode  overwrite_mode;
 	GnomeVFSResult             result;
-
+	GError                    *error = NULL;
 	if (file_op != FILE_OP_DELETE) {
 		if ((src_path == NULL) || (dest_path == NULL))
 			return;
@@ -2170,7 +2315,7 @@
 	fcdata->include_cache = include_cache;
 	fcdata->done_func = done_func;
 	fcdata->done_data = done_data;
-
+	fcdata->error = NULL;
 	fcdata->result = GNOME_VFS_OK;
 
 	/**/
@@ -2266,8 +2411,13 @@
 	/**/
 
 	if (result != GNOME_VFS_OK) {
+		/*TODO: port this function to GIO and user GError correctly */
+		g_set_error (&error,
+			     g_quark_from_static_string ("GnomeVFS"),
+			     result, "%s",
+			     gnome_vfs_result_to_string (result));
 		if (done_func != NULL)
-			(*done_func) (result, done_data);
+                        (*done_func) (error, done_data);
 		folder_copy_data_free (fcdata);
 	}
 }
@@ -2300,44 +2450,78 @@
 			  FileOpDoneFunc  done_func,
 			  gpointer        done_data)
 {
-	char            *parent_dir;
-	GnomeVFSURI     *parent_uri, *trash_uri = NULL;
+       FileCopyData *fcdata;
+       GFile *file;
+       GList *source_list, *scan;
 
-	parent_dir = remove_level_from_path (folder);
-	parent_uri = new_uri_from_path (parent_dir);
+       source_list = NULL;
 
-	gnome_vfs_find_directory (parent_uri,
-				  GNOME_VFS_DIRECTORY_KIND_TRASH,
-				  &trash_uri,
-				  TRUE,
-				  TRUE,
-				  0777);
+       file = gfile_new (folder);
 
-	if (trash_uri != NULL) {
-		char *trash_path;
-		char *dest_folder;
+       g_return_if_fail (window != NULL);
 
-		trash_path = gnome_vfs_uri_to_string (trash_uri, GNOME_VFS_URI_HIDE_NONE);
-		dest_folder = g_strconcat (trash_path, "/", file_name_from_path (folder), NULL);
+       fcdata = g_new0 (FileCopyData, 1);
 
-		folder_copy (window,
-			     folder,
-			     dest_folder,
-			     FILE_OP_MOVE,
-			     FALSE,
-			     TRUE,
-			     done_func,
-			     done_data);
+       fcdata->window = window;
+       fcdata->file_list = g_list_append (fcdata->file_list, g_strdup (g_file_get_path (file)));
+       fcdata->copied_list = NULL;
+       fcdata->created_list = NULL;
+       fcdata->current_file = fcdata->file_list;
+       fcdata->destination = NULL;
+       fcdata->remove_source = TRUE;
+       fcdata->copy_cache = FALSE;
+       fcdata->done_func = done_func;
+       fcdata->done_data = done_data;
+       fcdata->overwrite_result = OVERWRITE_RESULT_NO;
+       fcdata->cache_copied = FALSE;
+       fcdata->copying_cache = FALSE;
+       fcdata->error = NULL;
+       fcdata->file_index = 1;
+       fcdata->files_total = 1;
+       fcdata->continue_dialog_visible = FALSE;
+       fcdata->overwrite_dialog_visible = FALSE;
 
-		g_free (trash_path);
-		g_free (dest_folder);
-		gnome_vfs_uri_unref (trash_uri);
+       source_list = g_list_append(source_list, file);
 
-	} else if (done_func != NULL)
-		(*done_func) (GNOME_VFS_ERROR_NOT_FOUND, done_data);
+       /**/
 
-	g_free (parent_dir);
-	gnome_vfs_uri_unref (parent_uri);
+       fcdata->gui = glade_xml_new (GTHUMB_GLADEDIR "/" GLADE_PNG_EXP_FILE, NULL, NULL);
+       if (! fcdata->gui) {
+	       file_copy_data_free (fcdata);
+	       g_warning ("Could not find " GLADE_PNG_EXP_FILE "\n");
+	       return;
+       }
+
+       fcdata->progress_dialog = glade_xml_get_widget (fcdata->gui, "progress_dialog");
+       fcdata->progress_progressbar = glade_xml_get_widget (fcdata->gui, "progress_progressbar");
+       fcdata->progress_info = glade_xml_get_widget (fcdata->gui, "progress_info");
+       fcdata->progress_cancel = glade_xml_get_widget (fcdata->gui, "progress_cancel");
+
+       g_signal_connect (G_OBJECT (fcdata->progress_dialog),
+			 "delete_event",
+			 G_CALLBACK (dlg_files_copy__interrupt_cb1),
+			 fcdata);
+       g_signal_connect (G_OBJECT (fcdata->progress_cancel),
+			 "clicked",
+			 G_CALLBACK (dlg_files_copy__interrupt_cb2),
+			 fcdata);
+
+       gtk_window_set_transient_for (GTK_WINDOW (fcdata->progress_dialog),
+				     GTK_WINDOW (fcdata->window));
+       gtk_window_set_modal (GTK_WINDOW (fcdata->progress_dialog), FALSE);
+
+       fcdata->timeout_id = g_timeout_add (DISPLAY_PROGRESS_DELAY,
+					   file_copy__display_progress_dialog,
+					   fcdata);
+
+       all_windows_remove_monitor ();
+
+       async_file_trash (source_list,
+			 NULL, _after_each_file_trashed, fcdata,
+			 G_PRIORITY_DEFAULT,
+			 _trash_files_done, fcdata, NULL);
+
+       g_list_foreach (source_list, (GFunc)g_object_unref, NULL);
 }
 
 
@@ -2388,13 +2572,13 @@
 
 
 static void
-copy_item__continue2 (GnomeVFSResult result,
+copy_item__continue2 (GError       *error,
 		      gpointer       data)
 {
 	CopyItemsData *cidata = data;
 
 	if (cidata->done_func != NULL)
-		(cidata->done_func) (GNOME_VFS_OK, cidata->done_data);
+                (cidata->done_func) (error, cidata->done_data);
 	copy_items_data_free (cidata);
 }
 
@@ -2423,12 +2607,12 @@
 
 
 static void
-copy_item__continue1 (GnomeVFSResult result,
+copy_item__continue1 (GError      *gerror,
 		      gpointer       data)
 {
 	CopyItemsData *cidata = data;
 
-	if (result != GNOME_VFS_OK) {
+        if (gerror) {
 		gboolean    last_item = cidata->current_item->next == NULL;
 		const char *error;
 		char       *folder = cidata->current_item->data;
@@ -2444,7 +2628,7 @@
 		utf8_name = basename_for_display (folder);
 		message = g_strdup_printf (error,
 					   utf8_name,
-					   gnome_vfs_result_to_string (result),
+                                           gerror->message,
 					   NULL);
 		g_free (utf8_name);
 
Index: src/dlg-file-utils.h
===================================================================
--- src/dlg-file-utils.h	(revisão 2408)
+++ src/dlg-file-utils.h	(cópia de trabalho)
@@ -44,7 +44,7 @@
 
 /**/
 
-typedef void (*FileOpDoneFunc) (GnomeVFSResult result,
+typedef void (*FileOpDoneFunc) (GError        *error,
 				gpointer       data);
 
 void     dlg_files_copy           (GthWindow      *window,
Index: src/gth-window-actions-callbacks.c
===================================================================
--- src/gth-window-actions-callbacks.c	(revisão 2408)
+++ src/gth-window-actions-callbacks.c	(cópia de trabalho)
@@ -31,7 +31,7 @@
 #include <libgnome/gnome-exec.h>
 #include <libgnome/gnome-help.h>
 #include <libgnome/gnome-url.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
+#include <gio/gio.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "async-pixbuf-ops.h"
@@ -729,7 +729,7 @@
 	data->align = align;
 	
 	if (is_local_file (image_path))
-		set_wallpaper_step_2 (image_path, GNOME_VFS_OK, data);
+		set_wallpaper_step_2 (image_path, NULL, data);
 	else {
 		char *wallpaper_filename;
 		
Index: src/dlg-image-prop.c
===================================================================
Index: data/glade/gthumb_convert.glade
===================================================================
--- data/glade/gthumb_convert.glade	(revisão 2408)
+++ data/glade/gthumb_convert.glade	(cópia de trabalho)
@@ -1528,7 +1528,7 @@
 	  <child>
 	    <widget class="GtkImage" id="image44">
 	      <property name="visible">True</property>
-	      <property name="stock">gtk-dialog-question</property>
+	      <property name="stock">gtk-question</property>
 	      <property name="icon_size">6</property>
 	      <property name="xalign">0.5</property>
 	      <property name="yalign">0.5</property>
Index: libgthumb/gfile-utils.c
===================================================================
--- libgthumb/gfile-utils.c	(revisão 2408)
+++ libgthumb/gfile-utils.c	(cópia de trabalho)
@@ -31,12 +31,373 @@
 #include "gconf-utils.h"
 #include "gfile-utils.h"
 
-
 /*
  * NOTE: All these functions accept/return _only_ uri-style GFiles.
  */
 
+struct _AsyncXferData {
+        guint                  ref_count;
+        GList                 *source_list;
+        GList                 *destination_list;
+	guint                  current_index;
+	guint                  total_files;
+        GFileCopyFlags         flags;
+        GFileProgressCallback  progress_callback;
+        gpointer               progress_data;
+        GDestroyNotify         progress_data_free;
+        AsyncXferEachFileFunc  each_file_callback;
+        gpointer               each_file_data;
+        GCancellable          *cancel;
+        GSourceFunc            done_func;
+        gpointer               done_data;
+        GDestroyNotify         done_free;
+        gboolean               move_files;
+};
+
+struct _AsyncXferEachFile {
+        AsyncXferEachFileFunc  callback;
+        GFile                 *src;
+        GFile                 *dest;
+	guint                  index;
+	guint                  total_files;
+        GError                *error;
+        AsyncXferData         *data;
+        gpointer               each_file_data;
+};
+
+struct _GFileTrashEachFile {
+	GFileTrashedCb       callback;
+	gpointer             callback_data;
+        GFile               *file;
+	guint               *index;
+	guint               *total;
+	GError              *error;
+	gpointer             data;
+        GSourceFunc          done_func;
+        gpointer             done_data;
+        GDestroyNotify       done_free;
+	GCancellable        *cancel;
+};
+
+static AsyncXferData * _async_xfer_data_ref (AsyncXferData *data);
+static void            _async_xfer_data_try_destroy (gpointer data);
+static gboolean        _async_xfer_data_unref (AsyncXferData *data, gboolean try_free);
+static gboolean        _async_xfer_job_do (GIOSchedulerJob *job, GCancellable *cancellable, gpointer user_data);
+static gboolean        _async_file_trash_job_do (GIOSchedulerJob *job, GCancellable *cancellable, gpointer user_data);
+
+static AsyncXferData *
+_async_xfer_data_new ()
+{
+        AsyncXferData *data;
+        data = g_new0(AsyncXferData, 1);
+        data->ref_count = 1;
+        data->source_list = NULL;
+        data->destination_list = NULL;
+	data->current_index = 0;
+	data->total_files = 0;
+        data->flags = 0;
+        data->progress_callback = NULL;
+        data->progress_data = NULL;
+        data->progress_data_free = NULL;
+        data->cancel = NULL;
+        data->done_func = NULL;
+        data->done_data = NULL;
+        data->done_free = NULL;
+        data->move_files = FALSE;
+        return data;
+}
+
+static AsyncXferData *
+_async_xfer_data_ref (AsyncXferData *data)
+{
+        data->ref_count++;
+        return data;
+}
+
+static void
+_async_xfer_data_try_destroy (gpointer data)
+{
+        AsyncXferData *axdata = data;
+        _async_xfer_data_unref (axdata, TRUE);
+}
+
+static gboolean
+_async_xfer_data_unref (AsyncXferData *data, gboolean try_free)
+{
+
+        if (data->ref_count > 0)
+                data->ref_count--;
+        else {
+                if (try_free) {
+                        g_list_foreach (data->source_list,
+                                        (GFunc)g_object_unref,
+                                        NULL);
+                        g_list_free (data->source_list);
+                        g_list_foreach (data->destination_list,
+                                        (GFunc)g_object_unref,
+                                        NULL);
+                        g_list_free (data->destination_list);
+                        g_object_unref (data->cancel);
+                        data->ref_count = 1;
+                        data->source_list = NULL;
+                        data->destination_list = NULL;
+                        data->flags = 0;
+                        data->progress_callback = NULL;
+                        data->progress_data = NULL;
+                        data->progress_data_free = NULL;
+                        data->cancel = NULL;
+                        data->done_func = NULL;
+                        data->done_data = NULL;
+                        data->done_free = NULL;
+                        data->move_files = FALSE;
+                        g_free (data);
+                        data = NULL;
+                }
+                return FALSE;
+        }
+        return TRUE;
+}
+
+static gboolean
+_async_xfer_each_file_in_mainloop (gpointer data)
+{
+        AsyncXferEachFile *axef = data;
+
+        axef->callback
+        (axef->src,
+         axef->dest,
+	 axef->index,
+	 axef->total_files,
+         axef->error,
+         axef->data,
+         axef->each_file_data);
+
+        return FALSE;
+}
+
+static gboolean
+_async_xfer_job_do (GIOSchedulerJob *job,
+                    GCancellable *cancellable,
+                    gpointer user_data)
+{
+        AsyncXferData *data = user_data;
+        GFile *src, *dst;
+        GError *error = NULL;
+        guint counter = 0;
+        GList *scan;
+
+        data->source_list = g_list_first(data->source_list);
+        data->destination_list = g_list_first(data->destination_list);
+
+
+        for (scan = data->source_list; scan != NULL; scan = g_list_next(scan)) {
+                if (g_cancellable_is_cancelled (cancellable))
+                        return FALSE;
+
+                data->destination_list = g_list_nth (data->destination_list, counter);
+                if ((!data->source_list) || (!data->destination_list))
+                        return FALSE;
+
+                src = g_object_ref (scan->data);
+                dst = g_object_ref (data->destination_list->data);
+                g_clear_error (&error);
+
+		data->current_index++;
+                if (data->move_files)
+                        g_file_move (src, dst, data->flags, cancellable,
+                                     data->progress_callback,
+                                     data->progress_data,
+                                     &error);
+                else
+                        g_file_copy (src, dst, data->flags, cancellable,
+                                     data->progress_callback,
+                                     data->progress_data,
+                                     &error);
+
+                if (data->each_file_callback) {
+                        AsyncXferEachFile *axef = g_new0 (AsyncXferEachFile, 1);
+                        axef->callback = data->each_file_callback;
+                        axef->src = src;
+                        axef->dest = dst;
+                        axef->error = error;
+                        axef->data = data;
+			axef->index = data->current_index;
+			axef->total_files = data->total_files;
+                        axef->each_file_data = data->each_file_data;
+                        g_io_scheduler_job_send_to_mainloop (job,
+                                                             _async_xfer_each_file_in_mainloop,
+                                                             axef,
+                                                             g_free);
+                }
+
+                if (data->done_func)
+                        g_io_scheduler_job_send_to_mainloop (job,
+                                                             data->done_func,
+                                                             data->done_data,
+                                                             data->done_free);
+
+
+                UNREF (src);
+                UNREF (dst);
+                counter++; /* must be increased here */
+        }
+
+        if (data->progress_data_free)
+                data->progress_data_free (data->progress_data);
+
+
+        return FALSE;
+}
+
+static gboolean
+_gfile_trashed_cb (gpointer data)
+{
+	GFileTrashEachFile *ftef = data;
+	ftef->callback
+		(ftef->file,
+		 *ftef->index,
+		 *ftef->total,
+		 ftef->error,
+		 ftef->data);
+}
+
+static gboolean
+_gfile_trash_recursive (GIOSchedulerJob *job,
+			GFile *file,
+			guint *index,
+			guint *total_files,
+			GFileTrashedCb callback,
+			gpointer data,
+			GCancellable *cancel,
+			GError **error)
+{
+	gchar *filename;
+	GFileEnumerator *enumerator;
+	GFileInfo *info;
+	GFile *newfile;
+	GError *error2 = NULL;
+
+	if (g_file_trash (file, cancel, &error2)) {
+		*index++;
+		*total_files++;
+		if (callback) {
+			GFileTrashEachFile *ftef = g_new0 (GFileTrashEachFile, 1);
+			ftef->callback = callback;
+			ftef->file = file;
+			ftef->error = error2;
+			ftef->data = data;
+			ftef->index = index;
+			ftef->total = total_files;
+			g_io_scheduler_job_send_to_mainloop (job,
+							     _gfile_trashed_cb,
+							     ftef,
+							     g_free);
 
+		}
+		return TRUE;
+	}
+
+	filename = g_file_get_uri (file);
+	if (g_file_test (filename, G_FILE_TEST_IS_DIR)) {
+		enumerator = g_file_enumerate_children (file, "standard::name",
+							G_FILE_QUERY_INFO_NONE,
+							cancel, &error2);
+		if (error2) {
+			g_propagate_error (error, error2);
+			return FALSE;
+		}
+
+		while ((info = g_file_enumerator_next_file(enumerator, cancel, &error2))){
+			if (error2) {
+				g_propagate_error (error, error2);
+				return FALSE;
+			}
+			*total_files++;
+			newfile = gfile_new (g_file_info_get_name (info));
+			_gfile_trash_recursive (job,
+						newfile,
+						index,
+						total_files,
+						callback,
+						data,
+						cancel,
+						error);
+			g_object_unref (info);
+
+		}
+	}
+	return TRUE;
+}
+
+static gboolean
+_gfile_trash_folder_job_do (GIOSchedulerJob *job,
+			    GCancellable *cancellable,
+			    gpointer user_data)
+{
+	GFileTrashEachFile *ftef = user_data;
+
+	if (_gfile_trash_recursive (job,
+				ftef->file,
+				ftef->index,
+				ftef->total,
+				ftef->callback,
+				ftef->callback_data,
+				ftef->cancel,
+				    &ftef->error))
+
+	return FALSE;
+}
+
+static gboolean
+_async_file_trash_job_do (GIOSchedulerJob *job,
+                          GCancellable *cancellable,
+                          gpointer user_data)
+{
+        AsyncXferData *data = user_data;
+        GFile *src;
+        GError *error = NULL;
+        GList *scan;
+
+        data->source_list = g_list_first(data->source_list);
+
+        for (scan = data->source_list; scan != NULL; scan = g_list_next(scan)) {
+                if (g_cancellable_is_cancelled (cancellable))
+                        return FALSE;
+
+                src = g_object_ref (scan->data);
+                g_clear_error (&error);
+
+                g_file_trash (src, data->cancel, &error);
+
+		data->current_index++;
+
+                if (data->each_file_callback) {
+                        AsyncXferEachFile *axef = g_new0 (AsyncXferEachFile, 1);
+                        axef->callback = data->each_file_callback;
+                        axef->src = src;
+                        axef->dest = NULL;
+                        axef->error = error;
+                        axef->data = data;
+			axef->index = data->current_index;
+			axef->total_files = data->total_files;
+                        axef->each_file_data = data->each_file_data;
+                        g_io_scheduler_job_send_to_mainloop (job,
+                                                             _async_xfer_each_file_in_mainloop,
+                                                             axef,
+                                                             g_free);
+                }
+
+                if (data->done_func)
+                        g_io_scheduler_job_send_to_mainloop (job,
+                                                             data->done_func,
+                                                             data->done_data,
+                                                             data->done_free);
+
+                UNREF (src);
+        }
+
+        return FALSE;
+}
 
 /* GFile to string */
 
@@ -592,7 +953,7 @@
 }
 
 
-static gboolean
+gboolean
 _gfile_delete_directory_recursive (GFile   *dir,
                                    GError **error)
 {
@@ -619,7 +980,7 @@
                                 error_occurred = TRUE;
                         break;
                 default:
-                        if (! g_file_delete (child, NULL, error))
+                        if (! g_file_trash (child, NULL, error))
                                 error_occurred = TRUE;
                         break;
                 }
@@ -711,6 +1072,92 @@
         return gfile_xfer (sfile, dfile, TRUE);
 }
 
+void
+async_xfer_file_gio (GList                *source_list,
+                     GList                *destination_list,
+                     gboolean               move_files,
+                     GFileCopyFlags         flags,
+                     GCancellable          *cancel,
+                     GFileProgressCallback  progress_callback,
+                     gpointer               progress_data,
+                     GDestroyNotify         progress_data_free,
+                     AsyncXferEachFileFunc  each_file_callback,
+                     gpointer               each_file_data,
+                     gint                   io_priority,
+                     GSourceFunc            done_func,
+                     gpointer               done_data,
+                     GDestroyNotify         done_free)
+{
+        GList *scan;
+        AsyncXferData *data;
+
+        g_assert (g_list_length (source_list) == g_list_length (destination_list));
+
+        data = _async_xfer_data_new ();
+        data->source_list = NULL;
+        data->destination_list = NULL;
+        for (scan = source_list; scan != NULL; scan = g_list_next(scan))
+                data->source_list = g_list_prepend(data->source_list,
+                                                   g_object_ref (G_FILE (scan->data)));
+
+        for (scan = destination_list; scan != NULL; scan = g_list_next(scan))
+                data->destination_list = g_list_prepend(data->destination_list,
+                                                        g_object_ref (G_FILE (scan->data)));
+
+        data->source_list = g_list_reverse(data->source_list);
+        data->destination_list = g_list_reverse(data->destination_list);
+        data->flags = flags;
+        data->progress_callback = progress_callback;
+        data->progress_data = progress_data;
+        data->progress_data_free = progress_data_free;
+        data->each_file_callback = each_file_callback;
+        data->each_file_data = each_file_data;
+        data->done_func = done_func;
+        data->done_data = done_data;
+        data->done_free = done_free;
+
+        g_io_scheduler_push_job (_async_xfer_job_do, data,
+                                 _async_xfer_data_try_destroy,
+                                 io_priority, cancel);
+}
+
+void
+async_file_trash (GList                 *source_list,
+                  GCancellable          *cancel,
+                  AsyncXferEachFileFunc  each_file_callback,
+                  gpointer               each_file_data,
+                  gint                   io_priority,
+                  GSourceFunc            done_func,
+                  gpointer               done_data,
+                  GDestroyNotify         done_free)
+{
+        GList *scan;
+        AsyncXferData *data;
+
+
+        data = _async_xfer_data_new ();
+
+        data->source_list = NULL;
+        data->destination_list = NULL;
+
+	data->total_files = g_list_length (source_list);
+
+        for (scan = source_list; scan != NULL; scan = g_list_next(scan))
+                data->source_list = g_list_prepend(data->source_list,
+                                                   g_object_ref (G_FILE (scan->data)));
+
+        data->source_list = g_list_reverse(data->source_list);
+
+        data->each_file_callback = each_file_callback;
+        data->each_file_data = each_file_data;
+        data->done_func = done_func;
+        data->done_data = done_data;
+        data->done_free = done_free;
+
+        g_io_scheduler_push_job (_async_file_trash_job_do, data,
+                                 _async_xfer_data_try_destroy,
+                                 io_priority, cancel);
+}
 
 gssize
 gfile_output_stream_write (GFileOutputStream  *ostream,
Index: libgthumb/gfile-utils.h
===================================================================
--- libgthumb/gfile-utils.h	(revisão 2408)
+++ libgthumb/gfile-utils.h	(cópia de trabalho)
@@ -34,6 +34,23 @@
 	}					\
 }
 
+typedef struct _AsyncXferEachFile      AsyncXferEachFile;
+typedef struct _AsyncXferData          AsyncXferData;
+typedef struct _GFileTrashEachFile     GFileTrashEachFile;
+
+typedef void (*AsyncXferEachFileFunc)  (GFile *source,
+                                        GFile *destination,
+					guint index,
+					guint total_files,
+                                        GError *error,
+                                        AsyncXferData *data,
+                                        gpointer user_data);
+typedef void (*GFileTrashedCb)  (GFile *file,
+				 guint index,
+				 guint total,
+				 GError *error,
+				 gpointer data);
+
 /*
  * NOTE: All these functions accept/return _only_ uri-style GFiles.
  */
@@ -95,6 +112,41 @@
 gboolean      gfile_move                       (GFile      *sfile,
 		                                GFile      *dfile);
 
+void          async_xfer_file_gio              (GList                  *source_list,
+						GList                  *destination_list,
+						gboolean                move_files,
+						GFileCopyFlags          flags,
+						GCancellable           *cancel,
+						GFileProgressCallback   progress_callback,
+						gpointer                progress_data,
+						GDestroyNotify          progress_data_free,
+						AsyncXferEachFileFunc   each_file_callback,
+						gpointer                each_file_data,
+						gint                    io_priority,
+						GSourceFunc             done_func,
+						gpointer                done_data,
+						GDestroyNotify          done_free);
+
+void          async_file_trash                (GList                 *source_list,
+					       GCancellable          *cancel,
+					       AsyncXferEachFileFunc  each_file_callback,
+					       gpointer               each_file_data,
+					       gint                   io_priority,
+					       GSourceFunc            done_func,
+					       gpointer               done_data,
+					       GDestroyNotify         done_free);
+
+void          async_folder_trash              (GFile          *folder,
+					       GCancellable   *cancel,
+					       GFileTrashedCb  each_file_callback,
+					       gpointer        each_file_data,
+					       guint          *index,
+					       guint          *total_files,
+					       gint            io_priority,
+					       GSourceFunc     done_func,
+					       gpointer        done_data,
+					       GDestroyNotify  done_free);
+
 /* line-based read/write */
 gssize        gfile_output_stream_write_line   (GFileOutputStream *ostream,
                                 		GError           **error,
Index: libgthumb/file-utils.c
===================================================================
--- libgthumb/file-utils.c	(revisão 2408)
+++ libgthumb/file-utils.c	(cópia de trabalho)
@@ -69,6 +69,13 @@
 #define MAX_SYMLINKS_FOLLOWED 32
 
 
+/* empty functions */
+static void _empty_file_progress_cb  (goffset current_num_bytes,
+				      goffset total_num_bytes,
+				      gpointer user_data)
+{
+}
+
 /* Async directory list */
 
 
@@ -771,7 +778,6 @@
 	return xfer_file (from, to, TRUE);
 }
 
-
 gboolean
 local_file_move (const char *from,
 	         const char *to)
@@ -1719,7 +1725,6 @@
 	return uri;
 }
 
-
 char *
 new_path_from_uri (GnomeVFSURI *uri)
 {
@@ -1969,10 +1974,8 @@
 	return FALSE;
 }
 
-
 /* Catalogs */
 
-
 char *
 get_catalog_full_path (const char *relative_path)
 {
@@ -2402,33 +2405,15 @@
 	}
 	copy_data_free (copy_data);
 	
-	return FALSE;
 }
 
-
-static int
-copy_file_async_progress_update_cb (GnomeVFSAsyncHandle      *handle,
-				    GnomeVFSXferProgressInfo *info,
-				    gpointer                  user_data)
+static void
+copy_file_async_done_gio (GObject *source_object,
+			  GAsyncResult *res,
+			  gpointer data)
 {
-	CopyData *copy_data = user_data;
-
-	if (info->status != GNOME_VFS_XFER_PROGRESS_STATUS_OK) {
-		copy_data->result = info->vfs_status;
-		return FALSE;
+	copy_file_async_done (data);
 	}
-	else if (info->phase == GNOME_VFS_XFER_PHASE_COMPLETED) 
-		copy_data->idle_id = g_idle_add (copy_file_async_done, copy_data);
-	/*else if ((info->phase == GNOME_VFS_XFER_PHASE_COPYING)
-		 || (info->phase == GNOME_VFS_XFER_PHASE_MOVING))
-		g_signal_emit (G_OBJECT (copy_data->archive),
-			       fr_archive_signals[PROGRESS],
-			       0,
-			       (double) info->total_bytes_copied / info->bytes_total);*/
-			       
-	return TRUE;
-}
-
 
 CopyData *
 copy_file_async (const char   *source_uri,
@@ -2437,37 +2422,26 @@
 		 gpointer      done_data)
 {
 	CopyData       *copy_data;
-	GList          *source_uri_list, *target_uri_list;
-	GnomeVFSResult  result;
+	GFile          *sfile, *dfile;
 
 	copy_data = copy_data_new (source_uri, target_uri, done_func, done_data);
 
 	if (! path_is_file (source_uri)) {
-		copy_data->result = GNOME_VFS_ERROR_NOT_FOUND;
-		copy_data->idle_id = g_idle_add (copy_file_async_done, copy_data);
+		g_set_error (&copy_data->error, G_IO_ERROR,
+			     G_IO_ERROR_NOT_FOUND, 
+			     "File not found: %s", source_uri);
 		return NULL;
 	}
 
-	source_uri_list = g_list_append (NULL, gnome_vfs_uri_new (source_uri));
-	target_uri_list = g_list_append (NULL, gnome_vfs_uri_new (target_uri));
-
-	result = gnome_vfs_async_xfer (&copy_data->handle,
-				       source_uri_list,
-				       target_uri_list,
-				       GNOME_VFS_XFER_DEFAULT | GNOME_VFS_XFER_FOLLOW_LINKS,
-				       GNOME_VFS_XFER_ERROR_MODE_ABORT,
-				       GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
-				       GNOME_VFS_PRIORITY_DEFAULT,
-				       copy_file_async_progress_update_cb, copy_data,
-				       NULL, NULL);
-
-	gnome_vfs_uri_list_free (source_uri_list);
-	gnome_vfs_uri_list_free (target_uri_list);
+	sfile = g_file_new_for_uri (source_uri);
+	dfile = g_file_new_for_uri (target_uri);
 
-	if (result != GNOME_VFS_OK) {
-		copy_data->result = result;
-		copy_data->idle_id = g_idle_add (copy_file_async_done, copy_data);
-	}
+	g_file_copy_async (sfile, dfile,
+			   G_FILE_COPY_OVERWRITE,
+			   G_PRIORITY_DEFAULT,
+			   NULL, NULL, NULL,
+			   copy_file_async_done_gio,
+			   copy_data);
 	
 	return copy_data;
 }
Index: libgthumb/file-utils.h
===================================================================
--- libgthumb/file-utils.h	(revisão 2408)
+++ libgthumb/file-utils.h	(cópia de trabalho)
@@ -26,6 +26,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <time.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-uri.h>
 #include <libgnomevfs/gnome-vfs-result.h>
 #include <libgnomevfs/gnome-vfs-file-size.h>
Index: libgthumb/thumb-cache.c
===================================================================
--- libgthumb/thumb-cache.c	(revisão 2408)
+++ libgthumb/thumb-cache.c	(cópia de trabalho)
@@ -39,6 +39,7 @@
 #include <libgnomevfs/gnome-vfs-uri.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 
 #include "typedefs.h"
 #include "thumb-cache.h"
