summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 23:33:03 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 23:33:03 +0000
commit60a03f6dd42238553aa7947c22a8d3b9384130d6 (patch)
tree4ca2d07c7a8a6e02cac8403e952edb4c5edf675b /perl-install/printerdrake.pm
parent500dd3b1a4981336166a6309bac878d476a3c52f (diff)
downloaddrakx-backup-do-not-use-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar
drakx-backup-do-not-use-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.gz
drakx-backup-do-not-use-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.bz2
drakx-backup-do-not-use-60a03f6dd42238553aa7947c22a8d3b9384130d6.tar.xz
drakx-backup-do-not-use-60a03f6dd42238553aa7947c22a8d3b9384130d6.zip
Different choosable test pages available now
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm42
1 files changed, 38 insertions, 4 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 903766afb..e511fc1f6 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -417,7 +417,6 @@ sub setup_gsdriver {
if ((keys %printer::thedb) == 0) {
printer::read_printer_db($printer->{SPOOLER});
}
- my $testpage = "/usr/share/printer-testpages/testprint.ps";
my $queue = $printer->{OLD_QUEUE};
$in->set_help('configurePrinterType') if $::isInstall;
while (1) {
@@ -655,14 +654,49 @@ sub setup_gsdriver {
$printer->{complete} = 1;
printer::configure_queue($printer);
$printer->{complete} = 0;
-
- if ($in->ask_yesorno('', __("Do you want to print a test page?"), 1)) {
+ # print test pages
+ my $standard = 1;
+ my $altletter = 0;
+ my $alta4 = 0;
+ my $photo = 0;
+ my $ascii = 0;
+ if ($in->ask_from_entries_refH_powered
+ ({ 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.
+In most cases it is enough to print the standard test page."),
+ cancel => __("No test pages"),
+ ok => __("Print")},
+[
+{ text => __("Standard test page"), type => 'bool', val => \$standard },
+{ text => __("Alternative test page (Letter)"), type => 'bool',
+ val => \$altletter },
+{ text => __("Alternative test page (A4)"), type => 'bool', val => \$alta4 },
+{ text => __("Photo test page"), type => 'bool', val => \$photo },
+{ text => __("Plain text test page"), type => 'bool', val => \$ascii }
+])) {
+# if ($in->ask_yesorno('', __("Do you want to print a test page?"), 1)) {
my @lpq_output;
{
my $w = $in->wait_message('', _("Printing test page(s)..."));
$upNetwork and do { &$upNetwork(); undef $upNetwork; sleep(1) };
- @lpq_output = printer::print_pages($printer, $testpage);
+ my $stdtestpage = "/usr/share/printer-testpages/testprint.ps";
+ my $altlttestpage = "/usr/share/printer-testpages/testpage.ps";
+ my $alta4testpage = "/usr/share/printer-testpages/testpage-a4.ps";
+ my $phototestpage = "/usr/share/printer-testpages/photo-testpage.jpg";
+ my $asciitestpage = "/usr/share/printer-testpages/testpage.asc";
+ my @testpages;
+ # Install the filter to convert the photo test page to PS
+ $photo && $in->do_pkgs->install('ImageMagick');
+ # set up list of pages to print
+ $standard && push (@testpages, $stdtestpage);
+ $altletter && push (@testpages, $altlttestpage);
+ $alta4 && push (@testpages, $alta4testpage);
+ $photo && push (@testpages, $phototestpage);
+ $ascii && push (@testpages, $asciitestpage);
+ # print the stuff
+ @lpq_output = printer::print_pages($printer, @testpages);
}
if (@lpq_output) {