summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-04 15:37:53 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-04 15:37:53 +0000
commit058da567f460f3cafeb472e877eb7d8fe7ff1265 (patch)
tree63864a29f4d590d4805c2fd804c10e779810da52 /perl-install
parent166666dc46eef4c2c1e2975605a8cb430ea134c7 (diff)
downloaddrakx-backup-do-not-use-058da567f460f3cafeb472e877eb7d8fe7ff1265.tar
drakx-backup-do-not-use-058da567f460f3cafeb472e877eb7d8fe7ff1265.tar.gz
drakx-backup-do-not-use-058da567f460f3cafeb472e877eb7d8fe7ff1265.tar.bz2
drakx-backup-do-not-use-058da567f460f3cafeb472e877eb7d8fe7ff1265.tar.xz
drakx-backup-do-not-use-058da567f460f3cafeb472e877eb7d8fe7ff1265.zip
fixed printer description in summary.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps_interactive.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 44e0dedca..0690ccb1d 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -792,12 +792,24 @@ sub summary {
my $format_mouse = sub { $mouse_name = translate($o->{mouse}{type}) . ' ' . translate($o->{mouse}{name}) };
&$format_mouse;
+ #- format printer description in a better way according to CUPS/LPR used.
+ my $format_printers = sub {
+ my ($printer) = @_;
+ is_empty_hash_ref($printer->{configured}) and return _("No printer");
+ my $entry = $printer->{configured}{$printer->{QUEUE}} || (values %{$printer->{configured}})[0];
+ for ($entry->{mode}) {
+ /CUPS/ and return $entry->{cupsDescr};
+ /lpr/ and return $entry->{DBENTRY};
+ die "unknown entry for printer $entry->{QUEUE}";
+ }
+ };
+
$o->ask_from_entries_refH('', _("Summary"),
[
{ label => _("Mouse"), val => \$mouse_name, clicked => sub { $o->selectMouse(1); &$format_mouse } },
{ label => _("Keyboard"), val => \$o->{keyboard}, clicked => sub { $o->selectKeyboard(1) }, format => sub { translate(keyboard::keyboard2text($_[0])) } },
{ label => _("Timezone"), val => \$o->{timezone}{timezone}, clicked => sub { $o->configureTimezone(1) } },
-{ label => _("Printer"), val => \$o->{printer}, clicked => sub { $o->configurePrinter(1) }, format => sub { is_empty_hash_ref($_[0]{configured}) ? _("No printer") : (values %{$_[0]{configured}})[0]->{DBENTRY} } },
+{ label => _("Printer"), val => \$o->{printer}, clicked => sub { $o->configurePrinter(1) }, format => $format_printers },
(map {
{ label => _("ISDN card"), val => $_->{description}, clicked => sub { $o->configureNetwork } }
} grep { $_->{driver} eq 'hisax' } detect_devices::probeall()),