summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-09-14 18:32:10 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-09-14 18:32:10 +0000
commitde03857088abc1bf0a1db01516ee24bd18207414 (patch)
tree95704eac3fad589532c57e7ca98301024628588d /perl-install/printerdrake.pm
parent997bab50fb1cc78f013679b14cebcc143035e529 (diff)
downloaddrakx-de03857088abc1bf0a1db01516ee24bd18207414.tar
drakx-de03857088abc1bf0a1db01516ee24bd18207414.tar.gz
drakx-de03857088abc1bf0a1db01516ee24bd18207414.tar.bz2
drakx-de03857088abc1bf0a1db01516ee24bd18207414.tar.xz
drakx-de03857088abc1bf0a1db01516ee24bd18207414.zip
Raw queue entry added, so cursor not always on "Alps MD-1000" when no printer
detected.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm19
1 files changed, 16 insertions, 3 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index f436ab14a..8255eed75 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -268,6 +268,10 @@ complete => sub {
$device eq $_->{port} or next;
$printer->{DBENTRY} =
bestMatchSentence ($_->{val}{DESCRIPTION}, keys %printer::thedb);
+ # If the manufacturer was not guessed correctly, discard the
+ # guess.
+ #$printer->{DBENTRY} =~ /^([\|])|/;
+ #if ($_->{val}{DESCRIPTION} !~ /lc($1)/i) {$printer->{DBENTRY} = ""};
}
1;
}
@@ -711,9 +715,13 @@ sub get_db_entry {
}
}
}
- if ($printer->{DBENTRY} eq "") {
+ if (($printer->{DBENTRY} eq "") && 0) {
# Exact match with cleaned-up model did not work, try a best match
$printer->{DBENTRY} = bestMatchSentence("$make|$model", keys %printer::thedb);
+ # If the manufacturer was not guessed correctly, discard the
+ # guess.
+ $printer->{DBENTRY} =~ /^([\|])|/;
+ if (lc($1) ne lc($make)) {$printer->{DBENTRY} = ""};
}
# Set the OLD_CHOICE to a non-existing value
$printer->{OLD_CHOICE} = "XXX";
@@ -738,6 +746,9 @@ sub choose_model {
my $w = $in->wait_message('', _("Reading printer database ..."));
printer::read_printer_db($printer->{SPOOLER});
}
+ if (!$printer::thedb{$printer->{DBENTRY}}) {
+ $printer->{DBENTRY} = _("Raw printer (No driver)");
+ }
$in->set_help('configurePrinterType') if $::isInstall;
# Choose the printer/driver from the list
return ($printer->{DBENTRY} = $in->ask_from_treelist(_("Printer model selection"),
@@ -1724,8 +1735,10 @@ What do you want to modify on this printer?",
_("Printer manufacturer, model")),
(($printer->{configured}{$queue}{'queuedata'}{'make'} ne
"") &&
- ($printer->{configured}{$queue}{'queuedata'}{'model'} ne
- _("Unknown model")) ?
+ (($printer->{configured}{$queue}{'queuedata'}{'model'} ne
+ _("Unknown model")) ||
+ ($printer->{configured}{$queue}{'queuedata'}{'model'} ne
+ _("Raw printer"))) ?
_("Printer options") : ()),
(($queue ne $printer->{DEFAULT}) ?
_("Set this printer as the default") : ()),