Index: gedit-utils.c
===================================================================
--- gedit-utils.c	(revision 6181)
+++ gedit-utils.c	(working copy)
@@ -944,7 +944,31 @@
 			  const gchar    *url,
 			  gpointer        data)
 {
-	gnome_vfs_url_show (url);
+	gchar **open;
+	gchar *program;
+	GPtrArray *array;
+
+	if (g_find_program_in_path ("xdg-open"))
+	{
+		program = g_strdup ("xdg-open");
+	}
+	else return;
+	
+	array = g_ptr_array_new ();
+	g_ptr_array_add (array, program);
+	g_ptr_array_add (array, g_strdup (url));
+	
+	open = (gchar **)g_ptr_array_free (array, FALSE);
+					
+	gdk_spawn_on_screen (gdk_screen_get_default (),
+			     NULL,
+			     open,
+			     NULL,
+			     G_SPAWN_SEARCH_PATH,
+			     NULL,
+			     NULL, NULL, NULL);
+					
+	g_strfreev (open);
 }
 
 static gboolean
@@ -1116,35 +1140,19 @@
 gedit_utils_make_canonical_uri_from_shell_arg (const gchar *str)
 {	
 	gchar *uri;
-	gchar *canonical_uri;
+	GFile  *file;
 
 	g_return_val_if_fail (str != NULL, NULL);
 	g_return_val_if_fail (*str != '\0', NULL);
-	
-	/* Note for the future: 
-	 *
-	 * <federico> paolo: and flame whoever tells 
-	 * you that file:///gnome/test_files/hëllò 
-	 * doesn't work --- that's not a valid URI
-	 *
-	 * <paolo> federico: well, another solution that 
-	 * does not requires patch to _from_shell_args 
-	 * is to check that the string returned by it 
-	 * contains only ASCII chars
-	 * <federico> paolo: hmmmm, isn't there 
-	 * gnome_vfs_is_uri_valid() or something?
-	 * <paolo>: I will use gedit_utils_is_valid_uri ()
-	 *
-	 */
 	 
-	uri = gnome_vfs_make_uri_from_shell_arg (str);
-	canonical_uri = gnome_vfs_make_uri_canonical (uri);
-	g_free (uri);
+	file = g_file_new_for_commandline_arg (str);
+	uri = g_file_get_uri (file);
+	g_object_unref (file);
 	
-	/* g_print ("URI: %s\n", canonical_uri); */
+	/* g_print ("URI: %s\n", uri); */
 	
-	if (gedit_utils_is_valid_uri (canonical_uri))
-		return canonical_uri;
+	if (gedit_utils_is_valid_uri (uri))
+		return uri;
 	
 	return NULL;
 }
