Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJohan Brannlund <gnome-bugs@nullinfinity.org>2009-06-25 12:41:00 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-06-25 12:41:00 (GMT)
commit2eedce4d1c281bde50edf87ec00821c1d10bd751 (patch)
tree6bf735be0e9ef26f8af3113187eaeb30181cad8d /shell
parent85d3d47018f06c2b0c1391ade43be626acb2c021 (diff)
[printing] Make evince output pdf on supported printers
Fixes bgo#585442.
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-print-operation.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c
index 1821d4f..b115887 100644
--- a/shell/ev-print-operation.c
+++ b/shell/ev-print-operation.c
@@ -1187,8 +1187,13 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial
get_first_and_last_page (export, &first_page, &last_page);
- export->fc.format = file_format && g_ascii_strcasecmp (file_format, "pdf") == 0 ?
- EV_FILE_FORMAT_PDF : EV_FILE_FORMAT_PS;
+ if (file_format) {
+ export->fc.format = g_ascii_strcasecmp (file_format, "pdf") == 0 ?
+ EV_FILE_FORMAT_PDF : EV_FILE_FORMAT_PS;
+ } else {
+ export->fc.format = gtk_printer_accepts_pdf (printer) ?
+ EV_FILE_FORMAT_PDF : EV_FILE_FORMAT_PS;
+ }
export->fc.filename = export->temp_file;
export->fc.first_page = MIN (first_page, last_page);
export->fc.last_page = MAX (first_page, last_page);