diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-01-01 17:09:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-01-01 17:09:26 +0000 |
commit | d004436dc848800c9d65b90e39c39836c4d44cdf (patch) | |
tree | b37bdcac9dad762a2b692076522785a83533c5f6 /perl-install/interactive_newt.pm | |
parent | 1dc94110fc837dbe6cf06806f60c207ab1b64e83 (diff) | |
download | drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.gz drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.bz2 drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.xz drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.zip |
no_comment
Diffstat (limited to 'perl-install/interactive_newt.pm')
-rw-r--r-- | perl-install/interactive_newt.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm index 14280db19..16831a8df 100644 --- a/perl-install/interactive_newt.pm +++ b/perl-install/interactive_newt.pm @@ -84,10 +84,10 @@ sub ask_many_from_list_refW($$$$$) { $checklist->FormSetHeight($height); $checklist->FormSetBackground(9); - map_index { - $checklist->FormAddComponent( - Newt::Component::Checkbox(1, $::i + 1, $_, checkval(${$val->[$::i]} ||= ''), " *", ${$val->[$::i]})); + my @l = map_index { + Newt::Component::Checkbox(1, $::i + 1, $_, checkval(${$val->[$::i]} ||= ''), " *"); } @$list; + $checklist->FormAddComponent($_) foreach @l; my $listg = Newt::Grid::HCloseStacked($checklist, $height < @$list ? (separator(1, $height), $sb) : ()); @@ -98,12 +98,17 @@ sub ask_many_from_list_refW($$$$$) { $window->GridWrappedWindow($title); $window->GridAddComponentsToForm($form, 1); my $r = $form->RunForm; + $form->FormDestroy; Newt::PopWindow; $$r == $$cancel and return; - $$_ = $$_ eq "*" foreach @$val; + mapn { + my ($a, $b) = @_; + $$a = $b->CheckboxGetValue == ord '*'; + } $val, \@l; + 1; } @@ -124,7 +129,7 @@ sub ask_from_entries_refW { map_index { $w->ListboxAddEntry($_, $_) } @{$_->{list}}; $w; } elsif ($_->{type} eq "bool") { - Newt::Component::Checkbox(-1, -1, $_->{text} || '', checkval(${$_->{val}}), " *", ${$_->{val}}); + Newt::Component::Checkbox(-1, -1, $_->{text} || '', checkval(${$_->{val}}), " *"); } else { Newt::Component::Entry(-1, -1, '', 20, ($_->{hidden} && 1 << 1) | 1 << 2); } @@ -135,7 +140,7 @@ sub ask_from_entries_refW { sub { ${$ref->{val}} = $ref->{type} eq "bool" ? - $w->CheckboxGetValue : + $w->CheckboxGetValue == ord '*' : $ref->{type} eq "list" ? $w->ListboxGetCurrent : $w->EntryGetValue; |