Index: gedit-file-bookmarks-store.h
===================================================================
--- gedit-file-bookmarks-store.h	(revision 6036)
+++ gedit-file-bookmarks-store.h	(working copy)
@@ -78,7 +78,7 @@
 GType gedit_file_bookmarks_store_register_type          (GTypeModule * module);
 
 GeditFileBookmarksStore *gedit_file_bookmarks_store_new (void);
-gchar *gedit_file_bookmarks_store_get_uri               (GeditFileBookmarksStore * model,
+GFile *gedit_file_bookmarks_store_get_uri               (GeditFileBookmarksStore * model,
 					                 GtkTreeIter * iter);
 void gedit_file_bookmarks_store_refresh                 (GeditFileBookmarksStore * model);
 
Index: gedit-file-browser-widget.c
===================================================================
--- gedit-file-browser-widget.c	(revision 6036)
+++ gedit-file-browser-widget.c	(working copy)
@@ -25,11 +25,15 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef ENABLE_LIBGNOME  /* we using gnome_url_show() */
+#include <libgnomeui/libgnomeui.h>
+#else
+#include <glib.h>
 #include <string.h>
+#endif
+#include <gio/gio.h>
 #include <glib/gi18n-lib.h>
 #include <gdk/gdkkeysyms.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libgnomeui/libgnomeui.h>
 #include <gedit/gedit-utils.h>
 #include <gedit/gedit-plugin.h>
 
@@ -101,8 +105,8 @@
 
 typedef struct 
 {
-	gchar *root;
-	gchar *virtual_root;
+	GFile *root;
+	GFile *virtual_root;
 } Location;
 
 typedef struct
@@ -255,8 +259,11 @@
 static void
 location_free (Location * loc)
 {
-	g_free (loc->root);
-	g_free (loc->virtual_root);
+	if (loc == NULL)
+		return ;	
+
+	g_object_unref (loc->root);
+	g_object_unref (loc->virtual_root);
 	g_free (loc);
 }
 
@@ -287,13 +294,8 @@
 remove_path_items (GeditFileBrowserWidget * obj)
 {
 	GtkTreeIter iter;
-	gchar *uri;
 
 	while (combo_find_by_id (obj, PATH_ID, &iter)) {
-		gtk_tree_model_get (GTK_TREE_MODEL
-				    (obj->priv->combo_model), &iter,
-				    COLUMN_OBJECT, &uri, -1);
-		g_free (uri);
 
 		gtk_tree_store_remove (obj->priv->combo_model, &iter);
 	}
@@ -405,8 +407,8 @@
 			  G_SIGNAL_RUN_LAST,
 			  G_STRUCT_OFFSET (GeditFileBrowserWidgetClass,
 					   uri_activated), NULL, NULL,
-			  g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
-			  GTK_TYPE_STRING);
+			  g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+			  G_TYPE_FILE);
 	signals[ERROR] =
 	    g_signal_new ("error", G_OBJECT_CLASS_TYPE (object_class),
 			  G_SIGNAL_RUN_LAST,
@@ -457,33 +459,6 @@
 	    g_slist_prepend (obj->priv->signal_pool, node);
 }
 
-/*static void
-remove_signal_by_func(GeditFileBrowserWidget *obj, gpointer object, gpointer func, 
-		gpointer data) {
-	gulong id;
-	GSList *item;
-	SignalNode *node;
-
-	id = g_signal_handler_find(object, 
-			G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
-			0, 0, NULL, func, data);
-	
-	if (id != 0) {
-		for (item = obj->priv->signal_pool; item; item = item->next) {
-			node = (SignalNode *)(item->data);
-			
-			if (node->id == id) {
-				g_signal_handler_disconnect(node->object, node->id);
-
-				obj->priv->signal_pool = g_slist_remove_link(
-						obj->priv->signal_pool, item);
-				g_free(node);
-				break;
-			}
-		}
-	}
-}*/
-
 static void
 clear_signals (GeditFileBrowserWidget * obj)
 {
@@ -512,14 +487,13 @@
 }
 
 static gboolean
-get_from_bookmark_uri (GeditFileBrowserWidget * obj, GnomeVFSURI * guri,
+get_from_bookmark_uri (GeditFileBrowserWidget * obj, GFile * guri,
 		       gchar ** name, GdkPixbuf ** icon)
 {
-	gpointer data;
+	gpointer data=NULL;
 	NameIcon * item;
 
-	data = g_hash_table_lookup (obj->priv->bookmarks_hash, GUINT_TO_POINTER (gnome_vfs_uri_hash (guri)));
-	
+	data = g_hash_table_lookup (obj->priv->bookmarks_hash, GUINT_TO_POINTER (g_file_hash (guri)));
 	if (data == NULL)
 		return FALSE;
 	
@@ -532,52 +506,39 @@
 }
 
 static gboolean
-get_from_bookmark (GeditFileBrowserWidget * obj, gchar const *uri,
+get_from_bookmark (GeditFileBrowserWidget * obj, GFile *file,
 		   gchar ** name, GdkPixbuf ** icon)
 {
-	GnomeVFSURI *guri;
 	gboolean result;
 
-	guri = gnome_vfs_uri_new (uri);
-
-	if (guri == NULL)
+	if (file == NULL)
 		return FALSE;
 	
-	result = get_from_bookmark_uri (obj, guri, name, icon);
-	gnome_vfs_uri_unref (guri);
+	result = get_from_bookmark_uri (obj, file, name, icon);
 	
 	return result;
 }
 
-static void
+void
 insert_path_item (GeditFileBrowserWidget * obj, 
-                  GnomeVFSURI * uri,
+                  GFile * file,
 		  GtkTreeIter * after, 
 		  GtkTreeIter * iter, 
 		  guint indent)
 {
-	gchar *str2;
 	gchar *unescape;
 	gchar *str;
-	GdkPixbuf * icon = NULL;
+	GIcon *icon;
+	GdkPixbuf * pixbuf = NULL;
+	
+	g_return_if_fail(G_IS_FILE(file));
 
-	if (!get_from_bookmark_uri (obj, uri, &unescape, &icon)) {
-		str = gnome_vfs_uri_to_string (uri, 
-	        	                       GNOME_VFS_URI_HIDE_PASSWORD |
-	                	               GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD | 
-	                        	       GNOME_VFS_URI_HIDE_FRAGMENT_IDENTIFIER);
-		unescape = gedit_file_browser_utils_uri_basename (str);
-		g_free (str);
+
+	if (!get_from_bookmark_uri (obj, file, &unescape, &pixbuf)) {
+		unescape = g_file_get_basename (file);
 		
 		/* Get the icon */
-		str = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
-		str2 = gnome_vfs_get_mime_type (str);
-		icon = gedit_file_browser_utils_pixbuf_from_mime_type (str, 
-		                                                       str2, 
-		                                                       GTK_ICON_SIZE_MENU);
-
-		g_free (str);
-		g_free (str2);
+		pixbuf = gedit_file_browser_utils_pixbuf_from_file (file, GTK_ICON_SIZE_MENU);
 	}
 
 	gtk_tree_store_insert_after (obj->priv->combo_model, iter, NULL,
@@ -585,14 +546,14 @@
 	gtk_tree_store_set (obj->priv->combo_model, 
 	                    iter, 
 	                    COLUMN_INDENT, indent,
-	                    COLUMN_ICON, icon, 
+	                    COLUMN_ICON, pixbuf, 
 	                    COLUMN_NAME, unescape, 
-	                    COLUMN_OBJECT, gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE),
+	                    COLUMN_OBJECT, file,
 			    COLUMN_ID, PATH_ID, 
 			    -1);
 
-	if (icon)
-		g_object_unref (icon);
+	if (pixbuf)
+		g_object_unref (pixbuf);
 
 	g_free (unescape);
 }
@@ -620,42 +581,41 @@
 }
 
 static guint
-uri_num_parents (GnomeVFSURI * from, GnomeVFSURI * to)
+uri_num_parents (GFile * from, GFile * to)
 {
 	guint parents = 0;
-	GnomeVFSURI * tmp;
+	GFile * tmp;
+	GFile * parent;
 
 	if (from == NULL)
 		return 0;
 	
-	from = gnome_vfs_uri_dup (from);
-	
-	while (gnome_vfs_uri_has_parent (from) && 
-	       !(to && gnome_vfs_uri_equal (from, to))) {
-		tmp = gnome_vfs_uri_get_parent (from);
-		gnome_vfs_uri_unref (from);
+	from = g_object_ref (from);
+	while ( (parent = g_file_get_parent (from)) && 
+	       !(to && g_file_equal (from, to))) {
+		g_object_unref (parent);
+		tmp = g_file_get_parent (from);
+		g_object_unref (from);
 		from = tmp;
 		
 		++parents;
 	}
 	
-	gnome_vfs_uri_unref (from);
+	g_object_unref (from);
 	
 	return parents;
 }
 
-static void
+void
 insert_location_path (GeditFileBrowserWidget * obj)
 {
-	Location *loc;
-	GnomeVFSURI *virtual_root;
-	GnomeVFSURI *root;
-	GnomeVFSURI *current = NULL;
-	GnomeVFSURI * tmp;
+	Location *loc = NULL;
+	GFile *current = NULL;
+	GFile * tmp = NULL;
 	GtkTreeIter separator;
 	GtkTreeIter iter;
 	guint indent;
-	
+
 	if (!obj->priv->current_location) {
 		g_message ("insert_location_path: no current location");
 		return;
@@ -663,18 +623,19 @@
 
 	loc = (Location *) (obj->priv->current_location->data);
 
-	virtual_root = gnome_vfs_uri_new (loc->virtual_root);
-	root = gnome_vfs_uri_new (loc->root);
-	current = virtual_root;
+	if ( loc->virtual_root == NULL )
+		return ;
 
+	current = g_object_ref(loc->virtual_root);
+
 	combo_find_by_id (obj, SEPARATOR_ID, &separator);
 	
-	indent = uri_num_parents (virtual_root, root);
+	indent = uri_num_parents (loc->virtual_root, loc->root);
 
 	while (current != NULL) {
 		insert_path_item (obj, current, &separator, &iter, indent--);
 
-		if (current == virtual_root) {
+		if (current == loc->virtual_root) {
 			g_signal_handlers_block_by_func (obj->priv->combo,
 							 on_combo_changed,
 							 obj);
@@ -687,22 +648,19 @@
 							   obj);
 		}
 
-		if (gnome_vfs_uri_equal (current, root) || !gnome_vfs_uri_has_parent (current)) {
-			if (current != virtual_root)
-				gnome_vfs_uri_unref (current);
+		tmp = g_file_get_parent (current);
+		if (g_file_equal (current, loc->root) || 
+			tmp == NULL) {
+
+			g_object_unref (current);
 			break;
 		}
-
-		tmp = gnome_vfs_uri_get_parent (current);
 		
-		if (current != virtual_root)
-			gnome_vfs_uri_unref (current);
+		g_object_unref (current);
 
 		current = tmp;
 	}
 
-	gnome_vfs_uri_unref (virtual_root);
-	gnome_vfs_uri_unref (root);
 }
 
 static void
@@ -729,7 +687,7 @@
 	GtkTreeStore *store = obj->priv->combo_model;
 	GtkTreeIter iter;
 	GdkPixbuf *icon;
-
+	
 	icon = gedit_file_browser_utils_pixbuf_from_theme (GTK_STOCK_HOME, GTK_ICON_SIZE_MENU);
 
 	gtk_tree_store_append (store, &iter, NULL);
@@ -739,17 +697,6 @@
 			    COLUMN_ID, BOOKMARKS_ID, -1);
 	g_object_unref (icon);
 
-#if 0
-	icon = gedit_file_browser_utils_pixbuf_from_theme (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
-
-	gtk_tree_store_append (store, &iter, NULL);
-	gtk_tree_store_set (store, &iter,
-			    COLUMN_ICON, icon,
-			    COLUMN_NAME, _("Recent Files"),
-			    COLUMN_ID, RECENTS_ID, -1);
-	g_object_unref (icon);
-#endif
-
 	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (obj->priv->combo),
 					      separator_func, obj, NULL);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (obj->priv->combo), 0);
@@ -786,7 +733,7 @@
 						     G_TYPE_UINT,
 						     GDK_TYPE_PIXBUF,
 						     G_TYPE_STRING,
-						     G_TYPE_POINTER,
+						     G_TYPE_FILE,
 						     G_TYPE_UINT);
 	obj->priv->combo =
 	    gtk_combo_box_new_with_model (GTK_TREE_MODEL
@@ -1081,8 +1028,7 @@
 	GtkTreeModel *model;
 	GdkPixbuf * pixbuf;
 	gchar * name;
-	gchar * uri;
-	GnomeVFSURI * guri;
+	GFile * uri;
 	NameIcon * item;
 
 	model = GTK_TREE_MODEL (obj->priv->bookmarks_store);
@@ -1094,12 +1040,7 @@
 	if (uri == NULL)
 		return;
 	
-	guri = gnome_vfs_uri_new (uri);
-	g_free (uri);
 	
-	if (guri == NULL)
-		return;
-
 	gtk_tree_model_get (model, iter,
 			    GEDIT_FILE_BROWSER_STORE_COLUMN_ICON,
 			    &pixbuf,
@@ -1111,10 +1052,9 @@
 	item->icon = pixbuf;
 
 	g_hash_table_insert (obj->priv->bookmarks_hash,
-			     GUINT_TO_POINTER (gnome_vfs_uri_hash (guri)),
+			     GUINT_TO_POINTER (g_file_hash (uri)),
 			     item);
 
-	gnome_vfs_uri_unref (guri);
 }
 
 static void
@@ -1143,7 +1083,7 @@
 {
 	GtkWidget *sw;
 
-	obj->priv->file_store = gedit_file_browser_store_new (NULL);
+	obj->priv->file_store = gedit_file_browser_store_new ("file://");
 	obj->priv->bookmarks_store = gedit_file_bookmarks_store_new ();
 	obj->priv->treeview =
 	    GEDIT_FILE_BROWSER_VIEW (gedit_file_browser_view_new ());
@@ -1245,6 +1185,9 @@
 			                                   NULL,
 			                                   free_name_icon);
 
+	if (g_getenv("FILEBROWSER_TRAP"))
+		g_log_set_always_fatal ( G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
+
 	create_toolbar (obj);
 	create_combo (obj);
 	create_tree (obj);
@@ -1463,17 +1406,16 @@
 	return result == GEDIT_FILE_BROWSER_STORE_RESULT_OK;
 }
 
-static GnomeVFSURI *
-get_topmost_uri (GnomeVFSURI const *uri)
+static GFile *
+get_topmost_uri (GFile *uri)
 {
-	GnomeVFSURI * tmp;
-	GnomeVFSURI * current;
+	GFile * tmp;
+	GFile * current;
 	
-	current = gnome_vfs_uri_dup (uri);
+	current = g_object_ref (uri);
 	
-	while (gnome_vfs_uri_has_parent (current)) {
-		tmp = gnome_vfs_uri_get_parent (current);
-		gnome_vfs_uri_unref (current);
+	while ( (tmp = g_file_get_parent (current)) != NULL) {
+		g_object_unref (current);
 		current = tmp;
 	}
 	
@@ -1484,36 +1426,37 @@
 create_goto_menu_item (GeditFileBrowserWidget * obj, GList * item,
 		       GdkPixbuf * icon)
 {
+	gchar *unescape = NULL;
+	GdkPixbuf *pixbuf = NULL;
 	GtkWidget *result;
 	GtkWidget *image;
-	gchar *base;
-	gchar *unescape;
-	GdkPixbuf *pixbuf;
 	Location *loc;
 
 	loc = (Location *) (item->data);
+	if (loc->virtual_root == NULL)	{
+		g_critical("virtual root NULL???\n");
+		return NULL;
+	}
 
 	if (!get_from_bookmark (obj, loc->virtual_root,
 				&unescape, &pixbuf)) {
 
-		if (gedit_utils_uri_has_file_scheme (loc->virtual_root)) {
-			unescape =
-			    gnome_vfs_get_local_path_from_uri (loc->
-							       virtual_root);
-			base = g_path_get_basename (unescape);
-			g_free (unescape);
+#ifdef WHAT_IS_THIS
+		if (g_file_has_uri_scheme(loc->virtual_root, "file")) {
+			base = g_file_get_basename (loc->virtual_root);
 		} else {
-			base = g_path_get_basename (loc->virtual_root);
+			base = g_file_get_basename (loc->virtual_root);
 		}
-
-		unescape = gnome_vfs_unescape_string_for_display (base);
-		g_free (base);
-
-		pixbuf = g_object_ref (icon);
+#endif
+		unescape = g_file_get_basename (loc->virtual_root);
+	
+		if (icon != NULL)
+			pixbuf = g_object_ref (icon);
 	}
 
-	image = gtk_image_new_from_pixbuf (pixbuf);
-	g_object_unref (pixbuf);
+		image = gtk_image_new_from_pixbuf (pixbuf);
+	if (pixbuf)	
+		g_object_unref (pixbuf);
 
 	gtk_widget_show (image);
 
@@ -1561,7 +1504,7 @@
 	GtkWidget *menu_from;
 	GtkWidget *menu_to;
 
-	if (!obj->priv->locations)
+	if (!obj->priv->locations || !item)
 		return;
 
 	if (previous) {
@@ -1785,8 +1728,8 @@
 void
 gedit_file_browser_widget_set_root_and_virtual_root (GeditFileBrowserWidget
 						     * obj,
-						     gchar const *root,
-						     gchar const *virtual_root)
+						     GFile *root,
+						     GFile *virtual_root)
 {
 	GeditFileBrowserStoreResult result;
 
@@ -1809,32 +1752,23 @@
 
 void
 gedit_file_browser_widget_set_root (GeditFileBrowserWidget * obj,
-				    gchar const *root, 
+				    GFile *root, 
 				    gboolean virtual_root)
 {
-	GnomeVFSURI *uri;
-	GnomeVFSURI *parent;
+	GFile *parent;
 	gchar *str;
-
 	if (!virtual_root) {
 		gedit_file_browser_widget_set_root_and_virtual_root (obj,
 								     root,
 								     NULL);
 	} else {
-		uri = gnome_vfs_uri_new (root);
+		if (root) {
+			parent = get_topmost_uri (root);
 
-		if (uri) {
-			parent = get_topmost_uri (uri);
-			str =
-			    gnome_vfs_uri_to_string (parent,
-						     GNOME_VFS_URI_HIDE_NONE);
-
 			gedit_file_browser_widget_set_root_and_virtual_root
-			    (obj, str, root);
+					(obj, parent, root);
 
-			g_free (str);
-			gnome_vfs_uri_unref (uri);
-			gnome_vfs_uri_unref (parent);
+			//g_object_unref (parent);
 		} else {
 			str =
 			    g_strconcat (_("Invalid uri"), ": ", root,
@@ -1999,7 +1933,7 @@
 		       GeditFileBrowserWidget *obj)
 {
 	GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-	gchar *uri;
+	GFile *uri;
 	gint flags;
 	
 	uri =
@@ -2024,7 +1958,6 @@
 		g_warning ("No uri!");
 	}
 
-	g_free (uri);
 }
 
 static void
@@ -2043,7 +1976,6 @@
 			    &uri, -1);
 
 	g_signal_emit (obj, signals[URI_ACTIVATED], 0, uri);
-	g_free (uri);
 }
 
 static gboolean
@@ -2068,8 +2000,8 @@
 			 GeditFileBrowserWidget * obj)
 {
 	GtkTreeIter iter;
-	gchar *uri;
-	gchar *root_uri;
+	GFile *uri;
+	GFile *root_uri;
 	GtkTreeIter root;
 	GtkAction *action;
 	Location *loc;
@@ -2083,16 +2015,20 @@
 		if (gedit_file_browser_store_get_iter_root (model, &root)) {
 			if (!obj->priv->changing_location) {
 				/* Remove all items from obj->priv->current_location on */
+
 				if (obj->priv->current_location)
 					clear_next_locations (obj);
-
+				
 				root_uri =
 				    gedit_file_browser_store_get_root
 				    (model);
 
+				if (root_uri == NULL)
+					return ;					
+	
 				loc = g_new (Location, 1);
-				loc->root = root_uri;
-				loc->virtual_root = g_strdup (uri);
+				loc->root = g_object_ref(root_uri);
+				loc->virtual_root = g_object_ref (uri);
 
 				if (obj->priv->current_location) {
 					/* Add current location to the menu so we can go back
@@ -2161,7 +2097,6 @@
 		}
 
 		check_current_item (obj, TRUE);
-		g_free (uri);
 	} else {
 		g_message ("NO!");
 	}
@@ -2245,7 +2180,7 @@
 {
 	GtkTreeIter iter;
 	guint id;
-	gchar *uri;
+	GFile *uri;
 
 	if (!gtk_combo_box_get_active_iter (combo, &iter))
 		return;
@@ -2262,7 +2197,8 @@
 		gtk_tree_model_get (GTK_TREE_MODEL
 				    (obj->priv->combo_model), &iter,
 				    COLUMN_OBJECT, &uri, -1);
-		gedit_file_browser_store_set_virtual_root_from_string
+
+		gedit_file_browser_store_set_virtual_root_from_file
 		    (obj->priv->file_store, uri);
 		break;
 	}
@@ -2583,30 +2519,34 @@
 directory_open (GeditFileBrowserWidget *obj,
 		GtkTreeModel *model, 
 		GtkTreeIter *iter) {
-	gboolean result = FALSE;
 	GError *error = NULL;
-	gchar *uri = NULL;
+	gboolean result = FALSE;
+	GFile *uri = NULL;
 	GeditFileBrowserStoreFlag flags;
+	char *str, *str2; 
 	
 	gtk_tree_model_get (model, iter,
 			    GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS, &flags,
 			    GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri, -1);
 
+	if (uri == NULL)
+		return FALSE;
+
 	if (FILE_IS_DIR (flags)) {
 		result = TRUE;
-
-		if (!gnome_url_show (uri, &error)) {
-			g_signal_emit (obj, signals[ERROR], 0,
-				       GEDIT_FILE_BROWSER_ERROR_OPEN_DIRECTORY,
-				       error->message);
-			
-			g_error_free (error);
-			error = NULL;
+		str = g_file_get_uri(uri);
+		str2 = g_strconcat("nautilus ", str, NULL);
+		
+		if (!gdk_spawn_command_line_on_screen(gdk_display_get_default_screen(gdk_display_get_default()), str2, &error))
+		{
+			g_print("Could not spawn process\n%s", error->message);
+			g_error_free(error);
+			result = FALSE;
 		}
+		g_free(str);
+		g_free(str2);
 	}
 	
-	g_free (uri);
-	
 	return result;
 }
 
@@ -2615,8 +2555,9 @@
 {
 	GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
 	GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj->priv->treeview));	
-	GList *rows, *row;
 	gboolean directory_opened = FALSE;
+	GList *rows = NULL;
+	GList *row;
 	GtkTreeIter iter;
 	GtkTreePath *path;
 
Index: gedit-file-browser-widget.h
===================================================================
--- gedit-file-browser-widget.h	(revision 6036)
+++ gedit-file-browser-widget.h	(working copy)
@@ -79,12 +79,12 @@
 
 void gedit_file_browser_widget_show_bookmarks       (GeditFileBrowserWidget * obj);
 void gedit_file_browser_widget_set_root             (GeditFileBrowserWidget * obj,
-                                                     gchar const *root,
+                                                     GFile *root,
                                                      gboolean virtual_root);
 void
 gedit_file_browser_widget_set_root_and_virtual_root (GeditFileBrowserWidget * obj,
-						     gchar const *root,
-						     gchar const *virtual_root);
+						     GFile *root,
+						     GFile *virtual_root);
 
 gboolean
 gedit_file_browser_widget_get_selected_directory    (GeditFileBrowserWidget * obj, 
Index: gedit-file-browser-store.c
===================================================================
--- gedit-file-browser-store.c	(revision 6036)
+++ gedit-file-browser-store.c	(working copy)
@@ -24,6 +24,7 @@
 #endif
 
 #include <string.h>
+#include <gio/gio.h>
 #include <glib/gi18n-lib.h>
 #include <gedit/gedit-plugin.h>
 #include <gedit/gedit-utils.h>
@@ -53,7 +54,7 @@
 
 typedef struct 
 {
-	GnomeVFSAsyncHandle *handle;
+	GCancellable *handle;
 	GeditFileBrowserStore *model;
 	gpointer user_data;
 
@@ -62,7 +63,7 @@
 
 struct _FileBrowserNode 
 {
-	GnomeVFSURI *uri;
+	GFile *uri;
 	gchar *mime_type;
 	guint flags;
 	gchar *name;
@@ -80,8 +81,8 @@
 	GSList *children;
 	GHashTable *hidden_file_hash;
 
-	GnomeVFSAsyncHandle *load_handle;
-	GnomeVFSMonitorHandle *monitor_handle;
+	GCancellable *load_handle;
+	GDirectoryMonitor *monitor_handle;
 	GeditFileBrowserStore *model;
 };
 
@@ -102,7 +103,7 @@
 
 static FileBrowserNode *model_find_node 		    (GeditFileBrowserStore *model,
 							     FileBrowserNode *node,
-							     GnomeVFSURI *uri);
+							     GFile *uri);
 static void model_remove_node                               (GeditFileBrowserStore * model,
 							     FileBrowserNode * node, 
 							     GtkTreePath * path,
@@ -166,10 +167,10 @@
 static void model_check_dummy                               (GeditFileBrowserStore * model,
 							     FileBrowserNode * node);
 
-static void on_directory_monitor_event                      (GnomeVFSMonitorHandle * handle,
-							     gchar const *monitor_uri,
-							     const gchar * info_uri,
-							     GnomeVFSMonitorEventType event_type,
+static void on_directory_monitor_event                      (GDirectoryMonitor * handle,
+							     GFile *monitor_uri,
+							     GFile * info_uri,
+							     guint event_type,
 							     FileBrowserNode * parent);
 
 GEDIT_PLUGIN_DEFINE_TYPE_WITH_CODE (GeditFileBrowserStore, gedit_file_browser_store,
@@ -220,14 +221,10 @@
 set_gvalue_from_node (GValue          *value,
                       FileBrowserNode *node)
 {
-	gchar * uri;
-
-	if (node == NULL || node->uri)
-		g_value_set_string (value, NULL);
+	if (node == NULL || node->uri == NULL)
+		g_value_set_object (value, NULL);
 	else {
-		uri = gnome_vfs_uri_to_string (node->uri, 
-		                               GNOME_VFS_URI_HIDE_NONE);
-		g_value_take_string (value, uri);
+		g_value_set_object (value, node->uri);
 	}
 }
 
@@ -287,17 +284,17 @@
 	object_class->set_property = gedit_file_browser_store_set_property;
 
 	g_object_class_install_property (object_class, PROP_ROOT,
-					 g_param_spec_string ("root",
+					 g_param_spec_object ("root",
 					 		      "Root",
 					 		      "The root uri",
-					 		      NULL,
+					 		      G_TYPE_FILE,
 					 		      G_PARAM_READABLE));
 
 	g_object_class_install_property (object_class, PROP_VIRTUAL_ROOT,
-					 g_param_spec_string ("virtual-root",
+					 g_param_spec_object ("virtual-root",
 					 		      "Virtual Root",
 					 		      "The virtual root uri",
-					 		      NULL,
+					 		      G_TYPE_FILE,
 					 		      G_PARAM_READABLE));
 
 	g_object_class_install_property (object_class, PROP_FILTER_MODE,
@@ -305,7 +302,7 @@
 					 		      "Filter Mode",
 					 		      "The filter mode",
 					 		      GEDIT_TYPE_FILE_BROWSER_STORE_FILTER_MODE,
-					 		      gedit_file_browser_store_filter_mode_get_default (),
+								gedit_file_browser_store_filter_mode_get_default (),
 					 		      G_PARAM_READWRITE));
 
 	model_signals[BEGIN_LOADING] =
@@ -367,7 +364,7 @@
 	obj->priv = GEDIT_FILE_BROWSER_STORE_GET_PRIVATE (obj);
 
 	obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_URI] =
-	    G_TYPE_STRING;
+	    G_TYPE_FILE;
 	obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_NAME] =
 	    G_TYPE_STRING;
 	obj->priv->column_types[GEDIT_FILE_BROWSER_STORE_COLUMN_FLAGS] =
@@ -574,7 +571,6 @@
 				    GValue * value)
 {
 	FileBrowserNode *node;
-	gchar *uri;
 
 	g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
 	g_return_if_fail (iter != NULL);
@@ -588,14 +584,7 @@
 
 	switch (column) {
 	case GEDIT_FILE_BROWSER_STORE_COLUMN_URI:
-		if (node->uri == NULL)
-			uri = NULL;
-		else
-			uri =
-			    gnome_vfs_uri_to_string (node->uri,
-						     GNOME_VFS_URI_HIDE_NONE);
-
-		g_value_take_string (value, uri);
+		g_value_set_object (value, node->uri);
 		break;
 	case GEDIT_FILE_BROWSER_STORE_COLUMN_NAME:
 		g_value_set_string (value, node->name);
@@ -857,8 +846,8 @@
 					GtkSelectionData  * selection_data)
 {
 	GtkTreeIter iter;
-	gchar *uri;
-	gchar *uris[2] = {0, };
+	GFile *uri;
+	char *uris[2] = {0, };
 	gboolean ret;
 
 	if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (drag_source),
@@ -873,10 +862,9 @@
 
 	g_assert (uri);
 
-	uris[0] = uri;
+	uris[0] = g_file_get_uri(uri);
 	ret = gtk_selection_data_set_uris (selection_data, uris);
 
-	g_free (uri);
 
 	return ret;
 }
@@ -1212,18 +1200,18 @@
 	g_free (node->name);
 
 	if (node->uri) {
-		node->name = gedit_file_browser_utils_uri_basename (gnome_vfs_uri_get_path (node->uri));
+		node->name = g_file_get_basename(node->uri);
 	} else {
 		node->name = NULL;
 	}
 }
 
 static void
-file_browser_node_init (FileBrowserNode * node, GnomeVFSURI * uri,
+file_browser_node_init (FileBrowserNode * node, GFile * uri,
 			FileBrowserNode * parent)
 {
 	if (uri != NULL) {
-		node->uri = gnome_vfs_uri_ref (uri);
+		node->uri = g_object_ref (uri);
 		file_browser_node_set_name (node);
 	}
 
@@ -1231,7 +1219,7 @@
 }
 
 static FileBrowserNode *
-file_browser_node_new (GnomeVFSURI * uri, FileBrowserNode * parent)
+file_browser_node_new (GFile * uri, FileBrowserNode * parent)
 {
 	FileBrowserNode *node = g_new0 (FileBrowserNode, 1);
 
@@ -1241,7 +1229,7 @@
 
 static FileBrowserNode *
 file_browser_node_dir_new (GeditFileBrowserStore * model,
-			   GnomeVFSURI * uri, FileBrowserNode * parent)
+			   GFile * uri, FileBrowserNode * parent)
 {
 	FileBrowserNode *node =
 	    (FileBrowserNode *) g_new0 (FileBrowserNodeDir, 1);
@@ -1293,21 +1281,23 @@
 		dir = FILE_BROWSER_NODE_DIR (node);
 
 		if (dir->load_handle) {
-			gnome_vfs_async_cancel (dir->load_handle);
+			g_cancellable_cancel (dir->load_handle);
 			model_end_loading (model, node);
 		}
 
 		file_browser_node_free_children (model, node);
 
 		if (dir->monitor_handle)
-			gnome_vfs_monitor_cancel (dir->monitor_handle);
+			g_directory_monitor_cancel (dir->monitor_handle);
 
-		if (dir->hidden_file_hash)
+		if (dir->hidden_file_hash)  {
 			g_hash_table_destroy (dir->hidden_file_hash);
+			dir->hidden_file_hash = NULL;
+		}
 	}
 
 	if (node->uri)
-		gnome_vfs_uri_unref (node->uri);
+		g_object_unref (node->uri);
 
 	if (node->icon)
 		g_object_unref (node->icon);
@@ -1492,13 +1482,13 @@
 		model_remove_node_children (model, node, NULL, TRUE);
 
 	if (dir->load_handle) {
-		gnome_vfs_async_cancel (dir->load_handle);
-		model_end_loading (model, node);
+		g_cancellable_cancel (dir->load_handle);
 		dir->load_handle = NULL;
+		model_end_loading (model, node);
 	}
 
 	if (dir->monitor_handle) {
-		gnome_vfs_monitor_cancel (dir->monitor_handle);
+		g_directory_monitor_cancel (dir->monitor_handle);
 		dir->monitor_handle = NULL;
 	}
 
@@ -1511,7 +1501,6 @@
 {
 	GtkIconTheme *theme;
 	GdkPixbuf *icon;
-	gchar *uri;
 
 	g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (tree_model));
 	g_return_if_fail (node != NULL);
@@ -1521,10 +1510,7 @@
 
 	theme = gtk_icon_theme_get_default ();
 
-	uri = gnome_vfs_uri_to_string (node->uri, GNOME_VFS_URI_HIDE_NONE);
-
-	icon = gedit_file_browser_utils_pixbuf_from_mime_type (uri,
-							       node->mime_type,
+	icon = gedit_file_browser_utils_pixbuf_from_file (node->uri,
 							       GTK_ICON_SIZE_MENU);
 
 	if (node->icon)
@@ -1557,7 +1543,6 @@
 		node->icon = icon;
 	}
 
-	g_free (uri);
 }
 
 static void
@@ -1720,23 +1705,32 @@
 static void
 file_browser_node_set_from_info (GeditFileBrowserStore * model,
 				 FileBrowserNode * node,
-				 GnomeVFSFileInfo * info)
+				 GFileInfo * info)
 {
-	FileBrowserNodeDir * dir;
-	gchar * filename;
-	gchar const * mime;
+	FileBrowserNodeDir * dir = NULL;
+	gchar const * mime = NULL;
+	gchar const * name = NULL;
 
 	dir = FILE_BROWSER_NODE_DIR (node->parent);
 
 	g_free (node->mime_type);
 	node->mime_type = NULL;
+	
+	if (info == NULL)
+	{
+		g_print ("set node_info failed???????????????\n");
+		return ;
+	}
 
-	if (info->name) {
-		if (*(info->name) == '.') {
+	name = g_file_info_get_name(info);
+	mime = g_file_info_get_content_type (info);
+	
+	if (name) {
+		if (*(name) == '.') {
 			node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
 		}
 		else if (g_utf8_get_char (g_utf8_offset_to_pointer 
-		           (&(info->name[strlen(info->name)]), -1)) == '~') {
+		           (&(name[strlen(name)]), -1)) == '~') {
 			node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
 			
 			/* FIXME: this isn't totally correct. We need this 
@@ -1746,39 +1740,36 @@
 			   files and are text. Therefore we will try to guess
 			   the mime type from the filename (minus ~) and default
 			   to text/plain. Eat that, mime type system! */
-			filename = g_strndup (info->name, strlen(info->name) - 1);
-		   	mime = gnome_vfs_get_mime_type_for_name (filename);
-			g_free (filename);
 			
-			if (strcmp(mime, GNOME_VFS_MIME_TYPE_UNKNOWN) == 0)
+			if (mime == NULL)
 				node->mime_type = g_strdup("text/plain");
 			else
 				node->mime_type = g_strdup(mime);
 		}
 		else if (dir != NULL && dir->hidden_file_hash != NULL &&
-			 g_hash_table_lookup (dir->hidden_file_hash, info->name) != NULL) {
+			 g_hash_table_lookup (dir->hidden_file_hash, name) != NULL) {
 			node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_HIDDEN;
 		}
 	}
 
-	if (node->mime_type == NULL)
-		node->mime_type = g_strdup (info->mime_type);
+	if (node->mime_type == NULL && mime)
+		node->mime_type = g_strdup (mime);
 
-	if (info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+	if (g_file_info_get_file_type(info) == G_FILE_TYPE_DIRECTORY)
 		node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_DIRECTORY;
 	else if (node->mime_type && 
-	         gnome_vfs_mime_type_get_equivalence (node->mime_type,
-						      "text/plain") !=
-		 GNOME_VFS_MIME_UNRELATED)
+	         strncmp (node->mime_type,
+						      "text", 4) == 0 )
 		node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_IS_TEXT;
 
 	model_node_update_visibility (model, node);
 	model_recomposite_icon_real (model, node);
+
 }
 
 static FileBrowserNode *
 model_uri_exists (GeditFileBrowserStore * model, FileBrowserNode * parent,
-		  GnomeVFSURI * uri)
+		  GFile * uri)
 {
 	GSList *item;
 	FileBrowserNode *node;
@@ -1791,7 +1782,7 @@
 		node = (FileBrowserNode *) (item->data);
 
 		if (node->uri != NULL
-		    && gnome_vfs_uri_equal (node->uri, uri))
+		    && g_file_equal (node->uri, uri))
 			return node;
 	}
 
@@ -1801,8 +1792,8 @@
 static FileBrowserNode *
 model_add_node_from_uri (GeditFileBrowserStore * model,
 			 FileBrowserNode * parent,
-			 GnomeVFSURI * uri,
-			 GnomeVFSFileInfo * info)
+			 GFile * uri,
+			 GFileInfo * info)
 {
 	FileBrowserNode *node;
 	gboolean free_info = FALSE;
@@ -1810,15 +1801,11 @@
 	// Check if it already exists
 	if ((node = model_uri_exists (model, parent, uri)) == NULL) {
 		if (info == NULL) {
-			info = gnome_vfs_file_info_new ();
 			free_info = TRUE;
-			gnome_vfs_get_file_info_uri (uri, info,
-						     GNOME_VFS_FILE_INFO_DEFAULT
-						     |
-						     GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
+			info = g_file_query_info (uri, "standard::*", 0, NULL, NULL);
 		}
-
-		if (info->type == GNOME_VFS_FILE_TYPE_DIRECTORY) {
+	
+		if (info && g_file_info_get_file_type(info) == G_FILE_TYPE_DIRECTORY ) {
 			node = file_browser_node_dir_new (model, uri, parent);
 		} else {
 			node = file_browser_node_new (uri, parent);
@@ -1827,10 +1814,11 @@
 		file_browser_node_set_from_info (model, node, info);
 		model_add_node (model, node, parent);
 
-		if (free_info)
-			gnome_vfs_file_info_unref (info);
+		if (info && free_info)
+			g_object_unref (info);
 	}
 
+
 	return node;
 }
 
@@ -1839,64 +1827,62 @@
 parse_dot_hidden_file (FileBrowserNode *parent)
 {
 	FileBrowserNodeDir *dir;
-	GnomeVFSURI *vfs_uri;
-	gchar *uri;
-	GnomeVFSFileInfo *file_info;
-	GnomeVFSResult res;
-	gint i, file_size;
-	gchar *file_contents;
+	GFile *file;
+	GFileInfo *file_info;
+	GError *error = NULL;
+	guint i, file_size;
+	gchar *str, *str2;
+	GFileInputStream *input;
+	gchar file_contents[2048];
 
-	vfs_uri = gnome_vfs_uri_append_path (parent->uri, ".hidden");
+	if ( !g_file_has_uri_scheme (parent->uri, "file") )
+		return ;
 
-	uri = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_NONE);
-	if (!gedit_utils_uri_has_file_scheme (uri) ||
-	    !gnome_vfs_uri_exists (vfs_uri)) {
-		gnome_vfs_uri_unref (vfs_uri);
-		g_free (uri);
+	str = g_file_get_uri (parent->uri);
+	str2 = g_build_filename(str, ".hidden", NULL);
+	file = g_file_new_for_uri(str2);
+	
+	file_info = g_file_query_info (file, "standard::type", G_FILE_QUERY_INFO_NONE, NULL, NULL);
+	if ( file_info == NULL) {
+		g_free(str);
+		g_free(str2);
+		g_object_unref(file);
 		return;
 	}
 
-	file_info = gnome_vfs_file_info_new ();
-	if (!file_info) {
-		gnome_vfs_uri_unref (vfs_uri);
-		g_free (uri);
-		return;
-	}
+	g_free(str);
+	g_free(str2);
 
-	res = gnome_vfs_get_file_info_uri (vfs_uri,
-					   file_info,
-					   GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
-	if (res != GNOME_VFS_OK) {
-		gnome_vfs_file_info_unref (file_info);
-		gnome_vfs_uri_unref (vfs_uri);
-		g_free (uri);
+	if ( g_file_info_get_file_type(file_info) != G_FILE_TYPE_REGULAR ) {
+		g_object_unref (file_info);
+		g_object_unref (file);
 		return;
 	}
 
-	if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE) &&
-	    (file_info->type != GNOME_VFS_FILE_TYPE_REGULAR)) {
-		gnome_vfs_file_info_unref (file_info);
-		gnome_vfs_uri_unref (vfs_uri);
-		g_free (uri);
-		return;
-	}
+	g_object_unref (file_info);
 
-	gnome_vfs_file_info_unref (file_info);
 
-	res = gnome_vfs_read_entire_file (uri, &file_size, &file_contents);
-
-	gnome_vfs_uri_unref (vfs_uri);
-	g_free (uri);
-
-	if (res != GNOME_VFS_OK) {
-		return;
+  	input = g_file_read (file, NULL, &error);	
+	if ( input == NULL || 
+		g_input_stream_read_all  (G_INPUT_STREAM(input), 
+					&file_contents, 
+					2048, 
+					&file_size, 
+					NULL, 
+					&error) == FALSE )
+	{
+		g_print("Error read from .hidden file\n%s", error->message);
+		g_object_unref (file);
+		return ;
 	}
 
+	g_object_unref (file);
+
 	dir = FILE_BROWSER_NODE_DIR (parent);
 
-	if (dir->hidden_file_hash) {
+	if (dir->hidden_file_hash) 
 		g_hash_table_destroy (dir->hidden_file_hash);
-	}
+	
 
 	dir->hidden_file_hash = g_hash_table_new_full (g_str_hash,
 						       g_str_equal,
@@ -1905,6 +1891,7 @@
 
 	/* Now parse the data */
 	i = 0;
+
 	while (i < file_size) {
 		int start;
 
@@ -1917,7 +1904,7 @@
 			gchar *tmp, *tmp2;
 
 			tmp = g_strndup (file_contents + start, i - start);
-			tmp2 = gnome_vfs_escape_string (tmp);
+			tmp2 =  g_uri_escape_string(tmp, NULL, TRUE);
 			g_free (tmp);
 
 			g_hash_table_insert (dir->hidden_file_hash,
@@ -1926,73 +1913,102 @@
 
 		i++;
 	}
-
-	g_free (file_contents);
 }
 
+
 static void
-model_load_directory_cb (GnomeVFSAsyncHandle * handle,
-			 GnomeVFSResult result, GList * list,
-			 guint entries_read, gpointer user_data)
+cb_next_files(GFileEnumerator *enumerator, GAsyncResult *res, FileBrowserNode *node)
 {
-	FileBrowserNode *parent = (FileBrowserNode *) user_data;
-	GeditFileBrowserStore *model;
+	FileBrowserNodeDir *dir;
+	GList *list, *cur;
+	GFileInfo *info;
+	GFileType type;
+	GFile *file;
+	gchar *uri;
+	gchar *str;	
+	gchar const *name;
 
-	model = FILE_BROWSER_NODE_DIR (parent)->model;
+	dir = FILE_BROWSER_NODE_DIR (node);
 
-	if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF) {
-		GList *item;
+	list = cur = g_file_enumerator_next_files_finish (enumerator, res, NULL);	
+	if (list == NULL)  {
+		model_end_loading (dir->model, node);
+		model_check_dummy (dir->model, node);
+		g_file_enumerator_close(enumerator, NULL, NULL);
+		dir->monitor_handle = g_file_monitor_directory(node->uri, G_FILE_MONITOR_NONE, NULL);
+		g_signal_connect(dir->monitor_handle, "changed", 
+				G_CALLBACK(on_directory_monitor_event), 
+				node);
+		
+		return ;
+	}
+	
+	uri = g_file_get_uri(node->uri);
+	for (cur = list; cur != NULL; cur = cur->next)
+	{
+		info = G_FILE_INFO(cur->data);
+		type = g_file_info_get_file_type(info);
+		name = g_file_info_get_name(info);
+		str = g_build_filename(uri, name, NULL);
+		file = g_file_new_for_uri(str); 
+		g_free(str);
+		/* Skip all non regular, non directory files */
+		if (type != G_FILE_TYPE_REGULAR &&
+		    type != G_FILE_TYPE_DIRECTORY &&
+		    type != G_FILE_TYPE_SYMBOLIC_LINK)
+			continue;
 
-		for (item = list; item; item = item->next) {
-			GnomeVFSFileInfo *info;
-			GnomeVFSURI *uri;
+		/* Skip '.' and '..' directories */
+		if (type == G_FILE_TYPE_DIRECTORY &&
+		    (strcmp (name, ".") == 0 ||
+		     strcmp (name, "..") == 0))
+			continue;
 
-			info = (GnomeVFSFileInfo *) (item->data);
+		model_add_node_from_uri (dir->model, node, file, info);
 
-			/* Skip all non regular, non directory files */
-			if (info->type != GNOME_VFS_FILE_TYPE_REGULAR &&
-			    info->type != GNOME_VFS_FILE_TYPE_DIRECTORY &&
-			    info->type != GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK)
-				continue;
+	}	
+	
+	g_free(uri);
 
-			/* Skip '.' and '..' directories */
-			if (info->type == GNOME_VFS_FILE_TYPE_DIRECTORY &&
-			    (strcmp (info->name, ".") == 0 ||
-			     strcmp (info->name, "..") == 0))
-				continue;
+	g_file_enumerator_next_files_async (enumerator,
+						100,
+						G_PRIORITY_DEFAULT, 
+						dir->load_handle,
+						(GAsyncReadyCallback)cb_next_files,
+						node);
 
-			uri = gnome_vfs_uri_append_path (parent->uri,
-							 info->name);
-			model_add_node_from_uri (model, parent, uri, info);
-			gnome_vfs_uri_unref (uri);
-		}
+	
+}
 
-		if (result == GNOME_VFS_ERROR_EOF) {
-			FileBrowserNodeDir *dir;
+static void
+cb_start_iterate_children(GFile *file, GAsyncResult *res, FileBrowserNode *node)
+{
+	FileBrowserNodeDir *dir;
+	GError *error = NULL;
+	GFileEnumerator * enumerator;	
 
-			dir = FILE_BROWSER_NODE_DIR (parent);
-			dir->load_handle = NULL;
-
-			if (gnome_vfs_uri_is_local (parent->uri)
-			    && dir->monitor_handle == NULL) {
-				gnome_vfs_monitor_add (&(dir->monitor_handle),
-						       gnome_vfs_uri_get_path (parent->uri),
-						       GNOME_VFS_MONITOR_DIRECTORY,
-						       (GnomeVFSMonitorCallback)on_directory_monitor_event, parent);
-			}
-
-			model_end_loading (model, parent);
-			model_check_dummy (model, parent);
-		}
-	} else {
-		g_signal_emit (model, 
+	dir = FILE_BROWSER_NODE_DIR (node);
+	enumerator = g_file_enumerate_children_finish (file, res, &error);
+	if (enumerator == NULL)
+	{
+		g_signal_emit (dir->model, 
 		               model_signals[ERROR], 
 		               0,
 		               GEDIT_FILE_BROWSER_ERROR_LOAD_DIRECTORY,
-		               gnome_vfs_result_to_string (result));
+		               error->message);
 
-		file_browser_node_unload (model, parent, TRUE);
+		file_browser_node_unload (dir->model, node, TRUE);
+
+		g_error_free(error);
+		return ;
 	}
+	
+	g_file_enumerator_next_files_async (enumerator,
+						100,
+						G_PRIORITY_DEFAULT, 
+						dir->load_handle,
+						(GAsyncReadyCallback)(cb_next_files),
+						node);
 }
 
 static void
@@ -2007,9 +2023,11 @@
 
 	/* Cancel a previous load */
 	if (dir->load_handle != NULL) {
-		gnome_vfs_async_cancel (dir->load_handle);
+		g_cancellable_cancel (dir->load_handle);
 		dir->load_handle = NULL;
 	}
+	else
+		dir->load_handle = g_cancellable_new();
 
 	node->flags |= GEDIT_FILE_BROWSER_STORE_FLAG_LOADED;
 	model_begin_loading (model, node);
@@ -2018,26 +2036,30 @@
 	parse_dot_hidden_file (node);
 
 	/* Start loading async */
-	gnome_vfs_async_load_directory_uri (&(dir->load_handle), node->uri,
-					    GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
-					    GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
-					    100,
-					    GNOME_VFS_PRIORITY_DEFAULT,
-					    model_load_directory_cb, node);
+
+	
+	g_file_enumerate_children_async (node->uri, "standard::*", 
+					G_FILE_QUERY_INFO_NONE, 
+					G_PRIORITY_DEFAULT,
+					dir->load_handle,
+					(GAsyncReadyCallback)cb_start_iterate_children,
+					node);
+
 }
 
+
 static GList *
-get_parent_uris (GeditFileBrowserStore * model, GnomeVFSURI * uri)
+get_parent_uris (GeditFileBrowserStore * model, GFile * uri)
 {
 	GList *result = NULL;
 
-	result = g_list_prepend (result, gnome_vfs_uri_ref (uri));
+	result = g_list_prepend (result, g_object_ref (uri));
 
-	while (gnome_vfs_uri_has_parent (uri)) {
-		uri = gnome_vfs_uri_get_parent (uri);
+	while (uri) {
+		uri = g_file_get_parent(uri);
 
-		if (gnome_vfs_uri_equal (uri, model->priv->root->uri)) {
-			gnome_vfs_uri_unref (uri);
+		if (g_file_equal (uri, model->priv->root->uri)) {
+			g_object_unref (uri);
 			break;
 		}
 
@@ -2225,15 +2247,15 @@
 
 static void
 set_virtual_root_from_uri (GeditFileBrowserStore * model,
-			   GnomeVFSURI * uri)
+			   GFile * uri)
 {
 	GList *uris;
 	GList *item;
 	FileBrowserNode *node;
 	FileBrowserNode *parent;
-	GnomeVFSURI *check;
+	GFile *check;
 	gboolean created = FALSE;
-	GnomeVFSFileInfo *info;
+	GFileInfo *info;
 
 	/* Always clear the model before altering the nodes */
 	model_clear (model, FALSE);
@@ -2244,7 +2266,7 @@
 	node = NULL;
 
 	for (item = uris; item; item = item->next) {
-		check = (GnomeVFSURI *) (item->data);
+		check = (GFile *) (item->data);
 		node = NULL;
 
 		if (!created)
@@ -2254,19 +2276,17 @@
 			// Create the node
 			node = file_browser_node_dir_new (model, check, parent);
 
-			info = gnome_vfs_file_info_new ();
-			gnome_vfs_get_file_info_uri (check, info,
-						     GNOME_VFS_FILE_INFO_DEFAULT |
-						     GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
+			info = g_file_query_info (check, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, NULL);
+
 			file_browser_node_set_from_info (model, node, info);
-			gnome_vfs_file_info_unref (info);
+			g_object_unref (info);
 
 			model_add_node (model, node, parent);
 			created = TRUE;
 		}
 
 		parent = node;
-		gnome_vfs_uri_unref (check);
+		g_object_unref (check);
 	}
 
 	g_list_free (uris);
@@ -2274,52 +2294,11 @@
 	set_virtual_root_from_node (model, parent);
 }
 
-static int
-progress_update_callback (GnomeVFSAsyncHandle * handle,
-			  GnomeVFSXferProgressInfo * progress_info,
-			  gpointer data)
-{
-	AsyncHandle *ahandle;
 
-	ahandle = (AsyncHandle *) (data);
-
-	switch (progress_info->status) {
-	case GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR:
-		if (ahandle->alive)
-			g_signal_emit (ahandle->model,
-				       model_signals[ERROR], 0,
-				       GEDIT_FILE_BROWSER_ERROR_DELETE,
-				       gnome_vfs_result_to_string
-				       (progress_info->vfs_status));
-
-		return GNOME_VFS_XFER_ERROR_ACTION_ABORT;
-		break;
-	case GNOME_VFS_XFER_PROGRESS_STATUS_OK:
-		switch (progress_info->phase) {
-		case GNOME_VFS_XFER_PHASE_COMPLETED:
-			if (ahandle->alive) {
-				ahandle->model->priv->async_handles =
-				    g_slist_remove (ahandle->model->priv->
-						    async_handles,
-						    ahandle);
-			}
-
-			g_free (ahandle);
-			break;
-		default:
-			break;
-		}
-	default:
-		break;
-	}
-
-	return 1;
-}
-
 static FileBrowserNode *
 model_find_node_children (GeditFileBrowserStore *model,
 			  FileBrowserNode *parent,
-			  GnomeVFSURI *uri)
+			  GFile *uri)
 {
 	FileBrowserNodeDir *dir;
 	FileBrowserNode *child;
@@ -2346,101 +2325,24 @@
 static FileBrowserNode *
 model_find_node (GeditFileBrowserStore *model,
 		 FileBrowserNode *node,
-		 GnomeVFSURI *uri)
+		 GFile *uri)
 {
 	if (node == NULL)
 		node = model->priv->root;
 
-	if (node->uri && gnome_vfs_uri_equal (node->uri, uri))
+	if (node->uri && g_file_equal (node->uri, uri))
 		return node;
-	
-	if (NODE_IS_DIR (node) && gnome_vfs_uri_is_parent (node->uri, uri, TRUE))
+
+	if (NODE_IS_DIR (node) && g_file_contains_file (node->uri, uri))
 		return model_find_node_children (model, node, uri);
-	
+
 	return NULL;
 }
 
-typedef struct {
-	GeditFileBrowserStore *model;
-	gchar *uri;
-} IdleDelete;
 
-static void
-idle_delete_free (IdleDelete *data)
-{
-	g_free (data->uri);
-	g_free (data);
-}
 
-static gboolean
-uri_deleted (IdleDelete *data)
-{
-	GnomeVFSURI *guri;
-	FileBrowserNode *node;
 
-	guri = gnome_vfs_uri_new (data->uri);
-	node = model_find_node (data->model, NULL, guri);
-	    	
-	if (node)
-		model_remove_node (data->model, node, NULL, TRUE);
-		
-	gnome_vfs_uri_unref (guri);
-	
-	return FALSE;
-}
 
-static int
-progress_sync_callback_trash (GnomeVFSXferProgressInfo * progress_info,
-			      gpointer data)
-{
-	AsyncHandle *ahandle = (AsyncHandle *) (data);
-	IdleDelete *delete;
-
-	if (!ahandle->alive)
-		return 1;
-
-	if (progress_info->status == GNOME_VFS_XFER_PROGRESS_STATUS_OK && 
-	    (progress_info->phase == GNOME_VFS_XFER_PHASE_DELETESOURCE ||
-	    progress_info->phase == GNOME_VFS_XFER_PHASE_MOVING)) {
-	    	delete = g_new(IdleDelete, 1);
-	    	delete->model = ahandle->model;
-	    	delete->uri = g_strdup (progress_info->source_name);
-
-		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
-				 (GSourceFunc)uri_deleted,
-				 delete,
-				 (GDestroyNotify)idle_delete_free);
-	}
-
-	return 1;
-}
-
-
-static int
-progress_sync_callback_delete (GnomeVFSXferProgressInfo * progress_info,
-			       gpointer data)
-{
-	AsyncHandle *ahandle = (AsyncHandle *) (data);
-	IdleDelete *delete;
-
-	if (!ahandle->alive)
-		return 1;
-
-	if (progress_info->status == GNOME_VFS_XFER_PROGRESS_STATUS_OK && 
-	    progress_info->phase == GNOME_VFS_XFER_PHASE_DELETESOURCE) {
-	    	delete = g_new(IdleDelete, 1);
-	    	delete->model = ahandle->model;
-	    	delete->uri = g_strdup (progress_info->source_name);
-
-		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, 
-				 (GSourceFunc)uri_deleted,
-				 delete,
-				 (GDestroyNotify)idle_delete_free);
-	}
-
-	return 1;
-}
-
 static GQuark
 gedit_file_browser_store_error_quark (void)
 {
@@ -2454,41 +2356,57 @@
 	return quark;
 }
 
-static GnomeVFSURI *
-unique_new_name (GnomeVFSURI * uri, gchar const *name)
+static GFile *
+unique_new_name (GFile * uri, gchar const *name)
 {
-	GnomeVFSURI *newuri = NULL;
+	GFile *newuri = NULL;
 	guint num = 0;
+	gchar *str, *base;
+	GFileInfo *info = NULL;
 
-	while (newuri == NULL || gnome_vfs_uri_exists (newuri)) {
+	str = g_file_get_uri(uri);
+
+	/* iterate until no file with the name */
+	while (newuri == NULL || info) {
 		gchar *newname;
 
 		if (newuri != NULL)
-			gnome_vfs_uri_unref (newuri);
+			g_object_unref (newuri);
 
 		if (num == 0)
-			newname = g_strdup (name);
-		else
-			newname = g_strdup_printf ("%s(%d)", name, num);
+			newname = g_build_filename ( str, name, NULL);
+		else {
+			base = g_strdup_printf("%s(%d)", name, num);
+			newname = g_build_filename (str, base, NULL);
+			g_free(base);
+		}
+		newuri = g_file_new_for_uri (newname);
+		/* check if file already exists */
+		info = g_file_query_info(newuri, "standard::name", 0, NULL, NULL);
 
-		newuri = gnome_vfs_uri_append_file_name (uri, newname);
-
 		g_free (newname);
 
 		++num;
 	}
-
+	g_free(str);
+	
 	return newuri;
 }
 
-static GnomeVFSURI *
-append_basename (GnomeVFSURI * target_uri, GnomeVFSURI * uri)
+static GFile *
+append_basename (GFile * target_uri, GFile * uri)
 {
-	gchar *basename;
-	GnomeVFSURI *ret;
+	char *str, *str2;
+	GFile *ret; 
+	str = g_file_get_uri(target_uri);
+	str2 = g_file_get_basename(uri);
 
-	basename = gnome_vfs_uri_extract_short_name (uri);
-	ret = gnome_vfs_uri_append_file_name (target_uri, basename);
+	gchar *basename = g_build_filename(str, str2, NULL);
+
+	ret = g_file_new_for_uri(basename);
+	
+	g_free (str);
+	g_free (str2);
 	g_free (basename);
 
 	return ret;
@@ -2498,12 +2416,14 @@
 GeditFileBrowserStore *
 gedit_file_browser_store_new (gchar const *root)
 {
+	GFile *file;
 	GeditFileBrowserStore *obj =
 	    GEDIT_FILE_BROWSER_STORE (g_object_new
 				      (GEDIT_TYPE_FILE_BROWSER_STORE,
 				       NULL));
 
-	gedit_file_browser_store_set_root (obj, root);
+	file = g_file_new_for_uri(root);
+	gedit_file_browser_store_set_root (obj, file);
 	return obj;
 }
 
@@ -2569,56 +2489,54 @@
 }
 
 GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_from_string
-    (GeditFileBrowserStore * model, gchar const *root) {
-	GnomeVFSURI *uri = gnome_vfs_uri_new (root);
-	gchar *str, *str1;
+gedit_file_browser_store_set_virtual_root_from_file
+    (GeditFileBrowserStore * model, GFile *file) 
+{
+	
+	gchar *str, *str2;
+	GFile *parent = NULL;
 
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
 			      GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
+	g_return_val_if_fail (G_IS_FILE (file),
+			      GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
 
-	if (uri == NULL) {
-		g_warning ("Invalid uri (%s)", root);
-		return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
-	}
-
 	/* Check if uri is already the virtual root */
 	if (model->priv->virtual_root &&
-	    gnome_vfs_uri_equal (model->priv->virtual_root->uri, uri)) {
-		gnome_vfs_uri_unref (uri);
+	    g_file_equal (model->priv->virtual_root->uri, file)) {
 		return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
 	}
 
 	/* Check if uri is the root itself */
-	if (gnome_vfs_uri_equal (model->priv->root->uri, uri)) {
-		gnome_vfs_uri_unref (uri);
+	if (g_file_equal (model->priv->root->uri, file)) {
 
 		/* Always clear the model before altering the nodes */
 		model_clear (model, FALSE);
 		set_virtual_root_from_node (model, model->priv->root);
+
 		return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
 	}
 
-	if (!gnome_vfs_uri_is_parent (model->priv->root->uri, uri, TRUE)) {
-		str =
-		    gnome_vfs_uri_to_string (model->priv->root->uri,
-					     GNOME_VFS_URI_HIDE_PASSWORD);
-		str1 =
-		    gnome_vfs_uri_to_string (uri,
-					     GNOME_VFS_URI_HIDE_PASSWORD);
+	parent = g_file_get_parent(model->priv->root->uri);
+	if (parent  && g_file_equal(parent, file)) {
+		str = g_file_get_uri (model->priv->root->uri);
+		str2 = g_file_get_uri (file);
 		g_warning
 		    ("Virtual root (%s) is not below actual root (%s)",
-		     str1, str);
+		     str2, str);
 		g_free (str);
-		g_free (str1);
+		g_free (str2);
 
-		gnome_vfs_uri_unref (uri);
+		g_object_unref(parent);
+
 		return GEDIT_FILE_BROWSER_STORE_RESULT_ERROR;
 	}
 
-	set_virtual_root_from_uri (model, uri);
-	gnome_vfs_uri_unref (uri);
+	if (parent)
+		g_object_unref(parent);
 
+	set_virtual_root_from_uri (model, file);
+
 	return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
 }
 
@@ -2697,14 +2615,13 @@
 	return (iter1->user_data == iter2->user_data);
 }
 
+
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_root_and_virtual_root (GeditFileBrowserStore *
 						    model,
-						    gchar const *root,
-						    gchar const *virtual_root)
+						    GFile *root,
+						    GFile *virtual_root)
 {
-	GnomeVFSURI *uri = NULL;
-	GnomeVFSURI *vuri = NULL;
 	FileBrowserNode *node;
 	gboolean equal = FALSE;
 
@@ -2714,42 +2631,40 @@
 	if (root == NULL && model->priv->root == NULL)
 		return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
 
-	if (root != NULL) {
-		uri = gnome_vfs_uri_new (root);
 
-		if (uri == NULL) {
-			g_signal_emit (model, model_signals[ERROR], 0,
-				       GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
-				       _("Invalid uri"));
-			return GEDIT_FILE_BROWSER_STORE_RESULT_ERROR;
-		}
+	/* is uri valid? TODO better check */
+	if (root == NULL) {
+		g_signal_emit (model, model_signals[ERROR], 0,
+			       GEDIT_FILE_BROWSER_ERROR_SET_ROOT,
+			       _("Invalid uri"));
+		return GEDIT_FILE_BROWSER_STORE_RESULT_ERROR;
+		
 	}
 
-	if (root != NULL && model->priv->root != NULL) {
-		equal = gnome_vfs_uri_equal (uri, model->priv->root->uri);
+	/* is the new uri the same as the old */
+	if (model->priv->root != NULL) {
+		equal = g_file_equal (root, model->priv->root->uri);
 
-		if (equal && virtual_root == NULL) {
-			gnome_vfs_uri_unref (uri);
+		/* uri is the same as the old do not change */
+		if (equal && virtual_root == NULL) 
 			return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
-		}
 	}
 
-	if (virtual_root) {
-		vuri = gnome_vfs_uri_new (virtual_root);
-
+	if (virtual_root) 
+	{
+		g_object_ref(virtual_root);
 		if (equal && model->priv->virtual_root &&
-		    gnome_vfs_uri_equal (vuri,
-					 model->priv->virtual_root->uri)) {
-			if (uri)
-				gnome_vfs_uri_unref (uri);
-
-			gnome_vfs_uri_unref (vuri);
+		    g_file_equal (virtual_root,
+				model->priv->virtual_root->uri)) 
+		{
 			return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
 		}
 
-		gnome_vfs_uri_unref (vuri);
 	}
 
+	/* make sure we dont kill the root/virtual references */
+	g_object_ref(root);
+
 	/* Always clear the model before altering the nodes */
 	model_clear (model, TRUE);
 	file_browser_node_free (model, model->priv->root);
@@ -2757,10 +2672,9 @@
 	model->priv->root = NULL;
 	model->priv->virtual_root = NULL;
 
-	if (uri != NULL) {
+	if (root != NULL) {
 		/* Create the root node */
-		node = file_browser_node_dir_new (model, uri, NULL);
-		gnome_vfs_uri_unref (uri);
+		node = file_browser_node_dir_new (model, root, NULL);
 
 		model->priv->root = node;
 		model_check_dummy (model, node);
@@ -2769,7 +2683,7 @@
 
 		if (virtual_root != NULL)
 			return
-			    gedit_file_browser_store_set_virtual_root_from_string
+			    gedit_file_browser_store_set_virtual_root_from_file
 			    (model, virtual_root);
 		else
 			set_virtual_root_from_node (model,
@@ -2784,7 +2698,7 @@
 
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_root (GeditFileBrowserStore * model,
-				   gchar const *root)
+				   GFile *root)
 {
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model),
 			      GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
@@ -2793,22 +2707,21 @@
 								   NULL);
 }
 
-gchar *
+GFile *
 gedit_file_browser_store_get_root (GeditFileBrowserStore * model)
 {
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), NULL);
 
-	return gnome_vfs_uri_to_string (model->priv->root->uri,
-					GNOME_VFS_URI_HIDE_NONE);
+	return model->priv->root->uri;
+		
 }
 
-gchar * 
+GFile * 
 gedit_file_browser_store_get_virtual_root (GeditFileBrowserStore * model)
 {
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), NULL);
 	
-	return gnome_vfs_uri_to_string (model->priv->virtual_root->uri,
-	                                GNOME_VFS_URI_HIDE_NONE);
+	return model->priv->virtual_root->uri;
 }
 
 void
@@ -2924,44 +2837,61 @@
 				 GError ** error)
 {
 	FileBrowserNode *node;
-	GnomeVFSURI *uri;
-	GnomeVFSURI *parent;
-	GnomeVFSResult ret;
-
+	GFile *parent, *file;
 	*error = NULL;
+	GError *myerror = NULL;
+	char *str, *str2;
+	gboolean ret;
+	GFileInfo *info;
 
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
 	g_return_val_if_fail (iter != NULL, FALSE);
 	g_return_val_if_fail (iter->user_data != NULL, FALSE);
 
 	node = (FileBrowserNode *) (iter->user_data);
+	parent = g_file_get_parent (node->uri);
+	str = g_file_get_uri(parent);
 
-	parent = gnome_vfs_uri_get_parent (node->uri);
-	uri = gnome_vfs_uri_append_file_name (parent, new_name);
-	gnome_vfs_uri_unref (parent);
+	g_object_unref (parent);
 
-	if (gnome_vfs_uri_equal (node->uri, uri)) {
-		gnome_vfs_uri_unref (uri);
+	str2 = g_build_filename (str, new_name, NULL);
+
+	file = g_file_new_for_uri(str2);
+	g_free(str);
+	g_free(str2);
+
+	if (g_file_equal (node->uri, file)) {
+		g_object_unref (file);
 		return TRUE;
 	}
 
-	ret = gnome_vfs_move_uri (node->uri, uri, FALSE);
+	ret = g_file_move (node->uri, 
+			file, 
+			G_FILE_COPY_OVERWRITE,
+			NULL,  /* Cancellable */
+			NULL,  /* progress callback */
+			NULL, /* user_data */
+			&myerror);
 
-	if (ret == GNOME_VFS_OK) {
-		GnomeVFSFileInfo *info;
+	if (ret == TRUE && 
+			( info = g_file_query_info (file, 
+				"standard::*", 
+				G_FILE_QUERY_INFO_NONE, 
+				NULL, 
+				&myerror ) ) != NULL  ) 
+	{
 		GtkTreePath *path;
 
 		parent = node->uri;
-		node->uri = uri;
-		info = gnome_vfs_file_info_new ();
-		gnome_vfs_get_file_info_uri (uri, info,
-					     GNOME_VFS_FILE_INFO_DEFAULT |
-					     GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
+		node->uri = file;
+
+
 		file_browser_node_set_from_info (model, node, info);
 		file_browser_node_set_name (node);
-		gnome_vfs_file_info_unref (info);
-		gnome_vfs_uri_unref (parent);
 
+		g_object_unref (info);
+		g_object_unref (parent);
+
 		path = gedit_file_browser_store_get_path_real (model, node);
 		gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, iter);
 		gtk_tree_path_free (path);
@@ -2971,18 +2901,22 @@
 
 		return TRUE;
 	} else {
-		gnome_vfs_uri_unref (uri);
+		g_object_unref (file);
 
 		if (error != NULL) {
 			*error =
 			    g_error_new_literal
 			    (gedit_file_browser_store_error_quark (),
 			     GEDIT_FILE_BROWSER_ERROR_RENAME,
-			     gnome_vfs_result_to_string (ret));
+			     myerror->message);
+
+			g_error_free(myerror);
 		}
 
 		return FALSE;
 	}
+
+	return FALSE;
 }
 
 GeditFileBrowserStoreResult
@@ -2990,34 +2924,25 @@
 				     GList *rows, gboolean trash)
 {
 	FileBrowserNode *node;
-	AsyncHandle *handle;
-	GList *uris = NULL;
-	GList *row;
-	GList *target = NULL;
-	GnomeVFSURI *trash_uri;
-	GnomeVFSResult ret;
-	GnomeVFSXferOptions options;
+	GError *error=NULL;
 	GtkTreeIter iter;
+	GList *row;
 	GeditFileBrowserStoreResult result = GEDIT_FILE_BROWSER_STORE_RESULT_OK;
 	GtkTreePath *prev = NULL;
 	GtkTreePath *path;
-	GnomeVFSXferProgressCallback sync_cb;
 
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE);
 	
 	if (rows == NULL)
 		return GEDIT_FILE_BROWSER_STORE_RESULT_NO_CHANGE;
 
-	handle = g_new (AsyncHandle, 1);
-	handle->model = model;
-	handle->alive = TRUE;
 
 	/* First we sort the paths so that we can later on remove any
 	   files/directories that are actually subfiles/directories of
 	   a directory that's also deleted */
 	rows = g_list_sort (g_list_copy (rows), (GCompareFunc)gtk_tree_path_compare);
 
-	for (row = rows; row; row = row->next) {
+	for (row=rows; row; row = row->next) {
 		path = (GtkTreePath *)(row->data);
 
 		if (!gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path))
@@ -3030,79 +2955,33 @@
 		
 		prev = path;
 		node = (FileBrowserNode *)(iter.user_data);
-		
-		if (trash) {
-			/* Find the trash */
-			ret =
-		    		gnome_vfs_find_directory (node->uri,
-					      GNOME_VFS_DIRECTORY_KIND_TRASH,
-					      &trash_uri, FALSE, TRUE,
-					      0777);
 
-			if (ret == GNOME_VFS_ERROR_NOT_FOUND || trash_uri == NULL) {
-				if (trash_uri != NULL)
-					gnome_vfs_uri_unref (trash_uri);
-					
-				result = GEDIT_FILE_BROWSER_STORE_RESULT_NO_TRASH;
-				break;
-			} else {
-				uris = g_list_append (uris, node->uri);
-				target =
-				    g_list_append (target,
-						   append_basename (trash_uri,
-								    node->uri));
-				gnome_vfs_uri_unref (trash_uri);
-			}
-		} else {
-			uris = g_list_append (uris, node->uri);
+		if (!trash && g_file_delete(node->uri, NULL, &error ) == FALSE)  {
+			g_error_free(error);
+			result = GEDIT_FILE_BROWSER_STORE_RESULT_ERROR;
+			break ;	
 		}
+		else if  (g_file_trash(node->uri, NULL, &error) == FALSE) 
+		{
+			result = GEDIT_FILE_BROWSER_STORE_RESULT_NO_TRASH;
+			g_error_free(error);
+			break ;
+		}
+
 	}
+
 	
+
 	if (result != GEDIT_FILE_BROWSER_STORE_RESULT_OK) {
-		if (target) {
-			g_list_foreach (target, (GFunc)gnome_vfs_uri_unref, NULL);
-			g_list_free (target);
-		}
 		
-		g_list_free (uris);
-		g_free (handle);
 		g_list_free (rows);
 
 		return result;
 	}
 	
-	if (trash) {
-		options =
-			GNOME_VFS_XFER_RECURSIVE |
-			GNOME_VFS_XFER_REMOVESOURCE;
-		sync_cb = progress_sync_callback_trash;
-	} else {
-		options =
-			GNOME_VFS_XFER_DELETE_ITEMS | GNOME_VFS_XFER_RECURSIVE;
-		sync_cb = progress_sync_callback_delete;
-	}
-
-	gnome_vfs_async_xfer (&(handle->handle), uris, target,
-			      options,
-			      GNOME_VFS_XFER_ERROR_MODE_QUERY,
-			      GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
-			      GNOME_VFS_PRIORITY_DEFAULT,
-			      progress_update_callback,
-			      handle, sync_cb, handle);
-
-	model->priv->async_handles =
-	    g_slist_prepend (model->priv->async_handles, handle);
-
-	g_list_free (uris);
 	
-	if (target) {
-		g_list_foreach (target, (GFunc)gnome_vfs_uri_unref, NULL);
-		g_list_free (target);
-	}
-	
-	g_list_free (rows);
-	
-	return GEDIT_FILE_BROWSER_STORE_RESULT_OK;
+	return result;
+
 }
 
 GeditFileBrowserStoreResult
@@ -3136,9 +3015,8 @@
 				   GtkTreeIter * parent,
 				   GtkTreeIter * iter)
 {
-	GnomeVFSURI *uri;
-	GnomeVFSHandle *handle;
-	GnomeVFSResult ret;
+	GFile *file;
+	GError *error = NULL;
 	FileBrowserNodeDir *parent_node;
 	gboolean result = FALSE;
 	FileBrowserNode *node;
@@ -3152,32 +3030,35 @@
 	g_return_val_if_fail (iter != NULL, FALSE);
 
 	parent_node = FILE_BROWSER_NODE_DIR (parent->user_data);
-	uri = unique_new_name (((FileBrowserNode *) parent_node)->uri, _("file"));
+	file = unique_new_name (((FileBrowserNode *) parent_node)->uri, _("file"));
+	if (!file || g_file_create (file, G_FILE_CREATE_NONE, NULL, &error) == FALSE)  {
+		if (error != NULL) {
+			g_signal_emit (model, model_signals[ERROR], 0,
+				       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+				       error->message);
+			g_error_free(error);
+		}
+		else
+			g_signal_emit (model, model_signals[ERROR], 0,
+				       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+				       _("Could not create unique filename!"));
 
-	ret = gnome_vfs_create_uri (&handle, uri,
-				    GNOME_VFS_OPEN_NONE |
-				    GNOME_VFS_OPEN_WRITE, FALSE, 0644);
+		return FALSE;
+	}
 
-	if (ret != GNOME_VFS_OK) {
-		g_signal_emit (model, model_signals[ERROR], 0,
-			       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
-			       gnome_vfs_result_to_string (ret));
-	} else {
-		node = model_add_node_from_uri (model, (FileBrowserNode *)
-						parent_node, uri, NULL);
+	node = model_add_node_from_uri (model, (FileBrowserNode *)
+						parent_node, file, NULL);
 
-		if (model_node_visibility (model, node)) {
+	if (model_node_visibility (model, node)) {
 			iter->user_data = node;
 			result = TRUE;
-		} else {
-			g_signal_emit (model, model_signals[ERROR], 0,
-				       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
-				       _
-				       ("The new file is currently filtered out. You need to adjust your filter settings to make the file visible"));
-		}
+	} else {
+		g_signal_emit (model, model_signals[ERROR], 0,
+			       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+				_("The new file is currently filtered out. You need to adjust your filter settings to make the file visible"));
 	}
-
-	gnome_vfs_uri_unref (uri);
+	
+	g_object_unref (file);
 	return result;
 }
 
@@ -3186,10 +3067,10 @@
 					GtkTreeIter * parent,
 					GtkTreeIter * iter)
 {
-	GnomeVFSURI *uri;
-	GnomeVFSResult ret;
-	FileBrowserNodeDir *parent_node;
+	GError *error = NULL;
 	gboolean result = FALSE;
+	GFile *file;
+	FileBrowserNodeDir *parent_node;
 	FileBrowserNode *node;
 
 	g_return_val_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model), FALSE);
@@ -3201,65 +3082,68 @@
 	g_return_val_if_fail (iter != NULL, FALSE);
 
 	parent_node = FILE_BROWSER_NODE_DIR (parent->user_data);
-	uri = unique_new_name (((FileBrowserNode *) parent_node)->uri, _("directory"));
+	file = unique_new_name (((FileBrowserNode *) parent_node)->uri, _("directory"));
 
-	ret = gnome_vfs_make_directory_for_uri (uri, 0755);
-
-	if (ret != GNOME_VFS_OK) {
-		g_signal_emit (model, model_signals[ERROR], 0,
-			       GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY,
-			       gnome_vfs_result_to_string (ret));
-	} else {
-		node = model_add_node_from_uri (model, (FileBrowserNode *)
-						parent_node, uri, NULL);
-
-		if (model_node_visibility (model, node)) {
-			iter->user_data = node;
-			result = TRUE;
-		} else {
+	if (!file || g_file_make_directory(file, NULL, &error) == FALSE) {
+		if (error)  {
 			g_signal_emit (model, model_signals[ERROR], 0,
-				       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
-				       _
-				       ("The new file is currently filtered out. You need to adjust your filter settings to make the file visible"));
+			       GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY,
+			       error->message);
+			g_error_free(error);
 		}
+		else
+			g_signal_emit (model, model_signals[ERROR], 0,
+			       GEDIT_FILE_BROWSER_ERROR_NEW_DIRECTORY,
+			       _("Could not create unique directory!"));
+
+		return FALSE;
+	} 
+
+
+	node = model_add_node_from_uri (model, (FileBrowserNode *)
+					parent_node, file, NULL);
+
+	if (model_node_visibility (model, node)) {
+		iter->user_data = node;
+		result = TRUE;
+	} else {
+		g_signal_emit (model, model_signals[ERROR], 0,
+			       GEDIT_FILE_BROWSER_ERROR_NEW_FILE,
+			       _
+			       ("The new file is currently filtered out. \nYou need to adjust your filter settings to make the file visible"));
 	}
 
-	gnome_vfs_uri_unref (uri);
+	g_object_unref (file);
+
 	return result;
 }
 
 /* Signal handlers */
 static void
-on_directory_monitor_event (GnomeVFSMonitorHandle * handle,
-			    gchar const *monitor_uri,
-			    const gchar * info_uri,
-			    GnomeVFSMonitorEventType event_type,
+on_directory_monitor_event (GDirectoryMonitor * handle,
+			    GFile *file,
+			    GFile * file2,
+			    guint event_type,
 			    FileBrowserNode * parent)
 {
 	FileBrowserNode *node;
 	FileBrowserNodeDir *dir = FILE_BROWSER_NODE_DIR (parent);
-	GnomeVFSURI *uri;
 
 	switch (event_type) {
-	case GNOME_VFS_MONITOR_EVENT_DELETED:
-		uri = gnome_vfs_uri_new (info_uri);
-		node = model_uri_exists (dir->model, parent, uri);
-		gnome_vfs_uri_unref (uri);
+	case G_FILE_MONITOR_EVENT_DELETED:
+		node = model_uri_exists (dir->model, parent, file);
 
 		if (node != NULL) {
 			// Remove the node
 			model_remove_node (dir->model, node, NULL, TRUE);
 		}
 		break;
-	case GNOME_VFS_MONITOR_EVENT_CREATED:
-		uri = gnome_vfs_uri_new (info_uri);
-
-		model_add_node_from_uri (dir->model, parent, uri, NULL);
-		gnome_vfs_uri_unref (uri);
+	case G_FILE_MONITOR_EVENT_CREATED:
+		model_add_node_from_uri (dir->model, parent, file, NULL);
 		break;
 	default:
 		break;
 	}
 }
+/* ex:ts=8:noet: */
 
-// ex:ts=8:noet:
Index: gedit-file-browser-plugin.c
===================================================================
--- gedit-file-browser-plugin.c	(revision 6036)
+++ gedit-file-browser-plugin.c	(working copy)
@@ -68,7 +68,7 @@
 } GeditFileBrowserPluginData;
 
 static void on_uri_activated_cb          (GeditFileBrowserWidget * widget,
-                                          gchar const *uri, 
+                                          GFile *uri, 
                                           GeditWindow * window);
 static void on_error_cb                  (GeditFileBrowserWidget * widget,
                                           guint code,
@@ -154,12 +154,13 @@
 restore_default_location (GeditFileBrowserPlugin * plugin, 
                           GeditFileBrowserPluginData *data)
 {
+	GFile * file = NULL;
+	GFile * virtual_file = NULL;
 	gchar * root;
 	gchar * virtual_root;
 	gboolean bookmarks;
 	gboolean remote;
 	GConfClient * client;
-	GnomeVFSURI * uri = NULL;
 
 	client = gconf_client_get_default ();
 
@@ -188,24 +189,27 @@
 	                                NULL);
 
 	if (root != NULL && *root != '\0') {
-		uri = gnome_vfs_uri_new (root);
+		file = g_file_new_for_uri (root);
+		virtual_file = g_file_new_for_uri (virtual_root);
 
-		if (uri == NULL || (!remote && !gedit_utils_uri_has_file_scheme (root))) {
+		if (file == NULL || (!remote && !g_file_has_uri_scheme(file, root))) {
 		} else if (virtual_root != NULL && virtual_root != '\0') {
 			prepare_auto_root(data);
 			gedit_file_browser_widget_set_root_and_virtual_root (data->tree_widget, 
-			                                                     root,
-			                                                     virtual_root);
+			                                                     file,
+			                                                     virtual_file);
 		} else {
 			prepare_auto_root(data);
 			gedit_file_browser_widget_set_root (data->tree_widget,
-			                                    root,
+			                                    file,
 			                                    TRUE);
 		}
 	}
 
-	if (uri)
-		gnome_vfs_uri_unref (uri);
+	if (file)
+		g_object_unref (file);
+	if (virtual_file)
+		g_object_unref (virtual_file);
 
 	g_object_unref (client);
 	g_free (root);
@@ -413,8 +417,8 @@
                    GeditDocument * doc)
 {
 	gchar *uri;
-	gchar *root;
-	GnomeVFSURI *guri;
+	GFile *guri;
+	GFile *parent;
 
 	if (doc == NULL)
 		return;
@@ -423,29 +427,24 @@
 	if (uri == NULL)
 		return;
 
-	guri = gnome_vfs_uri_new (uri);
+	guri = g_file_new_for_uri (uri);
 
 	if (guri == NULL) {
 		g_free (uri);
 		return;
 	}
 
-	if (gnome_vfs_uri_has_parent (guri)) {
-		GnomeVFSURI *parent;
-
-		parent = gnome_vfs_uri_get_parent (guri);
-		gnome_vfs_uri_unref (guri);
+	parent = g_file_get_parent(guri);
+	if (parent) {
+		g_object_unref (guri);
 		guri = parent;
 	}
 
-	root = gnome_vfs_uri_to_string (guri, GNOME_VFS_URI_HIDE_NONE);
 
 	gedit_file_browser_widget_set_root (data->tree_widget,
-		                            root,
+		                            guri,
 		                            TRUE);
 
-	gnome_vfs_uri_unref (guri);
-	g_free (root);
 	g_free (uri);
 }
 
@@ -490,7 +489,7 @@
 {
 	GeditFileBrowserPluginData * data;
 	gchar * terminal;
-	gchar * wd = NULL;
+	GFile *uri;
 	gchar * local;
 	gchar * argv[2];
 
@@ -507,15 +506,17 @@
 	gtk_tree_model_get (GTK_TREE_MODEL (store), 
 	                    &iter,
 	                    GEDIT_FILE_BROWSER_STORE_COLUMN_URI,
-	                    &wd,
+	                    &uri,
 	                    -1);
 	
-	if (wd == NULL)
-		return;
+	if (uri == NULL || g_file_has_uri_scheme(uri, "file") == FALSE)
+		local =  g_get_current_dir();
+	else
+		local = g_file_get_path(uri);	
 
 	terminal = get_terminal ();
-	local = gnome_vfs_get_local_path_from_uri (wd);
 
+	
 	argv[0] = terminal;
 	argv[1] = NULL;
 	
@@ -529,7 +530,6 @@
 	               NULL);
 	
 	g_free (terminal);
-	g_free (wd);
 	g_free (local);
 }
 
@@ -542,8 +542,7 @@
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 	gboolean sensitive;
-	GnomeVFSURI *guri;
-	gchar *uri;
+	GFile *file;
 
 	data = get_plugin_data (window);
 	
@@ -563,16 +562,11 @@
 	if (sensitive) {
 		gtk_tree_model_get (model, &iter, 
 				    GEDIT_FILE_BROWSER_STORE_COLUMN_URI, 
-				    &uri, -1);
+				    &file, -1);
 
-		guri = gnome_vfs_uri_new (uri);
 
-		sensitive = guri != NULL && gedit_utils_uri_has_file_scheme (uri);
+		sensitive = file != NULL && g_file_has_uri_scheme (file, "file");
 	
-		if (guri)
-			gnome_vfs_uri_unref (guri);
-
-		g_free (uri);
 	}
 
 	gtk_action_set_sensitive (
@@ -834,9 +828,11 @@
 /* Callbacks */
 static void
 on_uri_activated_cb (GeditFileBrowserWidget * tree_widget,
-		     gchar const *uri, GeditWindow * window)
+		     GFile *file, GeditWindow * window)
 {
+	char *uri = g_file_get_uri(file);
 	gedit_commands_load_uri (window, uri, NULL, 0);
+	g_free(uri);
 }
 
 static void
@@ -1005,15 +1001,17 @@
                             GeditWindow * window) 
 {
 	GeditFileBrowserPluginData * data = get_plugin_data (window);
+	GFile * file;
 	gchar * root;
 	gchar * virtual_root;
 	GConfClient * client;
 
-	root = gedit_file_browser_store_get_root (store);
-	
-	if (!root)
+	file = gedit_file_browser_store_get_root (store);
+	if (!file)
 		return;
 
+	root = g_file_get_uri(file);
+
 	client = gconf_client_get_default ();
 	
 	if (!client)
@@ -1024,8 +1022,11 @@
 	                         root,
 	                         NULL);
 	
-	virtual_root = gedit_file_browser_store_get_virtual_root (store);
+	g_object_unref(file);
 
+	file = gedit_file_browser_store_get_virtual_root (store);
+	virtual_root = g_file_get_uri(file);
+
 	if (!virtual_root) {
 		/* Set virtual to same as root then */
 		gconf_client_set_string (client,
@@ -1092,18 +1093,18 @@
 	                                      data);
 }
 
-static gchar *
+gchar *
 get_filename_from_path (GtkTreeModel *model, GtkTreePath *path)
 {
 	GtkTreeIter iter;
-	gchar *uri;
+	GFile *file;
 
 	gtk_tree_model_get_iter (model, &iter, path);
 	gtk_tree_model_get (model, &iter,
-			    GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &uri,
+			    GEDIT_FILE_BROWSER_STORE_COLUMN_URI, &file,
 			    -1);
 	
-	return gedit_file_browser_utils_uri_basename (uri);
+	return gedit_file_browser_utils_uri_basename (file);
 }
 
 static gboolean
Index: gedit-file-browser-utils.c
===================================================================
--- gedit-file-browser-utils.c	(revision 6036)
+++ gedit-file-browser-utils.c	(working copy)
@@ -1,8 +1,9 @@
-#include <libgnomeui/libgnomeui.h>
-#include <libgnomevfs/gnome-vfs.h>
+#include <string.h>
+#include <gio/gio.h>
 
 #include "gedit-file-browser-utils.h"
 
+
 GdkPixbuf *
 gedit_file_browser_utils_pixbuf_from_theme (gchar const *name,
                                             GtkIconSize size)
@@ -36,39 +37,62 @@
 	return pixbuf;
 }
 
+GdkPixbuf *gedit_file_browser_utils_pixbuf_from_icon (GIcon *icon,
+                                                           GtkIconSize size)
+{
+	GdkPixbuf *pixbuf;
+	
+	pixbuf = gedit_file_browser_utils_pixbuf_from_theme(GTK_STOCK_HARDDISK, size);
+
+	return pixbuf;
+}
+
+/* TODO fix icon stuff right now we only use default icons for file and dirs */
 GdkPixbuf *
-gedit_file_browser_utils_pixbuf_from_mime_type (gchar const *uri,
-                                                gchar const *mime,
+gedit_file_browser_utils_pixbuf_from_file (GFile *file,
                                                 GtkIconSize size)
 {
-	GtkIconTheme *theme;
 	GdkPixbuf *pixbuf;
-	gchar *name;
+	GFileInfo *info;
 
-	theme = gtk_icon_theme_get_default ();
+	info = g_file_query_info(file, "standard::type,standard::icon", 0, NULL, NULL);
+	if (g_file_info_get_file_type(info) == G_FILE_TYPE_DIRECTORY)
+		pixbuf = gedit_file_browser_utils_pixbuf_from_theme(GTK_STOCK_DIRECTORY, size);
+	else
+		pixbuf = gedit_file_browser_utils_pixbuf_from_theme(GTK_STOCK_FILE, size);
+	
+	g_object_unref(info);
 
-	name =
-	    gnome_icon_lookup (theme, NULL, uri, NULL, NULL, mime,
-			       GNOME_ICON_LOOKUP_FLAGS_NONE,
-			       GNOME_ICON_LOOKUP_RESULT_FLAGS_NONE);
-
-	pixbuf = gedit_file_browser_utils_pixbuf_from_theme (name, size);
-	g_free (name);
-	
 	return pixbuf;
 }
 
+gboolean
+gedit_file_browser_utils_has_parent(GFile *file)
+{	
+	GFile * parent = NULL;
+	if ( file == NULL)
+		return FALSE;
+
+	parent = g_file_get_parent(file);
+	if ( parent == NULL)
+		return FALSE;
+
+	g_object_unref(parent);
+
+	return TRUE;
+}
+
 gchar *
-gedit_file_browser_utils_uri_basename (gchar const * uri)
+gedit_file_browser_utils_uri_basename (GFile * file)
 {
-	gchar * basename;
 	gchar * normal;
 	
-	basename = g_filename_display_basename (uri);
-	normal = gnome_vfs_unescape_string_for_display (basename);
+	if (file == NULL)
+		return NULL;
+
+	normal = g_file_get_basename (file);
+	g_object_unref(file);
 	
-	g_free (basename);
-	
 	return normal;
 }
 
Index: gedit-file-browser-store.h
===================================================================
--- gedit-file-browser-store.h	(revision 6036)
+++ gedit-file-browser-store.h	(working copy)
@@ -23,8 +23,7 @@
 #define __GEDIT_FILE_BROWSER_STORE_H__
 
 #include <gtk/gtk.h>
-#include <libgnomevfs/gnome-vfs.h>
-
+#include <gio/gio.h>
 G_BEGIN_DECLS
 #define GEDIT_TYPE_FILE_BROWSER_STORE			(gedit_file_browser_store_get_type ())
 #define GEDIT_FILE_BROWSER_STORE(obj)			(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_FILE_BROWSER_STORE, GeditFileBrowserStore))
@@ -113,17 +112,17 @@
 
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_root_and_virtual_root    (GeditFileBrowserStore * model,
-						       gchar const *root,
-			  			       gchar const *virtual_root);
+						       GFile *root,
+			  			       GFile *virtual_root);
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_root                     (GeditFileBrowserStore * model,
-				                       gchar const *root);
+				                       GFile *root);
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_virtual_root             (GeditFileBrowserStore * model,
 					               GtkTreeIter * iter);
 GeditFileBrowserStoreResult
-gedit_file_browser_store_set_virtual_root_from_string (GeditFileBrowserStore * model, 
-                                                       gchar const *root);
+gedit_file_browser_store_set_virtual_root_from_file (GeditFileBrowserStore * model, 
+                                                       GFile *root);
 GeditFileBrowserStoreResult
 gedit_file_browser_store_set_virtual_root_up          (GeditFileBrowserStore * model);
 GeditFileBrowserStoreResult
@@ -134,8 +133,8 @@
                                                        GtkTreeIter * iter);
 gboolean gedit_file_browser_store_get_iter_root       (GeditFileBrowserStore * model,
 						       GtkTreeIter * iter);
-gchar * gedit_file_browser_store_get_root             (GeditFileBrowserStore * model);
-gchar * gedit_file_browser_store_get_virtual_root     (GeditFileBrowserStore * model);
+GFile * gedit_file_browser_store_get_root             (GeditFileBrowserStore * model);
+GFile * gedit_file_browser_store_get_virtual_root     (GeditFileBrowserStore * model);
 
 gboolean gedit_file_browser_store_iter_equal          (GeditFileBrowserStore * model, 
                                                        GtkTreeIter * iter1,
Index: gedit-file-bookmarks-store.c
===================================================================
--- gedit-file-bookmarks-store.c	(revision 6036)
+++ gedit-file-bookmarks-store.c	(working copy)
@@ -21,7 +21,7 @@
 
 #include <string.h>
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs.h>
+#include <gio/gio.h>
 #include <gedit/gedit-utils.h>
 #include <gedit/gedit-plugin.h>
 
@@ -34,24 +34,24 @@
 
 struct _GeditFileBookmarksStorePrivate 
 {
-	GnomeVFSVolumeMonitor *volume_monitor;
-	GnomeVFSMonitorHandle *bookmarks_monitor;
+	GVolumeMonitor *volume_monitor;
+	GFileMonitor *bookmarks_monitor;
 };
 
 static void remove_node               (GtkTreeModel * model, 
                                        GtkTreeIter * iter,
                                        gboolean fromtree);
 
-static void on_volume_mounted         (GnomeVFSVolumeMonitor * monitor,
-                                       GnomeVFSVolume * volume,
+static void on_volume_mounted         (GVolumeMonitor * monitor,
+                                       GMount * mount,
                                        GeditFileBookmarksStore * model);
-static void on_volume_unmounted       (GnomeVFSVolumeMonitor * monitor,
-                                       GnomeVFSVolume * volume,
+static void on_volume_unmounted       (GVolumeMonitor * monitor,
+                                       GMount * volume,
                                        GeditFileBookmarksStore * model);
-static void on_bookmarks_file_changed (GnomeVFSMonitorHandle * handle,
-				       gchar const *monitor_uri,
-				       gchar const *info_uri,
-				       GnomeVFSMonitorEventType event_type,
+static void on_bookmarks_file_changed (GFileMonitor * handle,
+				       GFile *file,
+				       GFile *other,
+				       gint event_type,
 				       GeditFileBookmarksStore * model);
 static gboolean find_with_flags       (GtkTreeModel * model, 
                                        GtkTreeIter * iter,
@@ -84,10 +84,12 @@
 						      volume_monitor,
 						      on_volume_mounted,
 						      obj);
+
+		g_object_unref (obj->priv->volume_monitor);
 	}
 
-	if (obj->priv->bookmarks_monitor != NULL)
-		gnome_vfs_monitor_cancel (obj->priv->bookmarks_monitor);
+	//if (obj->priv->bookmarks_monitor != NULL)
+	//	g_object_unref (obj->priv->bookmarks_monitor);
 
 	gtk_tree_model_foreach (GTK_TREE_MODEL (obj), foreach_remove_node,
 				NULL);
@@ -122,9 +124,10 @@
 	                                                  GTK_ICON_SIZE_MENU);
 }
 
+
 static void
 add_node (GeditFileBookmarksStore * model, GdkPixbuf * pixbuf,
-	  gchar const *name, gpointer obj, guint flags, GtkTreeIter * iter)
+	  const char *name, GObject *obj, guint flags, GtkTreeIter * iter)
 {
 	GtkTreeIter newiter;
 
@@ -142,27 +145,28 @@
 }
 
 static gboolean
-add_uri (GeditFileBookmarksStore * model, const gchar * uri,
+add_uri (GeditFileBookmarksStore * model, GFile *file,
 	 gchar * name, guint flags, GtkTreeIter * iter)
 {
-	GnomeVFSURI *vfs_uri;
 	GdkPixbuf *pixbuf = NULL;
-	gchar *mime;
-	gchar *path;
+	GError *error = NULL;
 	gchar *tmp;
 	gboolean free_name = FALSE;
 	gboolean local;
+	GFileInfo *file_info;
 
-	vfs_uri = gnome_vfs_uri_new (uri);
-	if (vfs_uri == NULL)
+	if (file == NULL)
 		return FALSE;
 
-	path = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_NONE);
-	local = gedit_utils_uri_has_file_scheme (path);
 
-	if (local && !gnome_vfs_uri_exists (vfs_uri)) {
-		gnome_vfs_uri_unref (vfs_uri);
-		g_free (path);
+	/* kill this call later */
+	local = g_file_has_uri_scheme (file, "file");
+
+	file_info = g_file_query_info (file, "standard::*", G_FILE_QUERY_INFO_NONE, 							NULL, &error);
+	if (file_info  == NULL )
+	{
+		g_print("%s%s\n",_("Read bookmark or mountpoint failed:"), error->message);
+		g_error_free(error);
 		return FALSE;
 	}
 
@@ -172,34 +176,27 @@
 		pixbuf = pixbuf_from_stock ("gnome-fs-desktop");
 
 	if (pixbuf == NULL) {
-		if (local)
-			mime = gnome_vfs_get_mime_type (path);
-		else
-			mime = g_strdup ("x-directory/normal");
 
-		pixbuf = gedit_file_browser_utils_pixbuf_from_mime_type (path, 
-		                                                         mime, 
+		pixbuf = gedit_file_browser_utils_pixbuf_from_file (file, 
 		                                                         GTK_ICON_SIZE_MENU);
-		g_free (mime);
 	}
 
-	g_free (path);
 
 	if (name == NULL) {
-		tmp = gedit_file_browser_utils_uri_basename (gnome_vfs_uri_get_path (vfs_uri));
+		tmp = g_file_get_basename (file);
 		
 		if (local)
 			name = tmp;
 		else {
 			/* Translators: this is used in "file on host", e.g. "/foo/bar on ftp.baz.org" */
-			name = g_strconcat(tmp, " ", _("on"), " ", gnome_vfs_uri_get_host_name (vfs_uri), NULL);
+			name = g_strconcat(tmp, " ", _("on"), " ", "HOSTNAME FIXLATER", NULL);
 			g_free (tmp);
 		}
 		
 		free_name = TRUE;
 	}
 
-	add_node (model, pixbuf, name, vfs_uri, flags, iter);
+	add_node (model, pixbuf, name, G_OBJECT(file), flags, iter);
 
 	if (pixbuf)
 		g_object_unref (pixbuf);
@@ -214,33 +211,33 @@
 init_special_directories (GeditFileBookmarksStore * model)
 {
 	gchar const *path;
-	gchar *uri;
+	GFile *uri;
 
 	path = g_get_home_dir ();
 	if (path != NULL)
 	{
-		uri = gnome_vfs_get_uri_from_local_path (path);
+		uri = g_file_new_for_path (path);
 		add_uri (model, uri, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_HOME |
 			 GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
-		g_free (uri);
+		g_object_unref(uri);
 	}
 
 	path = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
 	if (path != NULL)
 	{
-		uri = gnome_vfs_get_uri_from_local_path (path);
+		uri = g_file_new_for_path (path);
 		add_uri (model, uri, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_DESKTOP |
 			 GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
-		g_free (uri);
+		g_object_unref(uri);
 	}
 
 	path = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
 	if (path != NULL)
 	{
-		uri = gnome_vfs_get_uri_from_local_path (path);
+		uri = g_file_new_for_path (path);
 		add_uri (model, uri, NULL, GEDIT_FILE_BOOKMARKS_STORE_IS_DOCUMENTS |
 			 GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR, NULL);
-		g_free (uri);
+		g_object_unref(uri);
 	}
 }
 
@@ -267,19 +264,23 @@
 }
 
 static void
-add_volume (GeditFileBookmarksStore * model, GnomeVFSVolume * volume,
+add_volume (GeditFileBookmarksStore * model, GObject * volume,
 	    const gchar * name, guint flags, GtkTreeIter * iter)
 {
 	GdkPixbuf *pixbuf;
-	gchar *icon;
+	GIcon *icon;
 
-	icon = gnome_vfs_volume_get_icon (volume);
-	pixbuf = pixbuf_from_stock (icon);
-	g_free (icon);
-
-	add_node (model, pixbuf, name, volume,
-		  flags | GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME, iter);
-
+	icon = g_volume_get_icon (volume);
+	if ( icon != NULL)  {
+		pixbuf = gedit_file_browser_utils_pixbuf_from_icon (icon, 16);
+		g_object_unref(icon);
+	}
+	else  /* fallback icon */
+		pixbuf = gedit_file_browser_utils_pixbuf_from_theme (GTK_STOCK_HARDDISK, 32);
+	
+	add_node (model, pixbuf, name, volume ? G_OBJECT(volume) : NULL,
+			  flags | GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME , iter);
+	
 	if (pixbuf)
 		g_object_unref (pixbuf);
 
@@ -291,54 +292,85 @@
 		check_volume_separator (model, flags, TRUE);
 }
 
-static gboolean
-process_volume (GeditFileBookmarksStore * model, GnomeVFSVolume * volume,
+gboolean
+process_volume (GeditFileBookmarksStore * model, GVolume * volume,
 		gboolean * root)
 {
-	GnomeVFSVolumeType vtype;
+	GError *error = NULL;
+	gboolean ret_value = TRUE;
+	GMount *mount;
+	GFileInfo *file_info;
+	GFile *file;
 	guint flags;
 
-	vtype = gnome_vfs_volume_get_volume_type (volume);
+	
+	if (volume != NULL)  {
+		mount = g_volume_get_mount (volume);
+		file = g_mount_get_root(mount);
+		g_object_unref (mount);
+		mount = NULL;
+	}
+	else		
+		file = g_file_new_for_uri("file:///");
 
+
+	if (file == NULL)  {
+		g_print ("Volume has no mounts\n");
+		return FALSE;
+	}		
+	
+	file_info = g_file_query_info(file, "standard::*,access::*", 0, NULL, &error);	
+
+	if (file_info == NULL)	{
+		g_print("Could not read file info\n%s\n", error->message);
+		g_error_free(error);
+		return FALSE;
+
+	}
+#ifdef TODO
 	if (gnome_vfs_volume_get_device_type (volume) ==
 	    GNOME_VFS_DEVICE_TYPE_AUDIO_CD)
 		return FALSE;
+#endif
 
-	if (gnome_vfs_volume_is_user_visible (volume)) {
+	if (volume && g_file_info_get_attribute_boolean (file_info, 
+						G_FILE_ATTRIBUTE_ACCESS_CAN_READ) == TRUE) {
 		gchar *name;
 
+#ifdef TODO
 		if (vtype == GNOME_VFS_VOLUME_TYPE_VFS_MOUNT)
 			flags = GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE;
 		else if (vtype == GNOME_VFS_VOLUME_TYPE_MOUNTPOINT)
 			flags = GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT;
 		else
 			flags = GEDIT_FILE_BOOKMARKS_STORE_IS_REMOTE_MOUNT;
+#else
+		flags = GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT;
+#endif
 
-		name = gnome_vfs_volume_get_display_name (volume);
+		name = g_volume_get_name (volume);
+		if (name == NULL)
+			name = g_file_get_basename (file);
 
 		add_volume (model, volume, name, flags, NULL);
 
 		g_free (name);
 	} else if (root && !*root) {
-		gchar *uri;
+		*root = TRUE;
 
-		uri = gnome_vfs_volume_get_activation_uri (volume);
+		add_uri (model, file, _("File System"),
+			    GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT |
+			    GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE,
+			    NULL);
 
-		if (strcmp (uri, "file:///") == 0) {
-			*root = TRUE;
-
-			add_volume (model, volume, _("File System"),
-				    GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT |
-				    GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE,
-				    NULL);
-		}
-
-		g_free (uri);
 	} else {
-		return FALSE;
+		ret_value = FALSE;
 	}
+	
+	g_object_unref(file);
+	g_object_unref(file_info);
 
-	return TRUE;
+	return ret_value;
 }
 
 static void
@@ -346,28 +378,27 @@
 {
 	GList *volumes;
 	GList *item;
-	GnomeVFSVolume *volume;
+	GVolume *volume;
 	gboolean root = FALSE;
 
 	if (model->priv->volume_monitor == NULL) {
 		model->priv->volume_monitor =
-		    gnome_vfs_get_volume_monitor ();
+		    g_volume_monitor_get ();
 
 		/* Connect signals */
 		g_signal_connect (model->priv->volume_monitor,
-				  "volume-mounted",
+				  "mount-added",
 				  G_CALLBACK (on_volume_mounted), model);
 		g_signal_connect (model->priv->volume_monitor,
-				  "volume-unmounted",
+				  "mount-removed",
 				  G_CALLBACK (on_volume_unmounted), model);
 	}
 
-	volumes =
-	    gnome_vfs_volume_monitor_get_mounted_volumes (model->priv->
-							  volume_monitor);
+	process_volume (model, NULL, &root);
 
+	volumes = g_volume_monitor_get_volumes (model->priv->volume_monitor);
 	for (item = volumes; item; item = item->next) {
-		volume = GNOME_VFS_VOLUME (item->data);
+		volume = G_VOLUME(item->data);
 		process_volume (model, volume, &root);
 	}
 
@@ -378,6 +409,7 @@
 init_bookmarks (GeditFileBookmarksStore * model)
 {
 	gchar *bookmarks;
+	GFile *file = NULL;
 	GError *error = NULL;
 	gchar *contents;
 	gchar **lines;
@@ -396,24 +428,23 @@
 			if (**line) {
 				gchar *pos;
 				gchar *name;
-				gchar *unescape;
 
+
 				/* Check, is this really utf8? */
 				pos = g_utf8_strchr (*line, -1, ' ');
 
 				if (pos != NULL) {
 					*pos = '\0';
 					name = pos + 1;
+					file = g_file_new_for_uri(*line);
 				} else {
-					name = NULL;
+					file = g_file_new_for_uri(*line);
+					name = g_file_get_basename(file);
 				}
 
-				unescape = gnome_vfs_unescape_string (*line, "");
-
-				added = add_uri (model, unescape, name,
+				added = add_uri (model, file, name,
 						 GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
 						 NULL);
-				g_free (unescape);
 			}
 		}
 
@@ -421,12 +452,13 @@
 		g_free (contents);
 
 		/* Add a watch */
+		
 		if (model->priv->bookmarks_monitor == NULL) {
-			gnome_vfs_monitor_add (&model->priv->bookmarks_monitor,
-					       bookmarks,
-					       GNOME_VFS_MONITOR_FILE,
-					       (GnomeVFSMonitorCallback)on_bookmarks_file_changed, 
-					       model);
+			GFile *file=g_file_new_for_path(bookmarks);
+			model->priv->bookmarks_monitor = g_file_monitor_file (file,
+					       G_FILE_MONITOR_NONE,
+					       NULL);
+			g_object_unref(file);
 		}
 	} else {
 		/* The bookmarks file doesn't exist (which is perfectly fine) */
@@ -594,9 +626,10 @@
 			    GEDIT_FILE_BOOKMARKS_STORE_COLUMN_OBJECT, &obj,
 			    -1);
 
+#ifdef BROKEN /* we dont unref the objects because store will do that */
 	if (!(flags & GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR)) {
 		if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME) {
-			gnome_vfs_volume_unref (GNOME_VFS_VOLUME (obj));
+			g_object_unref (G_OBJECT (obj));
 
 			if (fromtree)
 				check_volume_separator
@@ -606,13 +639,17 @@
 				      GEDIT_FILE_BOOKMARKS_STORE_IS_MOUNT),
 				     FALSE);
 		} else if ((flags &
-			   GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR) ||
-			   (flags &
-			   GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK)) {
-			gnome_vfs_uri_unref ((GnomeVFSURI *) obj);
+			GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR) ||
+			(flags &
+			GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK)  ||
+			(flags &
+			   GEDIT_FILE_BOOKMARKS_STORE_IS_DRIVE)
+                          ) {
+			g_object_unref (obj);
 		}
+	
 	}
-
+#endif
 	if (fromtree)
 		gtk_tree_store_remove (GTK_TREE_STORE (model), iter);
 }
@@ -645,7 +682,7 @@
 	GType column_types[] = {
 		GDK_TYPE_PIXBUF,
 		G_TYPE_STRING,
-		G_TYPE_POINTER,
+		G_TYPE_OBJECT,
 		G_TYPE_UINT
 	};
 
@@ -666,7 +703,7 @@
 	return model;
 }
 
-gchar *
+GFile *
 gedit_file_bookmarks_store_get_uri (GeditFileBookmarksStore * model,
 				    GtkTreeIter * iter)
 {
@@ -687,16 +724,14 @@
 
 	if (!(flags & GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR)) {
 		if (flags & GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME) {
-			return
-			    gnome_vfs_volume_get_activation_uri
-			    (GNOME_VFS_VOLUME (obj));
+			return g_mount_get_root(g_volume_get_mount(obj));
 		} else
 		    if ((flags & GEDIT_FILE_BOOKMARKS_STORE_IS_SPECIAL_DIR)
 			|| (flags &
-			    GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK)) {
-			return gnome_vfs_uri_to_string ((GnomeVFSURI *)
-							obj,
-							GNOME_VFS_URI_HIDE_NONE);
+			    GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK)
+			|| (flags &
+			    GEDIT_FILE_BOOKMARKS_STORE_IS_ROOT)) {
+			return obj;
 		}
 	}
 
@@ -715,43 +750,44 @@
 
 /* Signal handlers */
 static void
-on_volume_mounted (GnomeVFSVolumeMonitor * monitor,
-		   GnomeVFSVolume * volume,
+on_volume_mounted (GVolumeMonitor * monitor,
+		   GMount * mount,
 		   GeditFileBookmarksStore * model)
 {
-	if (process_volume (model, volume, NULL))
-		gnome_vfs_volume_ref (volume);
+	process_volume (model, g_mount_get_volume(mount), NULL);
 }
 
 static void
-on_volume_unmounted (GnomeVFSVolumeMonitor * monitor,
-		     GnomeVFSVolume * volume,
+on_volume_unmounted (GVolumeMonitor * monitor,
+		     GMount * mount,
 		     GeditFileBookmarksStore * model)
 {
 	GtkTreeIter iter;
 
 	/* Find the volume and remove it */
-	if (find_with_flags (GTK_TREE_MODEL (model), &iter, volume,
+	if (find_with_flags (GTK_TREE_MODEL (model), &iter, g_mount_get_volume(mount),
 			     GEDIT_FILE_BOOKMARKS_STORE_IS_VOLUME,
 			     GEDIT_FILE_BOOKMARKS_STORE_IS_SEPARATOR))
 		remove_node (GTK_TREE_MODEL (model), &iter, TRUE);
 }
 
 static void
-on_bookmarks_file_changed (GnomeVFSMonitorHandle * handle,
-			   gchar const *monitor_uri, gchar const *info_uri,
-			   GnomeVFSMonitorEventType event_type,
-			   GeditFileBookmarksStore * model)
+on_bookmarks_file_changed (GFileMonitor * handle, 
+			GFile *file, 
+			GFile *other, 
+			gint event_type, 
+			GeditFileBookmarksStore * model)
+			   
 {
 	switch (event_type) {
-	case GNOME_VFS_MONITOR_EVENT_CHANGED:
-	case GNOME_VFS_MONITOR_EVENT_CREATED:
+	case G_FILE_MONITOR_EVENT_CHANGED:
+	case G_FILE_MONITOR_EVENT_CREATED:
 		remove_bookmarks (model);
 		init_bookmarks (model);
 		break;
-	case GNOME_VFS_MONITOR_EVENT_DELETED:
+	case G_FILE_MONITOR_EVENT_DELETED:
 		remove_bookmarks (model);
-		gnome_vfs_monitor_cancel (handle);
+		g_file_monitor_cancel (handle);
 		model->priv->bookmarks_monitor = NULL;
 		break;
 	default:
Index: gedit-file-browser-utils.h
===================================================================
--- gedit-file-browser-utils.h	(revision 6036)
+++ gedit-file-browser-utils.h	(working copy)
@@ -1,15 +1,16 @@
 #ifndef __GEDIT_FILE_BROWSER_UTILS_H__
 #define __GEDIT_FILE_BROWSER_UTILS_H__
-
+#include <gio/gio.h>
 #include <gedit/gedit-window.h>
 
 GdkPixbuf *gedit_file_browser_utils_pixbuf_from_theme     (gchar const *name,
                                                            GtkIconSize size);
 
-GdkPixbuf *gedit_file_browser_utils_pixbuf_from_mime_type (gchar const *uri,
-                                                           gchar const *mime,
+GdkPixbuf *gedit_file_browser_utils_pixbuf_from_file (GFile *uri,
                                                            GtkIconSize size);
-gchar * gedit_file_browser_utils_uri_basename             (gchar const * uri);
+GdkPixbuf *gedit_file_browser_utils_pixbuf_from_icon (GIcon *icon,
+                                                           GtkIconSize size);
+gchar * gedit_file_browser_utils_uri_basename             (GFile * uri);
 gboolean gedit_file_browser_utils_confirmation_dialog     (GeditWindow * window,
                                                            GtkMessageType type,
                                                            gchar const *message,
