Index: plugins/valgrind/vgdefaultview.c
===================================================================
--- plugins/valgrind/vgdefaultview.c	(Revision 4452)
+++ plugins/valgrind/vgdefaultview.c	(Arbeitskopie)
@@ -38,7 +38,6 @@
 
 #include <gconf/gconf-client.h>
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs.h>
 #include <libanjuta/anjuta-debug.h>
 #include <libanjuta/interfaces/ianjuta-document-manager.h>
 
@@ -621,26 +620,42 @@
 	VgDefaultView *view = VG_DEFAULT_VIEW (tool);
 	VgError *err;
 	GString *str;
+	GFile *file;
+	GFileOutputStream *file_output_stream;
 	
 	int i;
-	GnomeVFSHandle* handle;
 	
 	if (uri == NULL) 
 		return -1;
 		
+	file = g_file_new_for_uri (uri);
+	file_output_stream  = g_file_replace (file,
+			NULL,  /* no etag */
+			FALSE, /* no backup */
+			G_FILE_CREATE_NONE,
+			NULL,
+			NULL);
+	g_object_unref (file);
+
 	/* Create file */
-	if (gnome_vfs_create (&handle, uri, GNOME_VFS_OPEN_WRITE, FALSE, 0664) != GNOME_VFS_OK)	{
+	if (file_output_stream == NULL)	{
 		return -1;
 	}
 		
 	str = g_string_new ("");
 	
 	for (i = 0; i < view->errors->len; i++) {
-		GnomeVFSFileSize written;
+		gsize written;
 		err = view->errors->pdata[i];
 		vg_error_to_string (err, str);
 
-		if (gnome_vfs_write (handle, str->str, str->len, &written) != GNOME_VFS_OK) {
+		written = g_output_stream_write (
+				G_OUTPUT_STREAM(file_output_stream),
+				str->str,
+				str->len,
+				NULL,
+				NULL);
+		if (written == -1) {
 			g_string_free (str, TRUE);
 			return -1;
 		}
@@ -648,9 +663,9 @@
 	}
 	
 	g_string_free (str, TRUE);
+	g_output_stream_close (G_OUTPUT_STREAM(file_output_stream), 
+			NULL, NULL);
 
-	gnome_vfs_close (handle);	
-
 	return 0;
 }
 
@@ -669,7 +684,7 @@
 	int fd;
 	gchar *filename;
 
-	filename = gnome_vfs_get_local_path_from_uri (uri);
+	filename = anjuta_util_get_local_path_from_uri (uri);
 	
 	if ((fd = open (filename, O_RDONLY)) != -1) {
 		vg_tool_view_connect (tool, fd);
Index: plugins/valgrind/plugin.c
===================================================================
--- plugins/valgrind/plugin.c	(Revision 4452)
+++ plugins/valgrind/plugin.c	(Arbeitskopie)
@@ -22,9 +22,7 @@
  */
 
 #include <config.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs.h>
 #include <libgnome/gnome-util.h>
 #include <libgnomeui/gnome-about.h>
 #include <libanjuta/anjuta-shell.h>
@@ -79,7 +77,7 @@
 	
 	if (root_uri)
 	{
-		gchar *root_dir = gnome_vfs_get_local_path_from_uri (root_uri);
+		gchar *root_dir = anjuta_util_get_local_path_from_uri (root_uri);
 		if (root_dir)
 			val_plugin->project_root_uri = g_strdup(root_dir);
 		else
@@ -279,8 +277,11 @@
 			gchar *program_dir;
 			SymTab *symtab;
 			VgToolView *vg_tool_view;
+			GFile *file;
 
-			prgname = gnome_vfs_format_uri_for_display (sel_target);
+			file = g_file_new_for_uri (sel_target);
+			prgname = g_file_get_parse_name (file);
+			g_object_unref (file);
 			DEBUG_PRINT ("target program selected is %s", prgname);			
 			
 			/* lets set some infos */
@@ -348,7 +349,7 @@
 {
 	GtkWidget *dialog;
 	gchar* uri = NULL;
-	GnomeVFSURI* vfs_uri;
+	GFile* file;
 	
 	dialog = gtk_file_chooser_dialog_new (_("Choose file where to save Valgrind log"),
 					NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_SAVE, 
@@ -364,8 +365,8 @@
 
 	gtk_widget_destroy(dialog);
 
-	vfs_uri = gnome_vfs_uri_new(uri);
-	if (gnome_vfs_uri_exists (vfs_uri))
+	file = g_file_new_for_uri (uri);
+	if (g_file_query_exists (file, NULL))
 	{
 		GtkWidget *dialog;
 		dialog = gtk_message_dialog_new (NULL,
@@ -392,7 +393,7 @@
 	}
 
 	g_free (uri);
-	g_free (vfs_uri);
+	g_object_unref (file);
 }
 
 static void
Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 4452)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,9 @@
+2008-12-17  Jens Georg  <mail@jensge.org>
+
+	* plugins/valgrind/plugin.c: 
+	* plugins/valgrind/vgdefaultview.c: 
+	#511589 – Anjuta uses GNOME-VFS
+
 2008-12-14  Sébastien Granjoux  <seb.sfo@free.fr>
 
 	* plugins/file-loader/plugin.c:

