From 3a866c187db97a60aef67e0b420436bfd17be65c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 12 Feb 2004 00:10:03 +0000 Subject: When open is explicitly requested from the dialog use a tmp file. 2004-02-12 Marco Pesenti Gritti * embed/mozilla/ContentHandler.cpp: When open is explicitly requested from the dialog use a tmp file. --- embed/mozilla/ContentHandler.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'embed') 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; -- cgit v1.2.3