diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-05 03:11:09 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-05 03:11:09 +0000 |
commit | 91fa5771511a58bc1dbc33f3a5d65174ec76470c (patch) | |
tree | 374395d49b03c8207dcde9aef975903179322968 /perl-install/printer/printerdrake.pm | |
parent | 166751791f0845b41a7a27d3bf20d0222f820369 (diff) | |
download | drakx-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar drakx-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.gz drakx-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.bz2 drakx-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.xz drakx-91fa5771511a58bc1dbc33f3a5d65174ec76470c.zip |
Let URIs listed by "lpinfo -v" be shown in the dialog for entering a URI manually.
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 45762f1d9..d1944400d 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -512,7 +512,7 @@ Printers on remote CUPS servers do not need to be configured here; these printer list => \@printertypes, not_edit => 1, sort => 0, type => 'list' }, - { text => N("Printer auto-detection (Local, TCP/Socket, and SMB printers)"), + { text => N("Printer auto-detection (Local, TCP/Socket, SMB printers, and device URI)"), type => 'bool', val => \$autodetect } ] ) or return 0; @@ -1693,24 +1693,32 @@ sub setup_uri { my ($printer, $in, $upNetwork) = @_; # $in->set_help('setupURI') if $::isInstall; + if ($printer->{AUTODETECT} and ($printer->{SPOOLER} eq 'cups')) { + my $_w = $in->wait_message(N("Printerdrake"), + N("Refreshing Device URI list...")); + printer::services::restart("cups"); + } return if !$in->ask_from(N("Printer Device URI"), N("You can specify directly the URI to access the printer. The URI must fulfill either the CUPS or the Foomatic specifications. Note that not all URI types are supported by all the spoolers."), [ { label => N("Printer Device URI"), val => \$printer->{currentqueue}{connect}, -list => [ $printer->{currentqueue}{connect}, - "parallel:/", - "usb:/", - "serial:/", - "http://", - "ipp://", - "lpd://", - "smb://", - "ncp://", - "socket://", - "ptal:/mlc:", - "ptal:/hpjd:", - "file:/", - 'postpipe:""', +list => [ if_($printer->{currentqueue}{connect}, + $printer->{currentqueue}{connect}), + ($printer->{SPOOLER} eq 'cups' ? + printer::cups::lpinfo_v() : + ("parallel:/", + "usb:/", + "serial:/", + "http://", + "ipp://", + "lpd://", + "smb://", + "ncp://", + "socket://", + "ptal:/mlc:", + "ptal:/hpjd:", + "file:/", + 'postpipe:""')), ], not_edit => 0, sort => 0 }, ], complete => sub { unless ($printer->{currentqueue}{connect} =~ /[^:]+:.+/) { |