GNOME Bugzilla – Bug 760826
Evince previewer shouldn't try to print to NULL printer
Last modified: 2018-05-22 16:28:25 UTC
When user clicks on print button in evince-previewer when it is called without specification of print settings file it shows warning that "The selected printer '(null)' could not be found". Maybe a better solution would be to make the print button insensitive if there is no print settings file specified. Would you accept a patch for this?
It makes sense.
*** Bug 763695 has been marked as a duplicate of this bug. ***
Created attachment 324595 [details] [review] previewer: set print button sensitivity according to print-settings
Actually, the idea was that when not settings file was given, the default printer was used. The problem in this case seems to be that there's no printers at all and we are not handling that case. So I think the right solution would be in ev_previewer_window_enumerate_finished when the printer is NULL, check if gtk_print_settings_get_printer is also NULL and in that case show a different message saying that default printer could not be found, or something like that. Or we could detect that situation to disable the print button, but that would require to enumerate printers at startup, even if you are not going to print at all, so I don't think it's worth it.
Note that the bug title is confusing, because evince doesn't try to print to NULL printer, that case is handled, it's only the error message what is wrong.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/645.