aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/ContentHandler.cpp19
2 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fe86c6ac..d23b9bed1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2004-02-11 Chris Lahey <clahey@rigger.boston.ximian.com>
* embed/downloader-view.c: Added timeout so that dialog won't
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;