summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-12 15:55:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-12 15:55:55 +0000
commit8fe0ce392f4dde3174c593ed2a2cf0e7add4171a (patch)
treea58c108d8da836812eb65cabbbfabb3f8ad79e2f /perl-install/install_steps_interactive.pm
parent4bd77b159315f5c646efb2ed622b929ae5904551 (diff)
downloaddrakx-backup-do-not-use-8fe0ce392f4dde3174c593ed2a2cf0e7add4171a.tar
drakx-backup-do-not-use-8fe0ce392f4dde3174c593ed2a2cf0e7add4171a.tar.gz
drakx-backup-do-not-use-8fe0ce392f4dde3174c593ed2a2cf0e7add4171a.tar.bz2
drakx-backup-do-not-use-8fe0ce392f4dde3174c593ed2a2cf0e7add4171a.tar.xz
drakx-backup-do-not-use-8fe0ce392f4dde3174c593ed2a2cf0e7add4171a.zip
put everything in %compssUsers, use field flags for the flags :)
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 104ed2542..69bcc59fe 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -449,7 +449,8 @@ sub choosePackages {
my $b = pkgs::saveSelected($packages);
pkgs::setSelectedFromCompssList($packages, $o->{compssUsersChoice}, $def_mark, 0);
my $def_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero.
- my $level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}} } @{$o->{compssUsersSorted}} }, $min_mark, 0);
+ pkgs::computeGroupSize($packages, $min_mark);
+ my $level = pkgs::setSelectedFromCompssList($packages, { map { $_ => 1 } map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}} }, $min_mark, 0);
my $max_size = pkgs::selectedSize($packages) + 1; #- avoid division by zero.
pkgs::restoreSelected($b);
@@ -528,16 +529,16 @@ sub chooseGroups {
my @groups = @{$o->{compssUsersSorted}};
my %val;
foreach (@groups) {
- $val{$_} = ! grep { ! $o->{compssUsersChoice}{$_} } @{$compssUsers->{$_}};
+ $val{$_} = ! grep { ! $o->{compssUsersChoice}{$_} } @{$compssUsers->{$_}{flags}};
}
# @groups = grep { $size{$_} = round_down($size{$_} / sqr(1024), 10) } @groups; #- don't display the empty or small one (eg: because all packages are below $min_level)
my $all;
$o->ask_many_from_list('', _("Package Group Selection"),
{ list => \@groups,
- help => sub { translate($o->{compssUsersDescr}{$_}) },
+ help => sub { translate($o->{compssUsers}{$_}{descr}) },
val => sub { \$val{$_} },
icon2f => sub {
- my $f = "/usr/share/icons/" . ($o->{compssUsersIcons}{$_} || 'default');
+ my $f = "/usr/share/icons/" . ($o->{compssUsers}{$_}{icons} || 'default');
-e "$f.png" or $f .= "_section";
-e "$f.png" or $f = '/usr/share/icons/default_section';
"$f.png";
@@ -548,10 +549,10 @@ sub chooseGroups {
if_($individual, { list => [ _("Individual package selection") ], val => sub { $individual }, advanced => 1 }),
) or return;
if ($all) {
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}} } @{$o->{compssUsersSorted}};
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}{flags}} } @{$o->{compssUsersSorted}};
} else {
- $o->{compssUsersChoice}{$_} = 0 foreach map { @{$compssUsers->{$_}} } grep { !$val{$_} } keys %val;
- $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}} } grep { $val{$_} } keys %val;
+ $o->{compssUsersChoice}{$_} = 0 foreach map { @{$compssUsers->{$_}{flags}} } grep { !$val{$_} } keys %val;
+ $o->{compssUsersChoice}{$_} = 1 foreach map { @{$compssUsers->{$_}{flags}} } grep { $val{$_} } keys %val;
}
1;
}