diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-09-06 11:11:00 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-09-06 11:11:00 +0000 |
commit | b7748fb0e0a4808de1a26c01349d0063a207b94f (patch) | |
tree | 8a11f78f63919f6f8dbe3279f0eee46a543e5d53 /perl-install | |
parent | 000fb05891af910e6830a47115c05531956de597 (diff) | |
download | drakx-backup-do-not-use-b7748fb0e0a4808de1a26c01349d0063a207b94f.tar drakx-backup-do-not-use-b7748fb0e0a4808de1a26c01349d0063a207b94f.tar.gz drakx-backup-do-not-use-b7748fb0e0a4808de1a26c01349d0063a207b94f.tar.bz2 drakx-backup-do-not-use-b7748fb0e0a4808de1a26c01349d0063a207b94f.tar.xz drakx-backup-do-not-use-b7748fb0e0a4808de1a26c01349d0063a207b94f.zip |
- Do not set margins in CUPS when HPIJS is the driver, for this driver
the margins are already well set.
- Also match model name with added lower-case "hp" with HPLIP XML database.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/printer/main.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index 7a548db9e..302281d21 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -753,19 +753,22 @@ sub set_cups_special_options { my @lpoptions = cat_("$::prefix/etc/cups/lpoptions"); # If nothing is already configured, set text file borders of half # an inch so nothing of the text gets cut off by unprintable - # borders. Do this only when the driver is not Gutenprint, as with - # Gutenprint this will break PostScript printing + # borders. Do this only when the driver is not Gutenprint or HPIJS, as + # both drivers decent border settings are already done and with + # Gutenprint this will even break PostScript printing if ((($queue eq $printer->{currentqueue}{$queue}) && - (($printer->{currentqueue}{driver} =~ /guten.*print/i) || - ($printer->{currentqueue}{ppd} =~ /guten.*print/i))) || + (($printer->{currentqueue}{driver} =~ + /(guten.*print|hpijs|hplip)/i) || + ($printer->{currentqueue}{ppd} =~ + /(guten.*print|hpijs|hplip)/i))) || ((defined($printer->{configured}{$queue})) && (($printer->{configured}{$queue}{queuedata}{driver} =~ - /guten.*print/i) || + /(guten.*print|hpijs|hplip)/i) || ($printer->{configured}{$queue}{queuedata}{ppd} =~ - /guten.*print/i))) || + /(guten.*print|hpijs|hplip)/i))) || (($printer->{SPOOLER} eq "cups") && (-r "$::prefix/etc/cups/ppd/$queue.ppd") && - (`grep -ic gutenprint $::prefix/etc/cups/ppd/$queue.ppd` > 2))) { + (`egrep -ic '(gutenprint|hpijs|hplip)' $::prefix/etc/cups/ppd/$queue.ppd` > 2))) { # Remove page margin settings foreach (@lpoptions) { s/\s*page-(top|bottom|left|right)=\S+//g if /$queue/; @@ -2688,6 +2691,11 @@ sub hplip_device_entry { # Exact match return $entry; } + my $hpmodelstr = "hp_" . $modelstr; + if ($entry = $hplipdevicesdb->{$hpmodelstr}) { + # Exact match + return $entry; + } # More 'fuzzy' matching my $simplemodel = hplip_simple_model($modelstr); foreach my $key (keys %{$hplipdevicesdb}) { |