From be8f616ecdb42ed2edbb54261d3c44bb73cba0aa Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 13 Apr 2001 17:08:49 +0000 Subject: (ask_users): do not have an empty icon. better not ask for icon if no icon --- perl-install/any.pm | 5 +++-- 1 file 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 }, ), ], ); -- cgit v1.2.1