diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-19 15:44:45 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2002-02-19 15:44:45 +0000 |
commit | 98e2833b08e13cc9a6d0169caf0a3910b3dba126 (patch) | |
tree | 88c181579182f512cecee4e54dc323bb67e1a3cd /perl-install | |
parent | dd6914e04f8a195fc69e615f69a9076d235e2efc (diff) | |
download | drakx-backup-do-not-use-98e2833b08e13cc9a6d0169caf0a3910b3dba126.tar drakx-backup-do-not-use-98e2833b08e13cc9a6d0169caf0a3910b3dba126.tar.gz drakx-backup-do-not-use-98e2833b08e13cc9a6d0169caf0a3910b3dba126.tar.bz2 drakx-backup-do-not-use-98e2833b08e13cc9a6d0169caf0a3910b3dba126.tar.xz drakx-backup-do-not-use-98e2833b08e13cc9a6d0169caf0a3910b3dba126.zip |
Assured that the default page size is "Letter" for US/Canada and "A4" for the rest of the world.
The "Description" field of a printer queue is filled in with printer manufacturer and model by default.
Removed unused varaiables in /usr/sbin/printerdrake.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printer.pm | 2 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 14 | ||||
-rwxr-xr-x | perl-install/standalone/printerdrake | 3 |
3 files changed, 11 insertions, 8 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 6985a4ddd..70ed8a6ea 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -864,7 +864,7 @@ sub get_cups_remote_queues { ($::expert ? _("CUPS") . $sep : "") . _("Remote Printers") . "$sep$queuename: $comment" . ($queuename eq $printer->{DEFAULT} ? - _(" (Default)") : ())); + _(" (Default)") : (""))); } } } diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index e7483cffe..e735e3a78 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -584,9 +584,10 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 } #- Search the database entry which matches the detected printer best + my $descr = ""; foreach (@parport) { $device eq $_->{port} or next; - my $descr = $_->{val}{DESCRIPTION}; + $descr = $_->{val}{DESCRIPTION}; # Clean up the description from noise which makes the best match # difficult $descr =~ s/\s+Inc\.//; @@ -609,6 +610,9 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1 ($descr !~ /Hewlett[\s-]+Packard/i))) {$printer->{DBENTRY} = ""}; } + if ((!$printer->{currentqueue}{'desc'}) && ($descr)) { + $printer->{currentqueue}{'desc'} = $descr; + } 1; } @@ -1165,12 +1169,14 @@ sub get_printer_info { if ($printer->{PAPERSIZE}) { $printer->{SPECIAL_OPTIONS} .= " -o PageSize=$printer->{PAPERSIZE}"; - } elsif (($in->{lang}) || + } elsif (($pagesize = $in->{lang}) || ($pagesize = $ENV{'LC_PAPER'}) || ($pagesize = $ENV{'LANG'}) || ($pagesize = $ENV{'LANGUAGE'}) || ($pagesize = $ENV{'LC_ALL'})) { - if (($pagesize eq 'en') || ($pagesize eq 'en_US')) { + if (($pagesize =~ /^en_CA/) || + ($pagesize =~ /^fr_CA/) || + ($pagesize =~ /^en_US/)) { $pagesize = "Letter"; } else { $pagesize = "A4"; @@ -2329,7 +2335,7 @@ sub main { my @printerlist = ( (sort((map {$printer->{configured}{$_}{'queuedata'}{'menuentry'} . ($_ eq $printer->{DEFAULT} ? - _(" (Default)") : ())} + _(" (Default)") : (""))} keys(%{$printer->{configured} || {}})), ($printer->{SPOOLER} eq "cups" ? diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index 5e0d16408..501119148 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -32,11 +32,8 @@ local $_ = join '', @ARGV; /-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing] [--cups] [--lprng] [--lpd] [--pdq]\n"; -$::beginner = /-beginner/; $::expert = /-expert/; -$::auto = /-auto/; $::noauto = /-noauto/; -$::skiptest = /-skiptest/; $::testing = /-testing/; my $printer; |