GNOME Bugzilla – Bug 320868
Doesn't tell user if it can't find gs
Last modified: 2006-02-13 06:54:57 UTC
If I'm foolish enough to try and view a PS file in Evince without installin Ghostscript, I get a message in the console and blank pages in the window. Evince should pop up a dialog telling me what the problem is instead.
It would be nice to do the check.
Created attachment 59201 [details] patch against cvs head with cvs diff up for #320868 Hello, as a gnome lover I have done this patch which should fix #320868. The postcript file is not opened if the gs file is not found. By the the gs path is checked at compile time, see #330913 Have a nice day.
Hey Antoine. First of all you are greatly welcome :) Really great that you have started to look at the problem. That was my fault that I haven't explained completely what should be done. Actually I was expected something different. It's a purely PS backend problem and it should be solved there. Although I am agree about run-time gs checking I am disagree on proposed way. Our document_load function can return errors in GError and this is the way you should use. Please look at backend/ev-document.c and in ps/ps-document.c on function ps_document_load. The error is returned there in some cases but not in particular case that is described in this bug. We need to check for gs presense in that function ps_document_load. If you can join #evince list we'll be happy to help and discuss this problem closer. P.S. Don't use comments like Bug #320868 : tell the user if can't find gs they don't fit in standard coding practice
Created attachment 59206 [details] [review] patch against cvs head with cvs diff up for #320868 Hello, Thank you for your time, Nickolay. With your help, this patch should be better.
Hello, I am sorry I did forget to say in my previous post that I didn't remove the macro for GS_PATH in configure.ac That macro should be removed. Goodbye
Antoine, thanks. Since there was an hour left before the string freeze we had to act quickly and commit patch. Otherwise we'll be managed to postpone it until April. But I had to modify your patch a bit. Main issues were: 1. Incorrect formatting, please follow the coding style of package you are working on 2. Memory leaks (you should free the string you get from g_find_program_in_path) You can checkout latest HEAD if you wanna look at this changes.