summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-13 17:08:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-13 17:08:49 +0000
commitbe8f616ecdb42ed2edbb54261d3c44bb73cba0aa (patch)
tree41893af747b37b627caeaca8375d19c1a62238e9 /perl-install
parent1c1e86862e1a6cd8fe2183d0d82a04cee550ec15 (diff)
downloaddrakx-be8f616ecdb42ed2edbb54261d3c44bb73cba0aa.tar
drakx-be8f616ecdb42ed2edbb54261d3c44bb73cba0aa.tar.gz
drakx-be8f616ecdb42ed2edbb54261d3c44bb73cba0aa.tar.bz2
drakx-be8f616ecdb42ed2edbb54261d3c44bb73cba0aa.tar.xz
drakx-be8f616ecdb42ed2edbb54261d3c44bb73cba0aa.zip
(ask_users): do not have an empty icon. better not ask for icon if no icon
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 40cf6e275..fb858967e 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -703,6 +703,7 @@ sub ask_users {
my $u if 0; $u ||= {};
my @shells = map { chomp; $_ } cat_("$prefix/etc/shells");
+ my @icons = facesnames($prefix);
while (1) {
$u->{password2} ||= $u->{password} ||= '';
@@ -736,8 +737,8 @@ sub ask_users {
{ label => _("Password"),val => \$u->{password}, hidden => 1 },
{ label => _("Password (again)"), val => \$u->{password2}, hidden => 1 },
{ label => _("Shell"), val => \$u->{shell}, list => [ shells($prefix) ], not_edit => !$::expert, advanced => 1 },
- if_($security <= 3,
- { label => _("Icon"), val => \$u->{icon}, list => [ '', facesnames($prefix) ], icon2f => sub { face2png($_[0], $prefix) }, format => \&translate },
+ if_($security <= 3 && @icons,
+ { label => _("Icon"), val => \$u->{icon}, list => \@icons, icon2f => sub { face2png($_[0], $prefix) }, format => \&translate },
),
],
);