summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/Makefile.config2
-rw-r--r--perl-install/Xconfigurator.pm8
-rw-r--r--perl-install/any.pm46
-rw-r--r--perl-install/install_interactive.pm6
-rw-r--r--perl-install/install_steps_interactive.pm40
-rw-r--r--perl-install/network.pm10
-rw-r--r--perl-install/printerdrake.pm95
-rwxr-xr-xperl-install/standalone/adduserdrake18
8 files changed, 112 insertions, 113 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index 958e7214f..faaa6ab48 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -5,7 +5,7 @@ VERSION = 2.2.10-BOOT
SUDO = sudo
SO_FILES = c/blib/arch/auto/c/c.so
PMS = *.pm Newt/*.pm c/stuff.pm resize_fat/*.pm sbus_probing/*.pm commands install2 g_auto_install live_install live_install2
-STANDALONEPMS= diskdrake XFdrake mousedrake printerdrake keyboarddrake netdrake draknet drakxconf drakxservices draksec drakboot adduserdrake rpmdrake drakgw livedrake
+STANDALONEPMS= diskdrake XFdrake mousedrake printerdrake keyboarddrake netdrake draknet drakxconf drakxservices draksec drakboot adduserdrake drakgw livedrake
PMS += $(STANDALONEPMS:%=standalone/%)
REP4PMS = /usr/bin/perl-install
ROOTDEST = /export
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 925749ead..61fb4911c 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -342,12 +342,12 @@ sub optionsConfiguration($) {
my $options = 'options_' . ($o->{card}{server} eq 'XFree86' ? 'xf4' : 'xf3');
$o->{card}{$options}{$_->[0]} ||= 0;
unless ($l{$_->[0]}) {
- push @l, $_->[0], { val => \$o->{card}{$options}{$_->[0]}, type => 'bool' };
+ push @l, { label => $_->[0], val => \$o->{card}{$options}{$_->[0]}, type => 'bool' };
$l{$_->[0]} = 1;
}
}
}
- @l = @l[0..19] if @l > 19; #- reduce list size to 10 for display (it's a hash).
+ @l = @l[0..9] if @l > 9; #- reduce list size to 10 for display
$in->ask_from_entries_refH('', _("Choose options for server"), \@l);
}
@@ -1159,8 +1159,8 @@ sub autologin {
$in->ask_from_entries_refH(_("Autologin"),
_("I can set up your computer to automatically log on one user.
If you don't want to use this feature, click on the cancel button."),
- [ _("Choose the default user:") => { val => \$o->{autologin}, list => [ '', @users ] },
- _("Choose the window manager to run:") => { val => \$o->{desktop}, list => \@wm }, ]) or delete $o->{autologin};
+ [ { label => _("Choose the default user:"), val => \$o->{autologin}, list => [ '', @users ] },
+ { label => _("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm }, ]) or delete $o->{autologin};
}
$o->{autologin} and $::isStandalone ? do { $in->suspend; system("urpmi --auto --best-output autologin"); $in->resume; } : $in->pkg_install("autologin");
any::setAutologin($prefix, $o->{autologin}, $o->{desktop});
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 3c6d8d624..184642794 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -122,21 +122,21 @@ sub setupBootloader {
my $silo_install_lang = $silo_install_lang[$b->{use_partition}];
my @l = (
arch() =~ /sparc/ ? (
-_("Bootloader installation") => { val => \$silo_install_lang, list => \@silo_install_lang },
+{ label => _("Bootloader installation"), val => \$silo_install_lang, list => \@silo_install_lang },
) : (
-_("Boot device") => { val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } @$hds, @$fstab), detect_devices::floppies() ], not_edit => !$::expert },
-_("LBA (doesn't work on old BIOSes)") => { val => \$b->{lba32}, type => "bool", text => "lba" },
-_("Compact") => { val => \$b->{compact}, type => "bool", text => _("compact") },
-_("Video mode") => { val => \$b->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => $::beginner },
+{ label => _("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } @$hds, @$fstab), detect_devices::floppies() ], not_edit => !$::expert },
+{ label => _("LBA (doesn't work on old BIOSes)"), val => \$b->{lba32}, type => "bool", text => "lba" },
+{ label => _("Compact"), val => \$b->{compact}, type => "bool", text => _("compact") },
+{ label => _("Video mode"), val => \$b->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => $::beginner },
),
-_("Delay before booting default image") => \$b->{timeout},
+{ label => _("Delay before booting default image"), val => \$b->{timeout} },
$security < 4 ? () : (
-_("Password") => { val => \$b->{password}, hidden => 1 },
-_("Password (again)") => { val => \$b->{password2}, hidden => 1 },
-_("Restrict command line options") => { val => \$b->{restricted}, type => "bool", text => _("restrict") },
+{ label => _("Password"), val => \$b->{password}, hidden => 1 },
+{ label => _("Password (again)"), val => \$b->{password2}, hidden => 1 },
+{ label => _("Restrict command line options"), val => \$b->{restricted}, type => "bool", text => _("restrict") },
)
);
- @l = @l[0..3] unless $::expert; #- take "bootloader installation" and "delay before ..." on SPARC.
+ @l = @l[0..1] unless $::expert; #- take "bootloader installation" and "delay before ..." on SPARC.
$b->{vga} ||= 'Normal';
$in->ask_from_entries_refH('', _("Bootloader main options"), \@l,
@@ -193,28 +193,28 @@ You can add some more or change the existing ones."),
my @l;
if ($e->{type} eq "image") {
@l = (
-_("Image") => { val => \$e->{kernel_or_dev}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/vmlinuz*") ], not_edit => 0 },
-_("Root") => { val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert },
-_("Append") => \$e->{append},
-_("Video mode") => { val => \$e->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => !$::expert },
-_("Initrd") => { val => \$e->{initrd}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/initrd*") ] },
-_("Read-write") => { val => \$e->{'read-write'}, type => 'bool' }
+{ label => _("Image"), val => \$e->{kernel_or_dev}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/vmlinuz*") ], not_edit => 0 },
+{ label => _("Root"), val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert },
+{ label => _("Append"), val => \$e->{append} },
+{ label => _("Video mode"), val => \$e->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => !$::expert },
+{ label => _("Initrd"), val => \$e->{initrd}, list => [ map { s/$prefix//; $_ } glob_("$prefix/boot/initrd*") ] },
+{ label => _("Read-write"), val => \$e->{'read-write'}, type => 'bool' }
);
- @l = @l[0..5] unless $::expert;
+ @l = @l[0..2] unless $::expert;
} else {
@l = (
-_("Root") => { val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert },
+{ label => _("Root"), val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert },
arch() !~ /sparc/ ? (
-_("Table") => { val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @$hds ], not_edit => !$::expert },
-_("Unsafe") => { val => \$e->{unsafe}, type => 'bool' }
+{ label => _("Table"), val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @$hds ], not_edit => !$::expert },
+{ label => _("Unsafe"), val => \$e->{unsafe}, type => 'bool' }
) : (),
);
- @l = @l[0..1] unless $::expert;
+ @l = $l[0] unless $::expert;
}
@l = (
-_("Label") => \$e->{label},
+{ label => _("Label"), val => \$e->{label} },
@l,
-_("Default") => { val => \$default, type => 'bool' },
+{ label => _("Default"), val => \$default, type => 'bool' },
);
if ($in->ask_from_entries_refH($c eq "Add" ? '' : ['', _("Ok"), _("Remove entry")],
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index bb61e6392..5e281e4fd 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -90,8 +90,8 @@ sub partitionWizardSolutions {
my $part = $o->ask_from_listf('', _("Which partition do you want to use for Linux4Win?"), \&partition_table_raw::description, \@ok_forloopback) or return;
$max_swap = $min_swap + 1 if $part->{free} - $max_swap < $min_linux;
$o->ask_from_entries_refH('', _("Choose the sizes"), [
- _("Root partition size in MB: ") => { val => \$s_root, min => $min_linux >> 11, max => min($part->{free} - $max_swap, $max_linux) >> 11, type => 'range' },
- _("Swap partition size in MB: ") => { val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' },
+ { label => _("Root partition size in MB: "), val => \$s_root, min => $min_linux >> 11, max => min($part->{free} - $max_swap, $max_linux) >> 11, type => 'range' },
+ { label => _("Swap partition size in MB: "), val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' },
]) or return;
push @{$part->{loopback}},
{ type => 0x83, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => $s_root << 11, device => $part, notFormatted => 1 },
@@ -121,7 +121,7 @@ When sure, press Ok.")) or return;
my $size = $part->{size};
$o->ask_from_entries_refH('', _("Which size do you want to keep for windows on"), [
- _("partition %s", partition_table_raw::description($part)) => { val => \$size, min => $min_win >> 11, max => ($part->{size} - $min_linux - $min_swap) >> 11, type => 'range' },
+ { label => _("partition %s", partition_table_raw::description($part)), val => \$size, min => $min_win >> 11, max => ($part->{size} - $min_linux - $min_swap) >> 11, type => 'range' },
]) or return;
$size <<= 11;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index eb57552d2..768f6674d 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -298,8 +298,8 @@ sub ask_mntpoint_s {
} else {
$o->ask_from_entries_refH('',
_("Choose the mount points"),
- [ map { partition_table_raw::description($_) =>
- { val => \$_->{mntpoint}, not_edit => 0, list => [ '', fsedit::suggestions_mntpoint([]) ] }
+ [ map { { label => partition_table_raw::description($_),
+ val => \$_->{mntpoint}, not_edit => 0, list => [ '', fsedit::suggestions_mntpoint([]) ] }
} @fstab ]) or return;
}
$o->SUPER::ask_mntpoint_s($fstab);
@@ -754,13 +754,13 @@ sub setRootPassword {
$o->ask_from_entries_refH([_("Set root password"), _("Ok"), if_($o->{security} <= 2 && !$::corporate, _("No password"))],
[ _("Set root password"), "\n" ], [
-_("Password") => { val => \$sup->{password}, hidden => 1 },
-_("Password (again)") => { val => \$sup->{password2}, hidden => 1 },
+{ label => _("Password"), val => \$sup->{password}, hidden => 1 },
+{ label => _("Password (again)"), val => \$sup->{password2}, hidden => 1 },
if_($o->{installClass} eq "server" || $::expert,
-_("Use shadow file") => { val => \$o->{authentication}{shadow}, type => 'bool', text => _("shadow") },
-_("Use MD5 passwords") => { val => \$o->{authentication}{md5}, type => 'bool', text => _("MD5") },
+{ label => _("Use shadow file"), val => \$o->{authentication}{shadow}, type => 'bool', text => _("shadow") },
+{ label => _("Use MD5 passwords"), val => \$o->{authentication}{md5}, type => 'bool', text => _("MD5") },
), if_(!$::beginner,
-_("Use NIS") => { val => \$nis, type => 'bool', text => _("yellow pages") },
+{ label => _("Use NIS"), val => \$nis, type => 'bool', text => _("yellow pages") },
)
],
complete => sub {
@@ -801,15 +801,15 @@ sub addUser {
[ _("Add user"), _("Accept user"), if_($o->{security} < 4 || @{$o->{users}}, _("Done")) ],
_("Enter a user\n%s", $o->{users} ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @{$o->{users}})) : ''),
[
- _("Real name") => \$u->{realname},
- _("User name") => \$u->{name},
+ { label => _("Real name"), val => \$u->{realname} },
+ { label => _("User name"), val => \$u->{name} },
if_($o->{security} >= 2,
- _("Password") => {val => \$u->{password}, hidden => 1},
- _("Password (again)") => {val => \$u->{password2}, hidden => 1},
+ { label => _("Password"),val => \$u->{password}, hidden => 1},
+ { label => _("Password (again)"), val => \$u->{password2}, hidden => 1},
), if_(!$::beginner,
- _("Shell") => {val => \$u->{shell}, list => [ any::shells($o->{prefix}) ], not_edit => !$::expert}
+ { label => _("Shell"), val => \$u->{shell}, list => [ any::shells($o->{prefix}) ], not_edit => !$::expert}
), if_($o->{security} <= 3,
- _("Icon") => {val => \$u->{icon}, list => [ any::facesnames($o->{prefix}) ], icon2f => sub { any::face2xpm($_[0], $o->{prefix}) } },
+ { label => _("Icon"), val => \$u->{icon}, list => [ any::facesnames($o->{prefix}) ], icon2f => sub { any::face2xpm($_[0], $o->{prefix}) } },
),
],
focus_out => sub {
@@ -952,17 +952,17 @@ sub miscellaneous {
!$::beginner || $clicked and $o->ask_from_entries_refH('',
_("Miscellaneous questions"), [
-_("Use hard drive optimisations?") => { val => \$u->{HDPARM}, type => 'bool', text => _("(may cause data corruption)") },
-_("Choose security level") => { val => \$s, list => [ map { $l{$_} } ikeys %l ] },
-_("Precise RAM size if needed (found %d MB)", availableRamMB()) => \$u->{memsize},
+{ label => _("Use hard drive optimisations?"), val => \$u->{HDPARM}, type => 'bool', text => _("(may cause data corruption)") },
+{ label => _("Choose security level"), val => \$s, list => [ map { $l{$_} } ikeys %l ] },
+{ label => _("Precise RAM size if needed (found %d MB)", availableRamMB()), val => \$u->{memsize} },
if_(arch() !~ /^sparc/,
-_("Removable media automounting") => { val => \$o->{useSupermount}, type => 'bool', text => 'supermount' },
+{ label => _("Removable media automounting"), val => \$o->{useSupermount}, type => 'bool', text => 'supermount' },
), if_($::expert,
-_("Clean /tmp at each boot") => { val => \$u->{CLEAN_TMP}, type => 'bool' },
+{ label => _("Clean /tmp at each boot"), val => \$u->{CLEAN_TMP}, type => 'bool' },
), $o->{pcmcia} && $::expert ? (
-_("Enable multi profiles") => { val => \$u->{profiles}, type => 'bool' },
+{ label => _("Enable multi profiles"), val => \$u->{profiles}, type => 'bool' },
) : (
-_("Enable num lock at startup") => { val => \$u->{numlock}, type => 'bool' },
+{ label => _("Enable num lock at startup"), val => \$u->{numlock}, type => 'bool' },
),
], complete => sub {
!$u->{memsize} || $u->{memsize} =~ s/^(\d+)M?$/$1M/i or $o->ask_warn('', _("Give the ram size in MB")), return 1;
diff --git a/perl-install/network.pm b/perl-install/network.pm
index f5fe364fb..6ed925406 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -345,10 +345,12 @@ _("Please enter your host name.
Your host name should be a fully-qualified host name,
such as ``mybox.mylab.myco.com''.
You may also enter the IP address of the gateway if you have one"),
- [ _("Host name") => \$netc->{HOSTNAME},
- _("DNS server") => \$netc->{dnsServer},
- _("Gateway") => \$netc->{GATEWAY},
- $::expert ? (_("Gateway device") => {val => \$netc->{GATEWAYDEV}, list => \@devices }) : (),
+ [ { label => _("Host name"), val => \$netc->{HOSTNAME} },
+ { label => _("DNS server"), val => \$netc->{dnsServer} },
+ { label => _("Gateway"), val => \$netc->{GATEWAY} },
+ if_($::expert,
+ { label => _("Gateway device"), val => \$netc->{GATEWAYDEV}, list => \@devices },
+ ),
],
) or return;
}
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 0744f0738..af7c592f9 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -48,7 +48,7 @@ sub setup_local($$$) {
return if !$in->ask_from_entries_refH(_("Local Printer Device"),
_("What device is your printer connected to
(note that /dev/lp0 is equivalent to LPT1:)?\n") . (join "\n", @str), [
-_("Printer Device") => {val => \$printer->{DEVICE}, list => \@port } ],
+{ label => _("Printer Device"), val => \$printer->{DEVICE}, list => \@port } ],
);
}
@@ -71,8 +71,8 @@ sub setup_remote($$$) {
_("To use a remote lpd print queue, you need to supply
the hostname of the printer server and the queue name
on that server which jobs should be placed in."), [
-_("Remote hostname") => \$printer->{REMOTEHOST},
-_("Remote queue") => \$printer->{REMOTEQUEUE}, ],
+{ label => _("Remote hostname"), val => \$printer->{REMOTEHOST} },
+{ label => _("Remote queue"), val => \$printer->{REMOTEQUEUE} } ],
);
#- make the DeviceURI from DEVICE.
$printer->{DeviceURI} = "lpd://$printer->{REMOTEHOST}/$printer->{REMOTEQUEUE}";
@@ -87,12 +87,12 @@ SMB host name (Note! It may be different from its
TCP/IP hostname!) and possibly the IP address of the print server, as
well as the share name for the printer you wish to access and any
applicable user name, password, and workgroup information."), [
-_("SMB server host") => \$printer->{SMBHOST},
-_("SMB server IP") => \$printer->{SMBHOSTIP},
-_("Share name") => \$printer->{SMBSHARE},
-_("User name") => \$printer->{SMBUSER},
-_("Password") => { val => \$printer->{SMBPASSWD}, hidden => 1 },
-_("Workgroup") => \$printer->{SMBWORKGROUP} ],
+{ label => _("SMB server host"), val => \$printer->{SMBHOST} },
+{ label => _("SMB server IP"), val => \$printer->{SMBHOSTIP} },
+{ label => _("Share name"), val => \$printer->{SMBSHARE} },
+{ label => _("User name"), val => \$printer->{SMBUSER} },
+{ label => _("Password"), val => \$printer->{SMBPASSWD}, hidden => 1 },
+{ label => _("Workgroup"), val => \$printer->{SMBWORKGROUP} }, ],
complete => sub {
unless (network::is_ip($printer->{SMBHOSTIP})) {
$in->ask_warn('', _("IP address should be in format 1.2.3.4"));
@@ -122,10 +122,10 @@ _("To print to a NetWare printer, you need to provide the
NetWare print server name (Note! it may be different from its
TCP/IP hostname!) as well as the print queue name for the printer you
wish to access and any applicable user name and password."), [
-_("Printer Server") => \$printer->{NCPHOST},
-_("Print Queue Name") => \$printer->{NCPQUEUE},
-_("User name") => \$printer->{NCPUSER},
-_("Password") => {val => \$printer->{NCPPASSWD}, hidden => 1} ],
+{ label => _("Printer Server"), val => \$printer->{NCPHOST} },
+{ label => _("Print Queue Name"), val => \$printer->{NCPQUEUE} },
+{ label => _("User name"), val => \$printer->{NCPUSER} },
+{ label => _("Password"), val => \$printer->{NCPPASSWD}, hidden => 1 } ],
);
&$install('ncpfs');
1;
@@ -138,8 +138,8 @@ sub setup_socket($$$) {
return if !$in->ask_from_entries_refH(_("Socket Printer Options"),
_("To print to a socket printer, you need to provide the
hostname of the printer and optionally the port number."), [
-_("Printer Hostname") => \$hostname,
-_("Port") => \$port ],
+{ label => _("Printer Hostname"), val => \$hostname },
+{ label => _("Port"), val => \$port } ],
);
#- make the DeviceURI parameters given above, these parameters are not in printer
@@ -153,7 +153,7 @@ sub setup_uri($$$) {
return if !$in->ask_from_entries_refH(_("Printer Device URI"),
_("You can specify directly the URI to access the printer with CUPS."), [
-_("Printer Device URI") => { val => \$printer->{DeviceURI}, list => [ printer::get_direct_uri(),
+{ label => _("Printer Device URI"), val => \$printer->{DeviceURI}, list => [ printer::get_direct_uri(),
"file:/",
"http://",
"ipp://",
@@ -269,31 +269,28 @@ sub setup_gsdriver_lpr($$$;$) {
$printer->{TEXTONLYOPTIONS} =~ s/^"(.*)"/$1/;
return if !$in->ask_from_entries_refH('', _("Printer options"), [
-_("Paper Size") => { val => \$printer->{PAPERSIZE}, type => 'list', not_edit => !$::expert, list => \@printer::papersize_type },
-_("Eject page after job?") => { val => \$printer->{AUTOSENDEOF}, type => 'bool' },
-@list_res > 1 ? (
-_("Resolution") => { val => \$printer->{RESOLUTION}, type => 'list', not_edit => !$::expert, list => \@res } ) : (),
-@list_col > 1 ? (
-$is_uniprint ? (
-_("Uniprint driver options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', list => \@col } ) : (
-_("Color depth options") => { val => \$printer->{BITSPERPIXEL}, type => 'list', list => \@col } ), ) : (),
-$db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' && $db_entry{GSDRIVER} ne 'ppa' ? (
-_("Print text as PostScript?") => { val => \$printer->{ASCII_TO_PS}, type => 'bool' }, ) : (),
-#+_("Reverse page order") => { val => \$printer->{REVERSE_ORDER}, type => 'bool' },
-$db_entry{GSDRIVER} ne 'POSTSCRIPT' ? (
-_("Fix stair-stepping text?") => { val => \$printer->{CRLF}, type => 'bool' },
-) : (),
-$db_entry{GSDRIVER} ne 'TEXT' ? (
-_("Number of pages per output pages") => { val => \$printer->{NUP}, type => 'list', not_edit => !$::expert, list => [1,2,4,8] },
-_("Right/Left margins in points (1/72 of inch)") => \$printer->{RTLFTMAR},
-_("Top/Bottom margins in points (1/72 of inch)") => \$printer->{TOPBOTMAR},
-) : (),
-$::expert && $db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' ? (
-_("Extra GhostScript options") => \$printer->{EXTRA_GS_OPTIONS},
-) : (),
-$::expert && $db_entry{GSDRIVER} ne 'POSTSCRIPT' ? (
-_("Extra Text options") => \$printer->{TEXTONLYOPTIONS},
-) : (),
+{ label => _("Paper Size"), val => \$printer->{PAPERSIZE}, type => 'list', not_edit => !$::expert, list => \@printer::papersize_type },
+{ label => _("Eject page after job?"), val => \$printer->{AUTOSENDEOF}, type => 'bool' },
+ if_(@list_res > 1,
+{ label => _("Resolution"), val => \$printer->{RESOLUTION}, type => 'list', not_edit => !$::expert, list => \@res },
+ ), if_(@list_col > 1,
+ $is_uniprint ?
+{ label => _("Uniprint driver options"), val => \$printer->{BITSPERPIXEL}, type => 'list', list => \@col } :
+{ label => _("Color depth options"), val => \$printer->{BITSPERPIXEL}, type => 'list', list => \@col }
+ ), if_($db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT' && $db_entry{GSDRIVER} ne 'ppa',
+{ label => _("Print text as PostScript?"), val => \$printer->{ASCII_TO_PS}, type => 'bool' },
+ ), if_($db_entry{GSDRIVER} ne 'POSTSCRIPT',
+{ label => _("Fix stair-stepping text?"), val => \$printer->{CRLF}, type => 'bool' },
+ ), if_($db_entry{GSDRIVER} ne 'TEXT',
+{ label => _("Number of pages per output pages"), val => \$printer->{NUP}, type => 'list', not_edit => !$::expert, list => [1,2,4,8] },
+{ label => _("Right/Left margins in points (1/72 of inch)"), val => \$printer->{RTLFTMAR} },
+{ label => _("Top/Bottom margins in points (1/72 of inch)"), val => \$printer->{TOPBOTMAR} },
+ ), if_($::expert && $db_entry{GSDRIVER} ne 'TEXT' && $db_entry{GSDRIVER} ne 'POSTSCRIPT',
+{ label => _("Extra GhostScript options"), val => \$printer->{EXTRA_GS_OPTIONS} },
+ ), if_($::expert && $db_entry{GSDRIVER} ne 'POSTSCRIPT',
+{ label => _("Extra Text options"), val => \$printer->{TEXTONLYOPTIONS} },
+ ),
+#+ { label => _("Reverse page order"), val => \$printer->{REVERSE_ORDER}, type => 'bool' },
]);
$printer->{BITSPERPIXEL} = $col_to_depth{$printer->{BITSPERPIXEL}} || $printer->{BITSPERPIXEL}; #- translate back.
@@ -412,8 +409,8 @@ any printer here; printers will be automatically detected
unless you have a server on a different network; in the
latter case, you have to give the CUPS server IP address
and optionally the port number."), [
-_("CUPS server IP") => \$server,
-_("Port") => \$port ],
+{ label => _("CUPS server IP"), val => \$server },
+{ label => _("Port"), val => \$port } ],
complete => sub {
unless (!$server || network::is_ip($server)) {
$in->ask_warn('', _("IP address should be in format 1.2.3.4"));
@@ -446,9 +443,9 @@ _("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?"), [
-_("Name of printer") => { val => \$printer->{QUEUE} },
-_("Description") => { val => \$printer->{Info} },
-_("Location") => { val => \$printer->{Location} },
+{ 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;
} else {
@@ -464,9 +461,9 @@ _("Location") => { val => \$printer->{Location} },
_("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 of queue") => { val => \$printer->{QUEUE} },
-_("Spool directory") => { val => \$printer->{SPOOLDIR} },
-_("Printer Connection") => { val => \$printer->{str_type}, list => [ printer::printer_type($printer) ], not_edit => 1 },
+{ 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];
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index c8fb8f2b6..18ee80c2b 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -36,15 +36,15 @@ if ($in->ask_from_entries_refH(
[ _("Add user"), _("Accept user"), _("Done") ],
_("Enter a user\n%s", $users ? _("(already added %s)", join(", ", map { $_->{realname} || $_->{name} } @users)) : ''),
[
- _("Real name") => \$u->{realname},
- _("User name") => \$u->{name},
- $security < 2 ? () : (
- _("Password") => {val => \$u->{password}, hidden => 1},
- _("Password (again)") => {val => \$u->{password2}, hidden => 1},
- ), $::beginner ? () : (
- _("Shell") => {val => \$u->{shell}, list => \@shells, not_edit => !$::expert}
- ), $security > 3 ? () : (
- _("Icon") => {val => \$u->{icon}, list => [ any::facesnames() ], icon2f => \&any::face2xpm },
+ { label => _("Real name"), val => \$u->{realname} },
+ { label => _("User name"), val => \$u->{name} },
+ if_($security >= 2,
+ { label => _("Password"), val => \$u->{password}, hidden => 1 },
+ { label => _("Password (again)"), val => \$u->{password2}, hidden => 1 },
+ ), if_(!$::beginner,
+ { label => _("Shell"), val => \$u->{shell}, list => \@shells, not_edit => !$::expert }
+ ), if_($security <= 3,
+ { label => _("Icon"), val => \$u->{icon}, list => [ any::facesnames() ], icon2f => \&any::face2xpm },
),
],
focus_out => sub {