From 510dc2f81c7d5da00ae321c4f87fe74bc7873e0d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 6 Nov 2003 10:36:39 +0000 Subject: Correct download dir default. 2003-11-06 Marco Pesenti Gritti * data/epiphany.schemas.in: Correct download dir default. * embed/ephy-embed-shell.h: * embed/ephy-embed-shell.c: (ephy_embed_shell_init), (ephy_embed_shell_finalize), (ephy_embed_shell_get_encodings), (load_mime_from_xml), (ephy_embed_shell_check_mime): Add check_mime api for permissions. * embed/mozilla/ContentHandler.cpp: First incomplete try at using it. --- embed/mozilla/ContentHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'embed/mozilla/ContentHandler.cpp') diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 17c6685c3..742db0319 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -35,6 +35,7 @@ #include "ephy-prefs.h" #include "eel-gconf-extensions.h" +#include "ephy-embed-shell.h" #include #include @@ -342,11 +343,16 @@ NS_METHOD GContentHandler::MIMEAskAction (void) nsresult rv; gboolean auto_open; + /* FIXME can we assume mime is not NULL ? */ + auto_open = eel_gconf_get_boolean (CONF_AUTO_OPEN_DOWNLOADS); GContentHandler *mContentHandler = this; GnomeVFSMimeApplication *DefaultApp = gnome_vfs_mime_get_default_application(mMimeType); + + EphyMimePermission permission; + permission = ephy_embed_shell_check_mime (embed_shell, mMimeType); - if (!auto_open || !DefaultApp) + if (!auto_open || !DefaultApp || permission != EPHY_MIME_PERMISSION_SAFE) { nsCOMPtr launcher; -- cgit v1.2.3