aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;