summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-21 16:50:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-21 16:50:49 +0000
commitb0cb608c38e459e0bbe7a0305204051c9e657ad0 (patch)
tree948e7bbd8dbc0af74a42b67b9d211e13a94e1825 /perl-install/any.pm
parentfb96edbd6ed677bd9f99752a7243cd8b07c39f97 (diff)
downloaddrakx-b0cb608c38e459e0bbe7a0305204051c9e657ad0.tar
drakx-b0cb608c38e459e0bbe7a0305204051c9e657ad0.tar.gz
drakx-b0cb608c38e459e0bbe7a0305204051c9e657ad0.tar.bz2
drakx-b0cb608c38e459e0bbe7a0305204051c9e657ad0.tar.xz
drakx-b0cb608c38e459e0bbe7a0305204051c9e657ad0.zip
rework autologin dialog box
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 22c02dbcb..f6178323a 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -508,18 +508,16 @@ sub autologin {
my @users = map { $_->{name} } @{$o->{users} || []};
if (@wm > 1 && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) {
- add2hash_($o, { autologin => $users[0] });
+ my $use_autologin = 1;
$in->ask_from_(
{ title => N("Autologin"),
- messages => N("I can set up your computer to automatically log on one user.
-Do you want to use this feature?"),
- ok => N("Yes"),
- cancel => N("No") },
- [ { label => N("Choose the default user:"), val => \$o->{autologin}, list => \@users },
- { label => N("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm } ]
- )
- or delete $o->{autologin};
+ messages => N("I can set up your computer to automatically log on one user.") },
+ [ { label => N("Do you want to use this feature?"), val => \$use_autologin, type => 'bool' },
+ { label => N("Choose the default user:"), val => \$o->{autologin}, list => \@users, disabled => sub { !$use_autologin } },
+ { label => N("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm, disabled => sub { !$use_autologin } } ]
+ );
+ delete $o->{autologin} if !$use_autologin;
} else {
delete $o->{autologin};
}