After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697900 - When a file can't be opened, there is no way to know which file it is
When a file can't be opened, there is no way to know which file it is
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 682917 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-12 17:18 UTC by Pietro Battiston
Modified: 2013-05-21 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to show the uri on failed loadings (1.93 KB, patch)
2013-04-12 17:18 UTC, Pietro Battiston
committed Details | Review
Screenshot before and after the patch applied (52.10 KB, image/png)
2013-04-24 04:51 UTC, Germán Poo-Caamaño
  Details

Description Pietro Battiston 2013-04-12 17:18:43 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.
Comment 1 Germán Poo-Caamaño 2013-04-24 04:51:27 UTC
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.
Comment 2 Germán Poo-Caamaño 2013-04-24 04:57:59 UTC
*** Bug 682917 has been marked as a duplicate of this bug. ***
Comment 3 Carlos Garcia Campos 2013-05-21 17:39:44 UTC
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.