Index: epiphany-2.22.3/configure.ac
===================================================================
--- epiphany-2.22.3.orig/configure.ac	2008-09-14 15:47:15.000000000 +0100
+++ epiphany-2.22.3/configure.ac	2008-09-14 15:48:06.000000000 +0100
@@ -109,6 +109,7 @@
 LIBXML_REQUIRED=2.6.12
 LIBXSLT_REQUIRED=1.1.7
 LIBGLADE_REQUIRED=2.3.1
+LIBGNOMEVFS_REQUIRED=2.9.2
 LIBGNOME_REQUIRED=2.14.0
 LIBGNOMEUI_REQUIRED=2.14.0
 GNOME_DESKTOP_REQUIRED=2.9.91
@@ -135,6 +136,8 @@
 		  libgnome-2.0 >= $LIBGNOME_REQUIRED
 		  libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
 		  libglade-2.0 >= $LIBGLADE_REQUIRED \
+		  gnome-vfs-2.0 >= $LIBGNOMEVFS_REQUIRED
+		  gnome-vfs-module-2.0
 		  gconf-2.0
 		  gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED
 		  libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
Index: epiphany-2.22.3/embed/mozilla/ContentHandler.cpp
===================================================================
--- epiphany-2.22.3.orig/embed/mozilla/ContentHandler.cpp	2008-09-14 15:48:25.000000000 +0100
+++ epiphany-2.22.3/embed/mozilla/ContentHandler.cpp	2008-09-14 15:51:47.000000000 +0100
@@ -25,13 +25,14 @@
 #include "config.h"
 
 #include <glib/gi18n.h>
-#include <gio/gio.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkdialog.h>
 #include <gtk/gtkimage.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtkmessagedialog.h>
 #include <gtk/gtkstock.h>
+#include <libgnomevfs/gnome-vfs-mime.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
 
 #include <nsStringAPI.h>
 
@@ -258,7 +259,7 @@
 {
 	GtkWidget *dialog, *button, *image;
 	const char *action_label;
-	char *mime_description;
+	const char *mime_description;
 	nsCString file_name;
 			
 	nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_GetInterface (mContext);
@@ -268,12 +269,12 @@
 			(mAction == CONTENT_ACTION_OPEN_TMP) ?
 			GTK_STOCK_OPEN : STOCK_DOWNLOAD;
 
-	mime_description = g_content_type_get_description (mMimeType.get());
+	mime_description = gnome_vfs_mime_get_description (mMimeType.get());
 	if (mime_description == NULL)
 	{
 		/* Translators: The text before the "|" is context to help you decide on
 		 * the correct translation. You MUST OMIT it in the translated string. */
-		mime_description = g_strdup (Q_("File Type:|Unknown"));
+		mime_description = Q_("File Type:|Unknown");
 	}
 
 	/* We have one tiny, minor issue, the filename can be empty (""),
@@ -313,7 +314,7 @@
 			   Second %s is the file name,
 			   Third %s is the application used to open the file */
 			_("File Type: “%s”.\n\nYou can open “%s” using “%s” or save it."),
-			   mime_description, file_name.get(), g_app_info_get_name (mHelperApp));		 
+			   mime_description, file_name.get(), mHelperApp->name);		 
 	}
 	else
 	{
@@ -331,8 +332,6 @@
 			   mime_description, file_name.get());			 
 	}
 	
-	g_free (mime_description);
-	
 	button = gtk_button_new_with_label (_("_Save As..."));
 	image = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_BUTTON);
 	gtk_button_set_image (GTK_BUTTON (button), image);
@@ -373,7 +372,7 @@
 
 	auto_downloads = eel_gconf_get_boolean (CONF_AUTO_DOWNLOADS);
 
-	mHelperApp = g_app_info_get_default_for_type (mMimeType.get(), FALSE);
+	mHelperApp = gnome_vfs_mime_get_default_application (mMimeType.get());
 	mPermission = ephy_file_check_mime (mMimeType.get());
 
 	/* HACK! Check that this 'helper application' isn't Epiphany itself,
@@ -381,7 +380,7 @@
 	 */
 	if (mHelperApp)
 	{
-		const char *id = g_app_info_get_id (mHelperApp);
+		const char *id = gnome_vfs_mime_application_get_desktop_id (mHelperApp);
 
 		/* FIXME! menu editing can make this check fail!!!! */
 		if (id && strcmp (id, "epiphany.desktop") == 0)
@@ -435,7 +434,7 @@
 		g_return_val_if_fail (mHelperApp, NS_ERROR_FAILURE);
 
 		const char *id;
-		id = g_app_info_get_id (mHelperApp);
+		id = gnome_vfs_mime_application_get_desktop_id (mHelperApp);
 		
 		/* The current time is fine here as the user has just clicked
 		 * a button (it is used as the time for the application opening)
Index: epiphany-2.22.3/embed/mozilla/ContentHandler.h
===================================================================
--- epiphany-2.22.3.orig/embed/mozilla/ContentHandler.h	2008-09-14 15:48:25.000000000 +0100
+++ epiphany-2.22.3/embed/mozilla/ContentHandler.h	2008-09-14 15:51:16.000000000 +0100
@@ -22,7 +22,7 @@
 #ifndef CONTENT_HANDLER_H
 #define CONTENT_HANDLER_H
 
-#include <gio/gio.h>
+#include <libgnomevfs/gnome-vfs-mime-handlers.h>
 
 #include <nsCOMPtr.h>
 #include <nsIFile.h>
@@ -70,7 +70,7 @@
 	nsCOMPtr<nsIHelperAppLauncher> mLauncher;
 	nsCOMPtr<nsISupports> mContext;
 
-	GAppInfo *mHelperApp;
+	GnomeVFSMimeApplication *mHelperApp;
 	EphyMimePermission mPermission;
 
 	nsCString mUrl;
