diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2003-08-22 20:23:01 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2003-08-22 20:23:01 +0000 |
commit | 80f25b9dafc6fb4c53294b7cca25ef8150d531ec (patch) | |
tree | 0ffe8d8b7d57e9f1884ed949b7c648aa026028f3 | |
parent | 445ed2cb538df49e619f4fa63d6372de973e0757 (diff) | |
download | drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.gz drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.bz2 drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.tar.xz drakx-80f25b9dafc6fb4c53294b7cca25ef8150d531ec.zip |
Support for the new "ptal://..." (two slashes) URIs of the new HPOJ.
-rw-r--r-- | perl-install/printer/main.pm | 8 | ||||
-rw-r--r-- | perl-install/printer/printerdrake.pm | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index d0c4639bf..9c36fa55a 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -322,7 +322,7 @@ sub make_menuentry { my $connect = $printer->{configured}{$queue}{queuedata}{connect}; my $localremote; if ($connect =~ m!^(file|parallel|usb|serial):! || - $connect =~ m!^ptal:/mlc:! || + $connect =~ m!^ptal://?mlc:! || $connect =~ m!^mtink:!) { $localremote = N("Local Printers"); } else { @@ -339,7 +339,7 @@ sub make_menuentry { $connection = N(", USB printer #%s", $number); } elsif ($connect =~ m!^usb://!) { $connection = N(", USB printer"); - } elsif ($connect =~ m!^ptal:/(.+)$!) { + } elsif ($connect =~ m!^ptal://?(.+?)$!) { my $ptaldevice = $1; if ($ptaldevice =~ /^mlc:par:(\d+)$/) { my $number = $1; @@ -1993,10 +1993,10 @@ sub autodetectionentry_for_uri { return $p; } } - } elsif ($uri =~ m!^ptal:/mlc:!) { + } elsif ($uri =~ m!^ptal://?mlc:!) { # HP multi-function device (controlled by HPOJ) my $ptaldevice = $uri; - $ptaldevice =~ s!^ptal:/mlc:!!; + $ptaldevice =~ s!^ptal://?mlc:!!; if ($ptaldevice =~ /^par:(\d+)$/) { my $device = "/dev/lp$1"; foreach my $p (@autodetected) { diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index f0c73eaf1..4a68cfbac 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -1476,13 +1476,13 @@ sub setup_socket { my ($uri, $remotehost, $remoteport); my $queue = $printer->{OLD_QUEUE}; if ($printer->{configured}{$queue} && - $printer->{currentqueue}{connect} =~ m!^(socket:|ptal:/hpjd:)!) { + $printer->{currentqueue}{connect} =~ m!^(socket:|ptal://?hpjd:)!) { $uri = $printer->{currentqueue}{connect}; if ($uri =~ m!^ptal:!) { - if ($uri =~ m!^ptal:/hpjd:([^/:]+):([0-9]+)/?\s*$!) { + if ($uri =~ m!^ptal://?hpjd:([^/:]+):([0-9]+)/?\s*$!) { my $ptalport = $2 - 9100; ($remotehost, $remoteport) = ($1, $ptalport); - } elsif ($uri =~ m!^ptal:/hpjd:([^/:]+)\s*$!) { + } elsif ($uri =~ m!^ptal://?hpjd:([^/:]+)\s*$!) { ($remotehost, $remoteport) = ($1, 9100); } } else { @@ -1528,7 +1528,7 @@ sub setup_socket { $menuentries->{$a} cmp $menuentries->{$b}; } keys(%$menuentries); if ($printer->{configured}{$queue} && - $printer->{currentqueue}{connect} =~ m!^(socket:|ptal:/hpjd:)! && + $printer->{currentqueue}{connect} =~ m!^(socket:|ptal://?hpjd:)! && $menuchoice eq "") { my $menustr; if ($printer->{currentqueue}{make}) { @@ -1852,7 +1852,7 @@ sub setup_common { if (!$printer->{noninteractive}) { my $text = ""; # Inform user about how to scan with his MF device - $text = scanner_help($makemodel, "ptal:/$ptaldevice"); + $text = scanner_help($makemodel, "ptal://$ptaldevice"); if ($text) { undef $w; $in->ask_warn @@ -1861,7 +1861,7 @@ sub setup_common { } # Inform user about how to access photo cards with his # MF device - $text = photocard_help($makemodel, "ptal:/$ptaldevice"); + $text = photocard_help($makemodel, "ptal://$ptaldevice"); if ($text) { undef $w; $in->ask_warn(N("Photo memory card access on your HP multi-function device"), @@ -1869,7 +1869,7 @@ sub setup_common { } } # make the DeviceURI from $ptaldevice. - $printer->{currentqueue}{connect} = "ptal:/" . $ptaldevice; + $printer->{currentqueue}{connect} = "ptal://" . $ptaldevice; } else { # make the DeviceURI from $device. $printer->{currentqueue}{connect} = $device; @@ -3006,7 +3006,7 @@ N("To know about the options available for the current printer read either the l sub scanner_help { my ($makemodel, $deviceuri) = @_; - if ($deviceuri =~ m!^ptal:/(.*)$!) { + if ($deviceuri =~ m!^ptal://?(.*?)$!) { my $ptaldevice = $1; if ($makemodel !~ /HP\s+PhotoSmart/i && $makemodel !~ /HP\s+LaserJet\s+2200/i) { @@ -3024,7 +3024,7 @@ Do not use \"scannerdrake\" for this device!", sub photocard_help { my ($makemodel, $deviceuri) = @_; - if ($deviceuri =~ m!^ptal:/(.*)$!) { + if ($deviceuri =~ m!^ptal://?(.*?)$!) { my $ptaldevice = $1; if (($makemodel =~ /HP\s+PhotoSmart/i || $makemodel =~ /HP\s+PSC\s*9[05]0/i || |