summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-07 16:53:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-07 16:53:29 +0000
commit597fbc897b288e62ddafaf38acf861bb8ff62f91 (patch)
tree8df4c9b284daf10ec2ca18bdc17d2a6069eb007d /perl-install/printerdrake.pm
parent363a685fd8eb8386e234d12fd6c591342d1060cd (diff)
downloaddrakx-597fbc897b288e62ddafaf38acf861bb8ff62f91.tar
drakx-597fbc897b288e62ddafaf38acf861bb8ff62f91.tar.gz
drakx-597fbc897b288e62ddafaf38acf861bb8ff62f91.tar.bz2
drakx-597fbc897b288e62ddafaf38acf861bb8ff62f91.tar.xz
drakx-597fbc897b288e62ddafaf38acf861bb8ff62f91.zip
update code for new ask_from_entries_refH which doesn't handle optional ok/cancel names in arg 1.
must be handled via ask_from_entries_refH_powered
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm28
1 files changed, 16 insertions, 12 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index af7c592f9..d78aed3bb 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -437,17 +437,18 @@ and optionally the port number."), [
return; #- exit printer configuration, here is another hack for simplification.
}
$in->set_help('configurePrinterLocal') if $::isInstall;
- $in->ask_from_entries_refH([_("Select Printer Connection"), _("Ok"),
- $::beginner || !$printer->{configured}{$printer->{QUEUE}} ? () : _("Remove queue")],
+ $in->ask_from_entries_refH_powered(
+ { title => _("Select Printer Connection"),
+ cancel => $::beginner || !$printer->{configured}{$printer->{QUEUE}} ? '' : _("Remove queue"),
+ messages =>
_("Every printer need a name (for example lp).
Other parameters such as the description of the printer or its location
can be defined. What name should be used for this printer and
-how is the printer connected?"), [
+how is the printer connected?") }, [
{ label => _("Name of printer"), val => \$printer->{QUEUE} },
{ label => _("Description"), val => \$printer->{Info} },
{ label => _("Location"), val => \$printer->{Location} },
- ],
- ) or printer::remove_queue($printer), $continue = 1, last;
+ ]) or printer::remove_queue($printer), $continue = 1, last;
} else {
if ($::beginner) {
$printer->{str_type} = $in->ask_from_list_(_("Select Printer Connection"),
@@ -457,18 +458,21 @@ how is the printer connected?"), [
);
} else {
$in->set_help('configurePrinterLPR') if $::isInstall;
- $in->ask_from_entries_refH([_("Select Printer Connection"), _("Ok"), $::beginner ? () : _("Remove queue")],
+ $in->ask_from_entries_refH_powered(
+ { title => _("Select Printer Connection"),
+ cancel => $::beginner ? '' : _("Remove queue"),
+ messages =>
_("Every print queue (which print jobs are directed to) needs a
name (often lp) and a spool directory associated with it. What
-name and directory should be used for this queue and how is the printer connected?"), [
+name and directory should be used for this queue and how is the printer connected?"),
+ callbacks => { changed => sub {
+ $printer->{SPOOLDIR} = printer::default_spooldir($printer) unless $_[0];
+ } }
+ }, [
{ label => _("Name of queue"), val => \$printer->{QUEUE} },
{ label => _("Spool directory"), val => \$printer->{SPOOLDIR} },
{ label => _("Printer Connection"), val => \$printer->{str_type}, list => [ printer::printer_type($printer) ] },
- ],
- changed => sub {
- $printer->{SPOOLDIR} = printer::default_spooldir($printer) unless $_[0];
- }
- ) or printer::remove_queue($printer), $continue = 1, last;
+]) or printer::remove_queue($printer), $continue = 1, last;
}
$printer->{TYPE} = $printer::printer_type{$printer->{str_type}};
}