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:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-07-29 14:15:17 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-07-29 14:15:17 (GMT)
commit85fa11d86616d3a9c5a5cfeba78dd7aa72e7997a (patch)
treec8641298dbaafcb9c5440ed0fa7d0cbc9ed37b92 /shell/ev-window.c
parent5f6b1add282b53fc4544d79e9a6fb635c6754058 (diff)
Allow printing multiple pages per sheet. Fixes bug #395573.
2007-07-29 Carlos Garcia Campos <carlosgc@gnome.org> * configure.ac: * backend/pdf/ev-poppler.cc: (pdf_print_context_free), (pdf_document_file_exporter_begin), (pdf_document_file_exporter_do_page), (pdf_document_file_exporter_get_capabilities): * libdocument/ev-file-exporter.h: * shell/ev-jobs.[ch]: (ev_job_print_new), (ev_job_print_run): * shell/ev-window.c: (ev_window_print_send), (ev_window_print_dialog_response_cb): Allow printing multiple pages per sheet. Fixes bug #395573. svn path=/trunk/; revision=2591
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 7f928a5..233067b 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -2220,6 +2220,8 @@ ev_window_print_send (EvWindow *window,
gtk_print_settings_set_collate (settings, FALSE);
if (capabilities & EV_FILE_EXPORTER_CAN_REVERSE)
gtk_print_settings_set_reverse (settings, FALSE);
+ if (capabilities & EV_FILE_EXPORTER_CAN_NUMBER_UP)
+ gtk_print_settings_set_number_up (settings, 1);
if (window->priv->print_preview) {
gchar *uri;
@@ -2294,6 +2296,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog,
EvPrintPageSet page_set;
gint n_ranges = 0;
gint copies;
+ gint pages_per_sheet;
gboolean collate;
gboolean reverse;
gdouble scale;
@@ -2385,6 +2388,8 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog,
height *= scale;
}
+ pages_per_sheet = gtk_print_settings_get_number_up (window->priv->print_settings);
+
copies = gtk_print_settings_get_n_copies (window->priv->print_settings);
collate = gtk_print_settings_get_collate (window->priv->print_settings);
reverse = gtk_print_settings_get_reverse (window->priv->print_settings);
@@ -2394,6 +2399,7 @@ ev_window_print_dialog_response_cb (GtkDialog *dialog,
width, height,
ranges, n_ranges,
page_set,
+ pages_per_sheet,
copies, collate,
reverse);