]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-print-operation.c
If the document is encrypted, the ev_document_factory_get_document() is
[evince.git] / shell / ev-print-operation.c
index 3723bd81183356d898ea43bb8ed3e186b97f2065..8498dceb7b1677cd0b6fc9e4235d15c876ebdc31 100644 (file)
@@ -1004,10 +1004,10 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
        if (!gtk_printer_accepts_ps (export->printer)) {
                gtk_widget_destroy (GTK_WIDGET (dialog));
                
        if (!gtk_printer_accepts_ps (export->printer)) {
                gtk_widget_destroy (GTK_WIDGET (dialog));
                
-               g_set_error (&export->error,
-                            GTK_PRINT_ERROR,
-                            GTK_PRINT_ERROR_GENERAL,
-                            "%s", _("Printing is not supported on this printer."));
+               g_set_error_literal (&export->error,
+                                     GTK_PRINT_ERROR,
+                                     GTK_PRINT_ERROR_GENERAL,
+                                     _("Printing is not supported on this printer."));
                g_signal_emit (op, signals[DONE], 0, GTK_PRINT_OPERATION_RESULT_ERROR);
                
                return;
                g_signal_emit (op, signals[DONE], 0, GTK_PRINT_OPERATION_RESULT_ERROR);
                
                return;
@@ -1072,7 +1072,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
                height *= scale;
        }
 
                height *= scale;
        }
 
-       export->pages_per_sheet = gtk_print_settings_get_number_up (print_settings);
+       export->pages_per_sheet = MAX (1, gtk_print_settings_get_number_up (print_settings));
        
        export->copies = gtk_print_settings_get_n_copies (print_settings);
        export->collate = gtk_print_settings_get_collate (print_settings);
        
        export->copies = gtk_print_settings_get_n_copies (print_settings);
        export->collate = gtk_print_settings_get_collate (print_settings);
@@ -1108,7 +1108,7 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
        export->fc.paper_width = width;
        export->fc.paper_height = height;
        export->fc.duplex = FALSE;
        export->fc.paper_width = width;
        export->fc.paper_height = height;
        export->fc.duplex = FALSE;
-       export->fc.pages_per_sheet = MAX (1, export->pages_per_sheet);
+       export->fc.pages_per_sheet = export->pages_per_sheet;
 
        if (ev_print_queue_is_empty (op->document))
                ev_print_operation_export_begin (export);
 
        if (ev_print_queue_is_empty (op->document))
                ev_print_operation_export_begin (export);