diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-08-25 15:55:07 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-08-25 15:55:07 (GMT) |
commit | a50e3f1032fe4e868c92668477aea37bb86052d6 (patch) | |
tree | 47134389e1f81c406894d11eb731ed60ebd8acbe /shell/ev-window.c | |
parent | aa5d60b07e188daa855d269e7e9b2da4388ed070 (diff) |
Adjust number of pages per row according to page orientation when printing
2007-08-25 Carlos Garcia Campos <carlosgc@gnome.org>
* backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_begin):
* libdocument/ev-file-exporter.[ch]:
(ev_file_exporter_get_capabilities):
* shell/ev-jobs.[ch]: (ev_job_print_new), (ev_job_print_run):
* shell/ev-window.c: (ev_window_print_dialog_response_cb):
Adjust number of pages per row according to page orientation when
printing 2 or 6 pages per sheet.
svn path=/trunk/; revision=2641
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index b390644..9700746 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -2332,6 +2332,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, gdouble width; gdouble height; GtkPrintPages print_pages; + EvFileExporterOrientation orientation; const gchar *file_format; if (response == GTK_RESPONSE_CANCEL) { @@ -2410,6 +2411,17 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, GTK_UNIT_PIXEL); height = gtk_page_setup_get_paper_height (window->priv->print_page_setup, GTK_UNIT_PIXEL); + + switch (gtk_page_setup_get_orientation (window->priv->print_page_setup)) { + case GTK_PAGE_ORIENTATION_PORTRAIT: + case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT: + orientation = EV_FILE_EXPORTER_PORTRAIT; + break; + case GTK_PAGE_ORIENTATION_LANDSCAPE: + case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE: + orientation = EV_FILE_EXPORTER_LANDSCAPE; + break; + } if (scale != 1.0) { width *= scale; @@ -2425,6 +2437,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog, window->priv->print_job = ev_job_print_new (window->priv->document, file_format ? file_format : "ps", width, height, + orientation, ranges, n_ranges, page_set, pages_per_sheet, |