Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c13
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,