GNOME Bugzilla – Bug 697900
When a file can't be opened, there is no way to know which file it is
Last modified: 2013-05-21 17:39:56 UTC
Created attachment 241373 [details] [review] Patch to show the uri on failed loadings Case 1): i) I download a pdf from the web, it is saved in "/tmp/something.pdf". I open it with evince. ib) (optional:) I save a copy in a different folder ii) I shutdown my computer iii) when I restart it, since my session is configured in order to reopen everything which was open, I get an evince window only showing an error: "Unable to open document". There are two problems with that: - I _had_ saved my document outside /tmp, so I would expect that copy to open up after restart - in any case, I want to know which is the problematic uri - once I identify which document it was, it will be easier for me to reopen the copy I saved Case 2): i) I'm working on a script which, among other things, creates some pdf files and opens them with evince to view them. ii) Something is wrong in my code, and I only get an evince window with the error: "Unable to open document". I have no clue of _where_ the error was. This bug is annoying, in particular for Case 1): it often happens to me to download several papers in a single session, and after restart to get a lot of windows showing an error message which doesn't help me resuming my work. Solution: together with the error message, show the user the problematic uri. That's what the attached patch does. It applies fine on trunk, though I only tested it with evince 3.4.0. Complementary, and a bit more invasive, solution: transform the "Save a copy" command in "Save as", and make it behave accordingly. I see no reason for having only the former - but I may be missing something, and in particular some discussions. By the way, of the three hunks of the patch, the first two solve the problem I'm referring to, the third does no harm and avoids to have two strings instead of one. The patch is against git trunk but was tested (and works perfectly) only against 3.4.0.
Created attachment 242306 [details] Screenshot before and after the patch applied I have seen myself in similar situation (usually when a file name is repeated in the recent files menu and I can not distinguish them). The screenshot shows the change before and after.
*** Bug 682917 has been marked as a duplicate of this bug. ***
Review of attachment 241373 [details] [review]: Thanks for the patch and sorry for the delay reviewing it. I've just pushed it to git master.