GNOME Bugzilla – Bug 513837
downloaded pdf files are not automatically opened
Last modified: 2009-01-18 10:01:59 UTC
Please describe the problem: Epiphany used to open downloaded files automatically (when that option was enabled). Now it does not do that. Steps to reproduce: 1. Try to click on a link to a pdf file. Actual results: The downloaded file just sits on downloads folder. Expected results: The file would be opened in evince. Does this happen every time? Yes. Other information:
Automatic PDF opening work great here with SVN trunk. Which version of Epiphany, GLib and Evince are you using? Are you sure Evince on its own does work properly?
Then this may be a fault in Ubuntu. It's also reported in launchpad: https://bugs.launchpad.net/epiphany-browser/+bug/181128 I am using Epiphany 2.21.90, Glib 2.15.4 and Evince 2.21.90. From the Ubuntu bug, this version of Epiphany uses xulrunner.
Naturally. This is because the code in MozDownload.cpp is #ifndef HAVE_GECKO_1_9 since it's not ported to 1.9 yet.
@chpe, I presume you meant to target 2.22?
Yes.
I am wondering when this will be fixed. The about dialog tells me that I am using Epiphany version 2.22.0 powered by gecko 1.9.
Fixed in svn trunk.
So this fix was implemented after the the GNOME 2.22.0 release? Does that mean we will see the fix included in the GNOME 2.22.1 release due 9 April?
@chpe, it looks like this was committed to trunk only while this bug is targeted for 2.22. Compare: http://svn.gnome.org/viewvc/epiphany/trunk/embed/mozilla/MozDownload.cpp?view=log http://svn.gnome.org/viewvc/epiphany/branches/gnome-2-22/embed/mozilla/MozDownload.cpp?view=log
Hmm, I'm now running 2.22.1.1 and this problem still exists.
Got a test URL ?
Edit > Preferences > General > Check "Automatically open downloaded files" Click: http://web.vee.net/tmp/test.pdf The file gets downloaded and saved, but not opened in Evince. This is on Ubuntu Hardy: epiphany-browser 2.22.1.1-0ubuntu1 epiphany-gecko 2.22.1.1-0ubuntu1 epiphany-extensions 2.22.0-0ubuntu1 xulrunner-1.9 1.9~b5+nobinonly-0ubuntu1 xulrunner-1.9-gnome-support 1.9~b5+nobinonly-0ubuntu1
Works here, using 2.22.1.1 with xulrunner trunk.
Hmm actually no it doesn't work, reopening.
I can confirm that it does not work. I am using epiphany-browser 2.22.1.1-0ubuntu1 on the latest Hardy update.
Fixed in svn.
I attempted to backport your fixes, and whilst it nolonger downloads silently without prompting, it instead offers the SaveAs / Open dialog as would be found with the auto-open feature turned off. Is this expected, or did I mess up with the patch backport?
(Please forgive my newb ignorance in all matters epiphany / gecko) I found that adding the following diff helps: --- epiphany-browser-2.22.1.1.orig/embed/mozilla/ContentHandler.cpp»2008-04-16 19:24:54.000000000 +0100 +++ epiphany-browser-2.22.1.1/embed/mozilla/ContentHandler.cpp»·2008-04-16 19:28:07.000000000 +0100 @@ -394,7 +402,7 @@ »»·mAction = auto_downloads ? CONTENT_ACTION_DOWNLOAD : CONTENT_ACTION_NONE; »»·MIMEConfirmAction (); »} -»else if (mAction == CONTENT_ACTION_OPEN_TMP) +»else if (mAction == CONTENT_ACTION_OPEN_TMP && !auto_downloads) »{ »»·MIMEConfirmAction (); »} (Leading on the the final else, where it calls MIMEDoAction ();) Why do we need CONTENT_ACTION_OPEN_TMP rather than CONTENT_ACTION_OPEN to make the open in evince etc.. work with Gecko 1.9? Circa line 465 of ContentHandler.cpp, we have: if (mAction == CONTENT_ACTION_OPEN) { mLauncher->SaveToDisk (nsnull, PR_FALSE); } else if (mAction == CONTENT_ACTION_OPEN_TMP) { mLauncher->LaunchWithApplication (nsnull, PR_FALSE); } else if (mAction == CONTENT_ACTION_NONE) { mLauncher->Cancel (NS_BINDING_ABORTED); } else { mLauncher->SaveToDisk (nsnull, PR_FALSE); } Is it right that its calling mLauncher->SaveToDisk (nsnull, PR_FALSE) for the CONTENT_ACTION_OPEN ?