Index: plugins/profiler/gprof-profile-data.c
===================================================================
--- plugins/profiler/gprof-profile-data.c	(Revision 4453)
+++ plugins/profiler/gprof-profile-data.c	(Arbeitskopie)
@@ -21,8 +21,8 @@
  *            Boston,  MA  02110-1301, USA.
  */
 
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
 #include "gprof-profile-data.h"
+#include <gio/gio.h>
 
 struct _GProfProfileDataPriv
 {
@@ -110,28 +110,29 @@
 	FILE *stdout_stream;
 	gchar *program_dir;
 	gchar *profile_data_path;
-	gchar *profile_data_uri;
-	gchar *profile_data_mime_type;
-	gchar *path_uri;
 	GPtrArray *gprof_args;
-	gchar *target_mime_type;
 	gboolean is_libtool_target = FALSE;
 	GPid gprof_pid;
 	gint gprof_status;
 	
 	/* Determine target mime type */
-	path_uri = gnome_vfs_get_uri_from_local_path (path);
-	target_mime_type = gnome_vfs_get_mime_type (path_uri);
-	
-	if (target_mime_type)
+	GFile *file = g_file_new_for_path (path);
+	GFileInfo *fi = g_file_query_info (file,
+			G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+			G_FILE_QUERY_INFO_NONE,
+			NULL,
+			NULL);
+
+	if (fi)
 	{
-		if (strcmp (target_mime_type, "application/x-shellscript") == 0)
+		if (strcmp (g_file_info_get_content_type (fi), 
+					"application/x-shellscript") == 0)
 			is_libtool_target = TRUE;
 		
-		g_free (target_mime_type);
+		g_object_unref (fi);
 	}
 	
-	g_free (path_uri);
+	g_object_unref (file);
 	
 	/* If the user gave us a path to a data file, check the mime type to make
 	 * sure the user gave us an actual profile dump, or else we could hang 
@@ -139,18 +140,29 @@
 	 * memory until it sucks the system dry. */
 	if (alternate_profile_data_path)
 	{
-		profile_data_uri = gnome_vfs_get_uri_from_local_path (alternate_profile_data_path);
-		profile_data_mime_type = gnome_vfs_get_mime_type (profile_data_uri);
-		
-		if (strcmp (profile_data_mime_type, "application/x-profile") != 0)
+		file = g_file_new_for_path (alternate_profile_data_path);
+		fi = g_file_query_info (file,
+				G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+				G_FILE_QUERY_INFO_NONE,
+				NULL,
+				NULL);
+
+		if (fi == NULL)
 		{
-			g_free (profile_data_uri);
-			g_free (profile_data_mime_type);
+			g_object_unref (file);
 			return FALSE;
 		}
+
+		if (strcmp (g_file_info_get_content_type (fi),
+					"application/x-profile") != 0)
+		{
+			g_object_unref (fi);
+			g_object_unref (file);
+			return FALSE;
+		}
 		
-		g_free (profile_data_uri);
-		g_free (profile_data_mime_type);
+		g_object_unref (fi);
+		g_object_unref (file);
 	}
 	
 	
Index: plugins/profiler/plugin.c
===================================================================
--- plugins/profiler/plugin.c	(Revision 4453)
+++ plugins/profiler/plugin.c	(Arbeitskopie)
@@ -138,7 +138,8 @@
 	 {
 	 	if (!gprof_options_get_int (profiler->options, "automatic_refresh"))
 	 	{
-	 		gnome_vfs_monitor_cancel (profiler->profile_data_monitor);
+			g_file_monitor_cancel (profiler->profile_data_monitor);
+			g_object_unref (profiler->profile_data_monitor);
 	 		profiler->profile_data_monitor = NULL;
 	 	}
 	 }
@@ -191,27 +192,30 @@
 }
 
 static void
-on_profile_data_changed (GnomeVFSMonitorHandle *handle, 
-						 const gchar *monitor_uri, const gchar *info_uri,
-						 GnomeVFSMonitorEventType event,
-						 gpointer user_data)
+on_profile_data_changed (GFileMonitor *monitor,
+		GFile *file,
+		GFile *other_file,
+		GFileMonitorEvent event_type,
+		gpointer user_data)
 {
+	DEBUG_PRINT ("%s", "Data changed called");
 	Profiler *profiler;
-	
+
 	profiler = PROFILER (user_data);
-	
-	switch (event)
+
+	switch (event_type)
 	{
-		case GNOME_VFS_MONITOR_EVENT_CHANGED:
+		case G_FILE_MONITOR_EVENT_CHANGED:
 			if (profiler_get_data (profiler))
 				gprof_view_manager_refresh_views (profiler->view_manager);
 			break;
-		case GNOME_VFS_MONITOR_EVENT_DELETED:
-			gnome_vfs_monitor_cancel (handle);
+		case G_FILE_MONITOR_EVENT_DELETED:
+			g_file_monitor_cancel (monitor);
+			g_object_unref (profiler->profile_data_monitor);
 			profiler->profile_data_monitor = NULL;
 			break;
 		default:
-			break;			
+			break;
 	}
 }
 
@@ -223,6 +227,7 @@
 	gchar *profile_data_path;
 	gchar *profile_data_path_from_options;
 	gchar *profile_data_uri;
+	GFile *file;
 	
 	if (profiler->profile_target_path)
 	{
@@ -232,7 +237,7 @@
 	
 	if (profile_target_uri)
 	{
-		profile_target_path = gnome_vfs_get_local_path_from_uri (profile_target_uri);
+		profile_target_path = anjuta_util_get_local_path_from_uri (profile_target_uri);
 		
 		profile_data_path_from_options = gprof_options_get_string (profiler->options,
 																   "profile_data_file");
@@ -251,7 +256,9 @@
 		
 		g_free (profile_data_path_from_options);
 		
-		profile_data_uri = gnome_vfs_get_uri_from_local_path (profile_data_path);
+		file = g_file_new_for_path (profile_data_path);
+		profile_data_uri = g_file_get_uri (file);
+		g_object_unref (file);
 		
 		if (g_file_test (profile_data_path, G_FILE_TEST_EXISTS))
 		{
@@ -264,12 +271,13 @@
 			{
 				/* Cancel any existing monitor */
 				if (profiler->profile_data_monitor)
-					gnome_vfs_monitor_cancel (profiler->profile_data_monitor);
-				
-				gnome_vfs_monitor_add (&profiler->profile_data_monitor,
-									   profile_data_uri, GNOME_VFS_MONITOR_FILE,  
-									   on_profile_data_changed,
-									   (gpointer) profiler);
+					g_file_monitor_cancel (profiler->profile_data_monitor);
+				file = g_file_new_for_uri (profile_data_uri);
+				profiler->profile_data_monitor = 
+					g_file_monitor (file, G_FILE_MONITOR_NONE, NULL, NULL);
+				g_signal_connect (G_OBJECT (profiler->profile_data_monitor),
+						"changed", G_CALLBACK (on_profile_data_changed),
+						profiler);
 			}
 			
 			/* Show user the profiler views if they aren't visible so they
@@ -429,6 +437,7 @@
 	gchar *selected_target_uri;
 	GtkTreeSelection *selection;
 	GtkTreePath *new_target_path;
+	GFile *file;
 	
 	model = gtk_tree_view_get_model (targets_list_view);
 	target_chooser_dialog = gtk_file_chooser_dialog_new ("Select Target",
@@ -443,7 +452,10 @@
 	if (gtk_dialog_run (GTK_DIALOG (target_chooser_dialog)) == GTK_RESPONSE_ACCEPT)
 	{
 		selected_target_path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (target_chooser_dialog));
-		selected_target_uri = gnome_vfs_get_uri_from_local_path (selected_target_path);
+		file = g_file_new_for_path (selected_target_path);
+		selected_target_uri = g_file_get_uri (file);
+		g_object_unref (file);
+
 		selection = gtk_tree_view_get_selection (targets_list_view);
 		
 		gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -902,7 +914,7 @@
 	g_free (profiler->project_root_uri);
 	
 	if (profiler->profile_data_monitor)
-		gnome_vfs_monitor_cancel (profiler->profile_data_monitor);
+		g_file_monitor_cancel (profiler->profile_data_monitor);
 	
 	return TRUE;
 }
Index: plugins/profiler/plugin.h
===================================================================
--- plugins/profiler/plugin.h	(Revision 4453)
+++ plugins/profiler/plugin.h	(Arbeitskopie)
@@ -68,7 +68,7 @@
 	gint project_watch_id;
 	gchar *project_root_uri;
 	gchar *profile_target_path;
-	GnomeVFSMonitorHandle *profile_data_monitor;
+	GFileMonitor *profile_data_monitor;
 };
 
 struct _ProfilerClass
Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 4453)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,10 @@
+2008-12-18  Jens Georg  <mail@jensge.org>
+
+	* plugins/profiler/plugin.c: 
+	* plugins/profiler/plugin.h: 
+	* plugins/profiler/gprof-profile-data.c: 
+	#511589 – Anjuta uses GNOME-VFS
+
 2008-12-17  James Liggett  <jrliggett@cox.net>
 
 	* libanjuta/Makefile.am:
