aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/MozDownload.cpp
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
commitaf1c2ceaef7d949e36a7680f463c5e25f79c43d6 (patch)
tree19c94f1df613831ed8ab92b4ac904be0c20c673f /embed/mozilla/MozDownload.cpp
parent12d96e8a6fc9eddaffdbad58754e712af5fc5fef (diff)
downloadgsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.gz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.bz2
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.lz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.xz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.zst
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.zip
Drop gnome-vfs dependency. Now Epiphany depends on glib >= 2.15.1.
Also, optional Zeroconf support depends on Avahi >= 0.6.22. Bug #507152. svn path=/trunk/; revision=7858
Diffstat (limited to 'embed/mozilla/MozDownload.cpp')
-rw-r--r--embed/mozilla/MozDownload.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 254738f18..bdce1212f 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -47,6 +47,8 @@
#include <stdlib.h>
#include <glib/gi18n.h>
+#include <gio/gdesktopappinfo.h>
+#include <gio/gio.h>
#include <nsStringAPI.h>
@@ -351,7 +353,7 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest,
#ifdef HAVE_GECKO_1_9
return NS_OK;
#else
- GnomeVFSMimeApplication *helperApp;
+ GDesktopAppInfo *helperApp;
NS_ENSURE_TRUE (mMIMEInfo, NS_ERROR_FAILURE);
nsString description;
@@ -371,16 +373,22 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest,
char *end;
guint32 user_time = strtoul (str[1], &end, 0);
- helperApp = gnome_vfs_mime_application_new_from_desktop_id (str[2]);
+ helperApp = g_desktop_app_info_new (str[2]);
if (!helperApp) return NS_ERROR_FAILURE;
nsCString aDest;
rv = mDestination->GetSpec (aDest);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
+
+ GFile* file;
+ GList* list = NULL;
- ephy_file_launch_application (helperApp, destSpec.get (), user_time);
+ file = g_file_new_for_uri (destSpec.get ());
+ list = g_list_append (list, file);
+ ephy_file_launch_application (G_APP_INFO (helperApp), list, user_time, NULL);
- gnome_vfs_mime_application_free (helperApp);
+ g_list_free (list);
+ g_object_unref (file);
g_strfreev (str);
}
else if (g_str_has_prefix (cDesc.get(), "gnome-browse-to-file:"))