summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/printer.pm7
-rw-r--r--perl-install/printerdrake.pm10
2 files changed, 10 insertions, 7 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index d7b0f5674..e9ce0c908 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -1035,8 +1035,10 @@ sub configure_queue($) {
}
# Make a new printer entry in the $printer structure
- $printer->{configured}{$printer->{currentqueue}{'queue'}}{'queuedata'}=
- $printer->{currentqueue};
+ $printer->{configured}{$printer->{currentqueue}{'queue'}}{'queuedata'} =
+ {};
+ copy_printer_params($printer->{currentqueue},
+ $printer->{configured}{$printer->{currentqueue}{'queue'}}{'queuedata'});
$printer->{configured}{$printer->{currentqueue}{'queue'}}{'args'} = {};
if ($printer->{currentqueue}{foomatic}) {
my $tmp = $printer->{OLD_QUEUE};
@@ -1049,7 +1051,6 @@ sub configure_queue($) {
read_cups_options($printer->{currentqueue}{'queue'});
}
# Clean up
- delete($printer->{currentqueue});
delete($printer->{ARGS});
$printer->{OLD_CHOICE} = "";
$printer->{ARGS} = {};
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index f51940e78..d913553a6 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -705,10 +705,10 @@ sub get_db_entry {
if ($printer->{configured}{$queue}{'queuedata'}{'foomatic'}) {
# The queue was configured with Foomatic
my $driverstr;
- if ($printer->{configured}{$queue}{'driver'} eq "Postscript") {
+ if ($printer->{configured}{$queue}{'queuedata'}{'driver'} eq "Postscript") {
$driverstr = "PostScript";
} else {
- $driverstr = "GhostScript + $printer->{configured}{$queue}{'driver'}";
+ $driverstr = "GhostScript + $printer->{configured}{$queue}{'queuedata'}{'driver'}";
}
my $make = uc($printer->{configured}{$queue}{'queuedata'}{'make'});
my $model = $printer->{configured}{$queue}{'queuedata'}{'model'};
@@ -766,7 +766,7 @@ sub get_db_entry {
$printer->{OLD_CHOICE} = "XXX";
}
} else {
- if (($::expert) && ($printer->{DBENTRY} !~ (recommended))) {
+ if (($::expert) && ($printer->{DBENTRY} !~ /(recommended)/)) {
my ($make, $model) = $printer->{DBENTRY} =~ /^([^\|]+)\|([^\|]+)\|/;
for my $key (keys %printer::thedb) {
if ($key =~ /^$make\|$model\|.*\(recommended\)$/) {
@@ -847,8 +847,10 @@ sub get_printer_info {
if ($printer->{PAPERSIZE}) {
$printer->{SPECIAL_OPTIONS} .=
" -o PageSize=$printer->{PAPERSIZE}";
- } elsif (($pagesize = $ENV{'LC_PAPER'}) ||
+ } elsif (($in->{lang}) ||
+ ($pagesize = $ENV{'LC_PAPER'}) ||
($pagesize = $ENV{'LANG'}) ||
+ ($pagesize = $ENV{'LANGUAGE'}) ||
($pagesize = $ENV{'LC_ALL'})) {
if (($pagesize eq 'en') || ($pagesize eq 'en_US')) {
$pagesize = "Letter";