diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-08-24 13:03:38 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-08-24 13:03:38 +0000 |
commit | eb2a6cd10f761903cea4a4e7c6dcf7686bce2392 (patch) | |
tree | 95a4879eb170ffd4e1f9c845f84cc638f96a75d7 /perl-install/printer | |
parent | cce7d74d9be1569cdbb590b79b3c35fbc13078c1 (diff) | |
download | drakx-backup-do-not-use-eb2a6cd10f761903cea4a4e7c6dcf7686bce2392.tar drakx-backup-do-not-use-eb2a6cd10f761903cea4a4e7c6dcf7686bce2392.tar.gz drakx-backup-do-not-use-eb2a6cd10f761903cea4a4e7c6dcf7686bce2392.tar.bz2 drakx-backup-do-not-use-eb2a6cd10f761903cea4a4e7c6dcf7686bce2392.tar.xz drakx-backup-do-not-use-eb2a6cd10f761903cea4a4e7c6dcf7686bce2392.zip |
- Fixed problem of current printer/driver not chosen in printer/driver
list when choosing "Printer manufacturer, model, driver" in the
printer editing menu (occured mainly in expert mode and with
printers with manufacturer-supplied PPD).
Diffstat (limited to 'perl-install/printer')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index e998c7d18..ea67cd001 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -3093,8 +3093,12 @@ sub get_db_entry { $printer->{DBENTRY} = "$make|$model"; } $printer->{OLD_CHOICE} = $printer->{DBENTRY}; - } elsif ($printer->{configured}{$queue}{queuedata}{ppd}) { - # Do we have a native CUPS driver or a PostScript PPD file? + } + if ($printer->{configured}{$queue}{queuedata}{ppd} || + ($printer->{DBENTRY} eq "") || + !exists($printer::main::thedb{$printer->{DBENTRY}})) { + # Do we have a native CUPS driver, a PostScript PPD file, + # or a pre-built Foomatic PPD file? $printer->{DBENTRY} = printer::main::get_descr_from_ppd($printer) || $printer->{DBENTRY}; @@ -3104,7 +3108,8 @@ sub get_db_entry { $printer->{OLD_CHOICE} = $printer->{DBENTRY}; } my ($make, $model); - if ($printer->{DBENTRY} eq "") { + if (($printer->{DBENTRY} eq "") || + !exists($printer::main::thedb{$printer->{DBENTRY}})) { # Point the list cursor at least to manufacturer and model of # the printer $printer->{DBENTRY} = ""; @@ -3127,7 +3132,8 @@ sub get_db_entry { } } } - if ($printer->{DBENTRY} eq "") { + if (($printer->{DBENTRY} eq "") || + !exists($printer::main::thedb{$printer->{DBENTRY}})) { # Exact match of make and model did not work, try to clean # up the model name $model =~ s/PS//; @@ -3140,7 +3146,9 @@ sub get_db_entry { } } } - if ($printer->{DBENTRY} eq "" && $make ne "") { + if ((($printer->{DBENTRY} eq "") || + !exists($printer::main::thedb{$printer->{DBENTRY}})) && + $make ne "") { # Exact match with cleaned-up model did not work, try a best match my $matchstr = "$make|$model"; $printer->{DBENTRY} = @@ -3153,7 +3161,8 @@ sub get_db_entry { $matchstr !~ /Hewlett[\s-]+Packard/i)) { $printer->{DBENTRY} = "" } } - if ($printer->{DBENTRY} eq "") { + if (($printer->{DBENTRY} eq "") || + !exists($printer::main::thedb{$printer->{DBENTRY}})) { # Set the OLD_CHOICE to a non-existing value $printer->{OLD_CHOICE} = "XXX"; } |