aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-12 08:10:03 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-12 08:10:03 +0800
commit3a866c187db97a60aef67e0b420436bfd17be65c (patch)
tree31884df31abea147002baa01fe77a085a27c2182 /embed
parentebb01a50ff84bce9e94afb660a9ee71a5750d682 (diff)
downloadgsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar.gz
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar.bz2
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar.lz
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar.xz
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.tar.zst
gsoc2013-epiphany-3a866c187db97a60aef67e0b420436bfd17be65c.zip
When open is explicitly requested from the dialog use a tmp file.
2004-02-12 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/ContentHandler.cpp: When open is explicitly requested from the dialog use a tmp file.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/ContentHandler.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index c2690268c..cdf844c9b 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -368,7 +368,7 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
mLauncher->GetMIMEInfo(getter_AddRefs(mimeInfo));
NS_ENSURE_TRUE (mimeInfo, NS_ERROR_FAILURE);
- if (mAction == CONTENT_ACTION_OPEN)
+ if (mAction == CONTENT_ACTION_OPEN && auto_downloads)
{
/* HACK we use the application description to ask
MozDownload to open the file when download
@@ -381,9 +381,20 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
mimeInfo->SetApplicationDescription (nsnull);
}
- if (mAction == CONTENT_ACTION_OPEN && mAppSupportScheme)
+ if (mAction == CONTENT_ACTION_OPEN)
{
- LaunchHelperApp ();
+ if (mAppSupportScheme)
+ {
+ LaunchHelperApp ();
+ }
+ else if (auto_downloads)
+ {
+ mLauncher->SaveToDisk (nsnull, PR_FALSE);
+ }
+ else
+ {
+ mLauncher->LaunchWithApplication (nsnull, PR_FALSE);
+ }
}
else if (mAction == CONTENT_ACTION_NONE)
{
@@ -391,7 +402,7 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
}
else
{
- mLauncher->SaveToDisk (nsnull,PR_FALSE);
+ mLauncher->SaveToDisk (nsnull, PR_FALSE);
}
return NS_OK;