diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-04-17 15:42:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-04-17 15:42:29 +0000 |
commit | dddfb90059117e6dde52c09e79ba0c8672942b53 (patch) | |
tree | 351bfc56411ea5e33782e579e7291ed783023b4c /perl-install/interactive_gtk.pm | |
parent | e2ab672b87d900beabb21632833e2f97d475b09a (diff) | |
download | drakx-backup-do-not-use-dddfb90059117e6dde52c09e79ba0c8672942b53.tar drakx-backup-do-not-use-dddfb90059117e6dde52c09e79ba0c8672942b53.tar.gz drakx-backup-do-not-use-dddfb90059117e6dde52c09e79ba0c8672942b53.tar.bz2 drakx-backup-do-not-use-dddfb90059117e6dde52c09e79ba0c8672942b53.tar.xz drakx-backup-do-not-use-dddfb90059117e6dde52c09e79ba0c8672942b53.zip |
no_comment
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r-- | perl-install/interactive_gtk.pm | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 979220dd8..66a714221 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -147,32 +147,31 @@ sub ask_from_treelistW { $w->main or die "ask_from_list cancel"; } -sub ask_many_from_list_refW { - my ($o, $title, $messages, $list, $val) = @_; - ask_many_from_list_with_help_refW($o, $title, $messages, $list, undef, $val) -} - sub ask_many_from_list_with_help_refW { - my ($o, $title, $messages, $list, $help, $val) = @_; + my ($o, $title, $messages, @L) = @_; my $w = my_gtk->new('', %$o); my $tips = new Gtk::Tooltips; - my $box = gtkpack(new Gtk::VBox(0,0), - map_index { - my $i = $::i; - my $o = Gtk::CheckButton->new($_); - $tips->set_tip($o, $help->[$i]) if $help->[$i]; - $o->set_active(${$val->[$i]}); - $o->signal_connect(clicked => sub { invbool \${$val->[$i]} }); - $o; - } @$list); + my @boxes = map { + my $l = $_; + my $box = gtkpack(new Gtk::VBox(0,0), + map_index { + my $i = $::i; + my $o = Gtk::CheckButton->new($_); + $tips->set_tip($o, $l->[1][$i]) if $l->[1][$i]; + $o->set_active(${$l->[2][$i]}); + $o->signal_connect(clicked => sub { invbool $l->[2][$i] }); + $o; + } @{$l->[0]}); + @{$l->[0]} > 11 ? gtkset_usize(createScrolledWindow($box), 0, 250) : $box; + } @L; gtkadd($w->{window}, gtkpack_(create_box_with_title($w, @$messages), - 1, @$list > 11 ? gtkset_usize(createScrolledWindow($box), 0, 250) : $box, - 0, $w->create_okcancel, - ) + (map {; 1, $_ } @boxes), + 0, $w->create_okcancel, + ) ); $w->{ok}->grab_focus; - $w->main && $val; + $w->main; } sub ask_from_entries_refW { |