summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-12 13:03:12 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-12 13:03:12 +0000
commit8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba (patch)
tree7320e77297c59232d41ffdfe0c353937febce182 /perl-install/printerdrake.pm
parentf06143cc26251bb1f902b590adebb7638167a0de (diff)
downloaddrakx-8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba.tar
drakx-8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba.tar.gz
drakx-8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba.tar.bz2
drakx-8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba.tar.xz
drakx-8300cf7ba3e4c3f1fb3202b548b9990c077fe2ba.zip
automatically add a queue if nothing exists.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index d133fca5d..72361a9e2 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -344,14 +344,18 @@ sub main($$$$;$) {
$queue = $printer->{want} || $in->ask_yesorno(_("Printer"),
_("Would you like to configure a printer?"), 0) ? 'lp' : 'Done';
} else {
- $in->ask_from_entries_refH_powered(
- {
- messages =>
+ unless (%{$printer->{configured} || {}} == ()) {
+ $in->ask_from_entries_refH_powered(
+ {
+ messages =>
_("Here are the following print queues.
You can add some more or change the existing ones."),
- ok => '',
- }, [ { val => \$queue, format => \&translate, list => [ (sort keys %{$printer->{configured} || {}}), __("Add"), __("Done") ] } ]
- );
+ ok => '',
+ }, [ { val => \$queue, format => \&translate,
+ list => [ (sort keys %{$printer->{configured} || {}}),
+ __("Add"), __("Done") ] } ]
+ );
+ } else { $queue = 'Add' } #- as there are no printer already configured, Add one automatically.
if ($queue eq 'Add') {
my %queues; @queues{map { split '\|', $_ } keys %{$printer->{configured}}} = ();
my $i = ''; while ($i < 100) { last unless exists $queues{"lp$i"}; ++$i; }