Index: configure.in
===================================================================
--- configure.in	(revisão 2312)
+++ configure.in	(cópia de trabalho)
@@ -54,21 +54,22 @@
 
 dnl ===========================================================================
 
-PKG_CHECK_MODULES(GTHUMB,				\
-	glib-2.0 >= $GLIB_REQUIRED			\
-	gthread-2.0					\
-	gmodule-2.0					\
-	gtk+-2.0 >= $GTK_REQUIRED			\
-	libgnome-2.0 >= $LIBGNOME_REQUIRED		\
-	libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED		\
+PKG_CHECK_MODULES(GTHUMB,				            \
+	glib-2.0 >= $GLIB_REQUIRED			            \
+	gthread-2.0					                    \
+	gmodule-2.0					                    \
+	gtk+-2.0 >= $GTK_REQUIRED			            \
+	libgnome-2.0 >= $LIBGNOME_REQUIRED		        \
+	libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED		    \
 	libgnomecanvas-2.0 >= $LIBGNOMECANVAS_REQUIRED	\
-	libbonobo-2.0 >= $BONOBO_REQUIRED		\
-	libbonoboui-2.0 >= $BONOBO_REQUIRED		\
-	bonobo-activation-2.0 >= $BONOBO_REQUIRED	\
-	gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED		\
-	gnome-vfs-module-2.0				\
-	exiv2 >= $EXIV2_REQUIRED			\
-	libxml-2.0 >= $LIBXML_REQUIRED			\
+	libbonobo-2.0 >= $BONOBO_REQUIRED		        \
+	libbonoboui-2.0 >= $BONOBO_REQUIRED		        \
+	bonobo-activation-2.0 >= $BONOBO_REQUIRED	    \
+	gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED		    \
+	gnome-vfs-module-2.0				            \
+    gio-2.0                                         \
+	exiv2 >= $EXIV2_REQUIRED			            \
+	libxml-2.0 >= $LIBXML_REQUIRED			        \
 	libglade-2.0 >= $LIBGLADE_REQUIRED)
 AC_SUBST(GTHUMB_LIBS)
 AC_SUBST(GTHUMB_CFLAGS)
Index: src/catalog-web-exporter.c
===================================================================
--- src/catalog-web-exporter.c	(revisão 2312)
+++ src/catalog-web-exporter.c	(cópia de trabalho)
@@ -1582,7 +1582,7 @@
 		case GTH_TAG_FILESIZE:
 			idx = get_image_idx (tag, ce);
 			idata = g_list_nth (ce->file_list, idx)->data;
-			line = gnome_vfs_format_file_size_for_display (idata->src_file->size);
+			line = g_format_size_for_display (idata->src_file->size);
 			write_markup_escape_line (line, fout);
 			break;
 
Index: src/rotation-utils.c
===================================================================
--- src/rotation-utils.c	(revisão 2312)
+++ src/rotation-utils.c	(cópia de trabalho)
@@ -25,9 +25,7 @@
 #include <sys/types.h>
 
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gio/gio.h>
 #include "file-utils.h"
 #include "gconf-utils.h"
 #include "gtk-utils.h"
@@ -148,7 +146,9 @@
 	char             *tmp_output_file = NULL;
 	JXFORM_CODE       transf;
 	char		 *local_file;
-	GnomeVFSFileInfo *info = NULL;
+  GFile *file_gfile;
+  GFileInfo *info;
+  GError *newerror = NULL;
 
 	if (file == NULL)
 		return FALSE;
@@ -171,9 +171,23 @@
 		goto apply_transformation_jpeg__free_and_close;
 	}
 
-	info = gnome_vfs_file_info_new ();
-	gnome_vfs_get_file_info (file->path, info, GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS | GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
+  file_gfile = g_file_new_for_uri (file->path);
+  info = g_file_query_info (file_gfile, "*", G_FILE_QUERY_INFO_NONE, NULL, &newerror);
 
+  if (newerror)
+  {
+    g_error ("Error when gathering file info: %s", newerror->message);
+    g_propagate_error (error, newerror);
+    g_object_unref (info);
+    g_object_unref (file_gfile);
+		goto apply_transformation_jpeg__free_and_close;
+  }
+
+  if (newerror)
+    g_error_free (newerror);
+
+  g_object_unref (file_gfile);
+
 	switch (transform) {
 	case GTH_TRANSFORM_NONE:
 		transf = JXFORM_NONE;
@@ -212,18 +226,29 @@
 
 	if (! local_file_move (tmp_output_file, local_file)) {
 		if (error != NULL)
-			*error = g_error_new (GTHUMB_ERROR, 0, "%s", _("Could not move temporary file to local destination. Check folder permissions."));
+      *error = g_error_new (GTHUMB_ERROR, 0, "%s",
+          _("Could not move temporary file to local destination. Check folder permissions."));
 		result = FALSE;
 		goto apply_transformation_jpeg__free_and_close;	
 	}
 
 	if (info != NULL) {
 		char *local_uri;
-		
+
+    newerror = NULL;
 		local_uri = get_uri_from_local_path (local_file);
-		gnome_vfs_set_file_info (local_uri, info, GNOME_VFS_SET_FILE_INFO_PERMISSIONS | GNOME_VFS_SET_FILE_INFO_OWNER);
-		gnome_vfs_file_info_unref (info);
+    file_gfile = g_file_new_for_uri (local_uri);
+    g_file_info_clear_status (info);
+    g_file_set_attributes_from_info     (file_gfile,
+        info,
+        G_FILE_QUERY_INFO_NONE,
+        NULL,
+        newerror);
+    g_object_unref (file_gfile);
+    g_object_unref (info);
 		g_free (local_uri);
+    if (newerror)
+      g_error_free (newerror);
 	}
 
 apply_transformation_jpeg__free_and_close:
Index: src/catalog-png-exporter.c
===================================================================
--- src/catalog-png-exporter.c	(revisão 2312)
+++ src/catalog-png-exporter.c	(cópia de trabalho)
@@ -28,6 +28,7 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkrgb.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "catalog-png-exporter.h"
@@ -839,7 +840,7 @@
 	}
 
 	if (ce->caption_fields & GTH_CAPTION_FILE_SIZE)
-		idata->caption_row[row++] = gnome_vfs_format_file_size_for_display (idata->file->size);
+		idata->caption_row[row++] = g_format_size_for_display (idata->file->size);
 
 	if (ce->caption_fields & GTH_CAPTION_IMAGE_DIM)
 		idata->caption_row[row++] = g_strdup_printf (
Index: src/gth-exif-data-viewer.c
===================================================================
--- src/gth-exif-data-viewer.c	(revisão 2312)
+++ src/gth-exif-data-viewer.c	(cópia de trabalho)
@@ -26,6 +26,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-mime.h>
 #include <libgnomevfs/gnome-vfs-file-info.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
@@ -332,7 +333,7 @@
 	strftime (time_txt, 50, _("%d %B %Y, %H:%M"), tm);
 	utf8_time_txt = g_locale_to_utf8 (time_txt, -1, 0, 0, 0);
 
-	file_size_txt = gnome_vfs_format_file_size_for_display (edv->priv->file->size);
+	file_size_txt = g_format_size_for_display (edv->priv->file->size);
 
 	mime_type = edv->priv->file->mime_type;
 	
Index: src/dlg-catalog.c
===================================================================
--- src/dlg-catalog.c	(revisão 2312)
+++ src/dlg-catalog.c	(cópia de trabalho)
@@ -29,6 +29,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-ops.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 
Index: src/dlg-duplicates.c
===================================================================
--- src/dlg-duplicates.c	(revisão 2312)
+++ src/dlg-duplicates.c	(cópia de trabalho)
@@ -33,6 +33,7 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 #include <libgnomeui/libgnomeui.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "catalog.h"
@@ -1079,7 +1080,7 @@
 	if (! get_iter_from_image_data (data, idata, &iter))
 		return;
 
-	size_txt = gnome_vfs_format_file_size_for_display (idata->common->size * idata->common->duplicates);
+	size_txt = g_format_size_for_display (idata->common->size * idata->common->duplicates);
 	n_txt = g_strdup_printf ("%d", idata->common->duplicates);
 
 	gtk_list_store_set (GTK_LIST_STORE (data->images_model),
@@ -1100,7 +1101,7 @@
         GtkTreeIter  iter;
 	char        *size_txt;
 
-	size_txt = gnome_vfs_format_file_size_for_display (idata->common->size);
+	size_txt = g_format_size_for_display (idata->common->size);
 
 	gtk_list_store_append (GTK_LIST_STORE (data->images_model), &iter);
 	gtk_list_store_set (GTK_LIST_STORE (data->images_model),
@@ -1141,7 +1142,7 @@
 		}
 	}
 
-	size_txt = gnome_vfs_format_file_size_for_display (size);
+	size_txt = g_format_size_for_display (size);
 	label = g_strdup_printf ("%d (%s)", data->duplicates, size_txt);
 	g_free (size_txt);
 
Index: src/dlg-rename-series.c
===================================================================
--- src/dlg-rename-series.c	(revisão 2312)
+++ src/dlg-rename-series.c	(cópia de trabalho)
@@ -26,6 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
+#include <gio/gio.h>
 #include <libgnome/gnome-help.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 
@@ -394,7 +395,7 @@
 		g_free (image_date);
 		g_free (utf8_txt);
 
-		image_size = gnome_vfs_format_file_size_for_display (fdata->size);
+		image_size = g_format_size_for_display (fdata->size);
 		name4 = _g_substitute_pattern (name3, 's', image_size);
 		g_free (image_size);
 
Index: src/dlg-file-utils.c
===================================================================
--- src/dlg-file-utils.c	(revisão 2312)
+++ src/dlg-file-utils.c	(cópia de trabalho)
@@ -26,6 +26,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <libgnomevfs/gnome-vfs-ops.h>
 #include <glade/glade.h>
@@ -538,7 +539,7 @@
 	g_free (utf8_name);
 
 	label = glade_xml_get_widget (gui, size_widget);
-	file_size_txt = gnome_vfs_format_file_size_for_display (get_file_size (filename));
+	file_size_txt = g_format_size_for_display (get_file_size (filename));
 	_gtk_label_set_locale_text (GTK_LABEL (label), file_size_txt);
 	g_free (file_size_txt);
 
Index: src/main.c
===================================================================
--- src/main.c	(revisão 2312)
+++ src/main.c	(cópia de trabalho)
@@ -24,9 +24,8 @@
 #include <gnome.h>
 #include <glade/glade.h>
 #include <gdk/gdkx.h>
-#include <libgnomevfs/gnome-vfs-init.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
 #include <libgnomeui/gnome-authentication-manager.h>
+#include <gio/gio.h>
 
 #include "catalog.h"
 #include "comments.h"
@@ -380,7 +379,7 @@
 	catalog_name_utf8 = g_strconcat (_("Command Line"),
 					 CATALOG_EXT,
 					 NULL);
-	catalog_name = gnome_vfs_escape_string (catalog_name_utf8);
+	catalog_name = g_uri_escape_string (catalog_name_utf8, "", TRUE);
 	catalog_path = get_catalog_full_path (catalog_name);
 	g_free (catalog_name);
 	g_free (catalog_name_utf8);
@@ -454,13 +453,18 @@
 	current_dir = g_get_current_dir ();
 	while ((filename = remaining_args[i++]) != NULL) {
 		char     *tmp1 = NULL;
+    GFile *tmpgf;
 		gboolean  is_dir;
-
 		if (uri_has_scheme (filename) || g_path_is_absolute (filename))
-			tmp1 = gnome_vfs_make_uri_from_shell_arg (filename);
+    {
+      tmpgf = g_file_new_for_commandline_arg (filename);
+      tmp1 = g_file_get_uri (tmpgf);
+      g_object_unref (tmpgf);
+    }
 		else
+    {
 			tmp1 = g_strconcat (current_dir, "/", filename, NULL);
-
+    }
 		path = remove_special_dirs_from_path (tmp1);
 		g_free (tmp1);
 
@@ -728,7 +732,6 @@
 				      GNOME_PARAM_APP_LIBDIR, GTHUMB_LIBDIR,
 				      NULL);
 
-	gnome_vfs_init ();				      
 	gnome_authentication_manager_init ();
 	glade_gnome_init ();
 	gthumb_init ();
Index: src/dlg-image-prop.c
===================================================================
--- src/dlg-image-prop.c	(revisão 2312)
+++ src/dlg-image-prop.c	(cópia de trabalho)
@@ -28,6 +28,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-mime.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <glade/glade.h>
@@ -424,7 +425,8 @@
 		
 		/**/
 		
-		file_size_txt = gnome_vfs_format_file_size_for_display (get_file_size (image_filename));
+    file_size_txt = g_format_size_for_display (get_file_size (image_filename));
+    g_print ("\e[1;32m%s\e[0m\n", file_size_txt);
 		gtk_label_set_text (GTK_LABEL (data->i_file_size_label), file_size_txt);
 		g_free (file_size_txt);
 		
Index: src/gth-fullscreen.c
===================================================================
--- src/gth-fullscreen.c	(revisão 2312)
+++ src/gth-fullscreen.c	(cópia de trabalho)
@@ -29,7 +29,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gio/gio.h>
 
 #include "comments.h"
 #include "dlg-file-utils.h"
@@ -872,7 +872,8 @@
 	height = image_viewer_get_image_height (image_viewer);
 
 	size_txt = g_strdup_printf (_("%d x %d pixels"), width, height);
-	file_size_txt = gnome_vfs_format_file_size_for_display (get_file_size (image_filename));
+	file_size_txt = g_format_size_for_display (get_file_size (image_filename));
+  g_print ("\e[1;31m%s\e[0m\n", file_size_txt);
 
 	zoom = (int) (image_viewer->zoom_level * 100.0);
 
Index: src/gth-browser.c
===================================================================
--- src/gth-browser.c	(revisão 2312)
+++ src/gth-browser.c	(cópia de trabalho)
@@ -27,6 +27,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gtk/gtk.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <libgnomevfs/gnome-vfs-async-ops.h>
 #include <libgnomevfs/gnome-vfs-result.h>
@@ -468,7 +469,7 @@
 	utf8_time_txt = g_locale_to_utf8 (time_txt, -1, 0, 0, 0);
 
 	size_txt = g_strdup_printf (_("%d x %d pixels"), width, height);
-	file_size_txt = gnome_vfs_format_file_size_for_display (priv->image->size);
+	file_size_txt = g_format_size_for_display (priv->image->size);
 
 	/**/
 
@@ -709,8 +710,8 @@
 
 	file_data_list_free (selection);
 
-	size_txt = gnome_vfs_format_file_size_for_display (tot_size);
-	sel_size_txt = gnome_vfs_format_file_size_for_display (sel_size);
+	size_txt = g_format_size_for_display (tot_size);
+	sel_size_txt = g_format_size_for_display (sel_size);
 
 	if (tot_n == 0)
 		total_info = g_strdup (_("No image"));
Index: src/catalog-list.c
===================================================================
--- src/catalog-list.c	(revisão 2312)
+++ src/catalog-list.c	(cópia de trabalho)
@@ -26,6 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include "typedefs.h"
 #include "file-utils.h"
Index: src/gth-viewer.c
===================================================================
--- src/gth-viewer.c	(revisão 2312)
+++ src/gth-viewer.c	(cópia de trabalho)
@@ -27,6 +27,7 @@
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
+#include <gio/gio.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <libgnomevfs/gnome-vfs-mime.h>
 
@@ -587,7 +588,7 @@
 	utf8_time_txt = g_locale_to_utf8 (time_txt, -1, 0, 0, 0);
 
 	size_txt = g_strdup_printf (_("%d x %d pixels"), width, height);
-	file_size_txt = gnome_vfs_format_file_size_for_display (priv->image->size);
+	file_size_txt = g_format_size_for_display (priv->image->size);
 
 	/**/
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revisão 2312)
+++ ChangeLog	(cópia de trabalho)
@@ -1,3 +1,22 @@
+2008-04-02  Gabriel Falcão <gabriel@nacaolivre.org>
+
+	* src/rotation-utils.c: g_file_query_info and
+	g_file_set_attributes_from_info used,
+	instead of gnome_vfs_get_file_info and gnome_vfs_set_file_info.
+	It removes the GnomeVFS dependency from thid file.
+
+2008-04-01  Gabriel Falcão <gabriel@nacaolivre.org>
+
+	* src/main.c: Removed GnomeVFS dependencies. Just little changes like
+	g_uri_escape_string in place of gnome_vfs_escape_string.
+
+	* libgthumb/file-utils.c: in get_file_size, using GFileInfo instead of
+	gnome_vfs_get_file_info.
+
+	* src/dlg-image-prop.c, src/gth-fullscreen.c: Using g_format_size_for_display instead of
+	gnome_vfs_format_file_size_for_display, according to libgthumb/file-utils.c
+	get_file_size, new implementation, that returns a goffset.
+
 2008-03-14  Michael J. Chudobiak  <mjc@svn.gnome.org>
 
 	* libgthumb/file-utils.c: (mime_type_is_raw):
Index: libgthumb/file-utils.c
===================================================================
--- libgthumb/file-utils.c	(revisão 2312)
+++ libgthumb/file-utils.c	(cópia de trabalho)
@@ -41,6 +41,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gdk-pixbuf/gdk-pixbuf-animation.h>
+#include <gio/gio.h>
 #include <libgnomeui/gnome-thumbnail.h>
 #include <libgnomevfs/gnome-vfs.h>
 #include <libgnomevfs/gnome-vfs-handle.h>
@@ -1114,27 +1115,29 @@
 	return is_dir;
 }
 
-
-GnomeVFSFileSize
+goffset
 get_file_size (const char *uri)
 {
-	GnomeVFSFileInfo *info;
-	GnomeVFSResult    result;
-	GnomeVFSFileSize  size;
+  GFile *file;
+  GError *error = NULL;
+  GFileInfo *info;
+  GCancellable *cancel;
 
-	if (! uri || ! *uri)
-		return 0;
+  goffset size = 0;
 
-	info = gnome_vfs_file_info_new ();
-	result = gnome_vfs_get_file_info (uri,
-					  info,
-					  (GNOME_VFS_FILE_INFO_DEFAULT
-					   | GNOME_VFS_FILE_INFO_FOLLOW_LINKS));
-	size = 0;
-	if (result == GNOME_VFS_OK)
-		size = info->size;
+  file = g_file_new_for_uri (uri);
+  cancel = g_cancellable_new ();
+  info = g_file_query_info (file, "standard::*", G_FILE_QUERY_INFO_NONE,
+      cancel, &error);
+  
+  if (error)
+    g_error ("Error when gathering information about %s:\n%s\n", uri, error->message);
+  else
+    size = g_file_info_get_size (info);
 
-	gnome_vfs_file_info_unref (info);
+  g_object_unref (cancel);
+  g_object_unref (file);
+  g_object_unref (info);
 
 	return size;
 }
Index: libgthumb/file-utils.h
===================================================================
--- libgthumb/file-utils.h	(revisão 2312)
+++ libgthumb/file-utils.h	(cópia de trabalho)
@@ -149,7 +149,7 @@
 gboolean            path_exists                   (const char       *s);
 gboolean            path_is_file                  (const char       *s);
 gboolean            path_is_dir                   (const char       *s);
-GnomeVFSFileSize    get_file_size                 (const char       *s);
+goffset             get_file_size                 (const char       *s);
 time_t              get_file_mtime                (const char       *s);
 time_t              get_file_ctime                (const char       *s);
 void                set_file_mtime                (const char       *s,
