GNOME Bugzilla – Bug 758445
Print should be disabled if the backend doesn't support it
Last modified: 2015-11-27 14:59:42 UTC
I tried to press the print entry in the popup from the main menu, but nothing happened.
Yes, I have seen it too. It has also crashed on occasion.
Is that only in gnome-books, or in gnome-documents as well? Any error messages on the command-line, or a backtrace for that crash?
I don't get a crash in gnome-books, but this is the error I get: (org.gnome.Books:6643): EvinceView-CRITICAL **: ev_print_operation_new: assertion 'ev_print_operation_exists_for_document (document)' failed Gjs-Message: JS LOG: Unable to print document file:///home/andreasn/Documents/The%20Walking%20Dead%20141.cbr: TypeError: printOp is null In gnome-documents I get the print dialog, but I've managed to make it crash 2 times out of 5 when opening it, navigating to the same document and printing that. This is the error I get for that: (org.gnome.Documents:7146): EvinceView-CRITICAL **: ev_page_cache_get_form_field_mapping: assertion 'EV_IS_PAGE_CACHE (cache)' failed Segmentation fault (core dumped)
Right, two separate bugs then. (In reply to Andreas Nilsson from comment #3) > I don't get a crash in gnome-books, but this is the error I get: > > (org.gnome.Books:6643): EvinceView-CRITICAL **: ev_print_operation_new: > assertion 'ev_print_operation_exists_for_document (document)' failed > Gjs-Message: JS LOG: Unable to print document > file:///home/andreasn/Documents/The%20Walking%20Dead%20141.cbr: TypeError: > printOp is null The Print menu item should be disabled if the Evince backend can't print that type. Retitled the bug to that effect. > In gnome-documents I get the print dialog, but I've managed to make it crash > 2 times out of 5 when opening it, navigating to the same document and > printing that. This is the error I get for that: > > (org.gnome.Documents:7146): EvinceView-CRITICAL **: > ev_page_cache_get_form_field_mapping: assertion 'EV_IS_PAGE_CACHE (cache)' > failed > Segmentation fault (core dumped) Can you file a separate bug about that, with a full backtrace?
(In reply to Bastien Nocera from comment #4) > Can you file a separate bug about that, with a full backtrace? I've filed bug #758491 for that. Will need to figure out where to get the backtrace.
Created attachment 316174 [details] [review] application, documents, edit: Disable Print menu item when unsupported When we finish to load a document, verify whether it can be printed before enabling the "Print..." menu item.
Review of attachment 316174 [details] [review]: Looks good to me, thanks.
Attachment 316174 [details] pushed as 6edb419 - application, documents, edit: Disable Print menu item when unsupported
Created attachment 316228 [details] [review] [gnome-3-18] application, documents, edit: Disable Print menu item when unsupported This looks useful for older branches too. Since it needed a minor conflict resolution and I don't have any non-printable files at hand, can someone please rubber stamp it?
(In reply to Debarshi Ray from comment #9) > Created attachment 316228 [details] [review] [review] > [gnome-3-18] application, documents, edit: Disable Print menu item when > unsupported > > This looks useful for older branches too. Since it needed a minor conflict > resolution and I don't have any non-printable files at hand, can someone > please rubber stamp it? Launch gnome-books, and open a CBR or CBZ file. The comics backend of evince doesn't have print support.
(In reply to Debarshi Ray from comment #9) > Created attachment 316228 [details] [review] [review] > [gnome-3-18] application, documents, edit: Disable Print menu item when > unsupported > > This looks useful for older branches too. Since it needed a minor conflict > resolution and I don't have any non-printable files at hand, can someone > please rubber stamp it? I changed to 3-18 branch and applied this patch on top. Seems to work well enough. I can lend you a file that I bought via the humble bundle for testing if you want to give it a try yourself. I'll send it by mail tomorrow.
I found a website with some free samples after some searching. http://www.bitcartel.com/comicbooklover/samplecomics.html This Wasteland comic preview should do it: http://www.bitcartel.com/downloads/wasteland_issue1_preview.cbr