summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-02-01 04:34:00 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-02-01 04:34:00 +0000
commitc0a23db4a25851d7b09d822ed22d612210309619 (patch)
tree65fb2385e5f6281b09872fc3682ba87c066f942d /perl-install/printer/printerdrake.pm
parent5651b219037b68eaeb8d17cafd1061f55376136d (diff)
downloaddrakx-c0a23db4a25851d7b09d822ed22d612210309619.tar
drakx-c0a23db4a25851d7b09d822ed22d612210309619.tar.gz
drakx-c0a23db4a25851d7b09d822ed22d612210309619.tar.bz2
drakx-c0a23db4a25851d7b09d822ed22d612210309619.tar.xz
drakx-c0a23db4a25851d7b09d822ed22d612210309619.zip
- Completed support for pre-compiled Foomatic PPDs.
- Cleaning of mamufacturer names for menues and for comparing auto-dtected data against Foomatic centralized in one function. - Fixed file name in check for installed packages. - Fixed display of boolean options from native PostScript PPD files in the option setting dialog.
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r--perl-install/printer/printerdrake.pm27
1 files changed, 13 insertions, 14 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 56d214eb1..7f502dc1f 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -1650,26 +1650,24 @@ sub setup_common {
($_->{val}{MANUFACTURER}, $_->{val}{MODEL},
$_->{val}{DESCRIPTION}, $_->{val}{'COMMAND SET'},
$_->{val}{SKU});
+ # Clean some manufacturer's names
+ my $descrmake = printer::main::clean_manufacturer_name($automake);
if ($automake && $autosku) {
- $descr = "$automake|$autosku";
+ $descr = "$descrmake|$autosku";
} elsif ($automake && $automodel) {
- $descr = "$automake|$automodel";
+ $descr = "$descrmake|$automodel";
} else {
$descr = $autodescr;
$descr =~ s/ /\|/;
}
- $descr =~ s/^$automake\|\s*$automake\s*/$automake\|/;
+ # Remove manufacturer's name from the beginning of the
+ # description (do not do this with manufacturer names which
+ # contain odd characters)
+ $descr =~ s/^$descrmake\|\s*$descrmake\s*/$descrmake\|/i
+ if ($descrmake and
+ ($descrmake !~ /[\\\/\(\)\[\]\|\.\$\@\%\*\?]/));
# Clean up the description from noise which makes the best match
# difficult
- $descr =~ s/Seiko\s+Epson/Epson/i;
- $descr =~ s/Kyocera[\s\-]*Mita/Kyocera/i;
- $descr =~ s/\s+Inc\.//i;
- $descr =~ s/\s+Corp\.//i;
- $descr =~ s/\s+SA\.//i;
- $descr =~ s/\s+S\.\s*A\.//i;
- $descr =~ s/\s+Ltd\.//i;
- $descr =~ s/\s+International//i;
- $descr =~ s/\s+Int\.//i;
$descr =~ s/\s+[Ss]eries//i;
$descr =~ s/\s+\(?[Pp]rinter\)?$//i;
$printer->{DBENTRY} = "";
@@ -2340,9 +2338,10 @@ sub setup_options {
} elsif ($printer->{ARGS}[$i]{type} eq 'bool') {
# boolean option
push(@choicelists, [($printer->{ARGS}[$i]{comment_true} ||
- $printer->{ARGS}[$i]{name}),
+ $printer->{ARGS}[$i]{name} || "Yes"),
($printer->{ARGS}[$i]{comment_false} ||
- $printer->{ARGS}[$i]{name_false})]);
+ $printer->{ARGS}[$i]{name_false} ||
+ "No")]);
push(@shortchoicelists, []);
my $numdefault =
($optshortdefault =~ m!^\s*(true|on|yes|1)\s*$! ?