summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-09-04 15:44:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-09-04 15:44:36 +0000
commit6ca7d220f9116657035547e814bb039bc63cca2b (patch)
treed6f0e4e4ddcaefc38678b54265a32983cfebaa1d /perl-install
parente36dd01571dd5ab3f7cbb11630190aa0dc74b5a7 (diff)
downloaddrakx-6ca7d220f9116657035547e814bb039bc63cca2b.tar
drakx-6ca7d220f9116657035547e814bb039bc63cca2b.tar.gz
drakx-6ca7d220f9116657035547e814bb039bc63cca2b.tar.bz2
drakx-6ca7d220f9116657035547e814bb039bc63cca2b.tar.xz
drakx-6ca7d220f9116657035547e814bb039bc63cca2b.zip
fix dialog box asking "Load from floppy" or "Save on floppy" in individual package selection
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_steps_interactive.pm53
1 files changed, 25 insertions, 28 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e4c965f82..866f5891c 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -530,36 +530,33 @@ sub choosePackagesTree {
}
sub loadSavePackagesOnFloppy {
my ($o, $packages) = @_;
- my $choice = $o->ask_from_listf('',
+ $o->ask_from('',
_("Please choose load or save package selection on floppy.
The format is the same as auto_install generated floppies."),
- sub { $_[0]{text} },
- [ { text => _("Load from floppy"), code => sub {
- while (1) {
- my $w = $o->wait_message(_("Package selection"), _("Loading from floppy"));
- log::l("load package selection from floppy");
- my $O = eval { install_any::loadO(undef, 'floppy') };
- if ($@) {
- $w = undef; #- close wait message.
- $o->ask_okcancel('', _("Insert a floppy containing package selection"))
- or return;
- } else {
- install_any::unselectMostPackages($o);
- foreach (@{$O->{default_packages} || []}) {
- my $pkg = pkgs::packageByName($packages, $_);
- pkgs::selectPackage($packages, $pkg) if $pkg;
- }
- return 1;
- }
- }
- } },
- { text => _("Save on floppy"), code => sub {
- log::l("save package selection to floppy");
- install_any::g_default_packages($o, 'quiet');
- } },
- { text => _("Cancel") },
- ]);
- $choice->{code} and $choice->{code}();
+ [ { val => \ (my $choice), list => [ __("Load from floppy"), __("Save on floppy") ], format => \&translate, type => 'list' } ]) or return;
+
+ if ($choice eq 'Load from floppy') {
+ while (1) {
+ my $w = $o->wait_message(_("Package selection"), _("Loading from floppy"));
+ log::l("load package selection from floppy");
+ my $O = eval { install_any::loadO(undef, 'floppy') };
+ if ($@) {
+ $w = undef; #- close wait message.
+ $o->ask_okcancel('', _("Insert a floppy containing package selection"))
+ or return;
+ } else {
+ install_any::unselectMostPackages($o);
+ foreach (@{$O->{default_packages} || []}) {
+ my $pkg = pkgs::packageByName($packages, $_);
+ pkgs::selectPackage($packages, $pkg) if $pkg;
+ }
+ return 1;
+ }
+ }
+ } else {
+ log::l("save package selection to floppy");
+ install_any::g_default_packages($o, 'quiet');
+ }
}
sub chooseGroups {
my ($o, $packages, $compssUsers, $min_level, $individual, $max_size) = @_;