Index: ChangeLog
===================================================================
--- ChangeLog	(revision 8634)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2008-04-08  Lincoln de Sousa  <lincoln@minaslivre.org>
+
+	* appearance-desktop.c (wp_drag_receive, wp_drag_preview): Porting this
+	function to use gio instead of gnome_vfs.
+
 2008-03-28  Jens Granseuer  <jensgr@gmx.net>
 
 	* theme-installer.c: (gnome_theme_install_from_uri): don't try to
Index: appearance-desktop.c
===================================================================
--- appearance-desktop.c	(revision 8634)
+++ appearance-desktop.c	(working copy)
@@ -25,6 +25,7 @@
 #include "gnome-wp-xml.h"
 #include "wp-cellrenderer.h"
 #include <glib/gi18n.h>
+#include <gio/gio.h>
 #include <string.h>
 #include <gconf/gconf-client.h>
 #include <libgnomeui/gnome-thumbnail.h>
@@ -714,15 +715,16 @@
 {
   if (info == TARGET_URI_LIST || info == TARGET_BGIMAGE)
   {
-    GList * uris;
     GSList * realuris = NULL;
+    gchar **uris;
+    gchar *uri;
 
-    uris = gnome_vfs_uri_list_parse ((gchar *) selection_data->data);
-
-    if (uris != NULL && uris->data != NULL)
+    uris = g_uri_list_extract_uris ((const gchar *) selection_data->data);
+    if (uris != NULL)
     {
       GdkWindow *window;
       GdkCursor *cursor;
+      gint i;
 
       window = glade_xml_get_widget (data->xml, "appearance_window")->window;
 
@@ -731,16 +733,21 @@
       gdk_window_set_cursor (window, cursor);
       gdk_cursor_unref (cursor);
 
-      for (; uris != NULL; uris = uris->next)
+      for (i = 0; (uri = uris[i]); ++i)
       {
+        GFile *f;
+
+        f = g_file_new_for_uri (uri);
         realuris = g_slist_append (realuris,
-            g_strdup (gnome_vfs_uri_get_path (uris->data)));
+                                   g_file_get_path (f));
+        g_object_unref (f);
       }
 
       wp_add_images (data, realuris);
       gdk_window_set_cursor (window, NULL);
+
+      g_strfreev (uris);
     }
-    gnome_vfs_uri_list_free (uris);
   }
 }
 
@@ -836,16 +843,36 @@
   if (uri)
   {
     GdkPixbuf *pixbuf = NULL;
-    gchar *mime_type;
+    const gchar *mime_type = NULL;
+    GFile *file;
+    GFileInfo *file_info;
+    GError *error = NULL;
 
-    mime_type = gnome_vfs_get_mime_type (uri);
+    file = g_file_new_for_uri (uri);
+    file_info = g_file_query_info (file,
+                                   G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+                                   G_FILE_QUERY_INFO_NONE,
+                                   NULL,
+                                   &error);
 
+    if (file_info != NULL)
+    {
+      mime_type = g_file_info_get_content_type (file_info);
+      g_object_unref (file_info);
+    }
+    g_object_unref (file);
+
+    if (error != NULL)
+    {
+      g_warning ("Unable to get mime_type from file %s", uri);
+      g_error_free (error);
+    }
+
     if (mime_type)
     {
       pixbuf = gnome_thumbnail_factory_generate_thumbnail (data->thumb_factory,
                                                            uri,
                                                            mime_type);
-      g_free (mime_type);
     }
 
     if (pixbuf != NULL)
