+2006-02-18 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * shell/ev-print-job.c: (idle_print_handler):
+
+ Inverse order printing, bug #320919.
+
2006-02-17 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* data/evince-toolbar.xml:
gboolean printing;
int next_page;
int copies_done;
+ int shift;
};
struct _EvPrintJobClass {
ev_document_doc_mutex_lock ();
ev_ps_exporter_begin (
EV_PS_EXPORTER (job->document),
- job->temp_file, job->first_page, job->last_page,
+ job->temp_file,
+ MIN (job->first_page, job->last_page),
+ MAX (job->first_page, job->last_page),
job->width, job->height, job->duplex);
ev_document_doc_mutex_unlock ();
job->next_page = job->first_page;
+ job->shift = (job->first_page > job->last_page) ? -1 : 1;
job->printing = TRUE;
return TRUE;
}
-
- if (job->next_page <= job->last_page) {
+
+ if ((job->next_page - job->last_page) * job->shift <= 0) {
EvRenderContext *rc;
#if 0
g_printerr ("Printing page %d\n", job->next_page);
/* collate must repeat the same page */
job->copies_done++;
if(job->copies == job->copies_done) {
- job->next_page++;
+ job->next_page += job->shift;
job->copies_done = 0;
}
} else {
- job->next_page++;
- if (job->next_page > job->last_page){
+ job->next_page += job->shift;
+ if ((job->next_page - job->last_page) * job->shift > 0){
job->copies_done++;
if(job->copies_done < job->copies) {
/* more copies to go, restart to the first page */