summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-08-26 14:45:33 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-08-26 14:45:33 +0000
commit61decf67083304dba77ff8cd11890a86d4dedd05 (patch)
tree4f2c75a76bbd7370d305746556ffa25677a7a2a1 /perl-install/printerdrake.pm
parent3401c296c098633573ae9dfb0a4138f99e0e1cc4 (diff)
downloaddrakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar
drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.gz
drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.bz2
drakx-61decf67083304dba77ff8cd11890a86d4dedd05.tar.xz
drakx-61decf67083304dba77ff8cd11890a86d4dedd05.zip
Dialog for printing test pages: Unmark all test pages when "No test
pages" is marked. Accelerated printing of the photo test page when CUPS is the spooler, the internal image converter of CUPS is faster than ImageMagick.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm71
1 files changed, 66 insertions, 5 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index e53355fb5..c0bb78e65 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -2011,14 +2011,75 @@ sub print_testpages {
my $photo = 0;
my $ascii = 0;
my $res2 = 0;
+ my $oldstandard = 1;
+ my $oldaltletter = 0;
+ my $oldalta4 = 0;
+ my $oldphoto = 0;
+ my $oldascii = 0;
+ my $oldres2 = 0;
my $res1 = $in->ask_from_
({ title => _("Test pages"),
messages => _("Please select the test pages you want to print.
Note: the photo test page can take a rather long time to get printed and on laser printers with too low memory it can even not come out. In most cases it is enough to print the standard test page."),
- cancel => ((!$printer->{NEW}) ?
- _("Cancel") : ($::isWizard ? _("<- Previous") :
- _("No test pages"))),
- ok => ($::isWizard ? _("Next ->") : _("Print"))},
+ cancel => ((!$printer->{NEW}) ?
+ _("Cancel") : ($::isWizard ? _("<- Previous") :
+ _("No test pages"))),
+ ok => ($::isWizard ? _("Next ->") : _("Print")),
+ callbacks => {
+ changed => sub {
+ if ($oldres2 ne $res2) {
+ if ($res2) {
+ $standard = 0;
+ $altletter = 0;
+ $alta4 = 0;
+ $photo = 0;
+ $ascii = 0;
+ $oldstandard = 0;
+ $oldaltletter = 0;
+ $oldalta4 = 0;
+ $oldphoto = 0;
+ $oldascii = 0;
+ }
+ $oldres2 = $res2;
+ }
+ if ($oldstandard ne $standard) {
+ if ($standard) {
+ $res2 = 0;
+ $oldres2 = 0;
+ }
+ $oldstandard = $standard;
+ }
+ if ($oldaltletter ne $altletter) {
+ if ($altletter) {
+ $res2 = 0;
+ $oldres2 = 0;
+ }
+ $oldaltletter = $altletter;
+ }
+ if ($oldalta4 ne $alta4) {
+ if ($alta4) {
+ $res2 = 0;
+ $oldres2 = 0;
+ }
+ $oldalta4 = $alta4;
+ }
+ if ($oldphoto ne $photo) {
+ if ($photo) {
+ $res2 = 0;
+ $oldres2 = 0;
+ }
+ $oldphoto = $photo;
+ }
+ if ($oldascii ne $ascii) {
+ if ($ascii) {
+ $res2 = 0;
+ $oldres2 = 0;
+ }
+ $oldascii = $ascii;
+ }
+ return 0;
+ }
+ }},
[
{ text => _("Standard test page"), type => 'bool',
val => \$standard },
@@ -2050,7 +2111,7 @@ Note: the photo test page can take a rather long time to get printed and on lase
my $asciitestpage = "/usr/share/printer-testpages/testpage.asc";
my @testpages;
# Install the filter to convert the photo test page to PS
- if (($photo) && (!$::testing) &&
+ if (($printer->{SPOOLER} ne "cups") && ($photo) && (!$::testing) &&
(!printer::files_exist((qw(/usr/bin/convert))))) {
$in->do_pkgs->install('ImageMagick');
}